@cntrl-site/components 1.0.23 → 1.0.25-alpha.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/Components/Grid/Grid.d.ts +2 -1
- package/dist/Components/Marquee/MarqueeComponent.d.ts +0 -2
- package/dist/index.js +383 -82
- package/dist/index.mjs +5653 -5323
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),l=require("react"),Ye=require("classnames"),P=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Ni=require("react-dom");function al(e){return e.type==="object"&&e.version===1}const sl="ControlSlider-module__wrapper___sHEkd",ll="ControlSlider-module__hoverArrow___A-dOH",cl="ControlSlider-module__sliderItem___QQSkR",dl="ControlSlider-module__sliderImage___9hRl-",ul="ControlSlider-module__arrow___05ghY",pl="ControlSlider-module__arrowVertical___tBfVN",ml="ControlSlider-module__nextArrow___-30Yc",gl="ControlSlider-module__arrowInner___aEra3",hl="ControlSlider-module__arrowIcon___S4ztF",fl="ControlSlider-module__arrowImg___2dwJW",yl="ControlSlider-module__mirror___brd6U",vl="ControlSlider-module__pagination___bicLF",bl="ControlSlider-module__paginationInner___bT-P-",xl="ControlSlider-module__paginationVertical___zYqKw",wl="ControlSlider-module__paginationItem___nTRbk",Sl="ControlSlider-module__dot___p1Qun",$l="ControlSlider-module__activeDot___LHFaj",Cl="ControlSlider-module__paginationInsideBottom___R3FWn",Tl="ControlSlider-module__paginationInsideTop___V-qb-",Ll="ControlSlider-module__paginationOutsideBottom___14w8D",El="ControlSlider-module__paginationOutsideTop___SCLqB",Il="ControlSlider-module__paginationInsideLeft___yOBRZ",Pl="ControlSlider-module__paginationInsideRight___Rtt3o",Rl="ControlSlider-module__paginationOutsideLeft___lahaw",Al="ControlSlider-module__paginationOutsideRight___EtuQa",Ml="ControlSlider-module__imgWrapper___UjEgB",kl="ControlSlider-module__captionBlock___dJ6-j",_l="ControlSlider-module__captionTextWrapper___HFlpf",Wl="ControlSlider-module__captionText___uGBVc",Fl="ControlSlider-module__active___WZK4G",Nl="ControlSlider-module__withPointerEvents___t-18M",Hl="ControlSlider-module__topLeftAlignment___zjnGM",Ol="ControlSlider-module__topCenterAlignment___gD1xW",Bl="ControlSlider-module__topRightAlignment___NMapS",jl="ControlSlider-module__middleLeftAlignment___OnUrY",zl="ControlSlider-module__middleCenterAlignment___Tdkl0",Vl="ControlSlider-module__middleRightAlignment___wEbfX",Dl="ControlSlider-module__bottomLeftAlignment___cTP2-",ql="ControlSlider-module__bottomCenterAlignment___c54fB",Kl="ControlSlider-module__bottomRightAlignment___kEwrz",Gl="ControlSlider-module__clickOverlay___DZA28",Ul="ControlSlider-module__contain___pLyq7",Xl="ControlSlider-module__cover___KdDat",Le={wrapper:sl,hoverArrow:ll,sliderItem:cl,sliderImage:dl,arrow:ul,arrowVertical:pl,nextArrow:ml,arrowInner:gl,arrowIcon:hl,arrowImg:fl,mirror:yl,pagination:vl,paginationInner:bl,paginationVertical:xl,paginationItem:wl,dot:Sl,activeDot:$l,paginationInsideBottom:Cl,paginationInsideTop:Tl,paginationOutsideBottom:Ll,paginationOutsideTop:El,paginationInsideLeft:Il,paginationInsideRight:Pl,paginationOutsideLeft:Rl,paginationOutsideRight:Al,imgWrapper:Ml,captionBlock:kl,captionTextWrapper:_l,captionText:Wl,active:Fl,withPointerEvents:Nl,topLeftAlignment:Hl,topCenterAlignment:Ol,topRightAlignment:Bl,middleLeftAlignment:jl,middleCenterAlignment:zl,middleRightAlignment:Vl,bottomLeftAlignment:Dl,bottomCenterAlignment:ql,bottomRightAlignment:Kl,clickOverlay:Gl,contain:Ul,cover:Xl};function Yl(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 Jl(e,t,n){return t&&Yl(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var ra="(prefers-reduced-motion: reduce)",ri=1,Zl=2,li=3,fi=4,Hi=5,fo=6,Co=7,Ql={CREATED:ri,MOUNTED:Zl,IDLE:li,MOVING:fi,SCROLLING:Hi,DRAGGING:fo,DESTROYED:Co};function wn(e){e.length=0}function Mn(e,t,n){return Array.prototype.slice.call(e,t,n)}function ct(e){return e.bind.apply(e,[null].concat(Mn(arguments,1)))}var ss=setTimeout,fr=function(){};function aa(e){return requestAnimationFrame(e)}function Ao(e,t){return typeof t===e}function Ei(e){return!Pr(e)&&Ao("object",e)}var Ir=Array.isArray,ls=ct(Ao,"function"),Pn=ct(Ao,"string"),Oi=ct(Ao,"undefined");function Pr(e){return e===null}function cs(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Bi(e){return Ir(e)?e:[e]}function Yt(e,t){Bi(e).forEach(t)}function Rr(e,t){return e.indexOf(t)>-1}function yo(e,t){return e.push.apply(e,Bi(t)),e}function fn(e,t,n){e&&Yt(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function ln(e,t){fn(e,Pn(t)?t.split(" "):t,!0)}function ji(e,t){Yt(t,e.appendChild.bind(e))}function Ar(e,t){Yt(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function Ii(e,t){return cs(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function ds(e,t){var n=e?Mn(e.children):[];return t?n.filter(function(i){return Ii(i,t)}):n}function zi(e,t){return t?ds(e,t)[0]:e.firstElementChild}var Pi=Object.keys;function qn(e,t,n){return e&&(n?Pi(e).reverse():Pi(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function Ri(e){return Mn(arguments,1).forEach(function(t){qn(t,function(n,i){e[i]=t[i]})}),e}function In(e){return Mn(arguments,1).forEach(function(t){qn(t,function(n,i){Ir(n)?e[i]=n.slice():Ei(n)?e[i]=In({},Ei(e[i])?e[i]:{},n):e[i]=n})}),e}function sa(e,t){Yt(t||Pi(e),function(n){delete e[n]})}function cn(e,t){Yt(e,function(n){Yt(t,function(i){n&&n.removeAttribute(i)})})}function He(e,t,n){Ei(t)?qn(t,function(i,o){He(e,o,i)}):Yt(e,function(i){Pr(n)||n===""?cn(i,t):i.setAttribute(t,String(n))})}function ai(e,t,n){var i=document.createElement(e);return t&&(Pn(t)?ln(i,t):He(i,t)),n&&ji(n,i),i}function en(e,t,n){if(Oi(n))return getComputedStyle(e)[t];Pr(n)||(e.style[t]=""+n)}function Ai(e,t){en(e,"display",t)}function us(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function tn(e,t){return e.getAttribute(t)}function la(e,t){return e&&e.classList.contains(t)}function Kt(e){return e.getBoundingClientRect()}function Kn(e){Yt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function ps(e){return zi(new DOMParser().parseFromString(e,"text/html").body)}function hn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function ms(e,t){return e&&e.querySelector(t)}function Mr(e,t){return t?Mn(e.querySelectorAll(t)):[]}function yn(e,t){fn(e,t,!1)}function yr(e){return e.timeStamp}function On(e){return Pn(e)?e:e?e+"px":""}var Vi="splide",kr="data-"+Vi;function Si(e,t){if(!e)throw new Error("["+Vi+"] "+(t||""))}var Rn=Math.min,To=Math.max,Lo=Math.floor,Mi=Math.ceil,Bt=Math.abs;function gs(e,t,n){return Bt(e-t)<n}function vo(e,t,n,i){var o=Rn(t,n),s=To(t,n);return i?o<e&&e<s:o<=e&&e<=s}function ni(e,t,n){var i=Rn(t,n),o=To(t,n);return Rn(To(i,e),o)}function vr(e){return+(e>0)-+(e<0)}function br(e,t){return Yt(t,function(n){e=e.replace("%s",""+n)}),e}function _r(e){return e<10?"0"+e:""+e}var ca={};function ec(e){return""+e+_r(ca[e]=(ca[e]||0)+1)}function hs(){var e=[];function t(a,u,c,m){o(a,u,function(p,R,b){var I="addEventListener"in p,g=I?p.removeEventListener.bind(p,R,c,m):p.removeListener.bind(p,c);I?p.addEventListener(R,c,m):p.addListener(c),e.push([p,R,b,c,g])})}function n(a,u,c){o(a,u,function(m,p,R){e=e.filter(function(b){return b[0]===m&&b[1]===p&&b[2]===R&&(!c||b[3]===c)?(b[4](),!1):!0})})}function i(a,u,c){var m,p=!0;return typeof CustomEvent=="function"?m=new CustomEvent(u,{bubbles:p,detail:c}):(m=document.createEvent("CustomEvent"),m.initCustomEvent(u,p,!1,c)),a.dispatchEvent(m),m}function o(a,u,c){Yt(a,function(m){m&&Yt(u,function(p){p.split(" ").forEach(function(R){var b=R.split(".");c(m,b[0],b[1])})})})}function s(){e.forEach(function(a){a[4]()}),wn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var kn="mounted",xr="ready",Sn="move",yi="moved",Wr="click",fs="active",ys="inactive",vs="visible",bs="hidden",Lt="refresh",Nt="updated",ci="resize",Mo="resized",xs="drag",ws="dragging",Ss="dragged",ko="scroll",Un="scrolled",tc="overflow",Fr="destroy",$s="arrows:mounted",Cs="arrows:updated",Ts="pagination:mounted",Ls="pagination:updated",Nr="navigation:mounted",Hr="autoplay:play",Es="autoplay:playing",Or="autoplay:pause",Br="lazyload:loaded",Is="sk",Ps="sh",Eo="ei";function gt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=hs();function i(s,a){n.bind(t,Bi(s).join(" "),function(u){a.apply(a,Ir(u.detail)?u.detail:[])})}function o(s){n.dispatch(t,s,Mn(arguments,1))}return e&&e.event.on(Fr,n.destroy),Ri(n,{bus:t,on:i,off:ct(n.unbind,t),emit:o})}function _o(e,t,n,i){var o=Date.now,s,a=0,u,c=!0,m=0;function p(){if(!c){if(a=e?Rn((o()-s)/e,1):1,n&&n(a),a>=1&&(t(),s=o(),i&&++m>=i))return b();u=aa(p)}}function R(w){w||g(),s=o()-(w?a*e:0),c=!1,u=aa(p)}function b(){c=!0}function I(){s=o(),a=0,n&&n(a)}function g(){u&&cancelAnimationFrame(u),a=0,u=0,c=!0}function v(w){e=w}function T(){return c}return{start:R,rewind:I,pause:b,cancel:g,set:v,isPaused:T}}function nc(e){var t=e;function n(o){t=o}function i(o){return Rr(Bi(o),t)}return{set:n,is:i}}function ic(e,t){var n=_o(0,e,null,1);return function(){n.isPaused()&&n.start()}}function oc(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},a=hs(),u=[];function c(){var g=n.mediaQuery==="min";Pi(o).sort(function(v,T){return g?+v-+T:+T-+v}).forEach(function(v){p(o[v],"("+(g?"min":"max")+"-width:"+v+"px)")}),p(s,ra),R()}function m(g){g&&a.destroy()}function p(g,v){var T=matchMedia(v);a.bind(T,"change",R),u.push([g,T])}function R(){var g=i.is(Co),v=n.direction,T=u.reduce(function(w,$){return In(w,$[1].matches?$[0]:{})},{});sa(n),I(T),n.destroy?e.destroy(n.destroy==="completely"):g?(m(!0),e.mount()):v!==n.direction&&e.refresh()}function b(g){matchMedia(ra).matches&&(g?In(n,s):sa(n,Pi(s)))}function I(g,v,T){In(n,g),v&&In(Object.getPrototypeOf(n),g),(T||!i.is(ri))&&e.emit(Nt,n)}return{setup:c,destroy:m,reduce:b,set:I}}var Wo="Arrow",Fo=Wo+"Left",No=Wo+"Right",Rs=Wo+"Up",As=Wo+"Down",da="rtl",Ho="ttb",Zo={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Rs,No],ArrowRight:[As,Fo]};function rc(e,t,n){function i(s,a,u){u=u||n.direction;var c=u===da&&!a?1:u===Ho?0:-1;return Zo[s]&&Zo[s][c]||s.replace(/width|left|right/i,function(m,p){var R=Zo[m.toLowerCase()][c]||m;return p>0?R.charAt(0).toUpperCase()+R.slice(1):R})}function o(s){return s*(n.direction===da?1:-1)}return{resolve:i,orient:o}}var vn="role",si="tabindex",ac="disabled",on="aria-",Di=on+"controls",Ms=on+"current",ua=on+"selected",Gt=on+"label",jr=on+"labelledby",ks=on+"hidden",zr=on+"orientation",ki=on+"roledescription",pa=on+"live",ma=on+"busy",ga=on+"atomic",Vr=[vn,si,ac,Di,Ms,Gt,jr,ks,zr,ki],dn=Vi+"__",_n="is-",Qo=Vi,ha=dn+"track",sc=dn+"list",Oo=dn+"slide",_s=Oo+"--clone",lc=Oo+"__container",Dr=dn+"arrows",Bo=dn+"arrow",Ws=Bo+"--prev",Fs=Bo+"--next",jo=dn+"pagination",Ns=jo+"__page",cc=dn+"progress",dc=cc+"__bar",uc=dn+"toggle",pc=dn+"spinner",mc=dn+"sr",gc=_n+"initialized",Gn=_n+"active",Hs=_n+"prev",Os=_n+"next",wr=_n+"visible",Sr=_n+"loading",Bs=_n+"focus-in",js=_n+"overflow",hc=[Gn,wr,Hs,Os,Sr,Bs,js],fc={slide:Oo,clone:_s,arrows:Dr,arrow:Bo,prev:Ws,next:Fs,pagination:jo,page:Ns,spinner:pc};function yc(e,t){if(ls(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Ii(n,t);)n=n.parentElement;return n}var vc=5,fa=200,zs="touchstart mousedown",er="touchmove mousemove",tr="touchend touchcancel mouseup click";function bc(e,t,n){var i=gt(e),o=i.on,s=i.bind,a=e.root,u=n.i18n,c={},m=[],p=[],R=[],b,I,g;function v(){S(),z(),$()}function T(){o(Lt,w),o(Lt,v),o(Nt,$),s(document,zs+" keydown",function(L){g=L.type==="keydown"},{capture:!0}),s(a,"focusin",function(){fn(a,Bs,!!g)})}function w(L){var C=Vr.concat("style");wn(m),yn(a,p),yn(b,R),cn([b,I],C),cn(a,L?C:["style",ki])}function $(){yn(a,p),yn(b,R),p=N(Qo),R=N(ha),ln(a,p),ln(b,R),He(a,Gt,n.label),He(a,jr,n.labelledby)}function S(){b=M("."+ha),I=zi(b,"."+sc),Si(b&&I,"A track/list element is missing."),yo(m,ds(I,"."+Oo+":not(."+_s+")")),qn({arrows:Dr,pagination:jo,prev:Ws,next:Fs,bar:dc,toggle:uc},function(L,C){c[C]=M("."+L)}),Ri(c,{root:a,track:b,list:I,slides:m})}function z(){var L=a.id||ec(Vi),C=n.role;a.id=L,b.id=b.id||L+"-track",I.id=I.id||L+"-list",!tn(a,vn)&&a.tagName!=="SECTION"&&C&&He(a,vn,C),He(a,ki,u.carousel),He(I,vn,"presentation")}function M(L){var C=ms(a,L);return C&&yc(C,"."+Qo)===a?C:void 0}function N(L){return[L+"--"+n.type,L+"--"+n.direction,n.drag&&L+"--draggable",n.isNavigation&&L+"--nav",L===Qo&&Gn]}return Ri(c,{setup:v,mount:T,destroy:w})}var di="slide",vi="loop",qi="fade";function xc(e,t,n,i){var o=gt(e),s=o.on,a=o.emit,u=o.bind,c=e.Components,m=e.root,p=e.options,R=p.isNavigation,b=p.updateOnMove,I=p.i18n,g=p.pagination,v=p.slideFocus,T=c.Direction.resolve,w=tn(i,"style"),$=tn(i,Gt),S=n>-1,z=zi(i,"."+lc),M;function N(){S||(i.id=m.id+"-slide"+_r(t+1),He(i,vn,g?"tabpanel":"group"),He(i,ki,I.slide),He(i,Gt,$||br(I.slideLabel,[t+1,e.length]))),L()}function L(){u(i,"click",ct(a,Wr,Q)),u(i,"keydown",ct(a,Is,Q)),s([yi,Ps,Un],k),s(Nr,J),b&&s(Sn,y)}function C(){M=!0,o.destroy(),yn(i,hc),cn(i,Vr),He(i,"style",w),He(i,Gt,$||"")}function J(){var Y=e.splides.map(function(O){var te=O.splide.Components.Slides.getAt(t);return te?te.slide.id:""}).join(" ");He(i,Gt,br(I.slideX,(S?n:t)+1)),He(i,Di,Y),He(i,vn,v?"button":""),v&&cn(i,ki)}function y(){M||k()}function k(){if(!M){var Y=e.index;_(),V(),fn(i,Hs,t===Y-1),fn(i,Os,t===Y+1)}}function _(){var Y=me();Y!==la(i,Gn)&&(fn(i,Gn,Y),He(i,Ms,R&&Y||""),a(Y?fs:ys,Q))}function V(){var Y=K(),O=!Y&&(!me()||S);if(e.state.is([fi,Hi])||He(i,ks,O||""),He(Mr(i,p.focusableNodes||""),si,O?-1:""),v&&He(i,si,O?-1:0),Y!==la(i,wr)&&(fn(i,wr,Y),a(Y?vs:bs,Q)),!Y&&document.activeElement===i){var te=c.Slides.getAt(e.index);te&&us(te.slide)}}function ne(Y,O,te){en(te&&z||i,Y,O)}function me(){var Y=e.index;return Y===t||p.cloneStatus&&Y===n}function K(){if(e.is(qi))return me();var Y=Kt(c.Elements.track),O=Kt(i),te=T("left",!0),ce=T("right",!0);return Lo(Y[te])<=Mi(O[te])&&Lo(O[ce])<=Mi(Y[ce])}function H(Y,O){var te=Bt(Y-t);return!S&&(p.rewind||e.is(vi))&&(te=Rn(te,e.length-te)),te<=O}var Q={index:t,slideIndex:n,slide:i,container:z,isClone:S,mount:N,destroy:C,update:k,style:ne,isWithin:H};return Q}function wc(e,t,n){var i=gt(e),o=i.on,s=i.emit,a=i.bind,u=t.Elements,c=u.slides,m=u.list,p=[];function R(){b(),o(Lt,I),o(Lt,b)}function b(){c.forEach(function(k,_){v(k,_,-1)})}function I(){M(function(k){k.destroy()}),wn(p)}function g(){M(function(k){k.update()})}function v(k,_,V){var ne=xc(e,_,V,k);ne.mount(),p.push(ne),p.sort(function(me,K){return me.index-K.index})}function T(k){return k?N(function(_){return!_.isClone}):p}function w(k){var _=t.Controller,V=_.toIndex(k),ne=_.hasFocus()?1:n.perPage;return N(function(me){return vo(me.index,V,V+ne-1)})}function $(k){return N(k)[0]}function S(k,_){Yt(k,function(V){if(Pn(V)&&(V=ps(V)),cs(V)){var ne=c[_];ne?Ar(V,ne):ji(m,V),ln(V,n.classes.slide),C(V,ct(s,ci))}}),s(Lt)}function z(k){Kn(N(k).map(function(_){return _.slide})),s(Lt)}function M(k,_){T(_).forEach(k)}function N(k){return p.filter(ls(k)?k:function(_){return Pn(k)?Ii(_.slide,k):Rr(Bi(k),_.index)})}function L(k,_,V){M(function(ne){ne.style(k,_,V)})}function C(k,_){var V=Mr(k,"img"),ne=V.length;ne?V.forEach(function(me){a(me,"load error",function(){--ne||_()})}):_()}function J(k){return k?c.length:p.length}function y(){return p.length>n.perPage}return{mount:R,destroy:I,update:g,register:v,get:T,getIn:w,getAt:$,add:S,remove:z,forEach:M,filter:N,style:L,getLength:J,isEnough:y}}function Sc(e,t,n){var i=gt(e),o=i.on,s=i.bind,a=i.emit,u=t.Slides,c=t.Direction.resolve,m=t.Elements,p=m.root,R=m.track,b=m.list,I=u.getAt,g=u.style,v,T,w;function $(){S(),s(window,"resize load",ic(ct(a,ci))),o([Nt,Lt],S),o(ci,z)}function S(){v=n.direction===Ho,en(p,"maxWidth",On(n.width)),en(R,c("paddingLeft"),M(!1)),en(R,c("paddingRight"),M(!0)),z(!0)}function z(Q){var Y=Kt(p);(Q||T.width!==Y.width||T.height!==Y.height)&&(en(R,"height",N()),g(c("marginRight"),On(n.gap)),g("width",C()),g("height",J(),!0),T=Y,a(Mo),w!==(w=H())&&(fn(p,js,w),a(tc,w)))}function M(Q){var Y=n.padding,O=c(Q?"right":"left");return Y&&On(Y[O]||(Ei(Y)?0:Y))||"0px"}function N(){var Q="";return v&&(Q=L(),Si(Q,"height or heightRatio is missing."),Q="calc("+Q+" - "+M(!1)+" - "+M(!0)+")"),Q}function L(){return On(n.height||Kt(b).width*n.heightRatio)}function C(){return n.autoWidth?null:On(n.fixedWidth)||(v?"":y())}function J(){return On(n.fixedHeight)||(v?n.autoHeight?null:y():L())}function y(){var Q=On(n.gap);return"calc((100%"+(Q&&" + "+Q)+")/"+(n.perPage||1)+(Q&&" - "+Q)+")"}function k(){return Kt(b)[c("width")]}function _(Q,Y){var O=I(Q||0);return O?Kt(O.slide)[c("width")]+(Y?0:me()):0}function V(Q,Y){var O=I(Q);if(O){var te=Kt(O.slide)[c("right")],ce=Kt(b)[c("left")];return Bt(te-ce)+(Y?0:me())}return 0}function ne(Q){return V(e.length-1)-V(0)+_(0,Q)}function me(){var Q=I(0);return Q&&parseFloat(en(Q.slide,c("marginRight")))||0}function K(Q){return parseFloat(en(R,c("padding"+(Q?"Right":"Left"))))||0}function H(){return e.is(qi)||ne(!0)>k()}return{mount:$,resize:z,listSize:k,slideSize:_,sliderSize:ne,totalSize:V,getPadding:K,isOverflow:H}}var $c=2;function Cc(e,t,n){var i=gt(e),o=i.on,s=t.Elements,a=t.Slides,u=t.Direction.resolve,c=[],m;function p(){o(Lt,R),o([Nt,ci],I),(m=T())&&(g(m),t.Layout.resize(!0))}function R(){b(),p()}function b(){Kn(c),wn(c),i.destroy()}function I(){var w=T();m!==w&&(m<w||!w)&&i.emit(Lt)}function g(w){var $=a.get().slice(),S=$.length;if(S){for(;$.length<w;)yo($,$);yo($.slice(-w),$.slice(0,w)).forEach(function(z,M){var N=M<w,L=v(z.slide,M);N?Ar(L,$[0].slide):ji(s.list,L),yo(c,L),a.register(L,M-w+(N?0:S),z.index)})}}function v(w,$){var S=w.cloneNode(!0);return ln(S,n.classes.clone),S.id=e.root.id+"-clone"+_r($+1),S}function T(){var w=n.clones;if(!e.is(vi))w=0;else if(Oi(w)){var $=n[u("fixedWidth")]&&t.Layout.slideSize(0),S=$&&Mi(Kt(s.track)[u("width")]/$);w=S||n[u("autoWidth")]&&e.length||n.perPage*$c}return w}return{mount:p,destroy:b}}function Tc(e,t,n){var i=gt(e),o=i.on,s=i.emit,a=e.state.set,u=t.Layout,c=u.slideSize,m=u.getPadding,p=u.totalSize,R=u.listSize,b=u.sliderSize,I=t.Direction,g=I.resolve,v=I.orient,T=t.Elements,w=T.list,$=T.track,S;function z(){S=t.Transition,o([kn,Mo,Nt,Lt],M)}function M(){t.Controller.isBusy()||(t.Scroll.cancel(),L(e.index),t.Slides.update())}function N(O,te,ce,oe){O!==te&&Q(O>ce)&&(k(),C(y(ne(),O>ce),!0)),a(fi),s(Sn,te,ce,O),S.start(te,function(){a(li),s(yi,te,ce,O),oe&&oe()})}function L(O){C(V(O,!0))}function C(O,te){if(!e.is(qi)){var ce=te?O:J(O);en(w,"transform","translate"+g("X")+"("+ce+"px)"),O!==ce&&s(Ps)}}function J(O){if(e.is(vi)){var te=_(O),ce=te>t.Controller.getEnd(),oe=te<0;(oe||ce)&&(O=y(O,ce))}return O}function y(O,te){var ce=O-H(te),oe=b();return O-=v(oe*(Mi(Bt(ce)/oe)||1))*(te?1:-1),O}function k(){C(ne(),!0),S.cancel()}function _(O){for(var te=t.Slides.get(),ce=0,oe=1/0,W=0;W<te.length;W++){var ue=te[W].index,h=Bt(V(ue,!0)-O);if(h<=oe)oe=h,ce=ue;else break}return ce}function V(O,te){var ce=v(p(O-1)-K(O));return te?me(ce):ce}function ne(){var O=g("left");return Kt(w)[O]-Kt($)[O]+v(m(!1))}function me(O){return n.trimSpace&&e.is(di)&&(O=ni(O,0,v(b(!0)-R()))),O}function K(O){var te=n.focus;return te==="center"?(R()-c(O,!0))/2:+te*c(O)||0}function H(O){return V(O?t.Controller.getEnd():0,!!n.trimSpace)}function Q(O){var te=v(y(ne(),O));return O?te>=0:te<=w[g("scrollWidth")]-Kt($)[g("width")]}function Y(O,te){te=Oi(te)?ne():te;var ce=O!==!0&&v(te)<v(H(!1)),oe=O!==!1&&v(te)>v(H(!0));return ce||oe}return{mount:z,move:N,jump:L,translate:C,shift:y,cancel:k,toIndex:_,toPosition:V,getPosition:ne,getLimit:H,exceededLimit:Y,reposition:M}}function Lc(e,t,n){var i=gt(e),o=i.on,s=i.emit,a=t.Move,u=a.getPosition,c=a.getLimit,m=a.toPosition,p=t.Slides,R=p.isEnough,b=p.getLength,I=n.omitEnd,g=e.is(vi),v=e.is(di),T=ct(ne,!1),w=ct(ne,!0),$=n.start||0,S,z=$,M,N,L;function C(){J(),o([Nt,Lt,Eo],J),o(Mo,y)}function J(){M=b(!0),N=n.perMove,L=n.perPage,S=Q();var h=ni($,0,I?S:M-1);h!==$&&($=h,a.reposition())}function y(){S!==Q()&&s(Eo)}function k(h,ae,be){if(!ue()){var ye=V(h),Ae=H(ye);Ae>-1&&(ae||Ae!==$)&&(ce(Ae),a.move(ye,Ae,z,be))}}function _(h,ae,be,ye){t.Scroll.scroll(h,ae,be,function(){var Ae=H(a.toIndex(u()));ce(I?Rn(Ae,S):Ae),ye&&ye()})}function V(h){var ae=$;if(Pn(h)){var be=h.match(/([+\-<>])(\d+)?/)||[],ye=be[1],Ae=be[2];ye==="+"||ye==="-"?ae=me($+ +(""+ye+(+Ae||1)),$):ye===">"?ae=Ae?Y(+Ae):T(!0):ye==="<"&&(ae=w(!0))}else ae=g?h:ni(h,0,S);return ae}function ne(h,ae){var be=N||(W()?1:L),ye=me($+be*(h?-1:1),$,!(N||W()));return ye===-1&&v&&!gs(u(),c(!h),1)?h?0:S:ae?ye:H(ye)}function me(h,ae,be){if(R()||W()){var ye=K(h);ye!==h&&(ae=h,h=ye,be=!1),h<0||h>S?!N&&(vo(0,h,ae,!0)||vo(S,ae,h,!0))?h=Y(O(h)):g?h=be?h<0?-(M%L||L):M:h:n.rewind?h=h<0?S:0:h=-1:be&&h!==ae&&(h=Y(O(ae)+(h<ae?-1:1)))}else h=-1;return h}function K(h){if(v&&n.trimSpace==="move"&&h!==$)for(var ae=u();ae===m(h,!0)&&vo(h,0,e.length-1,!n.rewind);)h<$?--h:++h;return h}function H(h){return g?(h+M)%M||0:h}function Q(){for(var h=M-(W()||g&&N?1:L);I&&h-- >0;)if(m(M-1,!0)!==m(h,!0)){h++;break}return ni(h,0,M-1)}function Y(h){return ni(W()?h:L*h,0,S)}function O(h){return W()?Rn(h,S):Lo((h>=S?M-1:h)/L)}function te(h){var ae=a.toIndex(h);return v?ni(ae,0,S):ae}function ce(h){h!==$&&(z=$,$=h)}function oe(h){return h?z:$}function W(){return!Oi(n.focus)||n.isNavigation}function ue(){return e.state.is([fi,Hi])&&!!n.waitForTransition}return{mount:C,go:k,scroll:_,getNext:T,getPrev:w,getAdjacent:ne,getEnd:Q,setIndex:ce,getIndex:oe,toIndex:Y,toPage:O,toDest:te,hasFocus:W,isBusy:ue}}var Ec="http://www.w3.org/2000/svg",Ic="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",eo=40;function Pc(e,t,n){var i=gt(e),o=i.on,s=i.bind,a=i.emit,u=n.classes,c=n.i18n,m=t.Elements,p=t.Controller,R=m.arrows,b=m.track,I=R,g=m.prev,v=m.next,T,w,$={};function S(){M(),o(Nt,z)}function z(){N(),S()}function M(){var _=n.arrows;_&&!(g&&v)&&J(),g&&v&&(Ri($,{prev:g,next:v}),Ai(I,_?"":"none"),ln(I,w=Dr+"--"+n.direction),_&&(L(),k(),He([g,v],Di,b.id),a($s,g,v)))}function N(){i.destroy(),yn(I,w),T?(Kn(R?[g,v]:I),g=v=null):cn([g,v],Vr)}function L(){o([kn,yi,Lt,Un,Eo],k),s(v,"click",ct(C,">")),s(g,"click",ct(C,"<"))}function C(_){p.go(_,!0)}function J(){I=R||ai("div",u.arrows),g=y(!0),v=y(!1),T=!0,ji(I,[g,v]),!R&&Ar(I,b)}function y(_){var V='<button class="'+u.arrow+" "+(_?u.prev:u.next)+'" type="button"><svg xmlns="'+Ec+'" viewBox="0 0 '+eo+" "+eo+'" width="'+eo+'" height="'+eo+'" focusable="false"><path d="'+(n.arrowPath||Ic)+'" />';return ps(V)}function k(){if(g&&v){var _=e.index,V=p.getPrev(),ne=p.getNext(),me=V>-1&&_<V?c.last:c.prev,K=ne>-1&&_>ne?c.first:c.next;g.disabled=V<0,v.disabled=ne<0,He(g,Gt,me),He(v,Gt,K),a(Cs,g,v,V,ne)}}return{arrows:$,mount:S,destroy:N,update:k}}var Rc=kr+"-interval";function Ac(e,t,n){var i=gt(e),o=i.on,s=i.bind,a=i.emit,u=_o(n.interval,e.go.bind(e,">"),L),c=u.isPaused,m=t.Elements,p=t.Elements,R=p.root,b=p.toggle,I=n.autoplay,g,v,T=I==="pause";function w(){I&&($(),b&&He(b,Di,m.track.id),T||S(),N())}function $(){n.pauseOnHover&&s(R,"mouseenter mouseleave",function(J){g=J.type==="mouseenter",M()}),n.pauseOnFocus&&s(R,"focusin focusout",function(J){v=J.type==="focusin",M()}),b&&s(b,"click",function(){T?S():z(!0)}),o([Sn,ko,Lt],u.rewind),o(Sn,C)}function S(){c()&&t.Slides.isEnough()&&(u.start(!n.resetProgress),v=g=T=!1,N(),a(Hr))}function z(J){J===void 0&&(J=!0),T=!!J,N(),c()||(u.pause(),a(Or))}function M(){T||(g||v?z(!1):S())}function N(){b&&(fn(b,Gn,!T),He(b,Gt,n.i18n[T?"play":"pause"]))}function L(J){var y=m.bar;y&&en(y,"width",J*100+"%"),a(Es,J)}function C(J){var y=t.Slides.getAt(J);u.set(y&&+tn(y.slide,Rc)||n.interval)}return{mount:w,destroy:u.cancel,play:S,pause:z,isPaused:c}}function Mc(e,t,n){var i=gt(e),o=i.on;function s(){n.cover&&(o(Br,ct(u,!0)),o([kn,Nt,Lt],ct(a,!0)))}function a(c){t.Slides.forEach(function(m){var p=zi(m.container||m.slide,"img");p&&p.src&&u(c,p,m)})}function u(c,m,p){p.style("background",c?'center/cover no-repeat url("'+m.src+'")':"",!0),Ai(m,c?"none":"")}return{mount:s,destroy:ct(a,!1)}}var kc=10,_c=600,Wc=.6,Fc=1.5,Nc=800;function Hc(e,t,n){var i=gt(e),o=i.on,s=i.emit,a=e.state.set,u=t.Move,c=u.getPosition,m=u.getLimit,p=u.exceededLimit,R=u.translate,b=e.is(di),I,g,v=1;function T(){o(Sn,z),o([Nt,Lt],M)}function w(L,C,J,y,k){var _=c();if(z(),J&&(!b||!p())){var V=t.Layout.sliderSize(),ne=vr(L)*V*Lo(Bt(L)/V)||0;L=u.toPosition(t.Controller.toDest(L%V))+ne}var me=gs(_,L,1);v=1,C=me?0:C||To(Bt(L-_)/Fc,Nc),g=y,I=_o(C,$,ct(S,_,L,k),1),a(Hi),s(ko),I.start()}function $(){a(li),g&&g(),s(Un)}function S(L,C,J,y){var k=c(),_=L+(C-L)*N(y),V=(_-k)*v;R(k+V),b&&!J&&p()&&(v*=Wc,Bt(V)<kc&&w(m(p(!0)),_c,!1,g,!0))}function z(){I&&I.cancel()}function M(){I&&!I.isPaused()&&(z(),$())}function N(L){var C=n.easingFunc;return C?C(L):1-Math.pow(1-L,4)}return{mount:T,destroy:z,scroll:w,cancel:M}}var ii={passive:!1,capture:!0};function Oc(e,t,n){var i=gt(e),o=i.on,s=i.emit,a=i.bind,u=i.unbind,c=e.state,m=t.Move,p=t.Scroll,R=t.Controller,b=t.Elements.track,I=t.Media.reduce,g=t.Direction,v=g.resolve,T=g.orient,w=m.getPosition,$=m.exceededLimit,S,z,M,N,L,C=!1,J,y,k;function _(){a(b,er,fr,ii),a(b,tr,fr,ii),a(b,zs,ne,ii),a(b,"click",H,{capture:!0}),a(b,"dragstart",hn),o([kn,Nt],V)}function V(){var U=n.drag;ge(!U),N=U==="free"}function ne(U){if(J=!1,!y){var X=Ae(U);ye(U.target)&&(X||!U.button)&&(R.isBusy()?hn(U,!0):(k=X?b:window,L=c.is([fi,Hi]),M=null,a(k,er,me,ii),a(k,tr,K,ii),m.cancel(),p.cancel(),Q(U)))}}function me(U){if(c.is(fo)||(c.set(fo),s(xs)),U.cancelable)if(L){m.translate(S+be(W(U)));var X=ue(U)>fa,B=C!==(C=$());(X||B)&&Q(U),J=!0,s(ws),hn(U)}else te(U)&&(L=O(U),hn(U))}function K(U){c.is(fo)&&(c.set(li),s(Ss)),L&&(Y(U),hn(U)),u(k,er,me),u(k,tr,K),L=!1}function H(U){!y&&J&&hn(U,!0)}function Q(U){M=z,z=U,S=w()}function Y(U){var X=ce(U),B=oe(X),se=n.rewind&&n.rewindByDrag;I(!1),N?R.scroll(B,0,n.snap):e.is(qi)?R.go(T(vr(X))<0?se?"<":"-":se?">":"+"):e.is(di)&&C&&se?R.go($(!0)?">":"<"):R.go(R.toDest(B),!0),I(!0)}function O(U){var X=n.dragMinThreshold,B=Ei(X),se=B&&X.mouse||0,Ee=(B?X.touch:+X)||10;return Bt(W(U))>(Ae(U)?Ee:se)}function te(U){return Bt(W(U))>Bt(W(U,!0))}function ce(U){if(e.is(vi)||!C){var X=ue(U);if(X&&X<fa)return W(U)/X}return 0}function oe(U){return w()+vr(U)*Rn(Bt(U)*(n.flickPower||600),N?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function W(U,X){return ae(U,X)-ae(h(U),X)}function ue(U){return yr(U)-yr(h(U))}function h(U){return z===U&&M||z}function ae(U,X){return(Ae(U)?U.changedTouches[0]:U)["page"+v(X?"Y":"X")]}function be(U){return U/(C&&e.is(di)?vc:1)}function ye(U){var X=n.noDrag;return!Ii(U,"."+Ns+", ."+Bo)&&(!X||!Ii(U,X))}function Ae(U){return typeof TouchEvent<"u"&&U instanceof TouchEvent}function Z(){return L}function ge(U){y=U}return{mount:_,disable:ge,isDragging:Z}}var Bc={Spacebar:" ",Right:No,Left:Fo,Up:Rs,Down:As};function qr(e){return e=Pn(e)?e:e.key,Bc[e]||e}var ya="keydown";function jc(e,t,n){var i=gt(e),o=i.on,s=i.bind,a=i.unbind,u=e.root,c=t.Direction.resolve,m,p;function R(){b(),o(Nt,I),o(Nt,b),o(Sn,v)}function b(){var w=n.keyboard;w&&(m=w==="global"?window:u,s(m,ya,T))}function I(){a(m,ya)}function g(w){p=w}function v(){var w=p;p=!0,ss(function(){p=w})}function T(w){if(!p){var $=qr(w);$===c(Fo)?e.go("<"):$===c(No)&&e.go(">")}}return{mount:R,destroy:I,disable:g}}var $i=kr+"-lazy",bo=$i+"-srcset",zc="["+$i+"], ["+bo+"]";function Vc(e,t,n){var i=gt(e),o=i.on,s=i.off,a=i.bind,u=i.emit,c=n.lazyLoad==="sequential",m=[yi,Un],p=[];function R(){n.lazyLoad&&(b(),o(Lt,b))}function b(){wn(p),I(),c?w():(s(m),o(m,g),g())}function I(){t.Slides.forEach(function($){Mr($.slide,zc).forEach(function(S){var z=tn(S,$i),M=tn(S,bo);if(z!==S.src||M!==S.srcset){var N=n.classes.spinner,L=S.parentElement,C=zi(L,"."+N)||ai("span",N,L);p.push([S,$,C]),S.src||Ai(S,"none")}})})}function g(){p=p.filter(function($){var S=n.perPage*((n.preloadPages||1)+1)-1;return $[1].isWithin(e.index,S)?v($):!0}),p.length||s(m)}function v($){var S=$[0];ln($[1].slide,Sr),a(S,"load error",ct(T,$)),He(S,"src",tn(S,$i)),He(S,"srcset",tn(S,bo)),cn(S,$i),cn(S,bo)}function T($,S){var z=$[0],M=$[1];yn(M.slide,Sr),S.type!=="error"&&(Kn($[2]),Ai(z,""),u(Br,z,M),u(ci)),c&&w()}function w(){p.length&&v(p.shift())}return{mount:R,destroy:ct(wn,p),check:g}}function Dc(e,t,n){var i=gt(e),o=i.on,s=i.emit,a=i.bind,u=t.Slides,c=t.Elements,m=t.Controller,p=m.hasFocus,R=m.getIndex,b=m.go,I=t.Direction.resolve,g=c.pagination,v=[],T,w;function $(){S(),o([Nt,Lt,Eo],$);var y=n.pagination;g&&Ai(g,y?"":"none"),y&&(o([Sn,ko,Un],J),z(),J(),s(Ts,{list:T,items:v},C(e.index)))}function S(){T&&(Kn(g?Mn(T.children):T),yn(T,w),wn(v),T=null),i.destroy()}function z(){var y=e.length,k=n.classes,_=n.i18n,V=n.perPage,ne=p()?m.getEnd()+1:Mi(y/V);T=g||ai("ul",k.pagination,c.track.parentElement),ln(T,w=jo+"--"+L()),He(T,vn,"tablist"),He(T,Gt,_.select),He(T,zr,L()===Ho?"vertical":"");for(var me=0;me<ne;me++){var K=ai("li",null,T),H=ai("button",{class:k.page,type:"button"},K),Q=u.getIn(me).map(function(O){return O.slide.id}),Y=!p()&&V>1?_.pageX:_.slideX;a(H,"click",ct(M,me)),n.paginationKeyboard&&a(H,"keydown",ct(N,me)),He(K,vn,"presentation"),He(H,vn,"tab"),He(H,Di,Q.join(" ")),He(H,Gt,br(Y,me+1)),He(H,si,-1),v.push({li:K,button:H,page:me})}}function M(y){b(">"+y,!0)}function N(y,k){var _=v.length,V=qr(k),ne=L(),me=-1;V===I(No,!1,ne)?me=++y%_:V===I(Fo,!1,ne)?me=(--y+_)%_:V==="Home"?me=0:V==="End"&&(me=_-1);var K=v[me];K&&(us(K.button),b(">"+me),hn(k,!0))}function L(){return n.paginationDirection||n.direction}function C(y){return v[m.toPage(y)]}function J(){var y=C(R(!0)),k=C(R());if(y){var _=y.button;yn(_,Gn),cn(_,ua),He(_,si,-1)}if(k){var V=k.button;ln(V,Gn),He(V,ua,!0),He(V,si,"")}s(Ls,{list:T,items:v},y,k)}return{items:v,mount:$,destroy:S,getAt:C,update:J}}var qc=[" ","Enter"];function Kc(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function a(){e.splides.forEach(function(g){g.isParent||(m(e,g.splide),m(g.splide,e))}),i&&p()}function u(){s.forEach(function(g){g.destroy()}),wn(s)}function c(){u(),a()}function m(g,v){var T=gt(g);T.on(Sn,function(w,$,S){v.go(v.is(vi)?S:w)}),s.push(T)}function p(){var g=gt(e),v=g.on;v(Wr,b),v(Is,I),v([kn,Nt],R),s.push(g),g.emit(Nr,e.splides)}function R(){He(t.Elements.list,zr,n.direction===Ho?"vertical":"")}function b(g){e.go(g.index)}function I(g,v){Rr(qc,qr(v))&&(b(g),hn(v))}return{setup:ct(t.Media.set,{slideFocus:Oi(o)?i:o},!0),mount:a,destroy:u,remount:c}}function Gc(e,t,n){var i=gt(e),o=i.bind,s=0;function a(){n.wheel&&o(t.Elements.track,"wheel",u,ii)}function u(m){if(m.cancelable){var p=m.deltaY,R=p<0,b=yr(m),I=n.wheelMinThreshold||0,g=n.wheelSleep||0;Bt(p)>I&&b-s>g&&(e.go(R?"<":">"),s=b),c(R)&&hn(m)}}function c(m){return!n.releaseWheel||e.state.is(fi)||t.Controller.getAdjacent(m)!==-1}return{mount:a}}var Uc=90;function Xc(e,t,n){var i=gt(e),o=i.on,s=t.Elements.track,a=n.live&&!n.isNavigation,u=ai("span",mc),c=_o(Uc,ct(p,!1));function m(){a&&(b(!t.Autoplay.isPaused()),He(s,ga,!0),u.textContent="…",o(Hr,ct(b,!0)),o(Or,ct(b,!1)),o([yi,Un],ct(p,!0)))}function p(I){He(s,ma,I),I?(ji(s,u),c.start()):(Kn(u),c.cancel())}function R(){cn(s,[pa,ga,ma]),Kn(u)}function b(I){a&&He(s,pa,I?"off":"polite")}return{mount:m,disable:b,destroy:R}}var Yc=Object.freeze({__proto__:null,Media:oc,Direction:rc,Elements:bc,Slides:wc,Layout:Sc,Clones:Cc,Move:Tc,Controller:Lc,Arrows:Pc,Autoplay:Ac,Cover:Mc,Scroll:Hc,Drag:Oc,Keyboard:jc,LazyLoad:Vc,Pagination:Dc,Sync:Kc,Wheel:Gc,Live:Xc}),Jc={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"},Zc={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:fc,i18n:Jc,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Qc(e,t,n){var i=t.Slides;function o(){gt(e).on([kn,Lt],s)}function s(){i.forEach(function(u){u.style("transform","translateX(-"+100*u.index+"%)")})}function a(u,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),ss(c)}return{mount:o,start:a,cancel:fr}}function ed(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,a=t.Elements.list,u=ct(en,a,"transition"),c;function m(){gt(e).bind(a,"transitionend",function(I){I.target===a&&c&&(R(),c())})}function p(I,g){var v=i.toPosition(I,!0),T=i.getPosition(),w=b(I);Bt(v-T)>=1&&w>=1?n.useScroll?s.scroll(v,w,!1,g):(u("transform "+w+"ms "+n.easing),i.translate(v,!0),c=g):(i.jump(I),g())}function R(){u(""),s.cancel()}function b(I){var g=n.rewindSpeed;if(e.is(di)&&g){var v=o.getIndex(!0),T=o.getEnd();if(v===0&&I>=T||v>=T&&I===0)return g}return n.speed}return{mount:m,start:p,cancel:R}}var td=(function(){function e(n,i){this.event=gt(),this.Components={},this.state=nc(ri),this.splides=[],this._o={},this._E={};var o=Pn(n)?ms(document,n):n;Si(o,o+" is invalid."),this.root=o,i=In({label:tn(o,Gt)||"",labelledby:tn(o,jr)||""},Zc,e.defaults,i||{});try{In(i,JSON.parse(tn(o,kr)))}catch{Si(!1,"Invalid JSON")}this._o=Object.create(In({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,a=this.state,u=this.Components;Si(a.is([ri,Co]),"Already mounted!"),a.set(ri),this._C=u,this._T=o||this._T||(this.is(qi)?Qc:ed),this._E=i||this._E;var c=Ri({},Yc,this._E,{Transition:this._T});return qn(c,function(m,p){var R=m(s,u,s._o);u[p]=R,R.setup&&R.setup()}),qn(u,function(m){m.mount&&m.mount()}),this.emit(kn),ln(this.root,gc),a.set(li),this.emit(xr),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(li)&&(this._C.Sync.remount(),i.Components.Sync.remount()),this},t.go=function(i){return this._C.Controller.go(i),this},t.on=function(i,o){return this.event.on(i,o),this},t.off=function(i){return this.event.off(i),this},t.emit=function(i){var o;return(o=this.event).emit.apply(o,[i].concat(Mn(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(Lt),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(ri)?gt(this).on(xr,this.destroy.bind(this,i)):(qn(this._C,function(a){a.destroy&&a.destroy(i)},!0),o.emit(Fr),o.destroy(),i&&wn(this.splides),s.set(Co)),this},Jl(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})(),Kr=td;Kr.defaults={};Kr.STATES=Ql;var va=[[kn,"onMounted"],[xr,"onReady"],[Sn,"onMove"],[yi,"onMoved"],[Wr,"onClick"],[fs,"onActive"],[ys,"onInactive"],[vs,"onVisible"],[bs,"onHidden"],[Lt,"onRefresh"],[Nt,"onUpdated"],[ci,"onResize"],[Mo,"onResized"],[xs,"onDrag"],[ws,"onDragging"],[Ss,"onDragged"],[ko,"onScroll"],[Un,"onScrolled"],[Fr,"onDestroy"],[$s,"onArrowsMounted"],[Cs,"onArrowsUpdated"],[Ts,"onPaginationMounted"],[Ls,"onPaginationUpdated"],[Nr,"onNavigationMounted"],[Hr,"onAutoplayPlay"],[Es,"onAutoplayPlaying"],[Or,"onAutoplayPause"],[Br,"onLazyLoadLoaded"]];function Gr(...e){return e.filter(Boolean).join(" ")}function Io(e){return e!==null&&typeof e=="object"}function $r(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!$r(n,t[i]));if(Io(e)&&Io(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!$r(e[o],t[o]))}return e===t}function nd(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function id(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 Cr(e,t){const n=e;return id(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():Io(i)?n[o]=Cr(Io(n[o])?n[o]:{},i):n[o]=i}),n}var od=({children:e,className:t,...n})=>l.createElement("div",{className:Gr("splide__track",t),...n},l.createElement("ul",{className:"splide__list"},e)),Ur=class extends l.Component{constructor(){super(...arguments),this.splideRef=l.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Kr(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Cr({},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&&!$r(this.options,e)&&(this.splide.options=e,this.options=Cr({},e));const t=this.getSlides();nd(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){va.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 l.createElement(t,{className:Gr("splide",e),ref:this.splideRef,...this.omit(o,["options",...va.map(s=>s[1])])},n?l.createElement(od,null,i):i)}},Xr=({children:e,className:t,...n})=>l.createElement("li",{className:Gr("splide__slide",t),...n},e);/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),l=require("react"),Xe=require("classnames"),L=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Ni=require("react-dom");function al(e){return e.type==="object"&&e.version===1}const sl="ControlSlider-module__wrapper___sHEkd",ll="ControlSlider-module__hoverArrow___A-dOH",cl="ControlSlider-module__sliderItem___QQSkR",dl="ControlSlider-module__sliderImage___9hRl-",ul="ControlSlider-module__arrow___05ghY",pl="ControlSlider-module__arrowVertical___tBfVN",ml="ControlSlider-module__nextArrow___-30Yc",gl="ControlSlider-module__arrowInner___aEra3",hl="ControlSlider-module__arrowIcon___S4ztF",fl="ControlSlider-module__arrowImg___2dwJW",yl="ControlSlider-module__mirror___brd6U",vl="ControlSlider-module__pagination___bicLF",bl="ControlSlider-module__paginationInner___bT-P-",xl="ControlSlider-module__paginationVertical___zYqKw",wl="ControlSlider-module__paginationItem___nTRbk",$l="ControlSlider-module__dot___p1Qun",Sl="ControlSlider-module__activeDot___LHFaj",Cl="ControlSlider-module__paginationInsideBottom___R3FWn",Tl="ControlSlider-module__paginationInsideTop___V-qb-",Ll="ControlSlider-module__paginationOutsideBottom___14w8D",El="ControlSlider-module__paginationOutsideTop___SCLqB",Pl="ControlSlider-module__paginationInsideLeft___yOBRZ",Il="ControlSlider-module__paginationInsideRight___Rtt3o",Al="ControlSlider-module__paginationOutsideLeft___lahaw",Rl="ControlSlider-module__paginationOutsideRight___EtuQa",kl="ControlSlider-module__imgWrapper___UjEgB",Ml="ControlSlider-module__captionBlock___dJ6-j",_l="ControlSlider-module__captionTextWrapper___HFlpf",Wl="ControlSlider-module__captionText___uGBVc",Fl="ControlSlider-module__active___WZK4G",Nl="ControlSlider-module__withPointerEvents___t-18M",Hl="ControlSlider-module__topLeftAlignment___zjnGM",Ol="ControlSlider-module__topCenterAlignment___gD1xW",Bl="ControlSlider-module__topRightAlignment___NMapS",jl="ControlSlider-module__middleLeftAlignment___OnUrY",zl="ControlSlider-module__middleCenterAlignment___Tdkl0",Vl="ControlSlider-module__middleRightAlignment___wEbfX",Dl="ControlSlider-module__bottomLeftAlignment___cTP2-",ql="ControlSlider-module__bottomCenterAlignment___c54fB",Kl="ControlSlider-module__bottomRightAlignment___kEwrz",Gl="ControlSlider-module__clickOverlay___DZA28",Ul="ControlSlider-module__contain___pLyq7",Xl="ControlSlider-module__cover___KdDat",Ee={wrapper:sl,hoverArrow:ll,sliderItem:cl,sliderImage:dl,arrow:ul,arrowVertical:pl,nextArrow:ml,arrowInner:gl,arrowIcon:hl,arrowImg:fl,mirror:yl,pagination:vl,paginationInner:bl,paginationVertical:xl,paginationItem:wl,dot:$l,activeDot:Sl,paginationInsideBottom:Cl,paginationInsideTop:Tl,paginationOutsideBottom:Ll,paginationOutsideTop:El,paginationInsideLeft:Pl,paginationInsideRight:Il,paginationOutsideLeft:Al,paginationOutsideRight:Rl,imgWrapper:kl,captionBlock:Ml,captionTextWrapper:_l,captionText:Wl,active:Fl,withPointerEvents:Nl,topLeftAlignment:Hl,topCenterAlignment:Ol,topRightAlignment:Bl,middleLeftAlignment:jl,middleCenterAlignment:zl,middleRightAlignment:Vl,bottomLeftAlignment:Dl,bottomCenterAlignment:ql,bottomRightAlignment:Kl,clickOverlay:Gl,contain:Ul,cover:Xl};function Yl(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 Jl(e,t,n){return t&&Yl(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var ra="(prefers-reduced-motion: reduce)",ri=1,Zl=2,li=3,fi=4,Hi=5,fo=6,Co=7,Ql={CREATED:ri,MOUNTED:Zl,IDLE:li,MOVING:fi,SCROLLING:Hi,DRAGGING:fo,DESTROYED:Co};function bn(e){e.length=0}function kn(e,t,n){return Array.prototype.slice.call(e,t,n)}function pt(e){return e.bind.apply(e,[null].concat(kn(arguments,1)))}var ss=setTimeout,fr=function(){};function aa(e){return requestAnimationFrame(e)}function Ro(e,t){return typeof t===e}function Ei(e){return!Ir(e)&&Ro("object",e)}var Pr=Array.isArray,ls=pt(Ro,"function"),In=pt(Ro,"string"),Oi=pt(Ro,"undefined");function Ir(e){return e===null}function cs(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Bi(e){return Pr(e)?e:[e]}function Gt(e,t){Bi(e).forEach(t)}function Ar(e,t){return e.indexOf(t)>-1}function yo(e,t){return e.push.apply(e,Bi(t)),e}function gn(e,t,n){e&&Gt(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function on(e,t){gn(e,In(t)?t.split(" "):t,!0)}function ji(e,t){Gt(t,e.appendChild.bind(e))}function Rr(e,t){Gt(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function Pi(e,t){return cs(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function ds(e,t){var n=e?kn(e.children):[];return t?n.filter(function(i){return Pi(i,t)}):n}function zi(e,t){return t?ds(e,t)[0]:e.firstElementChild}var Ii=Object.keys;function qn(e,t,n){return e&&(n?Ii(e).reverse():Ii(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function Ai(e){return kn(arguments,1).forEach(function(t){qn(t,function(n,i){e[i]=t[i]})}),e}function Pn(e){return kn(arguments,1).forEach(function(t){qn(t,function(n,i){Pr(n)?e[i]=n.slice():Ei(n)?e[i]=Pn({},Ei(e[i])?e[i]:{},n):e[i]=n})}),e}function sa(e,t){Gt(t||Ii(e),function(n){delete e[n]})}function rn(e,t){Gt(e,function(n){Gt(t,function(i){n&&n.removeAttribute(i)})})}function Ne(e,t,n){Ei(t)?qn(t,function(i,o){Ne(e,o,i)}):Gt(e,function(i){Ir(n)||n===""?rn(i,t):i.setAttribute(t,String(n))})}function ai(e,t,n){var i=document.createElement(e);return t&&(In(t)?on(i,t):Ne(i,t)),n&&ji(n,i),i}function Jt(e,t,n){if(Oi(n))return getComputedStyle(e)[t];Ir(n)||(e.style[t]=""+n)}function Ri(e,t){Jt(e,"display",t)}function us(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Zt(e,t){return e.getAttribute(t)}function la(e,t){return e&&e.classList.contains(t)}function Vt(e){return e.getBoundingClientRect()}function Kn(e){Gt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function ps(e){return zi(new DOMParser().parseFromString(e,"text/html").body)}function mn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function ms(e,t){return e&&e.querySelector(t)}function kr(e,t){return t?kn(e.querySelectorAll(t)):[]}function hn(e,t){gn(e,t,!1)}function yr(e){return e.timeStamp}function Hn(e){return In(e)?e:e?e+"px":""}var Vi="splide",Mr="data-"+Vi;function $i(e,t){if(!e)throw new Error("["+Vi+"] "+(t||""))}var An=Math.min,To=Math.max,Lo=Math.floor,ki=Math.ceil,jt=Math.abs;function gs(e,t,n){return jt(e-t)<n}function vo(e,t,n,i){var o=An(t,n),s=To(t,n);return i?o<e&&e<s:o<=e&&e<=s}function ni(e,t,n){var i=An(t,n),o=To(t,n);return An(To(i,e),o)}function vr(e){return+(e>0)-+(e<0)}function br(e,t){return Gt(t,function(n){e=e.replace("%s",""+n)}),e}function _r(e){return e<10?"0"+e:""+e}var ca={};function ec(e){return""+e+_r(ca[e]=(ca[e]||0)+1)}function hs(){var e=[];function t(a,u,c,m){o(a,u,function(p,E,b){var C="addEventListener"in p,g=C?p.removeEventListener.bind(p,E,c,m):p.removeListener.bind(p,c);C?p.addEventListener(E,c,m):p.addListener(c),e.push([p,E,b,c,g])})}function n(a,u,c){o(a,u,function(m,p,E){e=e.filter(function(b){return b[0]===m&&b[1]===p&&b[2]===E&&(!c||b[3]===c)?(b[4](),!1):!0})})}function i(a,u,c){var m,p=!0;return typeof CustomEvent=="function"?m=new CustomEvent(u,{bubbles:p,detail:c}):(m=document.createEvent("CustomEvent"),m.initCustomEvent(u,p,!1,c)),a.dispatchEvent(m),m}function o(a,u,c){Gt(a,function(m){m&&Gt(u,function(p){p.split(" ").forEach(function(E){var b=E.split(".");c(m,b[0],b[1])})})})}function s(){e.forEach(function(a){a[4]()}),bn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var Mn="mounted",xr="ready",xn="move",yi="moved",Wr="click",fs="active",ys="inactive",vs="visible",bs="hidden",Tt="refresh",Nt="updated",ci="resize",ko="resized",xs="drag",ws="dragging",$s="dragged",Mo="scroll",Un="scrolled",tc="overflow",Fr="destroy",Ss="arrows:mounted",Cs="arrows:updated",Ts="pagination:mounted",Ls="pagination:updated",Nr="navigation:mounted",Hr="autoplay:play",Es="autoplay:playing",Or="autoplay:pause",Br="lazyload:loaded",Ps="sk",Is="sh",Eo="ei";function bt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=hs();function i(s,a){n.bind(t,Bi(s).join(" "),function(u){a.apply(a,Pr(u.detail)?u.detail:[])})}function o(s){n.dispatch(t,s,kn(arguments,1))}return e&&e.event.on(Fr,n.destroy),Ai(n,{bus:t,on:i,off:pt(n.unbind,t),emit:o})}function _o(e,t,n,i){var o=Date.now,s,a=0,u,c=!0,m=0;function p(){if(!c){if(a=e?An((o()-s)/e,1):1,n&&n(a),a>=1&&(t(),s=o(),i&&++m>=i))return b();u=aa(p)}}function E(w){w||g(),s=o()-(w?a*e:0),c=!1,u=aa(p)}function b(){c=!0}function C(){s=o(),a=0,n&&n(a)}function g(){u&&cancelAnimationFrame(u),a=0,u=0,c=!0}function v(w){e=w}function T(){return c}return{start:E,rewind:C,pause:b,cancel:g,set:v,isPaused:T}}function nc(e){var t=e;function n(o){t=o}function i(o){return Ar(Bi(o),t)}return{set:n,is:i}}function ic(e,t){var n=_o(0,e,null,1);return function(){n.isPaused()&&n.start()}}function oc(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},a=hs(),u=[];function c(){var g=n.mediaQuery==="min";Ii(o).sort(function(v,T){return g?+v-+T:+T-+v}).forEach(function(v){p(o[v],"("+(g?"min":"max")+"-width:"+v+"px)")}),p(s,ra),E()}function m(g){g&&a.destroy()}function p(g,v){var T=matchMedia(v);a.bind(T,"change",E),u.push([g,T])}function E(){var g=i.is(Co),v=n.direction,T=u.reduce(function(w,$){return Pn(w,$[1].matches?$[0]:{})},{});sa(n),C(T),n.destroy?e.destroy(n.destroy==="completely"):g?(m(!0),e.mount()):v!==n.direction&&e.refresh()}function b(g){matchMedia(ra).matches&&(g?Pn(n,s):sa(n,Ii(s)))}function C(g,v,T){Pn(n,g),v&&Pn(Object.getPrototypeOf(n),g),(T||!i.is(ri))&&e.emit(Nt,n)}return{setup:c,destroy:m,reduce:b,set:C}}var Wo="Arrow",Fo=Wo+"Left",No=Wo+"Right",As=Wo+"Up",Rs=Wo+"Down",da="rtl",Ho="ttb",Zo={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[As,No],ArrowRight:[Rs,Fo]};function rc(e,t,n){function i(s,a,u){u=u||n.direction;var c=u===da&&!a?1:u===Ho?0:-1;return Zo[s]&&Zo[s][c]||s.replace(/width|left|right/i,function(m,p){var E=Zo[m.toLowerCase()][c]||m;return p>0?E.charAt(0).toUpperCase()+E.slice(1):E})}function o(s){return s*(n.direction===da?1:-1)}return{resolve:i,orient:o}}var fn="role",si="tabindex",ac="disabled",en="aria-",Di=en+"controls",ks=en+"current",ua=en+"selected",Dt=en+"label",jr=en+"labelledby",Ms=en+"hidden",zr=en+"orientation",Mi=en+"roledescription",pa=en+"live",ma=en+"busy",ga=en+"atomic",Vr=[fn,si,ac,Di,ks,Dt,jr,Ms,zr,Mi],an=Vi+"__",_n="is-",Qo=Vi,ha=an+"track",sc=an+"list",Oo=an+"slide",_s=Oo+"--clone",lc=Oo+"__container",Dr=an+"arrows",Bo=an+"arrow",Ws=Bo+"--prev",Fs=Bo+"--next",jo=an+"pagination",Ns=jo+"__page",cc=an+"progress",dc=cc+"__bar",uc=an+"toggle",pc=an+"spinner",mc=an+"sr",gc=_n+"initialized",Gn=_n+"active",Hs=_n+"prev",Os=_n+"next",wr=_n+"visible",$r=_n+"loading",Bs=_n+"focus-in",js=_n+"overflow",hc=[Gn,wr,Hs,Os,$r,Bs,js],fc={slide:Oo,clone:_s,arrows:Dr,arrow:Bo,prev:Ws,next:Fs,pagination:jo,page:Ns,spinner:pc};function yc(e,t){if(ls(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Pi(n,t);)n=n.parentElement;return n}var vc=5,fa=200,zs="touchstart mousedown",er="touchmove mousemove",tr="touchend touchcancel mouseup click";function bc(e,t,n){var i=bt(e),o=i.on,s=i.bind,a=e.root,u=n.i18n,c={},m=[],p=[],E=[],b,C,g;function v(){S(),_(),$()}function T(){o(Tt,w),o(Tt,v),o(Nt,$),s(document,zs+" keydown",function(P){g=P.type==="keydown"},{capture:!0}),s(a,"focusin",function(){gn(a,Bs,!!g)})}function w(P){var I=Vr.concat("style");bn(m),hn(a,p),hn(b,E),rn([b,C],I),rn(a,P?I:["style",Mi])}function $(){hn(a,p),hn(b,E),p=W(Qo),E=W(ha),on(a,p),on(b,E),Ne(a,Dt,n.label),Ne(a,jr,n.labelledby)}function S(){b=k("."+ha),C=zi(b,"."+sc),$i(b&&C,"A track/list element is missing."),yo(m,ds(C,"."+Oo+":not(."+_s+")")),qn({arrows:Dr,pagination:jo,prev:Ws,next:Fs,bar:dc,toggle:uc},function(P,I){c[I]=k("."+P)}),Ai(c,{root:a,track:b,list:C,slides:m})}function _(){var P=a.id||ec(Vi),I=n.role;a.id=P,b.id=b.id||P+"-track",C.id=C.id||P+"-list",!Zt(a,fn)&&a.tagName!=="SECTION"&&I&&Ne(a,fn,I),Ne(a,Mi,u.carousel),Ne(C,fn,"presentation")}function k(P){var I=ms(a,P);return I&&yc(I,"."+Qo)===a?I:void 0}function W(P){return[P+"--"+n.type,P+"--"+n.direction,n.drag&&P+"--draggable",n.isNavigation&&P+"--nav",P===Qo&&Gn]}return Ai(c,{setup:v,mount:T,destroy:w})}var di="slide",vi="loop",qi="fade";function xc(e,t,n,i){var o=bt(e),s=o.on,a=o.emit,u=o.bind,c=e.Components,m=e.root,p=e.options,E=p.isNavigation,b=p.updateOnMove,C=p.i18n,g=p.pagination,v=p.slideFocus,T=c.Direction.resolve,w=Zt(i,"style"),$=Zt(i,Dt),S=n>-1,_=zi(i,"."+lc),k;function W(){S||(i.id=m.id+"-slide"+_r(t+1),Ne(i,fn,g?"tabpanel":"group"),Ne(i,Mi,C.slide),Ne(i,Dt,$||br(C.slideLabel,[t+1,e.length]))),P()}function P(){u(i,"click",pt(a,Wr,Z)),u(i,"keydown",pt(a,Ps,Z)),s([yi,Is,Un],M),s(Nr,Y),b&&s(xn,y)}function I(){k=!0,o.destroy(),hn(i,hc),rn(i,Vr),Ne(i,"style",w),Ne(i,Dt,$||"")}function Y(){var G=e.splides.map(function(B){var J=B.splide.Components.Slides.getAt(t);return J?J.slide.id:""}).join(" ");Ne(i,Dt,br(C.slideX,(S?n:t)+1)),Ne(i,Di,G),Ne(i,fn,v?"button":""),v&&rn(i,Mi)}function y(){k||M()}function M(){if(!k){var G=e.index;N(),V(),gn(i,Hs,t===G-1),gn(i,Os,t===G+1)}}function N(){var G=ue();G!==la(i,Gn)&&(gn(i,Gn,G),Ne(i,ks,E&&G||""),a(G?fs:ys,Z))}function V(){var G=K(),B=!G&&(!ue()||S);if(e.state.is([fi,Hi])||Ne(i,Ms,B||""),Ne(kr(i,p.focusableNodes||""),si,B?-1:""),v&&Ne(i,si,B?-1:0),G!==la(i,wr)&&(gn(i,wr,G),a(G?vs:bs,Z)),!G&&document.activeElement===i){var J=c.Slides.getAt(e.index);J&&us(J.slide)}}function te(G,B,J){Jt(J&&_||i,G,B)}function ue(){var G=e.index;return G===t||p.cloneStatus&&G===n}function K(){if(e.is(qi))return ue();var G=Vt(c.Elements.track),B=Vt(i),J=T("left",!0),ie=T("right",!0);return Lo(G[J])<=ki(B[J])&&Lo(B[ie])<=ki(G[ie])}function H(G,B){var J=jt(G-t);return!S&&(p.rewind||e.is(vi))&&(J=An(J,e.length-J)),J<=B}var Z={index:t,slideIndex:n,slide:i,container:_,isClone:S,mount:W,destroy:I,update:M,style:te,isWithin:H};return Z}function wc(e,t,n){var i=bt(e),o=i.on,s=i.emit,a=i.bind,u=t.Elements,c=u.slides,m=u.list,p=[];function E(){b(),o(Tt,C),o(Tt,b)}function b(){c.forEach(function(M,N){v(M,N,-1)})}function C(){k(function(M){M.destroy()}),bn(p)}function g(){k(function(M){M.update()})}function v(M,N,V){var te=xc(e,N,V,M);te.mount(),p.push(te),p.sort(function(ue,K){return ue.index-K.index})}function T(M){return M?W(function(N){return!N.isClone}):p}function w(M){var N=t.Controller,V=N.toIndex(M),te=N.hasFocus()?1:n.perPage;return W(function(ue){return vo(ue.index,V,V+te-1)})}function $(M){return W(M)[0]}function S(M,N){Gt(M,function(V){if(In(V)&&(V=ps(V)),cs(V)){var te=c[N];te?Rr(V,te):ji(m,V),on(V,n.classes.slide),I(V,pt(s,ci))}}),s(Tt)}function _(M){Kn(W(M).map(function(N){return N.slide})),s(Tt)}function k(M,N){T(N).forEach(M)}function W(M){return p.filter(ls(M)?M:function(N){return In(M)?Pi(N.slide,M):Ar(Bi(M),N.index)})}function P(M,N,V){k(function(te){te.style(M,N,V)})}function I(M,N){var V=kr(M,"img"),te=V.length;te?V.forEach(function(ue){a(ue,"load error",function(){--te||N()})}):N()}function Y(M){return M?c.length:p.length}function y(){return p.length>n.perPage}return{mount:E,destroy:C,update:g,register:v,get:T,getIn:w,getAt:$,add:S,remove:_,forEach:k,filter:W,style:P,getLength:Y,isEnough:y}}function $c(e,t,n){var i=bt(e),o=i.on,s=i.bind,a=i.emit,u=t.Slides,c=t.Direction.resolve,m=t.Elements,p=m.root,E=m.track,b=m.list,C=u.getAt,g=u.style,v,T,w;function $(){S(),s(window,"resize load",ic(pt(a,ci))),o([Nt,Tt],S),o(ci,_)}function S(){v=n.direction===Ho,Jt(p,"maxWidth",Hn(n.width)),Jt(E,c("paddingLeft"),k(!1)),Jt(E,c("paddingRight"),k(!0)),_(!0)}function _(Z){var G=Vt(p);(Z||T.width!==G.width||T.height!==G.height)&&(Jt(E,"height",W()),g(c("marginRight"),Hn(n.gap)),g("width",I()),g("height",Y(),!0),T=G,a(ko),w!==(w=H())&&(gn(p,js,w),a(tc,w)))}function k(Z){var G=n.padding,B=c(Z?"right":"left");return G&&Hn(G[B]||(Ei(G)?0:G))||"0px"}function W(){var Z="";return v&&(Z=P(),$i(Z,"height or heightRatio is missing."),Z="calc("+Z+" - "+k(!1)+" - "+k(!0)+")"),Z}function P(){return Hn(n.height||Vt(b).width*n.heightRatio)}function I(){return n.autoWidth?null:Hn(n.fixedWidth)||(v?"":y())}function Y(){return Hn(n.fixedHeight)||(v?n.autoHeight?null:y():P())}function y(){var Z=Hn(n.gap);return"calc((100%"+(Z&&" + "+Z)+")/"+(n.perPage||1)+(Z&&" - "+Z)+")"}function M(){return Vt(b)[c("width")]}function N(Z,G){var B=C(Z||0);return B?Vt(B.slide)[c("width")]+(G?0:ue()):0}function V(Z,G){var B=C(Z);if(B){var J=Vt(B.slide)[c("right")],ie=Vt(b)[c("left")];return jt(J-ie)+(G?0:ue())}return 0}function te(Z){return V(e.length-1)-V(0)+N(0,Z)}function ue(){var Z=C(0);return Z&&parseFloat(Jt(Z.slide,c("marginRight")))||0}function K(Z){return parseFloat(Jt(E,c("padding"+(Z?"Right":"Left"))))||0}function H(){return e.is(qi)||te(!0)>M()}return{mount:$,resize:_,listSize:M,slideSize:N,sliderSize:te,totalSize:V,getPadding:K,isOverflow:H}}var Sc=2;function Cc(e,t,n){var i=bt(e),o=i.on,s=t.Elements,a=t.Slides,u=t.Direction.resolve,c=[],m;function p(){o(Tt,E),o([Nt,ci],C),(m=T())&&(g(m),t.Layout.resize(!0))}function E(){b(),p()}function b(){Kn(c),bn(c),i.destroy()}function C(){var w=T();m!==w&&(m<w||!w)&&i.emit(Tt)}function g(w){var $=a.get().slice(),S=$.length;if(S){for(;$.length<w;)yo($,$);yo($.slice(-w),$.slice(0,w)).forEach(function(_,k){var W=k<w,P=v(_.slide,k);W?Rr(P,$[0].slide):ji(s.list,P),yo(c,P),a.register(P,k-w+(W?0:S),_.index)})}}function v(w,$){var S=w.cloneNode(!0);return on(S,n.classes.clone),S.id=e.root.id+"-clone"+_r($+1),S}function T(){var w=n.clones;if(!e.is(vi))w=0;else if(Oi(w)){var $=n[u("fixedWidth")]&&t.Layout.slideSize(0),S=$&&ki(Vt(s.track)[u("width")]/$);w=S||n[u("autoWidth")]&&e.length||n.perPage*Sc}return w}return{mount:p,destroy:b}}function Tc(e,t,n){var i=bt(e),o=i.on,s=i.emit,a=e.state.set,u=t.Layout,c=u.slideSize,m=u.getPadding,p=u.totalSize,E=u.listSize,b=u.sliderSize,C=t.Direction,g=C.resolve,v=C.orient,T=t.Elements,w=T.list,$=T.track,S;function _(){S=t.Transition,o([Mn,ko,Nt,Tt],k)}function k(){t.Controller.isBusy()||(t.Scroll.cancel(),P(e.index),t.Slides.update())}function W(B,J,ie,oe){B!==J&&Z(B>ie)&&(M(),I(y(te(),B>ie),!0)),a(fi),s(xn,J,ie,B),S.start(J,function(){a(li),s(yi,J,ie,B),oe&&oe()})}function P(B){I(V(B,!0))}function I(B,J){if(!e.is(qi)){var ie=J?B:Y(B);Jt(w,"transform","translate"+g("X")+"("+ie+"px)"),B!==ie&&s(Is)}}function Y(B){if(e.is(vi)){var J=N(B),ie=J>t.Controller.getEnd(),oe=J<0;(oe||ie)&&(B=y(B,ie))}return B}function y(B,J){var ie=B-H(J),oe=b();return B-=v(oe*(ki(jt(ie)/oe)||1))*(J?1:-1),B}function M(){I(te(),!0),S.cancel()}function N(B){for(var J=t.Slides.get(),ie=0,oe=1/0,O=0;O<J.length;O++){var ce=J[O].index,h=jt(V(ce,!0)-B);if(h<=oe)oe=h,ie=ce;else break}return ie}function V(B,J){var ie=v(p(B-1)-K(B));return J?ue(ie):ie}function te(){var B=g("left");return Vt(w)[B]-Vt($)[B]+v(m(!1))}function ue(B){return n.trimSpace&&e.is(di)&&(B=ni(B,0,v(b(!0)-E()))),B}function K(B){var J=n.focus;return J==="center"?(E()-c(B,!0))/2:+J*c(B)||0}function H(B){return V(B?t.Controller.getEnd():0,!!n.trimSpace)}function Z(B){var J=v(y(te(),B));return B?J>=0:J<=w[g("scrollWidth")]-Vt($)[g("width")]}function G(B,J){J=Oi(J)?te():J;var ie=B!==!0&&v(J)<v(H(!1)),oe=B!==!1&&v(J)>v(H(!0));return ie||oe}return{mount:_,move:W,jump:P,translate:I,shift:y,cancel:M,toIndex:N,toPosition:V,getPosition:te,getLimit:H,exceededLimit:G,reposition:k}}function Lc(e,t,n){var i=bt(e),o=i.on,s=i.emit,a=t.Move,u=a.getPosition,c=a.getLimit,m=a.toPosition,p=t.Slides,E=p.isEnough,b=p.getLength,C=n.omitEnd,g=e.is(vi),v=e.is(di),T=pt(te,!1),w=pt(te,!0),$=n.start||0,S,_=$,k,W,P;function I(){Y(),o([Nt,Tt,Eo],Y),o(ko,y)}function Y(){k=b(!0),W=n.perMove,P=n.perPage,S=Z();var h=ni($,0,C?S:k-1);h!==$&&($=h,a.reposition())}function y(){S!==Z()&&s(Eo)}function M(h,pe,ve){if(!ce()){var ye=V(h),Re=H(ye);Re>-1&&(pe||Re!==$)&&(ie(Re),a.move(ye,Re,_,ve))}}function N(h,pe,ve,ye){t.Scroll.scroll(h,pe,ve,function(){var Re=H(a.toIndex(u()));ie(C?An(Re,S):Re),ye&&ye()})}function V(h){var pe=$;if(In(h)){var ve=h.match(/([+\-<>])(\d+)?/)||[],ye=ve[1],Re=ve[2];ye==="+"||ye==="-"?pe=ue($+ +(""+ye+(+Re||1)),$):ye===">"?pe=Re?G(+Re):T(!0):ye==="<"&&(pe=w(!0))}else pe=g?h:ni(h,0,S);return pe}function te(h,pe){var ve=W||(O()?1:P),ye=ue($+ve*(h?-1:1),$,!(W||O()));return ye===-1&&v&&!gs(u(),c(!h),1)?h?0:S:pe?ye:H(ye)}function ue(h,pe,ve){if(E()||O()){var ye=K(h);ye!==h&&(pe=h,h=ye,ve=!1),h<0||h>S?!W&&(vo(0,h,pe,!0)||vo(S,pe,h,!0))?h=G(B(h)):g?h=ve?h<0?-(k%P||P):k:h:n.rewind?h=h<0?S:0:h=-1:ve&&h!==pe&&(h=G(B(pe)+(h<pe?-1:1)))}else h=-1;return h}function K(h){if(v&&n.trimSpace==="move"&&h!==$)for(var pe=u();pe===m(h,!0)&&vo(h,0,e.length-1,!n.rewind);)h<$?--h:++h;return h}function H(h){return g?(h+k)%k||0:h}function Z(){for(var h=k-(O()||g&&W?1:P);C&&h-- >0;)if(m(k-1,!0)!==m(h,!0)){h++;break}return ni(h,0,k-1)}function G(h){return ni(O()?h:P*h,0,S)}function B(h){return O()?An(h,S):Lo((h>=S?k-1:h)/P)}function J(h){var pe=a.toIndex(h);return v?ni(pe,0,S):pe}function ie(h){h!==$&&(_=$,$=h)}function oe(h){return h?_:$}function O(){return!Oi(n.focus)||n.isNavigation}function ce(){return e.state.is([fi,Hi])&&!!n.waitForTransition}return{mount:I,go:M,scroll:N,getNext:T,getPrev:w,getAdjacent:te,getEnd:Z,setIndex:ie,getIndex:oe,toIndex:G,toPage:B,toDest:J,hasFocus:O,isBusy:ce}}var Ec="http://www.w3.org/2000/svg",Pc="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",eo=40;function Ic(e,t,n){var i=bt(e),o=i.on,s=i.bind,a=i.emit,u=n.classes,c=n.i18n,m=t.Elements,p=t.Controller,E=m.arrows,b=m.track,C=E,g=m.prev,v=m.next,T,w,$={};function S(){k(),o(Nt,_)}function _(){W(),S()}function k(){var N=n.arrows;N&&!(g&&v)&&Y(),g&&v&&(Ai($,{prev:g,next:v}),Ri(C,N?"":"none"),on(C,w=Dr+"--"+n.direction),N&&(P(),M(),Ne([g,v],Di,b.id),a(Ss,g,v)))}function W(){i.destroy(),hn(C,w),T?(Kn(E?[g,v]:C),g=v=null):rn([g,v],Vr)}function P(){o([Mn,yi,Tt,Un,Eo],M),s(v,"click",pt(I,">")),s(g,"click",pt(I,"<"))}function I(N){p.go(N,!0)}function Y(){C=E||ai("div",u.arrows),g=y(!0),v=y(!1),T=!0,ji(C,[g,v]),!E&&Rr(C,b)}function y(N){var V='<button class="'+u.arrow+" "+(N?u.prev:u.next)+'" type="button"><svg xmlns="'+Ec+'" viewBox="0 0 '+eo+" "+eo+'" width="'+eo+'" height="'+eo+'" focusable="false"><path d="'+(n.arrowPath||Pc)+'" />';return ps(V)}function M(){if(g&&v){var N=e.index,V=p.getPrev(),te=p.getNext(),ue=V>-1&&N<V?c.last:c.prev,K=te>-1&&N>te?c.first:c.next;g.disabled=V<0,v.disabled=te<0,Ne(g,Dt,ue),Ne(v,Dt,K),a(Cs,g,v,V,te)}}return{arrows:$,mount:S,destroy:W,update:M}}var Ac=Mr+"-interval";function Rc(e,t,n){var i=bt(e),o=i.on,s=i.bind,a=i.emit,u=_o(n.interval,e.go.bind(e,">"),P),c=u.isPaused,m=t.Elements,p=t.Elements,E=p.root,b=p.toggle,C=n.autoplay,g,v,T=C==="pause";function w(){C&&($(),b&&Ne(b,Di,m.track.id),T||S(),W())}function $(){n.pauseOnHover&&s(E,"mouseenter mouseleave",function(Y){g=Y.type==="mouseenter",k()}),n.pauseOnFocus&&s(E,"focusin focusout",function(Y){v=Y.type==="focusin",k()}),b&&s(b,"click",function(){T?S():_(!0)}),o([xn,Mo,Tt],u.rewind),o(xn,I)}function S(){c()&&t.Slides.isEnough()&&(u.start(!n.resetProgress),v=g=T=!1,W(),a(Hr))}function _(Y){Y===void 0&&(Y=!0),T=!!Y,W(),c()||(u.pause(),a(Or))}function k(){T||(g||v?_(!1):S())}function W(){b&&(gn(b,Gn,!T),Ne(b,Dt,n.i18n[T?"play":"pause"]))}function P(Y){var y=m.bar;y&&Jt(y,"width",Y*100+"%"),a(Es,Y)}function I(Y){var y=t.Slides.getAt(Y);u.set(y&&+Zt(y.slide,Ac)||n.interval)}return{mount:w,destroy:u.cancel,play:S,pause:_,isPaused:c}}function kc(e,t,n){var i=bt(e),o=i.on;function s(){n.cover&&(o(Br,pt(u,!0)),o([Mn,Nt,Tt],pt(a,!0)))}function a(c){t.Slides.forEach(function(m){var p=zi(m.container||m.slide,"img");p&&p.src&&u(c,p,m)})}function u(c,m,p){p.style("background",c?'center/cover no-repeat url("'+m.src+'")':"",!0),Ri(m,c?"none":"")}return{mount:s,destroy:pt(a,!1)}}var Mc=10,_c=600,Wc=.6,Fc=1.5,Nc=800;function Hc(e,t,n){var i=bt(e),o=i.on,s=i.emit,a=e.state.set,u=t.Move,c=u.getPosition,m=u.getLimit,p=u.exceededLimit,E=u.translate,b=e.is(di),C,g,v=1;function T(){o(xn,_),o([Nt,Tt],k)}function w(P,I,Y,y,M){var N=c();if(_(),Y&&(!b||!p())){var V=t.Layout.sliderSize(),te=vr(P)*V*Lo(jt(P)/V)||0;P=u.toPosition(t.Controller.toDest(P%V))+te}var ue=gs(N,P,1);v=1,I=ue?0:I||To(jt(P-N)/Fc,Nc),g=y,C=_o(I,$,pt(S,N,P,M),1),a(Hi),s(Mo),C.start()}function $(){a(li),g&&g(),s(Un)}function S(P,I,Y,y){var M=c(),N=P+(I-P)*W(y),V=(N-M)*v;E(M+V),b&&!Y&&p()&&(v*=Wc,jt(V)<Mc&&w(m(p(!0)),_c,!1,g,!0))}function _(){C&&C.cancel()}function k(){C&&!C.isPaused()&&(_(),$())}function W(P){var I=n.easingFunc;return I?I(P):1-Math.pow(1-P,4)}return{mount:T,destroy:_,scroll:w,cancel:k}}var ii={passive:!1,capture:!0};function Oc(e,t,n){var i=bt(e),o=i.on,s=i.emit,a=i.bind,u=i.unbind,c=e.state,m=t.Move,p=t.Scroll,E=t.Controller,b=t.Elements.track,C=t.Media.reduce,g=t.Direction,v=g.resolve,T=g.orient,w=m.getPosition,$=m.exceededLimit,S,_,k,W,P,I=!1,Y,y,M;function N(){a(b,er,fr,ii),a(b,tr,fr,ii),a(b,zs,te,ii),a(b,"click",H,{capture:!0}),a(b,"dragstart",mn),o([Mn,Nt],V)}function V(){var X=n.drag;ge(!X),W=X==="free"}function te(X){if(Y=!1,!y){var U=Re(X);ye(X.target)&&(U||!X.button)&&(E.isBusy()?mn(X,!0):(M=U?b:window,P=c.is([fi,Hi]),k=null,a(M,er,ue,ii),a(M,tr,K,ii),m.cancel(),p.cancel(),Z(X)))}}function ue(X){if(c.is(fo)||(c.set(fo),s(xs)),X.cancelable)if(P){m.translate(S+ve(O(X)));var U=ce(X)>fa,j=I!==(I=$());(U||j)&&Z(X),Y=!0,s(ws),mn(X)}else J(X)&&(P=B(X),mn(X))}function K(X){c.is(fo)&&(c.set(li),s($s)),P&&(G(X),mn(X)),u(M,er,ue),u(M,tr,K),P=!1}function H(X){!y&&Y&&mn(X,!0)}function Z(X){k=_,_=X,S=w()}function G(X){var U=ie(X),j=oe(U),he=n.rewind&&n.rewindByDrag;C(!1),W?E.scroll(j,0,n.snap):e.is(qi)?E.go(T(vr(U))<0?he?"<":"-":he?">":"+"):e.is(di)&&I&&he?E.go($(!0)?">":"<"):E.go(E.toDest(j),!0),C(!0)}function B(X){var U=n.dragMinThreshold,j=Ei(U),he=j&&U.mouse||0,ne=(j?U.touch:+U)||10;return jt(O(X))>(Re(X)?ne:he)}function J(X){return jt(O(X))>jt(O(X,!0))}function ie(X){if(e.is(vi)||!I){var U=ce(X);if(U&&U<fa)return O(X)/U}return 0}function oe(X){return w()+vr(X)*An(jt(X)*(n.flickPower||600),W?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function O(X,U){return pe(X,U)-pe(h(X),U)}function ce(X){return yr(X)-yr(h(X))}function h(X){return _===X&&k||_}function pe(X,U){return(Re(X)?X.changedTouches[0]:X)["page"+v(U?"Y":"X")]}function ve(X){return X/(I&&e.is(di)?vc:1)}function ye(X){var U=n.noDrag;return!Pi(X,"."+Ns+", ."+Bo)&&(!U||!Pi(X,U))}function Re(X){return typeof TouchEvent<"u"&&X instanceof TouchEvent}function ee(){return P}function ge(X){y=X}return{mount:N,disable:ge,isDragging:ee}}var Bc={Spacebar:" ",Right:No,Left:Fo,Up:As,Down:Rs};function qr(e){return e=In(e)?e:e.key,Bc[e]||e}var ya="keydown";function jc(e,t,n){var i=bt(e),o=i.on,s=i.bind,a=i.unbind,u=e.root,c=t.Direction.resolve,m,p;function E(){b(),o(Nt,C),o(Nt,b),o(xn,v)}function b(){var w=n.keyboard;w&&(m=w==="global"?window:u,s(m,ya,T))}function C(){a(m,ya)}function g(w){p=w}function v(){var w=p;p=!0,ss(function(){p=w})}function T(w){if(!p){var $=qr(w);$===c(Fo)?e.go("<"):$===c(No)&&e.go(">")}}return{mount:E,destroy:C,disable:g}}var Si=Mr+"-lazy",bo=Si+"-srcset",zc="["+Si+"], ["+bo+"]";function Vc(e,t,n){var i=bt(e),o=i.on,s=i.off,a=i.bind,u=i.emit,c=n.lazyLoad==="sequential",m=[yi,Un],p=[];function E(){n.lazyLoad&&(b(),o(Tt,b))}function b(){bn(p),C(),c?w():(s(m),o(m,g),g())}function C(){t.Slides.forEach(function($){kr($.slide,zc).forEach(function(S){var _=Zt(S,Si),k=Zt(S,bo);if(_!==S.src||k!==S.srcset){var W=n.classes.spinner,P=S.parentElement,I=zi(P,"."+W)||ai("span",W,P);p.push([S,$,I]),S.src||Ri(S,"none")}})})}function g(){p=p.filter(function($){var S=n.perPage*((n.preloadPages||1)+1)-1;return $[1].isWithin(e.index,S)?v($):!0}),p.length||s(m)}function v($){var S=$[0];on($[1].slide,$r),a(S,"load error",pt(T,$)),Ne(S,"src",Zt(S,Si)),Ne(S,"srcset",Zt(S,bo)),rn(S,Si),rn(S,bo)}function T($,S){var _=$[0],k=$[1];hn(k.slide,$r),S.type!=="error"&&(Kn($[2]),Ri(_,""),u(Br,_,k),u(ci)),c&&w()}function w(){p.length&&v(p.shift())}return{mount:E,destroy:pt(bn,p),check:g}}function Dc(e,t,n){var i=bt(e),o=i.on,s=i.emit,a=i.bind,u=t.Slides,c=t.Elements,m=t.Controller,p=m.hasFocus,E=m.getIndex,b=m.go,C=t.Direction.resolve,g=c.pagination,v=[],T,w;function $(){S(),o([Nt,Tt,Eo],$);var y=n.pagination;g&&Ri(g,y?"":"none"),y&&(o([xn,Mo,Un],Y),_(),Y(),s(Ts,{list:T,items:v},I(e.index)))}function S(){T&&(Kn(g?kn(T.children):T),hn(T,w),bn(v),T=null),i.destroy()}function _(){var y=e.length,M=n.classes,N=n.i18n,V=n.perPage,te=p()?m.getEnd()+1:ki(y/V);T=g||ai("ul",M.pagination,c.track.parentElement),on(T,w=jo+"--"+P()),Ne(T,fn,"tablist"),Ne(T,Dt,N.select),Ne(T,zr,P()===Ho?"vertical":"");for(var ue=0;ue<te;ue++){var K=ai("li",null,T),H=ai("button",{class:M.page,type:"button"},K),Z=u.getIn(ue).map(function(B){return B.slide.id}),G=!p()&&V>1?N.pageX:N.slideX;a(H,"click",pt(k,ue)),n.paginationKeyboard&&a(H,"keydown",pt(W,ue)),Ne(K,fn,"presentation"),Ne(H,fn,"tab"),Ne(H,Di,Z.join(" ")),Ne(H,Dt,br(G,ue+1)),Ne(H,si,-1),v.push({li:K,button:H,page:ue})}}function k(y){b(">"+y,!0)}function W(y,M){var N=v.length,V=qr(M),te=P(),ue=-1;V===C(No,!1,te)?ue=++y%N:V===C(Fo,!1,te)?ue=(--y+N)%N:V==="Home"?ue=0:V==="End"&&(ue=N-1);var K=v[ue];K&&(us(K.button),b(">"+ue),mn(M,!0))}function P(){return n.paginationDirection||n.direction}function I(y){return v[m.toPage(y)]}function Y(){var y=I(E(!0)),M=I(E());if(y){var N=y.button;hn(N,Gn),rn(N,ua),Ne(N,si,-1)}if(M){var V=M.button;on(V,Gn),Ne(V,ua,!0),Ne(V,si,"")}s(Ls,{list:T,items:v},y,M)}return{items:v,mount:$,destroy:S,getAt:I,update:Y}}var qc=[" ","Enter"];function Kc(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function a(){e.splides.forEach(function(g){g.isParent||(m(e,g.splide),m(g.splide,e))}),i&&p()}function u(){s.forEach(function(g){g.destroy()}),bn(s)}function c(){u(),a()}function m(g,v){var T=bt(g);T.on(xn,function(w,$,S){v.go(v.is(vi)?S:w)}),s.push(T)}function p(){var g=bt(e),v=g.on;v(Wr,b),v(Ps,C),v([Mn,Nt],E),s.push(g),g.emit(Nr,e.splides)}function E(){Ne(t.Elements.list,zr,n.direction===Ho?"vertical":"")}function b(g){e.go(g.index)}function C(g,v){Ar(qc,qr(v))&&(b(g),mn(v))}return{setup:pt(t.Media.set,{slideFocus:Oi(o)?i:o},!0),mount:a,destroy:u,remount:c}}function Gc(e,t,n){var i=bt(e),o=i.bind,s=0;function a(){n.wheel&&o(t.Elements.track,"wheel",u,ii)}function u(m){if(m.cancelable){var p=m.deltaY,E=p<0,b=yr(m),C=n.wheelMinThreshold||0,g=n.wheelSleep||0;jt(p)>C&&b-s>g&&(e.go(E?"<":">"),s=b),c(E)&&mn(m)}}function c(m){return!n.releaseWheel||e.state.is(fi)||t.Controller.getAdjacent(m)!==-1}return{mount:a}}var Uc=90;function Xc(e,t,n){var i=bt(e),o=i.on,s=t.Elements.track,a=n.live&&!n.isNavigation,u=ai("span",mc),c=_o(Uc,pt(p,!1));function m(){a&&(b(!t.Autoplay.isPaused()),Ne(s,ga,!0),u.textContent="…",o(Hr,pt(b,!0)),o(Or,pt(b,!1)),o([yi,Un],pt(p,!0)))}function p(C){Ne(s,ma,C),C?(ji(s,u),c.start()):(Kn(u),c.cancel())}function E(){rn(s,[pa,ga,ma]),Kn(u)}function b(C){a&&Ne(s,pa,C?"off":"polite")}return{mount:m,disable:b,destroy:E}}var Yc=Object.freeze({__proto__:null,Media:oc,Direction:rc,Elements:bc,Slides:wc,Layout:$c,Clones:Cc,Move:Tc,Controller:Lc,Arrows:Ic,Autoplay:Rc,Cover:kc,Scroll:Hc,Drag:Oc,Keyboard:jc,LazyLoad:Vc,Pagination:Dc,Sync:Kc,Wheel:Gc,Live:Xc}),Jc={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"},Zc={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:fc,i18n:Jc,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Qc(e,t,n){var i=t.Slides;function o(){bt(e).on([Mn,Tt],s)}function s(){i.forEach(function(u){u.style("transform","translateX(-"+100*u.index+"%)")})}function a(u,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),ss(c)}return{mount:o,start:a,cancel:fr}}function ed(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,a=t.Elements.list,u=pt(Jt,a,"transition"),c;function m(){bt(e).bind(a,"transitionend",function(C){C.target===a&&c&&(E(),c())})}function p(C,g){var v=i.toPosition(C,!0),T=i.getPosition(),w=b(C);jt(v-T)>=1&&w>=1?n.useScroll?s.scroll(v,w,!1,g):(u("transform "+w+"ms "+n.easing),i.translate(v,!0),c=g):(i.jump(C),g())}function E(){u(""),s.cancel()}function b(C){var g=n.rewindSpeed;if(e.is(di)&&g){var v=o.getIndex(!0),T=o.getEnd();if(v===0&&C>=T||v>=T&&C===0)return g}return n.speed}return{mount:m,start:p,cancel:E}}var td=(function(){function e(n,i){this.event=bt(),this.Components={},this.state=nc(ri),this.splides=[],this._o={},this._E={};var o=In(n)?ms(document,n):n;$i(o,o+" is invalid."),this.root=o,i=Pn({label:Zt(o,Dt)||"",labelledby:Zt(o,jr)||""},Zc,e.defaults,i||{});try{Pn(i,JSON.parse(Zt(o,Mr)))}catch{$i(!1,"Invalid JSON")}this._o=Object.create(Pn({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,a=this.state,u=this.Components;$i(a.is([ri,Co]),"Already mounted!"),a.set(ri),this._C=u,this._T=o||this._T||(this.is(qi)?Qc:ed),this._E=i||this._E;var c=Ai({},Yc,this._E,{Transition:this._T});return qn(c,function(m,p){var E=m(s,u,s._o);u[p]=E,E.setup&&E.setup()}),qn(u,function(m){m.mount&&m.mount()}),this.emit(Mn),on(this.root,gc),a.set(li),this.emit(xr),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(li)&&(this._C.Sync.remount(),i.Components.Sync.remount()),this},t.go=function(i){return this._C.Controller.go(i),this},t.on=function(i,o){return this.event.on(i,o),this},t.off=function(i){return this.event.off(i),this},t.emit=function(i){var o;return(o=this.event).emit.apply(o,[i].concat(kn(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(Tt),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(ri)?bt(this).on(xr,this.destroy.bind(this,i)):(qn(this._C,function(a){a.destroy&&a.destroy(i)},!0),o.emit(Fr),o.destroy(),i&&bn(this.splides),s.set(Co)),this},Jl(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})(),Kr=td;Kr.defaults={};Kr.STATES=Ql;var va=[[Mn,"onMounted"],[xr,"onReady"],[xn,"onMove"],[yi,"onMoved"],[Wr,"onClick"],[fs,"onActive"],[ys,"onInactive"],[vs,"onVisible"],[bs,"onHidden"],[Tt,"onRefresh"],[Nt,"onUpdated"],[ci,"onResize"],[ko,"onResized"],[xs,"onDrag"],[ws,"onDragging"],[$s,"onDragged"],[Mo,"onScroll"],[Un,"onScrolled"],[Fr,"onDestroy"],[Ss,"onArrowsMounted"],[Cs,"onArrowsUpdated"],[Ts,"onPaginationMounted"],[Ls,"onPaginationUpdated"],[Nr,"onNavigationMounted"],[Hr,"onAutoplayPlay"],[Es,"onAutoplayPlaying"],[Or,"onAutoplayPause"],[Br,"onLazyLoadLoaded"]];function Gr(...e){return e.filter(Boolean).join(" ")}function Po(e){return e!==null&&typeof e=="object"}function Sr(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!Sr(n,t[i]));if(Po(e)&&Po(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Sr(e[o],t[o]))}return e===t}function nd(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function id(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 Cr(e,t){const n=e;return id(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():Po(i)?n[o]=Cr(Po(n[o])?n[o]:{},i):n[o]=i}),n}var od=({children:e,className:t,...n})=>l.createElement("div",{className:Gr("splide__track",t),...n},l.createElement("ul",{className:"splide__list"},e)),Ur=class extends l.Component{constructor(){super(...arguments),this.splideRef=l.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Kr(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Cr({},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&&!Sr(this.options,e)&&(this.splide.options=e,this.options=Cr({},e));const t=this.getSlides();nd(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){va.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 l.createElement(t,{className:Gr("splide",e),ref:this.splideRef,...this.omit(o,["options",...va.map(s=>s[1])])},n?l.createElement(od,null,i):i)}},Xr=({children:e,className:t,...n})=>l.createElement("li",{className:Gr("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 rd="RichTextRenderer-module__link___BWeZ2",ad={link:rd},sd=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))},zo=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>sd(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function Ut(e){const{color:t,...n}=e;return n}function Rt(e,t){var o,s,a;const{fontSize:n,lineHeight:i}=e;return{fontFamily:zo(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:P.scalingValue(e.letterSpacing,t),wordSpacing:P.scalingValue(e.wordSpacing,t),fontSize:P.scalingValue(n,t),lineHeight:i!==void 0?P.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(a=e.textAppearance)==null?void 0:a.fontVariant,textAlign:e.textAlign,color:e.color}}const ui=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:ad.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:ld(i),children:i.text},o));return r.jsx(r.Fragment,{children:e.map((n,i)=>{const o=n.children;return r.jsx("div",{children:t(o)},i)})})};function ld(e){return{...e.fontFamily&&{fontFamily:zo(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 cd="SvgImage-module__svg___q3xE-",dd="SvgImage-module__img___VsTm-",ba={svg:cd,img:dd},ud=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},pd=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,nn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[s,a]=l.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return l.useEffect(()=>{if(typeof window<"u"&&window.CSS){const u=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');a(u)}},[]),!ud(e)||!s?r.jsx("img",{src:e,alt:"",className:Ye(ba.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:Ye(ba.svg,i),style:{"--svg":pd(e),"--fill":t,"--hover-fill":n,...o??{}}})},md={"top-left":Le.topLeftAlignment,"top-center":Le.topCenterAlignment,"top-right":Le.topRightAlignment,"middle-left":Le.middleLeftAlignment,"middle-center":Le.middleCenterAlignment,"middle-right":Le.middleRightAlignment,"bottom-left":Le.bottomLeftAlignment,"bottom-center":Le.bottomCenterAlignment,"bottom-right":Le.bottomRightAlignment};function gd({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=l.useState(null),{widthSettings:a,fontSettings:u,letterSpacing:c,textAlign:m,wordSpacing:p,fontSizeLineHeight:R,textAppearance:b,color:I}=n.imageCaption??{},[g,v]=l.useState(void 0),[T,w]=l.useState(null),[$,S]=l.useState(0),[z,M]=l.useState(0),{direction:N,transition:L,controls:C,pagination:J,imageCaption:y,triggers:k}=e,_=l.useRef(L.type),{x:V,y:ne}=e.controls.offset,me=K=>{o&&o.go(K)};return l.useEffect(()=>{if(!T)return;const K=new ResizeObserver(H=>{if(!o)return;const[Q]=H;v({width:Math.round(Q.contentRect.width),height:Math.round(Q.contentRect.height)})});return K.observe(T),()=>K.unobserve(T)},[T]),l.useEffect(()=>{!o||_.current===L.type||(M(K=>K+1),_.current=L.type)},[L.type]),r.jsx("div",{className:Ye(Le.wrapper,{[Le.editor]:i}),ref:w,children:r.jsxs("div",{className:Le.sliderInner,style:{width:g?g.width:"100%",height:g?g.height:"100%",backgroundColor:L.backgroundColor&&L.type==="fade in"?L.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:Ye(Le.captionBlock),children:r.jsx("div",{className:Le.captionTextWrapper,children:t.map((K,H)=>r.jsx("div",{className:Ye(Le.captionText,md[y.alignment],{[Le.withPointerEvents]:H===$&&i,[Le.active]:H===$}),style:{fontFamily:zo(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:a.sizing==="auto"?"max-content":P.scalingValue(a.width,i),letterSpacing:P.scalingValue(c,i),wordSpacing:P.scalingValue(p,i),textAlign:m,fontSize:P.scalingValue(R.fontSize,i),lineHeight:P.scalingValue(R.lineHeight,i),textTransform:b.textTransform??"none",textDecoration:b.textDecoration??"none",fontVariant:b.fontVariant??"normal",color:I,transitionDuration:L.duration?`${Math.round(parseInt(L.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:Le.captionTextInner,style:{"--link-hover-color":y.linkHoverColor,"--link-color":y.linkColor,position:"relative",top:P.scalingValue(y.offset.y,i),left:P.scalingValue(y.offset.x,i)},children:r.jsx(ui,{content:K.imageCaption})})},H))})}),r.jsx(Ur,{onMove:K=>{S(K.index)},ref:s,options:{arrows:!1,speed:L.duration?parseInt(L.duration):500,autoplay:k.autoPlay!==null,...k.autoPlay!==null&&{interval:parseInt(k.autoPlay)*1e3},direction:N==="horiz"||L.type==="fade in"?"ltr":"ttb",pagination:!1,drag:k.triggersList.drag,perPage:1,width:g?g.width:"100%",height:g?g.height:"100%",type:L.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((K,H)=>r.jsx(Xr,{children:r.jsx("div",{className:Le.sliderItem,children:r.jsx("div",{className:Le.imgWrapper,children:r.jsx("img",{className:Ye(Le.sliderImage,{[Le.contain]:K.image.objectFit==="contain",[Le.cover]:K.image.objectFit==="cover"}),src:K.image.url,alt:K.image.name??""})})})},H))},z),C.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Ye(Le.arrow,{[Le.arrowVertical]:N==="vert",[Le.hoverArrow]:C.show==="on hover"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:r.jsxs("button",{onClick:()=>{me("-1")},className:Le.arrowInner,style:{transform:`translate(${P.scalingValue(V,i)}, ${P.scalingValue(ne*(N==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${N==="horiz"?"0deg":"90deg"})`},children:[C.arrowsImgUrl&&r.jsx(nn,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:Ye(Le.arrowImg,Le.mirror)}),!C.arrowsImgUrl&&r.jsx(xa,{color:C.color,className:Ye(Le.arrowIcon,Le.arrowImg,Le.mirror)})]})}),r.jsx("div",{className:Ye(Le.arrow,Le.nextArrow,{[Le.arrowVertical]:N==="vert",[Le.hoverArrow]:C.show==="on hover"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:r.jsxs("button",{className:Le.arrowInner,onClick:()=>me("+1"),style:{transform:`translate(${P.scalingValue(V*(N==="horiz"?-1:1),i)}, ${P.scalingValue(ne,i)}) scale(${e.controls.scale/100}) rotate(${N==="horiz"?"0deg":"90deg"})`},children:[C.arrowsImgUrl&&r.jsx(nn,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:Le.arrowImg}),!C.arrowsImgUrl&&r.jsx(xa,{color:C.color,className:Ye(Le.arrowIcon,Le.arrowImg)})]})})]}),k.triggersList.click&&r.jsx("div",{className:Le.clickOverlay,onClick:()=>{o&&o.go("+1")}}),J.isActive&&r.jsx("div",{className:Ye(Le.pagination,{[Le.paginationInsideBottom]:J.position==="inside-1"&&N==="horiz",[Le.paginationInsideTop]:J.position==="inside-2"&&N==="horiz",[Le.paginationOutsideBottom]:J.position==="outside-1"&&N==="horiz",[Le.paginationOutsideTop]:J.position==="outside-2"&&N==="horiz",[Le.paginationInsideLeft]:J.position==="inside-1"&&N==="vert",[Le.paginationInsideRight]:J.position==="inside-2"&&N==="vert",[Le.paginationOutsideLeft]:J.position==="outside-1"&&N==="vert",[Le.paginationOutsideRight]:J.position==="outside-2"&&N==="vert",[Le.paginationVertical]:N==="vert"}),children:r.jsx("div",{className:Le.paginationInner,style:{backgroundColor:J.colors[2],transform:`scale(${J.scale/100}) translate(${P.scalingValue(J.offset.x,i)}, ${P.scalingValue(J.offset.y,i)}) rotate(${N==="horiz"?"0deg":"90deg"})`},children:t.map((K,H)=>r.jsx("button",{onClick:()=>{o&&o.go(H)},className:Ye(Le.paginationItem),children:r.jsx("div",{className:Ye(Le.dot,{[Le.activeDot]:H===$}),style:{backgroundColor:H===$?J.colors[0]:J.colors[1],"--pagination-hover-color":J.hover}})},H))})})]})})}function xa({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const hd={element:gd,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"]}},fd="ImageRevealSlider-module__imageRevealSlider___UE5Ob",yd="ImageRevealSlider-module__image___Qjt-e",vd="ImageRevealSlider-module__link___N-iLG",bd="ImageRevealSlider-module__cursor___2U03d",Qn={imageRevealSlider:fd,image:yd,link:vd,cursor:bd};function wa(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const s=i.width?Number.parseFloat(i.width):o.naturalWidth,a=o.naturalHeight/o.naturalWidth*s,u=s/2,c=a/2;if(e>=i.x-u&&e<=i.x+u&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function nr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function xd(e,t,n,i){let o,s;if(t==="custom"){o=n;const a=await nr(e);s=a.height/a.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const a=await nr(e);s=a.height/a.width*o}else{const a=await nr(e);o=a.width,s=a.height}return{width:o,height:s,finalWidth:`${o}px`}}function wd({settings:e,content:t,isEditor:n}){const[i,o]=l.useState(null),[s,a]=l.useState([]),[u,c]=l.useState(0),m=l.useRef(0),[p,R]=l.useState({x:0,y:0}),[b,I]=l.useState(1),[g,v]=l.useState("none"),T=l.useRef({x:0,y:0}),[w,$]=l.useState(!1),{sizeType:S,imageWidth:z,randomRangeImageWidth:M}=e.imageSize,{revealPosition:N,visible:L}=e.position,{cursorType:C,target:J,defaultCursorScale:y,defaultCursor:k,hoverCursorScale:_,hoverCursor:V}=e.cursor;l.useEffect(()=>{if(!i)return;const K=(Y,O)=>{const te=i.getBoundingClientRect(),ce=Y-te.left,oe=O-te.top;if(R({x:ce,y:oe}),C==="system"){v("none"),I(1);return}const W=ce,ue=oe,h=document.elementFromPoint(te.left+W,te.top+ue);if(h&&h.closest("a")){v("none"),I(1);return}const ae=wa(W,ue,s)||J==="area"?{img:V??"none",scale:_}:{img:k??"none",scale:y};v(ae.img),I(ae.scale)},H=Y=>{Y.stopPropagation(),T.current={x:Y.clientX,y:Y.clientY},K(Y.clientX,Y.clientY)},Q=()=>{w&&K(T.current.x,T.current.y)};return i.addEventListener("mousemove",H),window.addEventListener("scroll",Q,!0),()=>{i.removeEventListener("mousemove",H),window.removeEventListener("scroll",Q,!0)}},[i,w,p,C,J,V,k,_,y,s]),l.useEffect(()=>{w||(v("none"),I(0))},[w]);const ne=async(K,H,Q,Y={})=>{const{width:O,height:te,finalWidth:ce}=await xd(K.image.url,S,z,M);let oe=0,W=0;N==="same"?(oe=H/2,W=Q/2):(oe=Y.x??Math.random()*H,W=Y.y??Math.random()*Q);const ue=Math.min(Math.max(oe,O/2),H-O/2),h=Math.min(Math.max(W,te/2),Q-te/2);return{id:m.current++,url:K.image.url,link:K.link,name:K.image.name,x:ue,y:h,width:ce}};l.useEffect(()=>{if(!i||t.length===0)return;const K=i.getBoundingClientRect(),H=K.width,Q=K.height,Y=[];(async()=>{const te=t[0],ce=await ne(te,H,Q);Y.push(ce),a(Y),c(1)})()},[S,z,M,N,i]),l.useEffect(()=>{L==="last One"&&a(K=>K.length>0?[K[K.length-1]]:[])},[L]);const me=async K=>{if(!i)return;const H=i.getBoundingClientRect(),Q=K.clientX-H.left,Y=K.clientY-H.top;if(J==="image"&&!wa(Q,Y,s))return;let O=0,te=0;N==="on Click"?(O=Q,te=Y):N==="same"?(O=H.width/2,te=H.height/2):(O=Math.random()*H.width,te=Math.random()*H.height);const ce=t[u],oe=await ne(ce,H.width,H.height,{x:O,y:te});a(W=>L==="all"?[...W,oe]:[oe]),c(W=>W>=t.length-1?0:W+1)};return r.jsxs("div",{ref:o,onClick:me,onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),className:Qn.imageRevealSlider,style:{cursor:g==="none"?"default":"none"},children:[s.map(K=>r.jsx("div",{className:Qn.wrapper,style:{top:`${K.y}px`,left:`${K.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:K.width??"auto",height:"auto",cursor:g==="none"?"default":"none"},children:J==="area"&&K.link?r.jsx("a",{href:K.link,target:"_blank",className:Qn.link,children:r.jsx("img",{src:K.url,alt:K.name,className:Qn.image},K.id)}):r.jsx("img",{src:K.url,alt:K.name,className:Qn.image},K.id)},K.id)),w&&r.jsx("div",{className:Qn.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${b})`,backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Sd={element:wd,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:""}]}}}},$d="LightBox-module__hidden___9s-9x",Cd="LightBox-module__heroImage___sTxNF",Td="LightBox-module__background___rm9ml",Ld="LightBox-module__editor___4ACaY",Ed="LightBox-module__contentStyle___Bgnsq",Id="LightBox-module__imageStyle___tLIlB",Pd="LightBox-module__imgWrapper___LuFUp",Rd="LightBox-module__contain___8-yaS",Ad="LightBox-module__cover___hNvOG",Md="LightBox-module__caption___b6L2I",kd="LightBox-module__captionTextInner___rCGNH",_d="LightBox-module__lightboxSplide___XFuWC",Wd="LightBox-module__arrow___iz38X",Fd="LightBox-module__arrowVertical___Zfz81",Nd="LightBox-module__nextArrow___zkAQN",Hd="LightBox-module__arrowInner___p48sW",Od="LightBox-module__arrowIcon___3VaFf",Bd="LightBox-module__arrowImg___pNV88",jd="LightBox-module__mirror___pjeXc",zd="LightBox-module__thumbsWrapper___GB-nU",Vd="LightBox-module__thumbsContainerVertical___wttk5",Dd="LightBox-module__thumbsContainer___osSma",qd="LightBox-module__thumbsAlignStart___MO6tY",Kd="LightBox-module__thumbsAlignCenter___Q4sUx",Gd="LightBox-module__thumbsAlignEnd___p4y9R",Ud="LightBox-module__thumbItem___HvnF3",Xd="LightBox-module__closeButton___g2khP",Yd="LightBox-module__fadeIn___0m5GW",Jd="LightBox-module__slideInLeft___gPYwC",Zd="LightBox-module__slideInRight___S-pPp",Qd="LightBox-module__slideInTop___DFdAj",eu="LightBox-module__slideInBottom___m27kZ",tu="LightBox-module__fadeOut___55qBR",nu="LightBox-module__slideOutLeft___NvU7P",iu="LightBox-module__slideOutRight___SK7eC",ou="LightBox-module__slideOutTop___Vgg0z",ru="LightBox-module__slideOutBottom___nJ0Ef",au="LightBox-module__scaleSlide___vZriG",ve={hidden:$d,heroImage:Cd,background:Td,editor:Ld,contentStyle:Ed,imageStyle:Id,imgWrapper:Pd,contain:Rd,cover:Ad,caption:Md,captionTextInner:kd,lightboxSplide:_d,arrow:Wd,arrowVertical:Fd,nextArrow:Nd,arrowInner:Hd,arrowIcon:Od,arrowImg:Bd,mirror:jd,thumbsWrapper:zd,thumbsContainerVertical:Vd,thumbsContainer:Dd,thumbsAlignStart:qd,thumbsAlignCenter:Kd,thumbsAlignEnd:Gd,thumbItem:Ud,closeButton:Xd,fadeIn:Yd,slideInLeft:Jd,slideInRight:Zd,slideInTop:Qd,slideInBottom:eu,fadeOut:tu,slideOutLeft:nu,slideOutRight:iu,slideOutTop:ou,slideOutBottom:ru,scaleSlide:au},to=(e,t,n)=>{const i={},[o,s]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),s==="left"?(i.left="0",i.right="auto"):s==="center"?(i.left="50%",i.right="auto"):s==="right"&&(i.left="auto",i.right="0"),o==="middle"&&s==="center"?i.transform=`translate(calc(-50% + ${P.scalingValue(t.x,n)}), calc(-50% + ${P.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${P.scalingValue(t.x,n)}, calc(-50% + ${P.scalingValue(t.y,n)}))`:s==="center"?i.transform=`translate(calc(-50% + ${P.scalingValue(t.x,n)}), ${P.scalingValue(t.y,n)})`:i.transform=`translate(${P.scalingValue(t.x,n)}, ${P.scalingValue(t.y,n)})`,i};function Vs(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 Sa(e){const t=e.getBoundingClientRect(),n=Vs(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,a=e.naturalHeight,u=i/o,c=s/a;let m,p;c>u?(m=i,p=i/c):(p=o,m=o*c);const R=t.left+n.left,b=t.top+n.top,I=(i-m)/2+R,g=(o-p)/2+b;return{x:I,y:g,width:m,height:p}}function $a(e){const t=e.getBoundingClientRect(),n=Vs(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Ca(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const i=t[1].split(",").map(o=>parseFloat(o.trim()));return i.length===4?i[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const i=n[1].substring(6,8);return parseInt(i,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function su(e,t){const n=(()=>{if(e==="fade in")return ve.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return ve.slideInLeft;case"right":return ve.slideInRight;case"top":return ve.slideInTop;case"bottom":return ve.slideInBottom;default:return ve.slideInRight}return ve.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return ve.fadeIn;if(e==="slide in")switch(t){case"left":return ve.slideInLeft;case"right":return ve.slideInRight;case"top":return ve.slideInTop;case"bottom":return ve.slideInBottom;default:return ve.slideInRight}return ve.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return ve.fadeOut;if(e==="slide in")switch(t){case"left":return ve.slideOutLeft;case"right":return ve.slideOutRight;case"top":return ve.slideOutTop;case"bottom":return ve.slideOutBottom;default:return ve.slideOutRight}return ve.fadeOut})(),s=(()=>{if(e==="fade in")return ve.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return ve.slideOutLeft;case"right":return ve.slideOutRight;case"top":return ve.slideOutTop;case"bottom":return ve.slideOutBottom;default:return ve.slideOutRight}return ve.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:s}}const lu=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:s,isPreviewMode:a})=>{const[u,c]=l.useState(!1),{url:m}=e.thumbnailBlock.cover;return l.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:m,alt:"Cover",className:ve.heroImage,onClick:()=>c(!0)}),r.jsx(cu,{isOpen:u,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},cu=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:a,metadata:u})=>{var _e;const{widthSettings:c,fontSettings:m,letterSpacing:p,textAlign:R,wordSpacing:b,fontSizeLineHeight:I,textAppearance:g,color:v}=i.imageCaption??{},[T,w]=l.useState(0),[$,S]=l.useState(0),[z,M]=l.useState(!1),[N,L]=l.useState(!1),[C,J]=l.useState({}),y=l.useRef(null),k=l.useRef(null),_=l.useRef(null),V=l.useRef(!1),ne=l.useRef(null),me=l.useRef(null),K=l.useRef(null),H=l.useRef(null),Q=l.useRef(!1),Y=l.useRef(null),[O,te]=l.useState(!1),{appear:ce,triggers:oe,slider:W,thumbnail:ue,controls:h,area:ae,caption:be,layout:ye}=o.lightboxBlock,{appearClass:Ae,backdropAppearClass:Z,backdropDisappearClass:ge,disappearClass:U}=su(ce.type,ce.direction),X=(u==null?void 0:u.itemId)??null;l.useEffect(()=>{const F=()=>{setTimeout(()=>{var E,j;(j=(E=y.current)==null?void 0:E.splide)==null||j.refresh()},16)},D=()=>{S(E=>E+1)};return window.addEventListener("ArticleEditor.Layout:change",F),window.addEventListener("ArticleEditor.ComponentContent:change",D),()=>{window.removeEventListener("ArticleEditor.Layout:change",F),window.removeEventListener("ArticleEditor.ComponentContent:change",D)}},[]),l.useEffect(()=>{if(!e||!ue.isActive){te(!1);return}const F=Y.current;if(!F)return;const D=()=>{W.direction==="horiz"?te(F.scrollWidth>F.clientWidth):te(F.scrollHeight>F.clientHeight)};D();const E=new ResizeObserver(D);return E.observe(F),()=>E.disconnect()},[e,ue.isActive,n.length,C,W.direction]);const B=l.useCallback(()=>{const F=window.matchMedia("(max-width: 768px)").matches,D=Ca(ae.color);F&&!a&&D>.9&&(document.body.style.backgroundColor=""),M(!0),V.current=!0;const E=j=>{j.target===ne.current&&j.animationName&&(ne.current&&me.current&&ne.current.removeEventListener("animationend",me.current),me.current=null,V.current&&(V.current=!1,t()),M(!1))};ne.current&&(me.current=E,ne.current.addEventListener("animationend",E))},[t,ae.color,a]),se=(F,D,E)=>{var j,G;if(F){if(oe.type==="click"&&oe.switch==="image")oe.repeat==="close"&&T===n.length-1?B():(j=y.current)==null||j.go("+1");else if(oe.type==="click"&&oe.switch==="50/50"){const ee=F.getBoundingClientRect(),ie=D-ee.left,he=E-ee.top,Se=ee.width,$e=ee.height;let fe;W.direction==="horiz"?fe=ie<Se/2?"-1":"+1":fe=he<$e/2?"-1":"+1",(G=y.current)==null||G.go(fe)}}},Ee=F=>{if(Q.current){Q.current=!1;return}const D=n[T],E=(D==null?void 0:D.image.objectFit)==="cover";let j,G;if("changedTouches"in F&&F.changedTouches.length>0)j=F.changedTouches[0].clientX,G=F.changedTouches[0].clientY;else if("clientX"in F)j=F.clientX,G=F.clientY;else return;let ee;if(E&&_.current){const ie=$a(_.current);ee=j>=ie.left&&j<=ie.right&&G>=ie.top&&G<=ie.bottom}else{const ie=_.current?Sa(_.current):null;if(!ie){F.target===F.currentTarget&&B();return}ee=j>=ie.x&&j<=ie.x+ie.width&&G>=ie.y&&G<=ie.y+ie.height}ee?se(_.current,j,G):B()},Fe=F=>{const D=F.target;(D.classList.contains(ve.thumbsWrapper)||D.classList.contains(ve.thumbsContainer))&&Ee(F)};l.useEffect(()=>{if(!e)return;const F=D=>{var E,j;if(D.key==="Escape"){B();return}if(D.key==="ArrowRight"){w(G=>(G+1)%Math.max(n.length,1)),(E=y.current)==null||E.go("+1");return}D.key==="ArrowLeft"&&(w(G=>(G-1+Math.max(n.length,1))%Math.max(n.length,1)),(j=y.current)==null||j.go("-1"))};return window.addEventListener("keydown",F),()=>{window.removeEventListener("keydown",F)}},[e,B,n.length]),l.useEffect(()=>{if(e){if(w(0),S(D=>D+1),V.current=!1,M(!1),L(!1),J({}),!X)return;const F=new CustomEvent("page-overlay",{detail:{itemId:X}});window.dispatchEvent(F)}return()=>{ne.current&&me.current&&(ne.current.removeEventListener("animationend",me.current),me.current=null),L(!1)}},[e,X]),l.useEffect(()=>{k.current!==null&&k.current!==W.type&&S(F=>F+1),k.current=W.type},[W.type]),l.useEffect(()=>{if(!e)return;const F=document.body.style.overflow,D=window.matchMedia("(max-width: 768px)").matches,E=Ca(ae.color);document.body.style.overflow="hidden",L(!1);const j=ee=>{ee.target===ne.current&&!V.current&&ee.animationName&&(D&&!a&&E>.9&&(document.body.style.backgroundColor=ae.color),L(!0),ne.current&&K.current&&ne.current.removeEventListener("animationend",K.current),K.current=null)};ne.current&&(K.current=j,ne.current.addEventListener("animationend",j));const G=ee=>{const ie=ee.target;ie&&(ie.closest(`.${ve.thumbsWrapper}`)||ie.closest(`.${ve.thumbsContainer}`))||W.type!=="slide"&&ee.preventDefault()};return document.addEventListener("touchmove",G,{passive:!1}),()=>{document.body.style.overflow=F,document.removeEventListener("touchmove",G),ne.current&&K.current&&(ne.current.removeEventListener("animationend",K.current),K.current=null),L(!1)}},[e,a,ae.color,W.type]),l.useEffect(()=>{if(!e)return;const F=D=>{var j,G;if(V.current){D.stopPropagation();return}if(Q.current){Q.current=!1;return}const E=D.target;if(!(E&&(E.closest(`.${ve.thumbsContainer}`)||E.closest(`.${ve.thumbItem}`)||E.closest(`.${ve.arrow}`)||E.closest(`.${ve.closeButton}`)||E.closest(`.${ve.caption}`)))){if(W.type==="slide"&&oe.type==="drag"&&((G=(j=y.current)==null?void 0:j.splide)!=null&&G.root)){const ee=y.current.splide.root;if(E&&(ee.contains(E)||ee===E))return}if(D.touches.length===0&&D.changedTouches.length>0){const ee=n[T],ie=(ee==null?void 0:ee.image.objectFit)==="cover",he=D.changedTouches[0];let Se;if(ie&&_.current){const $e=$a(_.current);Se=he.clientX>=$e.left&&he.clientX<=$e.right&&he.clientY>=$e.top&&he.clientY<=$e.bottom}else{const $e=_.current?Sa(_.current):null;if(!$e)return;Se=he.clientX>=$e.x&&he.clientX<=$e.x+$e.width&&he.clientY>=$e.y&&he.clientY<=$e.y+$e.height}if(!Se){D.stopPropagation(),V.current=!0;const $e=fe=>{fe.stopPropagation(),fe.preventDefault(),document.removeEventListener("click",$e,!0)};document.addEventListener("click",$e,!0),B()}}}};return document.addEventListener("touchend",F,{passive:!0}),()=>{document.removeEventListener("touchend",F)}},[e,B,T,n]);const Re=(W.type==="scale"||W.type==="fade")&&W.direction==="vert"&&oe.type==="drag";l.useEffect(()=>{var fe,Ge;if(!e||!Re||!((Ge=(fe=y.current)==null?void 0:fe.splide)!=null&&Ge.root))return;const F=y.current.splide.root,D=30,E=(de,Me)=>{if(H.current){const je=Math.abs(de-H.current.x),Ve=Math.abs(Me-H.current.y);(je>0||Ve>0)&&(Q.current=!0)}},j=de=>{H.current&&(de.preventDefault(),E(de.clientX,de.clientY))},G=de=>{H.current&&de.touches.length>0&&(de.preventDefault(),E(de.touches[0].clientX,de.touches[0].clientY))},ee=(de,Me)=>{if(!H.current||!y.current){H.current=null;return}const je=Math.abs(de-H.current.x),Ve=Math.abs(Me-H.current.y);Ve>D&&Ve>je&&y.current.go(Me<H.current.y?"+1":"-1"),H.current=null},ie=de=>{H.current&&ee(de.clientX,de.clientY),document.removeEventListener("pointerup",ie),document.removeEventListener("pointercancel",ie),document.removeEventListener("pointermove",j)},he=de=>{if(H.current){if(de.changedTouches.length>0){const Me=de.changedTouches[0];ee(Me.clientX,Me.clientY)}document.removeEventListener("touchend",he),document.removeEventListener("touchcancel",he),document.removeEventListener("touchmove",G)}},Se=de=>{H.current={x:de.clientX,y:de.clientY},Q.current=!1,document.addEventListener("pointermove",j,{passive:!1}),document.addEventListener("pointerup",ie),document.addEventListener("pointercancel",ie)},$e=de=>{de.touches.length>0&&(H.current={x:de.touches[0].clientX,y:de.touches[0].clientY},Q.current=!1,document.addEventListener("touchmove",G,{passive:!1}),document.addEventListener("touchend",he),document.addEventListener("touchcancel",he))};return F.addEventListener("pointerdown",Se),F.addEventListener("touchstart",$e),()=>{F.removeEventListener("pointerdown",Se),F.removeEventListener("touchstart",$e),document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",ie),document.removeEventListener("pointercancel",ie),document.removeEventListener("touchmove",G),document.removeEventListener("touchend",he),document.removeEventListener("touchcancel",he),H.current=null,Q.current=!1}},[e,Re,$]);const Ie={backgroundColor:ae.color,backdropFilter:`blur(${ae.blur}px)`,animationDuration:`${parseInt(ce.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:Ni.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:a?null:ne,className:Ye(ve.background,z?ge:Z,{[ve.editor]:a},{[ve.hidden]:!e}),style:{...Ie,...N&&!a&&!z?{position:"absolute"}:{}}}),r.jsxs("div",{ref:a?ne:null,className:Ye(ve.contentStyle,z?U:Ae,{[ve.editor]:a},{[ve.hidden]:!e}),style:{animationDuration:`${parseInt(ce.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(Ur,{onMove:F=>w(F.index),ref:y,className:ve.lightboxSplide,options:{arrows:!1,speed:W.duration?parseInt(W.duration):500,direction:W.direction==="horiz"||W.type==="fade"||W.type==="scale"?"ltr":"ttb",pagination:!1,drag:oe.type==="drag"&&!Re,perPage:1,width:"100%",height:"100%",type:W.type==="fade"||W.type==="scale"?"fade":"loop",padding:0,rewind:oe.repeat!=="close",start:0},style:{"--splide-speed":W.duration},children:n.map((F,D)=>{const E=to(ye.position,ye.offset,a),j=`${P.scalingValue(ye.padding.top,a)} ${P.scalingValue(ye.padding.right,a)} ${P.scalingValue(ye.padding.bottom,a)} ${P.scalingValue(ye.padding.left,a)}`,G=W.type==="scale"?(()=>{const{transform:ee,...ie}=E;return{...ie,position:"absolute",padding:j,boxSizing:"border-box","--position-transform":ee||"none"}})():{...E,position:"absolute",padding:j,boxSizing:"border-box"};return r.jsx(Xr,{children:r.jsx("div",{className:ve.imgWrapper,onClick:Ee,children:r.jsx("img",{ref:D===T?_:null,className:Ye(ve.imageStyle,{[ve.contain]:F.image.objectFit==="contain",[ve.cover]:F.image.objectFit==="cover",[ve.scaleSlide]:W.type==="scale"}),src:F.image.url,alt:F.image.name??"",style:{...G,pointerEvents:F.image.objectFit==="contain"?"none":"auto"}})})},D)})},$),h.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Ye(ve.arrow,{[ve.arrowVertical]:W.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:r.jsxs("button",{className:ve.arrowInner,style:{transform:`translate(${P.scalingValue(h.offset.x,a)}, ${P.scalingValue(h.offset.y*(W.direction==="horiz"?1:-1),a)}) scale(${h.scale}) rotate(${W.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var F;return(F=y.current)==null?void 0:F.go("-1")},"aria-label":"Previous",children:[h.arrowsImgUrl&&r.jsx(nn,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:Ye(ve.arrowImg,ve.mirror)}),!h.arrowsImgUrl&&r.jsx(Ta,{color:h.color,className:Ye(ve.arrowIcon,ve.arrowImg,ve.mirror)})]})}),r.jsx("div",{className:Ye(ve.arrow,ve.nextArrow,{[ve.arrowVertical]:W.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:r.jsxs("button",{className:ve.arrowInner,style:{transform:`translate(${P.scalingValue(h.offset.x*(W.direction==="horiz"?-1:1),a)}, ${P.scalingValue(h.offset.y,a)}) scale(${h.scale}) rotate(${W.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var F;return(F=y.current)==null?void 0:F.go("+1")},"aria-label":"Next",children:[h.arrowsImgUrl&&r.jsx(nn,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:ve.arrowImg}),!h.arrowsImgUrl&&r.jsx(Ta,{color:h.color,className:Ye(ve.arrowIcon,ve.arrowImg)})]})})]}),ae.closeIconUrl&&(()=>{const F=to(ae.closeIconAlign,ae.closeIconOffset,a),D=`scale(${ae.closeIconScale})`,E=F.transform?`${F.transform} ${D}`:D;return r.jsx("button",{className:ve.closeButton,style:{...F,transform:E},onClick:B,"aria-label":"Close lightbox",children:r.jsx(nn,{url:ae.closeIconUrl,fill:ae.closeIconColor??"#000000",hoverFill:ae.closeIconHover??"#cccccc"})})})(),be&&be.isActive&&i.imageCaption&&((_e=n[T])==null?void 0:_e.imageCaption)&&r.jsx("div",{className:ve.caption,style:{...to(be.alignment,be.offset,a),fontFamily:zo(m.fontFamily),fontWeight:m.fontWeight,fontStyle:m.fontStyle,width:c.sizing==="auto"?"max-content":P.scalingValue(c.width,a),letterSpacing:P.scalingValue(p,a),wordSpacing:P.scalingValue(b,a),textAlign:R,fontSize:P.scalingValue(I.fontSize,a),lineHeight:P.scalingValue(I.lineHeight,a),textTransform:g.textTransform??"none",textDecoration:g.textDecoration??"none",fontVariant:g.fontVariant??"normal",color:v},onClick:F=>F.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:ve.captionTextInner,style:{"--link-color":be.linkColor,"--link-hover-color":be.linkHoverColor},children:r.jsx(ui,{content:n[T].imageCaption})})}),ue.isActive&&(()=>{const[F,D]=ue.position.split("-"),E=W.direction==="horiz"?`${F}-left`:ue.position,j=to(E,ue.offset,a),G=()=>{if(W.direction==="horiz"){if(D==="left")return"flex-start";if(D==="center")return"center";if(D==="right")return"flex-end"}else{if(F==="top")return"flex-start";if(F==="middle")return"center";if(F==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:Y,className:ve.thumbsWrapper,onClick:ee=>Fe(ee),style:{position:a?"absolute":"fixed",...j,...W.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:Ye(ve.thumbsContainer,{[ve.thumbsContainerVertical]:W.direction==="vert",[ve.thumbsAlignStart]:ue.align==="start",[ve.thumbsAlignCenter]:ue.align==="center",[ve.thumbsAlignEnd]:ue.align==="end"}),style:{gap:P.scalingValue(ue.grid.gap,a),justifyContent:O?"flex-start":G()},children:n.map((ee,ie)=>{const he=ie===T,Se=C[ie],fe=ue.grid.size*(he?ue.activeState.scale:1),Ge=()=>{if(ue.fit!=="fit")return{};if(!Se)return W.direction==="horiz"?{height:P.scalingValue(fe,a)}:{width:P.scalingValue(fe,a)};const de=Se.width/Se.height;if(W.direction==="horiz"){const Me=fe,je=Me*de;return{width:P.scalingValue(je,a),height:P.scalingValue(Me,a)}}else{const Me=fe,je=Me/de;return{width:P.scalingValue(Me,a),height:P.scalingValue(je,a)}}};return r.jsx("button",{className:ve.thumbItem,style:{...W.direction==="horiz"&&ue.fit!=="fit"?{height:P.scalingValue(fe,a)}:{},...W.direction==="vert"&&ue.fit!=="fit"?{width:P.scalingValue(fe,a)}:{},...ue.fit==="cover"?{width:P.scalingValue(fe,a),height:P.scalingValue(fe,a)}:{},...Ge(),transition:he?"all 0.25s ease-out":"none",opacity:he?ue.activeState.opacity/100:ue.opacity/100,"--thumb-hover":ue.activeState.opacity/100},onClick:de=>{var Me;de.stopPropagation(),w(ie),(Me=y.current)==null||Me.go(ie)},onMouseEnter:()=>{var de;ue.triggers==="hov"&&((de=y.current)==null||de.go(ie))},children:r.jsx("img",{src:ee.image.url,alt:ee.image.name??"",onLoad:de=>{const Me=de.currentTarget;Me.naturalWidth&&Me.naturalHeight&&J(je=>({...je,[ie]:{width:Me.naturalWidth,height:Me.naturalHeight}}))},style:{objectFit:ue.fit==="cover"?"cover":"contain",...ue.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ue.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ee.image.name}-${ie}`)})})})})()]})]}),document.getElementById(s))};function Ta({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const du={element:lu,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 no(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function uu(e){return`
|
|
6
|
+
*/const rd="RichTextRenderer-module__link___BWeZ2",ad={link:rd},sd=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))},zo=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>sd(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function qt(e){const{color:t,...n}=e;return n}function kt(e,t){var o,s,a;const{fontSize:n,lineHeight:i}=e;return{fontFamily:zo(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:L.scalingValue(e.letterSpacing,t),wordSpacing:L.scalingValue(e.wordSpacing,t),fontSize:L.scalingValue(n,t),lineHeight:i!==void 0?L.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(a=e.textAppearance)==null?void 0:a.fontVariant,textAlign:e.textAlign,color:e.color}}const ui=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:ad.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:ld(i),children:i.text},o));return r.jsx(r.Fragment,{children:e.map((n,i)=>{const o=n.children;return r.jsx("div",{children:t(o)},i)})})};function ld(e){return{...e.fontFamily&&{fontFamily:zo(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 cd="SvgImage-module__svg___q3xE-",dd="SvgImage-module__img___VsTm-",ba={svg:cd,img:dd},ud=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},pd=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Qt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[s,a]=l.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return l.useEffect(()=>{if(typeof window<"u"&&window.CSS){const u=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');a(u)}},[]),!ud(e)||!s?r.jsx("img",{src:e,alt:"",className:Xe(ba.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:Xe(ba.svg,i),style:{"--svg":pd(e),"--fill":t,"--hover-fill":n,...o??{}}})},md={"top-left":Ee.topLeftAlignment,"top-center":Ee.topCenterAlignment,"top-right":Ee.topRightAlignment,"middle-left":Ee.middleLeftAlignment,"middle-center":Ee.middleCenterAlignment,"middle-right":Ee.middleRightAlignment,"bottom-left":Ee.bottomLeftAlignment,"bottom-center":Ee.bottomCenterAlignment,"bottom-right":Ee.bottomRightAlignment};function gd({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=l.useState(null),{widthSettings:a,fontSettings:u,letterSpacing:c,textAlign:m,wordSpacing:p,fontSizeLineHeight:E,textAppearance:b,color:C}=n.imageCaption??{},[g,v]=l.useState(void 0),[T,w]=l.useState(null),[$,S]=l.useState(0),[_,k]=l.useState(0),{direction:W,transition:P,controls:I,pagination:Y,imageCaption:y,triggers:M}=e,N=l.useRef(P.type),{x:V,y:te}=e.controls.offset,ue=K=>{o&&o.go(K)};return l.useEffect(()=>{if(!T)return;const K=new ResizeObserver(H=>{if(!o)return;const[Z]=H;v({width:Math.round(Z.contentRect.width),height:Math.round(Z.contentRect.height)})});return K.observe(T),()=>K.unobserve(T)},[T]),l.useEffect(()=>{!o||N.current===P.type||(k(K=>K+1),N.current=P.type)},[P.type]),r.jsx("div",{className:Xe(Ee.wrapper,{[Ee.editor]:i}),ref:w,children:r.jsxs("div",{className:Ee.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&&r.jsx("div",{className:Xe(Ee.captionBlock),children:r.jsx("div",{className:Ee.captionTextWrapper,children:t.map((K,H)=>r.jsx("div",{className:Xe(Ee.captionText,md[y.alignment],{[Ee.withPointerEvents]:H===$&&i,[Ee.active]:H===$}),style:{fontFamily:zo(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:a.sizing==="auto"?"max-content":L.scalingValue(a.width,i),letterSpacing:L.scalingValue(c,i),wordSpacing:L.scalingValue(p,i),textAlign:m,fontSize:L.scalingValue(E.fontSize,i),lineHeight:L.scalingValue(E.lineHeight,i),textTransform:b.textTransform??"none",textDecoration:b.textDecoration??"none",fontVariant:b.fontVariant??"normal",color:C,transitionDuration:P.duration?`${Math.round(parseInt(P.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:Ee.captionTextInner,style:{"--link-hover-color":y.linkHoverColor,"--link-color":y.linkColor,position:"relative",top:L.scalingValue(y.offset.y,i),left:L.scalingValue(y.offset.x,i)},children:r.jsx(ui,{content:K.imageCaption})})},H))})}),r.jsx(Ur,{onMove:K=>{S(K.index)},ref:s,options:{arrows:!1,speed:P.duration?parseInt(P.duration):500,autoplay:M.autoPlay!==null,...M.autoPlay!==null&&{interval:parseInt(M.autoPlay)*1e3},direction:W==="horiz"||P.type==="fade in"?"ltr":"ttb",pagination:!1,drag:M.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((K,H)=>r.jsx(Xr,{children:r.jsx("div",{className:Ee.sliderItem,children:r.jsx("div",{className:Ee.imgWrapper,children:r.jsx("img",{className:Xe(Ee.sliderImage,{[Ee.contain]:K.image.objectFit==="contain",[Ee.cover]:K.image.objectFit==="cover"}),src:K.image.url,alt:K.image.name??""})})})},H))},_),I.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Xe(Ee.arrow,{[Ee.arrowVertical]:W==="vert",[Ee.hoverArrow]:I.show==="on hover"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:r.jsxs("button",{onClick:()=>{ue("-1")},className:Ee.arrowInner,style:{transform:`translate(${L.scalingValue(V,i)}, ${L.scalingValue(te*(W==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${W==="horiz"?"0deg":"90deg"})`},children:[I.arrowsImgUrl&&r.jsx(Qt,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:Xe(Ee.arrowImg,Ee.mirror)}),!I.arrowsImgUrl&&r.jsx(xa,{color:I.color,className:Xe(Ee.arrowIcon,Ee.arrowImg,Ee.mirror)})]})}),r.jsx("div",{className:Xe(Ee.arrow,Ee.nextArrow,{[Ee.arrowVertical]:W==="vert",[Ee.hoverArrow]:I.show==="on hover"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:r.jsxs("button",{className:Ee.arrowInner,onClick:()=>ue("+1"),style:{transform:`translate(${L.scalingValue(V*(W==="horiz"?-1:1),i)}, ${L.scalingValue(te,i)}) scale(${e.controls.scale/100}) rotate(${W==="horiz"?"0deg":"90deg"})`},children:[I.arrowsImgUrl&&r.jsx(Qt,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:Ee.arrowImg}),!I.arrowsImgUrl&&r.jsx(xa,{color:I.color,className:Xe(Ee.arrowIcon,Ee.arrowImg)})]})})]}),M.triggersList.click&&r.jsx("div",{className:Ee.clickOverlay,onClick:()=>{o&&o.go("+1")}}),Y.isActive&&r.jsx("div",{className:Xe(Ee.pagination,{[Ee.paginationInsideBottom]:Y.position==="inside-1"&&W==="horiz",[Ee.paginationInsideTop]:Y.position==="inside-2"&&W==="horiz",[Ee.paginationOutsideBottom]:Y.position==="outside-1"&&W==="horiz",[Ee.paginationOutsideTop]:Y.position==="outside-2"&&W==="horiz",[Ee.paginationInsideLeft]:Y.position==="inside-1"&&W==="vert",[Ee.paginationInsideRight]:Y.position==="inside-2"&&W==="vert",[Ee.paginationOutsideLeft]:Y.position==="outside-1"&&W==="vert",[Ee.paginationOutsideRight]:Y.position==="outside-2"&&W==="vert",[Ee.paginationVertical]:W==="vert"}),children:r.jsx("div",{className:Ee.paginationInner,style:{backgroundColor:Y.colors[2],transform:`scale(${Y.scale/100}) translate(${L.scalingValue(Y.offset.x,i)}, ${L.scalingValue(Y.offset.y,i)}) rotate(${W==="horiz"?"0deg":"90deg"})`},children:t.map((K,H)=>r.jsx("button",{onClick:()=>{o&&o.go(H)},className:Xe(Ee.paginationItem),children:r.jsx("div",{className:Xe(Ee.dot,{[Ee.activeDot]:H===$}),style:{backgroundColor:H===$?Y.colors[0]:Y.colors[1],"--pagination-hover-color":Y.hover}})},H))})})]})})}function xa({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const hd={element:gd,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"]}},fd="ImageRevealSlider-module__imageRevealSlider___UE5Ob",yd="ImageRevealSlider-module__image___Qjt-e",vd="ImageRevealSlider-module__link___N-iLG",bd="ImageRevealSlider-module__cursor___2U03d",Qn={imageRevealSlider:fd,image:yd,link:vd,cursor:bd};function wa(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const s=i.width?Number.parseFloat(i.width):o.naturalWidth,a=o.naturalHeight/o.naturalWidth*s,u=s/2,c=a/2;if(e>=i.x-u&&e<=i.x+u&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function nr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function xd(e,t,n,i){let o,s;if(t==="custom"){o=n;const a=await nr(e);s=a.height/a.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const a=await nr(e);s=a.height/a.width*o}else{const a=await nr(e);o=a.width,s=a.height}return{width:o,height:s,finalWidth:`${o}px`}}function wd({settings:e,content:t,isEditor:n}){const[i,o]=l.useState(null),[s,a]=l.useState([]),[u,c]=l.useState(0),m=l.useRef(0),[p,E]=l.useState({x:0,y:0}),[b,C]=l.useState(1),[g,v]=l.useState("none"),T=l.useRef({x:0,y:0}),[w,$]=l.useState(!1),{sizeType:S,imageWidth:_,randomRangeImageWidth:k}=e.imageSize,{revealPosition:W,visible:P}=e.position,{cursorType:I,target:Y,defaultCursorScale:y,defaultCursor:M,hoverCursorScale:N,hoverCursor:V}=e.cursor;l.useEffect(()=>{if(!i)return;const K=(G,B)=>{const J=i.getBoundingClientRect(),ie=G-J.left,oe=B-J.top;if(E({x:ie,y:oe}),I==="system"){v("none"),C(1);return}const O=ie,ce=oe,h=document.elementFromPoint(J.left+O,J.top+ce);if(h&&h.closest("a")){v("none"),C(1);return}const pe=wa(O,ce,s)||Y==="area"?{img:V??"none",scale:N}:{img:M??"none",scale:y};v(pe.img),C(pe.scale)},H=G=>{G.stopPropagation(),T.current={x:G.clientX,y:G.clientY},K(G.clientX,G.clientY)},Z=()=>{w&&K(T.current.x,T.current.y)};return i.addEventListener("mousemove",H),window.addEventListener("scroll",Z,!0),()=>{i.removeEventListener("mousemove",H),window.removeEventListener("scroll",Z,!0)}},[i,w,p,I,Y,V,M,N,y,s]),l.useEffect(()=>{w||(v("none"),C(0))},[w]);const te=async(K,H,Z,G={})=>{const{width:B,height:J,finalWidth:ie}=await xd(K.image.url,S,_,k);let oe=0,O=0;W==="same"?(oe=H/2,O=Z/2):(oe=G.x??Math.random()*H,O=G.y??Math.random()*Z);const ce=Math.min(Math.max(oe,B/2),H-B/2),h=Math.min(Math.max(O,J/2),Z-J/2);return{id:m.current++,url:K.image.url,link:K.link,name:K.image.name,x:ce,y:h,width:ie}};l.useEffect(()=>{if(!i||t.length===0)return;const K=i.getBoundingClientRect(),H=K.width,Z=K.height,G=[];(async()=>{const J=t[0],ie=await te(J,H,Z);G.push(ie),a(G),c(1)})()},[S,_,k,W,i]),l.useEffect(()=>{P==="last One"&&a(K=>K.length>0?[K[K.length-1]]:[])},[P]);const ue=async K=>{if(!i)return;const H=i.getBoundingClientRect(),Z=K.clientX-H.left,G=K.clientY-H.top;if(Y==="image"&&!wa(Z,G,s))return;let B=0,J=0;W==="on Click"?(B=Z,J=G):W==="same"?(B=H.width/2,J=H.height/2):(B=Math.random()*H.width,J=Math.random()*H.height);const ie=t[u],oe=await te(ie,H.width,H.height,{x:B,y:J});a(O=>P==="all"?[...O,oe]:[oe]),c(O=>O>=t.length-1?0:O+1)};return r.jsxs("div",{ref:o,onClick:ue,onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),className:Qn.imageRevealSlider,style:{cursor:g==="none"?"default":"none"},children:[s.map(K=>r.jsx("div",{className:Qn.wrapper,style:{top:`${K.y}px`,left:`${K.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:K.width??"auto",height:"auto",cursor:g==="none"?"default":"none"},children:Y==="area"&&K.link?r.jsx("a",{href:K.link,target:"_blank",className:Qn.link,children:r.jsx("img",{src:K.url,alt:K.name,className:Qn.image},K.id)}):r.jsx("img",{src:K.url,alt:K.name,className:Qn.image},K.id)},K.id)),w&&r.jsx("div",{className:Qn.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${b})`,backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const $d={element:wd,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:""}]}}}},Sd="LightBox-module__hidden___9s-9x",Cd="LightBox-module__heroImage___sTxNF",Td="LightBox-module__background___rm9ml",Ld="LightBox-module__editor___4ACaY",Ed="LightBox-module__contentStyle___Bgnsq",Pd="LightBox-module__imageStyle___tLIlB",Id="LightBox-module__imgWrapper___LuFUp",Ad="LightBox-module__contain___8-yaS",Rd="LightBox-module__cover___hNvOG",kd="LightBox-module__caption___b6L2I",Md="LightBox-module__captionTextInner___rCGNH",_d="LightBox-module__lightboxSplide___XFuWC",Wd="LightBox-module__arrow___iz38X",Fd="LightBox-module__arrowVertical___Zfz81",Nd="LightBox-module__nextArrow___zkAQN",Hd="LightBox-module__arrowInner___p48sW",Od="LightBox-module__arrowIcon___3VaFf",Bd="LightBox-module__arrowImg___pNV88",jd="LightBox-module__mirror___pjeXc",zd="LightBox-module__thumbsWrapper___GB-nU",Vd="LightBox-module__thumbsContainerVertical___wttk5",Dd="LightBox-module__thumbsContainer___osSma",qd="LightBox-module__thumbsAlignStart___MO6tY",Kd="LightBox-module__thumbsAlignCenter___Q4sUx",Gd="LightBox-module__thumbsAlignEnd___p4y9R",Ud="LightBox-module__thumbItem___HvnF3",Xd="LightBox-module__closeButton___g2khP",Yd="LightBox-module__fadeIn___0m5GW",Jd="LightBox-module__slideInLeft___gPYwC",Zd="LightBox-module__slideInRight___S-pPp",Qd="LightBox-module__slideInTop___DFdAj",eu="LightBox-module__slideInBottom___m27kZ",tu="LightBox-module__fadeOut___55qBR",nu="LightBox-module__slideOutLeft___NvU7P",iu="LightBox-module__slideOutRight___SK7eC",ou="LightBox-module__slideOutTop___Vgg0z",ru="LightBox-module__slideOutBottom___nJ0Ef",au="LightBox-module__scaleSlide___vZriG",fe={hidden:Sd,heroImage:Cd,background:Td,editor:Ld,contentStyle:Ed,imageStyle:Pd,imgWrapper:Id,contain:Ad,cover:Rd,caption:kd,captionTextInner:Md,lightboxSplide:_d,arrow:Wd,arrowVertical:Fd,nextArrow:Nd,arrowInner:Hd,arrowIcon:Od,arrowImg:Bd,mirror:jd,thumbsWrapper:zd,thumbsContainerVertical:Vd,thumbsContainer:Dd,thumbsAlignStart:qd,thumbsAlignCenter:Kd,thumbsAlignEnd:Gd,thumbItem:Ud,closeButton:Xd,fadeIn:Yd,slideInLeft:Jd,slideInRight:Zd,slideInTop:Qd,slideInBottom:eu,fadeOut:tu,slideOutLeft:nu,slideOutRight:iu,slideOutTop:ou,slideOutBottom:ru,scaleSlide:au},to=(e,t,n)=>{const i={},[o,s]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),s==="left"?(i.left="0",i.right="auto"):s==="center"?(i.left="50%",i.right="auto"):s==="right"&&(i.left="auto",i.right="0"),o==="middle"&&s==="center"?i.transform=`translate(calc(-50% + ${L.scalingValue(t.x,n)}), calc(-50% + ${L.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${L.scalingValue(t.x,n)}, calc(-50% + ${L.scalingValue(t.y,n)}))`:s==="center"?i.transform=`translate(calc(-50% + ${L.scalingValue(t.x,n)}), ${L.scalingValue(t.y,n)})`:i.transform=`translate(${L.scalingValue(t.x,n)}, ${L.scalingValue(t.y,n)})`,i};function Vs(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 $a(e){const t=e.getBoundingClientRect(),n=Vs(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,a=e.naturalHeight,u=i/o,c=s/a;let m,p;c>u?(m=i,p=i/c):(p=o,m=o*c);const E=t.left+n.left,b=t.top+n.top,C=(i-m)/2+E,g=(o-p)/2+b;return{x:C,y:g,width:m,height:p}}function Sa(e){const t=e.getBoundingClientRect(),n=Vs(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Ca(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const i=t[1].split(",").map(o=>parseFloat(o.trim()));return i.length===4?i[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const i=n[1].substring(6,8);return parseInt(i,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function su(e,t){const n=(()=>{if(e==="fade in")return fe.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return fe.slideInLeft;case"right":return fe.slideInRight;case"top":return fe.slideInTop;case"bottom":return fe.slideInBottom;default:return fe.slideInRight}return fe.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return fe.fadeIn;if(e==="slide in")switch(t){case"left":return fe.slideInLeft;case"right":return fe.slideInRight;case"top":return fe.slideInTop;case"bottom":return fe.slideInBottom;default:return fe.slideInRight}return fe.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return fe.fadeOut;if(e==="slide in")switch(t){case"left":return fe.slideOutLeft;case"right":return fe.slideOutRight;case"top":return fe.slideOutTop;case"bottom":return fe.slideOutBottom;default:return fe.slideOutRight}return fe.fadeOut})(),s=(()=>{if(e==="fade in")return fe.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return fe.slideOutLeft;case"right":return fe.slideOutRight;case"top":return fe.slideOutTop;case"bottom":return fe.slideOutBottom;default:return fe.slideOutRight}return fe.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:s}}const lu=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:s,isPreviewMode:a})=>{const[u,c]=l.useState(!1),{url:m}=e.thumbnailBlock.cover;return l.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:m,alt:"Cover",className:fe.heroImage,onClick:()=>c(!0)}),r.jsx(cu,{isOpen:u,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},cu=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:a,metadata:u})=>{var Ie;const{widthSettings:c,fontSettings:m,letterSpacing:p,textAlign:E,wordSpacing:b,fontSizeLineHeight:C,textAppearance:g,color:v}=i.imageCaption??{},[T,w]=l.useState(0),[$,S]=l.useState(0),[_,k]=l.useState(!1),[W,P]=l.useState(!1),[I,Y]=l.useState({}),y=l.useRef(null),M=l.useRef(null),N=l.useRef(null),V=l.useRef(!1),te=l.useRef(null),ue=l.useRef(null),K=l.useRef(null),H=l.useRef(null),Z=l.useRef(!1),G=l.useRef(null),[B,J]=l.useState(!1),{appear:ie,triggers:oe,slider:O,thumbnail:ce,controls:h,area:pe,caption:ve,layout:ye}=o.lightboxBlock,{appearClass:Re,backdropAppearClass:ee,backdropDisappearClass:ge,disappearClass:X}=su(ie.type,ie.direction),U=(u==null?void 0:u.itemId)??null;l.useEffect(()=>{const F=()=>{setTimeout(()=>{var A,D;(D=(A=y.current)==null?void 0:A.splide)==null||D.refresh()},16)},Q=()=>{S(A=>A+1)};return window.addEventListener("ArticleEditor.Layout:change",F),window.addEventListener("ArticleEditor.ComponentContent:change",Q),()=>{window.removeEventListener("ArticleEditor.Layout:change",F),window.removeEventListener("ArticleEditor.ComponentContent:change",Q)}},[]),l.useEffect(()=>{if(!e||!ce.isActive){J(!1);return}const F=G.current;if(!F)return;const Q=()=>{O.direction==="horiz"?J(F.scrollWidth>F.clientWidth):J(F.scrollHeight>F.clientHeight)};Q();const A=new ResizeObserver(Q);return A.observe(F),()=>A.disconnect()},[e,ce.isActive,n.length,I,O.direction]);const j=l.useCallback(()=>{const F=window.matchMedia("(max-width: 768px)").matches,Q=Ca(pe.color);F&&!a&&Q>.9&&(document.body.style.backgroundColor=""),k(!0),V.current=!0;const A=D=>{D.target===te.current&&D.animationName&&(te.current&&ue.current&&te.current.removeEventListener("animationend",ue.current),ue.current=null,V.current&&(V.current=!1,t()),k(!1))};te.current&&(ue.current=A,te.current.addEventListener("animationend",A))},[t,pe.color,a]),he=(F,Q,A)=>{var D,z;if(F){if(oe.type==="click"&&oe.switch==="image")oe.repeat==="close"&&T===n.length-1?j():(D=y.current)==null||D.go("+1");else if(oe.type==="click"&&oe.switch==="50/50"){const re=F.getBoundingClientRect(),de=Q-re.left,Te=A-re.top,We=re.width,Pe=re.height;let $e;O.direction==="horiz"?$e=de<We/2?"-1":"+1":$e=Te<Pe/2?"-1":"+1",(z=y.current)==null||z.go($e)}}},ne=F=>{if(Z.current){Z.current=!1;return}const Q=n[T],A=(Q==null?void 0:Q.image.objectFit)==="cover";let D,z;if("changedTouches"in F&&F.changedTouches.length>0)D=F.changedTouches[0].clientX,z=F.changedTouches[0].clientY;else if("clientX"in F)D=F.clientX,z=F.clientY;else return;let re;if(A&&N.current){const de=Sa(N.current);re=D>=de.left&&D<=de.right&&z>=de.top&&z<=de.bottom}else{const de=N.current?$a(N.current):null;if(!de){F.target===F.currentTarget&&j();return}re=D>=de.x&&D<=de.x+de.width&&z>=de.y&&z<=de.y+de.height}re?he(N.current,D,z):j()},Ce=F=>{const Q=F.target;(Q.classList.contains(fe.thumbsWrapper)||Q.classList.contains(fe.thumbsContainer))&&ne(F)};l.useEffect(()=>{if(!e)return;const F=Q=>{var A,D;if(Q.key==="Escape"){j();return}if(Q.key==="ArrowRight"){w(z=>(z+1)%Math.max(n.length,1)),(A=y.current)==null||A.go("+1");return}Q.key==="ArrowLeft"&&(w(z=>(z-1+Math.max(n.length,1))%Math.max(n.length,1)),(D=y.current)==null||D.go("-1"))};return window.addEventListener("keydown",F),()=>{window.removeEventListener("keydown",F)}},[e,j,n.length]),l.useEffect(()=>{if(e){if(w(0),S(Q=>Q+1),V.current=!1,k(!1),P(!1),Y({}),!U)return;const F=new CustomEvent("page-overlay",{detail:{itemId:U}});window.dispatchEvent(F)}return()=>{te.current&&ue.current&&(te.current.removeEventListener("animationend",ue.current),ue.current=null),P(!1)}},[e,U]),l.useEffect(()=>{M.current!==null&&M.current!==O.type&&S(F=>F+1),M.current=O.type},[O.type]),l.useEffect(()=>{if(!e)return;const F=document.body.style.overflow,Q=window.matchMedia("(max-width: 768px)").matches,A=Ca(pe.color);document.body.style.overflow="hidden",P(!1);const D=re=>{re.target===te.current&&!V.current&&re.animationName&&(Q&&!a&&A>.9&&(document.body.style.backgroundColor=pe.color),P(!0),te.current&&K.current&&te.current.removeEventListener("animationend",K.current),K.current=null)};te.current&&(K.current=D,te.current.addEventListener("animationend",D));const z=re=>{const de=re.target;de&&(de.closest(`.${fe.thumbsWrapper}`)||de.closest(`.${fe.thumbsContainer}`))||O.type!=="slide"&&re.preventDefault()};return document.addEventListener("touchmove",z,{passive:!1}),()=>{document.body.style.overflow=F,document.removeEventListener("touchmove",z),te.current&&K.current&&(te.current.removeEventListener("animationend",K.current),K.current=null),P(!1)}},[e,a,pe.color,O.type]),l.useEffect(()=>{if(!e)return;const F=Q=>{var D,z;if(V.current){Q.stopPropagation();return}if(Z.current){Z.current=!1;return}const A=Q.target;if(!(A&&(A.closest(`.${fe.thumbsContainer}`)||A.closest(`.${fe.thumbItem}`)||A.closest(`.${fe.arrow}`)||A.closest(`.${fe.closeButton}`)||A.closest(`.${fe.caption}`)))){if(O.type==="slide"&&oe.type==="drag"&&((z=(D=y.current)==null?void 0:D.splide)!=null&&z.root)){const re=y.current.splide.root;if(A&&(re.contains(A)||re===A))return}if(Q.touches.length===0&&Q.changedTouches.length>0){const re=n[T],de=(re==null?void 0:re.image.objectFit)==="cover",Te=Q.changedTouches[0];let We;if(de&&N.current){const Pe=Sa(N.current);We=Te.clientX>=Pe.left&&Te.clientX<=Pe.right&&Te.clientY>=Pe.top&&Te.clientY<=Pe.bottom}else{const Pe=N.current?$a(N.current):null;if(!Pe)return;We=Te.clientX>=Pe.x&&Te.clientX<=Pe.x+Pe.width&&Te.clientY>=Pe.y&&Te.clientY<=Pe.y+Pe.height}if(!We){Q.stopPropagation(),V.current=!0;const Pe=$e=>{$e.stopPropagation(),$e.preventDefault(),document.removeEventListener("click",Pe,!0)};document.addEventListener("click",Pe,!0),j()}}}};return document.addEventListener("touchend",F,{passive:!0}),()=>{document.removeEventListener("touchend",F)}},[e,j,T,n]);const we=(O.type==="scale"||O.type==="fade")&&O.direction==="vert"&&oe.type==="drag";l.useEffect(()=>{var $e,tt;if(!e||!we||!((tt=($e=y.current)==null?void 0:$e.splide)!=null&&tt.root))return;const F=y.current.splide.root,Q=30,A=(ae,ke)=>{if(H.current){const je=Math.abs(ae-H.current.x),ze=Math.abs(ke-H.current.y);(je>0||ze>0)&&(Z.current=!0)}},D=ae=>{H.current&&(ae.preventDefault(),A(ae.clientX,ae.clientY))},z=ae=>{H.current&&ae.touches.length>0&&(ae.preventDefault(),A(ae.touches[0].clientX,ae.touches[0].clientY))},re=(ae,ke)=>{if(!H.current||!y.current){H.current=null;return}const je=Math.abs(ae-H.current.x),ze=Math.abs(ke-H.current.y);ze>Q&&ze>je&&y.current.go(ke<H.current.y?"+1":"-1"),H.current=null},de=ae=>{H.current&&re(ae.clientX,ae.clientY),document.removeEventListener("pointerup",de),document.removeEventListener("pointercancel",de),document.removeEventListener("pointermove",D)},Te=ae=>{if(H.current){if(ae.changedTouches.length>0){const ke=ae.changedTouches[0];re(ke.clientX,ke.clientY)}document.removeEventListener("touchend",Te),document.removeEventListener("touchcancel",Te),document.removeEventListener("touchmove",z)}},We=ae=>{H.current={x:ae.clientX,y:ae.clientY},Z.current=!1,document.addEventListener("pointermove",D,{passive:!1}),document.addEventListener("pointerup",de),document.addEventListener("pointercancel",de)},Pe=ae=>{ae.touches.length>0&&(H.current={x:ae.touches[0].clientX,y:ae.touches[0].clientY},Z.current=!1,document.addEventListener("touchmove",z,{passive:!1}),document.addEventListener("touchend",Te),document.addEventListener("touchcancel",Te))};return F.addEventListener("pointerdown",We),F.addEventListener("touchstart",Pe),()=>{F.removeEventListener("pointerdown",We),F.removeEventListener("touchstart",Pe),document.removeEventListener("pointermove",D),document.removeEventListener("pointerup",de),document.removeEventListener("pointercancel",de),document.removeEventListener("touchmove",z),document.removeEventListener("touchend",Te),document.removeEventListener("touchcancel",Te),H.current=null,Z.current=!1}},[e,we,$]);const be={backgroundColor:pe.color,backdropFilter:`blur(${pe.blur}px)`,animationDuration:`${parseInt(ie.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:Ni.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:a?null:te,className:Xe(fe.background,_?ge:ee,{[fe.editor]:a},{[fe.hidden]:!e}),style:{...be,...W&&!a&&!_?{position:"absolute"}:{}}}),r.jsxs("div",{ref:a?te:null,className:Xe(fe.contentStyle,_?X:Re,{[fe.editor]:a},{[fe.hidden]:!e}),style:{animationDuration:`${parseInt(ie.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(Ur,{onMove:F=>w(F.index),ref:y,className:fe.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:oe.type==="drag"&&!we,perPage:1,width:"100%",height:"100%",type:O.type==="fade"||O.type==="scale"?"fade":"loop",padding:0,rewind:oe.repeat!=="close",start:0},style:{"--splide-speed":O.duration},children:n.map((F,Q)=>{const A=to(ye.position,ye.offset,a),D=`${L.scalingValue(ye.padding.top,a)} ${L.scalingValue(ye.padding.right,a)} ${L.scalingValue(ye.padding.bottom,a)} ${L.scalingValue(ye.padding.left,a)}`,z=O.type==="scale"?(()=>{const{transform:re,...de}=A;return{...de,position:"absolute",padding:D,boxSizing:"border-box","--position-transform":re||"none"}})():{...A,position:"absolute",padding:D,boxSizing:"border-box"};return r.jsx(Xr,{children:r.jsx("div",{className:fe.imgWrapper,onClick:ne,children:r.jsx("img",{ref:Q===T?N:null,className:Xe(fe.imageStyle,{[fe.contain]:F.image.objectFit==="contain",[fe.cover]:F.image.objectFit==="cover",[fe.scaleSlide]:O.type==="scale"}),src:F.image.url,alt:F.image.name??"",style:{...z,pointerEvents:F.image.objectFit==="contain"?"none":"auto"}})})},Q)})},$),h.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Xe(fe.arrow,{[fe.arrowVertical]:O.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:r.jsxs("button",{className:fe.arrowInner,style:{transform:`translate(${L.scalingValue(h.offset.x,a)}, ${L.scalingValue(h.offset.y*(O.direction==="horiz"?1:-1),a)}) scale(${h.scale}) rotate(${O.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var F;return(F=y.current)==null?void 0:F.go("-1")},"aria-label":"Previous",children:[h.arrowsImgUrl&&r.jsx(Qt,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:Xe(fe.arrowImg,fe.mirror)}),!h.arrowsImgUrl&&r.jsx(Ta,{color:h.color,className:Xe(fe.arrowIcon,fe.arrowImg,fe.mirror)})]})}),r.jsx("div",{className:Xe(fe.arrow,fe.nextArrow,{[fe.arrowVertical]:O.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:r.jsxs("button",{className:fe.arrowInner,style:{transform:`translate(${L.scalingValue(h.offset.x*(O.direction==="horiz"?-1:1),a)}, ${L.scalingValue(h.offset.y,a)}) scale(${h.scale}) rotate(${O.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var F;return(F=y.current)==null?void 0:F.go("+1")},"aria-label":"Next",children:[h.arrowsImgUrl&&r.jsx(Qt,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:fe.arrowImg}),!h.arrowsImgUrl&&r.jsx(Ta,{color:h.color,className:Xe(fe.arrowIcon,fe.arrowImg)})]})})]}),pe.closeIconUrl&&(()=>{const F=to(pe.closeIconAlign,pe.closeIconOffset,a),Q=`scale(${pe.closeIconScale})`,A=F.transform?`${F.transform} ${Q}`:Q;return r.jsx("button",{className:fe.closeButton,style:{...F,transform:A},onClick:j,"aria-label":"Close lightbox",children:r.jsx(Qt,{url:pe.closeIconUrl,fill:pe.closeIconColor??"#000000",hoverFill:pe.closeIconHover??"#cccccc"})})})(),ve&&ve.isActive&&i.imageCaption&&((Ie=n[T])==null?void 0:Ie.imageCaption)&&r.jsx("div",{className:fe.caption,style:{...to(ve.alignment,ve.offset,a),fontFamily:zo(m.fontFamily),fontWeight:m.fontWeight,fontStyle:m.fontStyle,width:c.sizing==="auto"?"max-content":L.scalingValue(c.width,a),letterSpacing:L.scalingValue(p,a),wordSpacing:L.scalingValue(b,a),textAlign:E,fontSize:L.scalingValue(C.fontSize,a),lineHeight:L.scalingValue(C.lineHeight,a),textTransform:g.textTransform??"none",textDecoration:g.textDecoration??"none",fontVariant:g.fontVariant??"normal",color:v},onClick:F=>F.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:fe.captionTextInner,style:{"--link-color":ve.linkColor,"--link-hover-color":ve.linkHoverColor},children:r.jsx(ui,{content:n[T].imageCaption})})}),ce.isActive&&(()=>{const[F,Q]=ce.position.split("-"),A=O.direction==="horiz"?`${F}-left`:ce.position,D=to(A,ce.offset,a),z=()=>{if(O.direction==="horiz"){if(Q==="left")return"flex-start";if(Q==="center")return"center";if(Q==="right")return"flex-end"}else{if(F==="top")return"flex-start";if(F==="middle")return"center";if(F==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:G,className:fe.thumbsWrapper,onClick:re=>Ce(re),style:{position:a?"absolute":"fixed",...D,...O.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:Xe(fe.thumbsContainer,{[fe.thumbsContainerVertical]:O.direction==="vert",[fe.thumbsAlignStart]:ce.align==="start",[fe.thumbsAlignCenter]:ce.align==="center",[fe.thumbsAlignEnd]:ce.align==="end"}),style:{gap:L.scalingValue(ce.grid.gap,a),justifyContent:B?"flex-start":z()},children:n.map((re,de)=>{const Te=de===T,We=I[de],$e=ce.grid.size*(Te?ce.activeState.scale:1),tt=()=>{if(ce.fit!=="fit")return{};if(!We)return O.direction==="horiz"?{height:L.scalingValue($e,a)}:{width:L.scalingValue($e,a)};const ae=We.width/We.height;if(O.direction==="horiz"){const ke=$e,je=ke*ae;return{width:L.scalingValue(je,a),height:L.scalingValue(ke,a)}}else{const ke=$e,je=ke/ae;return{width:L.scalingValue(ke,a),height:L.scalingValue(je,a)}}};return r.jsx("button",{className:fe.thumbItem,style:{...O.direction==="horiz"&&ce.fit!=="fit"?{height:L.scalingValue($e,a)}:{},...O.direction==="vert"&&ce.fit!=="fit"?{width:L.scalingValue($e,a)}:{},...ce.fit==="cover"?{width:L.scalingValue($e,a),height:L.scalingValue($e,a)}:{},...tt(),transition:Te?"all 0.25s ease-out":"none",opacity:Te?ce.activeState.opacity/100:ce.opacity/100,"--thumb-hover":ce.activeState.opacity/100},onClick:ae=>{var ke;ae.stopPropagation(),w(de),(ke=y.current)==null||ke.go(de)},onMouseEnter:()=>{var ae;ce.triggers==="hov"&&((ae=y.current)==null||ae.go(de))},children:r.jsx("img",{src:re.image.url,alt:re.image.name??"",onLoad:ae=>{const ke=ae.currentTarget;ke.naturalWidth&&ke.naturalHeight&&Y(je=>({...je,[de]:{width:ke.naturalWidth,height:ke.naturalHeight}}))},style:{objectFit:ce.fit==="cover"?"cover":"contain",...ce.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ce.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${re.image.name}-${de}`)})})})})()]})]}),document.getElementById(s))};function Ta({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const du={element:lu,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 no(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function uu(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 pu({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const a=!!n,u=i&&t||!t,{prefix:c}=
|
|
158
|
+
`}function pu({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const a=!!n,u=i&&t||!t,{prefix:c}=L.useScopedStyles(),{type:m="A",fieldsToShow:p=2,fields:E=[],buttonLabel:b,gap:C,fieldsGap:g,buttonCorners:v,buttonStroke:T,buttonPadding:w,isButtonFullWidth:$,inputCorners:S,inputStroke:_,inputPadding:k,inputColor:W,inputTextColor:P,inputBorderColor:I,placeholderColor:Y,buttonColor:y,buttonTextColor:M,buttonBorderColor:N,labelTextColor:V,successColor:te,errorColor:ue,fontFamily:K,inputFontSettings:H,inputFontSize:Z,inputLineHeight:G,inputLetterSpacing:B,inputWordSpacing:J,inputTextAppearance:ie,buttonFontSettings:oe,buttonFontSize:O,buttonLineHeight:ce,buttonLetterSpacing:h,buttonWordSpacing:pe,buttonTextAppearance:ve,labelFontSettings:ye,labelFontSize:Re,labelLineHeight:ee,labelLetterSpacing:ge,labelWordSpacing:X,labelTextAppearance:U,statusFontSettings:j,statusFontSize:he,statusLineHeight:ne,statusLetterSpacing:Ce,statusWordSpacing:we,statusTextAppearance:be,successMessage:Ie,errorMessage:F,stateOverrides:Q}=e,A=m==="B",D=E.slice(0,Math.min(p,E.length)),z={fontSettings:{fontFamily:K,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:Z??.01,lineHeight:G,letterSpacing:B??0,wordSpacing:J??0,textAppearance:ie,color:P},re=qt(kt(z,t)),de=L.scalingValue(_??0,t),Te=L.scalingValue((G??Z??.01)+((k==null?void 0:k.top)??0)+((k==null?void 0:k.bottom)??0)+(m==="C"?_??0:(_??0)*2),t),We={...re,borderStyle:"solid",borderRadius:m==="C"?0:L.scalingValue(S??0,t),...m==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:de,borderLeftWidth:0}:{borderWidth:de},paddingTop:L.scalingValue((k==null?void 0:k.top)??0,t),paddingRight:L.scalingValue((k==null?void 0:k.right)??0,t),paddingBottom:L.scalingValue((k==null?void 0:k.bottom)??0,t),paddingLeft:L.scalingValue((k==null?void 0:k.left)??0,t),height:Te,minHeight:Te},Pe={fontSettings:{fontFamily:K,fontWeight:(oe==null?void 0:oe.fontWeight)??400,fontStyle:(oe==null?void 0:oe.fontStyle)??"normal"},fontSize:O??.01,lineHeight:ce,letterSpacing:h??0,wordSpacing:pe??0,textAppearance:ve,color:M},$e=qt(kt(Pe,t)),tt=L.scalingValue(T??0,t),ae={fontSettings:{fontFamily:K,fontWeight:(ye==null?void 0:ye.fontWeight)??400,fontStyle:(ye==null?void 0:ye.fontStyle)??"normal"},fontSize:Re??.01,lineHeight:ee,letterSpacing:ge??0,wordSpacing:X??0,textAppearance:U,color:V},ke=kt(ae,t),je={fontSettings:{fontFamily:K,fontWeight:(j==null?void 0:j.fontWeight)??400,fontStyle:(j==null?void 0:j.fontStyle)??"normal"},fontSize:he??.01,lineHeight:ne,letterSpacing:Ce??0,wordSpacing:we??0,textAppearance:be,color:te},ze=qt(kt(je,t)),lt=L.buildColorVars(c,{inputColor:W,inputTextColor:P,inputBorderColor:I,placeholderColor:Y!=null&&Y.trim()?Y:"#cccccc",buttonColor:y,buttonTextColor:M,buttonBorderColor:N,labelTextColor:V,successColor:te,errorColor:ue},mu,gu,Q),[ht,Pt]=l.useState(()=>Object.fromEntries(D.map(Oe=>[Oe.name,""]))),[xt,wt]=l.useState("idle"),[Ht,Lt]=l.useState(null),Ge=s==="success"?"success":s==="error"?"error":xt,Ae=s==="error"?F:Ht,Be=s==="filled",Ye=l.useMemo(()=>{if(!Be)return ht;let Oe=null;for(const mt of D)(ht[mt.name]??"").trim().length>0||(Oe=Oe??{...ht},Oe[mt.name]="Filled");return Oe??ht},[ht,Be,D]),He=Ge==="error"?L.getFormFieldValidationError(D,Ye):null,It=`${s&&s!=="default"?`${c}-state-${s}`:""}`.trim(),Je=o==null?void 0:o.submitUrl,Mt=(Oe,mt)=>{Pt(it=>({...it,[Oe]:mt}))},Ot=async Oe=>{if(Oe.preventDefault(),!u)return;const mt=Object.fromEntries(D.map(Ue=>{var rt;return[Ue.name,((rt=ht[Ue.name])==null?void 0:rt.trim())??""]}).filter(([,Ue])=>Ue));if(!Je){wt("error"),Lt("No integrations were found for this form.");return}if(Object.keys(mt).length===0)return;const it=L.getFormFieldValidationError(D,ht);if(it){wt("error"),Lt(it);return}wt("submitting"),Lt(null);try{const Ue=await fetch(Je,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(mt)});if(!Ue.ok){const rt=await Ue.text();throw new Error(rt||`Request failed: ${Ue.status}`)}wt("success"),Pt(Object.fromEntries(D.map(rt=>[rt.name,""])))}catch(Ue){wt("error"),Lt(Ue instanceof Error?Ue.message:"Something went wrong")}};return r.jsxs("div",{className:`${c}-wrapper ${c}-type-${m} ${It}`.trim(),style:lt,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:uu(c)}}),r.jsxs("form",{onSubmit:Ot,className:`${c}-form`,children:[r.jsx("div",{className:`${c}-fields`,children:D.map((Oe,mt)=>r.jsxs(l.Fragment,{children:[mt>0&&r.jsx("div",{"data-controls":a?"fieldsGap":void 0,className:a?`${c}-control`:void 0,style:{height:L.scalingValue(g??0,t)}}),r.jsxs("div",{className:`${c}-field-group${A?` ${c}-labeled`:""}`,children:[A&&r.jsx("span",{className:`${c}-field-label`,style:ke?{...ke,lineHeight:ke.fontSize}:void 0,children:Oe.label||Oe.name}),Oe.type==="textarea"?r.jsx("textarea",{name:Oe.name,autoComplete:"off",value:Ye[Oe.name]??"",onChange:it=>Mt(Oe.name,it.target.value),placeholder:Oe.placeholder,className:`${c}-input`,style:We,rows:1,"data-filled":Be||(Ye[Oe.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:Oe.type==="phone"?"tel":Oe.type==="email"?"email":"text",name:Oe.name,autoComplete:"off",value:Ye[Oe.name]??"",onChange:it=>Mt(Oe.name,it.target.value),placeholder:Oe.placeholder,required:Oe.isRequired??Oe.type==="email",className:`${c}-input`,style:We,"data-filled":Be||(Ye[Oe.name]??"").trim().length>0})]})]},mt))}),r.jsx("div",{"data-controls":a?"gap":void 0,className:a?`${c}-control`:void 0,style:{height:L.scalingValue(C??0,t)}}),r.jsx("div",{className:`${c}-overlay-anchor`,children:r.jsx("button",{type:u?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:L.scalingValue(v??0,t),borderWidth:tt,paddingTop:L.scalingValue((w==null?void 0:w.top)??0,t),paddingRight:L.scalingValue((w==null?void 0:w.right)??0,t),paddingBottom:L.scalingValue((w==null?void 0:w.bottom)??0,t),paddingLeft:L.scalingValue((w==null?void 0:w.left)??0,t),pointerEvents:u?"auto":void 0,...$e,...$?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${c}-overlay-anchor`,style:$?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:xt==="submitting"?"...":b})})})]}),Ge==="success"&&r.jsx("p",{className:`${c}-success`,style:{...ze},children:Ie}),Ge==="error"&&r.jsx("p",{className:`${c}-error`,style:{...ze},role:"alert",children:He??Ae??F})]})}const mu={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"},gu=["hover","focus","filled","success","error"],hu=`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';
|
|
@@ -980,7 +980,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
|
980
980
|
font-size: ${oo(14)};
|
|
981
981
|
color: var(--${e}-error-error-color, var(--${e}-error-color));
|
|
982
982
|
}
|
|
983
|
-
`}const wu=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=
|
|
983
|
+
`}const wu=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=L.useScopedStyles(),a=n&&t||!t,{fields:u=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:m,fieldsToShow:p=1,fontFamily:E,inputFontSettings:b,inputFontSize:C,inputLineHeight:g,inputLetterSpacing:v,inputWordSpacing:T,inputTextAppearance:w,buttonFontSettings:$,buttonFontSize:S,buttonLineHeight:_,buttonLetterSpacing:k,buttonWordSpacing:W,buttonTextAppearance:P,statusFontSettings:I,statusFontSize:Y,statusLineHeight:y,statusLetterSpacing:M,statusWordSpacing:N,statusTextAppearance:V,iconMaxWidth:te,minHeight:ue,corners:K,stroke:H,stateOverrides:Z,inputPadding:G,buttonPadding:B,successMessage:J="Thanks for subscribing!",errorMessage:ie="Please, fill all required fields."}=e,oe=u.slice(0,Math.min(p,u.length)),[O,ce]=l.useState(()=>Object.fromEntries(oe.map(ae=>[ae.name,""]))),[h,pe]=l.useState("idle"),[ve,ye]=l.useState(null),Re=o==="success"?"success":o==="error"?"error":h,ee=o==="error"?ie:ve,ge=o==="filled",X=l.useMemo(()=>{if(!ge)return O;let ae=null;for(const ke of oe)(O[ke.name]??"").trim().length>0||(ae=ae??{...O},ae[ke.name]="Filled");return ae??O},[ge,O,oe]),U=Re==="error"?L.getFormFieldValidationError(oe,X):null,j=o&&o!=="default"?`${s}-state-${o}`:"",he=oe.some(ae=>(X[ae.name]??"").trim().length>0),ne=j!==`${s}-state-filled`&&he?`${s}-state-filled`:"",Ce=`${j} ${ne}`.trim(),we=i==null?void 0:i.submitUrl,be=m??"",Ie=(c==null?void 0:c.icon)??"",F=(c==null?void 0:c.mode)==="On",Q=be||"Submit",A={fontSettings:{fontFamily:E,fontWeight:(b==null?void 0:b.fontWeight)??400,fontStyle:(b==null?void 0:b.fontStyle)??"normal"},fontSize:C??.01,lineHeight:g,letterSpacing:v??0,wordSpacing:T??0,textAppearance:w,color:e.inputTextColor??"#111111"},D={fontSettings:{fontFamily:E,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:S??.01,lineHeight:_,letterSpacing:k??0,wordSpacing:W??0,textAppearance:P,color:e.buttonTextColor??"#ffffff"},z={fontSettings:{fontFamily:E,fontWeight:(I==null?void 0:I.fontWeight)??400,fontStyle:(I==null?void 0:I.fontStyle)??"normal"},fontSize:Y??.01,lineHeight:y,letterSpacing:M??0,wordSpacing:N??0,textAppearance:V,color:e.successColor??"#22c55e"},re=qt(kt(A,t)),de=qt(kt(D,t)),Te=qt(kt(z,t)),We=L.buildColorVars(s,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(A==null?void 0:A.color)??"#111111",buttonTextColor:e.buttonTextColor??(D==null?void 0:D.color)??"#ffffff"},$u,Su,Z),Pe={borderRadius:L.scalingValue(K,t),borderWidth:L.scalingValue(H,t),borderStyle:"solid"},$e={borderLeftWidth:L.scalingValue(H,t)},tt=async ae=>{if(ae.preventDefault(),!a)return;const ke=Object.fromEntries(oe.map(ze=>{var lt;return[ze.name,((lt=O[ze.name])==null?void 0:lt.trim())??""]}).filter(([,ze])=>ze));if(!we){pe("error"),ye("No integrations were found for this form.");return}if(Object.keys(ke).length===0)return;const je=L.getFormFieldValidationError(oe,O);if(je){pe("error"),ye(je);return}pe("submitting"),ye(null);try{const ze=await fetch(we,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ke)});if(!ze.ok){const lt=await ze.text();throw new Error(lt||`Request failed: ${ze.status}`)}pe("success"),ce(Object.fromEntries(oe.map(lt=>[lt.name,""])))}catch(ze){pe("error"),ye(ze instanceof Error?ze.message:"Something went wrong")}};return r.jsxs("div",{className:`${s}-wrapper ${Ce}`.trim(),style:We,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:xu(s)}}),r.jsxs("form",{onSubmit:tt,className:`${s}-form`,style:{...Pe,height:L.scalingValue(ue,t),minHeight:L.scalingValue(ue,t)},children:[r.jsx("div",{className:`${s}-inputWrap ${s}-overlayAnchor`,style:{flex:1,minWidth:0},children:oe.map(ae=>r.jsx("input",{type:ae.type==="email"?"email":ae.type==="phone"?"tel":"text",name:ae.name,autoComplete:"off",value:X[ae.name]??"",onChange:ke=>ce(je=>({...je,[ae.name]:ke.target.value})),placeholder:ae.placeholder,required:ae.isRequired??ae.type==="email",className:`${s}-input`,style:{...re,paddingRight:L.scalingValue(G.right,t),paddingLeft:L.scalingValue(G.left,t),paddingTop:L.scalingValue(G.top,t),paddingBottom:L.scalingValue(G.bottom,t)}},ae.name))}),r.jsx("div",{className:`${s}-overlayAnchor`,children:r.jsx("button",{type:a?"submit":"button",className:`${s}-submitBtn`,"aria-label":Q,style:{...de,...$e,paddingRight:L.scalingValue(B.right,t),paddingLeft:L.scalingValue(B.left,t),paddingTop:L.scalingValue(B.top,t),paddingBottom:L.scalingValue(B.bottom,t),pointerEvents:a?"auto":void 0},children:h==="submitting"?"...":F?Ie&&r.jsx(Qt,{url:Ie,className:`${s}-submitBtnIcon`,style:{maxWidth:L.scalingValue(te??0,t)},fill:`var(--${s}-button-text-color)`,hoverFill:`var(--${s}-button-text-color)`}):be})})]}),Re==="success"&&r.jsx("p",{className:`${s}-success`,style:{...Te},children:J}),Re==="error"&&r.jsx("p",{className:`${s}-error`,style:{...Te},role:"alert",children:U??ee??ie})]})},$u={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"},Su=["hover","focus","filled","success","error"],Cu=`import React, { useMemo, useState } from 'react';
|
|
984
984
|
import { CommonComponentProps } from '../props';
|
|
985
985
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
|
|
986
986
|
import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
|
|
@@ -1557,7 +1557,7 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
|
|
|
1557
1557
|
};
|
|
1558
1558
|
|
|
1559
1559
|
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
1560
|
-
`,Tu="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),Lu=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],ir={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Eu=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Iu={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...ir.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...ir.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...ir.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:Lu,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Tu},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["fieldsToShow","minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Eu],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Pu={element:wu,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400,height:60},t:{width:453,height:60},m:{width:340,height:60}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:Iu,sourceCode:Cu};function Ru(e){return`
|
|
1560
|
+
`,Tu="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),Lu=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],ir={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Eu=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Pu={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...ir.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...ir.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...ir.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:Lu,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Tu},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["fieldsToShow","minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Eu],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Iu={element:wu,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400,height:60},t:{width:453,height:60},m:{width:340,height:60}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:Pu,sourceCode:Cu};function Au(e){return`
|
|
1561
1561
|
.${e}-marquee-wrapper {
|
|
1562
1562
|
overflow: hidden;
|
|
1563
1563
|
width: 100%;
|
|
@@ -1689,7 +1689,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
|
1689
1689
|
.${e}-image-hover-grayscale:hover img {
|
|
1690
1690
|
filter: grayscale(100%);
|
|
1691
1691
|
}
|
|
1692
|
-
`}const
|
|
1692
|
+
`}const Ru=30,ku=20,or=3,Mu=3,_u=(e,t)=>Array.from({length:t},()=>e).flat(),Wu=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Fu=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Wu(i,e))},Nu=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,imageHoverClass:s,isFirstSet:a,scaled:u,onFirstSetImageDone:c})=>{var P,I,Y;const m=l.useRef(null);l.useLayoutEffect(()=>{if(!a)return;const y=m.current;y!=null&&y.complete&&(c==null||c())},[a,(P=e.image)==null?void 0:P.url,c]);const p=n.display==="cover",E=n.ratioValue??"1:1",b=n.reversed??!1,[C,g]=E.split(":").map(Number),w=(b?g:C)/(b?C:g);let $=i,S=$/w;S>o&&(S=o,$=S*w);const _=u($),k=u(S),W=((I=e.image)==null?void 0:I.url)&&r.jsx("img",{ref:m,src:e.image.url,alt:((Y=e.image)==null?void 0:Y.name)??"",style:p?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:u(i),objectFit:"contain"},onLoad:a?c:void 0,onError:a?c:void 0});return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...p?{width:_}:{width:"fit-content",maxWidth:u(i),minWidth:0}},children:r.jsx("div",{className:s,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...p?{width:_,height:k,overflow:"hidden"}:{width:"fit-content",maxWidth:u(i),height:u(o)}},children:W&&e.link?r.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Xe(`${t}-marquee-link`,!p&&`${t}-marquee-link-contain`),children:W}):W})})},Hu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=L.useScopedStyles(),a=l.useMemo(()=>Au(s),[s]),{speed:u,direction:c,pauseOnHover:m,gap:p,imageMaxWidth:E,imageMaxHeight:b,imageFit:C,hoverEffect:g}=e,v=!!o,T=!n||!!i,w=T&&g!=="off"&&g!=="randomize"?`${s}-image-hover-${g}`:void 0,$=n?!!i:!0,_=((t==null?void 0:t.length)??0)>0&&($||!!n),k=Math.max(0,u)*Ru,W=U=>L.scalingValue(U,n??!1),P=l.useRef(null),I=l.useRef(null),Y=l.useRef(null),[y,M]=l.useState(0),[N,V]=l.useState(0),te=$&&m==="on",[ue,K]=l.useState(!1),[H,Z]=l.useState({}),G=l.useRef(H);G.current=H;const B=l.useRef(null),J=l.useRef(0),ie=l.useRef(null),oe=l.useMemo(()=>(t??[]).map(U=>{var j;return((j=U.image)==null?void 0:j.url)??""}).join("\0"),[t]),[O,ce]=l.useState(or),h=l.useMemo(()=>{const U=t??[];return!$||U.length===0?U:_u(U,O)},[t,$,O]),pe=l.useMemo(()=>h.filter(U=>{var j;return!!((j=U.image)!=null&&j.url)}).length,[h]),ve=_?Mu:1;l.useLayoutEffect(()=>{J.current=0,Z({}),B.current=null,ce(or),M(0)},[oe]),l.useEffect(()=>{if(!T||g!=="randomize")return;const U=P.current;if(!U)return;const j=we=>{Z(be=>{let Ie=null;for(const F of we)F in be&&(Fu(U,F)||(Ie||(Ie={...be}),delete Ie[F]));return Ie??be})},he=new IntersectionObserver(we=>{const be=new Set;for(const Ie of we){const F=Ie.target.dataset.marqueeItemIndex,Q=F!==void 0?Number(F):NaN;Number.isNaN(Q)||be.add(Q)}be.size>0&&j(be)},{root:U,threshold:0});Object.keys(H).forEach(we=>{const be=Number(we);U.querySelectorAll(`[data-marquee-item-index="${be}"]`).forEach(Ie=>he.observe(Ie))});let ne=0;const Ce=()=>{const we=Object.keys(G.current);we.length!==0&&(j(we.map(Number)),ne=requestAnimationFrame(Ce))};return Object.keys(G.current).length>0&&(ne=requestAnimationFrame(Ce)),()=>{cancelAnimationFrame(ne),he.disconnect()}},[g,H,T]),l.useLayoutEffect(()=>{if(!_)return;const U=P.current,j=Y.current;if(!U||!j)return;let he=0;const ne=()=>{const be=U.getBoundingClientRect().width,Ie=j.getBoundingClientRect().width,F=B.current,Q=typeof F=="number"&&Math.abs(F-Ie)<=.25;if(B.current=Ie,$&&Ie>0&&O>0){const A=Ie/O;if(A>0&&be>0){const D=Math.max(or,Math.ceil(be/A)+1);if(D!==O){ce(D);return}}}if(Ie>0&&y<=0){M(Ie);return}Q&&Ie!==y?M(Ie):!Q&&y<=0&&(cancelAnimationFrame(he),he=requestAnimationFrame(ne))},Ce=()=>{cancelAnimationFrame(he),he=requestAnimationFrame(ne)};ie.current=Ce,Ce();const we=new ResizeObserver(Ce);return we.observe(U),we.observe(j),()=>{ie.current=null,cancelAnimationFrame(he),we.disconnect()}},[$,_,y,oe,O]),l.useLayoutEffect(()=>{const U=I.current;if(!_||!U)return;const j=y>0?y:0,he=j>0&&k>0?j/k*1e3:0,ne=`${Math.max(0,he)/1e3}s`;U.style.setProperty("--marquee-distance",`${j}px`),U.style.setProperty("--marquee-duration",ne)},[$,_,k,y]),l.useLayoutEffect(()=>{if(!_){V(0);return}if(y<=0){V(0);return}const U=I.current;if(!U)return;const j=()=>{const ne=U.getBoundingClientRect().height;V(ne>0?ne:0)};j();const he=new ResizeObserver(j);return he.observe(U),()=>he.disconnect()},[_,ve,h,n,p,E,b,y,C,H]);const ye=()=>{te&&K(!0)},Re=()=>{te&&K(!1)},ee=l.useCallback(()=>{var U;J.current=Math.min(pe,J.current+1),(U=ie.current)==null||U.call(ie)},[pe]),ge=l.useCallback((U,j)=>{Z(he=>{const ne=he[U]??j,Ce=(t??[]).filter(be=>be!==ne);if(Ce.length===0)return he;const we=Ce[Math.floor(Math.random()*Ce.length)];return{...he,[U]:we}})},[t]),X=(U,j,he,ne)=>{const Ce=T&&g==="randomize"&&C.display==="cover"?H[he]??U:U,we=`max(${W(p)}, ${ku}px)`,be=`calc(-0.5 * (${we} + ${W(p)}))`;return r.jsxs("div",{className:`${s}-marquee-card`,"data-marquee-item-index":he,onMouseEnter:T&&g==="randomize"&&C.display==="cover"?()=>ge(he,U):void 0,children:[r.jsx(Nu,{item:Ce,prefix:s,imageFit:C,imageMaxWidth:E,imageMaxHeight:b,imageHoverClass:w,isEditor:n,isFirstSet:ne,scaled:W,onFirstSetImageDone:ee}),v&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${s}-gap-control`,style:{position:"absolute",top:0,right:be,width:we,height:"100%"}})]},`${j}-${he}`)};if(_){const U=$?te&&ue?"paused":"running":"paused";return r.jsxs("div",{ref:P,className:Xe(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Marquee",style:y>0&&N>0?{height:N}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:a}}),r.jsx("div",{ref:I,className:`${s}-marquee-track`,"data-direction":c,onMouseEnter:ye,onMouseLeave:Re,style:{"--marquee-play-state":U},children:Array.from({length:ve},(j,he)=>r.jsx("div",{ref:he===0?Y:void 0,className:Xe(`${s}-marquee-row`,`${s}-marquee-set`),style:{gap:W(p),paddingRight:W(p)},"aria-hidden":he>0,children:h.map((ne,Ce)=>X(ne,he,Ce,he===0))},`set-${he}`))},"marquee-track")]})}return r.jsxs("div",{ref:P,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:a}}),r.jsx("div",{className:Xe(`${s}-marquee-row`,`${s}-marquee-static`),style:{gap:W(p),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((U,j)=>X(U,0,j))},"marquee-static")]})},Ou=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
1693
1693
|
import cn from 'classnames';
|
|
1694
1694
|
import { CommonComponentProps } from '../props';
|
|
1695
1695
|
import { scalingValue } from '../utils/scalingValue';
|
|
@@ -2320,7 +2320,7 @@ type MarqueeProps = {
|
|
|
2320
2320
|
isPreviewMode?: boolean;
|
|
2321
2321
|
isEditMode?: boolean;
|
|
2322
2322
|
} & CommonComponentProps;
|
|
2323
|
-
`,Bu={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"}}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278}},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"]},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",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:""},link:""}]}},ju={element:Hu,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%"
|
|
2323
|
+
`,Bu={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"}}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278}},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"]},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",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:""},link:""}]}},ju={element:Hu,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%"},m:{width:390}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:Bu,sourceCode:Ou,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function La(e){return`
|
|
2324
2324
|
.${e}-marquee-wrapper {
|
|
2325
2325
|
overflow: hidden;
|
|
2326
2326
|
width: 100%;
|
|
@@ -2407,7 +2407,7 @@ type MarqueeProps = {
|
|
|
2407
2407
|
pointer-events: auto;
|
|
2408
2408
|
z-index: 10;
|
|
2409
2409
|
}
|
|
2410
|
-
`}const zu=30,Ea=2,Vu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=
|
|
2410
|
+
`}const zu=30,Ea=2,Vu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=L.useScopedStyles(),{align:a,speed:u,direction:c,pauseOnHover:m,gap:p,cardWidth:E,corners:b,stroke:C,strokeColor:g,bgColor:v,padding:T,logoMarginTop:w,logoWidth:$,logoHeight:S,captionMarginTop:_}=e,k=!!o,W=((t==null?void 0:t.length)??0)>0,P=u>0&&(!n||i),I=W&&(P||n),Y=Math.max(0,u)*zu,y=A=>L.scalingValue(A,n??!1),M=l.useRef(null),N=l.useRef(null),V=l.useRef(null),[te,ue]=l.useState(0),[K,H]=l.useState(0),[Z,G]=l.useState(0),B=P&&m==="on",[J,ie]=l.useState(!1),oe=l.useRef(null),[O,ce]=l.useState(0),[h,pe]=l.useState(0),ve=l.useRef(null),ye=A=>{var z,re,de,Te,We;return{fontSettings:{fontFamily:(e==null?void 0:e[`${A}FontFamily`])??"Arial",fontWeight:((z=e==null?void 0:e[`${A}FontSettings`])==null?void 0:z.fontWeight)??400,fontStyle:((re=e==null?void 0:e[`${A}FontSettings`])==null?void 0:re.fontStyle)??"normal"},textAppearance:{textTransform:((de=e==null?void 0:e[`${A}TextAppearance`])==null?void 0:de.textTransform)??"none",textDecoration:((Te=e==null?void 0:e[`${A}TextAppearance`])==null?void 0:Te.textDecoration)??"none",fontVariant:((We=e==null?void 0:e[`${A}TextAppearance`])==null?void 0:We.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${A}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${A}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${A}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${A}LineHeight`])??.01,color:(e==null?void 0:e[`${A}Color`])??"#000000"}},Re=ye("text"),ee=ye("caption"),ge=l.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(A=>{var D,z;return(((D=A.text)==null?void 0:D.length)??0)>0||(((z=A.caption)==null?void 0:z.length)??0)>0}),[t]),X=l.useMemo(()=>!I||(t==null?void 0:t.length)===0?1:K<=0||te<=0?Ea:Math.max(Ea,Math.ceil(te/K)+1),[I,t==null?void 0:t.length,K,te]);l.useLayoutEffect(()=>{if(!I)return;const A=M.current,D=V.current;if(!A||!D)return;let z=0;const re=()=>{const We=A.getBoundingClientRect().width,Pe=D.getBoundingClientRect().width,$e=ve.current,tt=typeof $e=="number"&&Math.abs($e-Pe)<=.25;if(ve.current=Pe,ue(We),typeof Pe=="number"&&Pe>0&&K<=0){H(Pe);return}tt&&Pe!==K?H(Pe):!tt&&K<=0&&(cancelAnimationFrame(z),z=requestAnimationFrame(re))},de=()=>{cancelAnimationFrame(z),z=requestAnimationFrame(re)};de();const Te=new ResizeObserver(de);return Te.observe(A),Te.observe(D),()=>{cancelAnimationFrame(z),Te.disconnect()}},[P,I,K]),l.useLayoutEffect(()=>{const A=N.current;if(!I||!A)return;const D=K>0?K:0,z=D>0&&Y>0?D/Y*1e3:0,re=`${Math.max(0,z)/1e3}s`;A.style.setProperty("--marquee-distance",`${D}px`),A.style.setProperty("--marquee-duration",re)},[P,I,Y,K]),l.useLayoutEffect(()=>{if(!I){G(0);return}const A=V.current,D=N.current;if(!A||!D)return;const z=()=>{let de=0;for(let Te=0;Te<A.children.length;Te++){const Pe=A.children[Te].firstElementChild;Pe&&(de=Math.max(de,Pe.offsetHeight))}de<=0&&(de=D.offsetHeight),G(de>0?de:0)};z();const re=new ResizeObserver(z);return re.observe(A),re.observe(D),()=>{re.disconnect()}},[I,X,t,n,p,E,T,C,b,$,S,O,h]);const U=()=>{B&&ie(!0)},j=()=>{B&&ie(!1)},he=l.useMemo(()=>{switch(a){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[a]),ne=l.useMemo(()=>{switch(a){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[a]),Ce=l.useCallback((A,D,z,re)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:he,width:"100%"},children:[r.jsx("div",{"data-controls":k?re==null?void 0:re.controlsName:void 0,"data-controls-axis":k?"y":void 0,className:k?`${s}-control`:void 0,style:{height:y((re==null?void 0:re.marginTop)??0)}}),r.jsx("div",{...re!=null&&re.dataMeasureKind?{"data-testimonial-measure":re.dataMeasureKind}:{},style:{...kt(A,n),textAlign:ne,pointerEvents:"auto",...typeof(re==null?void 0:re.minHeightPx)=="number"&&re.minHeightPx>0?{minHeight:re.minHeightPx}:{}},children:r.jsx(ui,{content:D})})]},z),[he,ne,n,k,s,y]),we=l.useCallback((A,D,z)=>{var re,de,Te;return r.jsxs("div",{style:{padding:`${y(T.top)} ${y(T.right)} ${y(T.bottom)} ${y(T.left)}`,width:y(E+C*2),height:"100%",borderRadius:y(b),border:`${y(C)} solid ${g}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${s}-cover`,style:{background:v}}),r.jsxs("div",{className:`${s}-elements-overlay`,style:{alignItems:he,textAlign:ne},children:[A.text&&Ce(Re,A.text,"text",z!=null&&z.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(z==null?void 0:z.textMinHeightPx)=="number"&&z.textMinHeightPx>0?{minHeightPx:z.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:he,width:"100%"},children:[r.jsx("div",{"data-controls":k&&!(z!=null&&z.dataMeasureAttrs)?"logoMarginTop":void 0,className:k&&!(z!=null&&z.dataMeasureAttrs)?`${s}-control`:void 0,style:{height:y(w)}}),r.jsx("div",{style:{width:y($),height:y(S)},children:((re=A.logo)==null?void 0:re.url)&&r.jsx("img",{src:A.logo.url,alt:((de=A.logo)==null?void 0:de.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Te=A.logo)==null?void 0:Te.objectFit)||"contain"}})})]}),A.caption&&Ce(ee,A.caption,"caption",{...z!=null&&z.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:_,...z!=null&&z.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(z==null?void 0:z.captionMinHeightPx)=="number"&&z.captionMinHeightPx>0?{minHeightPx:z.captionMinHeightPx}:{}})]})]},D)},[v,_,ee,E,b,S,w,$,he,ne,T.bottom,T.left,T.right,T.top,Ce,C,g,Re,n,k,s]),be=l.useCallback(A=>{ce(A.maxTextPx),pe(A.maxCaptionPx)},[]);l.useLayoutEffect(()=>{if(!ge){be({maxTextPx:0,maxCaptionPx:0});return}const A=oe.current;if(!A)return;const D=()=>{L.readTestimonialTextMeasure(A,be)};D();const z=new ResizeObserver(D);return z.observe(A),()=>{z.disconnect()}},[ge,be,t,we]);const Ie=ge?{textMinHeightPx:O,captionMinHeightPx:h}:void 0,F=ge?r.jsx("div",{ref:oe,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((A,D)=>we(A,`measure-${D}`,{dataMeasureAttrs:!0}))}):null,Q=(A,D)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[we(A,`card-${D}`,Ie),k&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${y(p)})`,width:y(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},D);if(I){const A=P?B&&J?"paused":"running":"paused";return r.jsxs("div",{ref:M,className:Xe(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...Z>0?{height:Z}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:La(s)}}),F,r.jsx("div",{ref:N,className:`${s}-marquee-track`,"data-direction":c,onMouseEnter:U,onMouseLeave:j,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px","--marquee-play-state":A},children:Array.from({length:X},(D,z)=>r.jsx("div",{ref:z===0?V:void 0,className:`${s}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:y(p),paddingRight:y(p)},"aria-hidden":z>0,children:t==null?void 0:t.map((re,de)=>Q(re,`${z}-${de}`))},`set-${z}`))})]})}return r.jsxs("div",{className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:La(s)}}),F,r.jsx("div",{style:{gap:y(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((A,D)=>Q(A,D))})]})},Du=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
2411
2411
|
import cn from 'classnames';
|
|
2412
2412
|
import { CommonComponentProps } from '../props';
|
|
2413
2413
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
|
|
@@ -3022,7 +3022,7 @@ type TestimonialsSettings = {
|
|
|
3022
3022
|
logoHeight: number;
|
|
3023
3023
|
captionMarginTop: number;
|
|
3024
3024
|
};
|
|
3025
|
-
`,
|
|
3025
|
+
`,Pa={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},qu={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Fill Text",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Fill Caption",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Pa.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Pa.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Ku={element:Vu,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Grid.mp4"},defaultSize:{d:{width:"100%",height:320}},schema:qu,sourceCode:Du,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function Gu(e){return`
|
|
3026
3026
|
.${e}-container {
|
|
3027
3027
|
position: relative;
|
|
3028
3028
|
overflow-x: clip;
|
|
@@ -3146,7 +3146,7 @@ type TestimonialsSettings = {
|
|
|
3146
3146
|
width: 100%;
|
|
3147
3147
|
height: 100%;
|
|
3148
3148
|
}
|
|
3149
|
-
`}const Uu=3e3,Xu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=
|
|
3149
|
+
`}const Uu=3e3,Xu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=L.useScopedStyles(),a=t||[],{speed:u,align:c,width:m,imageMarginTop:p,textMarginTop:E,captionMarginTop:b,imageWidth:C,imageHeight:g,controlsWidth:v,controlsColor:T,controlsHoverColor:w}=e,$=u>0&&(!n||!!i),[S,_]=l.useState(0),[k,W]=l.useState(null),[P,I]=l.useState(!1),Y=l.useRef(null),y=l.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),M=l.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);l.useEffect(()=>{_(0),W(null),I(!1)},[a.length]);const N=a[S],V=k===null?null:a[k],te=ee=>{var X,U,j,he,ne;return{fontSettings:{fontFamily:(e==null?void 0:e[`${ee}FontFamily`])??"Arial",fontWeight:((X=e==null?void 0:e[`${ee}FontSettings`])==null?void 0:X.fontWeight)??400,fontStyle:((U=e==null?void 0:e[`${ee}FontSettings`])==null?void 0:U.fontStyle)??"normal"},textAppearance:{textTransform:((j=e==null?void 0:e[`${ee}TextAppearance`])==null?void 0:j.textTransform)??"none",textDecoration:((he=e==null?void 0:e[`${ee}TextAppearance`])==null?void 0:he.textDecoration)??"none",fontVariant:((ne=e==null?void 0:e[`${ee}TextAppearance`])==null?void 0:ne.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${ee}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${ee}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${ee}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${ee}WordSpacing`])??0,color:(e==null?void 0:e[`${ee}Color`])??"#000000"}},ue=te("text"),K=te("caption"),H=a.length>1&&a.some(ee=>{var ge,X;return(((ge=ee.text)==null?void 0:ge.length)??0)>0||(((X=ee.caption)==null?void 0:X.length)??0)>0}),Z=l.useRef(null),[G,B]=l.useState(0),[J,ie]=l.useState(0),oe=e.controls??{mode:"Off",icon:null},O=a.length>1,ce=l.useCallback((ee,ge)=>!O||ge===ee?ee:(Y.current&&window.clearTimeout(Y.current),W(ee),I(!0),Y.current=window.setTimeout(()=>{W(null),I(!1),Y.current=null},300),ge),[O]),h=l.useCallback(()=>{O&&_(ee=>ce(ee,(ee-1+a.length)%a.length))},[O,ce,a.length]),pe=l.useCallback(()=>{O&&_(ee=>ce(ee,(ee+1)%a.length))},[O,ce,a.length]);l.useEffect(()=>{if(!$||!O)return;const ee=Math.max(300,Uu/u),ge=window.setInterval(()=>{_(X=>ce(X,(X+1)%a.length))},ee);return()=>{window.clearInterval(ge)}},[$,O,ce,a.length,u]),l.useEffect(()=>()=>{Y.current&&window.clearTimeout(Y.current)},[]);const ve=(ee,ge)=>{var ne,Ce,we,be;const X=ge==null?void 0:ge.textMinHeightPx,U=ge==null?void 0:ge.captionMinHeightPx,j=ge==null?void 0:ge.dataMeasureAttrs,he=o&&!(ge!=null&&ge.dataMeasureAttrs)&&!(ge!=null&&ge.hideControls);return r.jsxs(r.Fragment,{children:[ee.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:y,width:"100%"},children:[r.jsx("div",{"data-controls":he?"textMarginTop":void 0,className:he?`${s}-control`:void 0,style:{height:L.scalingValue(E??0,n??!1)}}),r.jsx("div",{...j&&{"data-testimonial-measure":"text"},style:{...kt(ue,n),...X&&X>0?{minHeight:X}:{},textAlign:M,pointerEvents:"auto"},children:r.jsx(ui,{content:ee.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:y,width:"100%"},children:[r.jsx("div",{"data-controls":he?"imageMarginTop":void 0,className:he?`${s}-control`:void 0,style:{height:L.scalingValue(p??0,n??!1)}}),r.jsx("div",{style:{width:L.scalingValue(C??0,n??!1),height:L.scalingValue(g??0,n??!1)},children:((ne=ee.image)==null?void 0:ne.url)&&r.jsx("img",{src:(Ce=ee.image)==null?void 0:Ce.url,alt:((we=ee.image)==null?void 0:we.name)??"",className:`${s}-icon`,style:{objectFit:((be=ee.image)==null?void 0:be.objectFit)||"contain"}})})]}),ee.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:y,width:"100%"},children:[r.jsx("div",{"data-controls":he?"captionMarginTop":void 0,className:he?`${s}-control`:void 0,style:{height:L.scalingValue(b??0,n??!1)}}),r.jsx("div",{...j?{"data-testimonial-measure":"caption"}:{},style:{...kt(K,n),...U&&U>0?{minHeight:U}:{},textAlign:M,pointerEvents:"auto"},children:r.jsx(ui,{content:ee.caption})})]})]})},ye=l.useCallback(ee=>{B(ee.maxTextPx),ie(ee.maxCaptionPx)},[]);if(l.useLayoutEffect(()=>{if(!H){ye({maxTextPx:0,maxCaptionPx:0});return}const ee=Z.current;if(!ee)return;const ge=()=>{L.readTestimonialTextMeasure(ee,ye)};ge();const X=new ResizeObserver(ge);return X.observe(ee),()=>{X.disconnect()}},[H,ye,t]),!N)return r.jsx(r.Fragment,{});const Re=H?{textMinHeightPx:G,captionMinHeightPx:J}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${s}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Gu(s)}}),r.jsxs("div",{className:`${s}-wrapper`,style:{width:L.scalingValue(m??0,n??!1),alignItems:y},children:[H&&r.jsx("div",{ref:Z,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:a.map((ee,ge)=>r.jsx("div",{style:{width:"100%"},children:ve(ee,{dataMeasureAttrs:!0})},ge))}),r.jsxs("div",{className:`${s}-fade-stack`,children:[V&&P&&r.jsx("div",{className:Xe(`${s}-fade-item-prev`,`${s}-fade-out`),children:ve(V,{...Re,hideControls:!0})}),r.jsx("div",{className:Xe(`${s}-fade-item-current`,P?`${s}-fade-in`:void 0),children:ve(N,Re)})]})]}),oe.mode==="On"&&r.jsxs("div",{className:`${s}-controls`,children:[r.jsx("div",{className:`${s}-arrow`,style:{width:L.scalingValue(v??.02,n??!1),height:L.scalingValue(v??.02,n??!1),"--arrow-hover-color":w},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:h,disabled:!O,"aria-label":"Previous testimonial",children:oe.icon&&r.jsx(Qt,{url:oe.icon,fill:T,hoverFill:w,className:Xe(`${s}-arrow-img`,`${s}-mirror`)})})}),r.jsx("div",{className:Xe(`${s}-arrow`,`${s}-next-arrow`),style:{width:L.scalingValue(v??.02,n??!1),height:L.scalingValue(v??.02,n??!1),"--arrow-hover-color":w},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:pe,disabled:!O,"aria-label":"Next testimonial",children:oe.icon&&r.jsx(Qt,{url:oe.icon,fill:T,hoverFill:w,className:`${s}-arrow-img`})})})]})]})})},Yu=`import cn from 'classnames';
|
|
3150
3150
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
3151
3151
|
import { CommonComponentProps } from '../props';
|
|
3152
3152
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
|
|
@@ -3642,7 +3642,7 @@ type TestimonialsSettings = {
|
|
|
3642
3642
|
icon?: string | null;
|
|
3643
3643
|
};
|
|
3644
3644
|
};
|
|
3645
|
-
`,Ju="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>'),
|
|
3645
|
+
`,Ju="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>'),Ia={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Zu={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Ia.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Caption"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Ia.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Text"}},defaults:{controls:{mode:"On",icon:Ju},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Qu={element:Xu,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700,height:300},t:{width:373,height:300},m:{width:334,height:300}},schema:Zu,sourceCode:Yu,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function ep(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Aa(e){return((e==null?void 0:e.trim().length)??0)>0}function rr(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function ar(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:L.scalingValue((o-t)/2,i)}}function tp(e){return`
|
|
3646
3646
|
.${e}-wrapper {
|
|
3647
3647
|
display: grid;
|
|
3648
3648
|
align-items: start;
|
|
@@ -3704,11 +3704,18 @@ type TestimonialsSettings = {
|
|
|
3704
3704
|
}
|
|
3705
3705
|
.${e}-item-image-link {
|
|
3706
3706
|
width: 100%;
|
|
3707
|
-
height: 100%;
|
|
3708
3707
|
display: flex;
|
|
3709
3708
|
flex-direction: column;
|
|
3710
3709
|
align-items: center;
|
|
3711
3710
|
}
|
|
3711
|
+
.${e}-item-text-link {
|
|
3712
|
+
display: flex;
|
|
3713
|
+
flex-direction: column;
|
|
3714
|
+
align-items: center;
|
|
3715
|
+
width: 100%;
|
|
3716
|
+
color: inherit;
|
|
3717
|
+
text-decoration: none;
|
|
3718
|
+
}
|
|
3712
3719
|
.${e}-item-image {
|
|
3713
3720
|
width: 100%;
|
|
3714
3721
|
height: 100%;
|
|
@@ -3768,21 +3775,49 @@ type TestimonialsSettings = {
|
|
|
3768
3775
|
.${e}-show-text-hover .${e}-item-inner-hidden:hover .${e}-item-subtitle {
|
|
3769
3776
|
opacity: 1;
|
|
3770
3777
|
}
|
|
3778
|
+
.${e}-type-a .${e}-item-inner,
|
|
3779
|
+
.${e}-type-a .${e}-item-inner-hidden,
|
|
3780
|
+
.${e}-type-d .${e}-item-inner,
|
|
3781
|
+
.${e}-type-d .${e}-item-inner-hidden {
|
|
3782
|
+
align-items: flex-start;
|
|
3783
|
+
}
|
|
3771
3784
|
.${e}-type-b .${e}-item-inner,
|
|
3772
3785
|
.${e}-type-b .${e}-item-inner-hidden,
|
|
3786
|
+
.${e}-type-e .${e}-item-inner,
|
|
3787
|
+
.${e}-type-e .${e}-item-inner-hidden {
|
|
3788
|
+
align-items: center;
|
|
3789
|
+
}
|
|
3773
3790
|
.${e}-type-c .${e}-item-inner,
|
|
3774
|
-
.${e}-type-c .${e}-item-inner-hidden
|
|
3775
|
-
|
|
3791
|
+
.${e}-type-c .${e}-item-inner-hidden,
|
|
3792
|
+
.${e}-type-f .${e}-item-inner,
|
|
3793
|
+
.${e}-type-f .${e}-item-inner-hidden {
|
|
3794
|
+
align-items: flex-end;
|
|
3776
3795
|
}
|
|
3796
|
+
.${e}-type-a .${e}-item-image-link,
|
|
3777
3797
|
.${e}-type-b .${e}-item-image-link,
|
|
3778
|
-
.${e}-type-c .${e}-item-image-link
|
|
3798
|
+
.${e}-type-c .${e}-item-image-link,
|
|
3799
|
+
.${e}-type-d .${e}-item-image-link,
|
|
3800
|
+
.${e}-type-e .${e}-item-image-link,
|
|
3801
|
+
.${e}-type-f .${e}-item-image-link {
|
|
3779
3802
|
align-items: center;
|
|
3780
3803
|
}
|
|
3804
|
+
.${e}-type-a .${e}-item-title,
|
|
3805
|
+
.${e}-type-a .${e}-item-subtitle,
|
|
3806
|
+
.${e}-type-d .${e}-item-title,
|
|
3807
|
+
.${e}-type-d .${e}-item-subtitle {
|
|
3808
|
+
text-align: left;
|
|
3809
|
+
}
|
|
3781
3810
|
.${e}-type-b .${e}-item-title,
|
|
3782
3811
|
.${e}-type-b .${e}-item-subtitle,
|
|
3812
|
+
.${e}-type-e .${e}-item-title,
|
|
3813
|
+
.${e}-type-e .${e}-item-subtitle {
|
|
3814
|
+
text-align: center;
|
|
3815
|
+
}
|
|
3783
3816
|
.${e}-type-c .${e}-item-title,
|
|
3784
|
-
.${e}-type-c .${e}-item-subtitle
|
|
3785
|
-
|
|
3817
|
+
.${e}-type-c .${e}-item-subtitle,
|
|
3818
|
+
.${e}-type-f .${e}-item-title,
|
|
3819
|
+
.${e}-type-f .${e}-item-subtitle {
|
|
3820
|
+
text-align: right;
|
|
3786
3821
|
}
|
|
3787
3822
|
.${e}-item-text-block {
|
|
3788
3823
|
display: flex;
|
|
@@ -3791,6 +3826,45 @@ type TestimonialsSettings = {
|
|
|
3791
3826
|
width: 100%;
|
|
3792
3827
|
flex-shrink: 0;
|
|
3793
3828
|
}
|
|
3829
|
+
.${e}-type-d .${e}-item-text-block {
|
|
3830
|
+
align-items: flex-start;
|
|
3831
|
+
}
|
|
3832
|
+
.${e}-type-e .${e}-item-text-block {
|
|
3833
|
+
align-items: center;
|
|
3834
|
+
}
|
|
3835
|
+
.${e}-type-f .${e}-item-text-block {
|
|
3836
|
+
align-items: flex-end;
|
|
3837
|
+
}
|
|
3838
|
+
.${e}-type-a .${e}-item-text-link,
|
|
3839
|
+
.${e}-type-d .${e}-item-text-link {
|
|
3840
|
+
align-items: flex-start;
|
|
3841
|
+
}
|
|
3842
|
+
.${e}-type-b .${e}-item-text-link,
|
|
3843
|
+
.${e}-type-e .${e}-item-text-link {
|
|
3844
|
+
align-items: center;
|
|
3845
|
+
}
|
|
3846
|
+
.${e}-type-c .${e}-item-text-link,
|
|
3847
|
+
.${e}-type-f .${e}-item-text-link {
|
|
3848
|
+
align-items: flex-end;
|
|
3849
|
+
}
|
|
3850
|
+
.${e}-image-align-top .${e}-item-image-wrapper:not(.${e}-item-image-wrapper-fit-slider) {
|
|
3851
|
+
align-items: flex-start;
|
|
3852
|
+
}
|
|
3853
|
+
.${e}-image-align-center .${e}-item-image-wrapper:not(.${e}-item-image-wrapper-fit-slider) {
|
|
3854
|
+
align-items: center;
|
|
3855
|
+
}
|
|
3856
|
+
.${e}-image-align-bottom .${e}-item-image-wrapper:not(.${e}-item-image-wrapper-fit-slider) {
|
|
3857
|
+
align-items: flex-end;
|
|
3858
|
+
}
|
|
3859
|
+
.${e}-image-align-top .${e}-item-slider .splide__slide {
|
|
3860
|
+
align-items: flex-start;
|
|
3861
|
+
}
|
|
3862
|
+
.${e}-image-align-center .${e}-item-slider .splide__slide {
|
|
3863
|
+
align-items: center;
|
|
3864
|
+
}
|
|
3865
|
+
.${e}-image-align-bottom .${e}-item-slider .splide__slide {
|
|
3866
|
+
align-items: flex-end;
|
|
3867
|
+
}
|
|
3794
3868
|
.${e}-align-entries .${e}-item {
|
|
3795
3869
|
display: contents;
|
|
3796
3870
|
}
|
|
@@ -3816,12 +3890,76 @@ type TestimonialsSettings = {
|
|
|
3816
3890
|
width: 100%;
|
|
3817
3891
|
min-height: 100%;
|
|
3818
3892
|
}
|
|
3893
|
+
.${e}-type-a.${e}-align-entries .${e}-item-title-row,
|
|
3894
|
+
.${e}-type-a.${e}-align-entries .${e}-item-subtitle-row,
|
|
3895
|
+
.${e}-type-d.${e}-align-entries .${e}-item-title-row,
|
|
3896
|
+
.${e}-type-d.${e}-align-entries .${e}-item-subtitle-row {
|
|
3897
|
+
align-items: flex-start;
|
|
3898
|
+
}
|
|
3899
|
+
.${e}-type-b.${e}-align-entries .${e}-item-title-row,
|
|
3900
|
+
.${e}-type-b.${e}-align-entries .${e}-item-subtitle-row,
|
|
3901
|
+
.${e}-type-e.${e}-align-entries .${e}-item-title-row,
|
|
3902
|
+
.${e}-type-e.${e}-align-entries .${e}-item-subtitle-row {
|
|
3903
|
+
align-items: center;
|
|
3904
|
+
}
|
|
3905
|
+
.${e}-type-c.${e}-align-entries .${e}-item-title-row,
|
|
3906
|
+
.${e}-type-c.${e}-align-entries .${e}-item-subtitle-row,
|
|
3907
|
+
.${e}-type-f.${e}-align-entries .${e}-item-title-row,
|
|
3908
|
+
.${e}-type-f.${e}-align-entries .${e}-item-subtitle-row {
|
|
3909
|
+
align-items: flex-end;
|
|
3910
|
+
}
|
|
3819
3911
|
.${e}-align-entries .${e}-item-image-link {
|
|
3820
3912
|
width: 100%;
|
|
3821
|
-
height:
|
|
3913
|
+
height: 100%;
|
|
3914
|
+
min-height: 100%;
|
|
3822
3915
|
display: flex;
|
|
3823
3916
|
flex-direction: column;
|
|
3824
3917
|
align-items: center;
|
|
3918
|
+
justify-content: flex-start;
|
|
3919
|
+
}
|
|
3920
|
+
.${e}-align-entries .${e}-item-image-link > .${e}-item-image-wrapper {
|
|
3921
|
+
flex-shrink: 0;
|
|
3922
|
+
height: auto;
|
|
3923
|
+
align-self: auto;
|
|
3924
|
+
}
|
|
3925
|
+
.${e}-image-align-top.${e}-align-entries .${e}-item-image-link > .${e}-item-image-wrapper {
|
|
3926
|
+
margin-top: 0;
|
|
3927
|
+
margin-bottom: auto;
|
|
3928
|
+
}
|
|
3929
|
+
.${e}-image-align-center.${e}-align-entries .${e}-item-image-link > .${e}-item-image-wrapper {
|
|
3930
|
+
margin-top: auto;
|
|
3931
|
+
margin-bottom: auto;
|
|
3932
|
+
}
|
|
3933
|
+
.${e}-image-align-bottom.${e}-align-entries .${e}-item-image-link > .${e}-item-image-wrapper {
|
|
3934
|
+
margin-top: auto;
|
|
3935
|
+
margin-bottom: 0;
|
|
3936
|
+
}
|
|
3937
|
+
.${e}-image-align-top.${e}-align-entries .${e}-item-image-wrapper:not(.${e}-item-image-wrapper-fit-slider) {
|
|
3938
|
+
align-items: flex-start;
|
|
3939
|
+
}
|
|
3940
|
+
.${e}-image-align-center.${e}-align-entries .${e}-item-image-wrapper:not(.${e}-item-image-wrapper-fit-slider) {
|
|
3941
|
+
align-items: center;
|
|
3942
|
+
}
|
|
3943
|
+
.${e}-image-align-bottom.${e}-align-entries .${e}-item-image-wrapper:not(.${e}-item-image-wrapper-fit-slider) {
|
|
3944
|
+
align-items: flex-end;
|
|
3945
|
+
}
|
|
3946
|
+
.${e}-image-align-top.${e}-align-entries .${e}-item-slider .splide__slide {
|
|
3947
|
+
align-items: flex-start;
|
|
3948
|
+
}
|
|
3949
|
+
.${e}-image-align-center.${e}-align-entries .${e}-item-slider .splide__slide {
|
|
3950
|
+
align-items: center;
|
|
3951
|
+
}
|
|
3952
|
+
.${e}-image-align-bottom.${e}-align-entries .${e}-item-slider .splide__slide {
|
|
3953
|
+
align-items: flex-end;
|
|
3954
|
+
}
|
|
3955
|
+
.${e}-image-align-top.${e}-align-entries .${e}-item-image-link {
|
|
3956
|
+
justify-content: flex-start;
|
|
3957
|
+
}
|
|
3958
|
+
.${e}-image-align-center.${e}-align-entries .${e}-item-image-link {
|
|
3959
|
+
justify-content: center;
|
|
3960
|
+
}
|
|
3961
|
+
.${e}-image-align-bottom.${e}-align-entries .${e}-item-image-link {
|
|
3962
|
+
justify-content: flex-end;
|
|
3825
3963
|
}
|
|
3826
3964
|
.${e}-lightbox-counter {
|
|
3827
3965
|
margin: 0;
|
|
@@ -3845,7 +3983,7 @@ type TestimonialsSettings = {
|
|
|
3845
3983
|
pointer-events: auto;
|
|
3846
3984
|
z-index: 10;
|
|
3847
3985
|
}
|
|
3848
|
-
`}const zt=500,np=750,Qt="cubic-bezier(0.22, 1, 0.36, 1)",ip=72,op=50;function rp(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 ap(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function sp(e){const[t]=e.media;return t!=null&&t.url?t:null}function lp(e){return!Array.isArray(e)||e.length===0?[]:rp(e)?e.flatMap(t=>{const n=ap(t);if(!n)return[];const i=sp(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 Ci(e){return e.type==="video"}function cp(e){e.pause(),e.removeAttribute("src"),e.load()}function Aa({media:e,className:t,style:n,onMediaClick:i}){return Ci(e)?r.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):r.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function ro(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function dp(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function up({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:s,onMouseMove:a,onTransitionEnd:u}){return l.useEffect(()=>{const c=n.current;if(c)return()=>{cp(c)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:s,onMouseMove:a,onTransitionEnd:u,style:i})}function pp({items:e,index:t,imageDisplay:n,originRect:i,reverseClose:o,onClose:s,onPrev:a,onNext:u,counterClassName:c,counterStyle:m}){const p=n==="cover",R=l.useRef(null),b=l.useRef(null),I=l.useRef(null),g=l.useRef(null),v=l.useRef(0),T=l.useRef(0),w=l.useRef("none"),$=l.useRef(!1),S=l.useRef(!1),z=l.useRef(!1),M=l.useRef(null),[N,L]=l.useState(null),[C,J]=l.useState(i?"opening":"open"),[y,k]=l.useState(!0),[_,V]=l.useState(0),[ne,me]=l.useState(0),[K,H]=l.useState(!1),[Q,Y]=l.useState(!1),[O,te]=l.useState(!1),ce=l.useRef(t),oe=e[t],W=oe?Ci(oe):!1,ue=ne!==0||K,h=l.useCallback(D=>{z.current=D,H(D)},[]),ae=l.useCallback(()=>{M.current!==null&&(window.clearTimeout(M.current),M.current=null)},[]),be=l.useCallback(()=>{ae(),M.current=window.setTimeout(()=>{ae(),h(!1)},zt+32)},[ae,h]),ye=l.useCallback(()=>{const D=b.current,E=I.current;if(!D)return;const j=D.getBoundingClientRect(),G=j.width,ee=j.height;if(!G||!ee)return;if(n==="cover"){L({width:G,height:ee,left:j.left,top:j.top});return}if(!E){L(ro(D));return}const{width:ie,height:he}=dp(E);if(!ie||!he){L(ro(D));return}const Se=ie/he,$e=G/ee;if(Se>$e){const fe=G/Se;L({width:G,height:fe,left:j.left,top:j.top+(ee-fe)/2})}else{const fe=ee*Se;L({width:fe,height:ee,left:j.left+(G-fe)/2,top:j.top})}},[n]);l.useEffect(()=>{ye();const D=b.current;if(!D)return;const E=new ResizeObserver(()=>ye());return E.observe(D),()=>E.disconnect()},[ye,t]),l.useEffect(()=>{C==="opening"&&N&&J("open")},[C,N]),l.useEffect(()=>{if(C!=="closing")return;const D=setTimeout(()=>s(),zt);return()=>clearTimeout(D)},[C,s]),l.useEffect(()=>()=>{ae()},[ae]),l.useLayoutEffect(()=>{if(ce.current===t)return;ae(),k(!1),V(0),me(0),h(!1),te(!1),Y(!1),v.current=0,T.current=0,w.current="none",$.current=!1,g.current=null,S.current=!1;const D=b.current;D&&L(ro(D)),ce.current=t},[t,h,ae]),l.useEffect(()=>{if(C!=="open")return;const D=()=>{const he=Se=>{Se.stopPropagation(),Se.preventDefault(),document.removeEventListener("click",he,!0)};document.addEventListener("click",he,!0)},E=he=>{ae(),z.current=!1,H(!1),me(0),Y(!1),$.current=!1,T.current=0,w.current="none",k(!1);const Se=b.current;Se&&L(ro(Se)),he<0?u():a()},j=he=>{if(Math.abs(he)>op&&e.length>1){E(he);return}h(!0),me(0),be()},G=he=>{if(he.touches.length!==1||z.current)return;const Se=he.touches[0];S.current=!0,g.current={x:Se.clientX,y:Se.clientY},w.current="none",T.current=0,$.current=!1},ee=he=>{if(!g.current||he.touches.length!==1||z.current)return;const Se=he.touches[0],$e=Se.clientX-g.current.x,fe=Se.clientY-g.current.y;if(w.current==="none"){if(Math.abs($e)<10&&Math.abs(fe)<10)return;if(Math.abs($e)>Math.abs(fe)){if(e.length<=1)return;w.current="horizontal"}else if(fe>0)w.current="vertical";else return}if(w.current==="horizontal"){$.current=!0,Y(!0),T.current=$e,me($e),he.preventDefault();return}w.current==="vertical"&&($.current=!0,Y(!0),v.current=fe,V(fe),he.preventDefault())},ie=()=>{if(!g.current)return;const he=w.current,Se=$.current;if(Se&&he==="horizontal")j(T.current),D();else if(Se&&he==="vertical"){if(v.current>ip){const fe=window.innerHeight;v.current=fe,te(!0),V(fe),J("closing")}else v.current=0,V(0);D()}else he==="horizontal"&&Math.abs(T.current)>0&&(j(T.current),D());g.current=null,w.current="none",T.current=0,$.current=!1,Y(!1)};return document.addEventListener("touchstart",G,{passive:!0}),document.addEventListener("touchmove",ee,{passive:!1}),document.addEventListener("touchend",ie),document.addEventListener("touchcancel",ie),()=>{document.removeEventListener("touchstart",G),document.removeEventListener("touchmove",ee),document.removeEventListener("touchend",ie),document.removeEventListener("touchcancel",ie)}},[C,e.length,u,a,h,be]),l.useEffect(()=>{const D=E=>{E.key==="Escape"&&(E.preventDefault(),E.stopPropagation(),C!=="closing"&&J("closing"))};return window.addEventListener("keydown",D,!0),()=>window.removeEventListener("keydown",D,!0)},[C]);const Ae=()=>{C!=="closing"&&J("closing")},Z=C==="open",ge=C==="closing",U=ge&&o&&!!i&&!O,X=_>0?Math.max(0,1-_/500):1,B=_>0?Math.max(.35,1-_/500):1,se=C==="opening"?i??N:U?i:N,Ee=D=>{if(D.stopPropagation(),S.current){S.current=!1;return}if(e.length<=1)return;const E=D.currentTarget.getBoundingClientRect(),j=D.clientY-E.top,G=Math.min(52,E.height*.2);if(!(j>E.height-G)){if(D.clientX-E.left<E.width/2){a();return}u()}},Fe=D=>{if(e.length<=1)return;const E=D.currentTarget.getBoundingClientRect(),j=D.clientX-E.left,G=D.clientY-E.top,ee=Math.min(52,E.height*.2);if(G>E.height-ee){D.currentTarget.style.cursor="default";return}D.currentTarget.style.cursor=j<E.width/2?"w-resize":"e-resize"},Re=l.useCallback(D=>{D.propertyName!=="transform"||!z.current||(ae(),h(!1))},[ae,h]),Ie=ue?`translateX(${ne}px)`:_>0?`translateY(${_}px)`:void 0,_e={position:"fixed",top:se==null?void 0:se.top,left:se==null?void 0:se.left,width:se==null?void 0:se.width,height:se==null?void 0:se.height,objectFit:n==="cover"?"cover":"contain",transform:Ie,opacity:_>0?B:ge&&!U?0:1,transition:Q&&!K?"none":K?`transform ${zt}ms ${Qt}`:O?`transform ${zt}ms ${Qt}, opacity ${zt}ms ${Qt}`:ge&&!U?`opacity ${zt}ms ${Qt}`:U||y?`top ${zt}ms ${Qt}, left ${zt}ms ${Qt}, width ${zt}ms ${Qt}, height ${zt}ms ${Qt}`:"none",pointerEvents:W&&Z&&!ue?"auto":"none",touchAction:W&&Z?"none":void 0,zIndex:9998},F=N?{position:"fixed",top:N.top,height:N.height,width:N.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:R,style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997,touchAction:C==="open"?"none":void 0},onClick:Ae,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:Z?X:0,transition:Q?"none":`opacity ${zt}ms ${Qt}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:b,style:{position:"absolute",inset:0}}),r.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Z?1:0,transition:`opacity ${zt}ms ${Qt}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&r.jsxs("p",{className:c,style:m,children:[t+1," / ",e.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:b,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Z?1:0,transition:`opacity ${zt}ms ${Qt}`},children:e.length>1&&r.jsxs("p",{className:c,style:m,children:[t+1," / ",e.length]})})]})}),se&&oe&&(W?r.jsx(up,{src:oe.url,phase:C,mediaRef:I,mediaStyle:_e,onLoadedMetadata:ye,onClick:Ee,onMouseMove:Fe,onTransitionEnd:Re},`${t}-${oe.url}`):r.jsx("img",{ref:I,src:oe.url,alt:oe.name,onLoad:ye,onTransitionEnd:Re,style:_e},`${t}-${oe.url}`)),Z&&F&&e.length>1&&!W&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...F,left:N.left,cursor:"w-resize",pointerEvents:ue?"none":"auto"},onClick:D=>{if(S.current){S.current=!1;return}D.stopPropagation(),a()}}),r.jsx("div",{style:{...F,left:N.left+N.width/2,cursor:"e-resize",pointerEvents:ue?"none":"auto"},onClick:D=>{if(S.current){S.current=!1;return}D.stopPropagation(),u()}})]})]})}function mp(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function gp({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:a,layoutId:u}){const{prefix:c}=P.useScopedStyles(),{type:m="a",gridLayout:p,textBoxWidth:R=100,verticalGap:b,entriesCount:I,lightbox:g,imageDisplay:v,lightboxImageDisplay:T,slider:w,sliderTiming:$,direction:S,transition:z,titleMarginTop:M,subtitleMarginTop:N,titleColor:L,subtitleColor:C,lightboxCounterColor:J,titleFontFamily:y,titleFontSettings:k,titleFontSize:_,titleLineHeight:V,titleLetterSpacing:ne,titleWordSpacing:me,titleTextAppearance:K,subtitleFontFamily:H,subtitleFontSettings:Q,subtitleFontSize:Y,subtitleLineHeight:O,subtitleLetterSpacing:te,subtitleWordSpacing:ce,subtitleTextAppearance:oe,lightboxCounterFontFamily:W,lightboxCounterFontSettings:ue,lightboxCounterFontSize:h,lightboxCounterLineHeight:ae,lightboxCounterLetterSpacing:be,lightboxCounterWordSpacing:ye,lightboxCounterTextAppearance:Ae,showText:Z="always",alignEntries:ge="off"}=e,U={fontSettings:{fontFamily:y,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:_??.01,lineHeight:V,letterSpacing:ne??0,wordSpacing:me??0,textAppearance:K,color:L},B={...Ut(Rt(U,n))},se={fontSettings:{fontFamily:H,fontWeight:(Q==null?void 0:Q.fontWeight)??400,fontStyle:(Q==null?void 0:Q.fontStyle)??"normal"},fontSize:Y??.01,lineHeight:O,letterSpacing:te??0,wordSpacing:ce??0,textAppearance:oe,color:C},Fe={...Ut(Rt(se,n))},Re={fontSettings:{fontFamily:W,fontWeight:(ue==null?void 0:ue.fontWeight)??400,fontStyle:(ue==null?void 0:ue.fontStyle)??"normal"},fontSize:h??.01,lineHeight:ae,letterSpacing:be??0,wordSpacing:ye??0,textAppearance:Ae,color:J},_e={...Ut(Rt(Re,n)),...ar(h,ae,c,n)},F=rr(_,V,`${c}-item-title`,`${c}-text-tight-leading`),D=rr(Y,O,`${c}-item-subtitle`,`${c}-text-tight-leading`),E=ar(_,V,c,n),j=ar(Y,O,c,n),G=rr(h,ae,`${c}-lightbox-counter`,`${c}-text-tight-leading`),ee=P.buildColorVars(c,{titleColor:L,subtitleColor:C,lightboxCounterColor:J},hp,fp),Se=`${a&&a!=="default"?`${c}-state-${a}`:""}${Z==="on hover"&&(!n||i)?` ${c}-show-text-hover`:""}`.trim(),$e=I===0?1/0:I,fe=(t??[]).slice(0,$e),Ge=p.entryWidth??.2,de=(v==null?void 0:v.display)==="cover",Me=(v==null?void 0:v.ratioValue)??"1:1",je=(v==null?void 0:v.reversed)??!1,[Ve,at]=Me.split(":").map(Number),mt=`${je?at:Ve} / ${je?Ve:at}`,ft=P.scalingValue(Ge??0,n),Ft=!de&&w!=="off",It={width:ft,...de?{aspectRatio:mt,height:"auto",overflow:"hidden"}:{height:"auto"}},Ue=`${c}-item-image-wrapper${Ft?` ${c}-item-image-wrapper-fit-slider`:""}`.trim(),Ce=m==="c",qe=Ce&&ge==="on",Qe=`calc(${P.scalingValue(Ge??0,n)} * (${R} / 100))`,Oe=P.scalingValue(Ge*R/100,n),$t=de?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[At,Je]=l.useState("ltr"),[Mt,Ht]=l.useState(0),We=l.useRef(null);l.useEffect(()=>{const ze=We.current;if(!ze)return;const vt=new ResizeObserver(le=>{Ht(Math.round(le[0].contentRect.width))});return vt.observe(ze),()=>vt.disconnect()},[]);const yt=(()=>{const ze={...ee},vt=We.current?getComputedStyle(We.current).getPropertyValue("--cntrl-article-width").trim():"";return vt&&(ze["--cntrl-article-width"]=vt),ze})(),[et,Xe]=l.useState(!1),[ot,ut]=l.useState([]),[un,rn]=l.useState(0),[Wn,nt]=l.useState(null),an=g==="on"&&(!n||i),Vt=(ze,vt,le)=>{if(n&&!i||g==="off")return;const xe=ze.currentTarget.getBoundingClientRect();nt({top:xe.top,left:xe.left,width:xe.width,height:xe.height}),ut(vt),rn(le),Xe(!0)};l.useEffect(()=>{if(!et||g!=="on"||typeof document>"u")return;const ze=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ze}},[et,g]),l.useEffect(()=>{!n||i||(Xe(!1),nt(null))},[n,i]);const jt=l.useMemo(()=>tp(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:jt}}),r.jsx("div",{style:ee,children:r.jsx("div",{ref:We,className:`${c}-wrapper ${c}-type-${m}${qe?` ${c}-align-entries`:""} ${Se}`.trim(),style:{gridTemplateColumns:`repeat(${p.columnsCount}, minmax(0, 1fr))`,rowGap:qe?0:P.scalingValue(b??0,n),columnGap:P.scalingValue(p.horizontalGap??0,n),width:P.scalingValue(p.wrapperWidth??0,n),...qe?{[`--${c}-align-entries-row-gap`]:P.scalingValue(b??0,n)}:{}},children:fe.map((ze,vt)=>{var St;const le=Ra(ze.title),xe=Ra(ze.subtitle),Pe=(((St=ze.link)==null?void 0:St.length)??0)>0&&g==="off"?ze.link:void 0,Ne=Math.floor(vt/p.columnsCount)===Math.ceil(fe.length/p.columnsCount)-1,tt=Ce?r.jsxs("div",{className:`${c}-item-text-block`,children:[le&&r.jsx("p",{className:F,style:{width:Qe,...B,...E},children:ze.title}),le&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:P.scalingValue(M??0,n),width:Oe}}),xe&&r.jsx("p",{className:D,style:{width:Qe,...Fe,...j},children:ze.subtitle}),xe&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:P.scalingValue(N??0,n),width:Oe}})]}):null,bt=Ce?r.jsxs("div",{className:`${c}-item-title-row`,children:[le&&r.jsx("p",{className:F,style:{width:Qe,...B,...E},children:ze.title}),le&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:P.scalingValue(M??0,n),width:Oe}})]}):null,Te=Ce?r.jsxs("div",{className:`${c}-item-subtitle-row`,children:[xe&&r.jsx("p",{className:D,style:{width:Qe,...Fe,...j},children:ze.subtitle}),xe&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:P.scalingValue(N??0,n),width:Oe}})]}):null,it=Pe?r.jsxs("a",{href:Pe,target:"_blank",className:`${c}-item-text-link`,children:[bt,Te]}):r.jsxs(r.Fragment,{children:[bt,Te]}),De=lp(ze.gallery),rt=De.filter(Be=>Be.lightboxMedia).map(Be=>Be.lightboxMedia),pt=r.jsx("div",{className:Ue,style:It,children:De.length===0?null:w==="off"?(()=>{const{displayMedia:Be,lightboxMedia:xt}=De[0],Ct=xt?rt.findIndex(wt=>wt.url===xt.url):-1;return r.jsx(Aa,{media:Be,className:`${c}-item-${Ci(Be)?"video":"image"}`.trim(),style:$t,onMediaClick:an&&Ct>=0?wt=>Vt(wt,rt,Ct):void 0})})():r.jsxs(r.Fragment,{children:[Ft&&r.jsx("div",{className:`${c}-item-image-wrapper-sizer`,"aria-hidden":"true",children:De.map(({displayMedia:Be})=>Ci(Be)?r.jsx("video",{src:Be.url,muted:!0,playsInline:!0},`sizer-${Be.url}`):r.jsx("img",{src:Be.url,alt:""},`sizer-${Be.url}`))}),r.jsx(Ur,{className:`${c}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:$*1e3,width:"100%",height:"100%",speed:np,type:z==="fade"?"fade":"loop",rewind:z==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:z==="fade"?"ltr":S!=="random"?S==="horizontal"?"ltr":"ttb":At},onMoved:Be=>{if(S!=="random"||z==="fade")return;const xt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";Je(xt),setTimeout(()=>{Be.refresh()},0)},children:De.map(({displayMedia:Be,lightboxMedia:xt},Ct)=>{const wt=xt?rt.findIndex(Dt=>Dt.url===xt.url):-1;return r.jsx(Xr,{children:r.jsx(Aa,{media:Be,className:`${c}-item-${Ci(Be)?"video":"image"}`.trim(),style:$t,onMediaClick:an&&wt>=0?Dt=>Vt(Dt,rt,wt):void 0})},Ct)})},`${z}-${Ge}-${S}-${$}-${Mt}-${u}`)]})}),kt=Ce?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&le?"titleMarginTop":void 0,className:o&&le?`${c}-control`:void 0,style:{height:le?P.scalingValue(M??0,n):0,width:Oe}}),r.jsx("p",{className:F,style:{width:Qe,...B,...E},children:ze.title}),r.jsx("div",{"data-controls":o&&xe?"subtitleMarginTop":void 0,className:o&&xe?`${c}-control`:void 0,style:{height:xe?P.scalingValue(N??0,n):0,width:Oe}}),r.jsx("p",{className:D,style:{width:Qe,...Fe,...j},children:ze.subtitle})]});return r.jsx("div",{className:`${c}-item`.trim(),children:r.jsx("div",{className:`${o?`${c}-item-inner`:`${c}-item-inner-hidden`}${qe&&Ne?` ${c}-item-inner-last-row`:""}`.trim(),style:{width:(R??0)>100?`calc(${P.scalingValue(Ge??0,n)} * (${R} / 100))`:P.scalingValue(Ge??0,n)},children:qe?r.jsxs(r.Fragment,{children:[it,r.jsx("a",{href:Pe,target:"_blank",className:`${c}-item-image-link`,children:pt})]}):r.jsxs("a",{href:Pe,target:"_blank",className:`${c}-item-image-link`,children:[tt,pt,kt]})})},vt)})})}),(!n||i)&&et&&typeof document<"u"&&g==="on"&&Ni.createPortal(r.jsx("div",{style:yt,"data-selection":"none",children:r.jsx(pp,{items:ot,index:un,imageDisplay:mp(T),originRect:Wn,reverseClose:w==="off",onClose:()=>Xe(!1),onPrev:()=>rn(ze=>(ze-1+ot.length)%ot.length),onNext:()=>rn(ze=>(ze+1)%ot.length),counterClassName:G,counterStyle:_e})}),document.body)]})}const hp={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},fp=["hover","focus","filled","success","error"],yp=`import { Splide, SplideSlide } from '@splidejs/react-splide';
|
|
3986
|
+
`}const pn=500,np=750,On="cubic-bezier(0.22, 1, 0.36, 1)",ip=72,op=50;function rp(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 ap(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function sp(e){const[t]=e.media;return t!=null&&t.url?t:null}function lp(e){return!Array.isArray(e)||e.length===0?[]:rp(e)?e.flatMap(t=>{const n=ap(t);if(!n)return[];const i=sp(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 Ci(e){return e.type==="video"}function cp(e){e.pause(),e.removeAttribute("src"),e.load()}function Ra({media:e,className:t,style:n,onMediaClick:i}){return Ci(e)?r.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):r.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function ro(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function dp(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function up({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:s,onMouseMove:a,onTransitionEnd:u}){return l.useEffect(()=>{const c=n.current;if(c)return()=>{cp(c)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:s,onMouseMove:a,onTransitionEnd:u,style:i})}function pp({items:e,index:t,imageDisplay:n,onClose:i,onPrev:o,onNext:s,counterClassName:a,counterStyle:u}){const c=n==="cover",m=l.useRef(null),p=l.useRef(null),E=l.useRef(null),b=l.useRef(null),C=l.useRef(0),g=l.useRef(0),v=l.useRef("none"),T=l.useRef(!1),w=l.useRef(!1),$=l.useRef(!1),S=l.useRef(null),[_,k]=l.useState(null),[W,P]=l.useState("opening"),[I,Y]=l.useState(0),[y,M]=l.useState(0),[N,V]=l.useState(!1),[te,ue]=l.useState(!1),[K,H]=l.useState(!1),Z=l.useRef(t),G=e[t],B=G?Ci(G):!1,J=y!==0||N,ie=l.useCallback(ne=>{$.current=ne,V(ne)},[]),oe=l.useCallback(()=>{S.current!==null&&(window.clearTimeout(S.current),S.current=null)},[]),O=l.useCallback(()=>{oe(),S.current=window.setTimeout(()=>{oe(),ie(!1)},pn+32)},[oe,ie]),ce=l.useCallback(()=>{const ne=p.current,Ce=E.current;if(!ne)return;const we=ne.getBoundingClientRect(),be=we.width,Ie=we.height;if(!be||!Ie)return;if(n==="cover"){k({width:be,height:Ie,left:we.left,top:we.top});return}if(!Ce){k(ro(ne));return}const{width:F,height:Q}=dp(Ce);if(!F||!Q){k(ro(ne));return}const A=F/Q,D=be/Ie;if(A>D){const z=be/A;k({width:be,height:z,left:we.left,top:we.top+(Ie-z)/2})}else{const z=Ie*A;k({width:z,height:Ie,left:we.left+(be-z)/2,top:we.top})}},[n]);l.useEffect(()=>{ce();const ne=p.current;if(!ne)return;const Ce=new ResizeObserver(()=>ce());return Ce.observe(ne),()=>Ce.disconnect()},[ce,t]),l.useEffect(()=>{W==="opening"&&_&&P("open")},[W,_]),l.useEffect(()=>{if(W!=="closing")return;const ne=setTimeout(()=>i(),pn);return()=>clearTimeout(ne)},[W,i]),l.useEffect(()=>()=>{oe()},[oe]),l.useLayoutEffect(()=>{if(Z.current===t)return;oe(),Y(0),M(0),ie(!1),H(!1),ue(!1),C.current=0,g.current=0,v.current="none",T.current=!1,b.current=null,w.current=!1;const ne=p.current;ne&&k(ro(ne)),Z.current=t},[t,ie,oe]),l.useEffect(()=>{if(W!=="open")return;const ne=()=>{const Q=A=>{A.stopPropagation(),A.preventDefault(),document.removeEventListener("click",Q,!0)};document.addEventListener("click",Q,!0)},Ce=Q=>{oe(),$.current=!1,V(!1),M(0),ue(!1),T.current=!1,g.current=0,v.current="none";const A=p.current;A&&k(ro(A)),Q<0?s():o()},we=Q=>{if(Math.abs(Q)>op&&e.length>1){Ce(Q);return}ie(!0),M(0),O()},be=Q=>{if(Q.touches.length!==1||$.current)return;const A=Q.touches[0];w.current=!0,b.current={x:A.clientX,y:A.clientY},v.current="none",g.current=0,T.current=!1},Ie=Q=>{if(!b.current||Q.touches.length!==1||$.current)return;const A=Q.touches[0],D=A.clientX-b.current.x,z=A.clientY-b.current.y;if(v.current==="none"){if(Math.abs(D)<10&&Math.abs(z)<10)return;if(Math.abs(D)>Math.abs(z)){if(e.length<=1)return;v.current="horizontal"}else if(z>0)v.current="vertical";else return}if(v.current==="horizontal"){T.current=!0,ue(!0),g.current=D,M(D),Q.preventDefault();return}v.current==="vertical"&&(T.current=!0,ue(!0),C.current=z,Y(z),Q.preventDefault())},F=()=>{if(!b.current)return;const Q=v.current,A=T.current;if(A&&Q==="horizontal")we(g.current),ne();else if(A&&Q==="vertical"){if(C.current>ip){const z=window.innerHeight;C.current=z,H(!0),Y(z),P("closing")}else C.current=0,Y(0);ne()}else Q==="horizontal"&&Math.abs(g.current)>0&&(we(g.current),ne());b.current=null,v.current="none",g.current=0,T.current=!1,ue(!1)};return document.addEventListener("touchstart",be,{passive:!0}),document.addEventListener("touchmove",Ie,{passive:!1}),document.addEventListener("touchend",F),document.addEventListener("touchcancel",F),()=>{document.removeEventListener("touchstart",be),document.removeEventListener("touchmove",Ie),document.removeEventListener("touchend",F),document.removeEventListener("touchcancel",F)}},[W,e.length,s,o,ie,O]),l.useEffect(()=>{const ne=Ce=>{Ce.key==="Escape"&&(Ce.preventDefault(),Ce.stopPropagation(),W!=="closing"&&P("closing"))};return window.addEventListener("keydown",ne,!0),()=>window.removeEventListener("keydown",ne,!0)},[W]);const h=()=>{W!=="closing"&&P("closing")},pe=W==="open",ve=W==="closing",ye=I>0?Math.max(0,1-I/500):1,Re=I>0?Math.max(.35,1-I/500):1,ee=ne=>{if(ne.stopPropagation(),w.current){w.current=!1;return}if(e.length<=1)return;const Ce=ne.currentTarget.getBoundingClientRect(),we=ne.clientY-Ce.top,be=Math.min(52,Ce.height*.2);if(!(we>Ce.height-be)){if(ne.clientX-Ce.left<Ce.width/2){o();return}s()}},ge=ne=>{if(e.length<=1)return;const Ce=ne.currentTarget.getBoundingClientRect(),we=ne.clientX-Ce.left,be=ne.clientY-Ce.top,Ie=Math.min(52,Ce.height*.2);if(be>Ce.height-Ie){ne.currentTarget.style.cursor="default";return}ne.currentTarget.style.cursor=we<Ce.width/2?"w-resize":"e-resize"},X=l.useCallback(ne=>{ne.propertyName!=="transform"||!$.current||(oe(),ie(!1))},[oe,ie]),U=J?`translateX(${y}px)`:I>0?`translateY(${I}px)`:void 0,j={position:"fixed",top:_==null?void 0:_.top,left:_==null?void 0:_.left,width:_==null?void 0:_.width,height:_==null?void 0:_.height,objectFit:n==="cover"?"cover":"contain",transform:U,opacity:I>0?Re:W==="opening"||ve?0:1,transition:te&&!N?"none":N?`transform ${pn}ms ${On}`:K?`transform ${pn}ms ${On}, opacity ${pn}ms ${On}`:W==="opening"||ve?`opacity ${pn}ms ${On}`:"none",pointerEvents:B&&pe&&!J?"auto":"none",touchAction:B&&pe?"none":void 0,zIndex:9998},he=_?{position:"fixed",top:_.top,height:_.height,width:_.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:m,style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997,touchAction:W==="open"?"none":void 0},onClick:h,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:pe?ye:0,transition:te?"none":`opacity ${pn}ms ${On}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:c?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:p,style:{position:"absolute",inset:0}}),r.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:pe?1:0,transition:`opacity ${pn}ms ${On}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&r.jsxs("p",{className:a,style:u,children:[t+1," / ",e.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:p,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:pe?1:0,transition:`opacity ${pn}ms ${On}`},children:e.length>1&&r.jsxs("p",{className:a,style:u,children:[t+1," / ",e.length]})})]})}),_&&G&&(B?r.jsx(up,{src:G.url,phase:W,mediaRef:E,mediaStyle:j,onLoadedMetadata:ce,onClick:ee,onMouseMove:ge,onTransitionEnd:X},`${t}-${G.url}`):r.jsx("img",{ref:E,src:G.url,alt:G.name,onLoad:ce,onTransitionEnd:X,style:j},`${t}-${G.url}`)),pe&&he&&e.length>1&&!B&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...he,left:_.left,cursor:"w-resize",pointerEvents:J?"none":"auto"},onClick:ne=>{if(w.current){w.current=!1;return}ne.stopPropagation(),o()}}),r.jsx("div",{style:{...he,left:_.left+_.width/2,cursor:"e-resize",pointerEvents:J?"none":"auto"},onClick:ne=>{if(w.current){w.current=!1;return}ne.stopPropagation(),s()}})]})]})}function mp(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function gp({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:a,layoutId:u}){const{prefix:c}=L.useScopedStyles(),{type:m="a",gridLayout:p,textBoxWidth:E=100,verticalGap:b,entriesCount:C,lightbox:g,imageDisplay:v,lightboxImageDisplay:T,slider:w,sliderTiming:$,direction:S,transition:_,titleMarginTop:k,subtitleMarginTop:W,titleColor:P,subtitleColor:I,lightboxCounterColor:Y,titleFontFamily:y,titleFontSettings:M,titleFontSize:N,titleLineHeight:V,titleLetterSpacing:te,titleWordSpacing:ue,titleTextAppearance:K,subtitleFontFamily:H,subtitleFontSettings:Z,subtitleFontSize:G,subtitleLineHeight:B,subtitleLetterSpacing:J,subtitleWordSpacing:ie,subtitleTextAppearance:oe,lightboxCounterFontFamily:O,lightboxCounterFontSettings:ce,lightboxCounterFontSize:h,lightboxCounterLineHeight:pe,lightboxCounterLetterSpacing:ve,lightboxCounterWordSpacing:ye,lightboxCounterTextAppearance:Re,showText:ee="always",alignEntries:ge="off",align:X="top"}=e,U={fontSettings:{fontFamily:y,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:N??.01,lineHeight:V,letterSpacing:te??0,wordSpacing:ue??0,textAppearance:K,color:P},he={...qt(kt(U,n))},ne={fontSettings:{fontFamily:H,fontWeight:(Z==null?void 0:Z.fontWeight)??400,fontStyle:(Z==null?void 0:Z.fontStyle)??"normal"},fontSize:G??.01,lineHeight:B,letterSpacing:J??0,wordSpacing:ie??0,textAppearance:oe,color:I},we={...qt(kt(ne,n))},be={fontSettings:{fontFamily:O,fontWeight:(ce==null?void 0:ce.fontWeight)??400,fontStyle:(ce==null?void 0:ce.fontStyle)??"normal"},fontSize:h??.01,lineHeight:pe,letterSpacing:ve??0,wordSpacing:ye??0,textAppearance:Re,color:Y},F={...qt(kt(be,n)),...ar(h,pe,c,n)},Q=rr(N,V,`${c}-item-title`,`${c}-text-tight-leading`),A=rr(G,B,`${c}-item-subtitle`,`${c}-text-tight-leading`),D=ar(N,V,c,n),z=ar(G,B,c,n),re=rr(h,pe,`${c}-lightbox-counter`,`${c}-text-tight-leading`),de=L.buildColorVars(c,{titleColor:P,subtitleColor:I,lightboxCounterColor:Y},hp,fp),Pe=`${a&&a!=="default"?`${c}-state-${a}`:""}${ee==="on hover"&&(!n||i)?` ${c}-show-text-hover`:""}`.trim(),$e=C===0?1/0:C,tt=(t??[]).slice(0,$e),ae=p.entryWidth??.2,ke=(v==null?void 0:v.display)==="cover",je=(v==null?void 0:v.ratioValue)??"1:1",ze=(v==null?void 0:v.reversed)??!1,[lt,ht]=je.split(":").map(Number),wt=`${ze?ht:lt} / ${ze?lt:ht}`,Ht=L.scalingValue(ae??0,n),Lt=!ke&&w!=="off",Ge={width:Ht,...ke?{aspectRatio:wt,height:"auto",overflow:"hidden"}:{height:"auto"}},Ae=`${c}-item-image-wrapper${Lt?` ${c}-item-image-wrapper-fit-slider`:""}`.trim(),Be=m==="d"||m==="e"||m==="f",Ye=ge==="on",He=`calc(${L.scalingValue(ae??0,n)} * (${E} / 100))`,ct=L.scalingValue(ae*E/100,n),It=ke?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Je,Mt]=l.useState("ltr"),[Ot,Oe]=l.useState(0),mt=l.useRef(null);l.useEffect(()=>{const Ve=mt.current;if(!Ve)return;const ft=new ResizeObserver(yt=>{Oe(Math.round(yt[0].contentRect.width))});return ft.observe(Ve),()=>ft.disconnect()},[]);const it=(()=>{const Ve={...de},ft=mt.current?getComputedStyle(mt.current).getPropertyValue("--cntrl-article-width").trim():"";return ft&&(Ve["--cntrl-article-width"]=ft),Ve})(),[Ue,rt]=l.useState(!1),[at,sn]=l.useState([]),[wn,ln]=l.useState(0),ot=g==="on"&&(!n||i),tn=(Ve,ft)=>{n&&!i||g!=="off"&&(sn(Ve),ln(ft),rt(!0))};l.useEffect(()=>{if(!Ue||g!=="on"||typeof document>"u")return;const Ve=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Ve}},[Ue,g]),l.useEffect(()=>{!n||i||rt(!1)},[n,i]);const Ut=l.useMemo(()=>tp(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Ut}}),r.jsx("div",{style:de,children:r.jsx("div",{ref:mt,className:`${c}-wrapper ${c}-type-${m}${Ye?` ${c}-align-entries`:""} ${c}-image-align-${X} ${Pe}`.trim(),style:{gridTemplateColumns:`repeat(${p.columnsCount}, minmax(0, 1fr))`,rowGap:Ye?0:L.scalingValue(b??0,n),columnGap:L.scalingValue(p.horizontalGap??0,n),width:L.scalingValue(p.wrapperWidth??0,n),...Ye?{[`--${c}-align-entries-row-gap`]:L.scalingValue(b??0,n)}:{}},children:tt.map((Ve,ft)=>{var At;const yt=Aa(Ve.title),le=Aa(Ve.subtitle),Se=(((At=Ve.link)==null?void 0:At.length)??0)>0&&g==="off"?Ve.link:void 0,Me=Math.floor(ft/p.columnsCount)===Math.ceil(tt.length/p.columnsCount)-1,Fe=Be?r.jsxs("div",{className:`${c}-item-text-block`,children:[yt&&r.jsx("p",{className:Q,style:{width:He,...he,...D},children:Ve.title}),yt&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:L.scalingValue(k??0,n),width:ct}}),le&&r.jsx("p",{className:A,style:{width:He,...we,...z},children:Ve.subtitle}),le&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:L.scalingValue(W??0,n),width:ct}})]}):null,et=Ye?r.jsxs("div",{className:`${c}-item-title-row`,children:[!Be&&r.jsx("div",{"data-controls":o&&yt?"titleMarginTop":void 0,className:o&&yt?`${c}-control`:void 0,style:{height:yt?L.scalingValue(k??0,n):0,width:ct}}),yt&&r.jsx("p",{className:Q,style:{width:He,...he,...D},children:Ve.title}),Be&&yt&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:L.scalingValue(k??0,n),width:ct}})]}):null,$t=Ye?r.jsxs("div",{className:`${c}-item-subtitle-row`,children:[!Be&&r.jsx("div",{"data-controls":o&&le?"subtitleMarginTop":void 0,className:o&&le?`${c}-control`:void 0,style:{height:le?L.scalingValue(W??0,n):0,width:ct}}),le&&r.jsx("p",{className:A,style:{width:He,...we,...z},children:Ve.subtitle}),Be&&le&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${c}-control`:void 0,style:{height:L.scalingValue(W??0,n),width:ct}})]}):null,Le=Se?r.jsxs("a",{href:Se,target:"_blank",className:`${c}-item-text-link`,children:[et,$t]}):r.jsxs(r.Fragment,{children:[et,$t]}),Ze=lp(Ve.gallery),De=Ze.filter(qe=>qe.lightboxMedia).map(qe=>qe.lightboxMedia),st=r.jsx("div",{className:Ae,style:Ge,children:Ze.length===0?null:w==="off"?(()=>{const{displayMedia:qe,lightboxMedia:nt}=Ze[0],Et=nt?De.findIndex(St=>St.url===nt.url):-1;return r.jsx(Ra,{media:qe,className:`${c}-item-${Ci(qe)?"video":"image"}`.trim(),style:It,onMediaClick:ot&&Et>=0?()=>tn(De,Et):void 0})})():r.jsxs(r.Fragment,{children:[Lt&&Ye&&r.jsx("div",{className:`${c}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Ze.map(({displayMedia:qe})=>Ci(qe)?r.jsx("video",{src:qe.url,muted:!0,playsInline:!0},`sizer-${qe.url}`):r.jsx("img",{src:qe.url,alt:""},`sizer-${qe.url}`))}),r.jsx(Ur,{className:`${c}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:$*1e3,width:"100%",height:"100%",speed:np,type:_==="fade"?"fade":"loop",rewind:_==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:_==="fade"?"ltr":S!=="random"?S==="horizontal"?"ltr":"ttb":Je},onMoved:qe=>{if(S!=="random"||_==="fade")return;const nt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";Mt(nt),setTimeout(()=>{qe.refresh()},0)},children:Ze.map(({displayMedia:qe,lightboxMedia:nt},Et)=>{const St=nt?De.findIndex(_t=>_t.url===nt.url):-1;return r.jsx(Xr,{children:r.jsx(Ra,{media:qe,className:`${c}-item-${Ci(qe)?"video":"image"}`.trim(),style:It,onMediaClick:ot&&St>=0?()=>tn(De,St):void 0})},Et)})},`${_}-${ae}-${S}-${$}-${Ot}-${u}`)]})}),vt=Be?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&yt?"titleMarginTop":void 0,className:o&&yt?`${c}-control`:void 0,style:{height:yt?L.scalingValue(k??0,n):0,width:ct}}),r.jsx("p",{className:Q,style:{width:He,...he,...D},children:Ve.title}),r.jsx("div",{"data-controls":o&&le?"subtitleMarginTop":void 0,className:o&&le?`${c}-control`:void 0,style:{height:le?L.scalingValue(W??0,n):0,width:ct}}),r.jsx("p",{className:A,style:{width:He,...we,...z},children:Ve.subtitle})]});return r.jsx("div",{className:`${c}-item`.trim(),children:r.jsx("div",{className:`${o?`${c}-item-inner`:`${c}-item-inner-hidden`}${Ye&&Me?` ${c}-item-inner-last-row`:""}`.trim(),style:{width:(E??0)>100?`calc(${L.scalingValue(ae??0,n)} * (${E} / 100))`:L.scalingValue(ae??0,n)},children:Ye?r.jsx(r.Fragment,{children:Be?r.jsxs(r.Fragment,{children:[Le,r.jsx("a",{href:Se,target:"_blank",className:`${c}-item-image-link`,children:st})]}):r.jsxs(r.Fragment,{children:[r.jsx("a",{href:Se,target:"_blank",className:`${c}-item-image-link`,children:st}),Le]})}):Se?r.jsxs(r.Fragment,{children:[r.jsxs("a",{href:Se,target:"_blank",className:`${c}-item-image-link`,children:[Fe,st]}),!Be&&r.jsx("a",{href:Se,target:"_blank",className:`${c}-item-text-link`,children:vt})]}):r.jsxs(r.Fragment,{children:[Fe,st,vt]})})},ft)})})}),(!n||i)&&Ue&&typeof document<"u"&&g==="on"&&Ni.createPortal(r.jsx("div",{style:it,"data-selection":"none",children:r.jsx(pp,{items:at,index:wn,imageDisplay:mp(T),onClose:()=>rt(!1),onPrev:()=>ln(Ve=>(Ve-1+at.length)%at.length),onNext:()=>ln(Ve=>(Ve+1)%at.length),counterClassName:re,counterStyle:F})}),document.body)]})}const hp={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},fp=["hover","focus","filled","success","error"],yp=`import { Splide, SplideSlide } from '@splidejs/react-splide';
|
|
3849
3987
|
import '@splidejs/react-splide/css/core';
|
|
3850
3988
|
import { CommonComponentProps } from '../props';
|
|
3851
3989
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
|
|
@@ -3955,11 +4093,18 @@ function getCSS(P: string): string {
|
|
|
3955
4093
|
}
|
|
3956
4094
|
.\${P}-item-image-link {
|
|
3957
4095
|
width: 100%;
|
|
3958
|
-
height: 100%;
|
|
3959
4096
|
display: flex;
|
|
3960
4097
|
flex-direction: column;
|
|
3961
4098
|
align-items: center;
|
|
3962
4099
|
}
|
|
4100
|
+
.\${P}-item-text-link {
|
|
4101
|
+
display: flex;
|
|
4102
|
+
flex-direction: column;
|
|
4103
|
+
align-items: center;
|
|
4104
|
+
width: 100%;
|
|
4105
|
+
color: inherit;
|
|
4106
|
+
text-decoration: none;
|
|
4107
|
+
}
|
|
3963
4108
|
.\${P}-item-image {
|
|
3964
4109
|
width: 100%;
|
|
3965
4110
|
height: 100%;
|
|
@@ -4019,21 +4164,49 @@ function getCSS(P: string): string {
|
|
|
4019
4164
|
.\${P}-show-text-hover .\${P}-item-inner-hidden:hover .\${P}-item-subtitle {
|
|
4020
4165
|
opacity: 1;
|
|
4021
4166
|
}
|
|
4167
|
+
.\${P}-type-a .\${P}-item-inner,
|
|
4168
|
+
.\${P}-type-a .\${P}-item-inner-hidden,
|
|
4169
|
+
.\${P}-type-d .\${P}-item-inner,
|
|
4170
|
+
.\${P}-type-d .\${P}-item-inner-hidden {
|
|
4171
|
+
align-items: flex-start;
|
|
4172
|
+
}
|
|
4022
4173
|
.\${P}-type-b .\${P}-item-inner,
|
|
4023
4174
|
.\${P}-type-b .\${P}-item-inner-hidden,
|
|
4175
|
+
.\${P}-type-e .\${P}-item-inner,
|
|
4176
|
+
.\${P}-type-e .\${P}-item-inner-hidden {
|
|
4177
|
+
align-items: center;
|
|
4178
|
+
}
|
|
4024
4179
|
.\${P}-type-c .\${P}-item-inner,
|
|
4025
|
-
.\${P}-type-c .\${P}-item-inner-hidden
|
|
4026
|
-
|
|
4180
|
+
.\${P}-type-c .\${P}-item-inner-hidden,
|
|
4181
|
+
.\${P}-type-f .\${P}-item-inner,
|
|
4182
|
+
.\${P}-type-f .\${P}-item-inner-hidden {
|
|
4183
|
+
align-items: flex-end;
|
|
4027
4184
|
}
|
|
4185
|
+
.\${P}-type-a .\${P}-item-image-link,
|
|
4028
4186
|
.\${P}-type-b .\${P}-item-image-link,
|
|
4029
|
-
.\${P}-type-c .\${P}-item-image-link
|
|
4187
|
+
.\${P}-type-c .\${P}-item-image-link,
|
|
4188
|
+
.\${P}-type-d .\${P}-item-image-link,
|
|
4189
|
+
.\${P}-type-e .\${P}-item-image-link,
|
|
4190
|
+
.\${P}-type-f .\${P}-item-image-link {
|
|
4030
4191
|
align-items: center;
|
|
4031
4192
|
}
|
|
4193
|
+
.\${P}-type-a .\${P}-item-title,
|
|
4194
|
+
.\${P}-type-a .\${P}-item-subtitle,
|
|
4195
|
+
.\${P}-type-d .\${P}-item-title,
|
|
4196
|
+
.\${P}-type-d .\${P}-item-subtitle {
|
|
4197
|
+
text-align: left;
|
|
4198
|
+
}
|
|
4032
4199
|
.\${P}-type-b .\${P}-item-title,
|
|
4033
4200
|
.\${P}-type-b .\${P}-item-subtitle,
|
|
4201
|
+
.\${P}-type-e .\${P}-item-title,
|
|
4202
|
+
.\${P}-type-e .\${P}-item-subtitle {
|
|
4203
|
+
text-align: center;
|
|
4204
|
+
}
|
|
4034
4205
|
.\${P}-type-c .\${P}-item-title,
|
|
4035
|
-
.\${P}-type-c .\${P}-item-subtitle
|
|
4036
|
-
|
|
4206
|
+
.\${P}-type-c .\${P}-item-subtitle,
|
|
4207
|
+
.\${P}-type-f .\${P}-item-title,
|
|
4208
|
+
.\${P}-type-f .\${P}-item-subtitle {
|
|
4209
|
+
text-align: right;
|
|
4037
4210
|
}
|
|
4038
4211
|
.\${P}-item-text-block {
|
|
4039
4212
|
display: flex;
|
|
@@ -4042,6 +4215,45 @@ function getCSS(P: string): string {
|
|
|
4042
4215
|
width: 100%;
|
|
4043
4216
|
flex-shrink: 0;
|
|
4044
4217
|
}
|
|
4218
|
+
.\${P}-type-d .\${P}-item-text-block {
|
|
4219
|
+
align-items: flex-start;
|
|
4220
|
+
}
|
|
4221
|
+
.\${P}-type-e .\${P}-item-text-block {
|
|
4222
|
+
align-items: center;
|
|
4223
|
+
}
|
|
4224
|
+
.\${P}-type-f .\${P}-item-text-block {
|
|
4225
|
+
align-items: flex-end;
|
|
4226
|
+
}
|
|
4227
|
+
.\${P}-type-a .\${P}-item-text-link,
|
|
4228
|
+
.\${P}-type-d .\${P}-item-text-link {
|
|
4229
|
+
align-items: flex-start;
|
|
4230
|
+
}
|
|
4231
|
+
.\${P}-type-b .\${P}-item-text-link,
|
|
4232
|
+
.\${P}-type-e .\${P}-item-text-link {
|
|
4233
|
+
align-items: center;
|
|
4234
|
+
}
|
|
4235
|
+
.\${P}-type-c .\${P}-item-text-link,
|
|
4236
|
+
.\${P}-type-f .\${P}-item-text-link {
|
|
4237
|
+
align-items: flex-end;
|
|
4238
|
+
}
|
|
4239
|
+
.\${P}-image-align-top .\${P}-item-image-wrapper:not(.\${P}-item-image-wrapper-fit-slider) {
|
|
4240
|
+
align-items: flex-start;
|
|
4241
|
+
}
|
|
4242
|
+
.\${P}-image-align-center .\${P}-item-image-wrapper:not(.\${P}-item-image-wrapper-fit-slider) {
|
|
4243
|
+
align-items: center;
|
|
4244
|
+
}
|
|
4245
|
+
.\${P}-image-align-bottom .\${P}-item-image-wrapper:not(.\${P}-item-image-wrapper-fit-slider) {
|
|
4246
|
+
align-items: flex-end;
|
|
4247
|
+
}
|
|
4248
|
+
.\${P}-image-align-top .\${P}-item-slider .splide__slide {
|
|
4249
|
+
align-items: flex-start;
|
|
4250
|
+
}
|
|
4251
|
+
.\${P}-image-align-center .\${P}-item-slider .splide__slide {
|
|
4252
|
+
align-items: center;
|
|
4253
|
+
}
|
|
4254
|
+
.\${P}-image-align-bottom .\${P}-item-slider .splide__slide {
|
|
4255
|
+
align-items: flex-end;
|
|
4256
|
+
}
|
|
4045
4257
|
.\${P}-align-entries .\${P}-item {
|
|
4046
4258
|
display: contents;
|
|
4047
4259
|
}
|
|
@@ -4067,12 +4279,76 @@ function getCSS(P: string): string {
|
|
|
4067
4279
|
width: 100%;
|
|
4068
4280
|
min-height: 100%;
|
|
4069
4281
|
}
|
|
4282
|
+
.\${P}-type-a.\${P}-align-entries .\${P}-item-title-row,
|
|
4283
|
+
.\${P}-type-a.\${P}-align-entries .\${P}-item-subtitle-row,
|
|
4284
|
+
.\${P}-type-d.\${P}-align-entries .\${P}-item-title-row,
|
|
4285
|
+
.\${P}-type-d.\${P}-align-entries .\${P}-item-subtitle-row {
|
|
4286
|
+
align-items: flex-start;
|
|
4287
|
+
}
|
|
4288
|
+
.\${P}-type-b.\${P}-align-entries .\${P}-item-title-row,
|
|
4289
|
+
.\${P}-type-b.\${P}-align-entries .\${P}-item-subtitle-row,
|
|
4290
|
+
.\${P}-type-e.\${P}-align-entries .\${P}-item-title-row,
|
|
4291
|
+
.\${P}-type-e.\${P}-align-entries .\${P}-item-subtitle-row {
|
|
4292
|
+
align-items: center;
|
|
4293
|
+
}
|
|
4294
|
+
.\${P}-type-c.\${P}-align-entries .\${P}-item-title-row,
|
|
4295
|
+
.\${P}-type-c.\${P}-align-entries .\${P}-item-subtitle-row,
|
|
4296
|
+
.\${P}-type-f.\${P}-align-entries .\${P}-item-title-row,
|
|
4297
|
+
.\${P}-type-f.\${P}-align-entries .\${P}-item-subtitle-row {
|
|
4298
|
+
align-items: flex-end;
|
|
4299
|
+
}
|
|
4070
4300
|
.\${P}-align-entries .\${P}-item-image-link {
|
|
4071
4301
|
width: 100%;
|
|
4072
|
-
height:
|
|
4302
|
+
height: 100%;
|
|
4303
|
+
min-height: 100%;
|
|
4073
4304
|
display: flex;
|
|
4074
4305
|
flex-direction: column;
|
|
4075
4306
|
align-items: center;
|
|
4307
|
+
justify-content: flex-start;
|
|
4308
|
+
}
|
|
4309
|
+
.\${P}-align-entries .\${P}-item-image-link > .\${P}-item-image-wrapper {
|
|
4310
|
+
flex-shrink: 0;
|
|
4311
|
+
height: auto;
|
|
4312
|
+
align-self: auto;
|
|
4313
|
+
}
|
|
4314
|
+
.\${P}-image-align-top.\${P}-align-entries .\${P}-item-image-link > .\${P}-item-image-wrapper {
|
|
4315
|
+
margin-top: 0;
|
|
4316
|
+
margin-bottom: auto;
|
|
4317
|
+
}
|
|
4318
|
+
.\${P}-image-align-center.\${P}-align-entries .\${P}-item-image-link > .\${P}-item-image-wrapper {
|
|
4319
|
+
margin-top: auto;
|
|
4320
|
+
margin-bottom: auto;
|
|
4321
|
+
}
|
|
4322
|
+
.\${P}-image-align-bottom.\${P}-align-entries .\${P}-item-image-link > .\${P}-item-image-wrapper {
|
|
4323
|
+
margin-top: auto;
|
|
4324
|
+
margin-bottom: 0;
|
|
4325
|
+
}
|
|
4326
|
+
.\${P}-image-align-top.\${P}-align-entries .\${P}-item-image-wrapper:not(.\${P}-item-image-wrapper-fit-slider) {
|
|
4327
|
+
align-items: flex-start;
|
|
4328
|
+
}
|
|
4329
|
+
.\${P}-image-align-center.\${P}-align-entries .\${P}-item-image-wrapper:not(.\${P}-item-image-wrapper-fit-slider) {
|
|
4330
|
+
align-items: center;
|
|
4331
|
+
}
|
|
4332
|
+
.\${P}-image-align-bottom.\${P}-align-entries .\${P}-item-image-wrapper:not(.\${P}-item-image-wrapper-fit-slider) {
|
|
4333
|
+
align-items: flex-end;
|
|
4334
|
+
}
|
|
4335
|
+
.\${P}-image-align-top.\${P}-align-entries .\${P}-item-slider .splide__slide {
|
|
4336
|
+
align-items: flex-start;
|
|
4337
|
+
}
|
|
4338
|
+
.\${P}-image-align-center.\${P}-align-entries .\${P}-item-slider .splide__slide {
|
|
4339
|
+
align-items: center;
|
|
4340
|
+
}
|
|
4341
|
+
.\${P}-image-align-bottom.\${P}-align-entries .\${P}-item-slider .splide__slide {
|
|
4342
|
+
align-items: flex-end;
|
|
4343
|
+
}
|
|
4344
|
+
.\${P}-image-align-top.\${P}-align-entries .\${P}-item-image-link {
|
|
4345
|
+
justify-content: flex-start;
|
|
4346
|
+
}
|
|
4347
|
+
.\${P}-image-align-center.\${P}-align-entries .\${P}-item-image-link {
|
|
4348
|
+
justify-content: center;
|
|
4349
|
+
}
|
|
4350
|
+
.\${P}-image-align-bottom.\${P}-align-entries .\${P}-item-image-link {
|
|
4351
|
+
justify-content: flex-end;
|
|
4076
4352
|
}
|
|
4077
4353
|
.\${P}-lightbox-counter {
|
|
4078
4354
|
margin: 0;
|
|
@@ -4116,8 +4392,6 @@ type LightboxProps = {
|
|
|
4116
4392
|
items: GridMedia[];
|
|
4117
4393
|
index: number;
|
|
4118
4394
|
imageDisplay: 'fit' | 'cover';
|
|
4119
|
-
originRect: AnimRect | null;
|
|
4120
|
-
reverseClose: boolean;
|
|
4121
4395
|
onClose: () => void;
|
|
4122
4396
|
onPrev: () => void;
|
|
4123
4397
|
onNext: () => void;
|
|
@@ -4301,7 +4575,7 @@ function LightboxVideo({
|
|
|
4301
4575
|
);
|
|
4302
4576
|
}
|
|
4303
4577
|
|
|
4304
|
-
function Lightbox({ items, index, imageDisplay,
|
|
4578
|
+
function Lightbox({ items, index, imageDisplay, onClose, onPrev, onNext, counterClassName, counterStyle }: LightboxProps) {
|
|
4305
4579
|
const isCover = imageDisplay === 'cover';
|
|
4306
4580
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
4307
4581
|
const ghostRef = useRef<HTMLDivElement>(null);
|
|
@@ -4315,8 +4589,7 @@ function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClos
|
|
|
4315
4589
|
const navSwipeAnimatingRef = useRef(false);
|
|
4316
4590
|
const navSwipeCommitTimerRef = useRef<number | null>(null);
|
|
4317
4591
|
const [finalRect, setFinalRect] = useState<AnimRect | null>(null);
|
|
4318
|
-
const [phase, setPhase] = useState<'opening' | 'open' | 'closing'>(
|
|
4319
|
-
const [transitionsEnabled, setTransitionsEnabled] = useState(true);
|
|
4592
|
+
const [phase, setPhase] = useState<'opening' | 'open' | 'closing'>('opening');
|
|
4320
4593
|
const [swipeOffset, setSwipeOffset] = useState(0);
|
|
4321
4594
|
const [navSwipeOffset, setNavSwipeOffset] = useState(0);
|
|
4322
4595
|
const [navSwipeAnimating, setNavSwipeAnimating] = useState(false);
|
|
@@ -4412,7 +4685,6 @@ function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClos
|
|
|
4412
4685
|
if (prevIndexRef.current === index) return;
|
|
4413
4686
|
|
|
4414
4687
|
clearNavSwipeCommitTimer();
|
|
4415
|
-
setTransitionsEnabled(false);
|
|
4416
4688
|
setSwipeOffset(0);
|
|
4417
4689
|
setNavSwipeOffset(0);
|
|
4418
4690
|
setNavSwipeAnimatingState(false);
|
|
@@ -4454,7 +4726,6 @@ function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClos
|
|
|
4454
4726
|
isSwipingRef.current = false;
|
|
4455
4727
|
swipeDeltaXRef.current = 0;
|
|
4456
4728
|
swipeAxisRef.current = 'none';
|
|
4457
|
-
setTransitionsEnabled(false);
|
|
4458
4729
|
|
|
4459
4730
|
const ghost = ghostRef.current;
|
|
4460
4731
|
if (ghost) {
|
|
@@ -4591,14 +4862,8 @@ function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClos
|
|
|
4591
4862
|
|
|
4592
4863
|
const isOpen = phase === 'open';
|
|
4593
4864
|
const isClosing = phase === 'closing';
|
|
4594
|
-
const reverseAnimateClose = isClosing && reverseClose && !!originRect && !swipeDismiss;
|
|
4595
4865
|
const swipeBackdropOpacity = swipeOffset > 0 ? Math.max(0, 1 - swipeOffset / 500) : 1;
|
|
4596
4866
|
const swipeMediaOpacity = swipeOffset > 0 ? Math.max(0.35, 1 - swipeOffset / 500) : 1;
|
|
4597
|
-
const animatedRect = phase === 'opening'
|
|
4598
|
-
? (originRect ?? finalRect)
|
|
4599
|
-
: reverseAnimateClose
|
|
4600
|
-
? originRect
|
|
4601
|
-
: finalRect;
|
|
4602
4867
|
|
|
4603
4868
|
const handleVideoClick = (e: React.MouseEvent<HTMLVideoElement>) => {
|
|
4604
4869
|
e.stopPropagation();
|
|
@@ -4655,15 +4920,15 @@ function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClos
|
|
|
4655
4920
|
|
|
4656
4921
|
const mediaStyle: React.CSSProperties = {
|
|
4657
4922
|
position: 'fixed',
|
|
4658
|
-
top:
|
|
4659
|
-
left:
|
|
4660
|
-
width:
|
|
4661
|
-
height:
|
|
4923
|
+
top: finalRect?.top,
|
|
4924
|
+
left: finalRect?.left,
|
|
4925
|
+
width: finalRect?.width,
|
|
4926
|
+
height: finalRect?.height,
|
|
4662
4927
|
objectFit: imageDisplay === 'cover' ? 'cover' : 'contain',
|
|
4663
4928
|
transform: mediaTransform,
|
|
4664
4929
|
opacity: swipeOffset > 0
|
|
4665
4930
|
? swipeMediaOpacity
|
|
4666
|
-
:
|
|
4931
|
+
: phase === 'opening' || isClosing
|
|
4667
4932
|
? 0
|
|
4668
4933
|
: 1,
|
|
4669
4934
|
transition: (isSwiping && !navSwipeAnimating)
|
|
@@ -4672,11 +4937,9 @@ function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClos
|
|
|
4672
4937
|
? \`transform \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
|
|
4673
4938
|
: swipeDismiss
|
|
4674
4939
|
? \`transform \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
|
|
4675
|
-
:
|
|
4940
|
+
: phase === 'opening' || isClosing
|
|
4676
4941
|
? \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
|
|
4677
|
-
:
|
|
4678
|
-
? \`top \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, left \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, width \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, height \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
|
|
4679
|
-
: 'none',
|
|
4942
|
+
: 'none',
|
|
4680
4943
|
pointerEvents: isCurrentVideo && isOpen && !isHorizontalNavActive ? 'auto' : 'none',
|
|
4681
4944
|
touchAction: isCurrentVideo && isOpen ? 'none' : undefined,
|
|
4682
4945
|
zIndex: 9998,
|
|
@@ -4786,7 +5049,7 @@ function Lightbox({ items, index, imageDisplay, originRect, reverseClose, onClos
|
|
|
4786
5049
|
)}
|
|
4787
5050
|
</div>
|
|
4788
5051
|
|
|
4789
|
-
{
|
|
5052
|
+
{finalRect && currentItem && (
|
|
4790
5053
|
isCurrentVideo ? (
|
|
4791
5054
|
<LightboxVideo
|
|
4792
5055
|
key={\`\${index}-\${currentItem.url}\`}
|
|
@@ -4904,6 +5167,7 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
4904
5167
|
lightboxCounterTextAppearance,
|
|
4905
5168
|
showText = 'always',
|
|
4906
5169
|
alignEntries = 'off',
|
|
5170
|
+
align = 'top',
|
|
4907
5171
|
} = settings;
|
|
4908
5172
|
|
|
4909
5173
|
const resolvedTitleTextStyle: TextStyles = {
|
|
@@ -5017,8 +5281,8 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
5017
5281
|
};
|
|
5018
5282
|
|
|
5019
5283
|
const imageWrapperClassName = \`\${P}-item-image-wrapper\${isFitSlider ? \` \${P}-item-image-wrapper-fit-slider\` : ''}\`.trim();
|
|
5020
|
-
const
|
|
5021
|
-
const shouldAlignEntries =
|
|
5284
|
+
const isTextBeforeImage = type === 'd' || type === 'e' || type === 'f';
|
|
5285
|
+
const shouldAlignEntries = alignEntries === 'on';
|
|
5022
5286
|
const textBoxWidthStyle = \`calc(\${scalingValue(size ?? 0, isEditor)} * (\${textBoxWidth} / 100))\`;
|
|
5023
5287
|
const controlWidthStyle = scalingValue(size * textBoxWidth / 100, isEditor);
|
|
5024
5288
|
|
|
@@ -5066,15 +5330,11 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
5066
5330
|
const [lightboxOpen, setLightboxOpen] = useState(false);
|
|
5067
5331
|
const [lightboxItems, setLightboxItems] = useState<GridMedia[]>([]);
|
|
5068
5332
|
const [lightboxIndex, setLightboxIndex] = useState(0);
|
|
5069
|
-
const [lightboxOriginRect, setLightboxOriginRect] = useState<AnimRect | null>(null);
|
|
5070
|
-
|
|
5071
5333
|
const canOpenLightboxMedia = lightbox === 'on' && (!isEditor || isPreviewMode);
|
|
5072
5334
|
|
|
5073
|
-
const openLightbox = (
|
|
5335
|
+
const openLightbox = (items: GridMedia[], idx: number) => {
|
|
5074
5336
|
if (isEditor && !isPreviewMode) return;
|
|
5075
5337
|
if (lightbox === 'off') return;
|
|
5076
|
-
const r = e.currentTarget.getBoundingClientRect();
|
|
5077
|
-
setLightboxOriginRect({ top: r.top, left: r.left, width: r.width, height: r.height });
|
|
5078
5338
|
setLightboxItems(items);
|
|
5079
5339
|
setLightboxIndex(idx);
|
|
5080
5340
|
setLightboxOpen(true);
|
|
@@ -5093,7 +5353,6 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
5093
5353
|
useEffect(() => {
|
|
5094
5354
|
if (!isEditor || isPreviewMode) return;
|
|
5095
5355
|
setLightboxOpen(false);
|
|
5096
|
-
setLightboxOriginRect(null);
|
|
5097
5356
|
}, [isEditor, isPreviewMode]);
|
|
5098
5357
|
|
|
5099
5358
|
const scopedCss = useMemo(() => getCSS(P), [P]);
|
|
@@ -5104,7 +5363,7 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
5104
5363
|
<div style={colorVars}>
|
|
5105
5364
|
<div
|
|
5106
5365
|
ref={containerRef}
|
|
5107
|
-
className={\`\${P}-wrapper \${P}-type-\${type}\${shouldAlignEntries ? \` \${P}-align-entries\` : ''} \${wrapperStateClasses}\`.trim()}
|
|
5366
|
+
className={\`\${P}-wrapper \${P}-type-\${type}\${shouldAlignEntries ? \` \${P}-align-entries\` : ''} \${P}-image-align-\${align} \${wrapperStateClasses}\`.trim()}
|
|
5108
5367
|
style={{
|
|
5109
5368
|
gridTemplateColumns: \`repeat(\${gridLayout.columnsCount}, minmax(0, 1fr))\`,
|
|
5110
5369
|
rowGap: shouldAlignEntries ? 0 : scalingValue(verticalGap ?? 0, isEditor),
|
|
@@ -5121,7 +5380,7 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
5121
5380
|
const isLastRow = Math.floor(index / gridLayout.columnsCount)
|
|
5122
5381
|
=== Math.ceil(cropContent.length / gridLayout.columnsCount) - 1;
|
|
5123
5382
|
|
|
5124
|
-
const typeCTextBlock =
|
|
5383
|
+
const typeCTextBlock = isTextBeforeImage ? (
|
|
5125
5384
|
<div className={\`\${P}-item-text-block\`}>
|
|
5126
5385
|
{hasTitle && (
|
|
5127
5386
|
<p className={titleTextClassName} style={{ width: textBoxWidthStyle, ...titleFieldCss, ...titleTextLeadingVars }}>
|
|
@@ -5156,14 +5415,24 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
5156
5415
|
</div>
|
|
5157
5416
|
) : null;
|
|
5158
5417
|
|
|
5159
|
-
const titleRow =
|
|
5418
|
+
const titleRow = shouldAlignEntries ? (
|
|
5160
5419
|
<div className={\`\${P}-item-title-row\`}>
|
|
5420
|
+
{!isTextBeforeImage && (
|
|
5421
|
+
<div
|
|
5422
|
+
data-controls={isEditMode && hasTitle ? 'titleMarginTop' : undefined}
|
|
5423
|
+
className={isEditMode && hasTitle ? \`\${P}-control\` : undefined}
|
|
5424
|
+
style={{
|
|
5425
|
+
height: hasTitle ? scalingValue(titleMarginTop ?? 0, isEditor) : 0,
|
|
5426
|
+
width: controlWidthStyle,
|
|
5427
|
+
}}
|
|
5428
|
+
/>
|
|
5429
|
+
)}
|
|
5161
5430
|
{hasTitle && (
|
|
5162
5431
|
<p className={titleTextClassName} style={{ width: textBoxWidthStyle, ...titleFieldCss, ...titleTextLeadingVars }}>
|
|
5163
5432
|
{item.title}
|
|
5164
5433
|
</p>
|
|
5165
5434
|
)}
|
|
5166
|
-
{hasTitle && (
|
|
5435
|
+
{isTextBeforeImage && hasTitle && (
|
|
5167
5436
|
<div
|
|
5168
5437
|
data-controls={isEditMode ? 'titleMarginTop' : undefined}
|
|
5169
5438
|
className={isEditMode ? \`\${P}-control\` : undefined}
|
|
@@ -5176,14 +5445,24 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
5176
5445
|
</div>
|
|
5177
5446
|
) : null;
|
|
5178
5447
|
|
|
5179
|
-
const subtitleRow =
|
|
5448
|
+
const subtitleRow = shouldAlignEntries ? (
|
|
5180
5449
|
<div className={\`\${P}-item-subtitle-row\`}>
|
|
5450
|
+
{!isTextBeforeImage && (
|
|
5451
|
+
<div
|
|
5452
|
+
data-controls={isEditMode && hasSubtitle ? 'subtitleMarginTop' : undefined}
|
|
5453
|
+
className={isEditMode && hasSubtitle ? \`\${P}-control\` : undefined}
|
|
5454
|
+
style={{
|
|
5455
|
+
height: hasSubtitle ? scalingValue(subtitleMarginTop ?? 0, isEditor) : 0,
|
|
5456
|
+
width: controlWidthStyle,
|
|
5457
|
+
}}
|
|
5458
|
+
/>
|
|
5459
|
+
)}
|
|
5181
5460
|
{hasSubtitle && (
|
|
5182
5461
|
<p className={subtitleTextClassName} style={{ width: textBoxWidthStyle, ...subtitleFieldCss, ...subtitleTextLeadingVars }}>
|
|
5183
5462
|
{item.subtitle}
|
|
5184
5463
|
</p>
|
|
5185
5464
|
)}
|
|
5186
|
-
{hasSubtitle && (
|
|
5465
|
+
{isTextBeforeImage && hasSubtitle && (
|
|
5187
5466
|
<div
|
|
5188
5467
|
data-controls={isEditMode ? 'subtitleMarginTop' : undefined}
|
|
5189
5468
|
className={isEditMode ? \`\${P}-control\` : undefined}
|
|
@@ -5230,14 +5509,14 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
5230
5509
|
className={\`\${P}-item-\${isVideoMedia(displayMedia) ? 'video' : 'image'}\`.trim()}
|
|
5231
5510
|
style={imageStyle}
|
|
5232
5511
|
onMediaClick={canOpenLightboxMedia && lightboxIndex >= 0
|
|
5233
|
-
? (
|
|
5512
|
+
? () => openLightbox(lightboxItemsForEntry, lightboxIndex)
|
|
5234
5513
|
: undefined}
|
|
5235
5514
|
/>
|
|
5236
5515
|
);
|
|
5237
5516
|
})()
|
|
5238
5517
|
:
|
|
5239
5518
|
<>
|
|
5240
|
-
{isFitSlider && (
|
|
5519
|
+
{isFitSlider && shouldAlignEntries && (
|
|
5241
5520
|
<div className={\`\${P}-item-image-wrapper-sizer\`} aria-hidden="true">
|
|
5242
5521
|
{displayItems.map(({ displayMedia }) => (
|
|
5243
5522
|
isVideoMedia(displayMedia) ? (
|
|
@@ -5292,7 +5571,7 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
5292
5571
|
className={\`\${P}-item-\${isVideoMedia(displayMedia) ? 'video' : 'image'}\`.trim()}
|
|
5293
5572
|
style={imageStyle}
|
|
5294
5573
|
onMediaClick={canOpenLightboxMedia && lightboxIndex >= 0
|
|
5295
|
-
? (
|
|
5574
|
+
? () => openLightbox(lightboxItemsForEntry, lightboxIndex)
|
|
5296
5575
|
: undefined}
|
|
5297
5576
|
/>
|
|
5298
5577
|
</SplideSlide>
|
|
@@ -5304,7 +5583,7 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
5304
5583
|
</div>
|
|
5305
5584
|
);
|
|
5306
5585
|
|
|
5307
|
-
const typeABText = !
|
|
5586
|
+
const typeABText = !isTextBeforeImage ? (
|
|
5308
5587
|
<>
|
|
5309
5588
|
<div
|
|
5310
5589
|
data-controls={isEditMode && hasTitle ? 'titleMarginTop' : undefined}
|
|
@@ -5352,17 +5631,40 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
5352
5631
|
>
|
|
5353
5632
|
{shouldAlignEntries ? (
|
|
5354
5633
|
<>
|
|
5355
|
-
{
|
|
5634
|
+
{isTextBeforeImage ? (
|
|
5635
|
+
<>
|
|
5636
|
+
{alignedTextRows}
|
|
5637
|
+
<a href={itemLink} target="_blank" className={\`\${P}-item-image-link\`}>
|
|
5638
|
+
{imageContent}
|
|
5639
|
+
</a>
|
|
5640
|
+
</>
|
|
5641
|
+
) : (
|
|
5642
|
+
<>
|
|
5643
|
+
<a href={itemLink} target="_blank" className={\`\${P}-item-image-link\`}>
|
|
5644
|
+
{imageContent}
|
|
5645
|
+
</a>
|
|
5646
|
+
{alignedTextRows}
|
|
5647
|
+
</>
|
|
5648
|
+
)}
|
|
5649
|
+
</>
|
|
5650
|
+
) : itemLink ? (
|
|
5651
|
+
<>
|
|
5356
5652
|
<a href={itemLink} target="_blank" className={\`\${P}-item-image-link\`}>
|
|
5653
|
+
{typeCTextBlock}
|
|
5357
5654
|
{imageContent}
|
|
5358
5655
|
</a>
|
|
5656
|
+
{!isTextBeforeImage && (
|
|
5657
|
+
<a href={itemLink} target="_blank" className={\`\${P}-item-text-link\`}>
|
|
5658
|
+
{typeABText}
|
|
5659
|
+
</a>
|
|
5660
|
+
)}
|
|
5359
5661
|
</>
|
|
5360
5662
|
) : (
|
|
5361
|
-
|
|
5663
|
+
<>
|
|
5362
5664
|
{typeCTextBlock}
|
|
5363
5665
|
{imageContent}
|
|
5364
5666
|
{typeABText}
|
|
5365
|
-
|
|
5667
|
+
</>
|
|
5366
5668
|
)}
|
|
5367
5669
|
</div>
|
|
5368
5670
|
</div>
|
|
@@ -5377,8 +5679,6 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
|
|
|
5377
5679
|
items={lightboxItems}
|
|
5378
5680
|
index={lightboxIndex}
|
|
5379
5681
|
imageDisplay={resolveLightboxImageDisplay(lightboxImageDisplay)}
|
|
5380
|
-
originRect={lightboxOriginRect}
|
|
5381
|
-
reverseClose={slider === 'off'}
|
|
5382
5682
|
onClose={() => setLightboxOpen(false)}
|
|
5383
5683
|
onPrev={() => setLightboxIndex((prev) => (prev - 1 + lightboxItems.length) % lightboxItems.length)}
|
|
5384
5684
|
onNext={() => setLightboxIndex((prev) => (prev + 1) % lightboxItems.length)}
|
|
@@ -5401,7 +5701,7 @@ type GridLayoutConfig = {
|
|
|
5401
5701
|
};
|
|
5402
5702
|
|
|
5403
5703
|
type GridSettings = {
|
|
5404
|
-
type: 'a' | 'b' | 'c';
|
|
5704
|
+
type: 'a' | 'b' | 'c' | 'd' | 'e' | 'f';
|
|
5405
5705
|
gridLayout: GridLayoutConfig;
|
|
5406
5706
|
textBoxWidth: number;
|
|
5407
5707
|
verticalGap: number;
|
|
@@ -5419,6 +5719,7 @@ type GridSettings = {
|
|
|
5419
5719
|
transition: 'fade' | 'slide',
|
|
5420
5720
|
showText: 'always' | 'on hover';
|
|
5421
5721
|
alignEntries: 'on' | 'off';
|
|
5722
|
+
align?: 'top' | 'center' | 'bottom';
|
|
5422
5723
|
titleMarginTop: number;
|
|
5423
5724
|
subtitleMarginTop: number;
|
|
5424
5725
|
titleColor: string;
|
|
@@ -5459,7 +5760,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
|
|
|
5459
5760
|
};
|
|
5460
5761
|
|
|
5461
5762
|
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
5462
|
-
`,sr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},vp=["titleColor","subtitleColor","lightboxCounterColor"],bp={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},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:"Flying Over the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Doors of Matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"City Through the Cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Private Stone Gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Leaving the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Under the Sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Citygates View",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Around the City",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",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"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gap",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...sr.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:{...sr.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:{...sr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"on",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"a",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.0506,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{type:"a",gridLayout:{entryWidth:.0833,horizontalGap:0,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignEntries.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.alignEntries.display.visible",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","entriesCount","lightbox","imageDisplay","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap","showText"]},{type:"row",title:"",items:["alignEntries"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...vp],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},xp={element:gp,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:[]},schema:bp,sourceCode:yp},Ma=12;function wp(e,t="50%"){const n={position:"absolute",width:Ma,height:Ma,pointerEvents:"auto"};return e==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:e==="center-x"?{...n,left:"50%",top:t,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function _t({className:e,areaStyle:t,hitPlacement:n,centerXHitTop:i,...o}){return r.jsx("div",{className:e,style:{...t,pointerEvents:"none"},"data-controls-center-only-drag":"",...o,children:r.jsx("div",{style:wp(n,i)})})}function Sp(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 $p({media:e,className:t,style:n}){const i=l.useRef(null);return l.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const s=o.play();s&&s.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?r.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:t,src:e.url,alt:"",style:n})}function xo(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Cp(e){return String(e??"").trim().length>0}function ka(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function _a(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Wa(e,t,n,i,o,s,a){const u=P.scalingValue(s,a),c=P.scalingValue(0,a),m=e===0,p=e===t-1&&!o;return{borderTopWidth:m&&n?u:c,borderBottomWidth:!p||i?u:c}}function Tp(e,t,n){const i=P.scalingValue(t,n),o=P.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Fa=10;function Lp(e){return`
|
|
5763
|
+
`,sr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},vp=["titleColor","subtitleColor","lightboxCounterColor"],bp={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},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:"Flying Over the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Doors of Matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"City Through the Cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Private Stone Gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Leaving the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Under the Sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Citygates View",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Around the City",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",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:"Gap",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},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"}}},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:{...sr.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:{...sr.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:{...sr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"on",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:"a",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.0506,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{type:"a",gridLayout:{entryWidth:.0833,horizontalGap:0,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"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","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"]},{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:[...vp],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},xp={element:gp,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:[]},schema:bp,sourceCode:yp},ka=12;function wp(e,t="50%"){const n={position:"absolute",width:ka,height:ka,pointerEvents:"auto"};return e==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:e==="center-x"?{...n,left:"50%",top:t,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function Wt({className:e,areaStyle:t,hitPlacement:n,centerXHitTop:i,...o}){return r.jsx("div",{className:e,style:{...t,pointerEvents:"none"},"data-controls-center-only-drag":"",...o,children:r.jsx("div",{style:wp(n,i)})})}function $p(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 Sp({media:e,className:t,style:n}){const i=l.useRef(null);return l.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const s=o.play();s&&s.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?r.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:t,src:e.url,alt:"",style:n})}function xo(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Cp(e){return String(e??"").trim().length>0}function Ma(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function _a(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Wa(e,t,n,i,o,s,a){const u=L.scalingValue(s,a),c=L.scalingValue(0,a),m=e===0,p=e===t-1&&!o;return{borderTopWidth:m&&n?u:c,borderBottomWidth:!p||i?u:c}}function Tp(e,t,n){const i=L.scalingValue(t,n),o=L.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Fa=10;function Lp(e){return`
|
|
5463
5764
|
.${e}-wrapper {
|
|
5464
5765
|
display: grid;
|
|
5465
5766
|
align-items: start;
|
|
@@ -5890,7 +6191,7 @@ a.${e}-list-item {
|
|
|
5890
6191
|
overflow-wrap: anywhere;
|
|
5891
6192
|
word-break: break-word;
|
|
5892
6193
|
}
|
|
5893
|
-
`}const An=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Yr=["AColumn","BColumn","CColumn","DColumn","EColumn"],bn="cutLabel",Jr=[...Yr,bn],Vo=["A","B","C","D","E"];function Ds(e){return`${e}ColumnVerticalAlign`}const Tr=["Top","Center","Bottom"];function Zr(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Vo.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Ep(e){const t=Zr(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Ip(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Vo.includes(n)?n:null}function qs(e,t,n){const i=Ip(e);return i?i===t?!1:Ep(n[Ds(i)]):!0}function _i(e){const t=Zr(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Vo.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Pp(e,t,n){if(Ks(e,t,n))return _i(e);const i=_i(e);return i.kind==="baseline"?{kind:"top"}:i}function Rp(e){const t=_i(e);return t.kind==="baseline"?{kind:"top"}:t}function Ks(e,t,n){return qs(e,n,t)?_i(e).kind==="baseline":!1}function Ap(e){const t={};let n=!1;for(const i of Vo){const o=Ds(i),s=e[o];if(e.type==="b"){const a=String(s??"Top").trim();a!=="Top"&&a!=="Center"&&a!=="Bottom"&&(t[o]="Top",n=!0);continue}qs(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function Mp(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function kp(e){const t=_i(e).kind;return t==="baseline"?"center":t}function _p(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Na(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Wp(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),s=o-i;return n.remove(),s}function lr(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const a=Wp(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+a;const u=s.getBoundingClientRect(),c=o.getBoundingClientRect().height;let m=0;return e.kind==="center"?m=(u.height-c)/2:e.kind==="bottom"&&(m=u.height-c),u.top-t+m+a}function Fp(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const s=o.querySelector(`.${n}`);s&&(s.style.minHeight=`${i}px`,s.style.height=`${i}px`)}),i)}function Np(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Hp={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Ze(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Op={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Bp(e){return[Ze(e,"textFontFamily"),Ze(e,"textFontSettings"),{type:"row",items:[Ze(e,"textFontSize"),Ze(e,"textLineHeight"),Ze(e,"textLetterSpacing"),Ze(e,"textWordSpacing")]},Ze(e,"textTextAlign"),Ze(e,"textTextAppearance"),`${e}VerticalAlign`]}function jp(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Jr.map(e=>[Op[e],Bp(e)]))}}function Po(e,t){const n=i=>{const o=Ze(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===bn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Ha(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 Ut(Rt(n,t))}function Oa(e,t,n,i){const o=Po(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a!==void 0&&a<s?`${n} ${i}`:n}function Ba(e,t,n,i){const o=Po(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a===void 0||a>=s?{}:{[`--${n}-title-leading-gap`]:P.scalingValue((s-a)/2,i)}}const Xt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],pi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],mi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],gi=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],zp={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Vp=["hover","focus","filled","success","error"],ja=.004,oi=.004,cr=oi,Qr=50,Wi=1440,Fi=Qr/Wi;function Gs(e){const t=typeof e=="number"&&e>0?e:Wi;return Qr/t}function Dp(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const o=parseFloat(n);if(Number.isFinite(o)&&o>0)return o}const i=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(i){const o=parseFloat(i);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return Wi}const Us={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Ti(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function qp(e,t=1){const n=t/e;return Object.fromEntries(Xt.map(i=>[i,n]))}function Kp(){return Object.fromEntries([...pi.map(e=>[e,0]),...mi.map(e=>[e,0])])}function Gp(){return Object.fromEntries(gi.map(e=>[e,0]))}function ao(e){return Object.fromEntries(Xt.map(t=>[t,typeof e[t]=="number"?e[t]:Us[t]]))}function Xs(e,t,n){const i=e-Fi,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const s=i/o;return{paddingLeft:t*s,paddingRight:n*s}}function wo(e,t,n){const i=ea(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((s,a)=>s+a,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function Up(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=pi[o],a=mi[o],u=typeof n[s]=="number"?n[s]:0,c=typeof n[a]=="number"?n[a]:0,m=Xs(t[o]??0,u,c);m.paddingLeft!==u&&(i[s]=m.paddingLeft),m.paddingRight!==c&&(i[a]=m.paddingRight)}return i}function ea(e,t,n){if(e<=0)return[];const i=Xt.slice(0,e).map(m=>n[m]);if(e===1)return i;const o=i.slice(0,e-1),a=o.reduce((m,p)=>m+p,0)+Fi;if(t>=a)return i;const u=[...o];let c=a-t;for(let m=u.length-1;m>=0&&c>0;m-=1){const p=u[m]-Fi;if(p<=0)continue;const R=Math.min(c,p);u[m]-=R,c-=R}return[...u,i[e-1]]}function Xp(e,t,n){if(e<=1)return{};const i=ea(e,t,n),o={};for(let s=0;s<e-1;s+=1){const a=Xt[s];i[s]!==n[a]&&(o[a]=i[s])}return o}function za(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...An]}function Yp(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function Jp(e,t,n,i){const o=Math.min(i,e.length,Xt.length),s={};for(let a=0;a<o;a+=1){const u=e[a],c=t.indexOf(u);if(c===-1)continue;const m=Xt[c],p=pi[c],R=mi[c],b=gi[c],I=Xt[a],g=pi[a],v=mi[a],T=gi[a],w=n[m],$=n[p],S=n[R],z=n[b];typeof w=="number"&&(s[I]=w),typeof $=="number"&&(s[g]=$),typeof S=="number"&&(s[v]=S),typeof z=="number"&&(s[T]=z)}return s}function Ys(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 Zp(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=Ti(e),s=e.type==="b"||e.type===void 0&&t.type==="b",a={...e,...qp(n,o),...Kp()};if(s)for(const u of gi)typeof t[u]=="number"&&(a[u]=t[u]);else Object.assign(a,Gp());return Ys(e,a)?a:e}function Qp(e,t,n){const i=Ap(e);i&&(e={...e,...i});const o=Gs(n==null?void 0:n.designWidth),s=e.columns,a=t.columns,u=Ti(e),c=Ti(t),m=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof s=="number"?s:typeof a=="number"?a:An.length,R=S=>{if(m)return S;const z=ao({...t,...S}),M=Ti(S),N=wo(p,M,z),L=Up(p,N,{...t,...S});return Object.keys(L).length===0?S:{...S,...L}};if(typeof s=="number"&&s!==a)return e;const b=za(e),I=za(t);if(!Yp(b,I))return R({...e,...Jp(b,I,t,p)});if(u<c&&typeof p=="number"&&!m){const S=ao({...t,...e});return R({...e,...Xp(p,u,S)})}if(m){const S=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,z=Math.max(0,(u-o)/2);return S>z?{...e,textPaddingLR:z}:e}const g=ao({...t,...e}),v=wo(p,c,ao(t)),w=wo(p,u,g).some((S,z)=>S<(v[z]??S)),$=Xt.some(S=>{const z=e[S],M=t[S];return typeof z=="number"&&typeof M=="number"&&z!==M});return w||$?R(e):e}function em(e,t,n,i){const o=t.slice(0,e).reduce((a,u)=>a+u,0),s=n.slice(e+1,t.length-1).reduce((a,u)=>a+u,0);return Math.max(Fi,i-o-s-Fi)}function tm(e,t){return Math.random()*(t-e)+e}function nm(e){return Object.fromEntries(Xt.map(t=>[t,typeof e[t]=="number"?e[t]:Us[t]]))}function dr(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function im(e,t,n,i,o,s){return e.slice(0,t).map((a,u)=>{const c=pi[u],m=mi[u],p=gi[u];return{key:a,textPrefix:Hp[a],widthKey:Xt[u],width:n[Xt[u]],paddingLeftKey:c,paddingRightKey:m,paddingBottomKey:p,paddingLeft:i[c],paddingRight:o[m],paddingBottom:s[p]}})}function om({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:a,onUpdateSettings:u}){const{prefix:c}=P.useScopedStyles(),m=!!o,{columns:p,type:R,wrapperWidth:b,entriesCount:I,cellMinHeight:g,dividerWidth:v,showVisibility:T,cut:w,showCut:$,cutCellMinHeight:S,cutLabel:z,imageSize:M,imageOnHover:N,entryHoverEffect:L,entryHoverShowOption:C,rowPaddingTop:J,rowPaddingBottom:y,rowPaddingTopB:k,columnsOrder:_,textPaddingLR:V,textColor:ne,backgroundColor:me,dividerColor:K,textHoverColor:H,backgroundHoverColor:Q,dividerHoverColor:Y}=e,[O,te]=l.useState(void 0),[ce,oe]=l.useState(null),W=N==="on"&&(!n||i),ue=(w??0)>0,h=R==="b",ae=l.useRef(null),be=l.useRef(null),[ye,Ae]=l.useState(null),[Z,ge]=l.useState(Wi),U=Gs(Z),X=Math.max(0,((b??0)-U)/2),B=Math.min(V??0,X),se=Math.max(B,oi),Ee=((b??0)+U)/2;l.useLayoutEffect(()=>{if(!n){ge(Wi);return}const le=()=>{ge(Dp(ae.current))};le();const xe=ae.current;if(!xe)return;const Pe=new ResizeObserver(le);Pe.observe(xe);let Ne=xe;for(;Ne&&!Ne.style.getPropertyValue("--cntrl-article-width");)Ne=Ne.parentElement;return Ne&&Pe.observe(Ne),()=>Pe.disconnect()},[n,a]),l.useEffect(()=>{te(void 0)},[w,$,t,I]),l.useEffect(()=>{n&&!i&&te(void 0)},[n,i]);const Fe=P.buildColorVars(c,{textColor:ne,backgroundColor:me,dividerColor:K,textHoverColor:H,backgroundHoverColor:Q,dividerHoverColor:Y},zp,Vp),Re=s&&s!=="default"?`${c}-state-${s}`:"",_e=`${!n||i?L==="default"?`${c}-entry-hover-default`:L==="blinds"?`${c}-entry-hover-blinds`:L==="reveal"?`${c}-entry-hover-reveal`:"":""} ${Re}`.trim(),F=L==="reveal"&&(!n||i),D=(T==null?void 0:T[0])??!1,E=(T==null?void 0:T[1])??!1,j=l.useRef(e),G=l.useRef(a);l.useEffect(()=>{if(!u||!n){j.current=e,G.current=a;return}if(G.current!==a){j.current=e,G.current=a;return}const le=j.current;if(!(le!==e))return;if(typeof le.columns=="number"&&typeof e.columns=="number"&&le.columns!==e.columns){j.current=e;return}const Pe=Qp(e,le,{designWidth:Z});j.current=e,Ys(e,Pe)&&u(Pe)},[e,u,n,a,Z]);const ee=l.useMemo(()=>nm(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ie=l.useMemo(()=>dr(e,pi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),he=l.useMemo(()=>dr(e,mi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Se=l.useMemo(()=>dr(e,gi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),$e=l.useMemo(()=>Array.isArray(_)&&_.length>0?_:[...An],[_]),fe=l.useMemo(()=>im($e,p,ee,ie,he,Se),[$e,p,ee,ie,he,Se]),Ge=Ti(e),de=l.useMemo(()=>Xt.slice(0,p).map(le=>ee[le]),[p,ee]),Me=l.useMemo(()=>ea(p,Ge,ee),[p,Ge,ee]),je=l.useMemo(()=>wo(p,Ge,ee),[p,Ge,ee]),Ve=l.useMemo(()=>fe.map((le,xe)=>Xs(je[xe]??0,le.paddingLeft,le.paddingRight)),[fe,je]),at=l.useMemo(()=>{const le=I===0?1/0:I;return(t??[]).slice(0,le).map((Pe,Ne)=>({id:Ne,cells:Object.fromEntries(An.map(tt=>[tt,Pe[tt]??""])),image:Pe.image,link:Pe.link}))},[t,I]),ht=ue?O??w:at.length,Et=l.useMemo(()=>ue?at.slice(0,ht):at,[at,ue,ht]),mt=ue&&ht<at.length,ft=Et.length>1||mt,Ft=[D?`${c}-divider-top`:"",E||ft?`${c}-divider-bottom`:""].filter(Boolean).join(" "),It=!n||i,Ue=()=>{if(!It)return;const le=O??w;if(!$){te(at.length);return}te(Math.min(le+$,at.length))},Ce=le=>P.scalingValue(le,n??!1),qe=h?k??0:J??0,Qe=y??0,Oe=g??0,$t=qe+Oe/2,At=Math.max(Qe,cr),Je=Wa(0,Et.length,D,E,mt,v??0,n??!1).borderTopWidth,Mt=ye!=null?`${ye}px`:`calc(${Je} + ${Ce($t)})`,Ht=h?"rowPaddingTopB":"rowPaddingTop",We=fe[0],yt=fe[fe.length-1],et=Ve[0],Xe=Ve[Ve.length-1],ot=We&&et?Math.max(et.paddingLeft,oi):0,ut=yt&&Xe?Math.max(Xe.paddingRight,oi):0,un=Ge,rn=le=>{const xe=ae.current;if(!xe)return{x:0,y:0};const Pe=xe.getBoundingClientRect();return{x:le.clientX-Pe.left+Fa,y:le.clientY-Pe.top+Fa}},Wn=(le,xe)=>{if(!W)return;const Pe=le.image;if(!(Pe!=null&&Pe.url)){oe(null);return}const{x:Ne,y:tt}=rn(xe),bt=(M==null?void 0:M.min)??80,Te=(M==null?void 0:M.max)??320,it=(ce==null?void 0:ce.rowId)===le.id?ce.widthPx:tm(bt,Te);oe({rowId:le.id,url:Pe.url,objectFit:"contain",isVideo:Sp(Pe),widthPx:it,x:Ne,y:tt})},nt=le=>{if(!W||!ce)return;const{x:xe,y:Pe}=rn(le);oe(Ne=>!Ne||Ne.x===xe&&Ne.y===Pe?Ne:{...Ne,x:xe,y:Pe})},an=()=>{oe(null)},Vt=le=>{F&&ka(le,c),W&&oe(null)},jt=le=>{F&&_a(le,c)};l.useLayoutEffect(()=>{if(!m||h){Ae(null);return}const le=be.current,xe=le==null?void 0:le.parentElement;if(!le||!xe){Ae(null);return}const Pe=()=>{const tt=le.querySelector("[data-list-row]");if(!tt){Ae(null);return}const bt=xe.getBoundingClientRect(),Te=tt.getBoundingClientRect();Ae(Te.top-bt.top+Te.height/2)};Pe();const Ne=new ResizeObserver(Pe);return Ne.observe(le),Ne.observe(xe),()=>Ne.disconnect()},[m,h,Et,qe,Qe,Oe,t,e,fe,je,Z,v,D,E,mt]);const ze=l.useMemo(()=>!h&&Yr.some(le=>{const xe=le.charAt(0),Pe=e[`${le}VerticalAlign`];return Ks(Pe,e,xe)}),[h,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);l.useLayoutEffect(()=>{var it;const le=ae.current;if(!le)return;const xe=()=>{le.querySelectorAll("[data-list-col]").forEach(De=>{De.style.transform="";const rt=De.querySelector(`.${c}-list-col`);rt&&(rt.style.minHeight="",rt.style.height="");const pt=De.querySelector(`.${c}-list-col-title`);pt&&(pt.style.transform="")})};if(h||!ze){xe();return}const Pe=()=>{const De=Array.from(le.querySelectorAll("[data-list-row]")),rt=`${c}-list-col`,pt=`${c}-baseline-probe`;De.forEach(kt=>{kt.querySelectorAll("[data-list-col]").forEach(St=>{St.style.transform="";const Be=St.querySelector(`.${rt}`);Be&&(Be.style.minHeight="",Be.style.height="");const xt=St.querySelector(`.${c}-list-col-title`);xt&&(xt.style.transform="")})}),De.forEach(kt=>{const St=Array.from(kt.querySelectorAll("[data-list-col]"));Fp(kt,St,rt)}),le.offsetHeight,De.forEach(kt=>{const St=Array.from(kt.querySelectorAll("[data-list-col]")),Be=kt.getBoundingClientRect().top,xt=new Map,Ct=St.map(dt=>{const Ot=dt.querySelector(`.${c}-list-col-title`),Wt={el:dt,titleEl:Ot,letter:dt.getAttribute("data-col-letter")??"",kind:dt.getAttribute("data-valign")??"top",anchor:dt.getAttribute("data-valign-anchor")};return xt.set(Wt.letter,Wt),Wt}),wt=new Map,Dt=(dt,Ot)=>{const Wt=wt.get(dt.letter);if(Wt!==void 0)return Wt;const pn=dt.anchor?xt.get(dt.anchor):void 0;if(dt.kind!=="baseline"||!pn||Ot.has(dt.letter)){const Xn=lr(dt,Be,rt,pt);return wt.set(dt.letter,Xn),Xn}Ot.add(dt.letter);const $n=Dt(pn,Ot);Ot.delete(dt.letter);const mn=lr(dt,Be,rt,pt),qt=$n-mn;Np(dt.titleEl,qt);const Cn=lr(dt,Be,rt,pt);return wt.set(dt.letter,Cn),Cn};Ct.forEach(dt=>Dt(dt,new Set))})};let Ne=null;const tt=()=>{Ne===null&&(Ne=requestAnimationFrame(()=>{Ne=null,Pe()}))};Pe();const bt=new ResizeObserver(()=>tt());bt.observe(le);let Te=!1;return typeof document<"u"&&((it=document.fonts)!=null&&it.ready)&&document.fonts.ready.then(()=>{Te||tt()}),()=>{Te=!0,Ne!==null&&(cancelAnimationFrame(Ne),Ne=null),bt.disconnect(),xe()}},[ze,h,e,t,Z,Et,je]);const vt=l.useMemo(()=>Lp(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:vt}}),r.jsx("div",{style:Fe,children:r.jsxs("div",{ref:ae,className:`${c}-wrapper ${_e}${Ft?` ${Ft}`:""}${h?` ${c}-type-b`:""}`.trim(),style:{width:P.scalingValue(b??0,n),...!h&&m?{[`--${c}-first-entry-handle-top`]:Mt}:{}},onMouseMove:W?nt:void 0,onMouseLeave:W?an:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[Et.map((le,xe)=>{var bt;const Pe=(((bt=le.link)==null?void 0:bt.length)??0)>0,Ne=Pe&&(!n||i)?"a":"div",tt=Wa(xe,Et.length,D,E,mt,v??0,n??!1);return r.jsxs(Ne,{ref:xe===0?Te=>{be.current=Te}:void 0,className:`${c}-list-item${Pe||C==="always"?` ${c}-list-item-has-link`:""}`,...Pe?{href:le.link,target:"_blank"}:{},style:tt,onMouseEnter:Te=>{F&&(Pe||C==="always")&&ka(Te,c),W&&Wn(le,Te)},onMouseLeave:Te=>{F&&(Pe||C==="always")&&_a(Te,c)},children:[qe>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ce(qe)}}),r.jsxs("div",{className:`${c}-list-cols-row${h?"":` ${c}-list-cols-row-h`}${m&&xe===0&&h?` ${c}-list-cols-row-controls`:""}`,...h?{}:{"data-list-row":""},style:h?void 0:{minHeight:Ce(Oe)},children:[fe.map((Te,it)=>{const De=it===fe.length-1,rt=Ve[it],pt=Te.paddingBottom,kt=Cp(le.cells[Te.key]),St=h&&kt&&pt>0,Be=h?{minHeight:Ce(Oe)}:{width:Ce(je[it])},xt=h?{paddingLeft:Ce(B),paddingRight:Ce(B)}:{paddingLeft:Ce(rt.paddingLeft),paddingRight:Ce(rt.paddingRight)},Ct=Te.textPrefix.charAt(0),wt=h?Rp(e[`${Te.textPrefix}VerticalAlign`]):Pp(e[`${Te.textPrefix}VerticalAlign`],e,Ct),Dt=h&&kt&&m&&xe===0;return r.jsxs("div",{className:h?`${c}-list-col-wrap`:void 0,...h?{}:{"data-list-col":"","data-col-letter":Ct,"data-valign":wt.kind,...wt.kind==="baseline"?{"data-valign-anchor":wt.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${De?` ${c}-list-col-last`:""}`,style:{...xt,...Be,...h?{justifyContent:Na(wt.kind)}:{}},"data-test":Te.width,children:r.jsx("span",{className:Oa(e,Te.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...Ha(Po(e,Te.textPrefix),n),...Ba(e,Te.textPrefix,c,n),...h?{}:Mp(wt.kind)},children:le.cells[Te.key]??null})}),St&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ce(pt)}}),Dt&&r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Te.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Ce(Math.max(pt,cr))}})]},Te.key)}),m&&xe===0&&h&&r.jsxs(r.Fragment,{children:[r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ee),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:Ce(se),height:"100%"}}),r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ee),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:Ce(Math.max(se,Ge-se)),width:Ce(se),height:"100%"}})]})]}),!h&&Qe>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ce(Qe)}}),m&&xe===0&&!h&&r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Ce(At)}})]},le.id)}),m&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Ht,"data-controls-static-handle":"",...h?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:h?"center":"left-y",areaStyle:{position:"absolute",top:Je,left:0,width:"100%",height:Ce(Math.max(qe,cr))}})},"row-padding-handles"),m&&!h&&We&&yt&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":We.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(je[0]-((et==null?void 0:et.paddingRight)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:Ce(ot),height:"100%"}}),r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":yt.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(je[fe.length-1]-((Xe==null?void 0:Xe.paddingLeft)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ce(un-ut),width:Ce(ut),height:"100%"}})]},"column-edge-padding-handles"),m&&!h&&fe.slice(0,-1).map((le,xe)=>{const Pe=fe[xe+1],Ne=Me.slice(0,xe+1).reduce((De,rt)=>De+rt,0),tt=Ve[xe],bt=Ve[xe+1],Te=Math.max(tt.paddingRight,oi),it=Math.max(bt.paddingLeft,oi);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":le.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(je[xe]-tt.paddingLeft),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ce(Ne-Te),width:Ce(Te),height:"100%"}}),r.jsx(_t,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Pe.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(je[xe+1]-bt.paddingRight),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ce(Ne),width:Ce(it),height:"100%"}})]},`${le.paddingRightKey}-padding`)}),m&&!h&&fe.slice(0,-1).map((le,xe)=>{const Pe=em(xe,Me,de,Ge),tt=Me.slice(0,xe+1).reduce((bt,Te)=>bt+Te,0)-ja/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":le.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(Qr),"data-controls-max-fraction":String(Pe),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ce(tt),width:Ce(ja),height:"calc(100%)",pointerEvents:"auto"}})},`${le.widthKey}-junction`)})]}),mt&&(()=>{const le=Po(e,bn),xe=kp(e.cutLabelVerticalAlign),Pe=le.textTextAlign==="justify"||h;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Ce(S??0),cursor:It?"pointer":"default",...Tp(E,v??0,n??!1)},onClick:It?Ue:void 0,onMouseEnter:F||W?Vt:void 0,onMouseLeave:F?jt:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...h?{paddingLeft:Ce(B),paddingRight:Ce(B)}:{},justifyContent:_p(le.textTextAlign),alignItems:Na(xe)},children:r.jsx("span",{className:Oa(e,bn,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...Ha(le,n),...Ba(e,bn,c,n),...Pe?{width:"100%"}:{}},children:z})})})})(),W&&ce&&(()=>{const le=xo(ce.widthPx),xe={width:le,height:"auto",maxHeight:le,objectFit:"contain",left:ce.x,top:ce.y,position:"absolute"};return r.jsx($p,{media:ce,className:ce.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:xe},`${ce.rowId}-${ce.url}`)})()]})})]})}const rm=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
|
|
6194
|
+
`}const Rn=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Yr=["AColumn","BColumn","CColumn","DColumn","EColumn"],yn="cutLabel",Jr=[...Yr,yn],Vo=["A","B","C","D","E"];function Ds(e){return`${e}ColumnVerticalAlign`}const Tr=["Top","Center","Bottom"];function Zr(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Vo.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Ep(e){const t=Zr(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Pp(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Vo.includes(n)?n:null}function qs(e,t,n){const i=Pp(e);return i?i===t?!1:Ep(n[Ds(i)]):!0}function _i(e){const t=Zr(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Vo.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Ip(e,t,n){if(Ks(e,t,n))return _i(e);const i=_i(e);return i.kind==="baseline"?{kind:"top"}:i}function Ap(e){const t=_i(e);return t.kind==="baseline"?{kind:"top"}:t}function Ks(e,t,n){return qs(e,n,t)?_i(e).kind==="baseline":!1}function Rp(e){const t={};let n=!1;for(const i of Vo){const o=Ds(i),s=e[o];if(e.type==="b"){const a=String(s??"Top").trim();a!=="Top"&&a!=="Center"&&a!=="Bottom"&&(t[o]="Top",n=!0);continue}qs(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function kp(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Mp(e){const t=_i(e).kind;return t==="baseline"?"center":t}function _p(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Na(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Wp(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),s=o-i;return n.remove(),s}function lr(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const a=Wp(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+a;const u=s.getBoundingClientRect(),c=o.getBoundingClientRect().height;let m=0;return e.kind==="center"?m=(u.height-c)/2:e.kind==="bottom"&&(m=u.height-c),u.top-t+m+a}function Fp(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const s=o.querySelector(`.${n}`);s&&(s.style.minHeight=`${i}px`,s.style.height=`${i}px`)}),i)}function Np(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Hp={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Qe(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Op={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Bp(e){return[Qe(e,"textFontFamily"),Qe(e,"textFontSettings"),{type:"row",items:[Qe(e,"textFontSize"),Qe(e,"textLineHeight"),Qe(e,"textLetterSpacing"),Qe(e,"textWordSpacing")]},Qe(e,"textTextAlign"),Qe(e,"textTextAppearance"),`${e}VerticalAlign`]}function jp(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Jr.map(e=>[Op[e],Bp(e)]))}}function Io(e,t){const n=i=>{const o=Qe(t,i);return e[o]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===yn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Ha(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 qt(kt(n,t))}function Oa(e,t,n,i){const o=Io(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a!==void 0&&a<s?`${n} ${i}`:n}function Ba(e,t,n,i){const o=Io(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a===void 0||a>=s?{}:{[`--${n}-title-leading-gap`]:L.scalingValue((s-a)/2,i)}}const Kt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],pi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],mi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],gi=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],zp={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Vp=["hover","focus","filled","success","error"],ja=.004,oi=.004,cr=oi,Qr=50,Wi=1440,Fi=Qr/Wi;function Gs(e){const t=typeof e=="number"&&e>0?e:Wi;return Qr/t}function Dp(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const o=parseFloat(n);if(Number.isFinite(o)&&o>0)return o}const i=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(i){const o=parseFloat(i);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return Wi}const Us={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Ti(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function qp(e,t=1){const n=t/e;return Object.fromEntries(Kt.map(i=>[i,n]))}function Kp(){return Object.fromEntries([...pi.map(e=>[e,0]),...mi.map(e=>[e,0])])}function Gp(){return Object.fromEntries(gi.map(e=>[e,0]))}function ao(e){return Object.fromEntries(Kt.map(t=>[t,typeof e[t]=="number"?e[t]:Us[t]]))}function Xs(e,t,n){const i=e-Fi,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const s=i/o;return{paddingLeft:t*s,paddingRight:n*s}}function wo(e,t,n){const i=ea(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((s,a)=>s+a,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function Up(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=pi[o],a=mi[o],u=typeof n[s]=="number"?n[s]:0,c=typeof n[a]=="number"?n[a]:0,m=Xs(t[o]??0,u,c);m.paddingLeft!==u&&(i[s]=m.paddingLeft),m.paddingRight!==c&&(i[a]=m.paddingRight)}return i}function ea(e,t,n){if(e<=0)return[];const i=Kt.slice(0,e).map(m=>n[m]);if(e===1)return i;const o=i.slice(0,e-1),a=o.reduce((m,p)=>m+p,0)+Fi;if(t>=a)return i;const u=[...o];let c=a-t;for(let m=u.length-1;m>=0&&c>0;m-=1){const p=u[m]-Fi;if(p<=0)continue;const E=Math.min(c,p);u[m]-=E,c-=E}return[...u,i[e-1]]}function Xp(e,t,n){if(e<=1)return{};const i=ea(e,t,n),o={};for(let s=0;s<e-1;s+=1){const a=Kt[s];i[s]!==n[a]&&(o[a]=i[s])}return o}function za(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Rn]}function Yp(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function Jp(e,t,n,i){const o=Math.min(i,e.length,Kt.length),s={};for(let a=0;a<o;a+=1){const u=e[a],c=t.indexOf(u);if(c===-1)continue;const m=Kt[c],p=pi[c],E=mi[c],b=gi[c],C=Kt[a],g=pi[a],v=mi[a],T=gi[a],w=n[m],$=n[p],S=n[E],_=n[b];typeof w=="number"&&(s[C]=w),typeof $=="number"&&(s[g]=$),typeof S=="number"&&(s[v]=S),typeof _=="number"&&(s[T]=_)}return s}function Ys(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 Zp(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=Ti(e),s=e.type==="b"||e.type===void 0&&t.type==="b",a={...e,...qp(n,o),...Kp()};if(s)for(const u of gi)typeof t[u]=="number"&&(a[u]=t[u]);else Object.assign(a,Gp());return Ys(e,a)?a:e}function Qp(e,t,n){const i=Rp(e);i&&(e={...e,...i});const o=Gs(n==null?void 0:n.designWidth),s=e.columns,a=t.columns,u=Ti(e),c=Ti(t),m=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof s=="number"?s:typeof a=="number"?a:Rn.length,E=S=>{if(m)return S;const _=ao({...t,...S}),k=Ti(S),W=wo(p,k,_),P=Up(p,W,{...t,...S});return Object.keys(P).length===0?S:{...S,...P}};if(typeof s=="number"&&s!==a)return e;const b=za(e),C=za(t);if(!Yp(b,C))return E({...e,...Jp(b,C,t,p)});if(u<c&&typeof p=="number"&&!m){const S=ao({...t,...e});return E({...e,...Xp(p,u,S)})}if(m){const S=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,_=Math.max(0,(u-o)/2);return S>_?{...e,textPaddingLR:_}:e}const g=ao({...t,...e}),v=wo(p,c,ao(t)),w=wo(p,u,g).some((S,_)=>S<(v[_]??S)),$=Kt.some(S=>{const _=e[S],k=t[S];return typeof _=="number"&&typeof k=="number"&&_!==k});return w||$?E(e):e}function em(e,t,n,i){const o=t.slice(0,e).reduce((a,u)=>a+u,0),s=n.slice(e+1,t.length-1).reduce((a,u)=>a+u,0);return Math.max(Fi,i-o-s-Fi)}function tm(e,t){return Math.random()*(t-e)+e}function nm(e){return Object.fromEntries(Kt.map(t=>[t,typeof e[t]=="number"?e[t]:Us[t]]))}function dr(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function im(e,t,n,i,o,s){return e.slice(0,t).map((a,u)=>{const c=pi[u],m=mi[u],p=gi[u];return{key:a,textPrefix:Hp[a],widthKey:Kt[u],width:n[Kt[u]],paddingLeftKey:c,paddingRightKey:m,paddingBottomKey:p,paddingLeft:i[c],paddingRight:o[m],paddingBottom:s[p]}})}function om({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:a,onUpdateSettings:u}){const{prefix:c}=L.useScopedStyles(),m=!!o,{columns:p,type:E,wrapperWidth:b,entriesCount:C,cellMinHeight:g,dividerWidth:v,showVisibility:T,cut:w,showCut:$,cutCellMinHeight:S,cutLabel:_,imageSize:k,imageOnHover:W,entryHoverEffect:P,entryHoverShowOption:I,rowPaddingTop:Y,rowPaddingBottom:y,rowPaddingTopB:M,columnsOrder:N,textPaddingLR:V,textColor:te,backgroundColor:ue,dividerColor:K,textHoverColor:H,backgroundHoverColor:Z,dividerHoverColor:G}=e,[B,J]=l.useState(void 0),[ie,oe]=l.useState(null),O=W==="on"&&(!n||i),ce=(w??0)>0,h=E==="b",pe=l.useRef(null),ve=l.useRef(null),[ye,Re]=l.useState(null),[ee,ge]=l.useState(Wi),X=Gs(ee),U=Math.max(0,((b??0)-X)/2),j=Math.min(V??0,U),he=Math.max(j,oi),ne=((b??0)+X)/2;l.useLayoutEffect(()=>{if(!n){ge(Wi);return}const le=()=>{ge(Dp(pe.current))};le();const Se=pe.current;if(!Se)return;const Me=new ResizeObserver(le);Me.observe(Se);let Fe=Se;for(;Fe&&!Fe.style.getPropertyValue("--cntrl-article-width");)Fe=Fe.parentElement;return Fe&&Me.observe(Fe),()=>Me.disconnect()},[n,a]),l.useEffect(()=>{J(void 0)},[w,$,t,C]),l.useEffect(()=>{n&&!i&&J(void 0)},[n,i]);const Ce=L.buildColorVars(c,{textColor:te,backgroundColor:ue,dividerColor:K,textHoverColor:H,backgroundHoverColor:Z,dividerHoverColor:G},zp,Vp),we=s&&s!=="default"?`${c}-state-${s}`:"",Ie=`${!n||i?P==="default"?`${c}-entry-hover-default`:P==="blinds"?`${c}-entry-hover-blinds`:P==="reveal"?`${c}-entry-hover-reveal`:"":""} ${we}`.trim(),F=P==="reveal"&&(!n||i),Q=(T==null?void 0:T[0])??!1,A=(T==null?void 0:T[1])??!1,D=l.useRef(e),z=l.useRef(a);l.useEffect(()=>{if(!u||!n){D.current=e,z.current=a;return}if(z.current!==a){D.current=e,z.current=a;return}const le=D.current;if(!(le!==e))return;if(typeof le.columns=="number"&&typeof e.columns=="number"&&le.columns!==e.columns){D.current=e;return}const Me=Qp(e,le,{designWidth:ee});D.current=e,Ys(e,Me)&&u(Me)},[e,u,n,a,ee]);const re=l.useMemo(()=>nm(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),de=l.useMemo(()=>dr(e,pi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),Te=l.useMemo(()=>dr(e,mi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),We=l.useMemo(()=>dr(e,gi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),Pe=l.useMemo(()=>Array.isArray(N)&&N.length>0?N:[...Rn],[N]),$e=l.useMemo(()=>im(Pe,p,re,de,Te,We),[Pe,p,re,de,Te,We]),tt=Ti(e),ae=l.useMemo(()=>Kt.slice(0,p).map(le=>re[le]),[p,re]),ke=l.useMemo(()=>ea(p,tt,re),[p,tt,re]),je=l.useMemo(()=>wo(p,tt,re),[p,tt,re]),ze=l.useMemo(()=>$e.map((le,Se)=>Xs(je[Se]??0,le.paddingLeft,le.paddingRight)),[$e,je]),lt=l.useMemo(()=>{const le=C===0?1/0:C;return(t??[]).slice(0,le).map((Me,Fe)=>({id:Fe,cells:Object.fromEntries(Rn.map(et=>[et,Me[et]??""])),image:Me.image,link:Me.link}))},[t,C]),ht=ce?B??w:lt.length,Pt=l.useMemo(()=>ce?lt.slice(0,ht):lt,[lt,ce,ht]),xt=ce&&ht<lt.length,wt=Pt.length>1||xt,Ht=[Q?`${c}-divider-top`:"",A||wt?`${c}-divider-bottom`:""].filter(Boolean).join(" "),Lt=!n||i,Ge=()=>{if(!Lt)return;const le=B??w;if(!$){J(lt.length);return}J(Math.min(le+$,lt.length))},Ae=le=>L.scalingValue(le,n??!1),Be=h?M??0:Y??0,Ye=y??0,He=g??0,ct=Be+He/2,It=Math.max(Ye,cr),Je=Wa(0,Pt.length,Q,A,xt,v??0,n??!1).borderTopWidth,Mt=ye!=null?`${ye}px`:`calc(${Je} + ${Ae(ct)})`,Ot=h?"rowPaddingTopB":"rowPaddingTop",Oe=$e[0],mt=$e[$e.length-1],it=ze[0],Ue=ze[ze.length-1],rt=Oe&&it?Math.max(it.paddingLeft,oi):0,at=mt&&Ue?Math.max(Ue.paddingRight,oi):0,sn=tt,wn=le=>{const Se=pe.current;if(!Se)return{x:0,y:0};const Me=Se.getBoundingClientRect();return{x:le.clientX-Me.left+Fa,y:le.clientY-Me.top+Fa}},ln=(le,Se)=>{if(!O)return;const Me=le.image;if(!(Me!=null&&Me.url)){oe(null);return}const{x:Fe,y:et}=wn(Se),$t=(k==null?void 0:k.min)??80,Le=(k==null?void 0:k.max)??320,Ze=(ie==null?void 0:ie.rowId)===le.id?ie.widthPx:tm($t,Le);oe({rowId:le.id,url:Me.url,objectFit:"contain",isVideo:$p(Me),widthPx:Ze,x:Fe,y:et})},ot=le=>{if(!O||!ie)return;const{x:Se,y:Me}=wn(le);oe(Fe=>!Fe||Fe.x===Se&&Fe.y===Me?Fe:{...Fe,x:Se,y:Me})},tn=()=>{oe(null)},Ut=le=>{F&&Ma(le,c),O&&oe(null)},Ve=le=>{F&&_a(le,c)};l.useLayoutEffect(()=>{if(!m||h){Re(null);return}const le=ve.current,Se=le==null?void 0:le.parentElement;if(!le||!Se){Re(null);return}const Me=()=>{const et=le.querySelector("[data-list-row]");if(!et){Re(null);return}const $t=Se.getBoundingClientRect(),Le=et.getBoundingClientRect();Re(Le.top-$t.top+Le.height/2)};Me();const Fe=new ResizeObserver(Me);return Fe.observe(le),Fe.observe(Se),()=>Fe.disconnect()},[m,h,Pt,Be,Ye,He,t,e,$e,je,ee,v,Q,A,xt]);const ft=l.useMemo(()=>!h&&Yr.some(le=>{const Se=le.charAt(0),Me=e[`${le}VerticalAlign`];return Ks(Me,e,Se)}),[h,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);l.useLayoutEffect(()=>{var Ze;const le=pe.current;if(!le)return;const Se=()=>{le.querySelectorAll("[data-list-col]").forEach(De=>{De.style.transform="";const st=De.querySelector(`.${c}-list-col`);st&&(st.style.minHeight="",st.style.height="");const vt=De.querySelector(`.${c}-list-col-title`);vt&&(vt.style.transform="")})};if(h||!ft){Se();return}const Me=()=>{const De=Array.from(le.querySelectorAll("[data-list-row]")),st=`${c}-list-col`,vt=`${c}-baseline-probe`;De.forEach(At=>{At.querySelectorAll("[data-list-col]").forEach(qe=>{qe.style.transform="";const nt=qe.querySelector(`.${st}`);nt&&(nt.style.minHeight="",nt.style.height="");const Et=qe.querySelector(`.${c}-list-col-title`);Et&&(Et.style.transform="")})}),De.forEach(At=>{const qe=Array.from(At.querySelectorAll("[data-list-col]"));Fp(At,qe,st)}),le.offsetHeight,De.forEach(At=>{const qe=Array.from(At.querySelectorAll("[data-list-col]")),nt=At.getBoundingClientRect().top,Et=new Map,St=qe.map(gt=>{const Bt=gt.querySelector(`.${c}-list-col-title`),Ft={el:gt,titleEl:Bt,letter:gt.getAttribute("data-col-letter")??"",kind:gt.getAttribute("data-valign")??"top",anchor:gt.getAttribute("data-valign-anchor")};return Et.set(Ft.letter,Ft),Ft}),_t=new Map,$n=(gt,Bt)=>{const Ft=_t.get(gt.letter);if(Ft!==void 0)return Ft;const cn=gt.anchor?Et.get(gt.anchor):void 0;if(gt.kind!=="baseline"||!cn||Bt.has(gt.letter)){const Xn=lr(gt,nt,st,vt);return _t.set(gt.letter,Xn),Xn}Bt.add(gt.letter);const Sn=$n(cn,Bt);Bt.delete(gt.letter);const dn=lr(gt,nt,st,vt),zt=Sn-dn;Np(gt.titleEl,zt);const Cn=lr(gt,nt,st,vt);return _t.set(gt.letter,Cn),Cn};St.forEach(gt=>$n(gt,new Set))})};let Fe=null;const et=()=>{Fe===null&&(Fe=requestAnimationFrame(()=>{Fe=null,Me()}))};Me();const $t=new ResizeObserver(()=>et());$t.observe(le);let Le=!1;return typeof document<"u"&&((Ze=document.fonts)!=null&&Ze.ready)&&document.fonts.ready.then(()=>{Le||et()}),()=>{Le=!0,Fe!==null&&(cancelAnimationFrame(Fe),Fe=null),$t.disconnect(),Se()}},[ft,h,e,t,ee,Pt,je]);const yt=l.useMemo(()=>Lp(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:yt}}),r.jsx("div",{style:Ce,children:r.jsxs("div",{ref:pe,className:`${c}-wrapper ${Ie}${Ht?` ${Ht}`:""}${h?` ${c}-type-b`:""}`.trim(),style:{width:L.scalingValue(b??0,n),...!h&&m?{[`--${c}-first-entry-handle-top`]:Mt}:{}},onMouseMove:O?ot:void 0,onMouseLeave:O?tn:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[Pt.map((le,Se)=>{var $t;const Me=((($t=le.link)==null?void 0:$t.length)??0)>0,Fe=Me&&(!n||i)?"a":"div",et=Wa(Se,Pt.length,Q,A,xt,v??0,n??!1);return r.jsxs(Fe,{ref:Se===0?Le=>{ve.current=Le}:void 0,className:`${c}-list-item${Me||I==="always"?` ${c}-list-item-has-link`:""}`,...Me?{href:le.link,target:"_blank"}:{},style:et,onMouseEnter:Le=>{F&&(Me||I==="always")&&Ma(Le,c),O&&ln(le,Le)},onMouseLeave:Le=>{F&&(Me||I==="always")&&_a(Le,c)},children:[Be>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ae(Be)}}),r.jsxs("div",{className:`${c}-list-cols-row${h?"":` ${c}-list-cols-row-h`}${m&&Se===0&&h?` ${c}-list-cols-row-controls`:""}`,...h?{}:{"data-list-row":""},style:h?void 0:{minHeight:Ae(He)},children:[$e.map((Le,Ze)=>{const De=Ze===$e.length-1,st=ze[Ze],vt=Le.paddingBottom,At=Cp(le.cells[Le.key]),qe=h&&At&&vt>0,nt=h?{minHeight:Ae(He)}:{width:Ae(je[Ze])},Et=h?{paddingLeft:Ae(j),paddingRight:Ae(j)}:{paddingLeft:Ae(st.paddingLeft),paddingRight:Ae(st.paddingRight)},St=Le.textPrefix.charAt(0),_t=h?Ap(e[`${Le.textPrefix}VerticalAlign`]):Ip(e[`${Le.textPrefix}VerticalAlign`],e,St),$n=h&&At&&m&&Se===0;return r.jsxs("div",{className:h?`${c}-list-col-wrap`:void 0,...h?{}:{"data-list-col":"","data-col-letter":St,"data-valign":_t.kind,..._t.kind==="baseline"?{"data-valign-anchor":_t.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${De?` ${c}-list-col-last`:""}`,style:{...Et,...nt,...h?{justifyContent:Na(_t.kind)}:{}},"data-test":Le.width,children:r.jsx("span",{className:Oa(e,Le.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...Ha(Io(e,Le.textPrefix),n),...Ba(e,Le.textPrefix,c,n),...h?{}:kp(_t.kind)},children:le.cells[Le.key]??null})}),qe&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ae(vt)}}),$n&&r.jsx(Wt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Le.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Ae(Math.max(vt,cr))}})]},Le.key)}),m&&Se===0&&h&&r.jsxs(r.Fragment,{children:[r.jsx(Wt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ne),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:Ae(he),height:"100%"}}),r.jsx(Wt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ne),className:`${c}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:Ae(Math.max(he,tt-he)),width:Ae(he),height:"100%"}})]})]}),!h&&Ye>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ae(Ye)}}),m&&Se===0&&!h&&r.jsx(Wt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Ae(It)}})]},le.id)}),m&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx(Wt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Ot,"data-controls-static-handle":"",...h?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${c}-padding-control-handle`,hitPlacement:h?"center":"left-y",areaStyle:{position:"absolute",top:Je,left:0,width:"100%",height:Ae(Math.max(Be,cr))}})},"row-padding-handles"),m&&!h&&Oe&&mt&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Wt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Oe.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(je[0]-((it==null?void 0:it.paddingRight)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:Ae(rt),height:"100%"}}),r.jsx(Wt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":mt.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(je[$e.length-1]-((Ue==null?void 0:Ue.paddingLeft)??0)),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ae(sn-at),width:Ae(at),height:"100%"}})]},"column-edge-padding-handles"),m&&!h&&$e.slice(0,-1).map((le,Se)=>{const Me=$e[Se+1],Fe=ke.slice(0,Se+1).reduce((De,st)=>De+st,0),et=ze[Se],$t=ze[Se+1],Le=Math.max(et.paddingRight,oi),Ze=Math.max($t.paddingLeft,oi);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Wt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":le.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(je[Se]-et.paddingLeft),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ae(Fe-Le),width:Ae(Le),height:"100%"}}),r.jsx(Wt,{centerXHitTop:`var(--${c}-first-entry-handle-top, 50%)`,"data-controls":Me.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(je[Se+1]-$t.paddingRight),className:`${c}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Ae(Fe),width:Ae(Ze),height:"100%"}})]},`${le.paddingRightKey}-padding`)}),m&&!h&&$e.slice(0,-1).map((le,Se)=>{const Me=em(Se,ke,ae,tt),et=ke.slice(0,Se+1).reduce(($t,Le)=>$t+Le,0)-ja/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":le.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(Qr),"data-controls-max-fraction":String(Me),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ae(et),width:Ae(ja),height:"calc(100%)",pointerEvents:"auto"}})},`${le.widthKey}-junction`)})]}),xt&&(()=>{const le=Io(e,yn),Se=Mp(e.cutLabelVerticalAlign),Me=le.textTextAlign==="justify"||h;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Ae(S??0),cursor:Lt?"pointer":"default",...Tp(A,v??0,n??!1)},onClick:Lt?Ge:void 0,onMouseEnter:F||O?Ut:void 0,onMouseLeave:F?Ve:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...h?{paddingLeft:Ae(j),paddingRight:Ae(j)}:{},justifyContent:_p(le.textTextAlign),alignItems:Na(Se)},children:r.jsx("span",{className:Oa(e,yn,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...Ha(le,n),...Ba(e,yn,c,n),...Me?{width:"100%"}:{}},children:_})})})})(),O&&ie&&(()=>{const le=xo(ie.widthPx),Se={width:le,height:"auto",maxHeight:le,objectFit:"contain",left:ie.x,top:ie.y,position:"absolute"};return r.jsx(Sp,{media:ie,className:ie.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:Se},`${ie.rowId}-${ie.url}`)})()]})})]})}const rm=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
|
|
5894
6195
|
import { CommonComponentProps } from '../props';
|
|
5895
6196
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
|
|
5896
6197
|
import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
|
|
@@ -8847,7 +9148,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
8847
9148
|
</>
|
|
8848
9149
|
);
|
|
8849
9150
|
}
|
|
8850
|
-
`,bi=["A","B","C","D","E"],Va=[...Tr,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Bn={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 am(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function so(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function sm(){return Object.fromEntries(bi.map((e,t)=>{const n=An[t],i=`${e} column`;return[n,am(i)]}))}function lm(){const e={};for(const t of bi)e[`${t}ColumnWidth`]=so(`${t} column width`),e[`${t}ColumnPaddingLeft`]=so(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=so(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=so(`${t} column padding bottom`);return e}function Da(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...An]};for(const s of bi)i[`${s}ColumnWidth`]=s==="A"?.0798:.32,i[`${s}ColumnPaddingLeft`]=0,i[`${s}ColumnPaddingRight`]=0,i[`${s}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function cm(e){const t={};if(e===bn)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Tr]},enum:[...Tr]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Va],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Va]}}return t[Ze(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Ze(e,"textFontSettings")]={...Bn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Ze(e,"textFontSize")]={...Bn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Ze(e,"textLineHeight")]={...Bn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Ze(e,"textLetterSpacing")]={...Bn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Ze(e,"textWordSpacing")]={...Bn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Ze(e,"textTextAlign")]={...Bn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Ze(e,"textTextAppearance")]={...Bn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const dm=Jr.reduce((e,t)=>({...e,...cm(t)}),{});function um(e){return{verticalAlign:e===bn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===bn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function pm(e,t={}){var n;return{...um(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const qa=new Set(["textFontFamily","textFontSettings"]);function mm(e,t,n){const i=s=>n===void 0?!0:n==="common"?qa.has(s):!qa.has(s),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Zr(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Ze(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Ze(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Ze(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Ze(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Ze(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Ze(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Ze(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Ze(e,"textTextAppearance")]=t.textTextAppearance),o}function So(e={},t){return Jr.reduce((n,i)=>({...n,...mm(i,pm(i,e),t)}),{})}const gm=So(),hm=jp();function Js(e){return[Ze(e,"textFontFamily"),Ze(e,"textFontSettings"),Ze(e,"textFontSize"),Ze(e,"textLineHeight"),Ze(e,"textLetterSpacing"),Ze(e,"textWordSpacing"),Ze(e,"textTextAlign"),Ze(e,"textTextAppearance"),`${e}VerticalAlign`]}function fm(){const e=[];return Yr.forEach((t,n)=>{const i=An[n],o=Js(t);for(let s=1;s<An.length;s+=1){const a=[{name:"columns",value:s},...Array.from({length:s},(u,c)=>({name:`columnsOrder.${c}`,value:i,isNotEqual:!0}))];o.forEach(u=>{e.push({if:a,then:{name:`properties.${u}.display.visible`,value:!1}})})}}),e}const ym=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Js(bn);const vm=[...bi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],jn=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(1).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(2).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(3).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(4).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(5).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(8).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(9).webp"}],bm=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:jn[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:jn[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:jn[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:jn[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:jn[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:jn[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:jn[6],link:""}],xm=[...bi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],wm={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...sm(),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:bm},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...lm(),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"}},...dm,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...gm,...So({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Da({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},...So({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Da({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},...So({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...fm(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...vm.map(e=>({if:{name:"type",value:"b"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"a"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...bi.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...xm]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"Entries",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",hm]}],paletteBookmark:{items:[...ym],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Sm={element:om,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>Zp(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:wm,sourceCode:rm},Ka=300,Ln=.004,$m={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"},Cm=["hover","focus","filled","success","error"];function Tm(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ga(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Ua(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:P.scalingValue((o-t)/2,i)}}function Lm(e){return`
|
|
9151
|
+
`,bi=["A","B","C","D","E"],Va=[...Tr,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Bn={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 am(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function so(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function sm(){return Object.fromEntries(bi.map((e,t)=>{const n=Rn[t],i=`${e} column`;return[n,am(i)]}))}function lm(){const e={};for(const t of bi)e[`${t}ColumnWidth`]=so(`${t} column width`),e[`${t}ColumnPaddingLeft`]=so(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=so(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=so(`${t} column padding bottom`);return e}function Da(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Rn]};for(const s of bi)i[`${s}ColumnWidth`]=s==="A"?.0798:.32,i[`${s}ColumnPaddingLeft`]=0,i[`${s}ColumnPaddingRight`]=0,i[`${s}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function cm(e){const t={};if(e===yn)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Tr]},enum:[...Tr]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Va],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Va]}}return t[Qe(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Qe(e,"textFontSettings")]={...Bn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Qe(e,"textFontSize")]={...Bn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Qe(e,"textLineHeight")]={...Bn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Qe(e,"textLetterSpacing")]={...Bn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Qe(e,"textWordSpacing")]={...Bn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Qe(e,"textTextAlign")]={...Bn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Qe(e,"textTextAppearance")]={...Bn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const dm=Jr.reduce((e,t)=>({...e,...cm(t)}),{});function um(e){return{verticalAlign:e===yn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===yn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function pm(e,t={}){var n;return{...um(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const qa=new Set(["textFontFamily","textFontSettings"]);function mm(e,t,n){const i=s=>n===void 0?!0:n==="common"?qa.has(s):!qa.has(s),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Zr(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Qe(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Qe(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Qe(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Qe(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Qe(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Qe(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Qe(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Qe(e,"textTextAppearance")]=t.textTextAppearance),o}function $o(e={},t){return Jr.reduce((n,i)=>({...n,...mm(i,pm(i,e),t)}),{})}const gm=$o(),hm=jp();function Js(e){return[Qe(e,"textFontFamily"),Qe(e,"textFontSettings"),Qe(e,"textFontSize"),Qe(e,"textLineHeight"),Qe(e,"textLetterSpacing"),Qe(e,"textWordSpacing"),Qe(e,"textTextAlign"),Qe(e,"textTextAppearance"),`${e}VerticalAlign`]}function fm(){const e=[];return Yr.forEach((t,n)=>{const i=Rn[n],o=Js(t);for(let s=1;s<Rn.length;s+=1){const a=[{name:"columns",value:s},...Array.from({length:s},(u,c)=>({name:`columnsOrder.${c}`,value:i,isNotEqual:!0}))];o.forEach(u=>{e.push({if:a,then:{name:`properties.${u}.display.visible`,value:!1}})})}}),e}const ym=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Js(yn);const vm=[...bi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],jn=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(1).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(2).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(3).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(4).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(5).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(8).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(9).webp"}],bm=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:jn[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:jn[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:jn[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:jn[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:jn[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:jn[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:jn[6],link:""}],xm=[...bi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],wm={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...sm(),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:bm},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...lm(),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"}},...dm,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...gm,...$o({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Da({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},...$o({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Da({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},...$o({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...fm(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...vm.map(e=>({if:{name:"type",value:"b"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"a"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...bi.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...xm]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"Entries",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",hm]}],paletteBookmark:{items:[...ym],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},$m={element:om,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>Zp(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:wm,sourceCode:rm},Ka=300,Ln=.004,Sm={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"},Cm=["hover","focus","filled","success","error"];function Tm(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ga(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Ua(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:L.scalingValue((o-t)/2,i)}}function Lm(e){return`
|
|
8851
9152
|
.${e}-wrapper {
|
|
8852
9153
|
box-sizing: border-box;
|
|
8853
9154
|
display: flex;
|
|
@@ -9040,7 +9341,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
9040
9341
|
left: 20px;
|
|
9041
9342
|
transform: translateY(-50%);
|
|
9042
9343
|
}
|
|
9043
|
-
`}function Xa(e,t,n,i,o,s,a,u){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:s??0,textAppearance:a,color:u??"#000000"}}function Em({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:a}=
|
|
9344
|
+
`}function Xa(e,t,n,i,o,s,a,u){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:s??0,textAppearance:a,color:u??"#000000"}}function Em({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:a}=L.useScopedStyles(),u=o??!1,{wrapperWidth:c=1,cellMinHeight:m=0,dividerWidth:p=694e-6,dividerStyle:E="solid",entryHoverEffect:b="default",autoclose:C="off",icon:g,iconMaxWidth:v=.00833,iconPaddingRight:T=0,iconAnimation:w="rotate 45",questionColor:$="#000000",answerColor:S="#000000",dividerColor:_="#0000001F",iconColor:k="#000000",questionHoverColor:W="#666666",iconHoverColor:P="#666666",iconActiveColor:I="#000000",dividerHoverColor:Y="#000000",questionFontFamily:y,questionFontSettings:M,questionFontSize:N,questionLineHeight:V,questionLetterSpacing:te,questionWordSpacing:ue,questionTextAppearance:K,answerFontFamily:H,answerFontSettings:Z,answerFontSize:G,answerLineHeight:B,answerLetterSpacing:J,answerWordSpacing:ie,answerTextAppearance:oe,questionPaddingLeft:O=0,questionPaddingTop:ce=0,questionPaddingBottom:h=0,answerPaddingLeft:pe=0,answerPaddingRight:ve=0,answerPaddingTop:ye=0,answerPaddingBottom:Re=0}=e,ee=t??[],[ge,X]=l.useState(()=>new Set),U=!n||i;l.useEffect(()=>{X(new Set)},[C]),l.useEffect(()=>{n&&!o&&!i&&X(new Set)},[n,o,i]);const j=Ae=>L.scalingValue(Ae,n??!1),he=Math.max(O,Ln),ne=Math.max(ce,Ln),Ce=Math.max(h,Ln),we=Math.max(pe,Ln),be=Math.max(ve,Ln),Ie=Math.max(ye,Ln),F=Math.max(Re,Ln),Q=Math.max(0,(c??1)-T-v),A=Math.max(0,(c??1)-ve),D=Math.max(0,(c??1)-pe),z=Math.max(T,Ln),re=Math.max(0,(c??1)-O-v),de=l.useMemo(()=>ge.size===0?0:Math.min(...ge),[ge]),Te=l.useCallback(Ae=>ge.has(Ae),[ge]),We=U&&b==="default"?`${a}-entry-hover-default`:"",Pe=g??"",$e=Pe!=="",tt=w.replace(/^rotate /,""),ae=`${a}-icon-anim-${tt}`,ke=qt(kt(Xa(y,M,N,V,te,ue,K,$),n)),je=qt(kt(Xa(H,Z,G,B,J,ie,oe,S),n)),ze=Ga(N,V,`${a}-question`,`${a}-text-tight-leading`),lt=Ga(G,B,`${a}-answer-text`,`${a}-text-tight-leading`),ht=Ua(N,V,a,n),Pt=Ua(G,B,a,n),xt=L.buildColorVars(a,{questionColor:$,answerColor:S,dividerColor:_,iconColor:k,questionHoverColor:W,iconHoverColor:P,iconActiveColor:I,dividerHoverColor:Y},Sm,Cm),wt=s&&s!=="default"?`${a}-state-${s}`:"",Ht=l.useCallback(Ae=>{U&&X(Be=>{if(Be.has(Ae)){const He=new Set(Be);return He.delete(Ae),He}if(C==="on")return new Set([Ae]);const Ye=new Set(Be);return Ye.add(Ae),Ye})},[U,C]),Lt=l.useMemo(()=>Lm(a),[a]),Ge={[`--${a}-divider-width`]:L.scalingValue(p,n??!1),[`--${a}-divider-style`]:E,[`--${a}-icon-max-width`]:L.scalingValue(v,n??!1),...m>0?{[`--${a}-question-min-height`]:L.scalingValue(m,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Lt}}),r.jsx("div",{style:xt,children:r.jsx("div",{className:Xe(`${a}-wrapper`,n&&!i&&`${a}-editor`,We,wt),style:{width:L.scalingValue(c,n??!1),maxWidth:"100%",...Ge},children:ee.map((Ae,Be)=>{var Mt;const Ye=Te(Be),He=((Mt=Ae.question)==null?void 0:Mt.trim())??"",ct=Ae.answer,It=((ct==null?void 0:ct.length)??0)>0,Je=u&&Be===de;return r.jsxs("div",{className:Xe(`${a}-item`,Ye&&`${a}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${a}-question-controls`,children:[Je&&r.jsxs(r.Fragment,{children:[r.jsx(Wt,{"data-controls":"questionPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:j(ne),zIndex:2}}),r.jsx(Wt,{"data-controls":"questionPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Q),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:j(he),height:"100%",zIndex:2}}),r.jsx(Wt,{"data-controls":"iconPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(re),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:j(z),height:"100%",zIndex:2}})]}),r.jsxs("button",{type:"button",className:`${a}-question-button`,"aria-expanded":Ye,style:{...ke,...ht,paddingLeft:j(O),paddingRight:j(T)},onClick:()=>Ht(Be),children:[ce>0&&r.jsx("span",{className:`${a}-padding-handle`,style:{height:j(ce)},"aria-hidden":"true"}),r.jsxs("span",{className:`${a}-question-row`,children:[r.jsx("span",{className:ze,children:He}),It&&($e?r.jsx("span",{className:`${a}-icon ${a}-icon-custom ${ae}`,"aria-hidden":"true",children:r.jsx(Qt,{url:Pe,fill:k,hoverFill:P,className:`${a}-icon-image`})}):r.jsx("span",{className:`${a}-icon ${a}-icon-default ${ae}`,"aria-hidden":"true"}))]}),h>0&&r.jsx("span",{className:`${a}-padding-handle`,style:{height:j(h)},"aria-hidden":"true"})]}),Je&&r.jsx(Wt,{"data-controls":"questionPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:j(Ce),zIndex:2}})]}),It&&ct&&r.jsx("div",{className:`${a}-panel`,"aria-hidden":!Ye,children:r.jsx("div",{className:`${a}-panel-inner`,children:r.jsxs("div",{className:`${a}-answer-controls`,children:[Je&&r.jsxs(r.Fragment,{children:[r.jsx(Wt,{"data-controls":"answerPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:j(Ie),zIndex:2}}),r.jsx(Wt,{"data-controls":"answerPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(A),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:j(we),height:"100%",zIndex:2}}),r.jsx(Wt,{"data-controls":"answerPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(D),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:j(be),height:"100%",zIndex:2}})]}),ye>0&&r.jsx("div",{className:`${a}-padding-handle`,style:{height:j(ye)}}),r.jsx("div",{className:`${a}-answer`,style:{...je,...Pt,paddingLeft:j(pe),paddingRight:j(ve)},children:r.jsx("div",{className:lt,children:r.jsx(ui,{content:ct})})}),Re>0&&r.jsx("div",{className:`${a}-padding-handle`,style:{height:j(Re)}}),Je&&r.jsx(Wt,{"data-controls":"answerPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:j(F),zIndex:2}})]})})})]},Be)})})})]})}const Pm=`import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
9044
9345
|
import cn from 'classnames';
|
|
9045
9346
|
import { CommonComponentProps } from '../props';
|
|
9046
9347
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
|
|
@@ -9837,7 +10138,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
9837
10138
|
</>
|
|
9838
10139
|
);
|
|
9839
10140
|
}
|
|
9840
|
-
`;function En(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Ya={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Pm=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Rm={type:"object",version:1,content:{type:"array",display:{type:"array"},items:{type:"object",properties:{question:{type:"string",label:"Question",placeholder:"Add question...",display:{type:"text-input"}},answer:{label:"Answer",placeholder:"Add answer...",display:{type:"rich-text"}}}},default:[{question:"What are the three main parts of The Divine Comedy?",answer:[{type:"paragraph",children:[{text:"The poem is divided into Inferno, Purgatorio, and Paradiso. These three sections follow Dante’s journey through Hell, Purgatory, and Heaven."}]}]},{question:"Who guides Dante through Hell and most of Purgatory?",answer:[{type:"paragraph",children:[{text:"Dante is guided by Virgil, the ancient Roman poet. Virgil represents human reason and wisdom, but because he lived before Christianity, he cannot guide Dante all the way into Heaven."}]}]},{question:"What does the dark wood at the beginning of the poem symbolize?",answer:[{type:"paragraph",children:[{text:"The dark wood symbolizes Dante’s spiritual confusion and moral crisis. It shows that he has lost the “straight way” in life and needs guidance to return to truth and salvation."}]}]},{question:"What is “contrapasso” in Inferno?",answer:[{type:"paragraph",children:[{text:"“Contrapasso” is the principle that punishments in Hell reflect the sins committed during life. For example, people who caused division are themselves physically divided, showing how their punishment mirrors their wrongdoing."}]}]},{question:"Who guides Dante through Heaven?",answer:[{type:"paragraph",children:[{text:"Beatrice guides Dante through Paradiso. She represents divine love, grace, and spiritual understanding, helping Dante move beyond human reason toward a vision of God."}]}]},{question:"Why is The Divine Comedy important in literary history?",answer:[{type:"paragraph",children:[{text:"The Divine Comedy is important because it is one of the greatest works of world literature and helped shape the Italian language. Dante wrote it in the Tuscan dialect rather than Latin, making serious literature more accessible to ordinary readers."}]}]},{question:"What is the overall journey of The Divine Comedy about?",answer:[{type:"paragraph",children:[{text:"The poem is about Dante’s spiritual journey from sin and despair toward repentance, wisdom, and union with God. On a deeper level, it represents the soul’s path from confusion to divine truth."}]}]}]},settings:{sizing:"auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},dividerWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},dividerStyle:{type:"string",scope:"common",title:"Style",display:{type:"toggle-cycle",enum:["solid","dashed","dotted"]}},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default"]}},autoclose:{type:"string",scope:"common",title:"Autoclose",display:{type:"toggle-cycle",enum:["on","off"]}},icon:{type:["string","null"],scope:"common",title:"Icon",display:{type:"icon-switch-control"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:En("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:{...Ya.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:{...Ya.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:En("Question Padding Left"),questionPaddingTop:En("Question Padding Top"),questionPaddingBottom:En("Question Padding Bottom"),answerPaddingLeft:En("Answer Padding Left"),answerPaddingRight:En("Answer Padding Right"),answerPaddingTop:En("Answer Padding Top"),answerPaddingBottom:En("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/component-assets/PlusIcon.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...Pm],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Am={element:Em,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/FAQ_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},schema:Rm,sourceCode:Im},xn=e=>e.display==="cover",Do=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Ja=100,Mm=.2,Za=8,Zs=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=l.useState(0),[a,u]=l.useState(!1),c=l.useRef(null),m=l.useRef(0);m.current=o;const p=l.useMemo(()=>typeof window>"u"?Ja:Math.max(Ja,window.innerHeight*Mm),[]),R=l.useCallback(y=>Math.max(0,1-y/(p*1.5)),[p]),b=l.useCallback(y=>Math.max(0,1-y/(p*.45)),[p]),I=l.useCallback(y=>{const k=typeof window<"u"?window.innerHeight:800,_=Math.max(.88,1-y/k*.12);return`translateY(${y}px) scale(${_})`},[]),g=l.useCallback(()=>{c.current=null},[]),v=l.useCallback(()=>{u(!0),s(0),window.setTimeout(()=>u(!1),n),g()},[n,g]),T=l.useCallback(()=>{const y=typeof window<"u"?window.innerHeight:800;u(!0),s(y),window.setTimeout(()=>{t(),g(),u(!1)},Math.min(n,200))},[n,t,g]),w=l.useCallback(y=>{!e||a||y.pointerType==="touch"&&(i!=null&&i(y.target)||(c.current={startX:y.clientX,startY:y.clientY,isLocked:null,pointerId:y.pointerId}))},[e,a,i]),$=l.useCallback(y=>{const k=c.current;if(!e||!k||y.pointerType!=="touch"||k.pointerId!==y.pointerId)return;const _=y.clientX-k.startX,V=y.clientY-k.startY;if(k.isLocked===null){if(Math.abs(_)<Za&&Math.abs(V)<Za)return;if(V>0&&V>Math.abs(_))k.isLocked=!0,y.currentTarget.setPointerCapture(y.pointerId);else{k.isLocked=!1,g();return}}if(!k.isLocked)return;y.preventDefault();const ne=Math.max(0,V);m.current=ne,s(ne)},[e,g]),S=l.useCallback(y=>{const k=c.current;if(!e||!k||y.pointerType!=="touch"||k.pointerId!==y.pointerId)return;const _=k.isLocked===!0;if(y.currentTarget.hasPointerCapture(y.pointerId)&&y.currentTarget.releasePointerCapture(y.pointerId),!_){g();return}y.clientY-k.startY>=p?T():v()},[p,T,e,g,v]),z=l.useCallback(y=>{S(y)},[S]),M=l.useCallback(y=>{S(y)},[S]),N=o>0,L=a?`transform ${n}ms ease`:"none",C=a?`opacity ${n}ms ease`:"none",J=o>0||a;return{isSwipeDragging:N,backdropStyle:{opacity:R(o),transition:C},mediaAreaStyle:{transform:I(o),transition:L,touchAction:N?"none":void 0,willChange:N?"transform":void 0},overlayContentStyle:J?{opacity:b(o),transition:C}:void 0,swipeHandlers:e?{onPointerDown:w,onPointerMove:$,onPointerUp:z,onPointerCancel:M}:{},dismissAreaStyle:e?{touchAction:N?"none":"pan-x"}:void 0}},km="[data-lightbox-scrollable]",Qs=()=>{l.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,s=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const a=u=>{const c=u.target;c instanceof Element&&c.closest(km)||u.preventDefault()};return document.addEventListener("touchmove",a,{passive:!1}),()=>{document.removeEventListener("touchmove",a),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=s,window.scrollTo(0,e)}},[])},_m=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Wm=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Fm=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Nm=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const a=e.scrollLeft,u=n-a,c=a-n,m=(g,v)=>{Wm(t),e.scrollLeft=g,v&&(s==null||s())};if(Math.abs(u)<.5)return m(n,!0),()=>{};let p=!1,R=0;const b=()=>{t.removeEventListener("transitionend",I),clearTimeout(R)},I=g=>{g.target!==t||g.propertyName!=="transform"||p||(p=!0,b(),m(n,!0))};return t.addEventListener("transitionend",I),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(${c}px, 0, 0)`,R=window.setTimeout(()=>{p||(p=!0,b(),m(n,!0))},i+64),()=>{p||(p=!0,b(),m(a-Fm(t),!1))}},Li=300,Hm=900,Om=1500,Bm="cubic-bezier(0.16, 1, 0.3, 1)",jm=3e3,zm=2,Vm=16,Dm=.05,qm=1,lo=.3,Km=50,Gm=20,ei=.004,Ki=["title1","title2","title3"],Um={title1:"1",title2:"2",title3:"3"},Xm={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Ym={title1:.02,title2:.02,title3:.02},co=e=>`max(${e}, ${Gm}px)`,Jm=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]}},Zm=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=Jm(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},st=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Qm=e=>[st(e,"fontFamily"),st(e,"fontSettings"),{type:"row",items:[st(e,"fontSize"),st(e,"lineHeight"),st(e,"letterSpacing"),st(e,"wordSpacing")]},st(e,"textAlign"),st(e,"textAppearance")],eg=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Ki.map(e=>[Um[e],Qm(e)]))}),ta=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},u)=>{if(s<=0||u<=0)return{overflow:s,widths:[u,...a]};const c=Math.min(s,u);return{overflow:s-c,widths:[u-c,...a]}},{overflow:i-1,widths:[]});return o},el=(e,t)=>ta(e,t),uo=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Qa=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:ta(e.length,n),effective:el(e.length,n)}},tg=(e,t,n,i,o,s,a)=>{const u=[];return t&&u.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&u.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:s,text:n}),i&&u.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:a,text:i}),u},ur=(e,t)=>{const n=i=>{const o=st(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[Xm[t]]}},ng=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),pr=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??Ym[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Rt(i,n)},ig=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:a})=>{const{backgroundColor:u,thumbnailSize:c,thumbnailGap:m,thumbnailMarginBottom:p,imageGap:R,closeIcon:b,closeIconMaxWidth:I,closeIconColor:g,closeIconHoverColor:v,thumbnailTrigger:T,thumbnailVisibility:w,thumbnailObjectFit:$,thumbnailActive:S,thumbnailActiveColor:z,title1Width:M,title2Width:N,title3Width:L,title1MarginLeft:C=0,title2MarginLeft:J=0,title3MarginLeft:y=0,titleRowMarginBottom:k=0,titleHeaderLayout:_="desktop",contentMarginTop:V,iconMarginLeft:ne}=n,me=d=>P.scalingValue(d,i??!1),K=c??n.thumnailSize??.03,H=me(K),Q=me(m),Y=me(p??.02),O=me(R??0),te=me(V??0),ce=co(te),oe=me(ne??0),[W,ue]=l.useState(0),h=l.useRef(W);h.current=W;const ae=t[W],{title1:be,title2:ye,title3:Ae}=Zm(ae),Z=pr("title1",ur(n,"title1"),i),ge=pr("title2",ur(n,"title2"),i),U=pr("title3",ur(n,"title3"),i),X=_==="mobile",B=!o&&(!i||s),se=B,Ee=B,Fe=B,Re=xn($),Ie=Re?{"--image-aspect-ratio":Do($)}:void 0,_e=!!(be||ye||Ae),F=l.useMemo(()=>tg(e,be,ye,Ae,Z,ge,U),[e,W,be,ye,Ae,Z,ge,U]),D=l.useMemo(()=>({title1Width:M,title2Width:N,title3Width:L}),[M,N,L]),E=l.useMemo(()=>F.map(d=>D[d.widthKey]),[F,D]),j=l.useMemo(()=>ta(F.length,E),[F.length,E]),G=l.useMemo(()=>el(F.length,E),[F.length,E]),ee=l.useMemo(()=>F.filter(d=>d.prefix==="title1"),[F]),ie=l.useMemo(()=>F.filter(d=>d.prefix==="title2"||d.prefix==="title3"),[F]),he=l.useMemo(()=>Qa(ee,D),[ee,D]),Se=l.useMemo(()=>Qa(ie,D),[ie,D]),$e=l.useCallback((d,f)=>{const x=F.indexOf(d);if(!X||f==="single-row")return{effectiveWidth:G[x]??0,resolvedWidth:j[x]??0,maxWidth:uo(x,j)};if(f==="two-row-top"){const re=ee.indexOf(d);return{effectiveWidth:he.effective[re]??0,resolvedWidth:he.resolved[re]??0,maxWidth:uo(re,he.resolved)}}const q=ie.indexOf(d);return{effectiveWidth:Se.effective[q]??0,resolvedWidth:Se.resolved[q]??0,maxWidth:uo(q,Se.resolved)}},[ie,Se,G,j,F,ee,he,X]),fe=l.useCallback(d=>P.scalingValue(d,i??!1),[i]),Ge=fe(k??0),de=l.useMemo(()=>({title1MarginLeft:C,title2MarginLeft:J,title3MarginLeft:y}),[C,J,y]),Me=l.useCallback(d=>F.slice(0,d+1).reduce((f,x,q)=>f+(x!=null&&x.marginLeftKey?de[x.marginLeftKey]??0:0)+(j[q]??0),0)+(X?0:C??0),[F,de,j,X,C]),je=l.useCallback(()=>X?0:C??0,[X,C]),Ve=l.useCallback(d=>ie.slice(0,d).reduce((f,x,q)=>f+(x.marginLeftKey?de[x.marginLeftKey]??0:0)+(Se.resolved[q]??0),0),[ie,Se.resolved,de]),at=l.useCallback(d=>{const f=ie[d];return Ve(d)+(f.marginLeftKey?de[f.marginLeftKey]??0:0)+(Se.resolved[d]??0)},[ie,Se.resolved,Ve,de]),ht=(d,f)=>{const x=d.marginLeftKey?de[d.marginLeftKey]??0:0,{effectiveWidth:q,resolvedWidth:re,maxWidth:we}=$e(d,f),ke=o&&f==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":d.prefix,style:{...f==="single-row"?{gridArea:d.prefix}:{},width:fe(q),...x>0?{marginLeft:fe(x)}:{}},children:[r.jsx("p",{className:d.className,style:d.style,children:d.text}),ke&&d.marginLeftKey&&r.jsx("div",{"data-controls":d.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(re),style:{position:"absolute",top:0,left:fe(-x),width:`max(${fe(x)}, 10px)`,height:"100%",pointerEvents:"auto"}}),ke&&r.jsx("div",{"data-controls":d.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(we),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:fe(-ei/2),width:fe(ei),height:"100%",pointerEvents:"auto"}})]},d.className)},Et=()=>{const d=X?-1:F.findIndex(q=>q.prefix==="title1"),f=!X&&(o||(C??0)>0)?(()=>{const q=C??0,re=d>=0?j[d]:M??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(re),style:{position:"absolute",top:0,left:0,width:`max(${fe(q)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,x=F.flatMap((q,re)=>{if(!q.marginLeftKey)return[];const we=de[q.marginLeftKey]??0,ke=ng(F,j,de,re)+je();return r.jsx("div",{"data-controls":q.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(j[re]),style:{position:"absolute",top:0,left:fe(ke),width:`max(${fe(we)}, 10px)`,height:"100%",pointerEvents:"auto"}},q.marginLeftKey)});return f?[f,...x]:x},mt=()=>F.map((d,f)=>{const x=uo(f,j),re=Me(f)-ei/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":d.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(x),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:fe(re),width:fe(ei),height:"100%",pointerEvents:"auto"}})},`${d.widthKey}-junction`)}),ft=()=>ie.flatMap((d,f)=>{if(!d.marginLeftKey)return[];const x=de[d.marginLeftKey]??0,q=Ve(f),{resolvedWidth:re}=$e(d,"two-row-bottom");return r.jsx("div",{"data-controls":d.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(re),style:{position:"absolute",top:0,left:fe(q),width:`max(${fe(x)}, 10px)`,height:"100%",pointerEvents:"auto"}},d.marginLeftKey)}),Ft=()=>ie.map((d,f)=>{const{maxWidth:x}=$e(d,"two-row-bottom"),re=at(f)-ei/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":d.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(x),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:fe(re),width:fe(ei),height:"100%",pointerEvents:"auto"}})},`${d.widthKey}-junction`)}),It=l.useRef(null),Ue=l.useRef(null),Ce=l.useRef(null),qe=l.useRef(null),Qe=l.useRef([]),Oe=l.useRef([]),$t=l.useRef(0),At=l.useRef(null),Je=l.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),Mt=l.useRef(null),Ht=l.useRef(null),We=l.useRef(0),yt=l.useRef("forward"),et=l.useRef(0),Xe=l.useRef(null),ot=l.useRef(!1),ut=t.length>1&&(!o||!!s),un=ut?3:1,rn=l.useMemo(()=>Array.from({length:un},()=>t).flat(),[t,un]),[Wn,nt]=l.useState(!1),[an,Vt]=l.useState(!1),[jt,ze]=l.useState(!0),vt=l.useRef(null),le=l.useRef(null),xe=l.useRef(!1),Pe=l.useRef(!1),Ne=l.useRef(null),tt=l.useRef(null),bt=se&&!jt,Te=l.useCallback(()=>{se&&(ze(!0),tt.current&&clearTimeout(tt.current),tt.current=setTimeout(()=>{Je.current.isActive||ze(!1)},jm))},[se]),it=l.useCallback(()=>{o||Pe.current||(Pe.current=!0,Vt(!1),Ne.current=setTimeout(()=>{a()},Li))},[o,a]),De=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":bt?"true":"false",style:{width:P.scalingValue(I??0,i),height:P.scalingValue(I??0,i),marginRight:oe,"--close-icon-hover-color":v},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:it,"aria-label":"Close",children:r.jsx(nn,{url:b,fill:g,hoverFill:i&&!s?g:v,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:oe,height:"100%",pointerEvents:"auto"}})]}),rt=(d="two-row")=>r.jsx("div",{...d==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:fe(C??0),flexShrink:0,...d==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...d==="two-row"&&o?{pointerEvents:"auto"}:{}}}),pt=()=>{const d=F.find(q=>q.prefix==="title1"),f=F.filter(q=>q.prefix==="title2"||q.prefix==="title3"),x=f.length>0||o||(k??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(C??0)>0||o?rt():null,d&&ht(d,"two-row-top"),b&&De()]}),x?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[f.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[f.map(q=>ht(q,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[ft(),Ft()]})]}):null,r.jsx("div",{"data-controls":o?"titleRowMarginBottom":void 0,"data-controls-axis":o?"y":void 0,"data-controls-reverse":o?"":void 0,className:o?`${e}-control`:void 0,style:{height:Ge,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},kt=()=>r.jsxs(r.Fragment,{children:[(C??0)>0||o?rt("single-row"):null,F.map(d=>ht(d,"single-row")),o?r.jsxs(r.Fragment,{children:[Et(),mt()]}):null,b?De():null]}),St=l.useCallback(d=>!!(d.closest("[data-controls]")||d.closest(`.${e}-thumbnails`)||d.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Be,backdropStyle:xt,mediaAreaStyle:Ct,overlayContentStyle:wt,swipeHandlers:Dt,dismissAreaStyle:dt}=Zs({enabled:B??!1,onClose:it,animMs:Li,isBlockedTarget:St}),Ot=()=>{if(!ut||t.length===0)return $t.current=0,0;const d=Oe.current[0],f=Oe.current[t.length];if(!d||!f)return $t.current;const x=f.offsetLeft-d.offsetLeft;return x>0&&($t.current=x),$t.current},Wt=(d=!1)=>{if(!ut)return;const f=Ue.current,x=Ot();!f||x<=0||x<f.clientWidth*.25||(f.scrollLeft<=0?(f.scrollLeft+=x,d&&(Je.current.scrollLeft+=x),ot.current&&(et.current+=x)):f.scrollLeft>=x*2&&(f.scrollLeft-=x,d&&(Je.current.scrollLeft-=x),ot.current&&(et.current-=x)))},pn=(d,f=(x=>(x=Ue.current)==null?void 0:x.scrollLeft)()??0)=>{if(!ut)return d;let q=t.length+d,re=1/0;for(let we=0;we<un;we++){const ke=we*t.length+d,Ke=Oe.current[ke];if(!Ke)continue;const Pt=Math.abs(Ke.offsetLeft-f);Pt<re&&(re=Pt,q=ke)}return q},$n=d=>{const f=Ue.current;return!d||!f?!1:d.offsetWidth>f.clientWidth+1},mn=d=>{const f=Ue.current;if(!d||!f||!$n(d))return!1;const x=d.offsetLeft,q=x+d.offsetWidth;return f.scrollLeft>=x-1&&f.scrollLeft+f.clientWidth<=q+1},qt=(d=(f=>(f=Ue.current)==null?void 0:f.scrollLeft)()??0)=>{for(let q=0;q<Oe.current.length;q+=1){const re=Oe.current[q];if(re&&mn(re))return q}let x={flatIndex:0,distance:1/0};return Oe.current.forEach((q,re)=>{if(!q)return;const we=Math.abs(q.offsetLeft-d);we<x.distance&&(x={flatIndex:re,distance:we})}),x.flatIndex},Cn=d=>{Ue.current&&Oe.current.forEach(f=>{f&&(f.style.scrollSnapAlign=$n(f)&&d==="backward"?"end":"start")})},Xn=(d,f,x)=>{const q=d-f,re=qt(f),we=Oe.current[re];if(mn(we))return qt(d)%t.length;const ke=Oe.current[re+1],Ke=we?ke?ke.offsetLeft-we.offsetLeft:we.offsetWidth:0,Pt=Ke>0?q>Ke*lo?1:q<-Ke*lo?-1:0:0;return Pt===0?x:ut?(x+Pt+t.length)%t.length:Math.max(0,Math.min(t.length-1,x+Pt))},Yn=l.useCallback((d=!1)=>{if(w!=="on"||o)return;const f=qe.current,x=h.current,q=Qe.current[x];if(!f||!q||f.scrollWidth<=f.clientWidth)return;const re=f.scrollLeft,we=re+f.clientWidth,ke=q.offsetLeft,Ke=ke+q.offsetWidth;if(ke>=re&&Ke<=we)return;const Pt=f.scrollWidth-f.clientWidth;let Tt=re;if(!d&&vt.current===null){const Zn=Qe.current[x-1],wi=Qe.current[x+1],Qi=Zn?q.offsetLeft-Zn.offsetLeft:wi?wi.offsetLeft-q.offsetLeft:q.offsetWidth;Ke>we?Tt+=Qi:ke<re&&(Tt-=Qi)}else Ke>we?Tt=Ke-f.clientWidth:Tt=ke;f.scrollLeft=Math.max(0,Math.min(Pt,Tt))},[o,w]),xi=l.useCallback((d=!1)=>{d&&(xe.current=!0),le.current===null&&(le.current=requestAnimationFrame(()=>{le.current=null;const f=xe.current;xe.current=!1,Yn(f)}))},[Yn]),Go=l.useCallback(d=>{if(d===h.current)return;const f=h.current;h.current=d;const x=Math.abs(d-f)>1,q=ut&&t.length>1&&(f===t.length-1&&d===0||f===0&&d===t.length-1);ue(d),xi(x||q)},[t.length,ut,xi]),Jt=()=>{if(!Ue.current||t.length===0||vt.current!==null||Je.current.isActive&&Je.current.hasMoved)return;const d=Ue.current.scrollLeft,f=qt(d)%t.length;f!==h.current&&Go(f)},Ui=()=>{vt.current=null},Zt=d=>{const f=Ue.current;f&&(f.style.scrollSnapType=d?"":"none")},gn=()=>{var d;(d=Ht.current)==null||d.call(Ht),Ht.current=null},Tn=()=>{Xe.current!==null&&(cancelAnimationFrame(Xe.current),Xe.current=null),ot.current=!1},Fn=()=>{const d=Ue.current;if(!d){Xe.current=null,ot.current=!1;return}const f=et.current-d.scrollLeft;if(Math.abs(f)<.5){d.scrollLeft=et.current,Wt(),Jt(),Xe.current=null,ot.current=!1;return}d.scrollLeft+=f*Dm,Wt(),Jt(),Te(),Xe.current=requestAnimationFrame(Fn)},Nn=()=>{const d=Ce.current;d&&(d.style.transition="",d.style.transform="",d.style.willChange="")},Xi=(d,f,x,q)=>{Nn(),d.scrollLeft=f,We.current=d.scrollLeft,Wt(),x!==void 0?(h.current=x,ue(x)):Jt(),Zt(!0),q==null||q()},Yi=(d,{behavior:f="smooth",activeIndex:x,onComplete:q}={})=>{const re=Ue.current,we=Ce.current;if(!re||!we)return;if(Tn(),gn(),Zt(!1),f==="auto"){Xi(re,d,x,q);return}const ke=Math.abs(d-re.scrollLeft),Ke=_m(ke,Hm,Om,re.clientWidth*.55);Ht.current=Nm(re,we,d,{duration:Ke,easing:Bm,onComplete:()=>{Ht.current=null,Xi(re,d,x,q)}})},Uo=(d="smooth")=>{const f=Ue.current;if(!f||t.length===0)return;const x=qt()%t.length,q=pn(x,f.scrollLeft),re=Oe.current[q];re&&Yi(re.offsetLeft,{behavior:d,activeIndex:x})},Xo=(d,f="smooth",x,q)=>{const re=Ue.current;if(!re||t.length===0)return;const we=(q??re.scrollLeft)-d,ke=qt(d),Ke=Oe.current[ke];if(mn(Ke)){Zt(!0),Jt();return}const Pt=Oe.current[ke+1],Tt=Ke?Pt?Pt.offsetLeft-Ke.offsetLeft:Ke.offsetWidth:0;if((Tt>0?we>Tt*lo?1:we<-Tt*lo?-1:0:0)!==0){const ol=x??ke%t.length,rl=Xn(q??re.scrollLeft,d,ol);sn(rl,f);return}const wi=q??re.scrollLeft,Qi=qt(wi),oa=Oe.current[Qi];if(oa&&Math.abs(oa.offsetLeft-wi)<1){Zt(!0),Jt();return}Uo("auto")},sn=(d,f="smooth")=>{const x=Ue.current;if(!x||t.length===0)return;const q=pn(d,x.scrollLeft),re=Oe.current[q];re&&(f==="smooth"?vt.current=d:vt.current=null,h.current=d,ue(d),xi(!0),Yi(re.offsetLeft,{behavior:f,activeIndex:d,onComplete:f==="smooth"?Ui:void 0}))},Jn=()=>{Mt.current&&(window.removeEventListener("pointerup",Mt.current),window.removeEventListener("pointercancel",Mt.current),Mt.current=null)},Ji=(d,f,x,q,re)=>{const we=x-d,ke=q-f,Ke=Math.abs(we),Pt=Math.abs(ke);if(Ke<Km||Ke<=Pt)return!1;const Tt=we<0?1:-1,Zn=ut?(re+Tt+t.length)%t.length:Math.max(0,Math.min(t.length-1,re+Tt));return Zn===re?!1:(sn(Zn),!0)},Hn=d=>{if(!Je.current.isActive)return;Jn();const f=Ue.current;if(!f)return;const{scrollLeft:x,startActiveIndex:q,hasMoved:re}=Je.current,we=f.scrollLeft;Wt(!0),Je.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},nt(!1),d!==void 0&&f.hasPointerCapture(d)&&f.releasePointerCapture(d),re?Xo(x,"smooth",q,we):(Zt(!0),Jt()),Te()},Zi=(d,f)=>{const x=At.current;At.current=null,x&&(Ji(x.startX,x.startY,d,f,x.startActiveIndex),Te())},Yo=d=>{if(!Ee)return;if(d.pointerType==="touch"){if(Tn(),Zt(!0),St(d.target))return;At.current={startX:d.clientX,startY:d.clientY,startActiveIndex:h.current};return}if(d.pointerType!=="mouse"||d.button!==0||St(d.target))return;const f=Ue.current;if(!f)return;Tn(),gn(),Nn(),vt.current=null,Je.current={isActive:!0,startX:d.clientX,scrollLeft:f.scrollLeft,startActiveIndex:h.current,hasMoved:!1},Zt(!1),Te(),f.setPointerCapture(d.pointerId),Jn();const x=q=>{q.pointerType==="mouse"&&Hn(q.pointerId)};Mt.current=x,window.addEventListener("pointerup",x),window.addEventListener("pointercancel",x)},Jo=d=>{if(!Ee||d.pointerType!=="mouse")return;const f=Ue.current;if(!f||!Je.current.isActive)return;if(d.buttons===0){Hn(d.pointerId);return}const x=d.clientX-Je.current.startX;Math.abs(x)>qm&&(Je.current.hasMoved=!0,nt(!0)),Je.current.hasMoved&&(d.preventDefault(),f.scrollLeft=Je.current.scrollLeft-x,Wt(!0),Jt(),Te())},A=d=>{if(Ee){if(d.pointerType==="touch"){d.type==="pointerup"?Zi(d.clientX,d.clientY):At.current=null;return}d.pointerType==="mouse"&&Hn(d.pointerId)}},pe=d=>{!Ee||d.pointerType!=="mouse"||Hn(d.pointerId)};return Qs(),l.useEffect(()=>{const d=requestAnimationFrame(()=>Vt(!0));return()=>{cancelAnimationFrame(d),gn(),Jn(),le.current!==null&&(cancelAnimationFrame(le.current),le.current=null),Ne.current&&clearTimeout(Ne.current),tt.current&&clearTimeout(tt.current)}},[]),l.useEffect(()=>{if(!se){ze(!0);return}Te();const d=It.current;if(!d)return;const f=()=>Te();return d.addEventListener("pointermove",f),d.addEventListener("pointerdown",f),()=>{d.removeEventListener("pointermove",f),d.removeEventListener("pointerdown",f),tt.current&&clearTimeout(tt.current)}},[se,Te]),l.useEffect(()=>{const d=f=>{f.key==="Escape"&&it()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[it]),l.useLayoutEffect(()=>{Ot()},[O,t.length,ut]),l.useLayoutEffect(()=>{o||sn(h.current,"auto")},[O,o]),l.useLayoutEffect(()=>{sn(0,"auto")},[t.length,ut]),l.useEffect(()=>{const d=Ue.current;if(!d||o||!B)return;const f=x=>{if(x.preventDefault(),Math.abs(x.deltaY)<=Math.abs(x.deltaX))return;const q=x.deltaMode===1?Vm:x.deltaMode===2?d.clientHeight:1,re=x.deltaY*q*zm;if(re!==0){if(gn(),ot.current||(ot.current=!0,et.current=d.scrollLeft,vt.current=null,Zt(!1)),et.current+=re,!ut){const we=d.scrollWidth-d.clientWidth;et.current=Math.max(0,Math.min(we,et.current))}Te(),Xe.current===null&&(Xe.current=requestAnimationFrame(Fn))}};return d.addEventListener("wheel",f,{passive:!1}),()=>{d.removeEventListener("wheel",f),Tn()}},[o,B,ut]),l.useEffect(()=>{const d=Ue.current;if(!d)return;const f=()=>{Wt(Je.current.isActive);const q=d.scrollLeft,re=q-We.current;We.current=q;const we=$t.current>0?$t.current*.5:1/0;if(re!==0&&Math.abs(re)<we){const ke=re>0?"forward":"backward";ke!==yt.current&&(yt.current=ke,Cn(ke))}Je.current.isActive&&Je.current.hasMoved||Jt()};d.addEventListener("scroll",f,{passive:!0});const x=new ResizeObserver(()=>{Ot(),Wt(Je.current.isActive),Cn(yt.current),Jt()});return x.observe(d),()=>{gn(),d.removeEventListener("scroll",f),x.disconnect()}},[t.length,ut]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Be||it()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:an?1:0,transition:`opacity ${Li}ms ease`,pointerEvents:an?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:u,...xt}}),r.jsxs("div",{ref:It,className:`${e}-lightbox-dismiss-area`,style:dt,...Dt,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Ct,onClick:d=>d.stopPropagation(),children:r.jsx("div",{ref:Ue,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":Ee&&t.length>0?"true":"false","data-mouse-dragging":Wn?"true":"false",onPointerDown:Yo,onPointerMove:Jo,onPointerUp:A,onPointerCancel:A,onLostPointerCapture:pe,children:r.jsx("div",{ref:Ce,className:`${e}-lightbox-strip-track`,style:{gap:O},children:rn.map((d,f)=>{const x=d.image.objectFit??"contain",q=f%t.length,re=Math.floor(f/t.length),we=co(O),ke=`calc(-0.5 * (${we} + ${O}))`;return r.jsxs("div",{ref:Ke=>Oe.current[f]=Ke,className:`${e}-strip-item`,style:{height:_==="mobile"?"75vh":"100%"},children:[r.jsx("img",{src:d.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:x}}),o&&q<t.length-1&&re===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:ke,width:we,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${re}-${d.image.url}-${q}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":bt?"true":"false",style:wt,children:[r.jsx("div",{style:{position:"relative",width:"100%",height:te,flexShrink:0,pointerEvents:"none"},children:o&&r.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:ce,pointerEvents:"auto",zIndex:3}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:r.jsx("div",{className:`${e}-lightbox-content-area${X?` ${e}-lightbox-content-area-stacked`:""}`,children:(_e||b)&&r.jsx("div",{className:`${e}-header ${X?`${e}-header-two-row`:`${e}-header-single-row`}`,children:X?pt():_e||b?kt():null})})})]}),t.length>1&&w==="on"&&(()=>{const d=co(Y),f=`calc(-0.5 * (${Y} + ${d}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:Y},children:r.jsx("div",{ref:qe,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:x=>x.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":S,style:{gap:Q,"--thumbnail-active-color":z},children:[t.map((x,q)=>{const re=co(Q),we=`calc(-0.5 * (${re} + ${Q}))`;return r.jsxs("div",{ref:ke=>{Qe.current[q]=ke},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":W===q?"true":"false",onClick:()=>B&&T==="click"&&sn(q),onMouseEnter:()=>Fe&&T==="hover"&&sn(q),"aria-label":x.image.name?`View ${x.image.name}`:`View image ${q+1}`,"aria-current":W===q?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${Re?` ${e}-thumb-image-cover`:""}`,src:x.image.url,alt:"",draggable:!1,style:{...Ie,maxWidth:H,maxHeight:H,width:$.display==="cover"?"auto":"100%",height:"auto",objectFit:$.display==="cover"?"cover":"contain"}})}),o&&q<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:we,width:re,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${x.image.url}-${q}`)}),o&&r.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:f,height:d,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function og(e){return`
|
|
10141
|
+
`;function En(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Ya={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Im=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Am={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:En("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:{...Ya.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:{...Ya.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:En("Question Padding Left"),questionPaddingTop:En("Question Padding Top"),questionPaddingBottom:En("Question Padding Bottom"),answerPaddingLeft:En("Answer Padding Left"),answerPaddingRight:En("Answer Padding Right"),answerPaddingTop:En("Answer Padding Top"),answerPaddingBottom:En("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/component-assets/PlusIcon.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...Im],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},Rm={element:Em,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/FAQ_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},schema:Am,sourceCode:Pm},vn=e=>e.display==="cover",Do=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Ja=100,km=.2,Za=8,Zs=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=l.useState(0),[a,u]=l.useState(!1),c=l.useRef(null),m=l.useRef(0);m.current=o;const p=l.useMemo(()=>typeof window>"u"?Ja:Math.max(Ja,window.innerHeight*km),[]),E=l.useCallback(y=>Math.max(0,1-y/(p*1.5)),[p]),b=l.useCallback(y=>Math.max(0,1-y/(p*.45)),[p]),C=l.useCallback(y=>{const M=typeof window<"u"?window.innerHeight:800,N=Math.max(.88,1-y/M*.12);return`translateY(${y}px) scale(${N})`},[]),g=l.useCallback(()=>{c.current=null},[]),v=l.useCallback(()=>{u(!0),s(0),window.setTimeout(()=>u(!1),n),g()},[n,g]),T=l.useCallback(()=>{const y=typeof window<"u"?window.innerHeight:800;u(!0),s(y),window.setTimeout(()=>{t(),g(),u(!1)},Math.min(n,200))},[n,t,g]),w=l.useCallback(y=>{!e||a||y.pointerType==="touch"&&(i!=null&&i(y.target)||(c.current={startX:y.clientX,startY:y.clientY,isLocked:null,pointerId:y.pointerId}))},[e,a,i]),$=l.useCallback(y=>{const M=c.current;if(!e||!M||y.pointerType!=="touch"||M.pointerId!==y.pointerId)return;const N=y.clientX-M.startX,V=y.clientY-M.startY;if(M.isLocked===null){if(Math.abs(N)<Za&&Math.abs(V)<Za)return;if(V>0&&V>Math.abs(N))M.isLocked=!0,y.currentTarget.setPointerCapture(y.pointerId);else{M.isLocked=!1,g();return}}if(!M.isLocked)return;y.preventDefault();const te=Math.max(0,V);m.current=te,s(te)},[e,g]),S=l.useCallback(y=>{const M=c.current;if(!e||!M||y.pointerType!=="touch"||M.pointerId!==y.pointerId)return;const N=M.isLocked===!0;if(y.currentTarget.hasPointerCapture(y.pointerId)&&y.currentTarget.releasePointerCapture(y.pointerId),!N){g();return}y.clientY-M.startY>=p?T():v()},[p,T,e,g,v]),_=l.useCallback(y=>{S(y)},[S]),k=l.useCallback(y=>{S(y)},[S]),W=o>0,P=a?`transform ${n}ms ease`:"none",I=a?`opacity ${n}ms ease`:"none",Y=o>0||a;return{isSwipeDragging:W,backdropStyle:{opacity:E(o),transition:I},mediaAreaStyle:{transform:C(o),transition:P,touchAction:W?"none":void 0,willChange:W?"transform":void 0},overlayContentStyle:Y?{opacity:b(o),transition:I}:void 0,swipeHandlers:e?{onPointerDown:w,onPointerMove:$,onPointerUp:_,onPointerCancel:k}:{},dismissAreaStyle:e?{touchAction:W?"none":"pan-x"}:void 0}},Mm="[data-lightbox-scrollable]",Qs=()=>{l.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,s=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const a=u=>{const c=u.target;c instanceof Element&&c.closest(Mm)||u.preventDefault()};return document.addEventListener("touchmove",a,{passive:!1}),()=>{document.removeEventListener("touchmove",a),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=s,window.scrollTo(0,e)}},[])},_m=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Wm=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Fm=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Nm=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const a=e.scrollLeft,u=n-a,c=a-n,m=(g,v)=>{Wm(t),e.scrollLeft=g,v&&(s==null||s())};if(Math.abs(u)<.5)return m(n,!0),()=>{};let p=!1,E=0;const b=()=>{t.removeEventListener("transitionend",C),clearTimeout(E)},C=g=>{g.target!==t||g.propertyName!=="transform"||p||(p=!0,b(),m(n,!0))};return t.addEventListener("transitionend",C),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(${c}px, 0, 0)`,E=window.setTimeout(()=>{p||(p=!0,b(),m(n,!0))},i+64),()=>{p||(p=!0,b(),m(a-Fm(t),!1))}},Li=300,Hm=900,Om=1500,Bm="cubic-bezier(0.16, 1, 0.3, 1)",jm=3e3,zm=2,Vm=16,Dm=.05,qm=1,lo=.3,Km=50,Gm=20,ei=.004,Ki=["title1","title2","title3"],Um={title1:"1",title2:"2",title3:"3"},Xm={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Ym={title1:.02,title2:.02,title3:.02},co=e=>`max(${e}, ${Gm}px)`,Jm=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]}},Zm=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=Jm(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},dt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Qm=e=>[dt(e,"fontFamily"),dt(e,"fontSettings"),{type:"row",items:[dt(e,"fontSize"),dt(e,"lineHeight"),dt(e,"letterSpacing"),dt(e,"wordSpacing")]},dt(e,"textAlign"),dt(e,"textAppearance")],eg=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Ki.map(e=>[Um[e],Qm(e)]))}),ta=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},u)=>{if(s<=0||u<=0)return{overflow:s,widths:[u,...a]};const c=Math.min(s,u);return{overflow:s-c,widths:[u-c,...a]}},{overflow:i-1,widths:[]});return o},el=(e,t)=>ta(e,t),uo=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Qa=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:ta(e.length,n),effective:el(e.length,n)}},tg=(e,t,n,i,o,s,a)=>{const u=[];return t&&u.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&u.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:s,text:n}),i&&u.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:a,text:i}),u},ur=(e,t)=>{const n=i=>{const o=dt(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[Xm[t]]}},ng=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),pr=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??Ym[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return kt(i,n)},ig=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:a})=>{const{backgroundColor:u,thumbnailSize:c,thumbnailGap:m,thumbnailMarginBottom:p,imageGap:E,closeIcon:b,closeIconMaxWidth:C,closeIconColor:g,closeIconHoverColor:v,thumbnailTrigger:T,thumbnailVisibility:w,thumbnailObjectFit:$,thumbnailActive:S,thumbnailActiveColor:_,title1Width:k,title2Width:W,title3Width:P,title1MarginLeft:I=0,title2MarginLeft:Y=0,title3MarginLeft:y=0,titleRowMarginBottom:M=0,titleHeaderLayout:N="desktop",contentMarginTop:V,iconMarginLeft:te}=n,ue=d=>L.scalingValue(d,i??!1),K=c??n.thumnailSize??.03,H=ue(K),Z=ue(m),G=ue(p??.02),B=ue(E??0),J=ue(V??0),ie=co(J),oe=ue(te??0),[O,ce]=l.useState(0),h=l.useRef(O);h.current=O;const pe=t[O],{title1:ve,title2:ye,title3:Re}=Zm(pe),ee=pr("title1",ur(n,"title1"),i),ge=pr("title2",ur(n,"title2"),i),X=pr("title3",ur(n,"title3"),i),U=N==="mobile",j=!o&&(!i||s),he=j,ne=j,Ce=j,we=vn($),be=we?{"--image-aspect-ratio":Do($)}:void 0,Ie=!!(ve||ye||Re),F=l.useMemo(()=>tg(e,ve,ye,Re,ee,ge,X),[e,O,ve,ye,Re,ee,ge,X]),Q=l.useMemo(()=>({title1Width:k,title2Width:W,title3Width:P}),[k,W,P]),A=l.useMemo(()=>F.map(d=>Q[d.widthKey]),[F,Q]),D=l.useMemo(()=>ta(F.length,A),[F.length,A]),z=l.useMemo(()=>el(F.length,A),[F.length,A]),re=l.useMemo(()=>F.filter(d=>d.prefix==="title1"),[F]),de=l.useMemo(()=>F.filter(d=>d.prefix==="title2"||d.prefix==="title3"),[F]),Te=l.useMemo(()=>Qa(re,Q),[re,Q]),We=l.useMemo(()=>Qa(de,Q),[de,Q]),Pe=l.useCallback((d,f)=>{const x=F.indexOf(d);if(!U||f==="single-row")return{effectiveWidth:z[x]??0,resolvedWidth:D[x]??0,maxWidth:uo(x,D)};if(f==="two-row-top"){const se=re.indexOf(d);return{effectiveWidth:Te.effective[se]??0,resolvedWidth:Te.resolved[se]??0,maxWidth:uo(se,Te.resolved)}}const q=de.indexOf(d);return{effectiveWidth:We.effective[q]??0,resolvedWidth:We.resolved[q]??0,maxWidth:uo(q,We.resolved)}},[de,We,z,D,F,re,Te,U]),$e=l.useCallback(d=>L.scalingValue(d,i??!1),[i]),tt=$e(M??0),ae=l.useMemo(()=>({title1MarginLeft:I,title2MarginLeft:Y,title3MarginLeft:y}),[I,Y,y]),ke=l.useCallback(d=>F.slice(0,d+1).reduce((f,x,q)=>f+(x!=null&&x.marginLeftKey?ae[x.marginLeftKey]??0:0)+(D[q]??0),0)+(U?0:I??0),[F,ae,D,U,I]),je=l.useCallback(()=>U?0:I??0,[U,I]),ze=l.useCallback(d=>de.slice(0,d).reduce((f,x,q)=>f+(x.marginLeftKey?ae[x.marginLeftKey]??0:0)+(We.resolved[q]??0),0),[de,We.resolved,ae]),lt=l.useCallback(d=>{const f=de[d];return ze(d)+(f.marginLeftKey?ae[f.marginLeftKey]??0:0)+(We.resolved[d]??0)},[de,We.resolved,ze,ae]),ht=(d,f)=>{const x=d.marginLeftKey?ae[d.marginLeftKey]??0:0,{effectiveWidth:q,resolvedWidth:se,maxWidth:xe}=Pe(d,f),_e=o&&f==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":d.prefix,style:{...f==="single-row"?{gridArea:d.prefix}:{},width:$e(q),...x>0?{marginLeft:$e(x)}:{}},children:[r.jsx("p",{className:d.className,style:d.style,children:d.text}),_e&&d.marginLeftKey&&r.jsx("div",{"data-controls":d.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(se),style:{position:"absolute",top:0,left:$e(-x),width:`max(${$e(x)}, 10px)`,height:"100%",pointerEvents:"auto"}}),_e&&r.jsx("div",{"data-controls":d.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(xe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:$e(-ei/2),width:$e(ei),height:"100%",pointerEvents:"auto"}})]},d.className)},Pt=()=>{const d=U?-1:F.findIndex(q=>q.prefix==="title1"),f=!U&&(o||(I??0)>0)?(()=>{const q=I??0,se=d>=0?D[d]:k??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(se),style:{position:"absolute",top:0,left:0,width:`max(${$e(q)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,x=F.flatMap((q,se)=>{if(!q.marginLeftKey)return[];const xe=ae[q.marginLeftKey]??0,_e=ng(F,D,ae,se)+je();return r.jsx("div",{"data-controls":q.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(D[se]),style:{position:"absolute",top:0,left:$e(_e),width:`max(${$e(xe)}, 10px)`,height:"100%",pointerEvents:"auto"}},q.marginLeftKey)});return f?[f,...x]:x},xt=()=>F.map((d,f)=>{const x=uo(f,D),se=ke(f)-ei/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":d.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(x),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:$e(se),width:$e(ei),height:"100%",pointerEvents:"auto"}})},`${d.widthKey}-junction`)}),wt=()=>de.flatMap((d,f)=>{if(!d.marginLeftKey)return[];const x=ae[d.marginLeftKey]??0,q=ze(f),{resolvedWidth:se}=Pe(d,"two-row-bottom");return r.jsx("div",{"data-controls":d.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(se),style:{position:"absolute",top:0,left:$e(q),width:`max(${$e(x)}, 10px)`,height:"100%",pointerEvents:"auto"}},d.marginLeftKey)}),Ht=()=>de.map((d,f)=>{const{maxWidth:x}=Pe(d,"two-row-bottom"),se=lt(f)-ei/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":d.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(x),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:$e(se),width:$e(ei),height:"100%",pointerEvents:"auto"}})},`${d.widthKey}-junction`)}),Lt=l.useRef(null),Ge=l.useRef(null),Ae=l.useRef(null),Be=l.useRef(null),Ye=l.useRef([]),He=l.useRef([]),ct=l.useRef(0),It=l.useRef(null),Je=l.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),Mt=l.useRef(null),Ot=l.useRef(null),Oe=l.useRef(0),mt=l.useRef("forward"),it=l.useRef(0),Ue=l.useRef(null),rt=l.useRef(!1),at=t.length>1&&(!o||!!s),sn=at?3:1,wn=l.useMemo(()=>Array.from({length:sn},()=>t).flat(),[t,sn]),[ln,ot]=l.useState(!1),[tn,Ut]=l.useState(!1),[Ve,ft]=l.useState(!0),yt=l.useRef(null),le=l.useRef(null),Se=l.useRef(!1),Me=l.useRef(!1),Fe=l.useRef(null),et=l.useRef(null),$t=he&&!Ve,Le=l.useCallback(()=>{he&&(ft(!0),et.current&&clearTimeout(et.current),et.current=setTimeout(()=>{Je.current.isActive||ft(!1)},jm))},[he]),Ze=l.useCallback(()=>{o||Me.current||(Me.current=!0,Ut(!1),Fe.current=setTimeout(()=>{a()},Li))},[o,a]),De=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":$t?"true":"false",style:{width:L.scalingValue(C??0,i),height:L.scalingValue(C??0,i),marginRight:oe,"--close-icon-hover-color":v},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Ze,"aria-label":"Close",children:r.jsx(Qt,{url:b,fill:g,hoverFill:i&&!s?g:v,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:oe,height:"100%",pointerEvents:"auto"}})]}),st=(d="two-row")=>r.jsx("div",{...d==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:$e(I??0),flexShrink:0,...d==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...d==="two-row"&&o?{pointerEvents:"auto"}:{}}}),vt=()=>{const d=F.find(q=>q.prefix==="title1"),f=F.filter(q=>q.prefix==="title2"||q.prefix==="title3"),x=f.length>0||o||(M??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(I??0)>0||o?st():null,d&&ht(d,"two-row-top"),b&&De()]}),x?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[f.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[f.map(q=>ht(q,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[wt(),Ht()]})]}):null,r.jsx("div",{"data-controls":o?"titleRowMarginBottom":void 0,"data-controls-axis":o?"y":void 0,"data-controls-reverse":o?"":void 0,className:o?`${e}-control`:void 0,style:{height:tt,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},At=()=>r.jsxs(r.Fragment,{children:[(I??0)>0||o?st("single-row"):null,F.map(d=>ht(d,"single-row")),o?r.jsxs(r.Fragment,{children:[Pt(),xt()]}):null,b?De():null]}),qe=l.useCallback(d=>!!(d.closest("[data-controls]")||d.closest(`.${e}-thumbnails`)||d.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:nt,backdropStyle:Et,mediaAreaStyle:St,overlayContentStyle:_t,swipeHandlers:$n,dismissAreaStyle:gt}=Zs({enabled:j??!1,onClose:Ze,animMs:Li,isBlockedTarget:qe}),Bt=()=>{if(!at||t.length===0)return ct.current=0,0;const d=He.current[0],f=He.current[t.length];if(!d||!f)return ct.current;const x=f.offsetLeft-d.offsetLeft;return x>0&&(ct.current=x),ct.current},Ft=(d=!1)=>{if(!at)return;const f=Ge.current,x=Bt();!f||x<=0||x<f.clientWidth*.25||(f.scrollLeft<=0?(f.scrollLeft+=x,d&&(Je.current.scrollLeft+=x),rt.current&&(it.current+=x)):f.scrollLeft>=x*2&&(f.scrollLeft-=x,d&&(Je.current.scrollLeft-=x),rt.current&&(it.current-=x)))},cn=(d,f=(x=>(x=Ge.current)==null?void 0:x.scrollLeft)()??0)=>{if(!at)return d;let q=t.length+d,se=1/0;for(let xe=0;xe<sn;xe++){const _e=xe*t.length+d,Ke=He.current[_e];if(!Ke)continue;const Rt=Math.abs(Ke.offsetLeft-f);Rt<se&&(se=Rt,q=_e)}return q},Sn=d=>{const f=Ge.current;return!d||!f?!1:d.offsetWidth>f.clientWidth+1},dn=d=>{const f=Ge.current;if(!d||!f||!Sn(d))return!1;const x=d.offsetLeft,q=x+d.offsetWidth;return f.scrollLeft>=x-1&&f.scrollLeft+f.clientWidth<=q+1},zt=(d=(f=>(f=Ge.current)==null?void 0:f.scrollLeft)()??0)=>{for(let q=0;q<He.current.length;q+=1){const se=He.current[q];if(se&&dn(se))return q}let x={flatIndex:0,distance:1/0};return He.current.forEach((q,se)=>{if(!q)return;const xe=Math.abs(q.offsetLeft-d);xe<x.distance&&(x={flatIndex:se,distance:xe})}),x.flatIndex},Cn=d=>{Ge.current&&He.current.forEach(f=>{f&&(f.style.scrollSnapAlign=Sn(f)&&d==="backward"?"end":"start")})},Xn=(d,f,x)=>{const q=d-f,se=zt(f),xe=He.current[se];if(dn(xe))return zt(d)%t.length;const _e=He.current[se+1],Ke=xe?_e?_e.offsetLeft-xe.offsetLeft:xe.offsetWidth:0,Rt=Ke>0?q>Ke*lo?1:q<-Ke*lo?-1:0:0;return Rt===0?x:at?(x+Rt+t.length)%t.length:Math.max(0,Math.min(t.length-1,x+Rt))},Yn=l.useCallback((d=!1)=>{if(w!=="on"||o)return;const f=Be.current,x=h.current,q=Ye.current[x];if(!f||!q||f.scrollWidth<=f.clientWidth)return;const se=f.scrollLeft,xe=se+f.clientWidth,_e=q.offsetLeft,Ke=_e+q.offsetWidth;if(_e>=se&&Ke<=xe)return;const Rt=f.scrollWidth-f.clientWidth;let Ct=se;if(!d&&yt.current===null){const Zn=Ye.current[x-1],wi=Ye.current[x+1],Qi=Zn?q.offsetLeft-Zn.offsetLeft:wi?wi.offsetLeft-q.offsetLeft:q.offsetWidth;Ke>xe?Ct+=Qi:_e<se&&(Ct-=Qi)}else Ke>xe?Ct=Ke-f.clientWidth:Ct=_e;f.scrollLeft=Math.max(0,Math.min(Rt,Ct))},[o,w]),xi=l.useCallback((d=!1)=>{d&&(Se.current=!0),le.current===null&&(le.current=requestAnimationFrame(()=>{le.current=null;const f=Se.current;Se.current=!1,Yn(f)}))},[Yn]),Go=l.useCallback(d=>{if(d===h.current)return;const f=h.current;h.current=d;const x=Math.abs(d-f)>1,q=at&&t.length>1&&(f===t.length-1&&d===0||f===0&&d===t.length-1);ce(d),xi(x||q)},[t.length,at,xi]),Xt=()=>{if(!Ge.current||t.length===0||yt.current!==null||Je.current.isActive&&Je.current.hasMoved)return;const d=Ge.current.scrollLeft,f=zt(d)%t.length;f!==h.current&&Go(f)},Ui=()=>{yt.current=null},Yt=d=>{const f=Ge.current;f&&(f.style.scrollSnapType=d?"":"none")},un=()=>{var d;(d=Ot.current)==null||d.call(Ot),Ot.current=null},Tn=()=>{Ue.current!==null&&(cancelAnimationFrame(Ue.current),Ue.current=null),rt.current=!1},Wn=()=>{const d=Ge.current;if(!d){Ue.current=null,rt.current=!1;return}const f=it.current-d.scrollLeft;if(Math.abs(f)<.5){d.scrollLeft=it.current,Ft(),Xt(),Ue.current=null,rt.current=!1;return}d.scrollLeft+=f*Dm,Ft(),Xt(),Le(),Ue.current=requestAnimationFrame(Wn)},Fn=()=>{const d=Ae.current;d&&(d.style.transition="",d.style.transform="",d.style.willChange="")},Xi=(d,f,x,q)=>{Fn(),d.scrollLeft=f,Oe.current=d.scrollLeft,Ft(),x!==void 0?(h.current=x,ce(x)):Xt(),Yt(!0),q==null||q()},Yi=(d,{behavior:f="smooth",activeIndex:x,onComplete:q}={})=>{const se=Ge.current,xe=Ae.current;if(!se||!xe)return;if(Tn(),un(),Yt(!1),f==="auto"){Xi(se,d,x,q);return}const _e=Math.abs(d-se.scrollLeft),Ke=_m(_e,Hm,Om,se.clientWidth*.55);Ot.current=Nm(se,xe,d,{duration:Ke,easing:Bm,onComplete:()=>{Ot.current=null,Xi(se,d,x,q)}})},Uo=(d="smooth")=>{const f=Ge.current;if(!f||t.length===0)return;const x=zt()%t.length,q=cn(x,f.scrollLeft),se=He.current[q];se&&Yi(se.offsetLeft,{behavior:d,activeIndex:x})},Xo=(d,f="smooth",x,q)=>{const se=Ge.current;if(!se||t.length===0)return;const xe=(q??se.scrollLeft)-d,_e=zt(d),Ke=He.current[_e];if(dn(Ke)){Yt(!0),Xt();return}const Rt=He.current[_e+1],Ct=Ke?Rt?Rt.offsetLeft-Ke.offsetLeft:Ke.offsetWidth:0;if((Ct>0?xe>Ct*lo?1:xe<-Ct*lo?-1:0:0)!==0){const ol=x??_e%t.length,rl=Xn(q??se.scrollLeft,d,ol);nn(rl,f);return}const wi=q??se.scrollLeft,Qi=zt(wi),oa=He.current[Qi];if(oa&&Math.abs(oa.offsetLeft-wi)<1){Yt(!0),Xt();return}Uo("auto")},nn=(d,f="smooth")=>{const x=Ge.current;if(!x||t.length===0)return;const q=cn(d,x.scrollLeft),se=He.current[q];se&&(f==="smooth"?yt.current=d:yt.current=null,h.current=d,ce(d),xi(!0),Yi(se.offsetLeft,{behavior:f,activeIndex:d,onComplete:f==="smooth"?Ui:void 0}))},Jn=()=>{Mt.current&&(window.removeEventListener("pointerup",Mt.current),window.removeEventListener("pointercancel",Mt.current),Mt.current=null)},Ji=(d,f,x,q,se)=>{const xe=x-d,_e=q-f,Ke=Math.abs(xe),Rt=Math.abs(_e);if(Ke<Km||Ke<=Rt)return!1;const Ct=xe<0?1:-1,Zn=at?(se+Ct+t.length)%t.length:Math.max(0,Math.min(t.length-1,se+Ct));return Zn===se?!1:(nn(Zn),!0)},Nn=d=>{if(!Je.current.isActive)return;Jn();const f=Ge.current;if(!f)return;const{scrollLeft:x,startActiveIndex:q,hasMoved:se}=Je.current,xe=f.scrollLeft;Ft(!0),Je.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},ot(!1),d!==void 0&&f.hasPointerCapture(d)&&f.releasePointerCapture(d),se?Xo(x,"smooth",q,xe):(Yt(!0),Xt()),Le()},Zi=(d,f)=>{const x=It.current;It.current=null,x&&(Ji(x.startX,x.startY,d,f,x.startActiveIndex),Le())},Yo=d=>{if(!ne)return;if(d.pointerType==="touch"){if(Tn(),Yt(!0),qe(d.target))return;It.current={startX:d.clientX,startY:d.clientY,startActiveIndex:h.current};return}if(d.pointerType!=="mouse"||d.button!==0||qe(d.target))return;const f=Ge.current;if(!f)return;Tn(),un(),Fn(),yt.current=null,Je.current={isActive:!0,startX:d.clientX,scrollLeft:f.scrollLeft,startActiveIndex:h.current,hasMoved:!1},Yt(!1),Le(),f.setPointerCapture(d.pointerId),Jn();const x=q=>{q.pointerType==="mouse"&&Nn(q.pointerId)};Mt.current=x,window.addEventListener("pointerup",x),window.addEventListener("pointercancel",x)},Jo=d=>{if(!ne||d.pointerType!=="mouse")return;const f=Ge.current;if(!f||!Je.current.isActive)return;if(d.buttons===0){Nn(d.pointerId);return}const x=d.clientX-Je.current.startX;Math.abs(x)>qm&&(Je.current.hasMoved=!0,ot(!0)),Je.current.hasMoved&&(d.preventDefault(),f.scrollLeft=Je.current.scrollLeft-x,Ft(!0),Xt(),Le())},R=d=>{if(ne){if(d.pointerType==="touch"){d.type==="pointerup"?Zi(d.clientX,d.clientY):It.current=null;return}d.pointerType==="mouse"&&Nn(d.pointerId)}},me=d=>{!ne||d.pointerType!=="mouse"||Nn(d.pointerId)};return Qs(),l.useEffect(()=>{const d=requestAnimationFrame(()=>Ut(!0));return()=>{cancelAnimationFrame(d),un(),Jn(),le.current!==null&&(cancelAnimationFrame(le.current),le.current=null),Fe.current&&clearTimeout(Fe.current),et.current&&clearTimeout(et.current)}},[]),l.useEffect(()=>{if(!he){ft(!0);return}Le();const d=Lt.current;if(!d)return;const f=()=>Le();return d.addEventListener("pointermove",f),d.addEventListener("pointerdown",f),()=>{d.removeEventListener("pointermove",f),d.removeEventListener("pointerdown",f),et.current&&clearTimeout(et.current)}},[he,Le]),l.useEffect(()=>{const d=f=>{f.key==="Escape"&&Ze()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[Ze]),l.useLayoutEffect(()=>{Bt()},[B,t.length,at]),l.useLayoutEffect(()=>{o||nn(h.current,"auto")},[B,o]),l.useLayoutEffect(()=>{nn(0,"auto")},[t.length,at]),l.useEffect(()=>{const d=Ge.current;if(!d||o||!j)return;const f=x=>{if(x.preventDefault(),Math.abs(x.deltaY)<=Math.abs(x.deltaX))return;const q=x.deltaMode===1?Vm:x.deltaMode===2?d.clientHeight:1,se=x.deltaY*q*zm;if(se!==0){if(un(),rt.current||(rt.current=!0,it.current=d.scrollLeft,yt.current=null,Yt(!1)),it.current+=se,!at){const xe=d.scrollWidth-d.clientWidth;it.current=Math.max(0,Math.min(xe,it.current))}Le(),Ue.current===null&&(Ue.current=requestAnimationFrame(Wn))}};return d.addEventListener("wheel",f,{passive:!1}),()=>{d.removeEventListener("wheel",f),Tn()}},[o,j,at]),l.useEffect(()=>{const d=Ge.current;if(!d)return;const f=()=>{Ft(Je.current.isActive);const q=d.scrollLeft,se=q-Oe.current;Oe.current=q;const xe=ct.current>0?ct.current*.5:1/0;if(se!==0&&Math.abs(se)<xe){const _e=se>0?"forward":"backward";_e!==mt.current&&(mt.current=_e,Cn(_e))}Je.current.isActive&&Je.current.hasMoved||Xt()};d.addEventListener("scroll",f,{passive:!0});const x=new ResizeObserver(()=>{Bt(),Ft(Je.current.isActive),Cn(mt.current),Xt()});return x.observe(d),()=>{un(),d.removeEventListener("scroll",f),x.disconnect()}},[t.length,at]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{nt||Ze()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:tn?1:0,transition:`opacity ${Li}ms ease`,pointerEvents:tn?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:u,...Et}}),r.jsxs("div",{ref:Lt,className:`${e}-lightbox-dismiss-area`,style:gt,...$n,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:St,onClick:d=>d.stopPropagation(),children:r.jsx("div",{ref:Ge,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":ne&&t.length>0?"true":"false","data-mouse-dragging":ln?"true":"false",onPointerDown:Yo,onPointerMove:Jo,onPointerUp:R,onPointerCancel:R,onLostPointerCapture:me,children:r.jsx("div",{ref:Ae,className:`${e}-lightbox-strip-track`,style:{gap:B},children:wn.map((d,f)=>{const x=d.image.objectFit??"contain",q=f%t.length,se=Math.floor(f/t.length),xe=co(B),_e=`calc(-0.5 * (${xe} + ${B}))`;return r.jsxs("div",{ref:Ke=>He.current[f]=Ke,className:`${e}-strip-item`,style:{height:N==="mobile"?"75vh":"100%"},children:[r.jsx("img",{src:d.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:x}}),o&&q<t.length-1&&se===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:_e,width:xe,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${se}-${d.image.url}-${q}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":$t?"true":"false",style:_t,children:[r.jsx("div",{style:{position:"relative",width:"100%",height:J,flexShrink:0,pointerEvents:"none"},children:o&&r.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}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:r.jsx("div",{className:`${e}-lightbox-content-area${U?` ${e}-lightbox-content-area-stacked`:""}`,children:(Ie||b)&&r.jsx("div",{className:`${e}-header ${U?`${e}-header-two-row`:`${e}-header-single-row`}`,children:U?vt():Ie||b?At():null})})})]}),t.length>1&&w==="on"&&(()=>{const d=co(G),f=`calc(-0.5 * (${G} + ${d}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:G},children:r.jsx("div",{ref:Be,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:x=>x.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":S,style:{gap:Z,"--thumbnail-active-color":_},children:[t.map((x,q)=>{const se=co(Z),xe=`calc(-0.5 * (${se} + ${Z}))`;return r.jsxs("div",{ref:_e=>{Ye.current[q]=_e},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":O===q?"true":"false",onClick:()=>j&&T==="click"&&nn(q),onMouseEnter:()=>Ce&&T==="hover"&&nn(q),"aria-label":x.image.name?`View ${x.image.name}`:`View image ${q+1}`,"aria-current":O===q?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${we?` ${e}-thumb-image-cover`:""}`,src:x.image.url,alt:"",draggable:!1,style:{...be,maxWidth:H,maxHeight:H,width:$.display==="cover"?"auto":"100%",height:"auto",objectFit:$.display==="cover"?"cover":"contain"}})}),o&&q<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:xe,width:se,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${x.image.url}-${q}`)}),o&&r.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:f,height:d,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function og(e){return`
|
|
9841
10142
|
.${e}-wrapper {
|
|
9842
10143
|
position: relative;
|
|
9843
10144
|
width: 100%;
|
|
@@ -10229,7 +10530,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
10229
10530
|
pointer-events: auto;
|
|
10230
10531
|
z-index: 10;
|
|
10231
10532
|
}
|
|
10232
|
-
`}const rg=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s})=>{const{prefix:a}=
|
|
10533
|
+
`}const rg=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s})=>{const{prefix:a}=L.useScopedStyles(),{cover:u,coverFit:c}=e,m=l.useRef(null),[p,E]=l.useState(!1),b=t??[],C=p&&b.length>0,g=()=>{b.length!==0&&E(!0)};return l.useEffect(()=>{!n||i||o||E(!1)},[n,i,o]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:m,className:`${a}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:og(a)}}),u&&r.jsx("div",{className:`${a}-cover ${vn(c)?`${a}-ratio-wrapper-cover`:`${a}-ratio-wrapper-fit`}`,onClick:()=>g(),style:{...vn(c)?{"--image-aspect-ratio":Do(c)}:{}},"aria-label":"Open image gallery",children:r.jsx("img",{className:`${a}-cover-image ${vn(c)?`${a}-cover-image-cover`:`${a}-cover-image-fit`}`,src:u,alt:"cover"})})]}),C&&typeof document<"u"&&(()=>{const v=(s?document.getElementById(s):null)??document.body;return Ni.createPortal(r.jsx(ig,{prefix:a,images:b,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>E(!1)}),v)})()]})},ag=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
|
|
10233
10534
|
import { createPortal } from 'react-dom';
|
|
10234
10535
|
import { CommonComponentProps } from '../props';
|
|
10235
10536
|
import { useScopedStyles } from '../utils/useScopedStyles';
|
|
@@ -10783,7 +11084,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
|
|
|
10783
11084
|
</>
|
|
10784
11085
|
);
|
|
10785
11086
|
};
|
|
10786
|
-
`,sg="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>'),zn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",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 lg(e){const t={};return t[st(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[st(e,"fontSettings")]={...zn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[st(e,"fontSize")]={...zn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[st(e,"lineHeight")]={...zn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[st(e,"letterSpacing")]={...zn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[st(e,"wordSpacing")]={...zn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[st(e,"textAlign")]={...zn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[st(e,"textAppearance")]={...zn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const cg=Ki.reduce((e,t)=>({...e,...lg(t)}),{}),dg=Ki.reduce((e,t)=>({...e,[st(t,"fontFamily")]:"Goudy Bookletter 1911",[st(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[st(t,"letterSpacing")]:0,[st(t,"wordSpacing")]:0,[st(t,"textAlign")]:"left",[st(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function es(e){return Ki.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[st(n,"fontSize")]=i),o!==void 0&&(t[st(n,"lineHeight")]=o),t},{})}const ug=eg(),pg={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:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up"]}},thumbnailActiveColor:{type:"string",scope:"common",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},...cg,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/lightbox_strip_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:sg,closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",...dg},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,backgroundColor:"#FFFFFF",contentMarginTop:.08,iconMarginLeft:.02,...es({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,backgroundColor:"#FFFFFF",contentMarginTop:.015,iconMarginLeft:.02,...es({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:[ug]}],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/lightbox_strip_2.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_3.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_4.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_5.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_6.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_7.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"}]}},mg={element:rg,id:"lightbox-strip",name:"Lightbox Strip",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:pg,sourceCode:ag,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Ki.map(e=>({path:`styles.${st(e,"fontSettings")}`}))}},gg=50,ts=10,na="cntrl-lightbox-journal",qo=na,Lr=`${na}-`,Ko=e=>`${na}-${e}`,ia=e=>e===qo||e.startsWith(Lr),ns=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},is=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=ns(t.get(Ko(e)));if(i)return i}const n=ns(t.get(qo));if(n)return n;for(const[i]of t){if(!i.startsWith(Lr))continue;const o=i.slice(Lr.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},os=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},tl=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(a=>{ia(a)&&i.searchParams.delete(a)}),t?i.searchParams.set(Ko(t),String(e)):i.searchParams.set(qo,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},hg=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Ko(e)||i===qo:ia(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)}},nl=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Ko(e)):[...t.keys()].some(n=>ia(n))},fg=(e,t)=>{if(nl(t)){if(e){window.history.back();return}hg(t)}},yg=20,vg=2,mr=e=>`max(${e}, ${yg}px)`,hi=e=>((e==null?void 0:e.image)??[]).slice(0,vg),il=e=>e.reduce((t,n)=>t+hi(n).length,0),bg=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+hi(s).length,1),i=hi(e[t]).length;return{start:n,end:n+i-1}},xg=(e,t)=>{const n=il(e),{start:i,end:o}=bg(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},$o=(e,t)=>t==="B"?e.flatMap((n,i)=>hi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:hi(n)})),wg=(e,t,n,i)=>{var s;if(n==="B")return`${t+1} / ${e.length}`;const o=((s=e[t])==null?void 0:s.entryIndex)??0;return xg(i,o)},rs=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Sg=(e,t,n)=>e==="B"?t.length>1:il(n)>1,ti=.004,gr=.004,hr={title1Width:.13,title2Width:.13,title3Width:.14},po=(e,t,n,i,o)=>{const s=[];return t.title1&&s.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&s.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&s.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),s},Ro=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},u)=>{if(s<=0||u<=0)return{overflow:s,widths:[u,...a]};const c=Math.min(s,u);return{overflow:s-c,widths:[u-c,...a]}},{overflow:i-1,widths:[]});return o},Er=(e,t)=>Ro(e,t),Vn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},mo=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ro(e.length,n),effective:Er(e.length,n)}},$g=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),Cg=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),Gi=["title1","title2","title3","count"],lt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Tg={title1:"1",title2:"2",title3:"3",count:"Count"},Lg=e=>[lt(e,"fontFamily"),lt(e,"fontSettings"),{type:"row",items:[lt(e,"fontSize"),lt(e,"lineHeight"),lt(e,"letterSpacing"),lt(e,"wordSpacing")]},lt(e,"textAlign"),lt(e,"textAppearance")],Eg=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Gi.map(e=>[Tg[e],Lg(e)]))}),Ig={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Pg={title1:.02,title2:.02,title3:.02,count:.017},go=(e,t)=>{const n=i=>{const o=lt(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[Ig[t]]}},ho=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??Pg[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Rt(i,n)},Rg=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:a=0,enableUrlSync:u=!1,journalItemId:c=null,onBeforeClose:m,onClose:p})=>{const{type:R,coverFit:b,backgroundColor:I,imageGap:g,maxWidth:v,maxHeight:T,textTransition:w,title1Width:$,title2Width:S,title3Width:z,title1MarginLeft:M=0,title2MarginLeft:N=0,title3MarginLeft:L=0,titleRowMarginBottom:C=0,titleHeaderLayout:J="single-row",countCloseGap:y=0,closeIcon:k,closeIconMaxWidth:_,closeIconColor:V,closeIconHoverColor:ne,contentMarginTop:me=0,iconMarginRight:K=0}=n,H=l.useCallback(A=>P.scalingValue(A,i??!1),[i]),Q=H(g??0),Y=`${v}%`,O=`${T}%`,te=H(y),ce=H(me),oe=H(K),W=ho("title1",go(n,"title1"),i),ue=ho("title2",go(n,"title2"),i),h=ho("title3",go(n,"title3"),i),ae=ho("count",go(n,"count"),i),be=J==="mobile",ye=!i||!!s,Ae=!o&&(!i||!!s),Z=l.useMemo(()=>$o(t,R),[t,R]),[ge,U]=l.useState(a),X=Z[ge],B=X==null?void 0:X.entry,[se,Ee]=l.useState(!1),[Fe,Re]=l.useState(null),[Ie,_e]=l.useState(!1),[F,D]=l.useState(null),[E,j]=l.useState(!1),[G,ee]=l.useState(0),[ie,he]=l.useState(),[Se,$e]=l.useState(),[fe,Ge]=l.useState(null),de=l.useRef(null),Me=l.useRef(0),je=l.useRef(0),Ve=l.useRef(0),at=l.useRef(!1),ht=l.useRef(null),Et=l.useRef(null),mt=l.useRef(null),ft=l.useRef(null),Ft=l.useRef(null),It=l.useRef(null),Ue=l.useRef(null),Ce=l.useCallback(()=>{const A=Et.current;if(!A)return;const pe=A.closest(`.${e}-lightbox-content-area`);if(!pe)return A.getBoundingClientRect().width;const d=Array.from(pe.children).reduce((f,x)=>!(x instanceof HTMLElement)||x.contains(A)?f:f+x.getBoundingClientRect().width,0);return pe.getBoundingClientRect().width-d},[e]),qe=l.useCallback(()=>{de.current&&(clearTimeout(de.current),de.current=null)},[]),Qe=l.useCallback(A=>{A===Me.current&&(D(null),j(!1))},[]),Oe=l.useCallback(()=>{o||at.current||(at.current=!0,m==null||m(),Ee(!1),ht.current=setTimeout(()=>{p()},300))},[o,m,p]),$t=l.useCallback(A=>!!(A.closest("[data-controls]")||A.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:At,backdropStyle:Je,mediaAreaStyle:Mt,overlayContentStyle:Ht,swipeHandlers:We,dismissAreaStyle:yt}=Zs({enabled:Ae,onClose:Oe,animMs:300,isBlockedTarget:$t}),et=l.useCallback(A=>{u&&tl(A+1,c,!0)},[u,c]),Xe=l.useCallback(A=>{if(A)return A.getBoundingClientRect().height},[]),ot=l.useCallback(A=>{if(Z.length===0)return;const pe=(A%Z.length+Z.length)%Z.length;if(pe===ge)return;const d=Z[ge],f=Z[pe];Me.current+=1;const x=Me.current,q=w==="fade"&&rs(d==null?void 0:d.entry)!==rs(f==null?void 0:f.entry),re=Xe(mt.current),we=q?(()=>{const Ke=Ce();Ni.flushSync(()=>{Ge(f.entry)}),mt.current&&Ke&&(mt.current.style.width=`${Ke}px`);const Pt=Xe(mt.current);return mt.current&&(mt.current.style.width=""),{measuredIncomingTitlesHeight:Pt,incomingTitlesMeasureWidth:Ke}})():void 0,ke=Math.max(re??0,(we==null?void 0:we.measuredIncomingTitlesHeight)??0)||void 0;ee(x),D(ge),j(!0),U(pe),et(pe),Ve.current=pe,q?(qe(),ke&&he(ke),we!=null&&we.incomingTitlesMeasureWidth&&$e(we.incomingTitlesMeasureWidth),Re((d==null?void 0:d.entryIndex)??null),_e(!0),je.current=f.entryIndex,de.current=setTimeout(()=>{Re(null),_e(!1),he(void 0),$e(void 0),Ge(null),de.current=null},400)):(qe(),Re(null),_e(!1),he(void 0),$e(void 0),Ge(null),je.current=f.entryIndex)},[ge,qe,Ce,Xe,Z,et,w]),ut=l.useCallback(()=>{Ue.current=null},[]),un=l.useCallback(A=>{!ye||Z.length<=1||A.pointerType==="mouse"&&A.button!==0||A.target.closest("[data-controls]")||(Ue.current={startX:A.clientX,startY:A.clientY,pointerId:A.pointerId})},[ye,Z.length]),rn=l.useCallback(A=>{var Ke;if(!ye||Z.length<=1||A.pointerType==="mouse"&&A.button!==0)return;if(At){ut();return}const pe=Ue.current;if(!pe||pe.pointerId!==A.pointerId||(ut(),A.target.closest("[data-controls]")))return;const f=A.clientX-pe.startX,x=A.clientY-pe.startY,q=Math.abs(f),re=Math.abs(x);if(q>=gg&&q>re){ot(f>0?ge-1:ge+1);return}if(q>ts||re>ts)return;const we=(Ke=ft.current)==null?void 0:Ke.getBoundingClientRect(),ke=we?we.left+we.width/2:window.innerWidth/2;ot(A.clientX<ke?ge-1:ge+1)},[ge,ye,ot,At,ut,Z.length]),Wn=l.useCallback(A=>{const pe=Ue.current;(pe==null?void 0:pe.pointerId)===A.pointerId&&ut()},[ut]);Qs(),l.useEffect(()=>{It.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const A=requestAnimationFrame(()=>{Ee(!0),requestAnimationFrame(()=>{Ft.current?Ft.current.focus():ft.current&&ft.current.focus()})});return()=>{cancelAnimationFrame(A),ht.current&&clearTimeout(ht.current),de.current&&clearTimeout(de.current);const pe=It.current;pe&&document.contains(pe)&&pe.focus()}},[]),l.useEffect(()=>{var A;w!=="fade"&&(je.current=((A=Z[ge])==null?void 0:A.entryIndex)??0,qe(),Re(null),_e(!1),he(void 0),$e(void 0))},[ge,qe,Z,w]),l.useEffect(()=>{const A=pe=>{if(pe.key==="Escape"){Oe();return}if(pe.key==="ArrowLeft"&&Z.length>1){ot(ge-1);return}if(pe.key==="ArrowRight"&&Z.length>1){ot(ge+1);return}if(pe.key==="Tab"&&ft.current){const d=ft.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),f=Array.from(d).filter(we=>!we.closest('[aria-hidden="true"]'));if(f.length===0)return;const x=f[0],q=f[f.length-1],re=document.activeElement;pe.shiftKey?(re===x||!ft.current.contains(re))&&(pe.preventDefault(),q.focus()):(re===q||!ft.current.contains(re))&&(pe.preventDefault(),x.focus())}};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[ot,Oe,ge,Z.length]),l.useLayoutEffect(()=>{qe(),Me.current=0,ee(0),D(null),j(!1),Re(null),_e(!1),he(void 0),$e(void 0),Ge(null),U(A=>{const pe=Math.max(0,Z.length-1);return Math.min(A,pe)})},[qe,t.length,R,Z.length]),l.useLayoutEffect(()=>{var d;const A=Math.max(0,Z.length-1),pe=Math.min(Math.max(0,a),A);Ve.current=pe,je.current=((d=Z[pe])==null?void 0:d.entryIndex)??0,U(pe)},[a]);const nt=Fe!==null?t[Fe]:null,an=F!==null?Z[F]:null,Vt=(B==null?void 0:B.title1)||(B==null?void 0:B.title2)||(B==null?void 0:B.title3)||(nt==null?void 0:nt.title1)||(nt==null?void 0:nt.title2)||(nt==null?void 0:nt.title3),jt=Sg(R,Z,t),ze=k!==null,vt=Vt||jt||ze,le=jt&&ze?{gap:te}:void 0,xe=`${e}-titles-stack${be?` ${e}-titles-stack-stacked`:""}`,Pe=`${e}-titles-layer-out${be?` ${e}-titles-layer-out-stacked`:""}`,Ne=`${e}-titles-layer-out`,tt=(M??0)>0||o,bt=H(C),Te=l.useMemo(()=>({title1Width:$??hr.title1Width,title2Width:S??hr.title2Width,title3Width:z??hr.title3Width}),[$,S,z]),it=l.useMemo(()=>({title2MarginLeft:N,title3MarginLeft:L}),[N,L]),De=l.useMemo(()=>B?po(e,B,W,ue,h):[],[e,B,W,ue,h]),rt=l.useMemo(()=>De.map(A=>Te[A.widthKey]),[De,Te]),pt=l.useMemo(()=>Ro(De.length,rt),[De.length,rt]),kt=l.useMemo(()=>Er(De.length,rt),[De.length,rt]),St=l.useMemo(()=>De.filter(A=>A.prefix==="title1"),[De]),Be=l.useMemo(()=>De.filter(A=>A.prefix==="title2"||A.prefix==="title3"),[De]),xt=l.useMemo(()=>mo(St,Te),[St,Te]),Ct=l.useMemo(()=>mo(Be,Te),[Be,Te]),wt=l.useCallback((A,pe)=>{const d=De.findIndex(x=>x.prefix===A.prefix);if(!be||pe==="single-row")return{effectiveWidth:kt[d]??0,resolvedWidth:pt[d]??0,maxWidth:Vn(d,pt)};if(pe==="two-row-top"){const x=St.findIndex(q=>q.prefix===A.prefix);return{effectiveWidth:xt.effective[x]??0,resolvedWidth:xt.resolved[x]??0,maxWidth:Vn(x,xt.resolved)}}const f=Be.findIndex(x=>x.prefix===A.prefix);return{effectiveWidth:Ct.effective[f]??0,resolvedWidth:Ct.resolved[f]??0,maxWidth:Vn(f,Ct.resolved)}},[De,Be,Ct,kt,pt,St,xt,be]),Dt=l.useCallback(A=>Cg(De,pt,it,A)+(be?0:M??0),[De,pt,it,be,M]),dt=l.useCallback(()=>be?0:M??0,[be,M]),Ot=l.useCallback(A=>Be.slice(0,A).reduce((pe,d,f)=>pe+(d.marginLeftKey?it[d.marginLeftKey]??0:0)+(Ct.resolved[f]??0),0),[Be,Ct.resolved,it]),Wt=l.useCallback(A=>{const pe=Be[A];return Ot(A)+(pe.marginLeftKey?it[pe.marginLeftKey]??0:0)+(Ct.resolved[A]??0)},[Be,Ct.resolved,Ot,it]),pn=l.useCallback((A,pe,d)=>{if(!be||d==="single-row"){const we=A.findIndex(Tt=>Tt.prefix===pe.prefix),ke=A.map(Tt=>Te[Tt.widthKey]),Ke=Ro(A.length,ke);return{effectiveWidth:Er(A.length,ke)[we]??0,resolvedWidth:Ke[we]??0,maxWidth:Vn(we,Ke)}}if(d==="two-row-top"){const we=A.filter(Tt=>Tt.prefix==="title1"),ke=we.findIndex(Tt=>Tt.prefix===pe.prefix),{resolved:Ke,effective:Pt}=mo(we,Te);return{effectiveWidth:Pt[ke]??0,resolvedWidth:Ke[ke]??0,maxWidth:Vn(ke,Ke)}}const f=A.filter(we=>we.prefix==="title2"||we.prefix==="title3"),x=f.findIndex(we=>we.prefix===pe.prefix),{resolved:q,effective:re}=mo(f,Te);return{effectiveWidth:re[x]??0,resolvedWidth:q[x]??0,maxWidth:Vn(x,q)}},[Te,be]),$n=(A,pe,d)=>{const f=A.marginLeftKey?it[A.marginLeftKey]??0:0,{effectiveWidth:x,resolvedWidth:q,maxWidth:re}=d??wt(A,pe),we=Math.max(f,gr),ke=o&&pe==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":A.prefix,style:{width:H(x),...f>0?{marginLeft:H(f)}:{}},children:[r.jsx("p",{className:A.className,style:A.style,children:A.text}),ke&&A.marginLeftKey?r.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(q),style:{position:"absolute",top:0,left:H(-f),width:H(we),height:"100%",pointerEvents:"auto"}}):null,ke?r.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(re),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:H(-ti/2),width:H(ti),height:"100%",pointerEvents:"auto"}}):null]},A.className)},mn=()=>r.jsx("div",{...o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:H(M??0),flexShrink:0,alignSelf:"stretch",...o?{pointerEvents:"auto"}:{}}}),qt=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:W,"aria-hidden":"true",children:" "}),Cn=()=>r.jsx("span",{className:`${e}-entry-counter`,style:ae,"aria-live":"polite","aria-atomic":"true",children:wg(Z,ge,R,t)}),Xn=()=>jt?o&&ze?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Cn(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${mr(te)} + ${te}))`,width:mr(te),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Cn():null,Yn=()=>!jt&&!ze?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:le,children:[Xn(),ze?Jt():null]}),xi=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[jt||Vt?qt():null,tt?mn():null,Zt(B),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),Yn(),sn()]}),Go=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%"},children:[jt||Vt?qt():null,tt?mn():null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:Ie&&ie?{minHeight:ie}:void 0,children:[r.jsx("div",{ref:mt,className:xe,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Nn(fe||B)}),r.jsxs("div",{ref:Et,className:xe,style:{position:Ie?"absolute":"relative",inset:Ie?0:void 0,width:"100%",...Ie&&Se?{width:Se,maxWidth:"100%"}:void 0},children:[nt&&Ie?r.jsx("div",{className:`${Pe} ${e}-titles-fade-out`,children:Nn(nt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Ie?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Nn(B)})]}),sn()]}),Yn()]}),Jt=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:P.scalingValue(_??0,i),height:P.scalingValue(_??0,i),marginRight:oe,"--close-icon-hover-color":ne},children:[r.jsx("button",{ref:Ft,type:"button",className:`${e}-close-icon-inner`,onClick:Oe,"aria-label":"Close",children:r.jsx(nn,{url:k??"",fill:V,hoverFill:i&&!s?V:ne,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:oe,height:"100%",pointerEvents:"auto"}})]}),Ui=(A,pe)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[jt||Vt?qt():null,tt?mn():null,pe!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:pe},children:A}):r.jsxs(r.Fragment,{children:[A,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),Yn()]}),Zt=A=>{if(!A)return null;const pe=po(e,A,W,ue,h);return r.jsx(r.Fragment,{children:pe.map(d=>$n(d,"single-row",pn(pe,d,"single-row")))})},gn=A=>{if(!A)return null;const pe=po(e,A,W,ue,h),d=pe.find(f=>f.prefix==="title1");return d?$n(d,"two-row-top",pn(pe,d,"two-row-top")):null},Tn=(A,pe=!1)=>{const d=A?po(e,A,W,ue,h):[],f=d.filter(re=>re.prefix==="title2"||re.prefix==="title3"),x=o&&pe;return f.length>0||x||(C??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[f.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[f.map(re=>$n(re,"two-row-bottom",pn(d,re,"two-row-bottom"))),pe&&o?r.jsxs(r.Fragment,{children:[Uo(),Xo()]}):null]}):null,(C??0)>0||x?r.jsx("div",{"data-controls":x?"titleRowMarginBottom":void 0,"data-controls-axis":x?"y":void 0,"data-controls-reverse":x?"":void 0,className:x?`${e}-control`:void 0,style:{height:bt,width:"100%",flexShrink:0,pointerEvents:x?"auto":"none"}}):null]}):null},Fn=(A,pe=!1)=>r.jsxs(r.Fragment,{children:[Ui(gn(A)),Tn(A,pe)]}),Nn=A=>be?r.jsx("div",{className:`${e}-titles-row-two-row`,children:Fn(A)}):A?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Zt(A)}):null,Xi=()=>De.flatMap((A,pe)=>{if(!A.marginLeftKey)return[];const d=it[A.marginLeftKey]??0,f=$g(De,pt,it,pe)+dt(),x=Math.max(d,gr);return r.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(pt[pe]),style:{position:"absolute",top:0,left:H(f),width:H(x),height:"100%",pointerEvents:"auto"}},A.marginLeftKey)}),Yi=()=>De.map((A,pe)=>{const d=Vn(pe,pt),x=Dt(pe)-ti/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(d),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:H(x),width:H(ti),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),Uo=()=>Be.flatMap((A,pe)=>{if(!A.marginLeftKey)return[];const d=it[A.marginLeftKey]??0,f=Ot(pe),x=Math.max(d,gr),{resolvedWidth:q}=wt(A,"two-row-bottom");return r.jsx("div",{"data-controls":A.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(q),style:{position:"absolute",top:0,left:H(f),width:H(x),height:"100%",pointerEvents:"auto"}},A.marginLeftKey)}),Xo=()=>Be.map((A,pe)=>{const{maxWidth:d}=wt(A,"two-row-bottom"),x=Wt(pe)-ti/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":A.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(d),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:H(x),width:H(ti),height:"100%",pointerEvents:"auto"}})},`${A.widthKey}-junction`)}),sn=()=>!o||be?null:r.jsxs(r.Fragment,{children:[Xi(),Yi()]}),Jn=A=>{const pe=!A.objectFit&&xn(b);return{className:`${e}-slide-image-cell${pe?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:Y,maxHeight:O,...pe?{"--image-aspect-ratio":Do(b)}:{}}}},Ji=A=>A.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":A.objectFit}}:xn(b)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},Hn=A=>{if(A.length===0)return null;const pe=A.length>1,d=mr(Q),f=`calc(-0.5 * (${d} + ${Q}))`;if(A.length===1){const x=A[0];return r.jsx("div",{...Jn(x),children:r.jsx("img",{...Ji(x),src:x.url,alt:x.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:pe?{gap:Q}:void 0,children:A.map((x,q)=>r.jsxs("div",{...Jn(x),children:[r.jsx("img",{...Ji(x),src:x.url,alt:x.name??"",draggable:!1}),o&&pe&&q<A.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:f,width:d,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${x.url}-${q}`))})},Zi=!!(B!=null&&B.title2||B!=null&&B.title3||nt!=null&&nt.title2||nt!=null&&nt.title3||(C??0)>0||o),Yo=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:mt,className:xe,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Fn(fe||B)}),r.jsxs("div",{ref:Et,className:`${e}-titles-row-two-row`,style:{...Ie&&ie?{minHeight:ie}:void 0,...Ie&&Se?{width:Se,maxWidth:"100%"}:void 0},children:[Ui(r.jsxs("div",{className:xe,style:{position:Ie?"absolute":"relative",inset:Ie?0:void 0,width:"100%"},children:[nt&&Ie?r.jsx("div",{className:`${Ne} ${e}-titles-fade-out`,children:gn(nt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Ie?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:gn(B)})]}),Ie&&ie?ie:void 0),Zi?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[nt&&Ie?r.jsx("div",{className:`${Pe} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:Tn(nt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Ie?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${be?` ${e}-titles-layer-in-stacked`:""}`,children:Tn(B,!0)})]}):null]})]}),Jo=()=>{const A=Zi;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...A?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:A?void 0:{flex:"0 0 auto",height:"auto"},children:Fn(B,!0)}),sn()]})};return r.jsxs("div",{ref:ft,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{At||Oe()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:ze?void 0:-1,style:{opacity:se?1:0,transition:"opacity 300ms ease",pointerEvents:se?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:I,...Je}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:yt,...We,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Mt,onClick:A=>A.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":ye&&Z.length>1?"true":"false",onPointerDown:ye?un:void 0,onPointerUp:ye?rn:void 0,onPointerCancel:ye?Wn:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[an&&E?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:A=>{A.target===A.currentTarget&&Qe(G)},children:r.jsx("div",{className:`${e}-slide-area`,children:Hn(an.images)})},`slide-out-${G}`):null,r.jsx("div",{className:`${e}-slide-layer-in${E?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:X?Hn(X.images):null})},`slide-in-${G}-${ge}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Ht,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ce,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...be?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${be?` ${e}-lightbox-content-area-stacked`:""}`,children:vt&&r.jsx("div",{className:`${e}-text-bar-cell${be?` ${e}-text-bar-cell-stacked`:""}`,style:be?void 0:{flex:1,minWidth:0,width:"100%"},children:be?w==="fade"?Yo():Jo():w==="fade"?Go():xi()})})})]})]})]})};function Ag(e){return`
|
|
11087
|
+
`,sg="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>'),zn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",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 lg(e){const t={};return t[dt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[dt(e,"fontSettings")]={...zn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[dt(e,"fontSize")]={...zn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[dt(e,"lineHeight")]={...zn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[dt(e,"letterSpacing")]={...zn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[dt(e,"wordSpacing")]={...zn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[dt(e,"textAlign")]={...zn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[dt(e,"textAppearance")]={...zn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const cg=Ki.reduce((e,t)=>({...e,...lg(t)}),{}),dg=Ki.reduce((e,t)=>({...e,[dt(t,"fontFamily")]:"Goudy Bookletter 1911",[dt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[dt(t,"letterSpacing")]:0,[dt(t,"wordSpacing")]:0,[dt(t,"textAlign")]:"left",[dt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function es(e){return Ki.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[dt(n,"fontSize")]=i),o!==void 0&&(t[dt(n,"lineHeight")]=o),t},{})}const ug=eg(),pg={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:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up"]}},thumbnailActiveColor:{type:"string",scope:"common",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},...cg,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/lightbox_strip_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:sg,closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",...dg},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,backgroundColor:"#FFFFFF",contentMarginTop:.08,iconMarginLeft:.02,...es({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,backgroundColor:"#FFFFFF",contentMarginTop:.015,iconMarginLeft:.02,...es({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:[ug]}],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/lightbox_strip_2.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_3.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_4.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_5.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_6.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_7.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"}]}},mg={element:rg,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:pg,sourceCode:ag,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Ki.map(e=>({path:`styles.${dt(e,"fontSettings")}`}))}},gg=50,ts=10,na="cntrl-lightbox-journal",qo=na,Lr=`${na}-`,Ko=e=>`${na}-${e}`,ia=e=>e===qo||e.startsWith(Lr),ns=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},is=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=ns(t.get(Ko(e)));if(i)return i}const n=ns(t.get(qo));if(n)return n;for(const[i]of t){if(!i.startsWith(Lr))continue;const o=i.slice(Lr.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},os=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},tl=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(a=>{ia(a)&&i.searchParams.delete(a)}),t?i.searchParams.set(Ko(t),String(e)):i.searchParams.set(qo,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},hg=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Ko(e)||i===qo:ia(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)}},nl=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Ko(e)):[...t.keys()].some(n=>ia(n))},fg=(e,t)=>{if(nl(t)){if(e){window.history.back();return}hg(t)}},yg=20,vg=2,mr=e=>`max(${e}, ${yg}px)`,hi=e=>((e==null?void 0:e.image)??[]).slice(0,vg),il=e=>e.reduce((t,n)=>t+hi(n).length,0),bg=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+hi(s).length,1),i=hi(e[t]).length;return{start:n,end:n+i-1}},xg=(e,t)=>{const n=il(e),{start:i,end:o}=bg(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},So=(e,t)=>t==="B"?e.flatMap((n,i)=>hi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:hi(n)})),wg=(e,t,n,i)=>{var s;if(n==="B")return`${t+1} / ${e.length}`;const o=((s=e[t])==null?void 0:s.entryIndex)??0;return xg(i,o)},rs=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",$g=(e,t,n)=>e==="B"?t.length>1:il(n)>1,ti=.004,gr=.004,hr={title1Width:.13,title2Width:.13,title3Width:.14},po=(e,t,n,i,o)=>{const s=[];return t.title1&&s.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&s.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&s.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),s},Ao=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},u)=>{if(s<=0||u<=0)return{overflow:s,widths:[u,...a]};const c=Math.min(s,u);return{overflow:s-c,widths:[u-c,...a]}},{overflow:i-1,widths:[]});return o},Er=(e,t)=>Ao(e,t),Vn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},mo=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ao(e.length,n),effective:Er(e.length,n)}},Sg=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),Cg=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),Gi=["title1","title2","title3","count"],ut=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Tg={title1:"1",title2:"2",title3:"3",count:"Count"},Lg=e=>[ut(e,"fontFamily"),ut(e,"fontSettings"),{type:"row",items:[ut(e,"fontSize"),ut(e,"lineHeight"),ut(e,"letterSpacing"),ut(e,"wordSpacing")]},ut(e,"textAlign"),ut(e,"textAppearance")],Eg=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Gi.map(e=>[Tg[e],Lg(e)]))}),Pg={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Ig={title1:.02,title2:.02,title3:.02,count:.017},go=(e,t)=>{const n=i=>{const o=ut(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[Pg[t]]}},ho=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??Ig[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return kt(i,n)},Ag=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:a=0,enableUrlSync:u=!1,journalItemId:c=null,onBeforeClose:m,onClose:p})=>{const{type:E,coverFit:b,backgroundColor:C,imageGap:g,maxWidth:v,maxHeight:T,textTransition:w,title1Width:$,title2Width:S,title3Width:_,title1MarginLeft:k=0,title2MarginLeft:W=0,title3MarginLeft:P=0,titleRowMarginBottom:I=0,titleHeaderLayout:Y="single-row",countCloseGap:y=0,closeIcon:M,closeIconMaxWidth:N,closeIconColor:V,closeIconHoverColor:te,contentMarginTop:ue=0,iconMarginRight:K=0}=n,H=l.useCallback(R=>L.scalingValue(R,i??!1),[i]),Z=H(g??0),G=`${v}%`,B=`${T}%`,J=H(y),ie=H(ue),oe=H(K),O=ho("title1",go(n,"title1"),i),ce=ho("title2",go(n,"title2"),i),h=ho("title3",go(n,"title3"),i),pe=ho("count",go(n,"count"),i),ve=Y==="mobile",ye=!i||!!s,Re=!o&&(!i||!!s),ee=l.useMemo(()=>So(t,E),[t,E]),[ge,X]=l.useState(a),U=ee[ge],j=U==null?void 0:U.entry,[he,ne]=l.useState(!1),[Ce,we]=l.useState(null),[be,Ie]=l.useState(!1),[F,Q]=l.useState(null),[A,D]=l.useState(!1),[z,re]=l.useState(0),[de,Te]=l.useState(),[We,Pe]=l.useState(),[$e,tt]=l.useState(null),ae=l.useRef(null),ke=l.useRef(0),je=l.useRef(0),ze=l.useRef(0),lt=l.useRef(!1),ht=l.useRef(null),Pt=l.useRef(null),xt=l.useRef(null),wt=l.useRef(null),Ht=l.useRef(null),Lt=l.useRef(null),Ge=l.useRef(null),Ae=l.useCallback(()=>{const R=Pt.current;if(!R)return;const me=R.closest(`.${e}-lightbox-content-area`);if(!me)return R.getBoundingClientRect().width;const d=Array.from(me.children).reduce((f,x)=>!(x instanceof HTMLElement)||x.contains(R)?f:f+x.getBoundingClientRect().width,0);return me.getBoundingClientRect().width-d},[e]),Be=l.useCallback(()=>{ae.current&&(clearTimeout(ae.current),ae.current=null)},[]),Ye=l.useCallback(R=>{R===ke.current&&(Q(null),D(!1))},[]),He=l.useCallback(()=>{o||lt.current||(lt.current=!0,m==null||m(),ne(!1),ht.current=setTimeout(()=>{p()},300))},[o,m,p]),ct=l.useCallback(R=>!!(R.closest("[data-controls]")||R.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:It,backdropStyle:Je,mediaAreaStyle:Mt,overlayContentStyle:Ot,swipeHandlers:Oe,dismissAreaStyle:mt}=Zs({enabled:Re,onClose:He,animMs:300,isBlockedTarget:ct}),it=l.useCallback(R=>{u&&tl(R+1,c,!0)},[u,c]),Ue=l.useCallback(R=>{if(R)return R.getBoundingClientRect().height},[]),rt=l.useCallback(R=>{if(ee.length===0)return;const me=(R%ee.length+ee.length)%ee.length;if(me===ge)return;const d=ee[ge],f=ee[me];ke.current+=1;const x=ke.current,q=w==="fade"&&rs(d==null?void 0:d.entry)!==rs(f==null?void 0:f.entry),se=Ue(xt.current),xe=q?(()=>{const Ke=Ae();Ni.flushSync(()=>{tt(f.entry)}),xt.current&&Ke&&(xt.current.style.width=`${Ke}px`);const Rt=Ue(xt.current);return xt.current&&(xt.current.style.width=""),{measuredIncomingTitlesHeight:Rt,incomingTitlesMeasureWidth:Ke}})():void 0,_e=Math.max(se??0,(xe==null?void 0:xe.measuredIncomingTitlesHeight)??0)||void 0;re(x),Q(ge),D(!0),X(me),it(me),ze.current=me,q?(Be(),_e&&Te(_e),xe!=null&&xe.incomingTitlesMeasureWidth&&Pe(xe.incomingTitlesMeasureWidth),we((d==null?void 0:d.entryIndex)??null),Ie(!0),je.current=f.entryIndex,ae.current=setTimeout(()=>{we(null),Ie(!1),Te(void 0),Pe(void 0),tt(null),ae.current=null},400)):(Be(),we(null),Ie(!1),Te(void 0),Pe(void 0),tt(null),je.current=f.entryIndex)},[ge,Be,Ae,Ue,ee,it,w]),at=l.useCallback(()=>{Ge.current=null},[]),sn=l.useCallback(R=>{!ye||ee.length<=1||R.pointerType==="mouse"&&R.button!==0||R.target.closest("[data-controls]")||(Ge.current={startX:R.clientX,startY:R.clientY,pointerId:R.pointerId})},[ye,ee.length]),wn=l.useCallback(R=>{var Ke;if(!ye||ee.length<=1||R.pointerType==="mouse"&&R.button!==0)return;if(It){at();return}const me=Ge.current;if(!me||me.pointerId!==R.pointerId||(at(),R.target.closest("[data-controls]")))return;const f=R.clientX-me.startX,x=R.clientY-me.startY,q=Math.abs(f),se=Math.abs(x);if(q>=gg&&q>se){rt(f>0?ge-1:ge+1);return}if(q>ts||se>ts)return;const xe=(Ke=wt.current)==null?void 0:Ke.getBoundingClientRect(),_e=xe?xe.left+xe.width/2:window.innerWidth/2;rt(R.clientX<_e?ge-1:ge+1)},[ge,ye,rt,It,at,ee.length]),ln=l.useCallback(R=>{const me=Ge.current;(me==null?void 0:me.pointerId)===R.pointerId&&at()},[at]);Qs(),l.useEffect(()=>{Lt.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const R=requestAnimationFrame(()=>{ne(!0),requestAnimationFrame(()=>{Ht.current?Ht.current.focus():wt.current&&wt.current.focus()})});return()=>{cancelAnimationFrame(R),ht.current&&clearTimeout(ht.current),ae.current&&clearTimeout(ae.current);const me=Lt.current;me&&document.contains(me)&&me.focus()}},[]),l.useEffect(()=>{var R;w!=="fade"&&(je.current=((R=ee[ge])==null?void 0:R.entryIndex)??0,Be(),we(null),Ie(!1),Te(void 0),Pe(void 0))},[ge,Be,ee,w]),l.useEffect(()=>{const R=me=>{if(me.key==="Escape"){He();return}if(me.key==="ArrowLeft"&&ee.length>1){rt(ge-1);return}if(me.key==="ArrowRight"&&ee.length>1){rt(ge+1);return}if(me.key==="Tab"&&wt.current){const d=wt.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),f=Array.from(d).filter(xe=>!xe.closest('[aria-hidden="true"]'));if(f.length===0)return;const x=f[0],q=f[f.length-1],se=document.activeElement;me.shiftKey?(se===x||!wt.current.contains(se))&&(me.preventDefault(),q.focus()):(se===q||!wt.current.contains(se))&&(me.preventDefault(),x.focus())}};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[rt,He,ge,ee.length]),l.useLayoutEffect(()=>{Be(),ke.current=0,re(0),Q(null),D(!1),we(null),Ie(!1),Te(void 0),Pe(void 0),tt(null),X(R=>{const me=Math.max(0,ee.length-1);return Math.min(R,me)})},[Be,t.length,E,ee.length]),l.useLayoutEffect(()=>{var d;const R=Math.max(0,ee.length-1),me=Math.min(Math.max(0,a),R);ze.current=me,je.current=((d=ee[me])==null?void 0:d.entryIndex)??0,X(me)},[a]);const ot=Ce!==null?t[Ce]:null,tn=F!==null?ee[F]:null,Ut=(j==null?void 0:j.title1)||(j==null?void 0:j.title2)||(j==null?void 0:j.title3)||(ot==null?void 0:ot.title1)||(ot==null?void 0:ot.title2)||(ot==null?void 0:ot.title3),Ve=$g(E,ee,t),ft=M!==null,yt=Ut||Ve||ft,le=Ve&&ft?{gap:J}:void 0,Se=`${e}-titles-stack${ve?` ${e}-titles-stack-stacked`:""}`,Me=`${e}-titles-layer-out${ve?` ${e}-titles-layer-out-stacked`:""}`,Fe=`${e}-titles-layer-out`,et=(k??0)>0||o,$t=H(I),Le=l.useMemo(()=>({title1Width:$??hr.title1Width,title2Width:S??hr.title2Width,title3Width:_??hr.title3Width}),[$,S,_]),Ze=l.useMemo(()=>({title2MarginLeft:W,title3MarginLeft:P}),[W,P]),De=l.useMemo(()=>j?po(e,j,O,ce,h):[],[e,j,O,ce,h]),st=l.useMemo(()=>De.map(R=>Le[R.widthKey]),[De,Le]),vt=l.useMemo(()=>Ao(De.length,st),[De.length,st]),At=l.useMemo(()=>Er(De.length,st),[De.length,st]),qe=l.useMemo(()=>De.filter(R=>R.prefix==="title1"),[De]),nt=l.useMemo(()=>De.filter(R=>R.prefix==="title2"||R.prefix==="title3"),[De]),Et=l.useMemo(()=>mo(qe,Le),[qe,Le]),St=l.useMemo(()=>mo(nt,Le),[nt,Le]),_t=l.useCallback((R,me)=>{const d=De.findIndex(x=>x.prefix===R.prefix);if(!ve||me==="single-row")return{effectiveWidth:At[d]??0,resolvedWidth:vt[d]??0,maxWidth:Vn(d,vt)};if(me==="two-row-top"){const x=qe.findIndex(q=>q.prefix===R.prefix);return{effectiveWidth:Et.effective[x]??0,resolvedWidth:Et.resolved[x]??0,maxWidth:Vn(x,Et.resolved)}}const f=nt.findIndex(x=>x.prefix===R.prefix);return{effectiveWidth:St.effective[f]??0,resolvedWidth:St.resolved[f]??0,maxWidth:Vn(f,St.resolved)}},[De,nt,St,At,vt,qe,Et,ve]),$n=l.useCallback(R=>Cg(De,vt,Ze,R)+(ve?0:k??0),[De,vt,Ze,ve,k]),gt=l.useCallback(()=>ve?0:k??0,[ve,k]),Bt=l.useCallback(R=>nt.slice(0,R).reduce((me,d,f)=>me+(d.marginLeftKey?Ze[d.marginLeftKey]??0:0)+(St.resolved[f]??0),0),[nt,St.resolved,Ze]),Ft=l.useCallback(R=>{const me=nt[R];return Bt(R)+(me.marginLeftKey?Ze[me.marginLeftKey]??0:0)+(St.resolved[R]??0)},[nt,St.resolved,Bt,Ze]),cn=l.useCallback((R,me,d)=>{if(!ve||d==="single-row"){const xe=R.findIndex(Ct=>Ct.prefix===me.prefix),_e=R.map(Ct=>Le[Ct.widthKey]),Ke=Ao(R.length,_e);return{effectiveWidth:Er(R.length,_e)[xe]??0,resolvedWidth:Ke[xe]??0,maxWidth:Vn(xe,Ke)}}if(d==="two-row-top"){const xe=R.filter(Ct=>Ct.prefix==="title1"),_e=xe.findIndex(Ct=>Ct.prefix===me.prefix),{resolved:Ke,effective:Rt}=mo(xe,Le);return{effectiveWidth:Rt[_e]??0,resolvedWidth:Ke[_e]??0,maxWidth:Vn(_e,Ke)}}const f=R.filter(xe=>xe.prefix==="title2"||xe.prefix==="title3"),x=f.findIndex(xe=>xe.prefix===me.prefix),{resolved:q,effective:se}=mo(f,Le);return{effectiveWidth:se[x]??0,resolvedWidth:q[x]??0,maxWidth:Vn(x,q)}},[Le,ve]),Sn=(R,me,d)=>{const f=R.marginLeftKey?Ze[R.marginLeftKey]??0:0,{effectiveWidth:x,resolvedWidth:q,maxWidth:se}=d??_t(R,me),xe=Math.max(f,gr),_e=o&&me==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":R.prefix,style:{width:H(x),...f>0?{marginLeft:H(f)}:{}},children:[r.jsx("p",{className:R.className,style:R.style,children:R.text}),_e&&R.marginLeftKey?r.jsx("div",{"data-controls":R.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(q),style:{position:"absolute",top:0,left:H(-f),width:H(xe),height:"100%",pointerEvents:"auto"}}):null,_e?r.jsx("div",{"data-controls":R.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,right:H(-ti/2),width:H(ti),height:"100%",pointerEvents:"auto"}}):null]},R.className)},dn=()=>r.jsx("div",{...o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:H(k??0),flexShrink:0,alignSelf:"stretch",...o?{pointerEvents:"auto"}:{}}}),zt=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:O,"aria-hidden":"true",children:" "}),Cn=()=>r.jsx("span",{className:`${e}-entry-counter`,style:pe,"aria-live":"polite","aria-atomic":"true",children:wg(ee,ge,E,t)}),Xn=()=>Ve?o&&ft?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Cn(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${mr(J)} + ${J}))`,width:mr(J),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Cn():null,Yn=()=>!Ve&&!ft?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:le,children:[Xn(),ft?Xt():null]}),xi=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Ve||Ut?zt():null,et?dn():null,Yt(j),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),Yn(),nn()]}),Go=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%"},children:[Ve||Ut?zt():null,et?dn():null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:be&&de?{minHeight:de}:void 0,children:[r.jsx("div",{ref:xt,className:Se,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Fn($e||j)}),r.jsxs("div",{ref:Pt,className:Se,style:{position:be?"absolute":"relative",inset:be?0:void 0,width:"100%",...be&&We?{width:We,maxWidth:"100%"}:void 0},children:[ot&&be?r.jsx("div",{className:`${Me} ${e}-titles-fade-out`,children:Fn(ot)}):null,r.jsx("div",{className:`${e}-titles-layer-in${be?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Fn(j)})]}),nn()]}),Yn()]}),Xt=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:L.scalingValue(N??0,i),height:L.scalingValue(N??0,i),marginRight:oe,"--close-icon-hover-color":te},children:[r.jsx("button",{ref:Ht,type:"button",className:`${e}-close-icon-inner`,onClick:He,"aria-label":"Close",children:r.jsx(Qt,{url:M??"",fill:V,hoverFill:i&&!s?V:te,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:oe,height:"100%",pointerEvents:"auto"}})]}),Ui=(R,me)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[Ve||Ut?zt():null,et?dn():null,me!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:me},children:R}):r.jsxs(r.Fragment,{children:[R,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),Yn()]}),Yt=R=>{if(!R)return null;const me=po(e,R,O,ce,h);return r.jsx(r.Fragment,{children:me.map(d=>Sn(d,"single-row",cn(me,d,"single-row")))})},un=R=>{if(!R)return null;const me=po(e,R,O,ce,h),d=me.find(f=>f.prefix==="title1");return d?Sn(d,"two-row-top",cn(me,d,"two-row-top")):null},Tn=(R,me=!1)=>{const d=R?po(e,R,O,ce,h):[],f=d.filter(se=>se.prefix==="title2"||se.prefix==="title3"),x=o&&me;return f.length>0||x||(I??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[f.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[f.map(se=>Sn(se,"two-row-bottom",cn(d,se,"two-row-bottom"))),me&&o?r.jsxs(r.Fragment,{children:[Uo(),Xo()]}):null]}):null,(I??0)>0||x?r.jsx("div",{"data-controls":x?"titleRowMarginBottom":void 0,"data-controls-axis":x?"y":void 0,"data-controls-reverse":x?"":void 0,className:x?`${e}-control`:void 0,style:{height:$t,width:"100%",flexShrink:0,pointerEvents:x?"auto":"none"}}):null]}):null},Wn=(R,me=!1)=>r.jsxs(r.Fragment,{children:[Ui(un(R)),Tn(R,me)]}),Fn=R=>ve?r.jsx("div",{className:`${e}-titles-row-two-row`,children:Wn(R)}):R?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Yt(R)}):null,Xi=()=>De.flatMap((R,me)=>{if(!R.marginLeftKey)return[];const d=Ze[R.marginLeftKey]??0,f=Sg(De,vt,Ze,me)+gt(),x=Math.max(d,gr);return r.jsx("div",{"data-controls":R.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(vt[me]),style:{position:"absolute",top:0,left:H(f),width:H(x),height:"100%",pointerEvents:"auto"}},R.marginLeftKey)}),Yi=()=>De.map((R,me)=>{const d=Vn(me,vt),x=$n(me)-ti/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":R.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(d),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:H(x),width:H(ti),height:"100%",pointerEvents:"auto"}})},`${R.widthKey}-junction`)}),Uo=()=>nt.flatMap((R,me)=>{if(!R.marginLeftKey)return[];const d=Ze[R.marginLeftKey]??0,f=Bt(me),x=Math.max(d,gr),{resolvedWidth:q}=_t(R,"two-row-bottom");return r.jsx("div",{"data-controls":R.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(q),style:{position:"absolute",top:0,left:H(f),width:H(x),height:"100%",pointerEvents:"auto"}},R.marginLeftKey)}),Xo=()=>nt.map((R,me)=>{const{maxWidth:d}=_t(R,"two-row-bottom"),x=Ft(me)-ti/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":R.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(d),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:H(x),width:H(ti),height:"100%",pointerEvents:"auto"}})},`${R.widthKey}-junction`)}),nn=()=>!o||ve?null:r.jsxs(r.Fragment,{children:[Xi(),Yi()]}),Jn=R=>{const me=!R.objectFit&&vn(b);return{className:`${e}-slide-image-cell${me?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:G,maxHeight:B,...me?{"--image-aspect-ratio":Do(b)}:{}}}},Ji=R=>R.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":R.objectFit}}:vn(b)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},Nn=R=>{if(R.length===0)return null;const me=R.length>1,d=mr(Z),f=`calc(-0.5 * (${d} + ${Z}))`;if(R.length===1){const x=R[0];return r.jsx("div",{...Jn(x),children:r.jsx("img",{...Ji(x),src:x.url,alt:x.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:me?{gap:Z}:void 0,children:R.map((x,q)=>r.jsxs("div",{...Jn(x),children:[r.jsx("img",{...Ji(x),src:x.url,alt:x.name??"",draggable:!1}),o&&me&&q<R.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:f,width:d,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${x.url}-${q}`))})},Zi=!!(j!=null&&j.title2||j!=null&&j.title3||ot!=null&&ot.title2||ot!=null&&ot.title3||(I??0)>0||o),Yo=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:xt,className:Se,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Wn($e||j)}),r.jsxs("div",{ref:Pt,className:`${e}-titles-row-two-row`,style:{...be&&de?{minHeight:de}:void 0,...be&&We?{width:We,maxWidth:"100%"}:void 0},children:[Ui(r.jsxs("div",{className:Se,style:{position:be?"absolute":"relative",inset:be?0:void 0,width:"100%"},children:[ot&&be?r.jsx("div",{className:`${Fe} ${e}-titles-fade-out`,children:un(ot)}):null,r.jsx("div",{className:`${e}-titles-layer-in${be?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:un(j)})]}),be&&de?de:void 0),Zi?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[ot&&be?r.jsx("div",{className:`${Me} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:Tn(ot)}):null,r.jsx("div",{className:`${e}-titles-layer-in${be?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${ve?` ${e}-titles-layer-in-stacked`:""}`,children:Tn(j,!0)})]}):null]})]}),Jo=()=>{const R=Zi;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...R?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:R?void 0:{flex:"0 0 auto",height:"auto"},children:Wn(j,!0)}),nn()]})};return r.jsxs("div",{ref:wt,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{It||He()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:ft?void 0:-1,style:{opacity:he?1:0,transition:"opacity 300ms ease",pointerEvents:he?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:C,...Je}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:mt,...Oe,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Mt,onClick:R=>R.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":ye&&ee.length>1?"true":"false",onPointerDown:ye?sn:void 0,onPointerUp:ye?wn:void 0,onPointerCancel:ye?ln:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[tn&&A?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:R=>{R.target===R.currentTarget&&Ye(z)},children:r.jsx("div",{className:`${e}-slide-area`,children:Nn(tn.images)})},`slide-out-${z}`):null,r.jsx("div",{className:`${e}-slide-layer-in${A?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:U?Nn(U.images):null})},`slide-in-${z}-${ge}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Ot,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ie,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...ve?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${ve?` ${e}-lightbox-content-area-stacked`:""}`,children:yt&&r.jsx("div",{className:`${e}-text-bar-cell${ve?` ${e}-text-bar-cell-stacked`:""}`,style:ve?void 0:{flex:1,minWidth:0,width:"100%"},children:ve?w==="fade"?Yo():Jo():w==="fade"?Go():xi()})})})]})]})]})};function Rg(e){return`
|
|
10787
11088
|
.${e}-wrapper {
|
|
10788
11089
|
position: relative;
|
|
10789
11090
|
width: 100%;
|
|
@@ -11317,7 +11618,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
|
|
|
11317
11618
|
pointer-events: auto;
|
|
11318
11619
|
z-index: 10;
|
|
11319
11620
|
}
|
|
11320
|
-
`}const
|
|
11621
|
+
`}const kg=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s,metadata:a})=>{const{prefix:u}=L.useScopedStyles(),c=(a==null?void 0:a.itemId)??null,{cover:m,coverFit:p,type:E}=e,b=l.useRef(null),[C,g]=l.useState(!1),[v,T]=l.useState(0),w=l.useRef(!1),$=l.useRef(!1),S=l.useRef(!1),_=l.useMemo(()=>(t??[]).filter(y=>hi(y).length>0),[t]),k=C&&_.length>0,W=!n,P=l.useCallback(()=>{W&&(S.current=!0,fg($.current,c),$.current=!1)},[W,c]),I=(y=0)=>{if(_.length===0||n&&!i&&!o)return;const M=So(_,E),N=Math.max(0,Math.min(y,M.length-1));if(T(N),W){const V=nl();tl(N+1,c,V),$.current=!V}g(!0)},Y=l.useCallback(()=>{g(!1),S.current=!1},[]);return l.useEffect(()=>{!n||i||o||g(!1)},[n,i,o]),l.useEffect(()=>{if(!W||w.current)return;w.current=!0;const y=is(c);if(!y)return;const M=os(y,So(_,E).length);M<0||(T(M),g(!0))},[_,c,W,E]),l.useEffect(()=>{if(!W)return;const y=()=>{if(S.current){S.current=!1,g(!1);return}const M=is(c);if(!M){g(!1);return}const N=os(M,So(_,E).length);if(N<0){g(!1);return}$.current=!1,T(N),g(!0)};return window.addEventListener("popstate",y),()=>window.removeEventListener("popstate",y)},[_,c,W,E]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:b,className:`${u}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Rg(u)}}),m?r.jsx("button",{type:"button",className:`${u}-cover ${vn(p)?`${u}-ratio-wrapper-cover`:`${u}-ratio-wrapper-fit`}`,onClick:()=>I(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...vn(p)?{"--image-aspect-ratio":Do(p)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${u}-cover-image ${vn(p)?`${u}-cover-image-cover`:`${u}-cover-image-fit`}`,src:m,alt:"cover"})}):null]}),k&&typeof document<"u"&&(()=>{const y=(s?document.getElementById(s):null)??document.body;return Ni.createPortal(r.jsx(Ag,{prefix:u,entries:_,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:v,enableUrlSync:W,journalItemId:c,onBeforeClose:P,onClose:Y}),y)})()]})},Mg=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
|
|
11321
11622
|
import { createPortal } from 'react-dom';
|
|
11322
11623
|
import { CommonComponentProps } from '../props';
|
|
11323
11624
|
import { useScopedStyles } from '../utils/useScopedStyles';
|
|
@@ -12085,4 +12386,4 @@ export type LightboxJournalSettings = {
|
|
|
12085
12386
|
closeIconColor: string;
|
|
12086
12387
|
closeIconHoverColor: string;
|
|
12087
12388
|
};
|
|
12088
|
-
`,_g="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>'),Dn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Wg(e){const t={};return t[
|
|
12389
|
+
`,_g="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>'),Dn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Wg(e){const t={};return t[ut(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ut(e,"fontSettings")]={...Dn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ut(e,"fontSize")]={...Dn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ut(e,"lineHeight")]={...Dn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ut(e,"letterSpacing")]={...Dn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ut(e,"wordSpacing")]={...Dn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ut(e,"textAlign")]={...Dn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ut(e,"textAppearance")]={...Dn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Fg=Gi.reduce((e,t)=>({...e,...Wg(t)}),{}),Ng=Gi.reduce((e,t)=>({...e,[ut(t,"fontFamily")]:"Goudy Bookletter 1911",[ut(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ut(t,"letterSpacing")]:0,[ut(t,"wordSpacing")]:0,[ut(t,"textAlign")]:"left",[ut(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function as(e){return Gi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ut(n,"fontSize")]=i),o!==void 0&&(t[ut(n,"lineHeight")]=o),t},{})}const Hg=Eg(),Og={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"}},...Fg,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/journal_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:_g,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...Ng,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.05,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.005,...as({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.0125,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...as({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:[Hg]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"Dorothy Manners & Julanne Johnston",title2:"by Evans Studio",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/journal_3.jpg",name:"",objectFit:"contain"}]},{title1:"Inez Nadeau",title2:"Melbourne Spurr",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_4.jpg",name:"",objectFit:"contain"}]},{title1:"Colleen Moore",title2:"Clarence S. Bull",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_5.jpg",name:"",objectFit:"contain"}]},{title1:"Gloria Swanson",title2:"Donald Biddle Keyes",title3:"Screenland",image:[{url:"https://cdn.cntrl.site/component-assets/journal_6.jpg",name:"",objectFit:"contain"}]}]}},Bg={element:kg,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:Og,sourceCode:Mg,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Gi.map(e=>({path:`styles.${ut(e,"fontSettings")}`}))}},jg=[hd,$d,du,bu,Iu,ju,Ku,Qu,xp,$m,Rm,mg,Bg];exports.components=jg;exports.isSchemaV1=al;
|