@cntrl-site/components 1.0.98-alpha.1 → 1.0.98-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Components/Pretext/hyphenation.d.ts +21 -0
- package/dist/Components/Pretext/textLayout.d.ts +1 -0
- package/dist/export-contract-Ca9b5SgN.js +1 -0
- package/dist/export-contract-DQ4zqboX.mjs +282 -0
- package/dist/index-1HMblVmZ.js +1 -0
- package/dist/index-2JTNRDR1.js +1 -0
- package/dist/index-6Pkh3skU.mjs +45858 -0
- package/dist/index-7g44aFH6.mjs +2406 -0
- package/dist/index-B-0_dAcP.mjs +3966 -0
- package/dist/index-B0n2O6vm.mjs +2740 -0
- package/dist/index-B1vNL0m-.js +1 -0
- package/dist/index-B6E31HBG.js +1 -0
- package/dist/index-BA25un1c.mjs +457 -0
- package/dist/index-BK-G0i5L.js +1 -0
- package/dist/index-B_Fyqx22.mjs +28247 -0
- package/dist/index-BkmSPu6z.js +1 -0
- package/dist/index-BlAuAthm.js +1 -0
- package/dist/index-Bq8huKYW.mjs +2685 -0
- package/dist/index-BrL2zv3x.js +1 -0
- package/dist/index-By2pnaap.mjs +4107 -0
- package/dist/index-C-Y61Lcr.mjs +7087 -0
- package/dist/index-C0IKjloI.mjs +114 -0
- package/dist/index-C0cxTf5o.js +1 -0
- package/dist/index-C2kp589t.mjs +483 -0
- package/dist/index-C7aqOvnk.mjs +6479 -0
- package/dist/index-CADju5Cy.js +1 -0
- package/dist/index-CBQfJnR5.mjs +1469 -0
- package/dist/index-CDO1-R3j.js +1 -0
- package/dist/index-CG_43X7q.js +1 -0
- package/dist/index-CIgabTwE.js +1 -0
- package/dist/index-CJ0NMfJ3.js +1 -0
- package/dist/index-CNFsG2yO.js +1 -0
- package/dist/index-CNGjgoL-.mjs +648 -0
- package/dist/index-CbVelYDh.mjs +212 -0
- package/dist/index-CcAPGjN3.mjs +6188 -0
- package/dist/index-D5u4q2ir.mjs +5660 -0
- package/dist/index-D6ylLL_6.mjs +604 -0
- package/dist/index-DA8t6EZ4.mjs +255 -0
- package/dist/index-DEtZMhOE.mjs +3691 -0
- package/dist/index-DGU-dfFs.mjs +3786 -0
- package/dist/index-DVS4MiPy.mjs +114 -0
- package/dist/index-DapMA5nM.js +1 -0
- package/dist/index-DehKWXGA.js +1 -0
- package/dist/index-DmSeFq2X.mjs +811 -0
- package/dist/index-DtWVe73G.mjs +9278 -0
- package/dist/index-HhE2sJlU.js +1 -0
- package/dist/index-Rwqfce2n.js +1 -0
- package/dist/index-Ypt3vHbi.js +1 -0
- package/dist/index-gBhj9Tcu.js +1 -0
- package/dist/index-kFrlcZxC.js +1 -0
- package/dist/index-kjKI70JX.js +1 -0
- package/dist/index-x_p4zv7D.js +1 -0
- package/dist/index.js +98 -97
- package/dist/index.mjs +9002 -8865
- package/package.json +3 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),Pt=require("classnames"),k=require("./panelAvailability-D8c7cdbu.js"),Xn=require("react-dom");function rm(e){return e.type==="object"&&e.version===1}const am="ControlSlider-module__wrapper___sHEkd",sm="ControlSlider-module__hoverArrow___A-dOH",lm="ControlSlider-module__sliderItem___QQSkR",cm="ControlSlider-module__sliderImage___9hRl-",dm="ControlSlider-module__arrow___05ghY",um="ControlSlider-module__arrowVertical___tBfVN",pm="ControlSlider-module__nextArrow___-30Yc",mm="ControlSlider-module__arrowInner___aEra3",gm="ControlSlider-module__arrowIcon___S4ztF",hm="ControlSlider-module__arrowImg___2dwJW",fm="ControlSlider-module__mirror___brd6U",ym="ControlSlider-module__pagination___bicLF",vm="ControlSlider-module__paginationInner___bT-P-",xm="ControlSlider-module__paginationVertical___zYqKw",bm="ControlSlider-module__paginationItem___nTRbk",Sm="ControlSlider-module__dot___p1Qun",wm="ControlSlider-module__activeDot___LHFaj",$m="ControlSlider-module__paginationInsideBottom___R3FWn",Cm="ControlSlider-module__paginationInsideTop___V-qb-",Tm="ControlSlider-module__paginationOutsideBottom___14w8D",Im="ControlSlider-module__paginationOutsideTop___SCLqB",Lm="ControlSlider-module__paginationInsideLeft___yOBRZ",Pm="ControlSlider-module__paginationInsideRight___Rtt3o",Rm="ControlSlider-module__paginationOutsideLeft___lahaw",Mm="ControlSlider-module__paginationOutsideRight___EtuQa",Em="ControlSlider-module__imgWrapper___UjEgB",km="ControlSlider-module__captionBlock___dJ6-j",Am="ControlSlider-module__captionTextWrapper___HFlpf",Fm="ControlSlider-module__captionText___uGBVc",Nm="ControlSlider-module__active___WZK4G",_m="ControlSlider-module__withPointerEvents___t-18M",Hm="ControlSlider-module__topLeftAlignment___zjnGM",Wm="ControlSlider-module__topCenterAlignment___gD1xW",Om="ControlSlider-module__topRightAlignment___NMapS",Dm="ControlSlider-module__middleLeftAlignment___OnUrY",Bm="ControlSlider-module__middleCenterAlignment___Tdkl0",zm="ControlSlider-module__middleRightAlignment___wEbfX",jm="ControlSlider-module__bottomLeftAlignment___cTP2-",Vm="ControlSlider-module__bottomCenterAlignment___c54fB",Gm="ControlSlider-module__bottomRightAlignment___kEwrz",Xm="ControlSlider-module__clickOverlay___DZA28",Um="ControlSlider-module__contain___pLyq7",qm="ControlSlider-module__cover___KdDat",It={wrapper:am,hoverArrow:sm,sliderItem:lm,sliderImage:cm,arrow:dm,arrowVertical:um,nextArrow:pm,arrowInner:mm,arrowIcon:gm,arrowImg:hm,mirror:fm,pagination:ym,paginationInner:vm,paginationVertical:xm,paginationItem:bm,dot:Sm,activeDot:wm,paginationInsideBottom:$m,paginationInsideTop:Cm,paginationOutsideBottom:Tm,paginationOutsideTop:Im,paginationInsideLeft:Lm,paginationInsideRight:Pm,paginationOutsideLeft:Rm,paginationOutsideRight:Mm,imgWrapper:Em,captionBlock:km,captionTextWrapper:Am,captionText:Fm,active:Nm,withPointerEvents:_m,topLeftAlignment:Hm,topCenterAlignment:Wm,topRightAlignment:Om,middleLeftAlignment:Dm,middleCenterAlignment:Bm,middleRightAlignment:zm,bottomLeftAlignment:jm,bottomCenterAlignment:Vm,bottomRightAlignment:Gm,clickOverlay:Xm,contain:Um,cover:qm};function Ym(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 Km(e,t,n){return t&&Ym(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var nc="(prefers-reduced-motion: reduce)",mo=1,Qm=2,$o=3,Ho=4,Cr=5,sa=6,fa=7,Zm={CREATED:mo,MOUNTED:Qm,IDLE:$o,MOVING:Ho,SCROLLING:Cr,DRAGGING:sa,DESTROYED:fa};function li(e){e.length=0}function Mi(e,t,n){return Array.prototype.slice.call(e,t,n)}function Jt(e){return e.bind.apply(e,[null].concat(Mi(arguments,1)))}var ru=setTimeout,_s=function(){};function ic(e){return requestAnimationFrame(e)}function Ra(e,t){return typeof t===e}function dr(e){return!pl(e)&&Ra("object",e)}var ul=Array.isArray,au=Jt(Ra,"function"),Ti=Jt(Ra,"string"),Tr=Jt(Ra,"undefined");function pl(e){return e===null}function su(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Ir(e){return ul(e)?e:[e]}function Mn(e,t){Ir(e).forEach(t)}function ml(e,t){return e.indexOf(t)>-1}function la(e,t){return e.push.apply(e,Ir(t)),e}function ii(e,t,n){e&&Mn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function jn(e,t){ii(e,Ti(t)?t.split(" "):t,!0)}function Lr(e,t){Mn(t,e.appendChild.bind(e))}function gl(e,t){Mn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ur(e,t){return su(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function lu(e,t){var n=e?Mi(e.children):[];return t?n.filter(function(i){return ur(i,t)}):n}function Pr(e,t){return t?lu(e,t)[0]:e.firstElementChild}var pr=Object.keys;function Gi(e,t,n){return e&&(n?pr(e).reverse():pr(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function mr(e){return Mi(arguments,1).forEach(function(t){Gi(t,function(n,i){e[i]=t[i]})}),e}function Si(e){return Mi(arguments,1).forEach(function(t){Gi(t,function(n,i){ul(n)?e[i]=n.slice():dr(n)?e[i]=Si({},dr(e[i])?e[i]:{},n):e[i]=n})}),e}function oc(e,t){Mn(t||pr(e),function(n){delete e[n]})}function Vn(e,t){Mn(e,function(n){Mn(t,function(i){n&&n.removeAttribute(i)})})}function Bt(e,t,n){dr(t)?Gi(t,function(i,o){Bt(e,o,i)}):Mn(e,function(i){pl(n)||n===""?Vn(i,t):i.setAttribute(t,String(n))})}function vo(e,t,n){var i=document.createElement(e);return t&&(Ti(t)?jn(i,t):Bt(i,t)),n&&Lr(n,i),i}function Fn(e,t,n){if(Tr(n))return getComputedStyle(e)[t];pl(n)||(e.style[t]=""+n)}function gr(e,t){Fn(e,"display",t)}function cu(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Nn(e,t){return e.getAttribute(t)}function rc(e,t){return e&&e.classList.contains(t)}function In(e){return e.getBoundingClientRect()}function Ui(e){Mn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function du(e){return Pr(new DOMParser().parseFromString(e,"text/html").body)}function ti(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function uu(e,t){return e&&e.querySelector(t)}function hl(e,t){return t?Mi(e.querySelectorAll(t)):[]}function oi(e,t){ii(e,t,!1)}function Hs(e){return e.timeStamp}function Ai(e){return Ti(e)?e:e?e+"px":""}var Rr="splide",fl="data-"+Rr;function ar(e,t){if(!e)throw new Error("["+Rr+"] "+(t||""))}var Ii=Math.min,ya=Math.max,va=Math.floor,hr=Math.ceil,vn=Math.abs;function pu(e,t,n){return vn(e-t)<n}function ca(e,t,n,i){var o=Ii(t,n),r=ya(t,n);return i?o<e&&e<r:o<=e&&e<=r}function lo(e,t,n){var i=Ii(t,n),o=ya(t,n);return Ii(ya(i,e),o)}function Ws(e){return+(e>0)-+(e<0)}function Os(e,t){return Mn(t,function(n){e=e.replace("%s",""+n)}),e}function yl(e){return e<10?"0"+e:""+e}var ac={};function Jm(e){return""+e+yl(ac[e]=(ac[e]||0)+1)}function mu(){var e=[];function t(l,c,d,u){o(l,c,function(p,v,b){var m="addEventListener"in p,h=m?p.removeEventListener.bind(p,v,d,u):p.removeListener.bind(p,d);m?p.addEventListener(v,d,u):p.addListener(d),e.push([p,v,b,d,h])})}function n(l,c,d){o(l,c,function(u,p,v){e=e.filter(function(b){return b[0]===u&&b[1]===p&&b[2]===v&&(!d||b[3]===d)?(b[4](),!1):!0})})}function i(l,c,d){var u,p=!0;return typeof CustomEvent=="function"?u=new CustomEvent(c,{bubbles:p,detail:d}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(c,p,!1,d)),l.dispatchEvent(u),u}function o(l,c,d){Mn(l,function(u){u&&Mn(c,function(p){p.split(" ").forEach(function(v){var b=v.split(".");d(u,b[0],b[1])})})})}function r(){e.forEach(function(l){l[4]()}),li(e)}return{bind:t,unbind:n,dispatch:i,destroy:r}}var Ei="mounted",Ds="ready",ci="move",Wo="moved",vl="click",gu="active",hu="inactive",fu="visible",yu="hidden",sn="refresh",gn="updated",Co="resize",Ma="resized",vu="drag",xu="dragging",bu="dragged",Ea="scroll",Ki="scrolled",eg="overflow",xl="destroy",Su="arrows:mounted",wu="arrows:updated",$u="pagination:mounted",Cu="pagination:updated",bl="navigation:mounted",Sl="autoplay:play",Tu="autoplay:playing",wl="autoplay:pause",$l="lazyload:loaded",Iu="sk",Lu="sh",xa="ei";function nn(e){var t=e?e.event.bus:document.createDocumentFragment(),n=mu();function i(r,l){n.bind(t,Ir(r).join(" "),function(c){l.apply(l,ul(c.detail)?c.detail:[])})}function o(r){n.dispatch(t,r,Mi(arguments,1))}return e&&e.event.on(xl,n.destroy),mr(n,{bus:t,on:i,off:Jt(n.unbind,t),emit:o})}function ka(e,t,n,i){var o=Date.now,r,l=0,c,d=!0,u=0;function p(){if(!d){if(l=e?Ii((o()-r)/e,1):1,n&&n(l),l>=1&&(t(),r=o(),i&&++u>=i))return b();c=ic(p)}}function v(P){P||h(),r=o()-(P?l*e:0),d=!1,c=ic(p)}function b(){d=!0}function m(){r=o(),l=0,n&&n(l)}function h(){c&&cancelAnimationFrame(c),l=0,c=0,d=!0}function x(P){e=P}function S(){return d}return{start:v,rewind:m,pause:b,cancel:h,set:x,isPaused:S}}function tg(e){var t=e;function n(o){t=o}function i(o){return ml(Ir(o),t)}return{set:n,is:i}}function ng(e,t){var n=ka(0,e,null,1);return function(){n.isPaused()&&n.start()}}function ig(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=mu(),c=[];function d(){var h=n.mediaQuery==="min";pr(o).sort(function(x,S){return h?+x-+S:+S-+x}).forEach(function(x){p(o[x],"("+(h?"min":"max")+"-width:"+x+"px)")}),p(r,nc),v()}function u(h){h&&l.destroy()}function p(h,x){var S=matchMedia(x);l.bind(S,"change",v),c.push([h,S])}function v(){var h=i.is(fa),x=n.direction,S=c.reduce(function(P,f){return Si(P,f[1].matches?f[0]:{})},{});oc(n),m(S),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):x!==n.direction&&e.refresh()}function b(h){matchMedia(nc).matches&&(h?Si(n,r):oc(n,pr(r)))}function m(h,x,S){Si(n,h),x&&Si(Object.getPrototypeOf(n),h),(S||!i.is(mo))&&e.emit(gn,n)}return{setup:d,destroy:u,reduce:b,set:m}}var Aa="Arrow",Fa=Aa+"Left",Na=Aa+"Right",Pu=Aa+"Up",Ru=Aa+"Down",sc="rtl",_a="ttb",qa={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Pu,Na],ArrowRight:[Ru,Fa]};function og(e,t,n){function i(r,l,c){c=c||n.direction;var d=c===sc&&!l?1:c===_a?0:-1;return qa[r]&&qa[r][d]||r.replace(/width|left|right/i,function(u,p){var v=qa[u.toLowerCase()][d]||u;return p>0?v.charAt(0).toUpperCase()+v.slice(1):v})}function o(r){return r*(n.direction===sc?1:-1)}return{resolve:i,orient:o}}var ri="role",xo="tabindex",rg="disabled",_n="aria-",Mr=_n+"controls",Mu=_n+"current",lc=_n+"selected",Pn=_n+"label",Cl=_n+"labelledby",Eu=_n+"hidden",Tl=_n+"orientation",fr=_n+"roledescription",cc=_n+"live",dc=_n+"busy",uc=_n+"atomic",Il=[ri,xo,rg,Mr,Mu,Pn,Cl,Eu,Tl,fr],Un=Rr+"__",ki="is-",Ya=Rr,pc=Un+"track",ag=Un+"list",Ha=Un+"slide",ku=Ha+"--clone",sg=Ha+"__container",Ll=Un+"arrows",Wa=Un+"arrow",Au=Wa+"--prev",Fu=Wa+"--next",Oa=Un+"pagination",Nu=Oa+"__page",lg=Un+"progress",cg=lg+"__bar",dg=Un+"toggle",ug=Un+"spinner",pg=Un+"sr",mg=ki+"initialized",qi=ki+"active",_u=ki+"prev",Hu=ki+"next",Bs=ki+"visible",zs=ki+"loading",Wu=ki+"focus-in",Ou=ki+"overflow",gg=[qi,Bs,_u,Hu,zs,Wu,Ou],hg={slide:Ha,clone:ku,arrows:Ll,arrow:Wa,prev:Au,next:Fu,pagination:Oa,page:Nu,spinner:ug};function fg(e,t){if(au(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ur(n,t);)n=n.parentElement;return n}var yg=5,mc=200,Du="touchstart mousedown",Ka="touchmove mousemove",Qa="touchend touchcancel mouseup click";function vg(e,t,n){var i=nn(e),o=i.on,r=i.bind,l=e.root,c=n.i18n,d={},u=[],p=[],v=[],b,m,h;function x(){w(),N(),f()}function S(){o(sn,P),o(sn,x),o(gn,f),r(document,Du+" keydown",function(H){h=H.type==="keydown"},{capture:!0}),r(l,"focusin",function(){ii(l,Wu,!!h)})}function P(H){var _=Il.concat("style");li(u),oi(l,p),oi(b,v),Vn([b,m],_),Vn(l,H?_:["style",fr])}function f(){oi(l,p),oi(b,v),p=B(Ya),v=B(pc),jn(l,p),jn(b,v),Bt(l,Pn,n.label),Bt(l,Cl,n.labelledby)}function w(){b=V("."+pc),m=Pr(b,"."+ag),ar(b&&m,"A track/list element is missing."),la(u,lu(m,"."+Ha+":not(."+ku+")")),Gi({arrows:Ll,pagination:Oa,prev:Au,next:Fu,bar:cg,toggle:dg},function(H,_){d[_]=V("."+H)}),mr(d,{root:l,track:b,list:m,slides:u})}function N(){var H=l.id||Jm(Rr),_=n.role;l.id=H,b.id=b.id||H+"-track",m.id=m.id||H+"-list",!Nn(l,ri)&&l.tagName!=="SECTION"&&_&&Bt(l,ri,_),Bt(l,fr,c.carousel),Bt(m,ri,"presentation")}function V(H){var _=uu(l,H);return _&&fg(_,"."+Ya)===l?_:void 0}function B(H){return[H+"--"+n.type,H+"--"+n.direction,n.drag&&H+"--draggable",n.isNavigation&&H+"--nav",H===Ya&&qi]}return mr(d,{setup:x,mount:S,destroy:P})}var To="slide",Oo="loop",Er="fade";function xg(e,t,n,i){var o=nn(e),r=o.on,l=o.emit,c=o.bind,d=e.Components,u=e.root,p=e.options,v=p.isNavigation,b=p.updateOnMove,m=p.i18n,h=p.pagination,x=p.slideFocus,S=d.Direction.resolve,P=Nn(i,"style"),f=Nn(i,Pn),w=n>-1,N=Pr(i,"."+sg),V;function B(){w||(i.id=u.id+"-slide"+yl(t+1),Bt(i,ri,h?"tabpanel":"group"),Bt(i,fr,m.slide),Bt(i,Pn,f||Os(m.slideLabel,[t+1,e.length]))),H()}function H(){c(i,"click",Jt(l,vl,Y)),c(i,"keydown",Jt(l,Iu,Y)),r([Wo,Lu,Ki],E),r(bl,z),b&&r(ci,$)}function _(){V=!0,o.destroy(),oi(i,gg),Vn(i,Il),Bt(i,"style",P),Bt(i,Pn,f||"")}function z(){var R=e.splides.map(function(y){var U=y.splide.Components.Slides.getAt(t);return U?U.slide.id:""}).join(" ");Bt(i,Pn,Os(m.slideX,(w?n:t)+1)),Bt(i,Mr,R),Bt(i,ri,x?"button":""),x&&Vn(i,fr)}function $(){V||E()}function E(){if(!V){var R=e.index;j(),L(),ii(i,_u,t===R-1),ii(i,Hu,t===R+1)}}function j(){var R=T();R!==rc(i,qi)&&(ii(i,qi,R),Bt(i,Mu,v&&R||""),l(R?gu:hu,Y))}function L(){var R=G(),y=!R&&(!T()||w);if(e.state.is([Ho,Cr])||Bt(i,Eu,y||""),Bt(hl(i,p.focusableNodes||""),xo,y?-1:""),x&&Bt(i,xo,y?-1:0),R!==rc(i,Bs)&&(ii(i,Bs,R),l(R?fu:yu,Y)),!R&&document.activeElement===i){var U=d.Slides.getAt(e.index);U&&cu(U.slide)}}function C(R,y,U){Fn(U&&N||i,R,y)}function T(){var R=e.index;return R===t||p.cloneStatus&&R===n}function G(){if(e.is(Er))return T();var R=In(d.Elements.track),y=In(i),U=S("left",!0),ee=S("right",!0);return va(R[U])<=hr(y[U])&&va(y[ee])<=hr(R[ee])}function A(R,y){var U=vn(R-t);return!w&&(p.rewind||e.is(Oo))&&(U=Ii(U,e.length-U)),U<=y}var Y={index:t,slideIndex:n,slide:i,container:N,isClone:w,mount:B,destroy:_,update:E,style:C,isWithin:A};return Y}function bg(e,t,n){var i=nn(e),o=i.on,r=i.emit,l=i.bind,c=t.Elements,d=c.slides,u=c.list,p=[];function v(){b(),o(sn,m),o(sn,b)}function b(){d.forEach(function(E,j){x(E,j,-1)})}function m(){V(function(E){E.destroy()}),li(p)}function h(){V(function(E){E.update()})}function x(E,j,L){var C=xg(e,j,L,E);C.mount(),p.push(C),p.sort(function(T,G){return T.index-G.index})}function S(E){return E?B(function(j){return!j.isClone}):p}function P(E){var j=t.Controller,L=j.toIndex(E),C=j.hasFocus()?1:n.perPage;return B(function(T){return ca(T.index,L,L+C-1)})}function f(E){return B(E)[0]}function w(E,j){Mn(E,function(L){if(Ti(L)&&(L=du(L)),su(L)){var C=d[j];C?gl(L,C):Lr(u,L),jn(L,n.classes.slide),_(L,Jt(r,Co))}}),r(sn)}function N(E){Ui(B(E).map(function(j){return j.slide})),r(sn)}function V(E,j){S(j).forEach(E)}function B(E){return p.filter(au(E)?E:function(j){return Ti(E)?ur(j.slide,E):ml(Ir(E),j.index)})}function H(E,j,L){V(function(C){C.style(E,j,L)})}function _(E,j){var L=hl(E,"img"),C=L.length;C?L.forEach(function(T){l(T,"load error",function(){--C||j()})}):j()}function z(E){return E?d.length:p.length}function $(){return p.length>n.perPage}return{mount:v,destroy:m,update:h,register:x,get:S,getIn:P,getAt:f,add:w,remove:N,forEach:V,filter:B,style:H,getLength:z,isEnough:$}}function Sg(e,t,n){var i=nn(e),o=i.on,r=i.bind,l=i.emit,c=t.Slides,d=t.Direction.resolve,u=t.Elements,p=u.root,v=u.track,b=u.list,m=c.getAt,h=c.style,x,S,P;function f(){w(),r(window,"resize load",ng(Jt(l,Co))),o([gn,sn],w),o(Co,N)}function w(){x=n.direction===_a,Fn(p,"maxWidth",Ai(n.width)),Fn(v,d("paddingLeft"),V(!1)),Fn(v,d("paddingRight"),V(!0)),N(!0)}function N(Y){var R=In(p);(Y||S.width!==R.width||S.height!==R.height)&&(Fn(v,"height",B()),h(d("marginRight"),Ai(n.gap)),h("width",_()),h("height",z(),!0),S=R,l(Ma),P!==(P=A())&&(ii(p,Ou,P),l(eg,P)))}function V(Y){var R=n.padding,y=d(Y?"right":"left");return R&&Ai(R[y]||(dr(R)?0:R))||"0px"}function B(){var Y="";return x&&(Y=H(),ar(Y,"height or heightRatio is missing."),Y="calc("+Y+" - "+V(!1)+" - "+V(!0)+")"),Y}function H(){return Ai(n.height||In(b).width*n.heightRatio)}function _(){return n.autoWidth?null:Ai(n.fixedWidth)||(x?"":$())}function z(){return Ai(n.fixedHeight)||(x?n.autoHeight?null:$():H())}function $(){var Y=Ai(n.gap);return"calc((100%"+(Y&&" + "+Y)+")/"+(n.perPage||1)+(Y&&" - "+Y)+")"}function E(){return In(b)[d("width")]}function j(Y,R){var y=m(Y||0);return y?In(y.slide)[d("width")]+(R?0:T()):0}function L(Y,R){var y=m(Y);if(y){var U=In(y.slide)[d("right")],ee=In(b)[d("left")];return vn(U-ee)+(R?0:T())}return 0}function C(Y){return L(e.length-1)-L(0)+j(0,Y)}function T(){var Y=m(0);return Y&&parseFloat(Fn(Y.slide,d("marginRight")))||0}function G(Y){return parseFloat(Fn(v,d("padding"+(Y?"Right":"Left"))))||0}function A(){return e.is(Er)||C(!0)>E()}return{mount:f,resize:N,listSize:E,slideSize:j,sliderSize:C,totalSize:L,getPadding:G,isOverflow:A}}var wg=2;function $g(e,t,n){var i=nn(e),o=i.on,r=t.Elements,l=t.Slides,c=t.Direction.resolve,d=[],u;function p(){o(sn,v),o([gn,Co],m),(u=S())&&(h(u),t.Layout.resize(!0))}function v(){b(),p()}function b(){Ui(d),li(d),i.destroy()}function m(){var P=S();u!==P&&(u<P||!P)&&i.emit(sn)}function h(P){var f=l.get().slice(),w=f.length;if(w){for(;f.length<P;)la(f,f);la(f.slice(-P),f.slice(0,P)).forEach(function(N,V){var B=V<P,H=x(N.slide,V);B?gl(H,f[0].slide):Lr(r.list,H),la(d,H),l.register(H,V-P+(B?0:w),N.index)})}}function x(P,f){var w=P.cloneNode(!0);return jn(w,n.classes.clone),w.id=e.root.id+"-clone"+yl(f+1),w}function S(){var P=n.clones;if(!e.is(Oo))P=0;else if(Tr(P)){var f=n[c("fixedWidth")]&&t.Layout.slideSize(0),w=f&&hr(In(r.track)[c("width")]/f);P=w||n[c("autoWidth")]&&e.length||n.perPage*wg}return P}return{mount:p,destroy:b}}function Cg(e,t,n){var i=nn(e),o=i.on,r=i.emit,l=e.state.set,c=t.Layout,d=c.slideSize,u=c.getPadding,p=c.totalSize,v=c.listSize,b=c.sliderSize,m=t.Direction,h=m.resolve,x=m.orient,S=t.Elements,P=S.list,f=S.track,w;function N(){w=t.Transition,o([Ei,Ma,gn,sn],V)}function V(){t.Controller.isBusy()||(t.Scroll.cancel(),H(e.index),t.Slides.update())}function B(y,U,ee,de){y!==U&&Y(y>ee)&&(E(),_($(C(),y>ee),!0)),l(Ho),r(ci,U,ee,y),w.start(U,function(){l($o),r(Wo,U,ee,y),de&&de()})}function H(y){_(L(y,!0))}function _(y,U){if(!e.is(Er)){var ee=U?y:z(y);Fn(P,"transform","translate"+h("X")+"("+ee+"px)"),y!==ee&&r(Lu)}}function z(y){if(e.is(Oo)){var U=j(y),ee=U>t.Controller.getEnd(),de=U<0;(de||ee)&&(y=$(y,ee))}return y}function $(y,U){var ee=y-A(U),de=b();return y-=x(de*(hr(vn(ee)/de)||1))*(U?1:-1),y}function E(){_(C(),!0),w.cancel()}function j(y){for(var U=t.Slides.get(),ee=0,de=1/0,F=0;F<U.length;F++){var ie=U[F].index,I=vn(L(ie,!0)-y);if(I<=de)de=I,ee=ie;else break}return ee}function L(y,U){var ee=x(p(y-1)-G(y));return U?T(ee):ee}function C(){var y=h("left");return In(P)[y]-In(f)[y]+x(u(!1))}function T(y){return n.trimSpace&&e.is(To)&&(y=lo(y,0,x(b(!0)-v()))),y}function G(y){var U=n.focus;return U==="center"?(v()-d(y,!0))/2:+U*d(y)||0}function A(y){return L(y?t.Controller.getEnd():0,!!n.trimSpace)}function Y(y){var U=x($(C(),y));return y?U>=0:U<=P[h("scrollWidth")]-In(f)[h("width")]}function R(y,U){U=Tr(U)?C():U;var ee=y!==!0&&x(U)<x(A(!1)),de=y!==!1&&x(U)>x(A(!0));return ee||de}return{mount:N,move:B,jump:H,translate:_,shift:$,cancel:E,toIndex:j,toPosition:L,getPosition:C,getLimit:A,exceededLimit:R,reposition:V}}function Tg(e,t,n){var i=nn(e),o=i.on,r=i.emit,l=t.Move,c=l.getPosition,d=l.getLimit,u=l.toPosition,p=t.Slides,v=p.isEnough,b=p.getLength,m=n.omitEnd,h=e.is(Oo),x=e.is(To),S=Jt(C,!1),P=Jt(C,!0),f=n.start||0,w,N=f,V,B,H;function _(){z(),o([gn,sn,xa],z),o(Ma,$)}function z(){V=b(!0),B=n.perMove,H=n.perPage,w=Y();var I=lo(f,0,m?w:V-1);I!==f&&(f=I,l.reposition())}function $(){w!==Y()&&r(xa)}function E(I,se,J){if(!ie()){var Se=L(I),Re=A(Se);Re>-1&&(se||Re!==f)&&(ee(Re),l.move(Se,Re,N,J))}}function j(I,se,J,Se){t.Scroll.scroll(I,se,J,function(){var Re=A(l.toIndex(c()));ee(m?Ii(Re,w):Re),Se&&Se()})}function L(I){var se=f;if(Ti(I)){var J=I.match(/([+\-<>])(\d+)?/)||[],Se=J[1],Re=J[2];Se==="+"||Se==="-"?se=T(f+ +(""+Se+(+Re||1)),f):Se===">"?se=Re?R(+Re):S(!0):Se==="<"&&(se=P(!0))}else se=h?I:lo(I,0,w);return se}function C(I,se){var J=B||(F()?1:H),Se=T(f+J*(I?-1:1),f,!(B||F()));return Se===-1&&x&&!pu(c(),d(!I),1)?I?0:w:se?Se:A(Se)}function T(I,se,J){if(v()||F()){var Se=G(I);Se!==I&&(se=I,I=Se,J=!1),I<0||I>w?!B&&(ca(0,I,se,!0)||ca(w,se,I,!0))?I=R(y(I)):h?I=J?I<0?-(V%H||H):V:I:n.rewind?I=I<0?w:0:I=-1:J&&I!==se&&(I=R(y(se)+(I<se?-1:1)))}else I=-1;return I}function G(I){if(x&&n.trimSpace==="move"&&I!==f)for(var se=c();se===u(I,!0)&&ca(I,0,e.length-1,!n.rewind);)I<f?--I:++I;return I}function A(I){return h?(I+V)%V||0:I}function Y(){for(var I=V-(F()||h&&B?1:H);m&&I-- >0;)if(u(V-1,!0)!==u(I,!0)){I++;break}return lo(I,0,V-1)}function R(I){return lo(F()?I:H*I,0,w)}function y(I){return F()?Ii(I,w):va((I>=w?V-1:I)/H)}function U(I){var se=l.toIndex(I);return x?lo(se,0,w):se}function ee(I){I!==f&&(N=f,f=I)}function de(I){return I?N:f}function F(){return!Tr(n.focus)||n.isNavigation}function ie(){return e.state.is([Ho,Cr])&&!!n.waitForTransition}return{mount:_,go:E,scroll:j,getNext:S,getPrev:P,getAdjacent:C,getEnd:Y,setIndex:ee,getIndex:de,toIndex:R,toPage:y,toDest:U,hasFocus:F,isBusy:ie}}var Ig="http://www.w3.org/2000/svg",Lg="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",Hr=40;function Pg(e,t,n){var i=nn(e),o=i.on,r=i.bind,l=i.emit,c=n.classes,d=n.i18n,u=t.Elements,p=t.Controller,v=u.arrows,b=u.track,m=v,h=u.prev,x=u.next,S,P,f={};function w(){V(),o(gn,N)}function N(){B(),w()}function V(){var j=n.arrows;j&&!(h&&x)&&z(),h&&x&&(mr(f,{prev:h,next:x}),gr(m,j?"":"none"),jn(m,P=Ll+"--"+n.direction),j&&(H(),E(),Bt([h,x],Mr,b.id),l(Su,h,x)))}function B(){i.destroy(),oi(m,P),S?(Ui(v?[h,x]:m),h=x=null):Vn([h,x],Il)}function H(){o([Ei,Wo,sn,Ki,xa],E),r(x,"click",Jt(_,">")),r(h,"click",Jt(_,"<"))}function _(j){p.go(j,!0)}function z(){m=v||vo("div",c.arrows),h=$(!0),x=$(!1),S=!0,Lr(m,[h,x]),!v&&gl(m,b)}function $(j){var L='<button class="'+c.arrow+" "+(j?c.prev:c.next)+'" type="button"><svg xmlns="'+Ig+'" viewBox="0 0 '+Hr+" "+Hr+'" width="'+Hr+'" height="'+Hr+'" focusable="false"><path d="'+(n.arrowPath||Lg)+'" />';return du(L)}function E(){if(h&&x){var j=e.index,L=p.getPrev(),C=p.getNext(),T=L>-1&&j<L?d.last:d.prev,G=C>-1&&j>C?d.first:d.next;h.disabled=L<0,x.disabled=C<0,Bt(h,Pn,T),Bt(x,Pn,G),l(wu,h,x,L,C)}}return{arrows:f,mount:w,destroy:B,update:E}}var Rg=fl+"-interval";function Mg(e,t,n){var i=nn(e),o=i.on,r=i.bind,l=i.emit,c=ka(n.interval,e.go.bind(e,">"),H),d=c.isPaused,u=t.Elements,p=t.Elements,v=p.root,b=p.toggle,m=n.autoplay,h,x,S=m==="pause";function P(){m&&(f(),b&&Bt(b,Mr,u.track.id),S||w(),B())}function f(){n.pauseOnHover&&r(v,"mouseenter mouseleave",function(z){h=z.type==="mouseenter",V()}),n.pauseOnFocus&&r(v,"focusin focusout",function(z){x=z.type==="focusin",V()}),b&&r(b,"click",function(){S?w():N(!0)}),o([ci,Ea,sn],c.rewind),o(ci,_)}function w(){d()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),x=h=S=!1,B(),l(Sl))}function N(z){z===void 0&&(z=!0),S=!!z,B(),d()||(c.pause(),l(wl))}function V(){S||(h||x?N(!1):w())}function B(){b&&(ii(b,qi,!S),Bt(b,Pn,n.i18n[S?"play":"pause"]))}function H(z){var $=u.bar;$&&Fn($,"width",z*100+"%"),l(Tu,z)}function _(z){var $=t.Slides.getAt(z);c.set($&&+Nn($.slide,Rg)||n.interval)}return{mount:P,destroy:c.cancel,play:w,pause:N,isPaused:d}}function Eg(e,t,n){var i=nn(e),o=i.on;function r(){n.cover&&(o($l,Jt(c,!0)),o([Ei,gn,sn],Jt(l,!0)))}function l(d){t.Slides.forEach(function(u){var p=Pr(u.container||u.slide,"img");p&&p.src&&c(d,p,u)})}function c(d,u,p){p.style("background",d?'center/cover no-repeat url("'+u.src+'")':"",!0),gr(u,d?"none":"")}return{mount:r,destroy:Jt(l,!1)}}var kg=10,Ag=600,Fg=.6,Ng=1.5,_g=800;function Hg(e,t,n){var i=nn(e),o=i.on,r=i.emit,l=e.state.set,c=t.Move,d=c.getPosition,u=c.getLimit,p=c.exceededLimit,v=c.translate,b=e.is(To),m,h,x=1;function S(){o(ci,N),o([gn,sn],V)}function P(H,_,z,$,E){var j=d();if(N(),z&&(!b||!p())){var L=t.Layout.sliderSize(),C=Ws(H)*L*va(vn(H)/L)||0;H=c.toPosition(t.Controller.toDest(H%L))+C}var T=pu(j,H,1);x=1,_=T?0:_||ya(vn(H-j)/Ng,_g),h=$,m=ka(_,f,Jt(w,j,H,E),1),l(Cr),r(Ea),m.start()}function f(){l($o),h&&h(),r(Ki)}function w(H,_,z,$){var E=d(),j=H+(_-H)*B($),L=(j-E)*x;v(E+L),b&&!z&&p()&&(x*=Fg,vn(L)<kg&&P(u(p(!0)),Ag,!1,h,!0))}function N(){m&&m.cancel()}function V(){m&&!m.isPaused()&&(N(),f())}function B(H){var _=n.easingFunc;return _?_(H):1-Math.pow(1-H,4)}return{mount:S,destroy:N,scroll:P,cancel:V}}var co={passive:!1,capture:!0};function Wg(e,t,n){var i=nn(e),o=i.on,r=i.emit,l=i.bind,c=i.unbind,d=e.state,u=t.Move,p=t.Scroll,v=t.Controller,b=t.Elements.track,m=t.Media.reduce,h=t.Direction,x=h.resolve,S=h.orient,P=u.getPosition,f=u.exceededLimit,w,N,V,B,H,_=!1,z,$,E;function j(){l(b,Ka,_s,co),l(b,Qa,_s,co),l(b,Du,C,co),l(b,"click",A,{capture:!0}),l(b,"dragstart",ti),o([Ei,gn],L)}function L(){var te=n.drag;he(!te),B=te==="free"}function C(te){if(z=!1,!$){var le=Re(te);Se(te.target)&&(le||!te.button)&&(v.isBusy()?ti(te,!0):(E=le?b:window,H=d.is([Ho,Cr]),V=null,l(E,Ka,T,co),l(E,Qa,G,co),u.cancel(),p.cancel(),Y(te)))}}function T(te){if(d.is(sa)||(d.set(sa),r(vu)),te.cancelable)if(H){u.translate(w+J(F(te)));var le=ie(te)>mc,re=_!==(_=f());(le||re)&&Y(te),z=!0,r(xu),ti(te)}else U(te)&&(H=y(te),ti(te))}function G(te){d.is(sa)&&(d.set($o),r(bu)),H&&(R(te),ti(te)),c(E,Ka,T),c(E,Qa,G),H=!1}function A(te){!$&&z&&ti(te,!0)}function Y(te){V=N,N=te,w=P()}function R(te){var le=ee(te),re=de(le),fe=n.rewind&&n.rewindByDrag;m(!1),B?v.scroll(re,0,n.snap):e.is(Er)?v.go(S(Ws(le))<0?fe?"<":"-":fe?">":"+"):e.is(To)&&_&&fe?v.go(f(!0)?">":"<"):v.go(v.toDest(re),!0),m(!0)}function y(te){var le=n.dragMinThreshold,re=dr(le),fe=re&&le.mouse||0,xe=(re?le.touch:+le)||10;return vn(F(te))>(Re(te)?xe:fe)}function U(te){return vn(F(te))>vn(F(te,!0))}function ee(te){if(e.is(Oo)||!_){var le=ie(te);if(le&&le<mc)return F(te)/le}return 0}function de(te){return P()+Ws(te)*Ii(vn(te)*(n.flickPower||600),B?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function F(te,le){return se(te,le)-se(I(te),le)}function ie(te){return Hs(te)-Hs(I(te))}function I(te){return N===te&&V||N}function se(te,le){return(Re(te)?te.changedTouches[0]:te)["page"+x(le?"Y":"X")]}function J(te){return te/(_&&e.is(To)?yg:1)}function Se(te){var le=n.noDrag;return!ur(te,"."+Nu+", ."+Wa)&&(!le||!ur(te,le))}function Re(te){return typeof TouchEvent<"u"&&te instanceof TouchEvent}function pe(){return H}function he(te){$=te}return{mount:j,disable:he,isDragging:pe}}var Og={Spacebar:" ",Right:Na,Left:Fa,Up:Pu,Down:Ru};function Pl(e){return e=Ti(e)?e:e.key,Og[e]||e}var gc="keydown";function Dg(e,t,n){var i=nn(e),o=i.on,r=i.bind,l=i.unbind,c=e.root,d=t.Direction.resolve,u,p;function v(){b(),o(gn,m),o(gn,b),o(ci,x)}function b(){var P=n.keyboard;P&&(u=P==="global"?window:c,r(u,gc,S))}function m(){l(u,gc)}function h(P){p=P}function x(){var P=p;p=!0,ru(function(){p=P})}function S(P){if(!p){var f=Pl(P);f===d(Fa)?e.go("<"):f===d(Na)&&e.go(">")}}return{mount:v,destroy:m,disable:h}}var sr=fl+"-lazy",da=sr+"-srcset",Bg="["+sr+"], ["+da+"]";function zg(e,t,n){var i=nn(e),o=i.on,r=i.off,l=i.bind,c=i.emit,d=n.lazyLoad==="sequential",u=[Wo,Ki],p=[];function v(){n.lazyLoad&&(b(),o(sn,b))}function b(){li(p),m(),d?P():(r(u),o(u,h),h())}function m(){t.Slides.forEach(function(f){hl(f.slide,Bg).forEach(function(w){var N=Nn(w,sr),V=Nn(w,da);if(N!==w.src||V!==w.srcset){var B=n.classes.spinner,H=w.parentElement,_=Pr(H,"."+B)||vo("span",B,H);p.push([w,f,_]),w.src||gr(w,"none")}})})}function h(){p=p.filter(function(f){var w=n.perPage*((n.preloadPages||1)+1)-1;return f[1].isWithin(e.index,w)?x(f):!0}),p.length||r(u)}function x(f){var w=f[0];jn(f[1].slide,zs),l(w,"load error",Jt(S,f)),Bt(w,"src",Nn(w,sr)),Bt(w,"srcset",Nn(w,da)),Vn(w,sr),Vn(w,da)}function S(f,w){var N=f[0],V=f[1];oi(V.slide,zs),w.type!=="error"&&(Ui(f[2]),gr(N,""),c($l,N,V),c(Co)),d&&P()}function P(){p.length&&x(p.shift())}return{mount:v,destroy:Jt(li,p),check:h}}function jg(e,t,n){var i=nn(e),o=i.on,r=i.emit,l=i.bind,c=t.Slides,d=t.Elements,u=t.Controller,p=u.hasFocus,v=u.getIndex,b=u.go,m=t.Direction.resolve,h=d.pagination,x=[],S,P;function f(){w(),o([gn,sn,xa],f);var $=n.pagination;h&&gr(h,$?"":"none"),$&&(o([ci,Ea,Ki],z),N(),z(),r($u,{list:S,items:x},_(e.index)))}function w(){S&&(Ui(h?Mi(S.children):S),oi(S,P),li(x),S=null),i.destroy()}function N(){var $=e.length,E=n.classes,j=n.i18n,L=n.perPage,C=p()?u.getEnd()+1:hr($/L);S=h||vo("ul",E.pagination,d.track.parentElement),jn(S,P=Oa+"--"+H()),Bt(S,ri,"tablist"),Bt(S,Pn,j.select),Bt(S,Tl,H()===_a?"vertical":"");for(var T=0;T<C;T++){var G=vo("li",null,S),A=vo("button",{class:E.page,type:"button"},G),Y=c.getIn(T).map(function(y){return y.slide.id}),R=!p()&&L>1?j.pageX:j.slideX;l(A,"click",Jt(V,T)),n.paginationKeyboard&&l(A,"keydown",Jt(B,T)),Bt(G,ri,"presentation"),Bt(A,ri,"tab"),Bt(A,Mr,Y.join(" ")),Bt(A,Pn,Os(R,T+1)),Bt(A,xo,-1),x.push({li:G,button:A,page:T})}}function V($){b(">"+$,!0)}function B($,E){var j=x.length,L=Pl(E),C=H(),T=-1;L===m(Na,!1,C)?T=++$%j:L===m(Fa,!1,C)?T=(--$+j)%j:L==="Home"?T=0:L==="End"&&(T=j-1);var G=x[T];G&&(cu(G.button),b(">"+T),ti(E,!0))}function H(){return n.paginationDirection||n.direction}function _($){return x[u.toPage($)]}function z(){var $=_(v(!0)),E=_(v());if($){var j=$.button;oi(j,qi),Vn(j,lc),Bt(j,xo,-1)}if(E){var L=E.button;jn(L,qi),Bt(L,lc,!0),Bt(L,xo,"")}r(Cu,{list:S,items:x},$,E)}return{items:x,mount:f,destroy:w,getAt:_,update:z}}var Vg=[" ","Enter"];function Gg(e,t,n){var i=n.isNavigation,o=n.slideFocus,r=[];function l(){e.splides.forEach(function(h){h.isParent||(u(e,h.splide),u(h.splide,e))}),i&&p()}function c(){r.forEach(function(h){h.destroy()}),li(r)}function d(){c(),l()}function u(h,x){var S=nn(h);S.on(ci,function(P,f,w){x.go(x.is(Oo)?w:P)}),r.push(S)}function p(){var h=nn(e),x=h.on;x(vl,b),x(Iu,m),x([Ei,gn],v),r.push(h),h.emit(bl,e.splides)}function v(){Bt(t.Elements.list,Tl,n.direction===_a?"vertical":"")}function b(h){e.go(h.index)}function m(h,x){ml(Vg,Pl(x))&&(b(h),ti(x))}return{setup:Jt(t.Media.set,{slideFocus:Tr(o)?i:o},!0),mount:l,destroy:c,remount:d}}function Xg(e,t,n){var i=nn(e),o=i.bind,r=0;function l(){n.wheel&&o(t.Elements.track,"wheel",c,co)}function c(u){if(u.cancelable){var p=u.deltaY,v=p<0,b=Hs(u),m=n.wheelMinThreshold||0,h=n.wheelSleep||0;vn(p)>m&&b-r>h&&(e.go(v?"<":">"),r=b),d(v)&&ti(u)}}function d(u){return!n.releaseWheel||e.state.is(Ho)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var Ug=90;function qg(e,t,n){var i=nn(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,c=vo("span",pg),d=ka(Ug,Jt(p,!1));function u(){l&&(b(!t.Autoplay.isPaused()),Bt(r,uc,!0),c.textContent="…",o(Sl,Jt(b,!0)),o(wl,Jt(b,!1)),o([Wo,Ki],Jt(p,!0)))}function p(m){Bt(r,dc,m),m?(Lr(r,c),d.start()):(Ui(c),d.cancel())}function v(){Vn(r,[cc,uc,dc]),Ui(c)}function b(m){l&&Bt(r,cc,m?"off":"polite")}return{mount:u,disable:b,destroy:v}}var Yg=Object.freeze({__proto__:null,Media:ig,Direction:og,Elements:vg,Slides:bg,Layout:Sg,Clones:$g,Move:Cg,Controller:Tg,Arrows:Pg,Autoplay:Mg,Cover:Eg,Scroll:Hg,Drag:Wg,Keyboard:Dg,LazyLoad:zg,Pagination:jg,Sync:Gg,Wheel:Xg,Live:qg}),Kg={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"},Qg={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:hg,i18n:Kg,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Zg(e,t,n){var i=t.Slides;function o(){nn(e).on([Ei,sn],r)}function r(){i.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function l(c,d){i.style("transition","opacity "+n.speed+"ms "+n.easing),ru(d)}return{mount:o,start:l,cancel:_s}}function Jg(e,t,n){var i=t.Move,o=t.Controller,r=t.Scroll,l=t.Elements.list,c=Jt(Fn,l,"transition"),d;function u(){nn(e).bind(l,"transitionend",function(m){m.target===l&&d&&(v(),d())})}function p(m,h){var x=i.toPosition(m,!0),S=i.getPosition(),P=b(m);vn(x-S)>=1&&P>=1?n.useScroll?r.scroll(x,P,!1,h):(c("transform "+P+"ms "+n.easing),i.translate(x,!0),d=h):(i.jump(m),h())}function v(){c(""),r.cancel()}function b(m){var h=n.rewindSpeed;if(e.is(To)&&h){var x=o.getIndex(!0),S=o.getEnd();if(x===0&&m>=S||x>=S&&m===0)return h}return n.speed}return{mount:u,start:p,cancel:v}}var eh=(function(){function e(n,i){this.event=nn(),this.Components={},this.state=tg(mo),this.splides=[],this._o={},this._E={};var o=Ti(n)?uu(document,n):n;ar(o,o+" is invalid."),this.root=o,i=Si({label:Nn(o,Pn)||"",labelledby:Nn(o,Cl)||""},Qg,e.defaults,i||{});try{Si(i,JSON.parse(Nn(o,fl)))}catch{ar(!1,"Invalid JSON")}this._o=Object.create(Si({},i))}var t=e.prototype;return t.mount=function(i,o){var r=this,l=this.state,c=this.Components;ar(l.is([mo,fa]),"Already mounted!"),l.set(mo),this._C=c,this._T=o||this._T||(this.is(Er)?Zg:Jg),this._E=i||this._E;var d=mr({},Yg,this._E,{Transition:this._T});return Gi(d,function(u,p){var v=u(r,c,r._o);c[p]=v,v.setup&&v.setup()}),Gi(c,function(u){u.mount&&u.mount()}),this.emit(Ei),jn(this.root,mg),l.set($o),this.emit(Ds),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is($o)&&(this._C.Sync.remount(),i.Components.Sync.remount()),this},t.go=function(i){return this._C.Controller.go(i),this},t.on=function(i,o){return this.event.on(i,o),this},t.off=function(i){return this.event.off(i),this},t.emit=function(i){var o;return(o=this.event).emit.apply(o,[i].concat(Mi(arguments,1))),this},t.add=function(i,o){return this._C.Slides.add(i,o),this},t.remove=function(i){return this._C.Slides.remove(i),this},t.is=function(i){return this._o.type===i},t.refresh=function(){return this.emit(sn),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,r=this.state;return r.is(mo)?nn(this).on(Ds,this.destroy.bind(this,i)):(Gi(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(xl),o.destroy(),i&&li(this.splides),r.set(fa)),this},Km(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})(),Rl=eh;Rl.defaults={};Rl.STATES=Zm;var hc=[[Ei,"onMounted"],[Ds,"onReady"],[ci,"onMove"],[Wo,"onMoved"],[vl,"onClick"],[gu,"onActive"],[hu,"onInactive"],[fu,"onVisible"],[yu,"onHidden"],[sn,"onRefresh"],[gn,"onUpdated"],[Co,"onResize"],[Ma,"onResized"],[vu,"onDrag"],[xu,"onDragging"],[bu,"onDragged"],[Ea,"onScroll"],[Ki,"onScrolled"],[xl,"onDestroy"],[Su,"onArrowsMounted"],[wu,"onArrowsUpdated"],[$u,"onPaginationMounted"],[Cu,"onPaginationUpdated"],[bl,"onNavigationMounted"],[Sl,"onAutoplayPlay"],[Tu,"onAutoplayPlaying"],[wl,"onAutoplayPause"],[$l,"onLazyLoadLoaded"]];function Ml(...e){return e.filter(Boolean).join(" ")}function ba(e){return e!==null&&typeof e=="object"}function js(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!js(n,t[i]));if(ba(e)&&ba(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!js(e[o],t[o]))}return e===t}function th(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function nh(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 Vs(e,t){const n=e;return nh(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():ba(i)?n[o]=Vs(ba(n[o])?n[o]:{},i):n[o]=i}),n}var ih=({children:e,className:t,...n})=>s.createElement("div",{className:Ml("splide__track",t),...n},s.createElement("ul",{className:"splide__list"},e)),El=class extends s.Component{constructor(){super(...arguments),this.splideRef=s.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Rl(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Vs({},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&&!js(this.options,e)&&(this.splide.options=e,this.options=Vs({},e));const t=this.getSlides();th(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){hc.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:i,...o}=this.props;return s.createElement(t,{className:Ml("splide",e),ref:this.splideRef,...this.omit(o,["options",...hc.map(r=>r[1])])},n?s.createElement(ih,null,i):i)}},kl=({children:e,className:t,...n})=>s.createElement("li",{className:Ml("splide__slide",t),...n},e);/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),Rt=require("classnames"),A=require("./panelAvailability-D8c7cdbu.js"),Un=require("react-dom");function um(e){return e.type==="object"&&e.version===1}const pm="ControlSlider-module__wrapper___sHEkd",mm="ControlSlider-module__hoverArrow___A-dOH",gm="ControlSlider-module__sliderItem___QQSkR",hm="ControlSlider-module__sliderImage___9hRl-",fm="ControlSlider-module__arrow___05ghY",ym="ControlSlider-module__arrowVertical___tBfVN",vm="ControlSlider-module__nextArrow___-30Yc",xm="ControlSlider-module__arrowInner___aEra3",bm="ControlSlider-module__arrowIcon___S4ztF",Sm="ControlSlider-module__arrowImg___2dwJW",wm="ControlSlider-module__mirror___brd6U",$m="ControlSlider-module__pagination___bicLF",Cm="ControlSlider-module__paginationInner___bT-P-",Tm="ControlSlider-module__paginationVertical___zYqKw",Im="ControlSlider-module__paginationItem___nTRbk",Lm="ControlSlider-module__dot___p1Qun",Pm="ControlSlider-module__activeDot___LHFaj",Rm="ControlSlider-module__paginationInsideBottom___R3FWn",Mm="ControlSlider-module__paginationInsideTop___V-qb-",Em="ControlSlider-module__paginationOutsideBottom___14w8D",km="ControlSlider-module__paginationOutsideTop___SCLqB",Am="ControlSlider-module__paginationInsideLeft___yOBRZ",Fm="ControlSlider-module__paginationInsideRight___Rtt3o",Nm="ControlSlider-module__paginationOutsideLeft___lahaw",_m="ControlSlider-module__paginationOutsideRight___EtuQa",Hm="ControlSlider-module__imgWrapper___UjEgB",Wm="ControlSlider-module__captionBlock___dJ6-j",Om="ControlSlider-module__captionTextWrapper___HFlpf",Dm="ControlSlider-module__captionText___uGBVc",Bm="ControlSlider-module__active___WZK4G",zm="ControlSlider-module__withPointerEvents___t-18M",jm="ControlSlider-module__topLeftAlignment___zjnGM",Vm="ControlSlider-module__topCenterAlignment___gD1xW",Gm="ControlSlider-module__topRightAlignment___NMapS",Xm="ControlSlider-module__middleLeftAlignment___OnUrY",qm="ControlSlider-module__middleCenterAlignment___Tdkl0",Um="ControlSlider-module__middleRightAlignment___wEbfX",Ym="ControlSlider-module__bottomLeftAlignment___cTP2-",Km="ControlSlider-module__bottomCenterAlignment___c54fB",Qm="ControlSlider-module__bottomRightAlignment___kEwrz",Zm="ControlSlider-module__clickOverlay___DZA28",Jm="ControlSlider-module__contain___pLyq7",eg="ControlSlider-module__cover___KdDat",Lt={wrapper:pm,hoverArrow:mm,sliderItem:gm,sliderImage:hm,arrow:fm,arrowVertical:ym,nextArrow:vm,arrowInner:xm,arrowIcon:bm,arrowImg:Sm,mirror:wm,pagination:$m,paginationInner:Cm,paginationVertical:Tm,paginationItem:Im,dot:Lm,activeDot:Pm,paginationInsideBottom:Rm,paginationInsideTop:Mm,paginationOutsideBottom:Em,paginationOutsideTop:km,paginationInsideLeft:Am,paginationInsideRight:Fm,paginationOutsideLeft:Nm,paginationOutsideRight:_m,imgWrapper:Hm,captionBlock:Wm,captionTextWrapper:Om,captionText:Dm,active:Bm,withPointerEvents:zm,topLeftAlignment:jm,topCenterAlignment:Vm,topRightAlignment:Gm,middleLeftAlignment:Xm,middleCenterAlignment:qm,middleRightAlignment:Um,bottomLeftAlignment:Ym,bottomCenterAlignment:Km,bottomRightAlignment:Qm,clickOverlay:Zm,contain:Jm,cover:eg};function tg(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 ng(e,t,n){return t&&tg(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var nc="(prefers-reduced-motion: reduce)",ho=1,ig=2,To=3,Oo=4,Cr=5,sa=6,fa=7,og={CREATED:ho,MOUNTED:ig,IDLE:To,MOVING:Oo,SCROLLING:Cr,DRAGGING:sa,DESTROYED:fa};function ci(e){e.length=0}function Ai(e,t,n){return Array.prototype.slice.call(e,t,n)}function tn(e){return e.bind.apply(e,[null].concat(Ai(arguments,1)))}var uu=setTimeout,Ns=function(){};function ic(e){return requestAnimationFrame(e)}function Ra(e,t){return typeof t===e}function dr(e){return!pl(e)&&Ra("object",e)}var ul=Array.isArray,pu=tn(Ra,"function"),Pi=tn(Ra,"string"),Tr=tn(Ra,"undefined");function pl(e){return e===null}function mu(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Ir(e){return ul(e)?e:[e]}function En(e,t){Ir(e).forEach(t)}function ml(e,t){return e.indexOf(t)>-1}function la(e,t){return e.push.apply(e,Ir(t)),e}function oi(e,t,n){e&&En(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Gn(e,t){oi(e,Pi(t)?t.split(" "):t,!0)}function Lr(e,t){En(t,e.appendChild.bind(e))}function gl(e,t){En(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ur(e,t){return mu(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function gu(e,t){var n=e?Ai(e.children):[];return t?n.filter(function(i){return ur(i,t)}):n}function Pr(e,t){return t?gu(e,t)[0]:e.firstElementChild}var pr=Object.keys;function Ui(e,t,n){return e&&(n?pr(e).reverse():pr(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function mr(e){return Ai(arguments,1).forEach(function(t){Ui(t,function(n,i){e[i]=t[i]})}),e}function Ci(e){return Ai(arguments,1).forEach(function(t){Ui(t,function(n,i){ul(n)?e[i]=n.slice():dr(n)?e[i]=Ci({},dr(e[i])?e[i]:{},n):e[i]=n})}),e}function oc(e,t){En(t||pr(e),function(n){delete e[n]})}function Xn(e,t){En(e,function(n){En(t,function(i){n&&n.removeAttribute(i)})})}function zt(e,t,n){dr(t)?Ui(t,function(i,o){zt(e,o,i)}):En(e,function(i){pl(n)||n===""?Xn(i,t):i.setAttribute(t,String(n))})}function bo(e,t,n){var i=document.createElement(e);return t&&(Pi(t)?Gn(i,t):zt(i,t)),n&&Lr(n,i),i}function Nn(e,t,n){if(Tr(n))return getComputedStyle(e)[t];pl(n)||(e.style[t]=""+n)}function gr(e,t){Nn(e,"display",t)}function hu(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function _n(e,t){return e.getAttribute(t)}function rc(e,t){return e&&e.classList.contains(t)}function Ln(e){return e.getBoundingClientRect()}function Ki(e){En(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function fu(e){return Pr(new DOMParser().parseFromString(e,"text/html").body)}function ni(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function yu(e,t){return e&&e.querySelector(t)}function hl(e,t){return t?Ai(e.querySelectorAll(t)):[]}function ri(e,t){oi(e,t,!1)}function _s(e){return e.timeStamp}function _i(e){return Pi(e)?e:e?e+"px":""}var Rr="splide",fl="data-"+Rr;function ar(e,t){if(!e)throw new Error("["+Rr+"] "+(t||""))}var Ri=Math.min,ya=Math.max,va=Math.floor,hr=Math.ceil,vn=Math.abs;function vu(e,t,n){return vn(e-t)<n}function ca(e,t,n,i){var o=Ri(t,n),r=ya(t,n);return i?o<e&&e<r:o<=e&&e<=r}function uo(e,t,n){var i=Ri(t,n),o=ya(t,n);return Ri(ya(i,e),o)}function Hs(e){return+(e>0)-+(e<0)}function Ws(e,t){return En(t,function(n){e=e.replace("%s",""+n)}),e}function yl(e){return e<10?"0"+e:""+e}var ac={};function rg(e){return""+e+yl(ac[e]=(ac[e]||0)+1)}function xu(){var e=[];function t(l,c,d,u){o(l,c,function(p,v,x){var m="addEventListener"in p,h=m?p.removeEventListener.bind(p,v,d,u):p.removeListener.bind(p,d);m?p.addEventListener(v,d,u):p.addListener(d),e.push([p,v,x,d,h])})}function n(l,c,d){o(l,c,function(u,p,v){e=e.filter(function(x){return x[0]===u&&x[1]===p&&x[2]===v&&(!d||x[3]===d)?(x[4](),!1):!0})})}function i(l,c,d){var u,p=!0;return typeof CustomEvent=="function"?u=new CustomEvent(c,{bubbles:p,detail:d}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(c,p,!1,d)),l.dispatchEvent(u),u}function o(l,c,d){En(l,function(u){u&&En(c,function(p){p.split(" ").forEach(function(v){var x=v.split(".");d(u,x[0],x[1])})})})}function r(){e.forEach(function(l){l[4]()}),ci(e)}return{bind:t,unbind:n,dispatch:i,destroy:r}}var Fi="mounted",Os="ready",di="move",Do="moved",vl="click",bu="active",Su="inactive",wu="visible",$u="hidden",ln="refresh",hn="updated",Io="resize",Ma="resized",Cu="drag",Tu="dragging",Iu="dragged",Ea="scroll",Ji="scrolled",ag="overflow",xl="destroy",Lu="arrows:mounted",Pu="arrows:updated",Ru="pagination:mounted",Mu="pagination:updated",bl="navigation:mounted",Sl="autoplay:play",Eu="autoplay:playing",wl="autoplay:pause",$l="lazyload:loaded",ku="sk",Au="sh",xa="ei";function an(e){var t=e?e.event.bus:document.createDocumentFragment(),n=xu();function i(r,l){n.bind(t,Ir(r).join(" "),function(c){l.apply(l,ul(c.detail)?c.detail:[])})}function o(r){n.dispatch(t,r,Ai(arguments,1))}return e&&e.event.on(xl,n.destroy),mr(n,{bus:t,on:i,off:tn(n.unbind,t),emit:o})}function ka(e,t,n,i){var o=Date.now,r,l=0,c,d=!0,u=0;function p(){if(!d){if(l=e?Ri((o()-r)/e,1):1,n&&n(l),l>=1&&(t(),r=o(),i&&++u>=i))return x();c=ic(p)}}function v(M){M||h(),r=o()-(M?l*e:0),d=!1,c=ic(p)}function x(){d=!0}function m(){r=o(),l=0,n&&n(l)}function h(){c&&cancelAnimationFrame(c),l=0,c=0,d=!0}function b(M){e=M}function S(){return d}return{start:v,rewind:m,pause:x,cancel:h,set:b,isPaused:S}}function sg(e){var t=e;function n(o){t=o}function i(o){return ml(Ir(o),t)}return{set:n,is:i}}function lg(e,t){var n=ka(0,e,null,1);return function(){n.isPaused()&&n.start()}}function cg(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=xu(),c=[];function d(){var h=n.mediaQuery==="min";pr(o).sort(function(b,S){return h?+b-+S:+S-+b}).forEach(function(b){p(o[b],"("+(h?"min":"max")+"-width:"+b+"px)")}),p(r,nc),v()}function u(h){h&&l.destroy()}function p(h,b){var S=matchMedia(b);l.bind(S,"change",v),c.push([h,S])}function v(){var h=i.is(fa),b=n.direction,S=c.reduce(function(M,y){return Ci(M,y[1].matches?y[0]:{})},{});oc(n),m(S),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):b!==n.direction&&e.refresh()}function x(h){matchMedia(nc).matches&&(h?Ci(n,r):oc(n,pr(r)))}function m(h,b,S){Ci(n,h),b&&Ci(Object.getPrototypeOf(n),h),(S||!i.is(ho))&&e.emit(hn,n)}return{setup:d,destroy:u,reduce:x,set:m}}var Aa="Arrow",Fa=Aa+"Left",Na=Aa+"Right",Fu=Aa+"Up",Nu=Aa+"Down",sc="rtl",_a="ttb",Ua={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Fu,Na],ArrowRight:[Nu,Fa]};function dg(e,t,n){function i(r,l,c){c=c||n.direction;var d=c===sc&&!l?1:c===_a?0:-1;return Ua[r]&&Ua[r][d]||r.replace(/width|left|right/i,function(u,p){var v=Ua[u.toLowerCase()][d]||u;return p>0?v.charAt(0).toUpperCase()+v.slice(1):v})}function o(r){return r*(n.direction===sc?1:-1)}return{resolve:i,orient:o}}var ai="role",So="tabindex",ug="disabled",Hn="aria-",Mr=Hn+"controls",_u=Hn+"current",lc=Hn+"selected",Rn=Hn+"label",Cl=Hn+"labelledby",Hu=Hn+"hidden",Tl=Hn+"orientation",fr=Hn+"roledescription",cc=Hn+"live",dc=Hn+"busy",uc=Hn+"atomic",Il=[ai,So,ug,Mr,_u,Rn,Cl,Hu,Tl,fr],Yn=Rr+"__",Ni="is-",Ya=Rr,pc=Yn+"track",pg=Yn+"list",Ha=Yn+"slide",Wu=Ha+"--clone",mg=Ha+"__container",Ll=Yn+"arrows",Wa=Yn+"arrow",Ou=Wa+"--prev",Du=Wa+"--next",Oa=Yn+"pagination",Bu=Oa+"__page",gg=Yn+"progress",hg=gg+"__bar",fg=Yn+"toggle",yg=Yn+"spinner",vg=Yn+"sr",xg=Ni+"initialized",Qi=Ni+"active",zu=Ni+"prev",ju=Ni+"next",Ds=Ni+"visible",Bs=Ni+"loading",Vu=Ni+"focus-in",Gu=Ni+"overflow",bg=[Qi,Ds,zu,ju,Bs,Vu,Gu],Sg={slide:Ha,clone:Wu,arrows:Ll,arrow:Wa,prev:Ou,next:Du,pagination:Oa,page:Bu,spinner:yg};function wg(e,t){if(pu(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ur(n,t);)n=n.parentElement;return n}var $g=5,mc=200,Xu="touchstart mousedown",Ka="touchmove mousemove",Qa="touchend touchcancel mouseup click";function Cg(e,t,n){var i=an(e),o=i.on,r=i.bind,l=e.root,c=n.i18n,d={},u=[],p=[],v=[],x,m,h;function b(){$(),R(),y()}function S(){o(ln,M),o(ln,b),o(hn,y),r(document,Xu+" keydown",function(O){h=O.type==="keydown"},{capture:!0}),r(l,"focusin",function(){oi(l,Vu,!!h)})}function M(O){var N=Il.concat("style");ci(u),ri(l,p),ri(x,v),Xn([x,m],N),Xn(l,O?N:["style",fr])}function y(){ri(l,p),ri(x,v),p=B(Ya),v=B(pc),Gn(l,p),Gn(x,v),zt(l,Rn,n.label),zt(l,Cl,n.labelledby)}function $(){x=X("."+pc),m=Pr(x,"."+pg),ar(x&&m,"A track/list element is missing."),la(u,gu(m,"."+Ha+":not(."+Wu+")")),Ui({arrows:Ll,pagination:Oa,prev:Ou,next:Du,bar:hg,toggle:fg},function(O,N){d[N]=X("."+O)}),mr(d,{root:l,track:x,list:m,slides:u})}function R(){var O=l.id||rg(Rr),N=n.role;l.id=O,x.id=x.id||O+"-track",m.id=m.id||O+"-list",!_n(l,ai)&&l.tagName!=="SECTION"&&N&&zt(l,ai,N),zt(l,fr,c.carousel),zt(m,ai,"presentation")}function X(O){var N=yu(l,O);return N&&wg(N,"."+Ya)===l?N:void 0}function B(O){return[O+"--"+n.type,O+"--"+n.direction,n.drag&&O+"--draggable",n.isNavigation&&O+"--nav",O===Ya&&Qi]}return mr(d,{setup:b,mount:S,destroy:M})}var Lo="slide",Bo="loop",Er="fade";function Tg(e,t,n,i){var o=an(e),r=o.on,l=o.emit,c=o.bind,d=e.Components,u=e.root,p=e.options,v=p.isNavigation,x=p.updateOnMove,m=p.i18n,h=p.pagination,b=p.slideFocus,S=d.Direction.resolve,M=_n(i,"style"),y=_n(i,Rn),$=n>-1,R=Pr(i,"."+mg),X;function B(){$||(i.id=u.id+"-slide"+yl(t+1),zt(i,ai,h?"tabpanel":"group"),zt(i,fr,m.slide),zt(i,Rn,y||Ws(m.slideLabel,[t+1,e.length]))),O()}function O(){c(i,"click",tn(l,vl,K)),c(i,"keydown",tn(l,ku,K)),r([Do,Au,Ji],I),r(bl,z),x&&r(di,C)}function N(){X=!0,o.destroy(),ri(i,bg),Xn(i,Il),zt(i,"style",M),zt(i,Rn,y||"")}function z(){var P=e.splides.map(function(f){var U=f.splide.Components.Slides.getAt(t);return U?U.slide.id:""}).join(" ");zt(i,Rn,Ws(m.slideX,($?n:t)+1)),zt(i,Mr,P),zt(i,ai,b?"button":""),b&&Xn(i,fr)}function C(){X||I()}function I(){if(!X){var P=e.index;j(),E(),oi(i,zu,t===P-1),oi(i,ju,t===P+1)}}function j(){var P=L();P!==rc(i,Qi)&&(oi(i,Qi,P),zt(i,_u,v&&P||""),l(P?bu:Su,K))}function E(){var P=V(),f=!P&&(!L()||$);if(e.state.is([Oo,Cr])||zt(i,Hu,f||""),zt(hl(i,p.focusableNodes||""),So,f?-1:""),b&&zt(i,So,f?-1:0),P!==rc(i,Ds)&&(oi(i,Ds,P),l(P?wu:$u,K)),!P&&document.activeElement===i){var U=d.Slides.getAt(e.index);U&&hu(U.slide)}}function w(P,f,U){Nn(U&&R||i,P,f)}function L(){var P=e.index;return P===t||p.cloneStatus&&P===n}function V(){if(e.is(Er))return L();var P=Ln(d.Elements.track),f=Ln(i),U=S("left",!0),te=S("right",!0);return va(P[U])<=hr(f[U])&&va(f[te])<=hr(P[te])}function _(P,f){var U=vn(P-t);return!$&&(p.rewind||e.is(Bo))&&(U=Ri(U,e.length-U)),U<=f}var K={index:t,slideIndex:n,slide:i,container:R,isClone:$,mount:B,destroy:N,update:I,style:w,isWithin:_};return K}function Ig(e,t,n){var i=an(e),o=i.on,r=i.emit,l=i.bind,c=t.Elements,d=c.slides,u=c.list,p=[];function v(){x(),o(ln,m),o(ln,x)}function x(){d.forEach(function(I,j){b(I,j,-1)})}function m(){X(function(I){I.destroy()}),ci(p)}function h(){X(function(I){I.update()})}function b(I,j,E){var w=Tg(e,j,E,I);w.mount(),p.push(w),p.sort(function(L,V){return L.index-V.index})}function S(I){return I?B(function(j){return!j.isClone}):p}function M(I){var j=t.Controller,E=j.toIndex(I),w=j.hasFocus()?1:n.perPage;return B(function(L){return ca(L.index,E,E+w-1)})}function y(I){return B(I)[0]}function $(I,j){En(I,function(E){if(Pi(E)&&(E=fu(E)),mu(E)){var w=d[j];w?gl(E,w):Lr(u,E),Gn(E,n.classes.slide),N(E,tn(r,Io))}}),r(ln)}function R(I){Ki(B(I).map(function(j){return j.slide})),r(ln)}function X(I,j){S(j).forEach(I)}function B(I){return p.filter(pu(I)?I:function(j){return Pi(I)?ur(j.slide,I):ml(Ir(I),j.index)})}function O(I,j,E){X(function(w){w.style(I,j,E)})}function N(I,j){var E=hl(I,"img"),w=E.length;w?E.forEach(function(L){l(L,"load error",function(){--w||j()})}):j()}function z(I){return I?d.length:p.length}function C(){return p.length>n.perPage}return{mount:v,destroy:m,update:h,register:b,get:S,getIn:M,getAt:y,add:$,remove:R,forEach:X,filter:B,style:O,getLength:z,isEnough:C}}function Lg(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.emit,c=t.Slides,d=t.Direction.resolve,u=t.Elements,p=u.root,v=u.track,x=u.list,m=c.getAt,h=c.style,b,S,M;function y(){$(),r(window,"resize load",lg(tn(l,Io))),o([hn,ln],$),o(Io,R)}function $(){b=n.direction===_a,Nn(p,"maxWidth",_i(n.width)),Nn(v,d("paddingLeft"),X(!1)),Nn(v,d("paddingRight"),X(!0)),R(!0)}function R(K){var P=Ln(p);(K||S.width!==P.width||S.height!==P.height)&&(Nn(v,"height",B()),h(d("marginRight"),_i(n.gap)),h("width",N()),h("height",z(),!0),S=P,l(Ma),M!==(M=_())&&(oi(p,Gu,M),l(ag,M)))}function X(K){var P=n.padding,f=d(K?"right":"left");return P&&_i(P[f]||(dr(P)?0:P))||"0px"}function B(){var K="";return b&&(K=O(),ar(K,"height or heightRatio is missing."),K="calc("+K+" - "+X(!1)+" - "+X(!0)+")"),K}function O(){return _i(n.height||Ln(x).width*n.heightRatio)}function N(){return n.autoWidth?null:_i(n.fixedWidth)||(b?"":C())}function z(){return _i(n.fixedHeight)||(b?n.autoHeight?null:C():O())}function C(){var K=_i(n.gap);return"calc((100%"+(K&&" + "+K)+")/"+(n.perPage||1)+(K&&" - "+K)+")"}function I(){return Ln(x)[d("width")]}function j(K,P){var f=m(K||0);return f?Ln(f.slide)[d("width")]+(P?0:L()):0}function E(K,P){var f=m(K);if(f){var U=Ln(f.slide)[d("right")],te=Ln(x)[d("left")];return vn(U-te)+(P?0:L())}return 0}function w(K){return E(e.length-1)-E(0)+j(0,K)}function L(){var K=m(0);return K&&parseFloat(Nn(K.slide,d("marginRight")))||0}function V(K){return parseFloat(Nn(v,d("padding"+(K?"Right":"Left"))))||0}function _(){return e.is(Er)||w(!0)>I()}return{mount:y,resize:R,listSize:I,slideSize:j,sliderSize:w,totalSize:E,getPadding:V,isOverflow:_}}var Pg=2;function Rg(e,t,n){var i=an(e),o=i.on,r=t.Elements,l=t.Slides,c=t.Direction.resolve,d=[],u;function p(){o(ln,v),o([hn,Io],m),(u=S())&&(h(u),t.Layout.resize(!0))}function v(){x(),p()}function x(){Ki(d),ci(d),i.destroy()}function m(){var M=S();u!==M&&(u<M||!M)&&i.emit(ln)}function h(M){var y=l.get().slice(),$=y.length;if($){for(;y.length<M;)la(y,y);la(y.slice(-M),y.slice(0,M)).forEach(function(R,X){var B=X<M,O=b(R.slide,X);B?gl(O,y[0].slide):Lr(r.list,O),la(d,O),l.register(O,X-M+(B?0:$),R.index)})}}function b(M,y){var $=M.cloneNode(!0);return Gn($,n.classes.clone),$.id=e.root.id+"-clone"+yl(y+1),$}function S(){var M=n.clones;if(!e.is(Bo))M=0;else if(Tr(M)){var y=n[c("fixedWidth")]&&t.Layout.slideSize(0),$=y&&hr(Ln(r.track)[c("width")]/y);M=$||n[c("autoWidth")]&&e.length||n.perPage*Pg}return M}return{mount:p,destroy:x}}function Mg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=e.state.set,c=t.Layout,d=c.slideSize,u=c.getPadding,p=c.totalSize,v=c.listSize,x=c.sliderSize,m=t.Direction,h=m.resolve,b=m.orient,S=t.Elements,M=S.list,y=S.track,$;function R(){$=t.Transition,o([Fi,Ma,hn,ln],X)}function X(){t.Controller.isBusy()||(t.Scroll.cancel(),O(e.index),t.Slides.update())}function B(f,U,te,ce){f!==U&&K(f>te)&&(I(),N(C(w(),f>te),!0)),l(Oo),r(di,U,te,f),$.start(U,function(){l(To),r(Do,U,te,f),ce&&ce()})}function O(f){N(E(f,!0))}function N(f,U){if(!e.is(Er)){var te=U?f:z(f);Nn(M,"transform","translate"+h("X")+"("+te+"px)"),f!==te&&r(Au)}}function z(f){if(e.is(Bo)){var U=j(f),te=U>t.Controller.getEnd(),ce=U<0;(ce||te)&&(f=C(f,te))}return f}function C(f,U){var te=f-_(U),ce=x();return f-=b(ce*(hr(vn(te)/ce)||1))*(U?1:-1),f}function I(){N(w(),!0),$.cancel()}function j(f){for(var U=t.Slides.get(),te=0,ce=1/0,F=0;F<U.length;F++){var ie=U[F].index,T=vn(E(ie,!0)-f);if(T<=ce)ce=T,te=ie;else break}return te}function E(f,U){var te=b(p(f-1)-V(f));return U?L(te):te}function w(){var f=h("left");return Ln(M)[f]-Ln(y)[f]+b(u(!1))}function L(f){return n.trimSpace&&e.is(Lo)&&(f=uo(f,0,b(x(!0)-v()))),f}function V(f){var U=n.focus;return U==="center"?(v()-d(f,!0))/2:+U*d(f)||0}function _(f){return E(f?t.Controller.getEnd():0,!!n.trimSpace)}function K(f){var U=b(C(w(),f));return f?U>=0:U<=M[h("scrollWidth")]-Ln(y)[h("width")]}function P(f,U){U=Tr(U)?w():U;var te=f!==!0&&b(U)<b(_(!1)),ce=f!==!1&&b(U)>b(_(!0));return te||ce}return{mount:R,move:B,jump:O,translate:N,shift:C,cancel:I,toIndex:j,toPosition:E,getPosition:w,getLimit:_,exceededLimit:P,reposition:X}}function Eg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=t.Move,c=l.getPosition,d=l.getLimit,u=l.toPosition,p=t.Slides,v=p.isEnough,x=p.getLength,m=n.omitEnd,h=e.is(Bo),b=e.is(Lo),S=tn(w,!1),M=tn(w,!0),y=n.start||0,$,R=y,X,B,O;function N(){z(),o([hn,ln,xa],z),o(Ma,C)}function z(){X=x(!0),B=n.perMove,O=n.perPage,$=K();var T=uo(y,0,m?$:X-1);T!==y&&(y=T,l.reposition())}function C(){$!==K()&&r(xa)}function I(T,le,J){if(!ie()){var Se=E(T),Le=_(Se);Le>-1&&(le||Le!==y)&&(te(Le),l.move(Se,Le,R,J))}}function j(T,le,J,Se){t.Scroll.scroll(T,le,J,function(){var Le=_(l.toIndex(c()));te(m?Ri(Le,$):Le),Se&&Se()})}function E(T){var le=y;if(Pi(T)){var J=T.match(/([+\-<>])(\d+)?/)||[],Se=J[1],Le=J[2];Se==="+"||Se==="-"?le=L(y+ +(""+Se+(+Le||1)),y):Se===">"?le=Le?P(+Le):S(!0):Se==="<"&&(le=M(!0))}else le=h?T:uo(T,0,$);return le}function w(T,le){var J=B||(F()?1:O),Se=L(y+J*(T?-1:1),y,!(B||F()));return Se===-1&&b&&!vu(c(),d(!T),1)?T?0:$:le?Se:_(Se)}function L(T,le,J){if(v()||F()){var Se=V(T);Se!==T&&(le=T,T=Se,J=!1),T<0||T>$?!B&&(ca(0,T,le,!0)||ca($,le,T,!0))?T=P(f(T)):h?T=J?T<0?-(X%O||O):X:T:n.rewind?T=T<0?$:0:T=-1:J&&T!==le&&(T=P(f(le)+(T<le?-1:1)))}else T=-1;return T}function V(T){if(b&&n.trimSpace==="move"&&T!==y)for(var le=c();le===u(T,!0)&&ca(T,0,e.length-1,!n.rewind);)T<y?--T:++T;return T}function _(T){return h?(T+X)%X||0:T}function K(){for(var T=X-(F()||h&&B?1:O);m&&T-- >0;)if(u(X-1,!0)!==u(T,!0)){T++;break}return uo(T,0,X-1)}function P(T){return uo(F()?T:O*T,0,$)}function f(T){return F()?Ri(T,$):va((T>=$?X-1:T)/O)}function U(T){var le=l.toIndex(T);return b?uo(le,0,$):le}function te(T){T!==y&&(R=y,y=T)}function ce(T){return T?R:y}function F(){return!Tr(n.focus)||n.isNavigation}function ie(){return e.state.is([Oo,Cr])&&!!n.waitForTransition}return{mount:N,go:I,scroll:j,getNext:S,getPrev:M,getAdjacent:w,getEnd:K,setIndex:te,getIndex:ce,toIndex:P,toPage:f,toDest:U,hasFocus:F,isBusy:ie}}var kg="http://www.w3.org/2000/svg",Ag="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",Hr=40;function Fg(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.emit,c=n.classes,d=n.i18n,u=t.Elements,p=t.Controller,v=u.arrows,x=u.track,m=v,h=u.prev,b=u.next,S,M,y={};function $(){X(),o(hn,R)}function R(){B(),$()}function X(){var j=n.arrows;j&&!(h&&b)&&z(),h&&b&&(mr(y,{prev:h,next:b}),gr(m,j?"":"none"),Gn(m,M=Ll+"--"+n.direction),j&&(O(),I(),zt([h,b],Mr,x.id),l(Lu,h,b)))}function B(){i.destroy(),ri(m,M),S?(Ki(v?[h,b]:m),h=b=null):Xn([h,b],Il)}function O(){o([Fi,Do,ln,Ji,xa],I),r(b,"click",tn(N,">")),r(h,"click",tn(N,"<"))}function N(j){p.go(j,!0)}function z(){m=v||bo("div",c.arrows),h=C(!0),b=C(!1),S=!0,Lr(m,[h,b]),!v&&gl(m,x)}function C(j){var E='<button class="'+c.arrow+" "+(j?c.prev:c.next)+'" type="button"><svg xmlns="'+kg+'" viewBox="0 0 '+Hr+" "+Hr+'" width="'+Hr+'" height="'+Hr+'" focusable="false"><path d="'+(n.arrowPath||Ag)+'" />';return fu(E)}function I(){if(h&&b){var j=e.index,E=p.getPrev(),w=p.getNext(),L=E>-1&&j<E?d.last:d.prev,V=w>-1&&j>w?d.first:d.next;h.disabled=E<0,b.disabled=w<0,zt(h,Rn,L),zt(b,Rn,V),l(Pu,h,b,E,w)}}return{arrows:y,mount:$,destroy:B,update:I}}var Ng=fl+"-interval";function _g(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.emit,c=ka(n.interval,e.go.bind(e,">"),O),d=c.isPaused,u=t.Elements,p=t.Elements,v=p.root,x=p.toggle,m=n.autoplay,h,b,S=m==="pause";function M(){m&&(y(),x&&zt(x,Mr,u.track.id),S||$(),B())}function y(){n.pauseOnHover&&r(v,"mouseenter mouseleave",function(z){h=z.type==="mouseenter",X()}),n.pauseOnFocus&&r(v,"focusin focusout",function(z){b=z.type==="focusin",X()}),x&&r(x,"click",function(){S?$():R(!0)}),o([di,Ea,ln],c.rewind),o(di,N)}function $(){d()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),b=h=S=!1,B(),l(Sl))}function R(z){z===void 0&&(z=!0),S=!!z,B(),d()||(c.pause(),l(wl))}function X(){S||(h||b?R(!1):$())}function B(){x&&(oi(x,Qi,!S),zt(x,Rn,n.i18n[S?"play":"pause"]))}function O(z){var C=u.bar;C&&Nn(C,"width",z*100+"%"),l(Eu,z)}function N(z){var C=t.Slides.getAt(z);c.set(C&&+_n(C.slide,Ng)||n.interval)}return{mount:M,destroy:c.cancel,play:$,pause:R,isPaused:d}}function Hg(e,t,n){var i=an(e),o=i.on;function r(){n.cover&&(o($l,tn(c,!0)),o([Fi,hn,ln],tn(l,!0)))}function l(d){t.Slides.forEach(function(u){var p=Pr(u.container||u.slide,"img");p&&p.src&&c(d,p,u)})}function c(d,u,p){p.style("background",d?'center/cover no-repeat url("'+u.src+'")':"",!0),gr(u,d?"none":"")}return{mount:r,destroy:tn(l,!1)}}var Wg=10,Og=600,Dg=.6,Bg=1.5,zg=800;function jg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=e.state.set,c=t.Move,d=c.getPosition,u=c.getLimit,p=c.exceededLimit,v=c.translate,x=e.is(Lo),m,h,b=1;function S(){o(di,R),o([hn,ln],X)}function M(O,N,z,C,I){var j=d();if(R(),z&&(!x||!p())){var E=t.Layout.sliderSize(),w=Hs(O)*E*va(vn(O)/E)||0;O=c.toPosition(t.Controller.toDest(O%E))+w}var L=vu(j,O,1);b=1,N=L?0:N||ya(vn(O-j)/Bg,zg),h=C,m=ka(N,y,tn($,j,O,I),1),l(Cr),r(Ea),m.start()}function y(){l(To),h&&h(),r(Ji)}function $(O,N,z,C){var I=d(),j=O+(N-O)*B(C),E=(j-I)*b;v(I+E),x&&!z&&p()&&(b*=Dg,vn(E)<Wg&&M(u(p(!0)),Og,!1,h,!0))}function R(){m&&m.cancel()}function X(){m&&!m.isPaused()&&(R(),y())}function B(O){var N=n.easingFunc;return N?N(O):1-Math.pow(1-O,4)}return{mount:S,destroy:R,scroll:M,cancel:X}}var po={passive:!1,capture:!0};function Vg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=i.bind,c=i.unbind,d=e.state,u=t.Move,p=t.Scroll,v=t.Controller,x=t.Elements.track,m=t.Media.reduce,h=t.Direction,b=h.resolve,S=h.orient,M=u.getPosition,y=u.exceededLimit,$,R,X,B,O,N=!1,z,C,I;function j(){l(x,Ka,Ns,po),l(x,Qa,Ns,po),l(x,Xu,w,po),l(x,"click",_,{capture:!0}),l(x,"dragstart",ni),o([Fi,hn],E)}function E(){var ee=n.drag;ye(!ee),B=ee==="free"}function w(ee){if(z=!1,!C){var oe=Le(ee);Se(ee.target)&&(oe||!ee.button)&&(v.isBusy()?ni(ee,!0):(I=oe?x:window,O=d.is([Oo,Cr]),X=null,l(I,Ka,L,po),l(I,Qa,V,po),u.cancel(),p.cancel(),K(ee)))}}function L(ee){if(d.is(sa)||(d.set(sa),r(Cu)),ee.cancelable)if(O){u.translate($+J(F(ee)));var oe=ie(ee)>mc,re=N!==(N=y());(oe||re)&&K(ee),z=!0,r(Tu),ni(ee)}else U(ee)&&(O=f(ee),ni(ee))}function V(ee){d.is(sa)&&(d.set(To),r(Iu)),O&&(P(ee),ni(ee)),c(I,Ka,L),c(I,Qa,V),O=!1}function _(ee){!C&&z&&ni(ee,!0)}function K(ee){X=R,R=ee,$=M()}function P(ee){var oe=te(ee),re=ce(oe),ge=n.rewind&&n.rewindByDrag;m(!1),B?v.scroll(re,0,n.snap):e.is(Er)?v.go(S(Hs(oe))<0?ge?"<":"-":ge?">":"+"):e.is(Lo)&&N&&ge?v.go(y(!0)?">":"<"):v.go(v.toDest(re),!0),m(!0)}function f(ee){var oe=n.dragMinThreshold,re=dr(oe),ge=re&&oe.mouse||0,we=(re?oe.touch:+oe)||10;return vn(F(ee))>(Le(ee)?we:ge)}function U(ee){return vn(F(ee))>vn(F(ee,!0))}function te(ee){if(e.is(Bo)||!N){var oe=ie(ee);if(oe&&oe<mc)return F(ee)/oe}return 0}function ce(ee){return M()+Hs(ee)*Ri(vn(ee)*(n.flickPower||600),B?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function F(ee,oe){return le(ee,oe)-le(T(ee),oe)}function ie(ee){return _s(ee)-_s(T(ee))}function T(ee){return R===ee&&X||R}function le(ee,oe){return(Le(ee)?ee.changedTouches[0]:ee)["page"+b(oe?"Y":"X")]}function J(ee){return ee/(N&&e.is(Lo)?$g:1)}function Se(ee){var oe=n.noDrag;return!ur(ee,"."+Bu+", ."+Wa)&&(!oe||!ur(ee,oe))}function Le(ee){return typeof TouchEvent<"u"&&ee instanceof TouchEvent}function me(){return O}function ye(ee){C=ee}return{mount:j,disable:ye,isDragging:me}}var Gg={Spacebar:" ",Right:Na,Left:Fa,Up:Fu,Down:Nu};function Pl(e){return e=Pi(e)?e:e.key,Gg[e]||e}var gc="keydown";function Xg(e,t,n){var i=an(e),o=i.on,r=i.bind,l=i.unbind,c=e.root,d=t.Direction.resolve,u,p;function v(){x(),o(hn,m),o(hn,x),o(di,b)}function x(){var M=n.keyboard;M&&(u=M==="global"?window:c,r(u,gc,S))}function m(){l(u,gc)}function h(M){p=M}function b(){var M=p;p=!0,uu(function(){p=M})}function S(M){if(!p){var y=Pl(M);y===d(Fa)?e.go("<"):y===d(Na)&&e.go(">")}}return{mount:v,destroy:m,disable:h}}var sr=fl+"-lazy",da=sr+"-srcset",qg="["+sr+"], ["+da+"]";function Ug(e,t,n){var i=an(e),o=i.on,r=i.off,l=i.bind,c=i.emit,d=n.lazyLoad==="sequential",u=[Do,Ji],p=[];function v(){n.lazyLoad&&(x(),o(ln,x))}function x(){ci(p),m(),d?M():(r(u),o(u,h),h())}function m(){t.Slides.forEach(function(y){hl(y.slide,qg).forEach(function($){var R=_n($,sr),X=_n($,da);if(R!==$.src||X!==$.srcset){var B=n.classes.spinner,O=$.parentElement,N=Pr(O,"."+B)||bo("span",B,O);p.push([$,y,N]),$.src||gr($,"none")}})})}function h(){p=p.filter(function(y){var $=n.perPage*((n.preloadPages||1)+1)-1;return y[1].isWithin(e.index,$)?b(y):!0}),p.length||r(u)}function b(y){var $=y[0];Gn(y[1].slide,Bs),l($,"load error",tn(S,y)),zt($,"src",_n($,sr)),zt($,"srcset",_n($,da)),Xn($,sr),Xn($,da)}function S(y,$){var R=y[0],X=y[1];ri(X.slide,Bs),$.type!=="error"&&(Ki(y[2]),gr(R,""),c($l,R,X),c(Io)),d&&M()}function M(){p.length&&b(p.shift())}return{mount:v,destroy:tn(ci,p),check:h}}function Yg(e,t,n){var i=an(e),o=i.on,r=i.emit,l=i.bind,c=t.Slides,d=t.Elements,u=t.Controller,p=u.hasFocus,v=u.getIndex,x=u.go,m=t.Direction.resolve,h=d.pagination,b=[],S,M;function y(){$(),o([hn,ln,xa],y);var C=n.pagination;h&&gr(h,C?"":"none"),C&&(o([di,Ea,Ji],z),R(),z(),r(Ru,{list:S,items:b},N(e.index)))}function $(){S&&(Ki(h?Ai(S.children):S),ri(S,M),ci(b),S=null),i.destroy()}function R(){var C=e.length,I=n.classes,j=n.i18n,E=n.perPage,w=p()?u.getEnd()+1:hr(C/E);S=h||bo("ul",I.pagination,d.track.parentElement),Gn(S,M=Oa+"--"+O()),zt(S,ai,"tablist"),zt(S,Rn,j.select),zt(S,Tl,O()===_a?"vertical":"");for(var L=0;L<w;L++){var V=bo("li",null,S),_=bo("button",{class:I.page,type:"button"},V),K=c.getIn(L).map(function(f){return f.slide.id}),P=!p()&&E>1?j.pageX:j.slideX;l(_,"click",tn(X,L)),n.paginationKeyboard&&l(_,"keydown",tn(B,L)),zt(V,ai,"presentation"),zt(_,ai,"tab"),zt(_,Mr,K.join(" ")),zt(_,Rn,Ws(P,L+1)),zt(_,So,-1),b.push({li:V,button:_,page:L})}}function X(C){x(">"+C,!0)}function B(C,I){var j=b.length,E=Pl(I),w=O(),L=-1;E===m(Na,!1,w)?L=++C%j:E===m(Fa,!1,w)?L=(--C+j)%j:E==="Home"?L=0:E==="End"&&(L=j-1);var V=b[L];V&&(hu(V.button),x(">"+L),ni(I,!0))}function O(){return n.paginationDirection||n.direction}function N(C){return b[u.toPage(C)]}function z(){var C=N(v(!0)),I=N(v());if(C){var j=C.button;ri(j,Qi),Xn(j,lc),zt(j,So,-1)}if(I){var E=I.button;Gn(E,Qi),zt(E,lc,!0),zt(E,So,"")}r(Mu,{list:S,items:b},C,I)}return{items:b,mount:y,destroy:$,getAt:N,update:z}}var Kg=[" ","Enter"];function Qg(e,t,n){var i=n.isNavigation,o=n.slideFocus,r=[];function l(){e.splides.forEach(function(h){h.isParent||(u(e,h.splide),u(h.splide,e))}),i&&p()}function c(){r.forEach(function(h){h.destroy()}),ci(r)}function d(){c(),l()}function u(h,b){var S=an(h);S.on(di,function(M,y,$){b.go(b.is(Bo)?$:M)}),r.push(S)}function p(){var h=an(e),b=h.on;b(vl,x),b(ku,m),b([Fi,hn],v),r.push(h),h.emit(bl,e.splides)}function v(){zt(t.Elements.list,Tl,n.direction===_a?"vertical":"")}function x(h){e.go(h.index)}function m(h,b){ml(Kg,Pl(b))&&(x(h),ni(b))}return{setup:tn(t.Media.set,{slideFocus:Tr(o)?i:o},!0),mount:l,destroy:c,remount:d}}function Zg(e,t,n){var i=an(e),o=i.bind,r=0;function l(){n.wheel&&o(t.Elements.track,"wheel",c,po)}function c(u){if(u.cancelable){var p=u.deltaY,v=p<0,x=_s(u),m=n.wheelMinThreshold||0,h=n.wheelSleep||0;vn(p)>m&&x-r>h&&(e.go(v?"<":">"),r=x),d(v)&&ni(u)}}function d(u){return!n.releaseWheel||e.state.is(Oo)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var Jg=90;function eh(e,t,n){var i=an(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,c=bo("span",vg),d=ka(Jg,tn(p,!1));function u(){l&&(x(!t.Autoplay.isPaused()),zt(r,uc,!0),c.textContent="…",o(Sl,tn(x,!0)),o(wl,tn(x,!1)),o([Do,Ji],tn(p,!0)))}function p(m){zt(r,dc,m),m?(Lr(r,c),d.start()):(Ki(c),d.cancel())}function v(){Xn(r,[cc,uc,dc]),Ki(c)}function x(m){l&&zt(r,cc,m?"off":"polite")}return{mount:u,disable:x,destroy:v}}var th=Object.freeze({__proto__:null,Media:cg,Direction:dg,Elements:Cg,Slides:Ig,Layout:Lg,Clones:Rg,Move:Mg,Controller:Eg,Arrows:Fg,Autoplay:_g,Cover:Hg,Scroll:jg,Drag:Vg,Keyboard:Xg,LazyLoad:Ug,Pagination:Yg,Sync:Qg,Wheel:Zg,Live:eh}),nh={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"},ih={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:Sg,i18n:nh,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function oh(e,t,n){var i=t.Slides;function o(){an(e).on([Fi,ln],r)}function r(){i.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function l(c,d){i.style("transition","opacity "+n.speed+"ms "+n.easing),uu(d)}return{mount:o,start:l,cancel:Ns}}function rh(e,t,n){var i=t.Move,o=t.Controller,r=t.Scroll,l=t.Elements.list,c=tn(Nn,l,"transition"),d;function u(){an(e).bind(l,"transitionend",function(m){m.target===l&&d&&(v(),d())})}function p(m,h){var b=i.toPosition(m,!0),S=i.getPosition(),M=x(m);vn(b-S)>=1&&M>=1?n.useScroll?r.scroll(b,M,!1,h):(c("transform "+M+"ms "+n.easing),i.translate(b,!0),d=h):(i.jump(m),h())}function v(){c(""),r.cancel()}function x(m){var h=n.rewindSpeed;if(e.is(Lo)&&h){var b=o.getIndex(!0),S=o.getEnd();if(b===0&&m>=S||b>=S&&m===0)return h}return n.speed}return{mount:u,start:p,cancel:v}}var ah=(function(){function e(n,i){this.event=an(),this.Components={},this.state=sg(ho),this.splides=[],this._o={},this._E={};var o=Pi(n)?yu(document,n):n;ar(o,o+" is invalid."),this.root=o,i=Ci({label:_n(o,Rn)||"",labelledby:_n(o,Cl)||""},ih,e.defaults,i||{});try{Ci(i,JSON.parse(_n(o,fl)))}catch{ar(!1,"Invalid JSON")}this._o=Object.create(Ci({},i))}var t=e.prototype;return t.mount=function(i,o){var r=this,l=this.state,c=this.Components;ar(l.is([ho,fa]),"Already mounted!"),l.set(ho),this._C=c,this._T=o||this._T||(this.is(Er)?oh:rh),this._E=i||this._E;var d=mr({},th,this._E,{Transition:this._T});return Ui(d,function(u,p){var v=u(r,c,r._o);c[p]=v,v.setup&&v.setup()}),Ui(c,function(u){u.mount&&u.mount()}),this.emit(Fi),Gn(this.root,xg),l.set(To),this.emit(Os),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(To)&&(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(Ai(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(ln),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,r=this.state;return r.is(ho)?an(this).on(Os,this.destroy.bind(this,i)):(Ui(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(xl),o.destroy(),i&&ci(this.splides),r.set(fa)),this},ng(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})(),Rl=ah;Rl.defaults={};Rl.STATES=og;var hc=[[Fi,"onMounted"],[Os,"onReady"],[di,"onMove"],[Do,"onMoved"],[vl,"onClick"],[bu,"onActive"],[Su,"onInactive"],[wu,"onVisible"],[$u,"onHidden"],[ln,"onRefresh"],[hn,"onUpdated"],[Io,"onResize"],[Ma,"onResized"],[Cu,"onDrag"],[Tu,"onDragging"],[Iu,"onDragged"],[Ea,"onScroll"],[Ji,"onScrolled"],[xl,"onDestroy"],[Lu,"onArrowsMounted"],[Pu,"onArrowsUpdated"],[Ru,"onPaginationMounted"],[Mu,"onPaginationUpdated"],[bl,"onNavigationMounted"],[Sl,"onAutoplayPlay"],[Eu,"onAutoplayPlaying"],[wl,"onAutoplayPause"],[$l,"onLazyLoadLoaded"]];function Ml(...e){return e.filter(Boolean).join(" ")}function ba(e){return e!==null&&typeof e=="object"}function zs(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!zs(n,t[i]));if(ba(e)&&ba(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!zs(e[o],t[o]))}return e===t}function sh(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function lh(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 js(e,t){const n=e;return lh(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():ba(i)?n[o]=js(ba(n[o])?n[o]:{},i):n[o]=i}),n}var ch=({children:e,className:t,...n})=>s.createElement("div",{className:Ml("splide__track",t),...n},s.createElement("ul",{className:"splide__list"},e)),El=class extends s.Component{constructor(){super(...arguments),this.splideRef=s.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Rl(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=js({},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&&!zs(this.options,e)&&(this.splide.options=e,this.options=js({},e));const t=this.getSlides();sh(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){hc.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:i,...o}=this.props;return s.createElement(t,{className:Ml("splide",e),ref:this.splideRef,...this.omit(o,["options",...hc.map(r=>r[1])])},n?s.createElement(ch,null,i):i)}},kl=({children:e,className:t,...n})=>s.createElement("li",{className:Ml("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 oh="RichTextRenderer-module__link___BWeZ2",rh={link:oh},ah=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(i=>/^\d/.test(i))},Do=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>ah(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function un(e){const{color:t,...n}=e;return n}function en(e,t){var o,r,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Do(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:k.scalingValue(e.letterSpacing,t),wordSpacing:k.scalingValue(e.wordSpacing,t),fontSize:k.scalingValue(n,t),lineHeight:i!==void 0?k.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(r=e.textAppearance)==null?void 0:r.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}function Bu(e){return e!=null&&e.length?e.some(t=>t.type==="link"?Bu(t.children):!!t.text):!1}const Yi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?a.jsx("a",{className:rh.link,href:i.value,target:i.target,children:t(i.children)},o):a.jsx("span",{style:sh(i),children:i.text},o));return a.jsx(a.Fragment,{children:e.map((n,i)=>{const o=n.children;return a.jsx("div",{children:Bu(o)?t(o):" "},i)})})};function sh(e){return{...e.fontFamily&&{fontFamily:Do(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const lh="SvgImage-module__svg___q3xE-",ch="SvgImage-module__img___VsTm-",fc={svg:lh,img:ch},Za=new Map;function yr(e){return e.startsWith("data:")||e.startsWith("blob:")}function zu(e){if(yr(e))return Promise.resolve(e);const t=Za.get(e);if(t)return t;const n=fetch(e,{mode:"cors",cache:"reload"}).then(i=>{if(!i.ok)throw new Error(String(i.status));return i.blob()}).then(i=>URL.createObjectURL(i)).catch(i=>{throw Za.delete(e),i});return Za.set(e,n),n}const dh=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},uh=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,mn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[r,l]=s.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")')),[c,d]=s.useState(()=>yr(e)?e:null);return s.useEffect(()=>{if(typeof window<"u"&&window.CSS){const u=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(u)}},[]),s.useEffect(()=>{if(!dh(e)){d(null);return}if(yr(e)){d(e);return}let u=!1;return zu(e).then(p=>{u||d(p)}).catch(()=>{u||d(null)}),()=>{u=!0}},[e]),!c||!r?a.jsx("img",{src:e,alt:"",className:Pt(fc.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:Pt(fc.svg,i),style:{"--svg":uh(c),"--fill":t,"--hover-fill":n,...o??{}}})},ph={"top-left":It.topLeftAlignment,"top-center":It.topCenterAlignment,"top-right":It.topRightAlignment,"middle-left":It.middleLeftAlignment,"middle-center":It.middleCenterAlignment,"middle-right":It.middleRightAlignment,"bottom-left":It.bottomLeftAlignment,"bottom-center":It.bottomCenterAlignment,"bottom-right":It.bottomRightAlignment};function mh({settings:e,content:t,styles:n,isEditor:i}){const[o,r]=s.useState(null),{widthSettings:l,fontSettings:c,letterSpacing:d,textAlign:u,wordSpacing:p,fontSizeLineHeight:v,textAppearance:b,color:m}=n.imageCaption??{},[h,x]=s.useState(void 0),[S,P]=s.useState(null),[f,w]=s.useState(0),[N,V]=s.useState(0),{direction:B,transition:H,controls:_,pagination:z,imageCaption:$,triggers:E}=e,j=s.useRef(H.type),{x:L,y:C}=e.controls.offset,T=G=>{o&&o.go(G)};return s.useEffect(()=>{if(!S)return;const G=new ResizeObserver(A=>{if(!o)return;const[Y]=A;x({width:Math.round(Y.contentRect.width),height:Math.round(Y.contentRect.height)})});return G.observe(S),()=>G.unobserve(S)},[S]),s.useEffect(()=>{!o||j.current===H.type||(V(G=>G+1),j.current=H.type)},[H.type]),a.jsx("div",{className:Pt(It.wrapper,{[It.editor]:i}),ref:P,children:a.jsxs("div",{className:It.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:H.backgroundColor&&H.type==="fade in"?H.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Pt(It.captionBlock),children:a.jsx("div",{className:It.captionTextWrapper,children:t.map((G,A)=>a.jsx("div",{className:Pt(It.captionText,ph[$.alignment],{[It.withPointerEvents]:A===f&&i,[It.active]:A===f}),style:{fontFamily:Do(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:l.sizing==="auto"?"max-content":k.scalingValue(l.width,i),letterSpacing:k.scalingValue(d,i),wordSpacing:k.scalingValue(p,i),textAlign:u,fontSize:k.scalingValue(v.fontSize,i),lineHeight:k.scalingValue(v.lineHeight,i),textTransform:b.textTransform??"none",textDecoration:b.textDecoration??"none",fontVariant:b.fontVariant??"normal",color:m,transitionDuration:H.duration?`${Math.round(parseInt(H.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:It.captionTextInner,style:{"--link-hover-color":$.linkHoverColor,"--link-color":$.linkColor,position:"relative",top:k.scalingValue($.offset.y,i),left:k.scalingValue($.offset.x,i)},children:a.jsx(Yi,{content:G.imageCaption})})},A))})}),a.jsx(El,{onMove:G=>{w(G.index)},ref:r,options:{arrows:!1,speed:H.duration?parseInt(H.duration):500,autoplay:E.autoPlay!==null,...E.autoPlay!==null&&{interval:parseInt(E.autoPlay)*1e3},direction:B==="horiz"||H.type==="fade in"?"ltr":"ttb",pagination:!1,drag:E.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:H.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((G,A)=>a.jsx(kl,{children:a.jsx("div",{className:It.sliderItem,children:a.jsx("div",{className:It.imgWrapper,children:a.jsx("img",{className:Pt(It.sliderImage,{[It.contain]:G.image.objectFit==="contain",[It.cover]:G.image.objectFit==="cover"}),src:G.image.assetId,alt:G.image.name??""})})})},A))},N),_.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Pt(It.arrow,{[It.arrowVertical]:B==="vert",[It.hoverArrow]:_.show==="on hover"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:a.jsxs("button",{onClick:()=>{T("-1")},className:It.arrowInner,style:{transform:`translate(${k.scalingValue(L,i)}, ${k.scalingValue(C*(B==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:[_.arrowsImgUrl&&a.jsx(mn,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:Pt(It.arrowImg,It.mirror)}),!_.arrowsImgUrl&&a.jsx(yc,{color:_.color,className:Pt(It.arrowIcon,It.arrowImg,It.mirror)})]})}),a.jsx("div",{className:Pt(It.arrow,It.nextArrow,{[It.arrowVertical]:B==="vert",[It.hoverArrow]:_.show==="on hover"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:a.jsxs("button",{className:It.arrowInner,onClick:()=>T("+1"),style:{transform:`translate(${k.scalingValue(L*(B==="horiz"?-1:1),i)}, ${k.scalingValue(C,i)}) scale(${e.controls.scale/100}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:[_.arrowsImgUrl&&a.jsx(mn,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:It.arrowImg}),!_.arrowsImgUrl&&a.jsx(yc,{color:_.color,className:Pt(It.arrowIcon,It.arrowImg)})]})})]}),E.triggersList.click&&a.jsx("div",{className:It.clickOverlay,onClick:()=>{o&&o.go("+1")}}),z.isActive&&a.jsx("div",{className:Pt(It.pagination,{[It.paginationInsideBottom]:z.position==="inside-1"&&B==="horiz",[It.paginationInsideTop]:z.position==="inside-2"&&B==="horiz",[It.paginationOutsideBottom]:z.position==="outside-1"&&B==="horiz",[It.paginationOutsideTop]:z.position==="outside-2"&&B==="horiz",[It.paginationInsideLeft]:z.position==="inside-1"&&B==="vert",[It.paginationInsideRight]:z.position==="inside-2"&&B==="vert",[It.paginationOutsideLeft]:z.position==="outside-1"&&B==="vert",[It.paginationOutsideRight]:z.position==="outside-2"&&B==="vert",[It.paginationVertical]:B==="vert"}),children:a.jsx("div",{className:It.paginationInner,style:{backgroundColor:z.colors[2],transform:`scale(${z.scale/100}) translate(${k.scalingValue(z.offset.x,i)}, ${k.scalingValue(z.offset.y,i)}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:t.map((G,A)=>a.jsx("button",{onClick:()=>{o&&o.go(A)},className:Pt(It.paginationItem),children:a.jsx("div",{className:Pt(It.dot,{[It.activeDot]:A===f}),style:{backgroundColor:A===f?z.colors[0]:z.colors[1],"--pagination-hover-color":z.hover}})},A))})})]})})}function yc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const gh={element:mh,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.assetId",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:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XES6E7GVC0H3KJ2RH6",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEAZ8H1DTC5V1S554K",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEDRP49HNTEPNZYQTP",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"]}},hh="ImageRevealSlider-module__imageRevealSlider___UE5Ob",fh="ImageRevealSlider-module__image___Qjt-e",yh="ImageRevealSlider-module__link___N-iLG",vh="ImageRevealSlider-module__cursor___2U03d",no={imageRevealSlider:hh,image:fh,link:yh,cursor:vh};function vc(e,t,n){for(const i of n){const o=new Image;o.src=i.assetId;const r=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*r,c=r/2,d=l/2;if(e>=i.x-c&&e<=i.x+c&&t>=i.y-d&&t<=i.y+d)return!0}return!1}function Ja(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function xh(e,t,n,i){let o,r;if(t==="custom"){o=n;const l=await Ja(e);r=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await Ja(e);r=l.height/l.width*o}else{const l=await Ja(e);o=l.width,r=l.height}return{width:o,height:r,finalWidth:`${o}px`}}function bh({settings:e,content:t,isEditor:n}){const[i,o]=s.useState(null),[r,l]=s.useState([]),[c,d]=s.useState(0),u=s.useRef(0),[p,v]=s.useState({x:0,y:0}),[b,m]=s.useState(1),[h,x]=s.useState("none"),S=s.useRef({x:0,y:0}),[P,f]=s.useState(!1),{sizeType:w,imageWidth:N,randomRangeImageWidth:V}=e.imageSize,{revealPosition:B,visible:H}=e.position,{cursorType:_,target:z,defaultCursorScale:$,defaultCursor:E,hoverCursorScale:j,hoverCursor:L}=e.cursor;s.useEffect(()=>{if(!i)return;const G=(R,y)=>{const U=i.getBoundingClientRect(),ee=R-U.left,de=y-U.top;if(v({x:ee,y:de}),_==="system"){x("none"),m(1);return}const F=ee,ie=de,I=document.elementFromPoint(U.left+F,U.top+ie);if(I&&I.closest("a")){x("none"),m(1);return}const se=vc(F,ie,r)||z==="area"?{img:L??"none",scale:j}:{img:E??"none",scale:$};x(se.img),m(se.scale)},A=R=>{R.stopPropagation(),S.current={x:R.clientX,y:R.clientY},G(R.clientX,R.clientY)},Y=()=>{P&&G(S.current.x,S.current.y)};return i.addEventListener("mousemove",A),window.addEventListener("scroll",Y,!0),()=>{i.removeEventListener("mousemove",A),window.removeEventListener("scroll",Y,!0)}},[i,P,p,_,z,L,E,j,$,r]),s.useEffect(()=>{P||(x("none"),m(0))},[P]);const C=async(G,A,Y,R={})=>{const{width:y,height:U,finalWidth:ee}=await xh(G.image.assetId,w,N,V);let de=0,F=0;B==="same"?(de=A/2,F=Y/2):(de=R.x??Math.random()*A,F=R.y??Math.random()*Y);const ie=Math.min(Math.max(de,y/2),A-y/2),I=Math.min(Math.max(F,U/2),Y-U/2);return{id:u.current++,assetId:G.image.assetId,link:G.link,name:G.image.name,x:ie,y:I,width:ee}};s.useEffect(()=>{if(!i||t.length===0)return;const G=i.getBoundingClientRect(),A=G.width,Y=G.height,R=[];(async()=>{const U=t[0],ee=await C(U,A,Y);R.push(ee),l(R),d(1)})()},[w,N,V,B,i]),s.useEffect(()=>{H==="last One"&&l(G=>G.length>0?[G[G.length-1]]:[])},[H]);const T=async G=>{if(!i)return;const A=i.getBoundingClientRect(),Y=G.clientX-A.left,R=G.clientY-A.top;if(z==="image"&&!vc(Y,R,r))return;let y=0,U=0;B==="on Click"?(y=Y,U=R):B==="same"?(y=A.width/2,U=A.height/2):(y=Math.random()*A.width,U=Math.random()*A.height);const ee=t[c],de=await C(ee,A.width,A.height,{x:y,y:U});l(F=>H==="all"?[...F,de]:[de]),d(F=>F>=t.length-1?0:F+1)};return a.jsxs("div",{ref:o,onClick:T,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:no.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[r.map(G=>a.jsx("div",{className:no.wrapper,style:{top:`${G.y}px`,left:`${G.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:G.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:z==="area"&&G.link?a.jsx("a",{href:G.link,target:"_blank",className:no.link,children:a.jsx("img",{src:G.assetId,alt:G.name,className:no.image},G.id)}):a.jsx("img",{src:G.assetId,alt:G.name,className:no.image},G.id)},G.id)),P&&a.jsx("div",{className:no.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${b})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Sh={element:bh,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.assetId",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:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XGWBJY3AQQ71GC2Z6Q",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",assetId:"01M3QM74XGMXS1Z5ZY2RFGS3T4",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",assetId:"01M3QM74XGWG6VCHNEXKVKAJGT",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",assetId:"01M3QM74XGCVMTPNHFHMR98RPZ",name:"Slider-4.png"},link:""}]}}}},wh="LightBox-module__hidden___9s-9x",$h="LightBox-module__heroImage___sTxNF",Ch="LightBox-module__background___rm9ml",Th="LightBox-module__editor___4ACaY",Ih="LightBox-module__contentStyle___Bgnsq",Lh="LightBox-module__imageStyle___tLIlB",Ph="LightBox-module__imgWrapper___LuFUp",Rh="LightBox-module__contain___8-yaS",Mh="LightBox-module__cover___hNvOG",Eh="LightBox-module__caption___b6L2I",kh="LightBox-module__captionTextInner___rCGNH",Ah="LightBox-module__lightboxSplide___XFuWC",Fh="LightBox-module__arrow___iz38X",Nh="LightBox-module__arrowVertical___Zfz81",_h="LightBox-module__nextArrow___zkAQN",Hh="LightBox-module__arrowInner___p48sW",Wh="LightBox-module__arrowIcon___3VaFf",Oh="LightBox-module__arrowImg___pNV88",Dh="LightBox-module__mirror___pjeXc",Bh="LightBox-module__thumbsWrapper___GB-nU",zh="LightBox-module__thumbsContainerVertical___wttk5",jh="LightBox-module__thumbsContainer___osSma",Vh="LightBox-module__thumbsAlignStart___MO6tY",Gh="LightBox-module__thumbsAlignCenter___Q4sUx",Xh="LightBox-module__thumbsAlignEnd___p4y9R",Uh="LightBox-module__thumbItem___HvnF3",qh="LightBox-module__closeButton___g2khP",Yh="LightBox-module__fadeIn___0m5GW",Kh="LightBox-module__slideInLeft___gPYwC",Qh="LightBox-module__slideInRight___S-pPp",Zh="LightBox-module__slideInTop___DFdAj",Jh="LightBox-module__slideInBottom___m27kZ",ef="LightBox-module__fadeOut___55qBR",tf="LightBox-module__slideOutLeft___NvU7P",nf="LightBox-module__slideOutRight___SK7eC",of="LightBox-module__slideOutTop___Vgg0z",rf="LightBox-module__slideOutBottom___nJ0Ef",af="LightBox-module__scaleSlide___vZriG",at={hidden:wh,heroImage:$h,background:Ch,editor:Th,contentStyle:Ih,imageStyle:Lh,imgWrapper:Ph,contain:Rh,cover:Mh,caption:Eh,captionTextInner:kh,lightboxSplide:Ah,arrow:Fh,arrowVertical:Nh,nextArrow:_h,arrowInner:Hh,arrowIcon:Wh,arrowImg:Oh,mirror:Dh,thumbsWrapper:Bh,thumbsContainerVertical:zh,thumbsContainer:jh,thumbsAlignStart:Vh,thumbsAlignCenter:Gh,thumbsAlignEnd:Xh,thumbItem:Uh,closeButton:qh,fadeIn:Yh,slideInLeft:Kh,slideInRight:Qh,slideInTop:Zh,slideInBottom:Jh,fadeOut:ef,slideOutLeft:tf,slideOutRight:nf,slideOutTop:of,slideOutBottom:rf,scaleSlide:af},Wr=(e,t,n)=>{const i={},[o,r]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),r==="left"?(i.left="0",i.right="auto"):r==="center"?(i.left="50%",i.right="auto"):r==="right"&&(i.left="auto",i.right="0"),o==="middle"&&r==="center"?i.transform=`translate(calc(-50% + ${k.scalingValue(t.x,n)}), calc(-50% + ${k.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${k.scalingValue(t.x,n)}, calc(-50% + ${k.scalingValue(t.y,n)}))`:r==="center"?i.transform=`translate(calc(-50% + ${k.scalingValue(t.x,n)}), ${k.scalingValue(t.y,n)})`:i.transform=`translate(${k.scalingValue(t.x,n)}, ${k.scalingValue(t.y,n)})`,i};function ju(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 sf(e){const t=e.trim().split(/\s+/),n=i=>{if(i.endsWith("%"))return parseFloat(i)/100;switch(i){case"left":case"top":return 0;case"right":case"bottom":return 1;case"center":return .5;default:return .5}};if(t.length===1){const i=t[0];return i==="center"?{x:.5,y:.5}:i==="top"||i==="bottom"?{x:.5,y:n(i)}:i==="left"||i==="right"?{x:n(i),y:.5}:{x:n(i),y:.5}}return{x:n(t[0]),y:n(t[1])}}function Vu(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const c=e;return{renderedW:c,renderedH:c/r}}const l=t;return{renderedW:l*r,renderedH:l}}function lf(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const c=t;return{renderedW:c*r,renderedH:c}}const l=e;return{renderedW:l,renderedH:l/r}}function Gu(e,t,n,i,o){const{x:r,y:l}=sf(o);return{offsetX:r*(e-n),offsetY:l*(t-i)}}function cf(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height;if(!n||!i)return"center center";const o=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,r=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:l,objectPosition:c}=window.getComputedStyle(e),d=l==="cover"?lf:Vu,{renderedW:u,renderedH:p}=d(n,i,o,r),{offsetX:v,offsetY:b}=Gu(n,i,u,p,c),m=(v+u/2)/n*100,h=(b+p/2)/i*100;return`${m}% ${h}%`}function df(e){return cf(e)}function Sa(e){const t=e.getBoundingClientRect(),n=ju(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),r=e.naturalWidth,l=e.naturalHeight,{renderedW:c,renderedH:d}=Vu(i,o,r,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:v}=Gu(i,o,c,d,u),b=t.left+n.left,m=t.top+n.top;return{x:p+b,y:v+m,width:c,height:d}}function xc(e){const t=e.getBoundingClientRect(),n=ju(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function uf(e,t){const n=(()=>{if(e==="fade in")return at.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return at.slideInLeft;case"right":return at.slideInRight;case"top":return at.slideInTop;case"bottom":return at.slideInBottom;default:return at.slideInRight}return at.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return at.fadeIn;if(e==="slide in")switch(t){case"left":return at.slideInLeft;case"right":return at.slideInRight;case"top":return at.slideInTop;case"bottom":return at.slideInBottom;default:return at.slideInRight}return at.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return at.fadeOut;if(e==="slide in")switch(t){case"left":return at.slideOutLeft;case"right":return at.slideOutRight;case"top":return at.slideOutTop;case"bottom":return at.slideOutBottom;default:return at.slideOutRight}return at.fadeOut})(),r=(()=>{if(e==="fade in")return at.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return at.slideOutLeft;case"right":return at.slideOutRight;case"top":return at.slideOutTop;case"bottom":return at.slideOutBottom;default:return at.slideOutRight}return at.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:r}}const pf=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:r,isPreviewMode:l})=>{const[c,d]=s.useState(!1),{assetId:u}=e.thumbnailBlock.cover;return s.useEffect(()=>{o==="close"&&d(!1),o==="open"&&d(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:u,alt:"Cover",className:at.heroImage,onClick:()=>d(!0)}),a.jsx(mf,{isOpen:c,onClose:()=>d(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},mf=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:r,isEditor:l,metadata:c})=>{var we;const{widthSettings:d,fontSettings:u,letterSpacing:p,textAlign:v,wordSpacing:b,fontSizeLineHeight:m,textAppearance:h,color:x}=i.imageCaption??{},[S,P]=s.useState(0),[f,w]=s.useState(0),[N,V]=s.useState(!1),[B,H]=s.useState(!1),[_,z]=s.useState({}),$=s.useRef(null),E=s.useRef(null),j=s.useRef(null),L=s.useRef(!1),C=s.useRef(null),T=s.useRef(null),G=s.useRef(null),A=s.useRef(null),Y=s.useRef(!1),R=s.useRef(null),[y,U]=s.useState(!1),{appear:ee,triggers:de,slider:F,thumbnail:ie,controls:I,area:se,caption:J,layout:Se}=o.lightboxBlock,{appearClass:Re,backdropAppearClass:pe,backdropDisappearClass:he,disappearClass:te}=uf(ee.type,ee.direction),le=(c==null?void 0:c.itemId)??null;s.useEffect(()=>{const g=()=>{setTimeout(()=>{var Z,ne;(ne=(Z=$.current)==null?void 0:Z.splide)==null||ne.refresh()},16)},X=()=>{w(Z=>Z+1)};return window.addEventListener("ArticleEditor.Layout:change",g),window.addEventListener("ArticleEditor.ComponentContent:change",X),()=>{window.removeEventListener("ArticleEditor.Layout:change",g),window.removeEventListener("ArticleEditor.ComponentContent:change",X)}},[]),s.useEffect(()=>{if(!e||!ie.isActive){U(!1);return}const g=R.current;if(!g)return;const X=()=>{F.direction==="horiz"?U(g.scrollWidth>g.clientWidth):U(g.scrollHeight>g.clientHeight)};X();const Z=new ResizeObserver(X);return Z.observe(g),()=>Z.disconnect()},[e,ie.isActive,n.length,_,F.direction]);const re=s.useCallback(()=>{const g=window.matchMedia("(max-width: 768px)").matches,X=k.getColorAlpha(se.color);g&&!l&&X>.9&&(document.body.style.backgroundColor=""),V(!0),L.current=!0;const Z=ne=>{ne.target===C.current&&ne.animationName&&(C.current&&T.current&&C.current.removeEventListener("animationend",T.current),T.current=null,L.current&&(L.current=!1,t()),V(!1))};C.current&&(T.current=Z,C.current.addEventListener("animationend",Z))},[t,se.color,l]),fe=(g,X,Z)=>{var ne,ye;if(g){if(de.type==="click"&&de.switch==="image")de.repeat==="close"&&S===n.length-1?re():(ne=$.current)==null||ne.go("+1");else if(de.type==="click"&&de.switch==="50/50"){const K=g.getBoundingClientRect(),D=X-K.left,ce=Z-K.top,q=K.width,ue=K.height;let W;F.direction==="horiz"?W=D<q/2?"-1":"+1":W=ce<ue/2?"-1":"+1",(ye=$.current)==null||ye.go(W)}}},xe=g=>{if(Y.current){Y.current=!1;return}const X=n[S],Z=(X==null?void 0:X.image.objectFit)==="cover";let ne,ye;if("changedTouches"in g&&g.changedTouches.length>0)ne=g.changedTouches[0].clientX,ye=g.changedTouches[0].clientY;else if("clientX"in g)ne=g.clientX,ye=g.clientY;else return;let K;if(Z&&j.current){const D=xc(j.current);K=ne>=D.left&&ne<=D.right&&ye>=D.top&&ye<=D.bottom}else{const D=j.current?Sa(j.current):null;if(!D){g.target===g.currentTarget&&re();return}K=ne>=D.x&&ne<=D.x+D.width&&ye>=D.y&&ye<=D.y+D.height}K?fe(j.current,ne,ye):re()},Te=g=>{const X=g.target;(X.classList.contains(at.thumbsWrapper)||X.classList.contains(at.thumbsContainer))&&xe(g)};s.useEffect(()=>{if(!e)return;const g=X=>{var Z,ne;if(X.key==="Escape"){re();return}if(X.key==="ArrowRight"){P(ye=>(ye+1)%Math.max(n.length,1)),(Z=$.current)==null||Z.go("+1");return}X.key==="ArrowLeft"&&(P(ye=>(ye-1+Math.max(n.length,1))%Math.max(n.length,1)),(ne=$.current)==null||ne.go("-1"))};return window.addEventListener("keydown",g),()=>{window.removeEventListener("keydown",g)}},[e,re,n.length]),s.useEffect(()=>{if(e){if(P(0),w(X=>X+1),L.current=!1,V(!1),H(!1),z({}),!le)return;const g=new CustomEvent("page-overlay",{detail:{itemId:le}});window.dispatchEvent(g)}return()=>{C.current&&T.current&&(C.current.removeEventListener("animationend",T.current),T.current=null),H(!1)}},[e,le]),s.useEffect(()=>{E.current!==null&&E.current!==F.type&&w(g=>g+1),E.current=F.type},[F.type]),s.useEffect(()=>{if(!e)return;const g=document.body.style.overflow,X=window.matchMedia("(max-width: 768px)").matches,Z=k.getColorAlpha(se.color);document.body.style.overflow="hidden",H(!1);const ne=K=>{K.target===C.current&&!L.current&&K.animationName&&(X&&!l&&Z>.9&&(document.body.style.backgroundColor=se.color),H(!0),C.current&&G.current&&C.current.removeEventListener("animationend",G.current),G.current=null)};C.current&&(G.current=ne,C.current.addEventListener("animationend",ne));const ye=K=>{const D=K.target;D&&(D.closest(`.${at.thumbsWrapper}`)||D.closest(`.${at.thumbsContainer}`))||F.type!=="slide"&&K.preventDefault()};return document.addEventListener("touchmove",ye,{passive:!1}),()=>{document.body.style.overflow=g,document.removeEventListener("touchmove",ye),C.current&&G.current&&(C.current.removeEventListener("animationend",G.current),G.current=null),H(!1)}},[e,l,se.color,F.type]),s.useEffect(()=>{if(!e)return;const g=X=>{var ne,ye;if(L.current){X.stopPropagation();return}if(Y.current){Y.current=!1;return}const Z=X.target;if(!(Z&&(Z.closest(`.${at.thumbsContainer}`)||Z.closest(`.${at.thumbItem}`)||Z.closest(`.${at.arrow}`)||Z.closest(`.${at.closeButton}`)||Z.closest(`.${at.caption}`)))){if(F.type==="slide"&&de.type==="drag"&&((ye=(ne=$.current)==null?void 0:ne.splide)!=null&&ye.root)){const K=$.current.splide.root;if(Z&&(K.contains(Z)||K===Z))return}if(X.touches.length===0&&X.changedTouches.length>0){const K=n[S],D=(K==null?void 0:K.image.objectFit)==="cover",ce=X.changedTouches[0];let q;if(D&&j.current){const ue=xc(j.current);q=ce.clientX>=ue.left&&ce.clientX<=ue.right&&ce.clientY>=ue.top&&ce.clientY<=ue.bottom}else{const ue=j.current?Sa(j.current):null;if(!ue)return;q=ce.clientX>=ue.x&&ce.clientX<=ue.x+ue.width&&ce.clientY>=ue.y&&ce.clientY<=ue.y+ue.height}if(!q){X.stopPropagation(),L.current=!0;const ue=W=>{W.stopPropagation(),W.preventDefault(),document.removeEventListener("click",ue,!0)};document.addEventListener("click",ue,!0),re()}}}};return document.addEventListener("touchend",g,{passive:!0}),()=>{document.removeEventListener("touchend",g)}},[e,re,S,n]);const me=(F.type==="scale"||F.type==="fade")&&F.direction==="vert"&&de.type==="drag";s.useEffect(()=>{var W,Le;if(!e||!me||!((Le=(W=$.current)==null?void 0:W.splide)!=null&&Le.root))return;const g=$.current.splide.root,X=30,Z=(ae,Q)=>{if(A.current){const Ne=Math.abs(ae-A.current.x),Oe=Math.abs(Q-A.current.y);(Ne>0||Oe>0)&&(Y.current=!0)}},ne=ae=>{A.current&&(ae.preventDefault(),Z(ae.clientX,ae.clientY))},ye=ae=>{A.current&&ae.touches.length>0&&(ae.preventDefault(),Z(ae.touches[0].clientX,ae.touches[0].clientY))},K=(ae,Q)=>{if(!A.current||!$.current){A.current=null;return}const Ne=Math.abs(ae-A.current.x),Oe=Math.abs(Q-A.current.y);Oe>X&&Oe>Ne&&$.current.go(Q<A.current.y?"+1":"-1"),A.current=null},D=ae=>{A.current&&K(ae.clientX,ae.clientY),document.removeEventListener("pointerup",D),document.removeEventListener("pointercancel",D),document.removeEventListener("pointermove",ne)},ce=ae=>{if(A.current){if(ae.changedTouches.length>0){const Q=ae.changedTouches[0];K(Q.clientX,Q.clientY)}document.removeEventListener("touchend",ce),document.removeEventListener("touchcancel",ce),document.removeEventListener("touchmove",ye)}},q=ae=>{A.current={x:ae.clientX,y:ae.clientY},Y.current=!1,document.addEventListener("pointermove",ne,{passive:!1}),document.addEventListener("pointerup",D),document.addEventListener("pointercancel",D)},ue=ae=>{ae.touches.length>0&&(A.current={x:ae.touches[0].clientX,y:ae.touches[0].clientY},Y.current=!1,document.addEventListener("touchmove",ye,{passive:!1}),document.addEventListener("touchend",ce),document.addEventListener("touchcancel",ce))};return g.addEventListener("pointerdown",q),g.addEventListener("touchstart",ue),()=>{g.removeEventListener("pointerdown",q),g.removeEventListener("touchstart",ue),document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",D),document.removeEventListener("pointercancel",D),document.removeEventListener("touchmove",ye),document.removeEventListener("touchend",ce),document.removeEventListener("touchcancel",ce),A.current=null,Y.current=!1}},[e,me,f]);const be={backgroundColor:se.color,backdropFilter:`blur(${se.blur}px)`,animationDuration:`${parseInt(ee.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(r)?null:Xn.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l?null:C,className:Pt(at.background,N?he:pe,{[at.editor]:l},{[at.hidden]:!e}),style:{...be,...B&&!l&&!N?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?C:null,className:Pt(at.contentStyle,N?te:Re,{[at.editor]:l},{[at.hidden]:!e}),style:{animationDuration:`${parseInt(ee.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(El,{onMove:g=>P(g.index),ref:$,className:at.lightboxSplide,options:{arrows:!1,speed:F.duration?parseInt(F.duration):500,direction:F.direction==="horiz"||F.type==="fade"||F.type==="scale"?"ltr":"ttb",pagination:!1,drag:de.type==="drag"&&!me,perPage:1,width:"100%",height:"100%",type:F.type==="fade"||F.type==="scale"?"fade":"loop",padding:0,rewind:de.repeat!=="close",start:0},style:{"--splide-speed":F.duration},children:n.map((g,X)=>{const Z=Wr(Se.position,Se.offset,l),ne=`${k.scalingValue(Se.padding.top,l)} ${k.scalingValue(Se.padding.right,l)} ${k.scalingValue(Se.padding.bottom,l)} ${k.scalingValue(Se.padding.left,l)}`,ye=F.type==="scale"?(()=>{const{transform:K,...D}=Z;return{...D,position:"absolute",padding:ne,boxSizing:"border-box","--position-transform":K||"none"}})():{...Z,position:"absolute",padding:ne,boxSizing:"border-box"};return a.jsx(kl,{children:a.jsx("div",{className:at.imgWrapper,onClick:xe,children:a.jsx("img",{ref:X===S?j:null,className:Pt(at.imageStyle,{[at.contain]:g.image.objectFit==="contain",[at.cover]:g.image.objectFit==="cover",[at.scaleSlide]:F.type==="scale"}),src:g.image.assetId,alt:g.image.name??"",style:{...ye,pointerEvents:g.image.objectFit==="contain"?"none":"auto"}})})},X)})},f),I.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Pt(at.arrow,{[at.arrowVertical]:F.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:a.jsxs("button",{className:at.arrowInner,style:{transform:`translate(${k.scalingValue(I.offset.x,l)}, ${k.scalingValue(I.offset.y*(F.direction==="horiz"?1:-1),l)}) scale(${I.scale}) rotate(${F.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var g;return(g=$.current)==null?void 0:g.go("-1")},"aria-label":"Previous",children:[I.arrowsImgUrl&&a.jsx(mn,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:Pt(at.arrowImg,at.mirror)}),!I.arrowsImgUrl&&a.jsx(bc,{color:I.color,className:Pt(at.arrowIcon,at.arrowImg,at.mirror)})]})}),a.jsx("div",{className:Pt(at.arrow,at.nextArrow,{[at.arrowVertical]:F.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:a.jsxs("button",{className:at.arrowInner,style:{transform:`translate(${k.scalingValue(I.offset.x*(F.direction==="horiz"?-1:1),l)}, ${k.scalingValue(I.offset.y,l)}) scale(${I.scale}) rotate(${F.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var g;return(g=$.current)==null?void 0:g.go("+1")},"aria-label":"Next",children:[I.arrowsImgUrl&&a.jsx(mn,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:at.arrowImg}),!I.arrowsImgUrl&&a.jsx(bc,{color:I.color,className:Pt(at.arrowIcon,at.arrowImg)})]})})]}),se.closeIconUrl&&(()=>{const g=Wr(se.closeIconAlign,se.closeIconOffset,l),X=`scale(${se.closeIconScale})`,Z=g.transform?`${g.transform} ${X}`:X;return a.jsx("button",{className:at.closeButton,style:{...g,transform:Z},onClick:re,"aria-label":"Close lightbox",children:a.jsx(mn,{url:se.closeIconUrl,fill:se.closeIconColor??"#000000",hoverFill:se.closeIconHover??"#cccccc"})})})(),J&&J.isActive&&i.imageCaption&&((we=n[S])==null?void 0:we.imageCaption)&&a.jsx("div",{className:at.caption,style:{...Wr(J.alignment,J.offset,l),fontFamily:Do(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:d.sizing==="auto"?"max-content":k.scalingValue(d.width,l),letterSpacing:k.scalingValue(p,l),wordSpacing:k.scalingValue(b,l),textAlign:v,fontSize:k.scalingValue(m.fontSize,l),lineHeight:k.scalingValue(m.lineHeight,l),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:x},onClick:g=>g.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:at.captionTextInner,style:{"--link-color":J.linkColor,"--link-hover-color":J.linkHoverColor},children:a.jsx(Yi,{content:n[S].imageCaption})})}),ie.isActive&&(()=>{const[g,X]=ie.position.split("-"),Z=F.direction==="horiz"?`${g}-left`:ie.position,ne=Wr(Z,ie.offset,l),ye=()=>{if(F.direction==="horiz"){if(X==="left")return"flex-start";if(X==="center")return"center";if(X==="right")return"flex-end"}else{if(g==="top")return"flex-start";if(g==="middle")return"center";if(g==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:R,className:at.thumbsWrapper,onClick:K=>Te(K),style:{position:l?"absolute":"fixed",...ne,...F.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Pt(at.thumbsContainer,{[at.thumbsContainerVertical]:F.direction==="vert",[at.thumbsAlignStart]:ie.align==="start",[at.thumbsAlignCenter]:ie.align==="center",[at.thumbsAlignEnd]:ie.align==="end"}),style:{gap:k.scalingValue(ie.grid.gap,l),justifyContent:y?"flex-start":ye()},children:n.map((K,D)=>{const ce=D===S,q=_[D],W=ie.grid.size*(ce?ie.activeState.scale:1),Le=()=>{if(ie.fit!=="fit")return{};if(!q)return F.direction==="horiz"?{height:k.scalingValue(W,l)}:{width:k.scalingValue(W,l)};const ae=q.width/q.height;if(F.direction==="horiz"){const Q=W,Ne=Q*ae;return{width:k.scalingValue(Ne,l),height:k.scalingValue(Q,l)}}else{const Q=W,Ne=Q/ae;return{width:k.scalingValue(Q,l),height:k.scalingValue(Ne,l)}}};return a.jsx("button",{className:at.thumbItem,style:{...F.direction==="horiz"&&ie.fit!=="fit"?{height:k.scalingValue(W,l)}:{},...F.direction==="vert"&&ie.fit!=="fit"?{width:k.scalingValue(W,l)}:{},...ie.fit==="cover"?{width:k.scalingValue(W,l),height:k.scalingValue(W,l)}:{},...Le(),transition:ce?"all 0.25s ease-out":"none",opacity:ce?ie.activeState.opacity/100:ie.opacity/100,"--thumb-hover":ie.activeState.opacity/100},onClick:ae=>{var Q;ae.stopPropagation(),P(D),(Q=$.current)==null||Q.go(D)},onMouseEnter:()=>{var ae;ie.triggers==="hov"&&((ae=$.current)==null||ae.go(D))},children:a.jsx("img",{src:K.image.assetId,alt:K.image.name??"",onLoad:ae=>{const Q=ae.currentTarget;Q.naturalWidth&&Q.naturalHeight&&z(Ne=>({...Ne,[D]:{width:Q.naturalWidth,height:Q.naturalHeight}}))},style:{objectFit:ie.fit==="cover"?"cover":"contain",...ie.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ie.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${K.image.name}-${D}`)})})})})()]})]}),document.getElementById(r))};function bc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const gf={element:pf,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.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.assetId",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:{assetId:{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:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},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:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},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:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},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:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",assetId:"01M3QM74XD4J8X0B8TTSQ8CV3P",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XD0N6VQJ5J8J9YB32N",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XE4WSEPVF1QQSKMD76",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 Or(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function hf(e){return`
|
|
6
|
+
*/const dh="RichTextRenderer-module__link___BWeZ2",uh={link:dh},ph=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=>ph(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function pn(e){const{color:t,...n}=e;return n}function nn(e,t){var o,r,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:zo(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:A.scalingValue(e.letterSpacing,t),wordSpacing:A.scalingValue(e.wordSpacing,t),fontSize:A.scalingValue(n,t),lineHeight:i!==void 0?A.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(r=e.textAppearance)==null?void 0:r.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}function qu(e){return e!=null&&e.length?e.some(t=>t.type==="link"?qu(t.children):!!t.text):!1}const Zi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?a.jsx("a",{className:uh.link,href:i.value,target:i.target,children:t(i.children)},o):a.jsx("span",{style:mh(i),children:i.text},o));return a.jsx(a.Fragment,{children:e.map((n,i)=>{const o=n.children;return a.jsx("div",{children:qu(o)?t(o):" "},i)})})};function mh(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 gh="SvgImage-module__svg___q3xE-",hh="SvgImage-module__img___VsTm-",fc={svg:gh,img:hh},Za=new Map;function yr(e){return e.startsWith("data:")||e.startsWith("blob:")}function Uu(e){if(yr(e))return Promise.resolve(e);const t=Za.get(e);if(t)return t;const n=fetch(e,{mode:"cors",cache:"reload"}).then(i=>{if(!i.ok)throw new Error(String(i.status));return i.blob()}).then(i=>URL.createObjectURL(i)).catch(i=>{throw Za.delete(e),i});return Za.set(e,n),n}const fh=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},yh=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,gn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[r,l]=s.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")')),[c,d]=s.useState(()=>yr(e)?e:null);return s.useEffect(()=>{if(typeof window<"u"&&window.CSS){const u=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(u)}},[]),s.useEffect(()=>{if(!fh(e)){d(null);return}if(yr(e)){d(e);return}let u=!1;return Uu(e).then(p=>{u||d(p)}).catch(()=>{u||d(null)}),()=>{u=!0}},[e]),!c||!r?a.jsx("img",{src:e,alt:"",className:Rt(fc.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:Rt(fc.svg,i),style:{"--svg":yh(c),"--fill":t,"--hover-fill":n,...o??{}}})},vh={"top-left":Lt.topLeftAlignment,"top-center":Lt.topCenterAlignment,"top-right":Lt.topRightAlignment,"middle-left":Lt.middleLeftAlignment,"middle-center":Lt.middleCenterAlignment,"middle-right":Lt.middleRightAlignment,"bottom-left":Lt.bottomLeftAlignment,"bottom-center":Lt.bottomCenterAlignment,"bottom-right":Lt.bottomRightAlignment};function xh({settings:e,content:t,styles:n,isEditor:i}){const[o,r]=s.useState(null),{widthSettings:l,fontSettings:c,letterSpacing:d,textAlign:u,wordSpacing:p,fontSizeLineHeight:v,textAppearance:x,color:m}=n.imageCaption??{},[h,b]=s.useState(void 0),[S,M]=s.useState(null),[y,$]=s.useState(0),[R,X]=s.useState(0),{direction:B,transition:O,controls:N,pagination:z,imageCaption:C,triggers:I}=e,j=s.useRef(O.type),{x:E,y:w}=e.controls.offset,L=V=>{o&&o.go(V)};return s.useEffect(()=>{if(!S)return;const V=new ResizeObserver(_=>{if(!o)return;const[K]=_;b({width:Math.round(K.contentRect.width),height:Math.round(K.contentRect.height)})});return V.observe(S),()=>V.unobserve(S)},[S]),s.useEffect(()=>{!o||j.current===O.type||(X(V=>V+1),j.current=O.type)},[O.type]),a.jsx("div",{className:Rt(Lt.wrapper,{[Lt.editor]:i}),ref:M,children:a.jsxs("div",{className:Lt.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:O.backgroundColor&&O.type==="fade in"?O.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Rt(Lt.captionBlock),children:a.jsx("div",{className:Lt.captionTextWrapper,children:t.map((V,_)=>a.jsx("div",{className:Rt(Lt.captionText,vh[C.alignment],{[Lt.withPointerEvents]:_===y&&i,[Lt.active]:_===y}),style:{fontFamily:zo(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:l.sizing==="auto"?"max-content":A.scalingValue(l.width,i),letterSpacing:A.scalingValue(d,i),wordSpacing:A.scalingValue(p,i),textAlign:u,fontSize:A.scalingValue(v.fontSize,i),lineHeight:A.scalingValue(v.lineHeight,i),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:m,transitionDuration:O.duration?`${Math.round(parseInt(O.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:Lt.captionTextInner,style:{"--link-hover-color":C.linkHoverColor,"--link-color":C.linkColor,position:"relative",top:A.scalingValue(C.offset.y,i),left:A.scalingValue(C.offset.x,i)},children:a.jsx(Zi,{content:V.imageCaption})})},_))})}),a.jsx(El,{onMove:V=>{$(V.index)},ref:r,options:{arrows:!1,speed:O.duration?parseInt(O.duration):500,autoplay:I.autoPlay!==null,...I.autoPlay!==null&&{interval:parseInt(I.autoPlay)*1e3},direction:B==="horiz"||O.type==="fade in"?"ltr":"ttb",pagination:!1,drag:I.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:O.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((V,_)=>a.jsx(kl,{children:a.jsx("div",{className:Lt.sliderItem,children:a.jsx("div",{className:Lt.imgWrapper,children:a.jsx("img",{className:Rt(Lt.sliderImage,{[Lt.contain]:V.image.objectFit==="contain",[Lt.cover]:V.image.objectFit==="cover"}),src:V.image.assetId,alt:V.image.name??""})})})},_))},R),N.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Rt(Lt.arrow,{[Lt.arrowVertical]:B==="vert",[Lt.hoverArrow]:N.show==="on hover"}),style:{color:N.color,"--arrow-hover-color":N.hover},children:a.jsxs("button",{onClick:()=>{L("-1")},className:Lt.arrowInner,style:{transform:`translate(${A.scalingValue(E,i)}, ${A.scalingValue(w*(B==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:[N.arrowsImgUrl&&a.jsx(gn,{url:N.arrowsImgUrl,fill:N.color,hoverFill:N.hover,className:Rt(Lt.arrowImg,Lt.mirror)}),!N.arrowsImgUrl&&a.jsx(yc,{color:N.color,className:Rt(Lt.arrowIcon,Lt.arrowImg,Lt.mirror)})]})}),a.jsx("div",{className:Rt(Lt.arrow,Lt.nextArrow,{[Lt.arrowVertical]:B==="vert",[Lt.hoverArrow]:N.show==="on hover"}),style:{color:N.color,"--arrow-hover-color":N.hover},children:a.jsxs("button",{className:Lt.arrowInner,onClick:()=>L("+1"),style:{transform:`translate(${A.scalingValue(E*(B==="horiz"?-1:1),i)}, ${A.scalingValue(w,i)}) scale(${e.controls.scale/100}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:[N.arrowsImgUrl&&a.jsx(gn,{url:N.arrowsImgUrl,fill:N.color,hoverFill:N.hover,className:Lt.arrowImg}),!N.arrowsImgUrl&&a.jsx(yc,{color:N.color,className:Rt(Lt.arrowIcon,Lt.arrowImg)})]})})]}),I.triggersList.click&&a.jsx("div",{className:Lt.clickOverlay,onClick:()=>{o&&o.go("+1")}}),z.isActive&&a.jsx("div",{className:Rt(Lt.pagination,{[Lt.paginationInsideBottom]:z.position==="inside-1"&&B==="horiz",[Lt.paginationInsideTop]:z.position==="inside-2"&&B==="horiz",[Lt.paginationOutsideBottom]:z.position==="outside-1"&&B==="horiz",[Lt.paginationOutsideTop]:z.position==="outside-2"&&B==="horiz",[Lt.paginationInsideLeft]:z.position==="inside-1"&&B==="vert",[Lt.paginationInsideRight]:z.position==="inside-2"&&B==="vert",[Lt.paginationOutsideLeft]:z.position==="outside-1"&&B==="vert",[Lt.paginationOutsideRight]:z.position==="outside-2"&&B==="vert",[Lt.paginationVertical]:B==="vert"}),children:a.jsx("div",{className:Lt.paginationInner,style:{backgroundColor:z.colors[2],transform:`scale(${z.scale/100}) translate(${A.scalingValue(z.offset.x,i)}, ${A.scalingValue(z.offset.y,i)}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:t.map((V,_)=>a.jsx("button",{onClick:()=>{o&&o.go(_)},className:Rt(Lt.paginationItem),children:a.jsx("div",{className:Rt(Lt.dot,{[Lt.activeDot]:_===y}),style:{backgroundColor:_===y?z.colors[0]:z.colors[1],"--pagination-hover-color":z.hover}})},_))})})]})})}function yc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const bh={element:xh,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.assetId",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:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XES6E7GVC0H3KJ2RH6",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEAZ8H1DTC5V1S554K",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEDRP49HNTEPNZYQTP",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"]}},Sh="ImageRevealSlider-module__imageRevealSlider___UE5Ob",wh="ImageRevealSlider-module__image___Qjt-e",$h="ImageRevealSlider-module__link___N-iLG",Ch="ImageRevealSlider-module__cursor___2U03d",oo={imageRevealSlider:Sh,image:wh,link:$h,cursor:Ch};function vc(e,t,n){for(const i of n){const o=new Image;o.src=i.assetId;const r=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*r,c=r/2,d=l/2;if(e>=i.x-c&&e<=i.x+c&&t>=i.y-d&&t<=i.y+d)return!0}return!1}function Ja(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Th(e,t,n,i){let o,r;if(t==="custom"){o=n;const l=await Ja(e);r=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await Ja(e);r=l.height/l.width*o}else{const l=await Ja(e);o=l.width,r=l.height}return{width:o,height:r,finalWidth:`${o}px`}}function Ih({settings:e,content:t,isEditor:n}){const[i,o]=s.useState(null),[r,l]=s.useState([]),[c,d]=s.useState(0),u=s.useRef(0),[p,v]=s.useState({x:0,y:0}),[x,m]=s.useState(1),[h,b]=s.useState("none"),S=s.useRef({x:0,y:0}),[M,y]=s.useState(!1),{sizeType:$,imageWidth:R,randomRangeImageWidth:X}=e.imageSize,{revealPosition:B,visible:O}=e.position,{cursorType:N,target:z,defaultCursorScale:C,defaultCursor:I,hoverCursorScale:j,hoverCursor:E}=e.cursor;s.useEffect(()=>{if(!i)return;const V=(P,f)=>{const U=i.getBoundingClientRect(),te=P-U.left,ce=f-U.top;if(v({x:te,y:ce}),N==="system"){b("none"),m(1);return}const F=te,ie=ce,T=document.elementFromPoint(U.left+F,U.top+ie);if(T&&T.closest("a")){b("none"),m(1);return}const le=vc(F,ie,r)||z==="area"?{img:E??"none",scale:j}:{img:I??"none",scale:C};b(le.img),m(le.scale)},_=P=>{P.stopPropagation(),S.current={x:P.clientX,y:P.clientY},V(P.clientX,P.clientY)},K=()=>{M&&V(S.current.x,S.current.y)};return i.addEventListener("mousemove",_),window.addEventListener("scroll",K,!0),()=>{i.removeEventListener("mousemove",_),window.removeEventListener("scroll",K,!0)}},[i,M,p,N,z,E,I,j,C,r]),s.useEffect(()=>{M||(b("none"),m(0))},[M]);const w=async(V,_,K,P={})=>{const{width:f,height:U,finalWidth:te}=await Th(V.image.assetId,$,R,X);let ce=0,F=0;B==="same"?(ce=_/2,F=K/2):(ce=P.x??Math.random()*_,F=P.y??Math.random()*K);const ie=Math.min(Math.max(ce,f/2),_-f/2),T=Math.min(Math.max(F,U/2),K-U/2);return{id:u.current++,assetId:V.image.assetId,link:V.link,name:V.image.name,x:ie,y:T,width:te}};s.useEffect(()=>{if(!i||t.length===0)return;const V=i.getBoundingClientRect(),_=V.width,K=V.height,P=[];(async()=>{const U=t[0],te=await w(U,_,K);P.push(te),l(P),d(1)})()},[$,R,X,B,i]),s.useEffect(()=>{O==="last One"&&l(V=>V.length>0?[V[V.length-1]]:[])},[O]);const L=async V=>{if(!i)return;const _=i.getBoundingClientRect(),K=V.clientX-_.left,P=V.clientY-_.top;if(z==="image"&&!vc(K,P,r))return;let f=0,U=0;B==="on Click"?(f=K,U=P):B==="same"?(f=_.width/2,U=_.height/2):(f=Math.random()*_.width,U=Math.random()*_.height);const te=t[c],ce=await w(te,_.width,_.height,{x:f,y:U});l(F=>O==="all"?[...F,ce]:[ce]),d(F=>F>=t.length-1?0:F+1)};return a.jsxs("div",{ref:o,onClick:L,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),className:oo.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[r.map(V=>a.jsx("div",{className:oo.wrapper,style:{top:`${V.y}px`,left:`${V.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:V.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:z==="area"&&V.link?a.jsx("a",{href:V.link,target:"_blank",className:oo.link,children:a.jsx("img",{src:V.assetId,alt:V.name,className:oo.image},V.id)}):a.jsx("img",{src:V.assetId,alt:V.name,className:oo.image},V.id)},V.id)),M&&a.jsx("div",{className:oo.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Lh={element:Ih,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.assetId",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:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XGWBJY3AQQ71GC2Z6Q",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",assetId:"01M3QM74XGMXS1Z5ZY2RFGS3T4",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",assetId:"01M3QM74XGWG6VCHNEXKVKAJGT",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",assetId:"01M3QM74XGCVMTPNHFHMR98RPZ",name:"Slider-4.png"},link:""}]}}}},Ph="LightBox-module__hidden___9s-9x",Rh="LightBox-module__heroImage___sTxNF",Mh="LightBox-module__background___rm9ml",Eh="LightBox-module__editor___4ACaY",kh="LightBox-module__contentStyle___Bgnsq",Ah="LightBox-module__imageStyle___tLIlB",Fh="LightBox-module__imgWrapper___LuFUp",Nh="LightBox-module__contain___8-yaS",_h="LightBox-module__cover___hNvOG",Hh="LightBox-module__caption___b6L2I",Wh="LightBox-module__captionTextInner___rCGNH",Oh="LightBox-module__lightboxSplide___XFuWC",Dh="LightBox-module__arrow___iz38X",Bh="LightBox-module__arrowVertical___Zfz81",zh="LightBox-module__nextArrow___zkAQN",jh="LightBox-module__arrowInner___p48sW",Vh="LightBox-module__arrowIcon___3VaFf",Gh="LightBox-module__arrowImg___pNV88",Xh="LightBox-module__mirror___pjeXc",qh="LightBox-module__thumbsWrapper___GB-nU",Uh="LightBox-module__thumbsContainerVertical___wttk5",Yh="LightBox-module__thumbsContainer___osSma",Kh="LightBox-module__thumbsAlignStart___MO6tY",Qh="LightBox-module__thumbsAlignCenter___Q4sUx",Zh="LightBox-module__thumbsAlignEnd___p4y9R",Jh="LightBox-module__thumbItem___HvnF3",ef="LightBox-module__closeButton___g2khP",tf="LightBox-module__fadeIn___0m5GW",nf="LightBox-module__slideInLeft___gPYwC",of="LightBox-module__slideInRight___S-pPp",rf="LightBox-module__slideInTop___DFdAj",af="LightBox-module__slideInBottom___m27kZ",sf="LightBox-module__fadeOut___55qBR",lf="LightBox-module__slideOutLeft___NvU7P",cf="LightBox-module__slideOutRight___SK7eC",df="LightBox-module__slideOutTop___Vgg0z",uf="LightBox-module__slideOutBottom___nJ0Ef",pf="LightBox-module__scaleSlide___vZriG",rt={hidden:Ph,heroImage:Rh,background:Mh,editor:Eh,contentStyle:kh,imageStyle:Ah,imgWrapper:Fh,contain:Nh,cover:_h,caption:Hh,captionTextInner:Wh,lightboxSplide:Oh,arrow:Dh,arrowVertical:Bh,nextArrow:zh,arrowInner:jh,arrowIcon:Vh,arrowImg:Gh,mirror:Xh,thumbsWrapper:qh,thumbsContainerVertical:Uh,thumbsContainer:Yh,thumbsAlignStart:Kh,thumbsAlignCenter:Qh,thumbsAlignEnd:Zh,thumbItem:Jh,closeButton:ef,fadeIn:tf,slideInLeft:nf,slideInRight:of,slideInTop:rf,slideInBottom:af,fadeOut:sf,slideOutLeft:lf,slideOutRight:cf,slideOutTop:df,slideOutBottom:uf,scaleSlide:pf},Wr=(e,t,n)=>{const i={},[o,r]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),r==="left"?(i.left="0",i.right="auto"):r==="center"?(i.left="50%",i.right="auto"):r==="right"&&(i.left="auto",i.right="0"),o==="middle"&&r==="center"?i.transform=`translate(calc(-50% + ${A.scalingValue(t.x,n)}), calc(-50% + ${A.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${A.scalingValue(t.x,n)}, calc(-50% + ${A.scalingValue(t.y,n)}))`:r==="center"?i.transform=`translate(calc(-50% + ${A.scalingValue(t.x,n)}), ${A.scalingValue(t.y,n)})`:i.transform=`translate(${A.scalingValue(t.x,n)}, ${A.scalingValue(t.y,n)})`,i};function Yu(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 mf(e){const t=e.trim().split(/\s+/),n=i=>{if(i.endsWith("%"))return parseFloat(i)/100;switch(i){case"left":case"top":return 0;case"right":case"bottom":return 1;case"center":return .5;default:return .5}};if(t.length===1){const i=t[0];return i==="center"?{x:.5,y:.5}:i==="top"||i==="bottom"?{x:.5,y:n(i)}:i==="left"||i==="right"?{x:n(i),y:.5}:{x:n(i),y:.5}}return{x:n(t[0]),y:n(t[1])}}function Ku(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const c=e;return{renderedW:c,renderedH:c/r}}const l=t;return{renderedW:l*r,renderedH:l}}function gf(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const c=t;return{renderedW:c*r,renderedH:c}}const l=e;return{renderedW:l,renderedH:l/r}}function Qu(e,t,n,i,o){const{x:r,y:l}=mf(o);return{offsetX:r*(e-n),offsetY:l*(t-i)}}function hf(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height;if(!n||!i)return"center center";const o=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,r=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:l,objectPosition:c}=window.getComputedStyle(e),d=l==="cover"?gf:Ku,{renderedW:u,renderedH:p}=d(n,i,o,r),{offsetX:v,offsetY:x}=Qu(n,i,u,p,c),m=(v+u/2)/n*100,h=(x+p/2)/i*100;return`${m}% ${h}%`}function ff(e){return hf(e)}function Sa(e){const t=e.getBoundingClientRect(),n=Yu(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),r=e.naturalWidth,l=e.naturalHeight,{renderedW:c,renderedH:d}=Ku(i,o,r,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:v}=Qu(i,o,c,d,u),x=t.left+n.left,m=t.top+n.top;return{x:p+x,y:v+m,width:c,height:d}}function xc(e){const t=e.getBoundingClientRect(),n=Yu(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function yf(e,t){const n=(()=>{if(e==="fade in")return rt.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return rt.slideInLeft;case"right":return rt.slideInRight;case"top":return rt.slideInTop;case"bottom":return rt.slideInBottom;default:return rt.slideInRight}return rt.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return rt.fadeIn;if(e==="slide in")switch(t){case"left":return rt.slideInLeft;case"right":return rt.slideInRight;case"top":return rt.slideInTop;case"bottom":return rt.slideInBottom;default:return rt.slideInRight}return rt.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return rt.fadeOut;if(e==="slide in")switch(t){case"left":return rt.slideOutLeft;case"right":return rt.slideOutRight;case"top":return rt.slideOutTop;case"bottom":return rt.slideOutBottom;default:return rt.slideOutRight}return rt.fadeOut})(),r=(()=>{if(e==="fade in")return rt.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return rt.slideOutLeft;case"right":return rt.slideOutRight;case"top":return rt.slideOutTop;case"bottom":return rt.slideOutBottom;default:return rt.slideOutRight}return rt.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:r}}const vf=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:r,isPreviewMode:l})=>{const[c,d]=s.useState(!1),{assetId:u}=e.thumbnailBlock.cover;return s.useEffect(()=>{o==="close"&&d(!1),o==="open"&&d(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:u,alt:"Cover",className:rt.heroImage,onClick:()=>d(!0)}),a.jsx(xf,{isOpen:c,onClose:()=>d(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},xf=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:r,isEditor:l,metadata:c})=>{var xe;const{widthSettings:d,fontSettings:u,letterSpacing:p,textAlign:v,wordSpacing:x,fontSizeLineHeight:m,textAppearance:h,color:b}=i.imageCaption??{},[S,M]=s.useState(0),[y,$]=s.useState(0),[R,X]=s.useState(!1),[B,O]=s.useState(!1),[N,z]=s.useState({}),C=s.useRef(null),I=s.useRef(null),j=s.useRef(null),E=s.useRef(!1),w=s.useRef(null),L=s.useRef(null),V=s.useRef(null),_=s.useRef(null),K=s.useRef(!1),P=s.useRef(null),[f,U]=s.useState(!1),{appear:te,triggers:ce,slider:F,thumbnail:ie,controls:T,area:le,caption:J,layout:Se}=o.lightboxBlock,{appearClass:Le,backdropAppearClass:me,backdropDisappearClass:ye,disappearClass:ee}=yf(te.type,te.direction),oe=(c==null?void 0:c.itemId)??null;s.useEffect(()=>{const g=()=>{setTimeout(()=>{var Q,ne;(ne=(Q=C.current)==null?void 0:Q.splide)==null||ne.refresh()},16)},G=()=>{$(Q=>Q+1)};return window.addEventListener("ArticleEditor.Layout:change",g),window.addEventListener("ArticleEditor.ComponentContent:change",G),()=>{window.removeEventListener("ArticleEditor.Layout:change",g),window.removeEventListener("ArticleEditor.ComponentContent:change",G)}},[]),s.useEffect(()=>{if(!e||!ie.isActive){U(!1);return}const g=P.current;if(!g)return;const G=()=>{F.direction==="horiz"?U(g.scrollWidth>g.clientWidth):U(g.scrollHeight>g.clientHeight)};G();const Q=new ResizeObserver(G);return Q.observe(g),()=>Q.disconnect()},[e,ie.isActive,n.length,N,F.direction]);const re=s.useCallback(()=>{const g=window.matchMedia("(max-width: 768px)").matches,G=A.getColorAlpha(le.color);g&&!l&&G>.9&&(document.body.style.backgroundColor=""),X(!0),E.current=!0;const Q=ne=>{ne.target===w.current&&ne.animationName&&(w.current&&L.current&&w.current.removeEventListener("animationend",L.current),L.current=null,E.current&&(E.current=!1,t()),X(!1))};w.current&&(L.current=Q,w.current.addEventListener("animationend",Q))},[t,le.color,l]),ge=(g,G,Q)=>{var ne,ue;if(g){if(ce.type==="click"&&ce.switch==="image")ce.repeat==="close"&&S===n.length-1?re():(ne=C.current)==null||ne.go("+1");else if(ce.type==="click"&&ce.switch==="50/50"){const q=g.getBoundingClientRect(),D=G-q.left,se=Q-q.top,Y=q.width,pe=q.height;let H;F.direction==="horiz"?H=D<Y/2?"-1":"+1":H=se<pe/2?"-1":"+1",(ue=C.current)==null||ue.go(H)}}},we=g=>{if(K.current){K.current=!1;return}const G=n[S],Q=(G==null?void 0:G.image.objectFit)==="cover";let ne,ue;if("changedTouches"in g&&g.changedTouches.length>0)ne=g.changedTouches[0].clientX,ue=g.changedTouches[0].clientY;else if("clientX"in g)ne=g.clientX,ue=g.clientY;else return;let q;if(Q&&j.current){const D=xc(j.current);q=ne>=D.left&&ne<=D.right&&ue>=D.top&&ue<=D.bottom}else{const D=j.current?Sa(j.current):null;if(!D){g.target===g.currentTarget&&re();return}q=ne>=D.x&&ne<=D.x+D.width&&ue>=D.y&&ue<=D.y+D.height}q?ge(j.current,ne,ue):re()},Ae=g=>{const G=g.target;(G.classList.contains(rt.thumbsWrapper)||G.classList.contains(rt.thumbsContainer))&&we(g)};s.useEffect(()=>{if(!e)return;const g=G=>{var Q,ne;if(G.key==="Escape"){re();return}if(G.key==="ArrowRight"){M(ue=>(ue+1)%Math.max(n.length,1)),(Q=C.current)==null||Q.go("+1");return}G.key==="ArrowLeft"&&(M(ue=>(ue-1+Math.max(n.length,1))%Math.max(n.length,1)),(ne=C.current)==null||ne.go("-1"))};return window.addEventListener("keydown",g),()=>{window.removeEventListener("keydown",g)}},[e,re,n.length]),s.useEffect(()=>{if(e){if(M(0),$(G=>G+1),E.current=!1,X(!1),O(!1),z({}),!oe)return;const g=new CustomEvent("page-overlay",{detail:{itemId:oe}});window.dispatchEvent(g)}return()=>{w.current&&L.current&&(w.current.removeEventListener("animationend",L.current),L.current=null),O(!1)}},[e,oe]),s.useEffect(()=>{I.current!==null&&I.current!==F.type&&$(g=>g+1),I.current=F.type},[F.type]),s.useEffect(()=>{if(!e)return;const g=document.body.style.overflow,G=window.matchMedia("(max-width: 768px)").matches,Q=A.getColorAlpha(le.color);document.body.style.overflow="hidden",O(!1);const ne=q=>{q.target===w.current&&!E.current&&q.animationName&&(G&&!l&&Q>.9&&(document.body.style.backgroundColor=le.color),O(!0),w.current&&V.current&&w.current.removeEventListener("animationend",V.current),V.current=null)};w.current&&(V.current=ne,w.current.addEventListener("animationend",ne));const ue=q=>{const D=q.target;D&&(D.closest(`.${rt.thumbsWrapper}`)||D.closest(`.${rt.thumbsContainer}`))||F.type!=="slide"&&q.preventDefault()};return document.addEventListener("touchmove",ue,{passive:!1}),()=>{document.body.style.overflow=g,document.removeEventListener("touchmove",ue),w.current&&V.current&&(w.current.removeEventListener("animationend",V.current),V.current=null),O(!1)}},[e,l,le.color,F.type]),s.useEffect(()=>{if(!e)return;const g=G=>{var ne,ue;if(E.current){G.stopPropagation();return}if(K.current){K.current=!1;return}const Q=G.target;if(!(Q&&(Q.closest(`.${rt.thumbsContainer}`)||Q.closest(`.${rt.thumbItem}`)||Q.closest(`.${rt.arrow}`)||Q.closest(`.${rt.closeButton}`)||Q.closest(`.${rt.caption}`)))){if(F.type==="slide"&&ce.type==="drag"&&((ue=(ne=C.current)==null?void 0:ne.splide)!=null&&ue.root)){const q=C.current.splide.root;if(Q&&(q.contains(Q)||q===Q))return}if(G.touches.length===0&&G.changedTouches.length>0){const q=n[S],D=(q==null?void 0:q.image.objectFit)==="cover",se=G.changedTouches[0];let Y;if(D&&j.current){const pe=xc(j.current);Y=se.clientX>=pe.left&&se.clientX<=pe.right&&se.clientY>=pe.top&&se.clientY<=pe.bottom}else{const pe=j.current?Sa(j.current):null;if(!pe)return;Y=se.clientX>=pe.x&&se.clientX<=pe.x+pe.width&&se.clientY>=pe.y&&se.clientY<=pe.y+pe.height}if(!Y){G.stopPropagation(),E.current=!0;const pe=H=>{H.stopPropagation(),H.preventDefault(),document.removeEventListener("click",pe,!0)};document.addEventListener("click",pe,!0),re()}}}};return document.addEventListener("touchend",g,{passive:!0}),()=>{document.removeEventListener("touchend",g)}},[e,re,S,n]);const fe=(F.type==="scale"||F.type==="fade")&&F.direction==="vert"&&ce.type==="drag";s.useEffect(()=>{var H,Ie;if(!e||!fe||!((Ie=(H=C.current)==null?void 0:H.splide)!=null&&Ie.root))return;const g=C.current.splide.root,G=30,Q=(de,Z)=>{if(_.current){const Ne=Math.abs(de-_.current.x),Oe=Math.abs(Z-_.current.y);(Ne>0||Oe>0)&&(K.current=!0)}},ne=de=>{_.current&&(de.preventDefault(),Q(de.clientX,de.clientY))},ue=de=>{_.current&&de.touches.length>0&&(de.preventDefault(),Q(de.touches[0].clientX,de.touches[0].clientY))},q=(de,Z)=>{if(!_.current||!C.current){_.current=null;return}const Ne=Math.abs(de-_.current.x),Oe=Math.abs(Z-_.current.y);Oe>G&&Oe>Ne&&C.current.go(Z<_.current.y?"+1":"-1"),_.current=null},D=de=>{_.current&&q(de.clientX,de.clientY),document.removeEventListener("pointerup",D),document.removeEventListener("pointercancel",D),document.removeEventListener("pointermove",ne)},se=de=>{if(_.current){if(de.changedTouches.length>0){const Z=de.changedTouches[0];q(Z.clientX,Z.clientY)}document.removeEventListener("touchend",se),document.removeEventListener("touchcancel",se),document.removeEventListener("touchmove",ue)}},Y=de=>{_.current={x:de.clientX,y:de.clientY},K.current=!1,document.addEventListener("pointermove",ne,{passive:!1}),document.addEventListener("pointerup",D),document.addEventListener("pointercancel",D)},pe=de=>{de.touches.length>0&&(_.current={x:de.touches[0].clientX,y:de.touches[0].clientY},K.current=!1,document.addEventListener("touchmove",ue,{passive:!1}),document.addEventListener("touchend",se),document.addEventListener("touchcancel",se))};return g.addEventListener("pointerdown",Y),g.addEventListener("touchstart",pe),()=>{g.removeEventListener("pointerdown",Y),g.removeEventListener("touchstart",pe),document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",D),document.removeEventListener("pointercancel",D),document.removeEventListener("touchmove",ue),document.removeEventListener("touchend",se),document.removeEventListener("touchcancel",se),_.current=null,K.current=!1}},[e,fe,y]);const ve={backgroundColor:le.color,backdropFilter:`blur(${le.blur}px)`,animationDuration:`${parseInt(te.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(r)?null:Un.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l?null:w,className:Rt(rt.background,R?ye:me,{[rt.editor]:l},{[rt.hidden]:!e}),style:{...ve,...B&&!l&&!R?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?w:null,className:Rt(rt.contentStyle,R?ee:Le,{[rt.editor]:l},{[rt.hidden]:!e}),style:{animationDuration:`${parseInt(te.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(El,{onMove:g=>M(g.index),ref:C,className:rt.lightboxSplide,options:{arrows:!1,speed:F.duration?parseInt(F.duration):500,direction:F.direction==="horiz"||F.type==="fade"||F.type==="scale"?"ltr":"ttb",pagination:!1,drag:ce.type==="drag"&&!fe,perPage:1,width:"100%",height:"100%",type:F.type==="fade"||F.type==="scale"?"fade":"loop",padding:0,rewind:ce.repeat!=="close",start:0},style:{"--splide-speed":F.duration},children:n.map((g,G)=>{const Q=Wr(Se.position,Se.offset,l),ne=`${A.scalingValue(Se.padding.top,l)} ${A.scalingValue(Se.padding.right,l)} ${A.scalingValue(Se.padding.bottom,l)} ${A.scalingValue(Se.padding.left,l)}`,ue=F.type==="scale"?(()=>{const{transform:q,...D}=Q;return{...D,position:"absolute",padding:ne,boxSizing:"border-box","--position-transform":q||"none"}})():{...Q,position:"absolute",padding:ne,boxSizing:"border-box"};return a.jsx(kl,{children:a.jsx("div",{className:rt.imgWrapper,onClick:we,children:a.jsx("img",{ref:G===S?j:null,className:Rt(rt.imageStyle,{[rt.contain]:g.image.objectFit==="contain",[rt.cover]:g.image.objectFit==="cover",[rt.scaleSlide]:F.type==="scale"}),src:g.image.assetId,alt:g.image.name??"",style:{...ue,pointerEvents:g.image.objectFit==="contain"?"none":"auto"}})})},G)})},y),T.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Rt(rt.arrow,{[rt.arrowVertical]:F.direction==="vert"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:a.jsxs("button",{className:rt.arrowInner,style:{transform:`translate(${A.scalingValue(T.offset.x,l)}, ${A.scalingValue(T.offset.y*(F.direction==="horiz"?1:-1),l)}) scale(${T.scale}) rotate(${F.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var g;return(g=C.current)==null?void 0:g.go("-1")},"aria-label":"Previous",children:[T.arrowsImgUrl&&a.jsx(gn,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:Rt(rt.arrowImg,rt.mirror)}),!T.arrowsImgUrl&&a.jsx(bc,{color:T.color,className:Rt(rt.arrowIcon,rt.arrowImg,rt.mirror)})]})}),a.jsx("div",{className:Rt(rt.arrow,rt.nextArrow,{[rt.arrowVertical]:F.direction==="vert"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:a.jsxs("button",{className:rt.arrowInner,style:{transform:`translate(${A.scalingValue(T.offset.x*(F.direction==="horiz"?-1:1),l)}, ${A.scalingValue(T.offset.y,l)}) scale(${T.scale}) rotate(${F.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var g;return(g=C.current)==null?void 0:g.go("+1")},"aria-label":"Next",children:[T.arrowsImgUrl&&a.jsx(gn,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:rt.arrowImg}),!T.arrowsImgUrl&&a.jsx(bc,{color:T.color,className:Rt(rt.arrowIcon,rt.arrowImg)})]})})]}),le.closeIconUrl&&(()=>{const g=Wr(le.closeIconAlign,le.closeIconOffset,l),G=`scale(${le.closeIconScale})`,Q=g.transform?`${g.transform} ${G}`:G;return a.jsx("button",{className:rt.closeButton,style:{...g,transform:Q},onClick:re,"aria-label":"Close lightbox",children:a.jsx(gn,{url:le.closeIconUrl,fill:le.closeIconColor??"#000000",hoverFill:le.closeIconHover??"#cccccc"})})})(),J&&J.isActive&&i.imageCaption&&((xe=n[S])==null?void 0:xe.imageCaption)&&a.jsx("div",{className:rt.caption,style:{...Wr(J.alignment,J.offset,l),fontFamily:zo(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:d.sizing==="auto"?"max-content":A.scalingValue(d.width,l),letterSpacing:A.scalingValue(p,l),wordSpacing:A.scalingValue(x,l),textAlign:v,fontSize:A.scalingValue(m.fontSize,l),lineHeight:A.scalingValue(m.lineHeight,l),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:b},onClick:g=>g.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:rt.captionTextInner,style:{"--link-color":J.linkColor,"--link-hover-color":J.linkHoverColor},children:a.jsx(Zi,{content:n[S].imageCaption})})}),ie.isActive&&(()=>{const[g,G]=ie.position.split("-"),Q=F.direction==="horiz"?`${g}-left`:ie.position,ne=Wr(Q,ie.offset,l),ue=()=>{if(F.direction==="horiz"){if(G==="left")return"flex-start";if(G==="center")return"center";if(G==="right")return"flex-end"}else{if(g==="top")return"flex-start";if(g==="middle")return"center";if(g==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:P,className:rt.thumbsWrapper,onClick:q=>Ae(q),style:{position:l?"absolute":"fixed",...ne,...F.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Rt(rt.thumbsContainer,{[rt.thumbsContainerVertical]:F.direction==="vert",[rt.thumbsAlignStart]:ie.align==="start",[rt.thumbsAlignCenter]:ie.align==="center",[rt.thumbsAlignEnd]:ie.align==="end"}),style:{gap:A.scalingValue(ie.grid.gap,l),justifyContent:f?"flex-start":ue()},children:n.map((q,D)=>{const se=D===S,Y=N[D],H=ie.grid.size*(se?ie.activeState.scale:1),Ie=()=>{if(ie.fit!=="fit")return{};if(!Y)return F.direction==="horiz"?{height:A.scalingValue(H,l)}:{width:A.scalingValue(H,l)};const de=Y.width/Y.height;if(F.direction==="horiz"){const Z=H,Ne=Z*de;return{width:A.scalingValue(Ne,l),height:A.scalingValue(Z,l)}}else{const Z=H,Ne=Z/de;return{width:A.scalingValue(Z,l),height:A.scalingValue(Ne,l)}}};return a.jsx("button",{className:rt.thumbItem,style:{...F.direction==="horiz"&&ie.fit!=="fit"?{height:A.scalingValue(H,l)}:{},...F.direction==="vert"&&ie.fit!=="fit"?{width:A.scalingValue(H,l)}:{},...ie.fit==="cover"?{width:A.scalingValue(H,l),height:A.scalingValue(H,l)}:{},...Ie(),transition:se?"all 0.25s ease-out":"none",opacity:se?ie.activeState.opacity/100:ie.opacity/100,"--thumb-hover":ie.activeState.opacity/100},onClick:de=>{var Z;de.stopPropagation(),M(D),(Z=C.current)==null||Z.go(D)},onMouseEnter:()=>{var de;ie.triggers==="hov"&&((de=C.current)==null||de.go(D))},children:a.jsx("img",{src:q.image.assetId,alt:q.image.name??"",onLoad:de=>{const Z=de.currentTarget;Z.naturalWidth&&Z.naturalHeight&&z(Ne=>({...Ne,[D]:{width:Z.naturalWidth,height:Z.naturalHeight}}))},style:{objectFit:ie.fit==="cover"?"cover":"contain",...ie.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ie.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${q.image.name}-${D}`)})})})})()]})]}),document.getElementById(r))};function bc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const bf={element:vf,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.assetId",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.assetId",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:{assetId:{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:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},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:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},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:{assetId:"01M3QM74XEQ5ZGJ9WAMKV0EY1V"}},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:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",assetId:"01M3QM74XD4J8X0B8TTSQ8CV3P",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XD0N6VQJ5J8J9YB32N",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",assetId:"01M3QM74XE4WSEPVF1QQSKMD76",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 Or(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Sf(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
|
|
158
|
+
`}function wf({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:r}){const l=!!n,c=i&&t||!t,{prefix:d}=A.useScopedStyles(),{type:u="A",fieldsToShow:p=2,textareaRows:v=1,fields:x=[],buttonLabel:m,gap:h,fieldsGap:b,buttonCorners:S,buttonStroke:M,buttonPadding:y,isButtonFullWidth:$,inputCorners:R,inputStroke:X,inputPadding:B,inputColor:O,inputTextColor:N,inputBorderColor:z,placeholderColor:C,buttonColor:I,buttonTextColor:j,buttonBorderColor:E,labelTextColor:w,successColor:L,errorColor:V,fontFamily:_,inputFontSettings:K,inputFontSize:P,inputLineHeight:f,inputLetterSpacing:U,inputWordSpacing:te,inputTextAppearance:ce,buttonFontSettings:F,buttonFontSize:ie,buttonLineHeight:T,buttonLetterSpacing:le,buttonWordSpacing:J,buttonTextAppearance:Se,labelFontSettings:Le,labelFontSize:me,labelLineHeight:ye,labelLetterSpacing:ee,labelWordSpacing:oe,labelTextAppearance:re,statusFontSettings:ge,statusFontSize:we,statusLineHeight:Ae,statusLetterSpacing:fe,statusWordSpacing:ve,statusTextAppearance:xe,successMessage:g,errorMessage:G,stateOverrides:Q}=e,ne=u==="B",ue=x.slice(0,Math.min(p,x.length)),q={fontSettings:{fontFamily:_,fontWeight:(K==null?void 0:K.fontWeight)??400,fontStyle:(K==null?void 0:K.fontStyle)??"normal"},fontSize:P??.01,lineHeight:f,letterSpacing:U??0,wordSpacing:te??0,textAppearance:ce,color:N},D=pn(nn(q,t)),se=A.scalingValue(X??0,t),Y=Ve=>A.scalingValue((f??P??.01)*Ve+((B==null?void 0:B.top)??0)+((B==null?void 0:B.bottom)??0)+(u==="C"?X??0:(X??0)*2),t),pe=Y(1),H=Y(Math.max(1,v)),Ie={...D,borderStyle:"solid",borderRadius:u==="C"?0:A.scalingValue(R??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:se,borderLeftWidth:0}:{borderWidth:se},paddingTop:A.scalingValue((B==null?void 0:B.top)??0,t),paddingRight:A.scalingValue((B==null?void 0:B.right)??0,t),paddingBottom:A.scalingValue((B==null?void 0:B.bottom)??0,t),paddingLeft:A.scalingValue((B==null?void 0:B.left)??0,t),height:pe,minHeight:pe},de={fontSettings:{fontFamily:_,fontWeight:(F==null?void 0:F.fontWeight)??400,fontStyle:(F==null?void 0:F.fontStyle)??"normal"},fontSize:ie??.01,lineHeight:T,letterSpacing:le??0,wordSpacing:J??0,textAppearance:Se,color:j},Z=pn(nn(de,t)),Ne=A.scalingValue(M??0,t),Oe={fontSettings:{fontFamily:_,fontWeight:(Le==null?void 0:Le.fontWeight)??400,fontStyle:(Le==null?void 0:Le.fontStyle)??"normal"},fontSize:me??.01,lineHeight:ye,letterSpacing:ee??0,wordSpacing:oe??0,textAppearance:re,color:w},Je=nn(Oe,t),De={fontSettings:{fontFamily:_,fontWeight:(ge==null?void 0:ge.fontWeight)??400,fontStyle:(ge==null?void 0:ge.fontStyle)??"normal"},fontSize:we??.01,lineHeight:Ae,letterSpacing:fe??0,wordSpacing:ve??0,textAppearance:xe,color:L},Ze=pn(nn(De,t)),at=A.buildColorVars(d,{inputColor:O,inputTextColor:N,inputBorderColor:z,placeholderColor:C!=null&&C.trim()?C:"#cccccc",buttonColor:I,buttonTextColor:j,buttonBorderColor:E,labelTextColor:w,successColor:L,errorColor:V},$f,Cf,Q),[Xe,be]=s.useState(()=>Object.fromEntries(ue.map(Ve=>[Ve.name,""]))),[He,je]=s.useState("idle"),[Qe,Ce]=s.useState(null),_e=r==="success"?"success":r==="error"?"error":He,Ue=r==="error"?G:Qe,Ye=r==="filled",lt=s.useMemo(()=>{if(!Ye)return Xe;let Ve=null;for(const ct of ue)(Xe[ct.name]??"").trim().length>0||(Ve=Ve??{...Xe},Ve[ct.name]="Filled");return Ve??Xe},[Xe,Ye,ue]),it=_e==="error"?A.getFormFieldValidationError(ue,lt):null,Ee=`${r&&r!=="default"?`${d}-state-${r}`:""}`.trim(),pt=o==null?void 0:o.submitUrl,ke=(Ve,ct)=>{be(ot=>({...ot,[Ve]:ct}))},We=async Ve=>{if(Ve.preventDefault(),!c)return;const ct=Object.fromEntries(ue.map(xt=>{var Pt;return[xt.name,((Pt=Xe[xt.name])==null?void 0:Pt.trim())??""]}).filter(([,xt])=>xt));if(!pt){je("error"),Ce("No integrations were found for this form.");return}if(Object.keys(ct).length===0)return;const ot=A.getFormFieldValidationError(ue,Xe);if(ot){je("error"),Ce(ot);return}je("submitting"),Ce(null);try{const xt=await fetch(pt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ct)});if(!xt.ok){const Pt=await xt.text();throw new Error(Pt||`Request failed: ${xt.status}`)}je("success"),be(Object.fromEntries(ue.map(Pt=>[Pt.name,""])))}catch(xt){je("error"),Ce(xt instanceof Error?xt.message:"Something went wrong")}};return a.jsxs("div",{className:`${d}-wrapper ${d}-type-${u} ${Ee}`.trim(),style:at,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Sf(d)}}),a.jsxs("form",{onSubmit:We,className:`${d}-form`,children:[a.jsx("div",{className:`${d}-fields`,children:ue.map((Ve,ct)=>a.jsxs(s.Fragment,{children:[ct>0&&a.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${d}-control`:void 0,style:{height:A.scalingValue(b??0,t)}}),a.jsxs("div",{className:`${d}-field-group${ne?` ${d}-labeled`:""}`,children:[ne&&a.jsx("span",{className:`${d}-field-label`,style:Je?{...Je,lineHeight:Je.fontSize}:void 0,children:Ve.label||Ve.name}),Ve.type==="textarea"?a.jsx("textarea",{name:Ve.name,autoComplete:"off",value:lt[Ve.name]??"",onChange:ot=>ke(Ve.name,ot.target.value),placeholder:Ve.placeholder,className:`${d}-input`,style:{...Ie,height:H,minHeight:H},rows:v,"data-filled":Ye||(lt[Ve.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:Ve.type==="phone"?"tel":Ve.type==="email"?"email":"text",name:Ve.name,autoComplete:"off",value:lt[Ve.name]??"",onChange:ot=>ke(Ve.name,ot.target.value),placeholder:Ve.placeholder,required:Ve.isRequired??Ve.type==="email",className:`${d}-input`,style:Ie,"data-filled":Ye||(lt[Ve.name]??"").trim().length>0})]})]},ct))}),a.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${d}-control`:void 0,style:{height:A.scalingValue(h??0,t)}}),a.jsx("div",{className:`${d}-overlay-anchor`,children:a.jsx("button",{type:c?"submit":"button",className:`${d}-button`,style:{borderStyle:"solid",borderRadius:A.scalingValue(S??0,t),borderWidth:Ne,paddingTop:A.scalingValue((y==null?void 0:y.top)??0,t),paddingRight:A.scalingValue((y==null?void 0:y.right)??0,t),paddingBottom:A.scalingValue((y==null?void 0:y.bottom)??0,t),paddingLeft:A.scalingValue((y==null?void 0:y.left)??0,t),pointerEvents:c?"auto":void 0,...Z,...$?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${d}-overlay-anchor`,style:$?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:He==="submitting"?"...":m})})})]}),_e==="success"&&a.jsx("p",{className:`${d}-success`,style:{...Ze},children:g}),_e==="error"&&a.jsx("p",{className:`${d}-error`,style:{...Ze},role:"alert",children:it??Ue??G})]})}const $f={inputColor:"input-color",inputTextColor:"input-text-color",inputBorderColor:"input-border-color",placeholderColor:"placeholder-color",buttonColor:"button-color",buttonTextColor:"button-text-color",buttonBorderColor:"button-border-color",labelTextColor:"label-text-color",successColor:"success-color",errorColor:"error-color"},Cf=["hover","focus","filled","success","error"],Tf=`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';
|
|
@@ -793,7 +793,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
|
|
|
793
793
|
};
|
|
794
794
|
|
|
795
795
|
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
796
|
-
`,bf=[{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Dr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Sf=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],wf={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:7},textareaRows:{type:"number",scope:"common",title:"Rows",display:{type:"common-numeric-input"},min:1,max:20},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Dr.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Dr.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...Dr.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Dr.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,textareaRows:1,fields:bf,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#A7A7A7",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!0,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0426,buttonLineHeight:.0426,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},t:{gap:.02604,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.039,buttonPadding:{top:.0195,right:.02604,bottom:.0195,left:.0195},inputPadding:{top:.0195,right:.0195,bottom:.0195,left:.0195},inputFontSize:.02083,inputLineHeight:.02604,buttonFontSize:.02083,buttonLineHeight:.02604,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["fieldsToShow","inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]},{type:"group",title:"",items:[{type:"row",title:"Textarea",items:["textareaRows"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Sf],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},$f={element:ff,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300},t:{width:300},m:{width:340}},schema:wf,sourceCode:xf,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function Br(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Cf(e){return`
|
|
796
|
+
`,If=[{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Dr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Lf=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Pf={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:7},textareaRows:{type:"number",scope:"common",title:"Rows",display:{type:"common-numeric-input"},min:1,max:20},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Dr.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Dr.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...Dr.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Dr.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,textareaRows:1,fields:If,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#A7A7A7",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!0,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0426,buttonLineHeight:.0426,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},t:{gap:.02604,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.039,buttonPadding:{top:.0195,right:.02604,bottom:.0195,left:.0195},inputPadding:{top:.0195,right:.0195,bottom:.0195,left:.0195},inputFontSize:.02083,inputLineHeight:.02604,buttonFontSize:.02083,buttonLineHeight:.02604,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["fieldsToShow","inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]},{type:"group",title:"",items:[{type:"row",title:"Textarea",items:["textareaRows"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Lf],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Rf={element:wf,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300},t:{width:300},m:{width:340}},schema:Pf,sourceCode:Tf,fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",labelFontSettings:"fontFamily",statusFontSettings:"fontFamily"},assetsPaths:{content:[],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]}};function Br(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Mf(e){return`
|
|
797
797
|
.${e}-wrapper {
|
|
798
798
|
display: flex;
|
|
799
799
|
flex-direction: column;
|
|
@@ -986,7 +986,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
|
986
986
|
font-size: ${Br(14)};
|
|
987
987
|
color: var(--${e}-error-error-color, var(--${e}-error-color));
|
|
988
988
|
}
|
|
989
|
-
`}const
|
|
989
|
+
`}const Ef=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:r}=A.useScopedStyles(),l=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:d,buttonLabel:u,fieldsToShow:p=1,fontFamily:v,inputFontSettings:x,inputFontSize:m,inputLineHeight:h,inputLetterSpacing:b,inputWordSpacing:S,inputTextAppearance:M,buttonFontSettings:y,buttonFontSize:$,buttonLineHeight:R,buttonLetterSpacing:X,buttonWordSpacing:B,buttonTextAppearance:O,statusFontSettings:N,statusFontSize:z,statusLineHeight:C,statusLetterSpacing:I,statusWordSpacing:j,statusTextAppearance:E,iconMaxWidth:w,minHeight:L,corners:V,stroke:_,stateOverrides:K,inputPadding:P,buttonPadding:f,successMessage:U="Thanks for subscribing!",errorMessage:te="Please, fill all required fields."}=e,ce=c.slice(0,Math.min(p,c.length)),[F,ie]=s.useState(()=>Object.fromEntries(ce.map(de=>[de.name,""]))),[T,le]=s.useState("idle"),[J,Se]=s.useState(null),Le=o==="success"?"success":o==="error"?"error":T,me=o==="error"?te:J,ye=o==="filled",ee=s.useMemo(()=>{if(!ye)return F;let de=null;for(const Z of ce)(F[Z.name]??"").trim().length>0||(de=de??{...F},de[Z.name]="Filled");return de??F},[ye,F,ce]),oe=Le==="error"?A.getFormFieldValidationError(ce,ee):null,re=o&&o!=="default"?`${r}-state-${o}`:"",ge=ce.some(de=>(ee[de.name]??"").trim().length>0),we=re!==`${r}-state-filled`&&ge?`${r}-state-filled`:"",Ae=`${re} ${we}`.trim(),fe=i==null?void 0:i.submitUrl,ve=u??"",xe=(d==null?void 0:d.icon)??"",g=(d==null?void 0:d.mode)==="On",G=ve||"Submit",Q={fontSettings:{fontFamily:v,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:m??.01,lineHeight:h,letterSpacing:b??0,wordSpacing:S??0,textAppearance:M,color:e.inputTextColor??"#111111"},ne={fontSettings:{fontFamily:v,fontWeight:(y==null?void 0:y.fontWeight)??400,fontStyle:(y==null?void 0:y.fontStyle)??"normal"},fontSize:$??.01,lineHeight:R,letterSpacing:X??0,wordSpacing:B??0,textAppearance:O,color:e.buttonTextColor??"#ffffff"},ue={fontSettings:{fontFamily:v,fontWeight:(N==null?void 0:N.fontWeight)??400,fontStyle:(N==null?void 0:N.fontStyle)??"normal"},fontSize:z??.01,lineHeight:C,letterSpacing:I??0,wordSpacing:j??0,textAppearance:E,color:e.successColor??"#22c55e"},q=pn(nn(Q,t)),D=pn(nn(ne,t)),se=pn(nn(ue,t)),Y=A.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(Q==null?void 0:Q.color)??"#111111",buttonTextColor:e.buttonTextColor??(ne==null?void 0:ne.color)??"#ffffff"},kf,Af,K),pe={borderRadius:A.scalingValue(V,t),borderWidth:A.scalingValue(_,t),borderStyle:"solid"},H={borderLeftWidth:A.scalingValue(_,t)},Ie=async de=>{if(de.preventDefault(),!l)return;const Z=Object.fromEntries(ce.map(Oe=>{var Je;return[Oe.name,((Je=F[Oe.name])==null?void 0:Je.trim())??""]}).filter(([,Oe])=>Oe));if(!fe){le("error"),Se("No integrations were found for this form.");return}if(Object.keys(Z).length===0)return;const Ne=A.getFormFieldValidationError(ce,F);if(Ne){le("error"),Se(Ne);return}le("submitting"),Se(null);try{const Oe=await fetch(fe,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Z)});if(!Oe.ok){const Je=await Oe.text();throw new Error(Je||`Request failed: ${Oe.status}`)}le("success"),ie(Object.fromEntries(ce.map(Je=>[Je.name,""])))}catch(Oe){le("error"),Se(Oe instanceof Error?Oe.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Ae}`.trim(),style:Y,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Mf(r)}}),a.jsxs("form",{onSubmit:Ie,className:`${r}-form`,style:{...pe,height:A.scalingValue(L,t),minHeight:A.scalingValue(L,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:ce.map(de=>a.jsx("input",{type:de.type==="email"?"email":de.type==="phone"?"tel":"text",name:de.name,autoComplete:"off",value:ee[de.name]??"",onChange:Z=>ie(Ne=>({...Ne,[de.name]:Z.target.value})),placeholder:de.placeholder,required:de.isRequired??de.type==="email",className:`${r}-input`,style:{...q,paddingRight:A.scalingValue(P.right,t),paddingLeft:A.scalingValue(P.left,t),paddingTop:A.scalingValue(P.top,t),paddingBottom:A.scalingValue(P.bottom,t)}},de.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:l?"submit":"button",className:`${r}-submitBtn`,"aria-label":G,style:{...D,...H,paddingRight:A.scalingValue(f.right,t),paddingLeft:A.scalingValue(f.left,t),paddingTop:A.scalingValue(f.top,t),paddingBottom:A.scalingValue(f.bottom,t),pointerEvents:l?"auto":void 0},children:T==="submitting"?"...":g?xe&&a.jsx(gn,{url:xe,className:`${r}-submitBtnIcon`,style:{maxWidth:A.scalingValue(w??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):ve})})]}),Le==="success"&&a.jsx("p",{className:`${r}-success`,style:{...se},children:U}),Le==="error"&&a.jsx("p",{className:`${r}-error`,style:{...se},role:"alert",children:oe??me??te})]})},kf={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"},Af=["hover","focus","filled","success","error"],Ff=`import React, { useMemo, useState } from 'react';
|
|
990
990
|
import { CommonComponentProps } from '../props';
|
|
991
991
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
|
|
992
992
|
import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
|
|
@@ -1565,7 +1565,7 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
|
|
|
1565
1565
|
};
|
|
1566
1566
|
|
|
1567
1567
|
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
1568
|
-
`,Rf="01M46GNEM2XB41HP5K8WY5BHD2",Mf=[{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."}],es={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Ef=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],kf={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:{...es.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:{...es.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:{...es.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:Mf,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Rf},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:.0053,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},t:{minHeight:.0651,iconMaxWidth:.1,stroke:.001,corners:.0026,buttonPadding:{top:.02604,right:.02604,bottom:.02604,left:.02604},inputPadding:{top:.02604,right:.02604,bottom:.02604,left:.0182},inputFontSize:.0208,inputLineHeight:.02604,buttonFontSize:.0208,buttonLineHeight:.02604,statusFontSize:.0208,statusLineHeight:.02604},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:.0027,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:[...Ef],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"]},Af={element:Tf,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},t:{width:500},m:{width:340}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",statusFontSettings:"fontFamily"},schema:kf,sourceCode:Pf};function Ff(e,t){const n=t>0?`${t}px`:"0px";return`
|
|
1568
|
+
`,Nf="01M46GNEM2XB41HP5K8WY5BHD2",_f=[{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."}],es={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Hf=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Wf={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:{...es.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:{...es.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:{...es.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:_f,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Nf},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:.0053,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},t:{minHeight:.0651,iconMaxWidth:.1,stroke:.001,corners:.0026,buttonPadding:{top:.02604,right:.02604,bottom:.02604,left:.02604},inputPadding:{top:.02604,right:.02604,bottom:.02604,left:.0182},inputFontSize:.0208,inputLineHeight:.02604,buttonFontSize:.0208,buttonLineHeight:.02604,statusFontSize:.0208,statusLineHeight:.02604},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:.0027,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:[...Hf],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"]},Of={element:Ef,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},t:{width:500},m:{width:340}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{inputFontSettings:"fontFamily",buttonFontSettings:"fontFamily",statusFontSettings:"fontFamily"},schema:Wf,sourceCode:Ff};function Df(e,t){const n=t>0?`${t}px`:"0px";return`
|
|
1569
1569
|
.${e}-marquee-wrapper {
|
|
1570
1570
|
overflow: hidden;
|
|
1571
1571
|
width: 100%;
|
|
@@ -1697,7 +1697,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
|
1697
1697
|
.${e}-image-hover-grayscale:hover video {
|
|
1698
1698
|
filter: grayscale(100%);
|
|
1699
1699
|
}
|
|
1700
|
-
`}const
|
|
1700
|
+
`}const Bf=30,zf=20,ts=3,jf=12,Vf=32,Gf=3,Xf=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},qf=(e,t)=>Array.from({length:t},()=>e).flat(),Uf=e=>typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"16:9",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"16:9",reversed:(e==null?void 0:e.reversed)??!1},Zu=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),Sc=(e,t)=>{if(t<=0||e.children.length<t)return 0;const n=e.children[0],i=e.children[t-1];if(!n||!i)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(l>0)return l;const c=Array.from({length:t},(u,p)=>e.children[p]),d=Zu(c);return d<=0?0:d+r*Math.max(0,t-1)},Yf=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Zu(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=Number.parseFloat(o.paddingRight)||0;return i+r*Math.max(0,e.children.length-1)+l},Kf=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Qf=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Kf(i,e))},Zf=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.assetId??"")},Jf=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,ey=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:r,imageHoverClass:l,isFirstSet:c,scaled:d,onFirstSetImageDone:u})=>{var j,E,w,L;const p=s.useRef(null),v=!!((j=e.image)!=null&&j.assetId&&Zf(e.image));s.useLayoutEffect(()=>{c&&Jf(p.current)&&(u==null||u())},[c,(E=e.image)==null?void 0:E.assetId,u]);const x=n.display==="cover",m=n.ratioValue??"1:1",h=n.reversed??!1,[b,S]=m.split(":").map(Number),$=(h?S:b)/(h?b:S),R=i/$,X=R>o?o:R,B=R>o?o*$:i,O=d(B),N=d(X),z={borderRadius:d(r)},C=x?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...z}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:d(i),maxHeight:d(o),objectFit:"contain",...z},I=((w=e.image)==null?void 0:w.assetId)&&(v?a.jsx("video",{ref:V=>{p.current=V},src:e.image.assetId,style:C,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:c?u:void 0,onError:c?u:void 0}):a.jsx("img",{ref:V=>{p.current=V},src:e.image.assetId,alt:((L=e.image)==null?void 0:L.name)??"",style:C,onLoad:c?u:void 0,onError:c?u:void 0}));return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...x?{width:O}:{width:"max-content",maxWidth:d(i),minWidth:0}},children:a.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...x?{width:O,height:N,overflow:"hidden",...z}:{width:"max-content",maxWidth:d(i),height:d(o)}},children:I&&e.link?a.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:Rt(`${t}-marquee-link`,!x&&`${t}-marquee-link-contain`),children:I}):I})})},ty=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=A.useScopedStyles(),[l,c]=s.useState(0),d=l>0?Math.round(l):0,u=s.useMemo(()=>Df(r,d),[r,d]),{speed:p,direction:v,pauseOnHover:x,gap:m,imageMaxWidth:h,imageMaxHeight:b,hoverEffect:S,cornerRadius:M=0}=e,y=s.useMemo(()=>Uf(e.imageFit),[e.imageFit]),$=(t==null?void 0:t.length)??0,R=!!o,X=!n||!!i,B=X&&S!=="off"&&S!=="randomize"?`${r}-image-hover-${S}`:void 0,O=n?!!i:!0,z=((t==null?void 0:t.length)??0)>0&&(O||!!n),C=Math.max(0,p)*Bf,I=we=>A.scalingValue(we,n??!1),j=s.useRef(null),E=s.useRef(null),w=s.useRef(null),[L,V]=s.useState(0),_=O&&x==="on",[K,P]=s.useState(!1),[f,U]=s.useState({}),te=s.useRef(f);te.current=f;const ce=s.useRef(null),F=s.useRef(0),ie=s.useRef(null),T=s.useMemo(()=>(t??[]).map(we=>{var Ae;return((Ae=we.image)==null?void 0:Ae.assetId)??""}).join("\0"),[t]),[le,J]=s.useState(ts),Se=s.useMemo(()=>{const we=t??[];return we.length===0||!(O||!!n)?we:qf(we,le)},[t,O,le,n]),Le=s.useMemo(()=>(t??[]).filter(we=>{var Ae;return!!((Ae=we.image)!=null&&Ae.assetId)}).length,[t]),me=z?Gf:1;s.useLayoutEffect(()=>{F.current=0,U({}),ce.current=null,J(ts),c(0)},[T]),s.useEffect(()=>{if(!X||S!=="randomize")return;const we=j.current;if(!we)return;const Ae=g=>{U(G=>{const Q=Array.from(g).filter(ue=>ue in G&&!Qf(we,ue));if(Q.length===0)return G;const ne={...G};return Q.forEach(ue=>{delete ne[ue]}),ne})},fe=new IntersectionObserver(g=>{const G=new Set;for(const Q of g){const ne=Q.target.dataset.marqueeItemIndex,ue=ne!==void 0?Number(ne):NaN;Number.isNaN(ue)||G.add(ue)}G.size>0&&Ae(G)},{root:we,threshold:0});Object.keys(f).forEach(g=>{const G=Number(g);we.querySelectorAll(`[data-marquee-item-index="${G}"]`).forEach(Q=>fe.observe(Q))});const ve={current:0},xe=()=>{const g=Object.keys(te.current);g.length!==0&&(Ae(g.map(Number)),ve.current=requestAnimationFrame(xe))};return Object.keys(te.current).length>0&&(ve.current=requestAnimationFrame(xe)),()=>{cancelAnimationFrame(ve.current),fe.disconnect()}},[S,f,X]),s.useEffect(()=>{const we=j.current;if(!we||typeof IntersectionObserver>"u")return;const Ae=we.querySelectorAll("video");if(Ae.length===0)return;const fe=new IntersectionObserver(ve=>{for(const xe of ve){const g=xe.target;xe.isIntersecting?g.paused&&g.play().catch(()=>{}):g.paused||g.pause()}},{threshold:0});return Ae.forEach(ve=>fe.observe(ve)),()=>fe.disconnect()},[z,Se,me,f]),s.useLayoutEffect(()=>{if(!z)return;const we=j.current,Ae=w.current;if(!we||!Ae)return;const fe={current:0},ve=()=>{const G=we.getBoundingClientRect().width||we.offsetWidth,Q=Yf(Ae),ne=ce.current,ue=typeof ne=="number"&&Math.abs(ne-Q)<=.25;ce.current=Q;let q=le,D=0;if((O||n)&&$>0&&G>0){const pe=Sc(Ae,$);if(pe>=Vf){D=pe;const H=Math.min(jf,Math.max(ts,Math.ceil(G/pe)+1));q=H,H!==le&&J(H)}}const Y=q!==le&&D>0?D*q:Q>0?Q:D>0?D*q:(()=>{const pe=Sc(Ae,$);return pe>0?pe*q:0})();Y>0?c(pe=>pe<=0?Y:!ue||Math.round(pe)===Math.round(Y)?pe:Y):!ue&&l<=0&&(cancelAnimationFrame(fe.current),fe.current=requestAnimationFrame(ve))},xe=()=>{cancelAnimationFrame(fe.current),fe.current=requestAnimationFrame(ve)};ie.current=xe,xe();const g=new ResizeObserver(xe);return g.observe(we),g.observe(Ae),()=>{ie.current=null,cancelAnimationFrame(fe.current),g.disconnect()}},[O,z,l,T,le,$,n]),s.useLayoutEffect(()=>{if(!z||d<=0)return;const we=E.current;we&&Xf(we)},[z,d,v,C]),s.useLayoutEffect(()=>{if(!z||l<=0){V(0);return}const we=E.current,Ae=w.current;if(!we||!Ae)return;const fe=()=>{const xe=we.offsetHeight||we.getBoundingClientRect().height,g=Array.from(Ae.children).reduce((Q,ne)=>Math.max(Q,ne.offsetHeight||ne.getBoundingClientRect().height),0),G=xe>0?xe:g;V(G>0?G:0)};fe();const ve=new ResizeObserver(fe);return ve.observe(we),ve.observe(Ae),()=>ve.disconnect()},[z,me,Se,n,m,h,b,l,y,f]),s.useLayoutEffect(()=>{if(!n||!R||!z||typeof window>"u")return;const we=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(we)},[n,R,z,v,l,L,m,Se]);const ye=()=>{_&&P(!0)},ee=()=>{_&&P(!1)},oe=s.useCallback(()=>{var we;F.current=Math.min(Le,F.current+1),(we=ie.current)==null||we.call(ie)},[Le]),re=s.useCallback((we,Ae)=>{U(fe=>{const ve=fe[we]??Ae,xe=(t??[]).filter(G=>G!==ve);if(xe.length===0)return fe;const g=xe[Math.floor(Math.random()*xe.length)];return{...fe,[we]:g}})},[t]),ge=(we,Ae,fe,ve)=>{const xe=X&&S==="randomize"&&y.display==="cover"?f[fe]??we:we,g=`max(${I(m)}, ${zf}px)`,G=`calc(-0.5 * (${g} + ${I(m)}))`;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-item-index":fe,onMouseEnter:X&&S==="randomize"&&y.display==="cover"?()=>re(fe,we):void 0,children:[a.jsx(ey,{item:xe,prefix:r,imageFit:y,imageMaxWidth:h,imageMaxHeight:b,cornerRadius:M,imageHoverClass:B,isEditor:n,isFirstSet:ve,scaled:I,onFirstSetImageDone:oe}),R&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${r}-gap-control`,style:{position:"absolute",top:0,right:G,width:g,height:"100%"}})]},`${Ae}-${fe}`)};if(z){const we=O?_&&K?"paused":"running":"paused",Ae=d>0&&C>0?d/C*1e3:0,fe=`${Math.max(0,Ae)/1e3}s`;return a.jsxs("div",{ref:j,className:Rt(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:L>0?{height:L}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{ref:E,className:`${r}-marquee-track`,"data-direction":v,onMouseEnter:ye,onMouseLeave:ee,style:{WebkitAnimationDuration:fe,animationDuration:fe,WebkitAnimationPlayState:we,animationPlayState:we},children:Array.from({length:me},(ve,xe)=>a.jsx("div",{ref:xe===0?w:void 0,className:Rt(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:I(m),paddingRight:I(m)},"aria-hidden":xe>0,children:Se.map((g,G)=>ge(g,xe,G,xe===0&&G<$))},`set-${xe}`))})]})}return a.jsxs("div",{ref:j,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{className:Rt(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:I(m),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((we,Ae)=>ge(we,0,Ae))},"marquee-static")]})},ny=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
|
|
1701
1701
|
import cn from 'classnames';
|
|
1702
1702
|
import { CommonComponentProps } from '../props';
|
|
1703
1703
|
import { scalingValue } from '../utils/scalingValue';
|
|
@@ -2501,7 +2501,7 @@ type MarqueeProps = {
|
|
|
2501
2501
|
isPreviewMode?: boolean;
|
|
2502
2502
|
isEditMode?: boolean;
|
|
2503
2503
|
} & CommonComponentProps;
|
|
2504
|
-
`,
|
|
2504
|
+
`,iy={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,display:{type:"numeric-input"}},imageFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.8,cornerRadius:0},t:{speed:1.64,gap:.02,imageMaxWidth:.5208,imageMaxHeight:.5208,cornerRadius:0},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278,cornerRadius:0}},displayRules:[{if:{name:"imageFit.display",value:"cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit","cornerRadius"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["cornerRadius"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:""},link:""},{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:""},link:""},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:""},link:""},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:""},link:""},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:""},link:""},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:""},link:""},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:""},link:""}]}},oy={element:ty,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple-Marquee.mp4"},schema:iy,sourceCode:ny,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function ry(e,t,n){const i=t>0?`${t}px`:"0px",o=n?`
|
|
2505
2505
|
.${e}-item-image-wrap {
|
|
2506
2506
|
display: flex;
|
|
2507
2507
|
flex: 0 0 auto;
|
|
@@ -2632,7 +2632,7 @@ ${o}
|
|
|
2632
2632
|
left: -9999px;
|
|
2633
2633
|
top: 0;
|
|
2634
2634
|
}
|
|
2635
|
-
`}const ey=30,ns=3,ty=12,ny=96,wc=3,ua=.72,iy=100,oy=10,ry=e=>e/iy,ay=e=>Math.max(0,e)/oy,sy=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},ly=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),io={ctx:void 0},cy=()=>io.ctx!==void 0?io.ctx:typeof document>"u"?(io.ctx=null,io.ctx):(io.ctx=document.createElement("canvas").getContext("2d"),io.ctx),dy=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},$c=e=>{e.style.transform=""},uy=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},py=(e,t)=>{const n=(i,o)=>{if(!i||i===t)return o;const r=o+i.offsetLeft,l=i.offsetParent;return!l||l===i?r:n(l,r)};return n(e,e.offsetWidth/2)},Uu=96,qu=(e,t,n)=>{if(t<=0||Math.abs(e)<=0||n<2)return null;const i=2*Math.PI/t,o=new Float64Array(n+1),r=new Float64Array(n+1),l=e*t,c=u=>Math.sqrt(1+(l*Math.cos(t*u))**2),d=i/n;return Array.from({length:n},(u,p)=>{const v=p*d,b=v+d;o[p+1]=b,r[p+1]=r[p]+(c(v)+c(b))*.5*d}),{wavelength:i,periodArc:r[n],x:o,s:r}},my=(e,t)=>{const n=qu(e,t,Uu);return!n||n.wavelength<=0?1:n.periodArc/n.wavelength},gy=(e,t)=>{if(e.periodArc<=0)return t;const n=t<0?-1:1,i=Math.abs(t),o=Math.floor(i/e.periodArc),r=i-o*e.periodArc,{s:l,x:c}=e,d=(m,h)=>{if(h-m<=1)return[m,h];const x=m+h>>1;return l[x]<=r?d(x,h):d(m,x)},[u,p]=d(0,l.length-1),v=l[p]-l[u],b=v>0?(r-l[u])/v:0;return n*(o*e.wavelength+c[u]+(c[p]-c[u])*b)},hy=(e,t,n,i,o=0)=>{const r=Math.max(0,n),l=e>0?2*Math.PI*r/e:0,c=h=>i+t*Math.sin(l*h),d=h=>t*l*Math.cos(l*h),u=-o,v=e+o-u,b=Math.max(4,Math.ceil(r*4*(v/Math.max(e,1)))),m=Array.from({length:b},(h,x)=>{const S=u+x/b*v,P=u+(x+1)/b*v,f=P-S,w=c(S),N=c(P),V=S+f/3,B=w+d(S)*f/3,H=P-f/3,_=N-d(P)*f/3;return`C${V.toFixed(2)} ${B.toFixed(2)} ${H.toFixed(2)} ${_.toFixed(2)} ${P.toFixed(2)} ${N.toFixed(2)}`});return[`M${u.toFixed(2)} ${c(u).toFixed(2)}`,...m].join(" ")},fy=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:r,isCurve:l})=>{var m;const c=o!==0?{...n,transform:`translateY(${o}px)`}:n,d=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${ua}em`},u=((m=e.image)==null?void 0:m.assetId)&&a.jsx("img",{src:e.image.assetId,alt:e.image.name??"",className:`${t}-item-image`,style:d}),p=u&&(l?a.jsx("span",{className:`${t}-item-image-wrap`,"data-marquee-wave-node":!0,children:u}):u),v=l?a.jsx("span",{className:`${t}-text`,style:c,children:Array.from(e.text).map((h,x)=>a.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:a.jsx("span",{className:`${t}-glyph-inner`,children:h===" "?" ":h})},x))}):a.jsx("span",{className:`${t}-text`,style:c,children:e.text}),b=a.jsxs(a.Fragment,{children:[p,v]});return a.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:r},children:e.link?a.jsx("a",{href:e.link,className:`${t}-item-link`,style:{gap:r},children:b}):b})},yy=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=k.useScopedStyles(),[r,l]=s.useState(0),c=r>0?Math.round(r):0,{speed:d,direction:u,pauseOnHover:p,gap:v,layoutType:b,curveAmplitude:m,curveFrequency:h,textFontFamily:x,textFontSettings:S,textFontSize:P,textLetterSpacing:f,textWordSpacing:w,textTextAppearance:N,textColor:V,backgroundColor:B,ribbonWidth:H}=e,_=H??P,z=b==="curve",$=ry(m),E=ay(h),j=s.useMemo(()=>Jf(o,c,z),[o,c,z]),L=s.useMemo(()=>en({fontSettings:{fontFamily:x,fontWeight:S.fontWeight,fontStyle:S.fontStyle},letterSpacing:f,wordSpacing:w,fontSize:P,lineHeight:P,textAppearance:N,color:V},n),[x,S,f,w,P,N,V,n]),C=De=>k.scalingValue(De,n??!1),T=((t==null?void 0:t.length)??0)>0,G=n?!!i:!0,A=T&&(G||!!n),Y=Math.max(0,d)*ey,R=G&&p==="on",[y,U]=s.useState(!1),ee=G?R&&y?"paused":"running":"paused",de=ee==="running"&&Y>0&&c>0,F=c>0&&Y>0?c/Y*1e3:0,ie=s.useRef(null),I=s.useRef(null),se=s.useRef(null),J=s.useRef(null),Se=s.useRef(null),Re=s.useRef(null),pe=s.useRef(de),he=s.useRef(null),te=s.useRef(null),le=s.useRef($),re=s.useRef(E);pe.current=de,le.current=$,re.current=E;const[fe,xe]=s.useState(0),[Te,me]=s.useState(0),[be,we]=s.useState(0),[g,X]=s.useState(0),[Z,ne]=s.useState(0),ye=s.useMemo(()=>(t??[]).map(De=>{var ke;return`${De.text}\0${((ke=De.image)==null?void 0:ke.assetId)??""}\0${De.link??""}`}).join("\0"),[t]),[K,D]=s.useState(ns),ce=s.useMemo(()=>{const De=t??[];return De.length===0||!(G||n)?De:ly(De,K)},[t,G,K,n]),q=A?wc:1;s.useLayoutEffect(()=>{D(ns),l(0)},[ye]),s.useLayoutEffect(()=>{var ze;const De=Re.current;if(!De)return;const ke=()=>{const We=getComputedStyle(De),mt=parseFloat(We.fontSize)||0;if(mt<=0)return;const rt=cy();if(!rt){xe(mt*ua),me(0);return}rt.font=`${We.fontStyle} ${We.fontWeight} ${mt}px ${We.fontFamily}`;const St=rt.measureText("H"),Nt=St.actualBoundingBoxAscent>0?St.actualBoundingBoxAscent:mt*ua,jt=Math.max(0,St.actualBoundingBoxDescent||0),xt=St.fontBoundingBoxAscent||0,Ce=St.fontBoundingBoxDescent||0;xe(lt=>Math.abs(lt-Nt)>.5?Nt:lt);const He=xt>0||Ce>0?(Ce-jt-(xt-Nt))/2:0;me(lt=>Math.abs(lt-He)>.25?He:lt)};ke();const ht=typeof document<"u"?document.fonts:void 0;(ze=ht==null?void 0:ht.ready)==null||ze.then(ke).catch(()=>{});const Be=new ResizeObserver(ke);return Be.observe(De),()=>Be.disconnect()},[L.fontFamily,L.fontWeight,L.fontStyle,L.fontSize,L.lineHeight]),s.useLayoutEffect(()=>{if(!A)return;const De=ie.current,ke=J.current;if(!De||!ke)return;const ht={id:0},Be=()=>{const rt=De.offsetWidth||De.getBoundingClientRect().width,St=ke.offsetWidth||ke.getBoundingClientRect().width;if(T&&rt>0&&St>0){const Nt=St/K;if(Nt>0){let jt=rt,xt=ty;if(z){const He=rt*le.current,lt=re.current,et=lt>0?2*Math.PI*lt/rt:0,yt=my(He,et);jt=Math.max(rt,yt*rt/(wc-1)),xt=ny}const Ce=Math.min(xt,Math.max(ns,Math.ceil(jt/Nt)+1));if(Ce!==K){D(Ce);return}}}St>0&&l(St)},ze=()=>{cancelAnimationFrame(ht.id),ht.id=requestAnimationFrame(Be)};ze();const We=new ResizeObserver(ze);We.observe(De),We.observe(ke);const mt=()=>{document.hidden||ze()};return document.addEventListener("visibilitychange",mt),window.addEventListener("pageshow",mt),window.addEventListener("focus",mt),()=>{cancelAnimationFrame(ht.id),We.disconnect(),document.removeEventListener("visibilitychange",mt),window.removeEventListener("pageshow",mt),window.removeEventListener("focus",mt)}},[A,ye,K,T,fe,z,$,E]),s.useLayoutEffect(()=>{const De=Se.current;if(!De)return;const ke={id:0},ht=()=>{const ze=De.offsetHeight;ze>0&&ne(We=>Math.abs(We-ze)>.5?ze:We)};ke.id=requestAnimationFrame(ht);const Be=new ResizeObserver(()=>{cancelAnimationFrame(ke.id),ke.id=requestAnimationFrame(ht)});return Be.observe(De),()=>{cancelAnimationFrame(ke.id),Be.disconnect()}},[_,n]),s.useLayoutEffect(()=>{if(!z){we(0),X(0);return}const De=ie.current,ke=J.current;if(!De||!ke)return;const ht={id:0},Be=()=>{const We=De.offsetWidth,mt=ke.offsetHeight;We>0&&X(rt=>Math.abs(rt-We)>.5?We:rt),mt>0&&we(rt=>Math.abs(rt-mt)>.5?mt:rt)};ht.id=requestAnimationFrame(Be);const ze=new ResizeObserver(()=>{cancelAnimationFrame(ht.id),ht.id=requestAnimationFrame(Be)});return ze.observe(De),ze.observe(ke),()=>{cancelAnimationFrame(ht.id),ze.disconnect()}},[z,ye,fe,P,A]),s.useLayoutEffect(()=>{if(!A||c<=0)return;const De=se.current;De&&sy(De)},[A,c,u,Y]),s.useLayoutEffect(()=>{if(!z||!T)return;const De=ie.current;if(!De)return;const ke={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},ht=()=>{for(const Nt of ke.itemsCache)for(const jt of Nt.glyphs)$c(jt.inner)},Be=()=>{const Nt=I.current??De;ke.itemsCache=Array.from(De.querySelectorAll("[data-marquee-text-item]"),jt=>{const xt=[];return jt.querySelectorAll("[data-marquee-wave-node]").forEach(Ce=>{const He=Ce.firstElementChild;He&&xt.push({inner:He,layoutLocalX:py(Ce,Nt)})}),{item:jt,glyphs:xt}}),ke.cacheDirty=!1},ze=()=>{ke.cacheDirty&&Be();const jt=(I.current??De).offsetWidth||1,xt=jt*le.current,Ce=re.current,He=2*Math.PI*Ce/jt,lt=`${jt}|${xt}|${He}`;if(lt!==ke.lutKey&&(ke.lutKey=lt,ke.lut=qu(xt,He,Uu)),Math.abs(xt)<=0||He<=0){ht();return}const et=se.current,yt=et?uy(getComputedStyle(et).transform):0,Rt=De.getBoundingClientRect(),At=Rt.left,qt=Rt.right,$t=ke.lut&&ke.lut.wavelength>0?Math.max(0,(ke.lut.periodArc/ke.lut.wavelength-1)*jt):0;for(const{item:zt,glyphs:on}of ke.itemsCache){const vt=zt.getBoundingClientRect();if(vt.right<At||vt.left>qt+$t){for(const ft of on)$c(ft.inner);continue}for(const ft of on){const Me=ft.layoutLocalX+yt,nt=ke.lut?gy(ke.lut,Me):Me,ct=He*nt,gt=xt*Math.sin(ct),Et=xt*He*Math.cos(ct),wt=Math.atan(Et)*(180/Math.PI);dy(ft.inner,nt-Me,gt,wt)}}},We=()=>{ke.cancelled||(ke.raf=0,ze(),pe.current&&!document.hidden&&(ke.raf=requestAnimationFrame(We)))},mt=()=>{ke.cancelled||ke.raf||(ke.raf=requestAnimationFrame(We))},rt=()=>{ke.cacheDirty=!0,ze(),mt()};he.current=mt,te.current=rt,ze(),mt();const St=()=>{if(document.hidden){cancelAnimationFrame(ke.raf),ke.raf=0;return}cancelAnimationFrame(ke.raf),ke.raf=0,rt()};return document.addEventListener("visibilitychange",St),window.addEventListener("pageshow",St),window.addEventListener("focus",St),()=>{ke.cancelled=!0,he.current=null,te.current=null,cancelAnimationFrame(ke.raf),document.removeEventListener("visibilitychange",St),window.removeEventListener("pageshow",St),window.removeEventListener("focus",St),ht()}},[z,T]),s.useLayoutEffect(()=>{var De;!z||!T||(De=te.current)==null||De.call(te)},[z,T,r,ye,K,fe,$,E,g]),s.useLayoutEffect(()=>{var De;(De=he.current)==null||De.call(he)},[de,u]);const ue=De=>{R&&De.pointerType==="mouse"&&U(!0)},W=()=>{R&&U(!1)},Le=z?Math.abs($)*100:0,ae=C(_),Q={minHeight:ae,...z?{paddingTop:`${Le}%`,paddingBottom:`${Le}%`}:{}},Ne={height:ae,...z?{visibility:"hidden"}:{backgroundColor:B}},Oe={gap:C(v),minHeight:ae},it=g*$,qe=Math.abs(it),Je=Z>0?Z:be,ot=Math.max(be,Je),Ve=qe+ot/2,ve=Math.max(Je,1),Fe=z&&g>0&&ot>0?hy(g,it,E,Ve,ve):"",Xe=qe*2+ot,Ye=Fe?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${g} ${Xe}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:Fe,fill:"none",stroke:B,strokeWidth:Je,strokeLinecap:"butt",strokeLinejoin:"round"})}):null,Pe=a.jsx("div",{ref:Se,className:`${o}-ribbon`,style:Ne,"aria-hidden":!0}),_e={...L,lineHeight:fe>0?`${fe}px`:`${ua}em`},Ke=(De,ke,ht)=>a.jsx(fy,{item:De,prefix:o,textCss:_e,capHeightPx:fe,opticalOffsetY:Te,imageGapPx:C(v),isCurve:z},`${ke}-${ht}`),Ze=a.jsx("span",{ref:Re,"aria-hidden":!0,className:`${o}-cap-ref`,style:L,children:"H"}),st=`${Math.max(0,F)/1e3}s`,Ue=A?a.jsx("div",{ref:se,className:`${o}-marquee-track`,"data-direction":u,onPointerEnter:ue,onPointerLeave:W,style:{WebkitAnimationDuration:st,animationDuration:st,WebkitAnimationPlayState:ee,animationPlayState:ee},children:Array.from({length:q},(De,ke)=>a.jsx("div",{ref:ke===0?J:void 0,className:`${o}-marquee-set`,style:{...Oe,paddingRight:C(v)},"aria-hidden":ke>0,children:ce.map((ht,Be)=>Ke(ht,ke,Be))},`set-${ke}`))}):a.jsx("div",{ref:J,className:Pt(`${o}-marquee-set`,`${o}-marquee-static`),style:Oe,children:t==null?void 0:t.map((De,ke)=>Ke(De,0,ke))});return a.jsxs("div",{ref:ie,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:j}}),Ze,a.jsxs("div",{ref:I,className:`${o}-marquee-wrapper`,style:Q,children:[Pe,Ye,Ue]})]})},vy=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type PointerEvent as ReactPointerEvent } from 'react';
|
|
2635
|
+
`}const ay=30,ns=3,sy=12,ly=96,wc=3,ua=.72,cy=100,dy=10,uy=e=>e/cy,py=e=>Math.max(0,e)/dy,my=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},gy=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),ro={ctx:void 0},hy=()=>ro.ctx!==void 0?ro.ctx:typeof document>"u"?(ro.ctx=null,ro.ctx):(ro.ctx=document.createElement("canvas").getContext("2d"),ro.ctx),fy=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},$c=e=>{e.style.transform=""},yy=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},vy=(e,t)=>{const n=(i,o)=>{if(!i||i===t)return o;const r=o+i.offsetLeft,l=i.offsetParent;return!l||l===i?r:n(l,r)};return n(e,e.offsetWidth/2)},Ju=96,ep=(e,t,n)=>{if(t<=0||Math.abs(e)<=0||n<2)return null;const i=2*Math.PI/t,o=new Float64Array(n+1),r=new Float64Array(n+1),l=e*t,c=u=>Math.sqrt(1+(l*Math.cos(t*u))**2),d=i/n;return Array.from({length:n},(u,p)=>{const v=p*d,x=v+d;o[p+1]=x,r[p+1]=r[p]+(c(v)+c(x))*.5*d}),{wavelength:i,periodArc:r[n],x:o,s:r}},xy=(e,t)=>{const n=ep(e,t,Ju);return!n||n.wavelength<=0?1:n.periodArc/n.wavelength},by=(e,t)=>{if(e.periodArc<=0)return t;const n=t<0?-1:1,i=Math.abs(t),o=Math.floor(i/e.periodArc),r=i-o*e.periodArc,{s:l,x:c}=e,d=(m,h)=>{if(h-m<=1)return[m,h];const b=m+h>>1;return l[b]<=r?d(b,h):d(m,b)},[u,p]=d(0,l.length-1),v=l[p]-l[u],x=v>0?(r-l[u])/v:0;return n*(o*e.wavelength+c[u]+(c[p]-c[u])*x)},Sy=(e,t,n,i,o=0)=>{const r=Math.max(0,n),l=e>0?2*Math.PI*r/e:0,c=h=>i+t*Math.sin(l*h),d=h=>t*l*Math.cos(l*h),u=-o,v=e+o-u,x=Math.max(4,Math.ceil(r*4*(v/Math.max(e,1)))),m=Array.from({length:x},(h,b)=>{const S=u+b/x*v,M=u+(b+1)/x*v,y=M-S,$=c(S),R=c(M),X=S+y/3,B=$+d(S)*y/3,O=M-y/3,N=R-d(M)*y/3;return`C${X.toFixed(2)} ${B.toFixed(2)} ${O.toFixed(2)} ${N.toFixed(2)} ${M.toFixed(2)} ${R.toFixed(2)}`});return[`M${u.toFixed(2)} ${c(u).toFixed(2)}`,...m].join(" ")},wy=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:r,isCurve:l})=>{var m;const c=o!==0?{...n,transform:`translateY(${o}px)`}:n,d=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${ua}em`},u=((m=e.image)==null?void 0:m.assetId)&&a.jsx("img",{src:e.image.assetId,alt:e.image.name??"",className:`${t}-item-image`,style:d}),p=u&&(l?a.jsx("span",{className:`${t}-item-image-wrap`,"data-marquee-wave-node":!0,children:u}):u),v=l?a.jsx("span",{className:`${t}-text`,style:c,children:Array.from(e.text).map((h,b)=>a.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:a.jsx("span",{className:`${t}-glyph-inner`,children:h===" "?" ":h})},b))}):a.jsx("span",{className:`${t}-text`,style:c,children:e.text}),x=a.jsxs(a.Fragment,{children:[p,v]});return a.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:r},children:e.link?a.jsx("a",{href:e.link,className:`${t}-item-link`,style:{gap:r},children:x}):x})},$y=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=A.useScopedStyles(),[r,l]=s.useState(0),c=r>0?Math.round(r):0,{speed:d,direction:u,pauseOnHover:p,gap:v,layoutType:x,curveAmplitude:m,curveFrequency:h,textFontFamily:b,textFontSettings:S,textFontSize:M,textLetterSpacing:y,textWordSpacing:$,textTextAppearance:R,textColor:X,backgroundColor:B,ribbonWidth:O}=e,N=O??M,z=x==="curve",C=uy(m),I=py(h),j=s.useMemo(()=>ry(o,c,z),[o,c,z]),E=s.useMemo(()=>nn({fontSettings:{fontFamily:b,fontWeight:S.fontWeight,fontStyle:S.fontStyle},letterSpacing:y,wordSpacing:$,fontSize:M,lineHeight:M,textAppearance:R,color:X},n),[b,S,y,$,M,R,X,n]),w=qe=>A.scalingValue(qe,n??!1),L=((t==null?void 0:t.length)??0)>0,V=n?!!i:!0,_=L&&(V||!!n),K=Math.max(0,d)*ay,P=V&&p==="on",[f,U]=s.useState(!1),te=V?P&&f?"paused":"running":"paused",ce=te==="running"&&K>0&&c>0,F=c>0&&K>0?c/K*1e3:0,ie=s.useRef(null),T=s.useRef(null),le=s.useRef(null),J=s.useRef(null),Se=s.useRef(null),Le=s.useRef(null),me=s.useRef(ce),ye=s.useRef(null),ee=s.useRef(null),oe=s.useRef(C),re=s.useRef(I);me.current=ce,oe.current=C,re.current=I;const[ge,we]=s.useState(0),[Ae,fe]=s.useState(0),[ve,xe]=s.useState(0),[g,G]=s.useState(0),[Q,ne]=s.useState(0),ue=s.useMemo(()=>(t??[]).map(qe=>{var Ee;return`${qe.text}\0${((Ee=qe.image)==null?void 0:Ee.assetId)??""}\0${qe.link??""}`}).join("\0"),[t]),[q,D]=s.useState(ns),se=s.useMemo(()=>{const qe=t??[];return qe.length===0||!(V||n)?qe:gy(qe,q)},[t,V,q,n]),Y=_?wc:1;s.useLayoutEffect(()=>{D(ns),l(0)},[ue]),s.useLayoutEffect(()=>{var We;const qe=Le.current;if(!qe)return;const Ee=()=>{const Ve=getComputedStyle(qe),ct=parseFloat(Ve.fontSize)||0;if(ct<=0)return;const ot=hy();if(!ot){we(ct*ua),fe(0);return}ot.font=`${Ve.fontStyle} ${Ve.fontWeight} ${ct}px ${Ve.fontFamily}`;const xt=ot.measureText("H"),Pt=xt.actualBoundingBoxAscent>0?xt.actualBoundingBoxAscent:ct*ua,Vt=Math.max(0,xt.actualBoundingBoxDescent||0),vt=xt.fontBoundingBoxAscent||0,Mt=xt.fontBoundingBoxDescent||0;we(Gt=>Math.abs(Gt-Pt)>.5?Pt:Gt);const Ht=vt>0||Mt>0?(Mt-Vt-(vt-Pt))/2:0;fe(Gt=>Math.abs(Gt-Ht)>.25?Ht:Gt)};Ee();const pt=typeof document<"u"?document.fonts:void 0;(We=pt==null?void 0:pt.ready)==null||We.then(Ee).catch(()=>{});const ke=new ResizeObserver(Ee);return ke.observe(qe),()=>ke.disconnect()},[E.fontFamily,E.fontWeight,E.fontStyle,E.fontSize,E.lineHeight]),s.useLayoutEffect(()=>{if(!_)return;const qe=ie.current,Ee=J.current;if(!qe||!Ee)return;const pt={id:0},ke=()=>{const ot=qe.offsetWidth||qe.getBoundingClientRect().width,xt=Ee.offsetWidth||Ee.getBoundingClientRect().width;if(L&&ot>0&&xt>0){const Pt=xt/q;if(Pt>0){let Vt=ot,vt=sy;if(z){const Ht=ot*oe.current,Gt=re.current,kt=Gt>0?2*Math.PI*Gt/ot:0,Pe=xy(Ht,kt);Vt=Math.max(ot,Pe*ot/(wc-1)),vt=ly}const Mt=Math.min(vt,Math.max(ns,Math.ceil(Vt/Pt)+1));if(Mt!==q){D(Mt);return}}}xt>0&&l(xt)},We=()=>{cancelAnimationFrame(pt.id),pt.id=requestAnimationFrame(ke)};We();const Ve=new ResizeObserver(We);Ve.observe(qe),Ve.observe(Ee);const ct=()=>{document.hidden||We()};return document.addEventListener("visibilitychange",ct),window.addEventListener("pageshow",ct),window.addEventListener("focus",ct),()=>{cancelAnimationFrame(pt.id),Ve.disconnect(),document.removeEventListener("visibilitychange",ct),window.removeEventListener("pageshow",ct),window.removeEventListener("focus",ct)}},[_,ue,q,L,ge,z,C,I]),s.useLayoutEffect(()=>{const qe=Se.current;if(!qe)return;const Ee={id:0},pt=()=>{const We=qe.offsetHeight;We>0&&ne(Ve=>Math.abs(Ve-We)>.5?We:Ve)};Ee.id=requestAnimationFrame(pt);const ke=new ResizeObserver(()=>{cancelAnimationFrame(Ee.id),Ee.id=requestAnimationFrame(pt)});return ke.observe(qe),()=>{cancelAnimationFrame(Ee.id),ke.disconnect()}},[N,n]),s.useLayoutEffect(()=>{if(!z){xe(0),G(0);return}const qe=ie.current,Ee=J.current;if(!qe||!Ee)return;const pt={id:0},ke=()=>{const Ve=qe.offsetWidth,ct=Ee.offsetHeight;Ve>0&&G(ot=>Math.abs(ot-Ve)>.5?Ve:ot),ct>0&&xe(ot=>Math.abs(ot-ct)>.5?ct:ot)};pt.id=requestAnimationFrame(ke);const We=new ResizeObserver(()=>{cancelAnimationFrame(pt.id),pt.id=requestAnimationFrame(ke)});return We.observe(qe),We.observe(Ee),()=>{cancelAnimationFrame(pt.id),We.disconnect()}},[z,ue,ge,M,_]),s.useLayoutEffect(()=>{if(!_||c<=0)return;const qe=le.current;qe&&my(qe)},[_,c,u,K]),s.useLayoutEffect(()=>{if(!z||!L)return;const qe=ie.current;if(!qe)return;const Ee={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},pt=()=>{for(const Pt of Ee.itemsCache)for(const Vt of Pt.glyphs)$c(Vt.inner)},ke=()=>{const Pt=T.current??qe;Ee.itemsCache=Array.from(qe.querySelectorAll("[data-marquee-text-item]"),Vt=>{const vt=[];return Vt.querySelectorAll("[data-marquee-wave-node]").forEach(Mt=>{const Ht=Mt.firstElementChild;Ht&&vt.push({inner:Ht,layoutLocalX:vy(Mt,Pt)})}),{item:Vt,glyphs:vt}}),Ee.cacheDirty=!1},We=()=>{Ee.cacheDirty&&ke();const Vt=(T.current??qe).offsetWidth||1,vt=Vt*oe.current,Mt=re.current,Ht=2*Math.PI*Mt/Vt,Gt=`${Vt}|${vt}|${Ht}`;if(Gt!==Ee.lutKey&&(Ee.lutKey=Gt,Ee.lut=ep(vt,Ht,Ju)),Math.abs(vt)<=0||Ht<=0){pt();return}const kt=le.current,Pe=kt?yy(getComputedStyle(kt).transform):0,Be=qe.getBoundingClientRect(),ft=Be.left,$t=Be.right,et=Ee.lut&&Ee.lut.wavelength>0?Math.max(0,(Ee.lut.periodArc/Ee.lut.wavelength-1)*Vt):0;for(const{item:Et,glyphs:Xt}of Ee.itemsCache){const mt=Et.getBoundingClientRect();if(mt.right<ft||mt.left>$t+et){for(const gt of Xt)$c(gt.inner);continue}for(const gt of Xt){const Re=gt.layoutLocalX+Pe,tt=Ee.lut?by(Ee.lut,Re):Re,nt=Ht*tt,st=vt*Math.sin(nt),At=vt*Ht*Math.cos(nt),St=Math.atan(At)*(180/Math.PI);fy(gt.inner,tt-Re,st,St)}}},Ve=()=>{Ee.cancelled||(Ee.raf=0,We(),me.current&&!document.hidden&&(Ee.raf=requestAnimationFrame(Ve)))},ct=()=>{Ee.cancelled||Ee.raf||(Ee.raf=requestAnimationFrame(Ve))},ot=()=>{Ee.cacheDirty=!0,We(),ct()};ye.current=ct,ee.current=ot,We(),ct();const xt=()=>{if(document.hidden){cancelAnimationFrame(Ee.raf),Ee.raf=0;return}cancelAnimationFrame(Ee.raf),Ee.raf=0,ot()};return document.addEventListener("visibilitychange",xt),window.addEventListener("pageshow",xt),window.addEventListener("focus",xt),()=>{Ee.cancelled=!0,ye.current=null,ee.current=null,cancelAnimationFrame(Ee.raf),document.removeEventListener("visibilitychange",xt),window.removeEventListener("pageshow",xt),window.removeEventListener("focus",xt),pt()}},[z,L]),s.useLayoutEffect(()=>{var qe;!z||!L||(qe=ee.current)==null||qe.call(ee)},[z,L,r,ue,q,ge,C,I,g]),s.useLayoutEffect(()=>{var qe;(qe=ye.current)==null||qe.call(ye)},[ce,u]);const pe=qe=>{P&&qe.pointerType==="mouse"&&U(!0)},H=()=>{P&&U(!1)},Ie=z?Math.abs(C)*100:0,de=w(N),Z={minHeight:de,...z?{paddingTop:`${Ie}%`,paddingBottom:`${Ie}%`}:{}},Ne={height:de,...z?{visibility:"hidden"}:{backgroundColor:B}},Oe={gap:w(v),minHeight:de},Je=g*C,De=Math.abs(Je),Ze=Q>0?Q:ve,at=Math.max(ve,Ze),Xe=De+at/2,be=Math.max(Ze,1),He=z&&g>0&&at>0?Sy(g,Je,I,Xe,be):"",je=De*2+at,Qe=He?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${g} ${je}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:He,fill:"none",stroke:B,strokeWidth:Ze,strokeLinecap:"butt",strokeLinejoin:"round"})}):null,Ce=a.jsx("div",{ref:Se,className:`${o}-ribbon`,style:Ne,"aria-hidden":!0}),_e={...E,lineHeight:ge>0?`${ge}px`:`${ua}em`},Ue=(qe,Ee,pt)=>a.jsx(wy,{item:qe,prefix:o,textCss:_e,capHeightPx:ge,opticalOffsetY:Ae,imageGapPx:w(v),isCurve:z},`${Ee}-${pt}`),Ye=a.jsx("span",{ref:Le,"aria-hidden":!0,className:`${o}-cap-ref`,style:E,children:"H"}),lt=`${Math.max(0,F)/1e3}s`,it=_?a.jsx("div",{ref:le,className:`${o}-marquee-track`,"data-direction":u,onPointerEnter:pe,onPointerLeave:H,style:{WebkitAnimationDuration:lt,animationDuration:lt,WebkitAnimationPlayState:te,animationPlayState:te},children:Array.from({length:Y},(qe,Ee)=>a.jsx("div",{ref:Ee===0?J:void 0,className:`${o}-marquee-set`,style:{...Oe,paddingRight:w(v)},"aria-hidden":Ee>0,children:se.map((pt,ke)=>Ue(pt,Ee,ke))},`set-${Ee}`))}):a.jsx("div",{ref:J,className:Rt(`${o}-marquee-set`,`${o}-marquee-static`),style:Oe,children:t==null?void 0:t.map((qe,Ee)=>Ue(qe,0,Ee))});return a.jsxs("div",{ref:ie,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:j}}),Ye,a.jsxs("div",{ref:T,className:`${o}-marquee-wrapper`,style:Z,children:[Ce,Qe,it]})]})},Cy=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type PointerEvent as ReactPointerEvent } from 'react';
|
|
2636
2636
|
import cn from 'classnames';
|
|
2637
2637
|
import { CommonComponentProps } from '../props';
|
|
2638
2638
|
import { scalingValue } from '../utils/scalingValue';
|
|
@@ -3567,7 +3567,7 @@ type MarqueeTextProps = {
|
|
|
3567
3567
|
isPreviewMode?: boolean;
|
|
3568
3568
|
isEditMode?: boolean;
|
|
3569
3569
|
} & CommonComponentProps;
|
|
3570
|
-
`,
|
|
3570
|
+
`,Ty={fontSettings:{type:"object",scope:"common",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Iy={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},ribbonWidth:{type:"number",scope:"layout",title:"Ribbon Width",min:0,display:{type:"numeric-input"}},layoutType:{type:"string",scope:"common",title:"Path Type",display:{type:"toggle-cycle",enum:["straight","curve"]}},curveAmplitude:{type:"number",scope:"layout",title:"Amplitude",min:-30,max:30,step:1,display:{type:"common-numeric-input",visible:!1}},curveFrequency:{type:"number",scope:"layout",title:"Frequency",min:0,max:100,step:1,display:{type:"common-numeric-input",visible:!1}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Ty.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"},backgroundColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Ribbon Color"}},defaults:{direction:"left",pauseOnHover:"off",layoutType:"curve",textFontFamily:"Antique Série",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#FFFFFF",backgroundColor:"#2E12F0"},layoutDefaults:{m:{speed:.55,gap:.04,ribbonWidth:.08,curveAmplitude:6,curveFrequency:15,textFontSize:.08},t:{speed:1.3,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:15,textFontSize:.07},d:{speed:2.5,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:18,textFontSize:.071}},displayRules:[{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveAmplitude.display.visible",value:!0}},{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveFrequency.display.visible",value:!0}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","ribbonWidth","layoutType","curveAmplitude","curveFrequency"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction","speed"]},{type:"row",items:["ribbonWidth","gap"]},{type:"row",items:["pauseOnHover","layoutType"]},{type:"row",items:["curveAmplitude","curveFrequency"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}],paletteBookmark:{items:["textColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{text:{placeholder:"Add text...",label:"Text",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-input"}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}}},default:[{text:"NEW WORK",image:{assetId:"01M3QM74XF10Z2N5P1Y0J0XDQQ",name:""},link:""}]}},Ly={element:$y,id:"marquee-text",name:"Marquee Text",category:"typography",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Text_Marquee.mp4"},schema:Iy,sourceCode:Cy,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}};function Py(e,t){const n=t>0?`${t}px`:"0px";return`
|
|
3571
3571
|
.${e}-marquee-wrapper {
|
|
3572
3572
|
overflow: hidden;
|
|
3573
3573
|
width: 100%;
|
|
@@ -3656,7 +3656,7 @@ type MarqueeTextProps = {
|
|
|
3656
3656
|
pointer-events: auto;
|
|
3657
3657
|
z-index: 10;
|
|
3658
3658
|
}
|
|
3659
|
-
`}const
|
|
3659
|
+
`}const Ry=30,Cc=2,My=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},Ey=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=A.useScopedStyles(),{align:l,speed:c,direction:d,pauseOnHover:u,gap:p,cardWidth:v,corners:x,stroke:m,strokeColor:h,bgColor:b,padding:S,logoMarginTop:M,logoWidth:y,logoHeight:$,captionMarginTop:R}=e,X=!!o,B=((t==null?void 0:t.length)??0)>0,O=c>0&&(!n||i),N=B&&(O||n),z=Math.max(0,c)*Ry,C=D=>A.scalingValue(D,n??!1),I=s.useRef(null),j=s.useRef(null),E=s.useRef(null),[w,L]=s.useState(0),[V,_]=s.useState(0),K=V>0?V:0,P=s.useMemo(()=>Py(r,K),[r,K]),[f,U]=s.useState(0),te=O&&u==="on",[ce,F]=s.useState(!1),ie=s.useRef(null),[T,le]=s.useState(0),[J,Se]=s.useState(0),Le=s.useRef(null),me=D=>{var Y,pe,H,Ie,de;return{fontSettings:{fontFamily:(e==null?void 0:e[`${D}FontFamily`])??"Arial",fontWeight:((Y=e==null?void 0:e[`${D}FontSettings`])==null?void 0:Y.fontWeight)??400,fontStyle:((pe=e==null?void 0:e[`${D}FontSettings`])==null?void 0:pe.fontStyle)??"normal"},textAppearance:{textTransform:((H=e==null?void 0:e[`${D}TextAppearance`])==null?void 0:H.textTransform)??"none",textDecoration:((Ie=e==null?void 0:e[`${D}TextAppearance`])==null?void 0:Ie.textDecoration)??"none",fontVariant:((de=e==null?void 0:e[`${D}TextAppearance`])==null?void 0:de.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${D}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${D}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${D}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${D}LineHeight`])??.01,color:(e==null?void 0:e[`${D}Color`])??"#000000"}},ye=me("text"),ee=me("caption"),oe=s.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(D=>{var se,Y;return(((se=D.text)==null?void 0:se.length)??0)>0||(((Y=D.caption)==null?void 0:Y.length)??0)>0}),[t]),re=s.useMemo(()=>!N||(t==null?void 0:t.length)===0?1:V<=0||w<=0?Cc:Math.max(Cc,Math.ceil(w/V)+1),[N,t==null?void 0:t.length,V,w]);s.useLayoutEffect(()=>{if(!N)return;const D=I.current,se=E.current;if(!D||!se)return;let Y=0;const pe=()=>{const de=D.getBoundingClientRect().width,Z=se.getBoundingClientRect().width,Ne=Le.current,Oe=typeof Ne=="number"&&Math.abs(Ne-Z)<=.25;if(Le.current=Z,L(de),typeof Z=="number"&&Z>0&&V<=0){_(Z);return}Oe&&Z!==V?_(Z):!Oe&&V<=0&&(cancelAnimationFrame(Y),Y=requestAnimationFrame(pe))},H=()=>{cancelAnimationFrame(Y),Y=requestAnimationFrame(pe)};H();const Ie=new ResizeObserver(H);return Ie.observe(D),Ie.observe(se),()=>{cancelAnimationFrame(Y),Ie.disconnect()}},[O,N,V]);const ge=K>0&&z>0?K/z*1e3:0,we=`${Math.max(0,ge)/1e3}s`;s.useLayoutEffect(()=>{if(!N||K<=0)return;const D=j.current;D&&My(D)},[N,K,d]),s.useLayoutEffect(()=>{if(!N){U(0);return}const D=E.current,se=j.current;if(!D||!se)return;const Y=()=>{let H=0;for(let Ie=0;Ie<D.children.length;Ie++){const Z=D.children[Ie].firstElementChild;Z&&(H=Math.max(H,Z.offsetHeight))}H<=0&&(H=se.offsetHeight),U(H>0?H:0)};Y();const pe=new ResizeObserver(Y);return pe.observe(D),pe.observe(se),()=>{pe.disconnect()}},[N,re,t,n,p,v,S,m,x,y,$,T,J]);const Ae=()=>{te&&F(!0)},fe=()=>{te&&F(!1)},ve=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),xe=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),g=s.useCallback((D,se,Y,pe)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ve,width:"100%"},children:[a.jsx("div",{"data-controls":X?pe==null?void 0:pe.controlsName:void 0,"data-controls-axis":X?"y":void 0,className:X?`${r}-control`:void 0,style:{height:C((pe==null?void 0:pe.marginTop)??0)}}),a.jsx("div",{...pe!=null&&pe.dataMeasureKind?{"data-testimonial-measure":pe.dataMeasureKind}:{},style:{...nn(D,n),textAlign:xe,pointerEvents:"auto",...typeof(pe==null?void 0:pe.minHeightPx)=="number"&&pe.minHeightPx>0?{minHeight:pe.minHeightPx}:{}},children:a.jsx(Zi,{content:se})})]},Y),[ve,xe,n,X,r,C]),G=s.useCallback((D,se,Y)=>{var pe,H,Ie;return a.jsxs("div",{style:{padding:`${C(S.top)} ${C(S.right)} ${C(S.bottom)} ${C(S.left)}`,width:C(v+m*2),height:"100%",borderRadius:C(x),border:`${C(m)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:b}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:ve,textAlign:xe},children:[D.text&&g(ye,D.text,"text",Y!=null&&Y.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(Y==null?void 0:Y.textMinHeightPx)=="number"&&Y.textMinHeightPx>0?{minHeightPx:Y.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ve,width:"100%"},children:[a.jsx("div",{"data-controls":X&&!(Y!=null&&Y.dataMeasureAttrs)?"logoMarginTop":void 0,className:X&&!(Y!=null&&Y.dataMeasureAttrs)?`${r}-control`:void 0,style:{height:C(M)}}),a.jsx("div",{style:{width:C(y),height:C($)},children:((pe=D.logo)==null?void 0:pe.assetId)&&a.jsx("img",{src:D.logo.assetId,alt:((H=D.logo)==null?void 0:H.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Ie=D.logo)==null?void 0:Ie.objectFit)||"contain"}})})]}),D.caption&&g(ee,D.caption,"caption",{...Y!=null&&Y.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:R,...Y!=null&&Y.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(Y==null?void 0:Y.captionMinHeightPx)=="number"&&Y.captionMinHeightPx>0?{minHeightPx:Y.captionMinHeightPx}:{}})]})]},se)},[b,R,ee,v,x,$,M,y,ve,xe,S.bottom,S.left,S.right,S.top,g,m,h,ye,n,X,r]),Q=s.useCallback(D=>{le(D.maxTextPx),Se(D.maxCaptionPx)},[]);s.useLayoutEffect(()=>{if(!oe){Q({maxTextPx:0,maxCaptionPx:0});return}const D=ie.current;if(!D)return;const se=()=>{A.readTestimonialTextMeasure(D,Q)};se();const Y=new ResizeObserver(se);return Y.observe(D),()=>{Y.disconnect()}},[oe,Q,t,G]);const ne=oe?{textMinHeightPx:T,captionMinHeightPx:J}:void 0,ue=oe?a.jsx("div",{ref:ie,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((D,se)=>G(D,`measure-${se}`,{dataMeasureAttrs:!0}))}):null,q=(D,se)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[G(D,`card-${se}`,ne),X&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${C(p)})`,width:C(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},se);if(N){const D=O?te&&ce?"paused":"running":"paused";return a.jsxs("div",{ref:I,className:Rt(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...f>0?{height:f}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P}}),ue,a.jsx("div",{ref:j,className:`${r}-marquee-track`,"data-direction":d,onMouseEnter:Ae,onMouseLeave:fe,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",animationDuration:we,WebkitAnimationDuration:we,animationPlayState:D,WebkitAnimationPlayState:D},children:Array.from({length:re},(se,Y)=>a.jsx("div",{ref:Y===0?E:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:C(p),paddingRight:C(p)},"aria-hidden":Y>0,children:t==null?void 0:t.map((pe,H)=>q(pe,`${Y}-${H}`))},`set-${Y}`))})]})}return a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P}}),ue,a.jsx("div",{style:{gap:C(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((D,se)=>q(D,se))})]})},ky=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
3660
3660
|
import cn from 'classnames';
|
|
3661
3661
|
import { CommonComponentProps } from '../props';
|
|
3662
3662
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
|
|
@@ -4287,7 +4287,7 @@ type TestimonialsSettings = {
|
|
|
4287
4287
|
logoHeight: number;
|
|
4288
4288
|
captionMarginTop: number;
|
|
4289
4289
|
};
|
|
4290
|
-
`,Tc={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},
|
|
4290
|
+
`,Tc={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ay={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:"Text Default",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption Default",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:{...Tc.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:{...Tc.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:.069,textLineHeight:.093,captionFontSize:.053,captionLineHeight:.069},t:{speed:1.64,gap:.02,cardWidth:.44,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.065,left:.01},logoMarginTop:.1,logoWidth:.052,logoHeight:.052,captionMarginTop:.005,textFontSize:.035,textLineHeight:.04,captionFontSize:.023,captionLineHeight:.029},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",assetId:"01M3QM74XFE5YFEHBH605E8FXT",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",assetId:"01M3QM74XFZD1R3FV8BKW3NT24",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",assetId:"01M3QM74XGNPA7232QGZAYFNSS",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"}]}]}]}},Fy={element:Ey,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:Ay,sourceCode:ky,assetsPaths:{content:[{path:"logo.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function Ny(e){return`
|
|
4291
4291
|
.${e}-container {
|
|
4292
4292
|
position: relative;
|
|
4293
4293
|
overflow-x: clip;
|
|
@@ -4411,7 +4411,7 @@ type TestimonialsSettings = {
|
|
|
4411
4411
|
width: 100%;
|
|
4412
4412
|
height: 100%;
|
|
4413
4413
|
}
|
|
4414
|
-
`}const
|
|
4414
|
+
`}const _y=3e3,Hy=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=A.useScopedStyles(),l=t||[],{speed:c,align:d,width:u,imageMarginTop:p,textMarginTop:v,captionMarginTop:x,imageWidth:m,imageHeight:h,controlsWidth:b,controlsColor:S,controlsHoverColor:M}=e,y=c>0&&(!n||!!i),[$,R]=s.useState(0),[X,B]=s.useState(null),[O,N]=s.useState(!1),z=s.useRef(null),C=s.useMemo(()=>{switch(d){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[d]),I=s.useMemo(()=>{switch(d){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[d]);s.useEffect(()=>{R(0),B(null),N(!1)},[l.length]);const j=l[$],E=X===null?null:l[X],w=me=>{var ee,oe,re,ge,we;return{fontSettings:{fontFamily:(e==null?void 0:e[`${me}FontFamily`])??"Arial",fontWeight:((ee=e==null?void 0:e[`${me}FontSettings`])==null?void 0:ee.fontWeight)??400,fontStyle:((oe=e==null?void 0:e[`${me}FontSettings`])==null?void 0:oe.fontStyle)??"normal"},textAppearance:{textTransform:((re=e==null?void 0:e[`${me}TextAppearance`])==null?void 0:re.textTransform)??"none",textDecoration:((ge=e==null?void 0:e[`${me}TextAppearance`])==null?void 0:ge.textDecoration)??"none",fontVariant:((we=e==null?void 0:e[`${me}TextAppearance`])==null?void 0:we.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${me}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${me}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${me}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${me}WordSpacing`])??0,color:(e==null?void 0:e[`${me}Color`])??"#000000"}},L=w("text"),V=w("caption"),_=l.length>1&&l.some(me=>{var ye,ee;return(((ye=me.text)==null?void 0:ye.length)??0)>0||(((ee=me.caption)==null?void 0:ee.length)??0)>0}),K=s.useRef(null),[P,f]=s.useState(0),[U,te]=s.useState(0),ce=e.controls??{mode:"Off",icon:null},F=l.length>1,ie=s.useCallback((me,ye)=>!F||ye===me?me:(z.current&&window.clearTimeout(z.current),B(me),N(!0),z.current=window.setTimeout(()=>{B(null),N(!1),z.current=null},300),ye),[F]),T=s.useCallback(()=>{F&&R(me=>ie(me,(me-1+l.length)%l.length))},[F,ie,l.length]),le=s.useCallback(()=>{F&&R(me=>ie(me,(me+1)%l.length))},[F,ie,l.length]);s.useEffect(()=>{if(!y||!F)return;const me=Math.max(300,_y/c),ye=window.setInterval(()=>{R(ee=>ie(ee,(ee+1)%l.length))},me);return()=>{window.clearInterval(ye)}},[y,F,ie,l.length,c]),s.useEffect(()=>()=>{z.current&&window.clearTimeout(z.current)},[]);const J=(me,ye)=>{var we,Ae,fe,ve;const ee=ye==null?void 0:ye.textMinHeightPx,oe=ye==null?void 0:ye.captionMinHeightPx,re=ye==null?void 0:ye.dataMeasureAttrs,ge=o&&!(ye!=null&&ye.dataMeasureAttrs)&&!(ye!=null&&ye.hideControls);return a.jsxs(a.Fragment,{children:[me.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:C,width:"100%"},children:[a.jsx("div",{"data-controls":ge?"textMarginTop":void 0,className:ge?`${r}-control`:void 0,style:{height:A.scalingValue(v??0,n??!1)}}),a.jsx("div",{...re&&{"data-testimonial-measure":"text"},style:{...nn(L,n),...ee&&ee>0?{minHeight:ee}:{},textAlign:I,pointerEvents:"auto"},children:a.jsx(Zi,{content:me.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:C,width:"100%"},children:[a.jsx("div",{"data-controls":ge?"imageMarginTop":void 0,className:ge?`${r}-control`:void 0,style:{height:A.scalingValue(p??0,n??!1)}}),a.jsx("div",{style:{width:A.scalingValue(m??0,n??!1),height:A.scalingValue(h??0,n??!1)},children:((we=me.image)==null?void 0:we.assetId)&&a.jsx("img",{src:(Ae=me.image)==null?void 0:Ae.assetId,alt:((fe=me.image)==null?void 0:fe.name)??"",className:`${r}-icon`,style:{objectFit:((ve=me.image)==null?void 0:ve.objectFit)||"contain"}})})]}),me.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:C,width:"100%"},children:[a.jsx("div",{"data-controls":ge?"captionMarginTop":void 0,className:ge?`${r}-control`:void 0,style:{height:A.scalingValue(x??0,n??!1)}}),a.jsx("div",{...re?{"data-testimonial-measure":"caption"}:{},style:{...nn(V,n),...oe&&oe>0?{minHeight:oe}:{},textAlign:I,pointerEvents:"auto"},children:a.jsx(Zi,{content:me.caption})})]})]})},Se=s.useCallback(me=>{f(me.maxTextPx),te(me.maxCaptionPx)},[]);if(s.useLayoutEffect(()=>{if(!_){Se({maxTextPx:0,maxCaptionPx:0});return}const me=K.current;if(!me)return;const ye=()=>{A.readTestimonialTextMeasure(me,Se)};ye();const ee=new ResizeObserver(ye);return ee.observe(me),()=>{ee.disconnect()}},[_,Se,t]),!j)return a.jsx(a.Fragment,{});const Le=_?{textMinHeightPx:P,captionMinHeightPx:U}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ny(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:A.scalingValue(u??0,n??!1),alignItems:C},children:[_&&a.jsx("div",{ref:K,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((me,ye)=>a.jsx("div",{style:{width:"100%"},children:J(me,{dataMeasureAttrs:!0})},ye))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[E&&O&&a.jsx("div",{className:Rt(`${r}-fade-item-prev`,`${r}-fade-out`),children:J(E,{...Le,hideControls:!0})}),a.jsx("div",{className:Rt(`${r}-fade-item-current`,O?`${r}-fade-in`:void 0),children:J(j,Le)})]})]}),ce.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:A.scalingValue(b??.02,n??!1),height:A.scalingValue(b??.02,n??!1),"--arrow-hover-color":M},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:T,disabled:!F,"aria-label":"Previous testimonial",children:ce.icon&&a.jsx(gn,{url:ce.icon,fill:S,hoverFill:M,className:Rt(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:Rt(`${r}-arrow`,`${r}-next-arrow`),style:{width:A.scalingValue(b??.02,n??!1),height:A.scalingValue(b??.02,n??!1),"--arrow-hover-color":M},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:le,disabled:!F,"aria-label":"Next testimonial",children:ce.icon&&a.jsx(gn,{url:ce.icon,fill:S,hoverFill:M,className:`${r}-arrow-img`})})})]})]})})},Wy=`import cn from 'classnames';
|
|
4415
4415
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
4416
4416
|
import { CommonComponentProps } from '../props';
|
|
4417
4417
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
|
|
@@ -4907,12 +4907,12 @@ type TestimonialsSettings = {
|
|
|
4907
4907
|
icon?: string | null;
|
|
4908
4908
|
};
|
|
4909
4909
|
};
|
|
4910
|
-
`,
|
|
4910
|
+
`,Oy="01M46GNEM3GEJ4HQSNJYYTA45T",Ic={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Dy={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Ic.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Caption Default"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Ic.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Default"}},defaults:{controls:{mode:"On",icon:Oy},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},t:{speed:1,width:.65,imageMarginTop:.026,captionMarginTop:.01,textMarginTop:0,textFontSize:.035,captionFontSize:.023,textLineHeight:.04,captionLineHeight:.029,imageWidth:.05,imageHeight:.05,controlsWidth:.026},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",assetId:"01M3QM74XFE5YFEHBH605E8FXT",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",assetId:"01M3QM74XFZD1R3FV8BKW3NT24",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",assetId:"01M3QM74XGNPA7232QGZAYFNSS",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"}]}]}]}},By={element:Hy,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700},t:{width:700},m:{width:334}},schema:Dy,sourceCode:Wy,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function zy(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Lc(e){return((e==null?void 0:e.trim().length)??0)>0}function is(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function os(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:A.scalingValue((o-t)/2,i)}}function jy(e){return`
|
|
4911
4911
|
.${e}-wrapper {
|
|
4912
4912
|
display: grid;
|
|
4913
4913
|
align-items: start;
|
|
4914
4914
|
justify-content: center;
|
|
4915
|
-
min-height: ${
|
|
4915
|
+
min-height: ${zy(48)};
|
|
4916
4916
|
}
|
|
4917
4917
|
.${e}-item {
|
|
4918
4918
|
display: flex;
|
|
@@ -5254,7 +5254,7 @@ type TestimonialsSettings = {
|
|
|
5254
5254
|
z-index: 2;
|
|
5255
5255
|
width: 100%;
|
|
5256
5256
|
}
|
|
5257
|
-
`}function Wy(){return Math.random()<.5?"ltr":"ttb"}function Oy(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function Dy(e){const t=Wy();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Oy(e)})})}const An=500,By=750,pi="cubic-bezier(0.22, 1, 0.36, 1)",zy=72,jy=50;function Vy(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 Gy(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function Xy(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function Yu(e){return!Array.isArray(e)||e.length===0?[]:Vy(e)?e.flatMap(t=>{const n=Gy(t);if(!n)return[];const i=Xy(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.assetId?i:null}]}):e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Xi(e){return e.type==="video"}function Uy(e){const t=new Set,n=[];for(const i of e){const o=Yu(i.gallery);for(const r of o){const l=r.lightboxMedia;l!=null&&l.assetId&&!t.has(l.assetId)&&(t.add(l.assetId),n.push(l))}}return n}function qy({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Xi(t)?a.jsx("video",{src:t.assetId,preload:"auto",muted:!0,playsInline:!0},t.assetId):a.jsx("img",{src:t.assetId,alt:""},t.assetId))})}function Yy(e){e.pause(),e.removeAttribute("src"),e.load()}function Pc({media:e,className:t,style:n,onMediaClick:i}){return Xi(e)?a.jsx("video",{src:e.assetId,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):a.jsx("img",{src:e.assetId,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function Rc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Ky(e,t){if(!t||!t.width||!t.height||!e.width||!e.height)return e;const n=t.width/t.height,i=e.width/e.height;if(n>i){const r=e.width/n;return{width:e.width,height:r,left:e.left,top:e.top+(e.height-r)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function Qy({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l}){return s.useEffect(()=>{const c=n.current;if(c)return()=>{Yy(c)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,style:i})}function Zy({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:c,counterClassName:d,counterStyle:u}){const p=i==="cover",v=s.useRef(null),b=s.useRef(null),m=s.useRef(null),h=s.useRef(null),x=s.useRef(0),S=s.useRef(0),P=s.useRef("none"),f=s.useRef(!1),w=s.useRef(!1),N=s.useRef(null),V=s.useRef(0),B=s.useRef(null),H=s.useRef(!1),_=s.useRef(null),z=s.useRef(null),$=s.useRef(null),E=s.useRef(()=>{}),[j,L]=s.useState(null),[C,T]=s.useState(null),[G,A]=s.useState("opening"),[Y,R]=s.useState(0),[y,U]=s.useState(0),[ee,de]=s.useState(null),[F,ie]=s.useState(!1),[I,se]=s.useState(!1),[J,Se]=s.useState(!1),[Re,pe]=s.useState(null),he=s.useRef(n),te=s.useRef(void 0),le=t[n],re=le?Xi(le):!1,fe=y!==0||F,xe=ee!==null,Te=s.useCallback(Pe=>{const _e=Pe.currentTarget,Ke=_e instanceof HTMLVideoElement?{width:_e.videoWidth,height:_e.videoHeight}:{width:_e.naturalWidth,height:_e.naturalHeight};!Ke.width||!Ke.height||pe(Ke)},[]);s.useEffect(()=>{N.current=C},[C]),s.useEffect(()=>{const Pe=v.current;if(!Pe)return;const _e=()=>T(Rc(Pe));_e();const Ke=new ResizeObserver(_e);return Ke.observe(Pe),()=>Ke.disconnect()},[]);const me=s.useCallback(()=>{_.current!==null&&(window.clearTimeout(_.current),_.current=null)},[]),be=s.useCallback(()=>{const Pe=z.current;z.current=null,me(),B.current=null,H.current=!1,de(null),ie(!1),U(0),V.current=0,se(!1),f.current=!1,S.current=0,P.current="none",Pe===1?c():Pe===-1&&l()},[me,c,l]),we=s.useCallback(()=>{me(),z.current=null,B.current=null,H.current=!1,de(null),ie(!1),U(0),V.current=0},[me]),g=s.useCallback(()=>{me(),_.current=window.setTimeout(()=>{z.current!==null&&be()},An+32)},[me,be]),X=s.useCallback((Pe,_e)=>{var Ze;const Ke=((Ze=N.current)==null?void 0:Ze.width)??0;if(me(),B.current=Pe,de(Pe),H.current=!0,ie(!0),_e){z.current=Pe;const st=-Pe*Ke;V.current=st,U(st),g();return}V.current=0,U(0),_.current=window.setTimeout(()=>{_.current=null,we()},An+32)},[me,we,g]),Z=s.useCallback(Pe=>{if(!(t.length<=1)){if(H.current){if(z.current===Pe){$.current=Pe,be();return}we()}me(),B.current=Pe,de(Pe),H.current=!1,ie(!1),V.current=0,U(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{X(Pe,!0)})})}},[t.length,X,be,we,me]);E.current=Z;const ne=s.useCallback(Pe=>{Pe.propertyName!=="transform"||!H.current||z.current!==null&&be()},[be]),ye=s.useCallback(()=>{const Pe=b.current;if(!Pe)return;const _e=Rc(Pe);!_e.width||!_e.height||L(_e)},[]);s.useEffect(()=>{ye();const Pe=b.current;if(!Pe)return;const _e=new ResizeObserver(()=>ye());return _e.observe(Pe),()=>_e.disconnect()},[ye]),s.useEffect(()=>{G==="opening"&&j&&A("open")},[G,j]),s.useEffect(()=>{if(G!=="closing")return;const Pe=setTimeout(()=>r(),An);return()=>clearTimeout(Pe)},[G,r]),s.useEffect(()=>()=>{me()},[me]),s.useLayoutEffect(()=>{he.current===n&&te.current===(le==null?void 0:le.assetId)||(me(),z.current=null,de(null),R(0),U(0),ie(!1),Se(!1),se(!1),pe(null),x.current=0,S.current=0,P.current="none",f.current=!1,H.current=!1,V.current=0,B.current=null,h.current=null,w.current=!1,he.current=n,te.current=le==null?void 0:le.assetId)},[n,le==null?void 0:le.assetId,me]),s.useLayoutEffect(()=>{const Pe=$.current;Pe!==null&&($.current=null,requestAnimationFrame(()=>{E.current(Pe)}))},[n,le==null?void 0:le.assetId]),s.useEffect(()=>{if(G!=="open")return;let Pe=null;const _e=()=>{Pe&&(document.removeEventListener("click",Pe,!0),Pe=null)},Ke=()=>{_e(),Pe=ke=>{ke.stopPropagation(),ke.preventDefault(),_e()},document.addEventListener("click",Pe,!0)},Ze=ke=>{const ht=ke<0?1:-1;if(Math.abs(ke)>jy&&t.length>1){X(ht,!0);return}X(ht,!1)},st=ke=>{if(ke.touches.length!==1||H.current)return;const ht=ke.touches[0];w.current=!0,h.current={x:ht.clientX,y:ht.clientY},P.current="none",S.current=0,f.current=!1},Ue=ke=>{if(!h.current||ke.touches.length!==1||H.current)return;const ht=ke.touches[0],Be=ht.clientX-h.current.x,ze=ht.clientY-h.current.y;if(P.current==="none"){if(Math.abs(Be)<10&&Math.abs(ze)<10)return;if(Math.abs(Be)>Math.abs(ze)){if(t.length<=1)return;P.current="horizontal"}else if(ze>0)P.current="vertical";else return}if(P.current==="horizontal"){f.current=!0,se(!0),S.current=Be;const We=Be<0?1:-1;B.current!==We&&(B.current=We,de(We)),V.current=Be,U(Be),ke.preventDefault();return}P.current==="vertical"&&(f.current=!0,se(!0),x.current=ze,R(ze),ke.preventDefault())},De=()=>{if(!h.current)return;const ke=P.current,ht=f.current;if(ht&&ke==="horizontal")Ze(S.current),Ke();else if(ht&&ke==="vertical")if(x.current>zy){const ze=window.innerHeight;x.current=ze,Se(!0),R(ze),A("closing")}else x.current=0,R(0),Ke();else ke==="horizontal"&&Math.abs(S.current)>0&&(Ze(S.current),Ke());h.current=null,P.current="none",S.current=0,f.current=!1,se(!1)};return document.addEventListener("touchstart",st,{passive:!0}),document.addEventListener("touchmove",Ue,{passive:!1}),document.addEventListener("touchend",De),document.addEventListener("touchcancel",De),()=>{document.removeEventListener("touchstart",st),document.removeEventListener("touchmove",Ue),document.removeEventListener("touchend",De),document.removeEventListener("touchcancel",De),_e()}},[G,t.length,X]),s.useEffect(()=>{const Pe=_e=>{_e.key==="Escape"&&(_e.preventDefault(),_e.stopPropagation(),G!=="closing"&&A("closing"))};return window.addEventListener("keydown",Pe,!0),()=>window.removeEventListener("keydown",Pe,!0)},[G]);const K=()=>{G!=="closing"&&A("closing")},D=G==="open",ce=G==="closing",q=Y>0?Math.max(0,1-Y/500):1,ue=Y>0?Math.max(.35,1-Y/500):1,W=j?p?j:Ky(j,Re):null,Le=Pe=>{if(Pe.stopPropagation(),w.current){w.current=!1;return}if(t.length<=1)return;const _e=W??Pe.currentTarget.getBoundingClientRect(),Ke=Pe.clientY-_e.top,Ze=Math.min(52,_e.height*.2);if(!(Ke>_e.height-Ze)){if(Pe.clientX-_e.left<_e.width/2){Z(-1);return}Z(1)}},ae=Pe=>{if(t.length<=1)return;const _e=W??Pe.currentTarget.getBoundingClientRect(),Ke=Pe.clientX-_e.left,Ze=Pe.clientY-_e.top,st=Math.min(52,_e.height*.2);if(Ze>_e.height-st){Pe.currentTarget.style.cursor="default";return}Pe.currentTarget.style.cursor=Ke<_e.width/2?"w-resize":"e-resize"},Q={position:"fixed",top:C==null?void 0:C.top,left:C==null?void 0:C.left,width:C==null?void 0:C.width,height:C==null?void 0:C.height,zIndex:9998},Ne=p?"cover":"contain",Oe=y!==0||Y>0?`translate(${y}px, ${Y}px)`:void 0,it=I&&!F?"none":F?`transform ${An}ms ${pi}`:J?`transform ${An}ms ${pi}, opacity ${An}ms ${pi}`:G==="opening"||ce?`opacity ${An}ms ${pi}`:"none",qe={...Q,transform:Oe,opacity:Y>0?ue:G==="opening"||ce?0:1,transition:it,pointerEvents:"none"},Je={position:"absolute",top:((W==null?void 0:W.top)??0)-((C==null?void 0:C.top)??0),left:((W==null?void 0:W.left)??0)-((C==null?void 0:C.left)??0),width:W==null?void 0:W.width,height:W==null?void 0:W.height,objectFit:Ne,pointerEvents:re&&D&&!fe?"auto":"none",touchAction:re&&D?"none":void 0},ot=(C==null?void 0:C.width)??0,Ve=xe?(n+ee+t.length)%t.length:null,ve=Ve!==null?t[Ve]:null,Fe={...Q,transform:xe?`translateX(${ee*ot+y}px)`:void 0,opacity:1,transition:F?`transform ${An}ms ${pi}`:"none",pointerEvents:"none"},Xe={position:"absolute",top:((j==null?void 0:j.top)??0)-((C==null?void 0:C.top)??0),left:((j==null?void 0:j.left)??0)-((C==null?void 0:C.left)??0),width:j==null?void 0:j.width,height:j==null?void 0:j.height,objectFit:Ne,pointerEvents:"none"},Ye=W?{position:"fixed",top:W.top,height:W.height,width:W.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:v,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:G==="open"?"none":void 0},onClick:K,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:D?q:0,transition:I?"none":`opacity ${An}ms ${pi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:b,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:D?1:0,transition:`opacity ${An}ms ${pi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:b,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:D?1:0,transition:`opacity ${An}ms ${pi}`},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]})}),j&&C&&ve&&a.jsx("div",{style:Fe,onTransitionEnd:ne,children:Xi(ve)?a.jsx("video",{src:ve.assetId,muted:!0,playsInline:!0,preload:"auto",style:Xe},`neighbor-${Ve}-${ve.assetId}`):a.jsx("img",{src:ve.assetId,alt:ve.name,style:Xe},`neighbor-${Ve}-${ve.assetId}`)}),j&&C&&le&&a.jsx("div",{style:qe,onTransitionEnd:ne,children:re?a.jsx(Qy,{src:le.assetId,phase:G,mediaRef:m,mediaStyle:Je,onLoadedMetadata:Te,onClick:Le,onMouseMove:ae},`${n}-${le.assetId}`):a.jsx("img",{ref:m,src:le.assetId,alt:le.name,onLoad:Te,style:Je},`${n}-${le.assetId}`)}),D&&Ye&&t.length>1&&!re&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Ye,left:W.left,cursor:"w-resize",pointerEvents:I?"none":"auto"},onClick:Pe=>{if(w.current){w.current=!1;return}Pe.stopPropagation(),Z(-1)}}),a.jsx("div",{style:{...Ye,left:W.left+W.width/2,cursor:"e-resize",pointerEvents:I?"none":"auto"},onClick:Pe=>{if(w.current){w.current=!1;return}Pe.stopPropagation(),Z(1)}})]})]})}function Jy(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function ev({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:r,activeEvent:l,layoutId:c,portalId:d}){const{prefix:u}=k.useScopedStyles(),{type:p="a",gridLayout:v,textBoxWidth:b=100,verticalGap:m,entriesCount:h,lightbox:x,imageDisplay:S,imageCorners:P,lightboxImageDisplay:f,slider:w,sliderTiming:N,direction:V,transition:B,titleMarginTop:H,subtitleMarginTop:_,titleColor:z,subtitleColor:$,lightboxCounterColor:E,titleFontFamily:j,titleFontSettings:L,titleFontSize:C,titleLineHeight:T,titleLetterSpacing:G,titleWordSpacing:A,titleTextAppearance:Y,subtitleFontFamily:R,subtitleFontSettings:y,subtitleFontSize:U,subtitleLineHeight:ee,subtitleLetterSpacing:de,subtitleWordSpacing:F,subtitleTextAppearance:ie,lightboxCounterFontFamily:I,lightboxCounterFontSettings:se,lightboxCounterFontSize:J,lightboxCounterLineHeight:Se,lightboxCounterLetterSpacing:Re,lightboxCounterWordSpacing:pe,lightboxCounterTextAppearance:he,showText:te="always",alignEntries:le="off",align:re="top"}=e,fe={fontSettings:{fontFamily:j,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:C??.01,lineHeight:T,letterSpacing:G??0,wordSpacing:A??0,textAppearance:Y,color:z},Te={...un(en(fe,n))},me={fontSettings:{fontFamily:R,fontWeight:(y==null?void 0:y.fontWeight)??400,fontStyle:(y==null?void 0:y.fontStyle)??"normal"},fontSize:U??.01,lineHeight:ee,letterSpacing:de??0,wordSpacing:F??0,textAppearance:ie,color:$},we={...un(en(me,n))},g={fontSettings:{fontFamily:I,fontWeight:(se==null?void 0:se.fontWeight)??400,fontStyle:(se==null?void 0:se.fontStyle)??"normal"},fontSize:J??.01,lineHeight:Se,letterSpacing:Re??0,wordSpacing:pe??0,textAppearance:he,color:E},Z={...un(en(g,n)),...os(J,Se,u,n)},ne=is(C,T,`${u}-item-title`,`${u}-text-tight-leading`),ye=is(U,ee,`${u}-item-subtitle`,`${u}-text-tight-leading`),K=os(C,T,u,n),D=os(U,ee,u,n),ce=is(J,Se,`${u}-lightbox-counter`,`${u}-text-tight-leading`),q=k.buildColorVars(u,{titleColor:z,subtitleColor:$,lightboxCounterColor:E},tv,nv),Le=`${l&&l!=="default"?`${u}-state-${l}`:""}${te==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),ae=h===0?1/0:h,Q=(t??[]).slice(0,ae),Ne=s.useMemo(()=>x==="on"?Uy(Q):[],[Q,x]),Oe=v.entryWidth??.2,it=(S==null?void 0:S.display)==="cover",qe=(S==null?void 0:S.ratioValue)??"1:1",Je=(S==null?void 0:S.reversed)??!1,[ot,Ve]=qe.split(":").map(Number),Xe=`${Je?Ve:ot} / ${Je?ot:Ve}`,Ye=v.columnsCount,Pe=k.scalingValue(Oe??0,n),_e=Pe,Ke=!it&&w!=="off",Ze=Q.length%Ye||Ye,st=Ze<Ye&&Q.length>0,Ue=Q.length-Ze,De=st?Math.floor((Ye-Ze)/2)+1:1,ke=P?k.scalingValue(P,n):void 0,ht={width:_e,...it?{aspectRatio:Xe,height:"auto",overflow:"hidden"}:{height:"auto"},...ke?{borderRadius:ke,overflow:"hidden"}:{}},Be=`${u}-item-image-wrapper${Ke?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),ze=p==="d"||p==="e"||p==="f",We=le==="on",mt=`calc(${k.scalingValue(Oe??0,n)} * (${b} / 100))`,rt=k.scalingValue(Oe*b/100,n),St=it?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...ke?{borderRadius:ke}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...ke?{borderRadius:ke}:{}},[Nt,jt]=s.useState(0),xt=s.useRef(null),Ce=B==="fade"||V==="horizontal"?"ltr":V==="vertical"?"ttb":"ltr";s.useEffect(()=>{const vt=xt.current;if(!vt)return;const ft=new ResizeObserver(Me=>{jt(Math.round(Me[0].contentRect.width))});return ft.observe(vt),()=>ft.disconnect()},[]);const He=(()=>{const vt={...q},ft=xt.current?getComputedStyle(xt.current).getPropertyValue("--cntrl-article-width").trim():"";return ft&&(vt["--cntrl-article-width"]=ft),vt})(),[lt,et]=s.useState(!1),[yt,Rt]=s.useState([]),[At,qt]=s.useState(0),$t=x==="on"&&(!n||i),zt=(vt,ft)=>{n&&!i||x!=="off"&&(Rt(vt),qt(ft),et(!0))};s.useEffect(()=>{if(!lt||x!=="on"||typeof document>"u")return;const vt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=vt}},[lt,x]),s.useEffect(()=>{!n||i||et(!1)},[n,i]);const on=s.useMemo(()=>Hy(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:on}}),x==="on"&&a.jsx(qy,{mediaList:Ne}),a.jsx("div",{style:q,children:a.jsx("div",{ref:xt,className:`${u}-wrapper ${u}-type-${p}${We?` ${u}-align-entries`:""} ${u}-image-align-${re} ${Le}`.trim(),style:{gridTemplateColumns:`repeat(${Ye}, ${Pe})`,rowGap:We?0:k.scalingValue(m??0,n),columnGap:k.scalingValue(v.horizontalGap??0,n),width:k.scalingValue(v.wrapperWidth??0,n),...We?{[`--${u}-align-entries-row-gap`]:k.scalingValue(m??0,n)}:{}},children:Q.map((vt,ft)=>{var Dt;const Me=Lc(vt.title),nt=Lc(vt.subtitle),ct=(((Dt=vt.link)==null?void 0:Dt.length)??0)>0&&x==="off"?vt.link:void 0,gt=Math.floor(ft/Ye)===Math.ceil(Q.length/Ye)-1,Et=st&&ft>=Ue?`${De+(ft-Ue)}`:void 0,wt=ze?a.jsxs("div",{className:`${u}-item-text-block`,children:[Me&&a.jsx("p",{className:ne,style:{width:mt,...Te,...K},children:vt.title}),Me&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:k.scalingValue(H??0,n),width:rt}}),nt&&a.jsx("p",{className:ye,style:{width:mt,...we,...D},children:vt.subtitle}),nt&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:k.scalingValue(_??0,n),width:rt}})]}):null,dt=We?a.jsxs("div",{className:`${u}-item-title-row`,children:[!ze&&a.jsx("div",{"data-controls":o&&Me?"titleMarginTop":void 0,className:o&&Me?`${u}-control`:void 0,style:{height:Me?k.scalingValue(H??0,n):0,width:rt}}),Me&&a.jsx("p",{className:ne,style:{width:mt,...Te,...K},children:vt.title}),ze&&Me&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:k.scalingValue(H??0,n),width:rt}})]}):null,Ot=We?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!ze&&a.jsx("div",{"data-controls":o&&nt?"subtitleMarginTop":void 0,className:o&&nt?`${u}-control`:void 0,style:{height:nt?k.scalingValue(_??0,n):0,width:rt}}),nt&&a.jsx("p",{className:ye,style:{width:mt,...we,...D},children:vt.subtitle}),ze&&nt&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:k.scalingValue(_??0,n),width:rt}})]}):null,Lt=ct?a.jsxs("a",{href:ct,target:"_blank",className:`${u}-item-text-link`,children:[dt,Ot]}):a.jsxs(a.Fragment,{children:[dt,Ot]}),Ht=Yu(vt.gallery),Gt=Ht.filter(Ct=>Ct.lightboxMedia).map(Ct=>Ct.lightboxMedia),_t=a.jsx("div",{className:Be,style:ht,children:Ht.length===0?null:w==="off"?(()=>{const{displayMedia:Ct,lightboxMedia:O}=Ht[0],Ie=O?Gt.findIndex(je=>je.assetId===O.assetId):-1;return a.jsx(Pc,{media:Ct,className:`${u}-item-${Xi(Ct)?"video":"image"}`.trim(),style:St,onMediaClick:$t&&Ie>=0?()=>zt(Gt,Ie):void 0})})():a.jsxs(a.Fragment,{children:[Ke&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Ht.map(({displayMedia:Ct})=>Xi(Ct)?a.jsx("video",{src:Ct.assetId,muted:!0,playsInline:!0},`sizer-${Ct.assetId}`):a.jsx("img",{src:Ct.assetId,alt:""},`sizer-${Ct.assetId}`))}),a.jsx(El,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:N*1e3,width:"100%",height:"100%",speed:By,type:B==="fade"?"fade":"loop",rewind:B==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:Ce},onMoved:Ct=>{V!=="random"||B==="fade"||Dy(Ct)},children:Ht.map(({displayMedia:Ct,lightboxMedia:O},Ie)=>{const je=O?Gt.findIndex(Ae=>Ae.assetId===O.assetId):-1;return a.jsx(kl,{children:a.jsx(Pc,{media:Ct,className:`${u}-item-${Xi(Ct)?"video":"image"}`.trim(),style:St,onMediaClick:$t&&je>=0?()=>zt(Gt,je):void 0})},Ie)})},`${B}-${Oe}-${V}-${N}-${Nt}-${c}`)]})}),Vt=ze?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&Me?"titleMarginTop":void 0,className:o&&Me?`${u}-control`:void 0,style:{height:Me?k.scalingValue(H??0,n):0,width:rt}}),a.jsx("p",{className:ne,style:{width:mt,...Te,...K},children:vt.title}),a.jsx("div",{"data-controls":o&&nt?"subtitleMarginTop":void 0,className:o&&nt?`${u}-control`:void 0,style:{height:nt?k.scalingValue(_??0,n):0,width:rt}}),a.jsx("p",{className:ye,style:{width:mt,...we,...D},children:vt.subtitle})]});return a.jsx("div",{className:`${u}-item`.trim(),style:Et&&!We?{gridColumn:Et}:void 0,children:a.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${We&>?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(b??0)>100?`calc(${Pe} * (${b} / 100))`:Pe,...Et&&We?{gridColumn:Et}:{}},children:We?a.jsx(a.Fragment,{children:ze?a.jsxs(a.Fragment,{children:[Lt,a.jsx("a",{href:ct,target:"_blank",className:`${u}-item-image-link`,children:_t})]}):a.jsxs(a.Fragment,{children:[a.jsx("a",{href:ct,target:"_blank",className:`${u}-item-image-link`,children:_t}),Lt]})}):ct?a.jsxs(a.Fragment,{children:[a.jsxs("a",{href:ct,target:"_blank",className:`${u}-item-image-link`,children:[wt,_t]}),!ze&&a.jsx("a",{href:ct,target:"_blank",className:`${u}-item-text-link`,children:Vt})]}):a.jsxs(a.Fragment,{children:[wt,_t,Vt]})})},ft)})})}),(!n||i)&<&&typeof document<"u"&&x==="on"&&(()=>{const vt=(d?document.getElementById(d):null)??document.body;return Xn.createPortal(a.jsx("div",{style:He,"data-selection":"none",children:a.jsx(Zy,{prefix:u,items:yt,index:At,imageDisplay:Jy(f),isEditor:n,onClose:()=>et(!1),onPrev:()=>qt(ft=>(ft-1+yt.length)%yt.length),onNext:()=>qt(ft=>(ft+1)%yt.length),counterClassName:ce,counterStyle:Z})}),vt)})()]})}const tv={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},nv=["hover","focus","filled","success","error"],iv=`import { Splide, SplideSlide } from '@splidejs/react-splide';
|
|
5257
|
+
`}function Vy(){return Math.random()<.5?"ltr":"ttb"}function Gy(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function Xy(e){const t=Vy();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Gy(e)})})}const Fn=500,qy=750,hi="cubic-bezier(0.22, 1, 0.36, 1)",Uy=72,Yy=50;function Ky(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 Qy(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function Zy(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function tp(e){return!Array.isArray(e)||e.length===0?[]:Ky(e)?e.flatMap(t=>{const n=Qy(t);if(!n)return[];const i=Zy(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.assetId?i:null}]}):e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Yi(e){return e.type==="video"}function Jy(e){const t=new Set,n=[];for(const i of e){const o=tp(i.gallery);for(const r of o){const l=r.lightboxMedia;l!=null&&l.assetId&&!t.has(l.assetId)&&(t.add(l.assetId),n.push(l))}}return n}function ev({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Yi(t)?a.jsx("video",{src:t.assetId,preload:"auto",muted:!0,playsInline:!0},t.assetId):a.jsx("img",{src:t.assetId,alt:""},t.assetId))})}function tv(e){e.pause(),e.removeAttribute("src"),e.load()}function Pc({media:e,className:t,style:n,onMediaClick:i}){return Yi(e)?a.jsx("video",{src:e.assetId,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):a.jsx("img",{src:e.assetId,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function Rc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function nv(e,t){if(!t||!t.width||!t.height||!e.width||!e.height)return e;const n=t.width/t.height,i=e.width/e.height;if(n>i){const r=e.width/n;return{width:e.width,height:r,left:e.left,top:e.top+(e.height-r)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function iv({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l}){return s.useEffect(()=>{const c=n.current;if(c)return()=>{tv(c)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,style:i})}function ov({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:c,counterClassName:d,counterStyle:u}){const p=i==="cover",v=s.useRef(null),x=s.useRef(null),m=s.useRef(null),h=s.useRef(null),b=s.useRef(0),S=s.useRef(0),M=s.useRef("none"),y=s.useRef(!1),$=s.useRef(!1),R=s.useRef(null),X=s.useRef(0),B=s.useRef(null),O=s.useRef(!1),N=s.useRef(null),z=s.useRef(null),C=s.useRef(null),I=s.useRef(()=>{}),[j,E]=s.useState(null),[w,L]=s.useState(null),[V,_]=s.useState("opening"),[K,P]=s.useState(0),[f,U]=s.useState(0),[te,ce]=s.useState(null),[F,ie]=s.useState(!1),[T,le]=s.useState(!1),[J,Se]=s.useState(!1),[Le,me]=s.useState(null),ye=s.useRef(n),ee=s.useRef(void 0),oe=t[n],re=oe?Yi(oe):!1,ge=f!==0||F,we=te!==null,Ae=s.useCallback(Ce=>{const _e=Ce.currentTarget,Ue=_e instanceof HTMLVideoElement?{width:_e.videoWidth,height:_e.videoHeight}:{width:_e.naturalWidth,height:_e.naturalHeight};!Ue.width||!Ue.height||me(Ue)},[]);s.useEffect(()=>{R.current=w},[w]),s.useEffect(()=>{const Ce=v.current;if(!Ce)return;const _e=()=>L(Rc(Ce));_e();const Ue=new ResizeObserver(_e);return Ue.observe(Ce),()=>Ue.disconnect()},[]);const fe=s.useCallback(()=>{N.current!==null&&(window.clearTimeout(N.current),N.current=null)},[]),ve=s.useCallback(()=>{const Ce=z.current;z.current=null,fe(),B.current=null,O.current=!1,ce(null),ie(!1),U(0),X.current=0,le(!1),y.current=!1,S.current=0,M.current="none",Ce===1?c():Ce===-1&&l()},[fe,c,l]),xe=s.useCallback(()=>{fe(),z.current=null,B.current=null,O.current=!1,ce(null),ie(!1),U(0),X.current=0},[fe]),g=s.useCallback(()=>{fe(),N.current=window.setTimeout(()=>{z.current!==null&&ve()},Fn+32)},[fe,ve]),G=s.useCallback((Ce,_e)=>{var Ye;const Ue=((Ye=R.current)==null?void 0:Ye.width)??0;if(fe(),B.current=Ce,ce(Ce),O.current=!0,ie(!0),_e){z.current=Ce;const lt=-Ce*Ue;X.current=lt,U(lt),g();return}X.current=0,U(0),N.current=window.setTimeout(()=>{N.current=null,xe()},Fn+32)},[fe,xe,g]),Q=s.useCallback(Ce=>{if(!(t.length<=1)){if(O.current){if(z.current===Ce){C.current=Ce,ve();return}xe()}fe(),B.current=Ce,ce(Ce),O.current=!1,ie(!1),X.current=0,U(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{G(Ce,!0)})})}},[t.length,G,ve,xe,fe]);I.current=Q;const ne=s.useCallback(Ce=>{Ce.propertyName!=="transform"||!O.current||z.current!==null&&ve()},[ve]),ue=s.useCallback(()=>{const Ce=x.current;if(!Ce)return;const _e=Rc(Ce);!_e.width||!_e.height||E(_e)},[]);s.useEffect(()=>{ue();const Ce=x.current;if(!Ce)return;const _e=new ResizeObserver(()=>ue());return _e.observe(Ce),()=>_e.disconnect()},[ue]),s.useEffect(()=>{V==="opening"&&j&&_("open")},[V,j]),s.useEffect(()=>{if(V!=="closing")return;const Ce=setTimeout(()=>r(),Fn);return()=>clearTimeout(Ce)},[V,r]),s.useEffect(()=>()=>{fe()},[fe]),s.useLayoutEffect(()=>{ye.current===n&&ee.current===(oe==null?void 0:oe.assetId)||(fe(),z.current=null,ce(null),P(0),U(0),ie(!1),Se(!1),le(!1),me(null),b.current=0,S.current=0,M.current="none",y.current=!1,O.current=!1,X.current=0,B.current=null,h.current=null,$.current=!1,ye.current=n,ee.current=oe==null?void 0:oe.assetId)},[n,oe==null?void 0:oe.assetId,fe]),s.useLayoutEffect(()=>{const Ce=C.current;Ce!==null&&(C.current=null,requestAnimationFrame(()=>{I.current(Ce)}))},[n,oe==null?void 0:oe.assetId]),s.useEffect(()=>{if(V!=="open")return;let Ce=null;const _e=()=>{Ce&&(document.removeEventListener("click",Ce,!0),Ce=null)},Ue=()=>{_e(),Ce=Ee=>{Ee.stopPropagation(),Ee.preventDefault(),_e()},document.addEventListener("click",Ce,!0)},Ye=Ee=>{const pt=Ee<0?1:-1;if(Math.abs(Ee)>Yy&&t.length>1){G(pt,!0);return}G(pt,!1)},lt=Ee=>{if(Ee.touches.length!==1||O.current)return;const pt=Ee.touches[0];$.current=!0,h.current={x:pt.clientX,y:pt.clientY},M.current="none",S.current=0,y.current=!1},it=Ee=>{if(!h.current||Ee.touches.length!==1||O.current)return;const pt=Ee.touches[0],ke=pt.clientX-h.current.x,We=pt.clientY-h.current.y;if(M.current==="none"){if(Math.abs(ke)<10&&Math.abs(We)<10)return;if(Math.abs(ke)>Math.abs(We)){if(t.length<=1)return;M.current="horizontal"}else if(We>0)M.current="vertical";else return}if(M.current==="horizontal"){y.current=!0,le(!0),S.current=ke;const Ve=ke<0?1:-1;B.current!==Ve&&(B.current=Ve,ce(Ve)),X.current=ke,U(ke),Ee.preventDefault();return}M.current==="vertical"&&(y.current=!0,le(!0),b.current=We,P(We),Ee.preventDefault())},qe=()=>{if(!h.current)return;const Ee=M.current,pt=y.current;if(pt&&Ee==="horizontal")Ye(S.current),Ue();else if(pt&&Ee==="vertical")if(b.current>Uy){const We=window.innerHeight;b.current=We,Se(!0),P(We),_("closing")}else b.current=0,P(0),Ue();else Ee==="horizontal"&&Math.abs(S.current)>0&&(Ye(S.current),Ue());h.current=null,M.current="none",S.current=0,y.current=!1,le(!1)};return document.addEventListener("touchstart",lt,{passive:!0}),document.addEventListener("touchmove",it,{passive:!1}),document.addEventListener("touchend",qe),document.addEventListener("touchcancel",qe),()=>{document.removeEventListener("touchstart",lt),document.removeEventListener("touchmove",it),document.removeEventListener("touchend",qe),document.removeEventListener("touchcancel",qe),_e()}},[V,t.length,G]),s.useEffect(()=>{const Ce=_e=>{_e.key==="Escape"&&(_e.preventDefault(),_e.stopPropagation(),V!=="closing"&&_("closing"))};return window.addEventListener("keydown",Ce,!0),()=>window.removeEventListener("keydown",Ce,!0)},[V]);const q=()=>{V!=="closing"&&_("closing")},D=V==="open",se=V==="closing",Y=K>0?Math.max(0,1-K/500):1,pe=K>0?Math.max(.35,1-K/500):1,H=j?p?j:nv(j,Le):null,Ie=Ce=>{if(Ce.stopPropagation(),$.current){$.current=!1;return}if(t.length<=1)return;const _e=H??Ce.currentTarget.getBoundingClientRect(),Ue=Ce.clientY-_e.top,Ye=Math.min(52,_e.height*.2);if(!(Ue>_e.height-Ye)){if(Ce.clientX-_e.left<_e.width/2){Q(-1);return}Q(1)}},de=Ce=>{if(t.length<=1)return;const _e=H??Ce.currentTarget.getBoundingClientRect(),Ue=Ce.clientX-_e.left,Ye=Ce.clientY-_e.top,lt=Math.min(52,_e.height*.2);if(Ye>_e.height-lt){Ce.currentTarget.style.cursor="default";return}Ce.currentTarget.style.cursor=Ue<_e.width/2?"w-resize":"e-resize"},Z={position:"fixed",top:w==null?void 0:w.top,left:w==null?void 0:w.left,width:w==null?void 0:w.width,height:w==null?void 0:w.height,zIndex:9998},Ne=p?"cover":"contain",Oe=f!==0||K>0?`translate(${f}px, ${K}px)`:void 0,Je=T&&!F?"none":F?`transform ${Fn}ms ${hi}`:J?`transform ${Fn}ms ${hi}, opacity ${Fn}ms ${hi}`:V==="opening"||se?`opacity ${Fn}ms ${hi}`:"none",De={...Z,transform:Oe,opacity:K>0?pe:V==="opening"||se?0:1,transition:Je,pointerEvents:"none"},Ze={position:"absolute",top:((H==null?void 0:H.top)??0)-((w==null?void 0:w.top)??0),left:((H==null?void 0:H.left)??0)-((w==null?void 0:w.left)??0),width:H==null?void 0:H.width,height:H==null?void 0:H.height,objectFit:Ne,pointerEvents:re&&D&&!ge?"auto":"none",touchAction:re&&D?"none":void 0},at=(w==null?void 0:w.width)??0,Xe=we?(n+te+t.length)%t.length:null,be=Xe!==null?t[Xe]:null,He={...Z,transform:we?`translateX(${te*at+f}px)`:void 0,opacity:1,transition:F?`transform ${Fn}ms ${hi}`:"none",pointerEvents:"none"},je={position:"absolute",top:((j==null?void 0:j.top)??0)-((w==null?void 0:w.top)??0),left:((j==null?void 0:j.left)??0)-((w==null?void 0:w.left)??0),width:j==null?void 0:j.width,height:j==null?void 0:j.height,objectFit:Ne,pointerEvents:"none"},Qe=H?{position:"fixed",top:H.top,height:H.height,width:H.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:v,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:V==="open"?"none":void 0},onClick:q,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:D?Y:0,transition:T?"none":`opacity ${Fn}ms ${hi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:x,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:D?1:0,transition:`opacity ${Fn}ms ${hi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:x,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:D?1:0,transition:`opacity ${Fn}ms ${hi}`},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]})}),j&&w&&be&&a.jsx("div",{style:He,onTransitionEnd:ne,children:Yi(be)?a.jsx("video",{src:be.assetId,muted:!0,playsInline:!0,preload:"auto",style:je},`neighbor-${Xe}-${be.assetId}`):a.jsx("img",{src:be.assetId,alt:be.name,style:je},`neighbor-${Xe}-${be.assetId}`)}),j&&w&&oe&&a.jsx("div",{style:De,onTransitionEnd:ne,children:re?a.jsx(iv,{src:oe.assetId,phase:V,mediaRef:m,mediaStyle:Ze,onLoadedMetadata:Ae,onClick:Ie,onMouseMove:de},`${n}-${oe.assetId}`):a.jsx("img",{ref:m,src:oe.assetId,alt:oe.name,onLoad:Ae,style:Ze},`${n}-${oe.assetId}`)}),D&&Qe&&t.length>1&&!re&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Qe,left:H.left,cursor:"w-resize",pointerEvents:T?"none":"auto"},onClick:Ce=>{if($.current){$.current=!1;return}Ce.stopPropagation(),Q(-1)}}),a.jsx("div",{style:{...Qe,left:H.left+H.width/2,cursor:"e-resize",pointerEvents:T?"none":"auto"},onClick:Ce=>{if($.current){$.current=!1;return}Ce.stopPropagation(),Q(1)}})]})]})}function rv(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function av({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:r,activeEvent:l,layoutId:c,portalId:d}){const{prefix:u}=A.useScopedStyles(),{type:p="a",gridLayout:v,textBoxWidth:x=100,verticalGap:m,entriesCount:h,lightbox:b,imageDisplay:S,imageCorners:M,lightboxImageDisplay:y,slider:$,sliderTiming:R,direction:X,transition:B,titleMarginTop:O,subtitleMarginTop:N,titleColor:z,subtitleColor:C,lightboxCounterColor:I,titleFontFamily:j,titleFontSettings:E,titleFontSize:w,titleLineHeight:L,titleLetterSpacing:V,titleWordSpacing:_,titleTextAppearance:K,subtitleFontFamily:P,subtitleFontSettings:f,subtitleFontSize:U,subtitleLineHeight:te,subtitleLetterSpacing:ce,subtitleWordSpacing:F,subtitleTextAppearance:ie,lightboxCounterFontFamily:T,lightboxCounterFontSettings:le,lightboxCounterFontSize:J,lightboxCounterLineHeight:Se,lightboxCounterLetterSpacing:Le,lightboxCounterWordSpacing:me,lightboxCounterTextAppearance:ye,showText:ee="always",alignEntries:oe="off",align:re="top"}=e,ge={fontSettings:{fontFamily:j,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:w??.01,lineHeight:L,letterSpacing:V??0,wordSpacing:_??0,textAppearance:K,color:z},Ae={...pn(nn(ge,n))},fe={fontSettings:{fontFamily:P,fontWeight:(f==null?void 0:f.fontWeight)??400,fontStyle:(f==null?void 0:f.fontStyle)??"normal"},fontSize:U??.01,lineHeight:te,letterSpacing:ce??0,wordSpacing:F??0,textAppearance:ie,color:C},xe={...pn(nn(fe,n))},g={fontSettings:{fontFamily:T,fontWeight:(le==null?void 0:le.fontWeight)??400,fontStyle:(le==null?void 0:le.fontStyle)??"normal"},fontSize:J??.01,lineHeight:Se,letterSpacing:Le??0,wordSpacing:me??0,textAppearance:ye,color:I},Q={...pn(nn(g,n)),...os(J,Se,u,n)},ne=is(w,L,`${u}-item-title`,`${u}-text-tight-leading`),ue=is(U,te,`${u}-item-subtitle`,`${u}-text-tight-leading`),q=os(w,L,u,n),D=os(U,te,u,n),se=is(J,Se,`${u}-lightbox-counter`,`${u}-text-tight-leading`),Y=A.buildColorVars(u,{titleColor:z,subtitleColor:C,lightboxCounterColor:I},sv,lv),Ie=`${l&&l!=="default"?`${u}-state-${l}`:""}${ee==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),de=h===0?1/0:h,Z=(t??[]).slice(0,de),Ne=s.useMemo(()=>b==="on"?Jy(Z):[],[Z,b]),Oe=v.entryWidth??.2,Je=(S==null?void 0:S.display)==="cover",De=(S==null?void 0:S.ratioValue)??"1:1",Ze=(S==null?void 0:S.reversed)??!1,[at,Xe]=De.split(":").map(Number),je=`${Ze?Xe:at} / ${Ze?at:Xe}`,Qe=v.columnsCount,Ce=A.scalingValue(Oe??0,n),_e=Ce,Ue=!Je&&$!=="off",Ye=Z.length%Qe||Qe,lt=Ye<Qe&&Z.length>0,it=Z.length-Ye,qe=lt?Math.floor((Qe-Ye)/2)+1:1,Ee=M?A.scalingValue(M,n):void 0,pt={width:_e,...Je?{aspectRatio:je,height:"auto",overflow:"hidden"}:{height:"auto"},...Ee?{borderRadius:Ee,overflow:"hidden"}:{}},ke=`${u}-item-image-wrapper${Ue?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),We=p==="d"||p==="e"||p==="f",Ve=oe==="on",ct=`calc(${A.scalingValue(Oe??0,n)} * (${x} / 100))`,ot=A.scalingValue(Oe*x/100,n),xt=Je?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...Ee?{borderRadius:Ee}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...Ee?{borderRadius:Ee}:{}},[Pt,Vt]=s.useState(0),vt=s.useRef(null),Mt=B==="fade"||X==="horizontal"?"ltr":X==="vertical"?"ttb":"ltr";s.useEffect(()=>{const mt=vt.current;if(!mt)return;const gt=new ResizeObserver(Re=>{Vt(Math.round(Re[0].contentRect.width))});return gt.observe(mt),()=>gt.disconnect()},[]);const Ht=(()=>{const mt={...Y},gt=vt.current?getComputedStyle(vt.current).getPropertyValue("--cntrl-article-width").trim():"";return gt&&(mt["--cntrl-article-width"]=gt),mt})(),[Gt,kt]=s.useState(!1),[Pe,Be]=s.useState([]),[ft,$t]=s.useState(0),et=b==="on"&&(!n||i),Et=(mt,gt)=>{n&&!i||b!=="off"&&(Be(mt),$t(gt),kt(!0))};s.useEffect(()=>{if(!Gt||b!=="on"||typeof document>"u")return;const mt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=mt}},[Gt,b]),s.useEffect(()=>{!n||i||kt(!1)},[n,i]);const Xt=s.useMemo(()=>jy(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Xt}}),b==="on"&&a.jsx(ev,{mediaList:Ne}),a.jsx("div",{style:Y,children:a.jsx("div",{ref:vt,className:`${u}-wrapper ${u}-type-${p}${Ve?` ${u}-align-entries`:""} ${u}-image-align-${re} ${Ie}`.trim(),style:{gridTemplateColumns:`repeat(${Qe}, ${Ce})`,rowGap:Ve?0:A.scalingValue(m??0,n),columnGap:A.scalingValue(v.horizontalGap??0,n),width:A.scalingValue(v.wrapperWidth??0,n),...Ve?{[`--${u}-align-entries-row-gap`]:A.scalingValue(m??0,n)}:{}},children:Z.map((mt,gt)=>{var Wt;const Re=Lc(mt.title),tt=Lc(mt.subtitle),nt=(((Wt=mt.link)==null?void 0:Wt.length)??0)>0&&b==="off"?mt.link:void 0,st=Math.floor(gt/Qe)===Math.ceil(Z.length/Qe)-1,At=lt&>>=it?`${qe+(gt-it)}`:void 0,St=We?a.jsxs("div",{className:`${u}-item-text-block`,children:[Re&&a.jsx("p",{className:ne,style:{width:ct,...Ae,...q},children:mt.title}),Re&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:A.scalingValue(O??0,n),width:ot}}),tt&&a.jsx("p",{className:ue,style:{width:ct,...xe,...D},children:mt.subtitle}),tt&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:A.scalingValue(N??0,n),width:ot}})]}):null,ht=Ve?a.jsxs("div",{className:`${u}-item-title-row`,children:[!We&&a.jsx("div",{"data-controls":o&&Re?"titleMarginTop":void 0,className:o&&Re?`${u}-control`:void 0,style:{height:Re?A.scalingValue(O??0,n):0,width:ot}}),Re&&a.jsx("p",{className:ne,style:{width:ct,...Ae,...q},children:mt.title}),We&&Re&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:A.scalingValue(O??0,n),width:ot}})]}):null,Dt=Ve?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!We&&a.jsx("div",{"data-controls":o&&tt?"subtitleMarginTop":void 0,className:o&&tt?`${u}-control`:void 0,style:{height:tt?A.scalingValue(N??0,n):0,width:ot}}),tt&&a.jsx("p",{className:ue,style:{width:ct,...xe,...D},children:mt.subtitle}),We&&tt&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:A.scalingValue(N??0,n),width:ot}})]}):null,Ct=nt?a.jsxs("a",{href:nt,target:"_blank",className:`${u}-item-text-link`,children:[ht,Dt]}):a.jsxs(a.Fragment,{children:[ht,Dt]}),qt=tp(mt.gallery),jt=qt.filter(wt=>wt.lightboxMedia).map(wt=>wt.lightboxMedia),Nt=a.jsx("div",{className:ke,style:pt,children:qt.length===0?null:$==="off"?(()=>{const{displayMedia:wt,lightboxMedia:W}=qt[0],Te=W?jt.findIndex(ze=>ze.assetId===W.assetId):-1;return a.jsx(Pc,{media:wt,className:`${u}-item-${Yi(wt)?"video":"image"}`.trim(),style:xt,onMediaClick:et&&Te>=0?()=>Et(jt,Te):void 0})})():a.jsxs(a.Fragment,{children:[Ue&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:qt.map(({displayMedia:wt})=>Yi(wt)?a.jsx("video",{src:wt.assetId,muted:!0,playsInline:!0},`sizer-${wt.assetId}`):a.jsx("img",{src:wt.assetId,alt:""},`sizer-${wt.assetId}`))}),a.jsx(El,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:R*1e3,width:"100%",height:"100%",speed:qy,type:B==="fade"?"fade":"loop",rewind:B==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:Mt},onMoved:wt=>{X!=="random"||B==="fade"||Xy(wt)},children:qt.map(({displayMedia:wt,lightboxMedia:W},Te)=>{const ze=W?jt.findIndex(Fe=>Fe.assetId===W.assetId):-1;return a.jsx(kl,{children:a.jsx(Pc,{media:wt,className:`${u}-item-${Yi(wt)?"video":"image"}`.trim(),style:xt,onMediaClick:et&&ze>=0?()=>Et(jt,ze):void 0})},Te)})},`${B}-${Oe}-${X}-${R}-${Pt}-${c}`)]})}),Bt=We?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&Re?"titleMarginTop":void 0,className:o&&Re?`${u}-control`:void 0,style:{height:Re?A.scalingValue(O??0,n):0,width:ot}}),a.jsx("p",{className:ne,style:{width:ct,...Ae,...q},children:mt.title}),a.jsx("div",{"data-controls":o&&tt?"subtitleMarginTop":void 0,className:o&&tt?`${u}-control`:void 0,style:{height:tt?A.scalingValue(N??0,n):0,width:ot}}),a.jsx("p",{className:ue,style:{width:ct,...xe,...D},children:mt.subtitle})]});return a.jsx("div",{className:`${u}-item`.trim(),style:At&&!Ve?{gridColumn:At}:void 0,children:a.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${Ve&&st?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(x??0)>100?`calc(${Ce} * (${x} / 100))`:Ce,...At&&Ve?{gridColumn:At}:{}},children:Ve?a.jsx(a.Fragment,{children:We?a.jsxs(a.Fragment,{children:[Ct,a.jsx("a",{href:nt,target:"_blank",className:`${u}-item-image-link`,children:Nt})]}):a.jsxs(a.Fragment,{children:[a.jsx("a",{href:nt,target:"_blank",className:`${u}-item-image-link`,children:Nt}),Ct]})}):nt?a.jsxs(a.Fragment,{children:[a.jsxs("a",{href:nt,target:"_blank",className:`${u}-item-image-link`,children:[St,Nt]}),!We&&a.jsx("a",{href:nt,target:"_blank",className:`${u}-item-text-link`,children:Bt})]}):a.jsxs(a.Fragment,{children:[St,Nt,Bt]})})},gt)})})}),(!n||i)&&Gt&&typeof document<"u"&&b==="on"&&(()=>{const mt=(d?document.getElementById(d):null)??document.body;return Un.createPortal(a.jsx("div",{style:Ht,"data-selection":"none",children:a.jsx(ov,{prefix:u,items:Pe,index:ft,imageDisplay:rv(y),isEditor:n,onClose:()=>kt(!1),onPrev:()=>$t(gt=>(gt-1+Pe.length)%Pe.length),onNext:()=>$t(gt=>(gt+1)%Pe.length),counterClassName:se,counterStyle:Q})}),mt)})()]})}const sv={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},lv=["hover","focus","filled","success","error"],cv=`import { Splide, SplideSlide } from '@splidejs/react-splide';
|
|
5258
5258
|
import '@splidejs/react-splide/css/core';
|
|
5259
5259
|
import { CommonComponentProps } from '../props';
|
|
5260
5260
|
import {
|
|
@@ -7307,12 +7307,12 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
|
|
|
7307
7307
|
};
|
|
7308
7308
|
|
|
7309
7309
|
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
7310
|
-
`,rs={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},ov=["titleColor","subtitleColor","lightboxCounterColor"],rv={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XERA3G7J0J00XVKEXX",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEZCK8SJPAFXCKG8QN",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XES6MX14JTT1CF24BB",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEMGJWCYNPZ3ETQTKM",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},imageCorners:{type:"number",scope:"layout",title:"Round corners",min:0,display:{type:"numeric-input"}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...rs.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:{...rs.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:{...rs.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"off",align:"top",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"b",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,imageCorners:0,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.064,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},t:{type:"b",gridLayout:{entryWidth:.1041,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.03255,titleLineHeight:.03255,titleLetterSpacing:-.00118,subtitleFontSize:.01822,subtitleLineHeight:.02083,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},d:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.25,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","align","entriesCount","lightbox","imageDisplay","imageCorners","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","verticalGap"]},{type:"row",title:"",items:["entriesCount","showText"]},{type:"row",title:"",items:["alignEntries","align"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay","imageCorners"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","direction"]},{type:"group",title:"",items:["sliderTiming","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...ov],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},av={element:ev,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.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:rv,sourceCode:iv},sv=50,Mc=10,Al="cntrl-lightbox-journal",Da=Al,Gs=`${Al}-`,Ba=e=>`${Al}-${e}`,Fl=e=>e===Da||e.startsWith(Gs),Ec=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},kc=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=Ec(t.get(Ba(e)));if(i)return i}const n=Ec(t.get(Da));if(n)return n;for(const[i]of t){if(!i.startsWith(Gs))continue;const o=i.slice(Gs.length);if(!/^\d+$/.test(o))continue;const r=Number.parseInt(o,10);if(Number.isFinite(r)&&r>=1)return r}return null},Ac=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Ku=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{Fl(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(Ba(t),String(e)):i.searchParams.set(Da,String(e));const o=n?"replaceState":"pushState",r=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",r)},lv=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Ba(e)||i===Da:Fl(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)}},Qu=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Ba(e)):[...t.keys()].some(n=>Fl(n))},cv=(e,t)=>{if(Qu(t)){if(e){window.history.back();return}lv(t)}},dv=20,uv=2,as=e=>`max(${e}, ${dv}px)`,Io=e=>((e==null?void 0:e.image)??[]).slice(0,uv),Zu=e=>e.reduce((t,n)=>t+Io(n).length,0),pv=(e,t)=>{const n=e.slice(0,t).reduce((o,r)=>o+Io(r).length,1),i=Io(e[t]).length;return{start:n,end:n+i-1}},mv=(e,t)=>{const n=Zu(e),{start:i,end:o}=pv(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},pa=(e,t)=>t==="B"?e.flatMap((n,i)=>Io(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Io(n)})),gv=(e,t,n,i)=>{var r;if(n==="B")return`${t+1} / ${e.length}`;const o=((r=e[t])==null?void 0:r.entryIndex)??0;return mv(i,o)},Fc=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",hv=(e,t,n)=>e==="B"?t.length>1:Zu(n)>1,Ln=.004,ni=.004,bo={title1Width:.13,title2Width:.13,title3Width:.14},wi=(e,t,n,i,o)=>{const r=[];return t.title1&&r.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&r.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&r.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),r},Lo=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},c)=>{if(r<=0||c<=0)return{overflow:r,widths:[c,...l]};const d=Math.min(r,c);return{overflow:r-d,widths:[c-d,...l]}},{overflow:i-1,widths:[]});return o},vr=(e,t)=>Lo(e,t),yn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},$i=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Lo(e.length,n),effective:vr(e.length,n)}},Ju=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),ep=(e,t,n,i)=>e.slice(0,i+1).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),Li=["title1","title2","title3","count"],bt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Nl={title1:"1",title2:"2",title3:"3",count:"Count"},_l=e=>[bt(e,"fontFamily"),bt(e,"fontSettings"),{type:"row",items:[bt(e,"fontSize"),bt(e,"lineHeight"),bt(e,"letterSpacing"),bt(e,"wordSpacing")]},bt(e,"textAlign"),bt(e,"textAppearance")],fv=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Li.map(e=>[Nl[e],_l(e)]))}),yv={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},vv={title1:.02,title2:.02,title3:.02,count:.017},Bi=(e,t)=>{const n=i=>{const o=bt(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[yv[t]]}},zi=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??vv[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return en(i,n)};function tp({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l}){const{title1Width:c,title2Width:d,title3Width:u,title1MarginLeft:p=0,title2MarginLeft:v=0,title3MarginLeft:b=0,titleRowMarginBottom:m=0,titleHeaderLayout:h="desktop",contentMarginTop:x=0,iconMarginRight:S=0,closeIcon:P=null,closeIconMaxWidth:f=0,closeIconColor:w="#000000",closeIconHoverColor:N="#cccccc"}=n,V=k.scalingValue(x,i),B=k.scalingValue(Math.max(x,ni),i),H=k.scalingValue(S,i),_=k.scalingValue(m,i),z=h==="mobile",$=zi("title1",Bi(n,"title1"),i),E=zi("title2",Bi(n,"title2"),i),j=zi("title3",Bi(n,"title3"),i),L=s.useMemo(()=>({title1Width:c??bo.title1Width,title2Width:d??bo.title2Width,title3Width:u??bo.title3Width}),[c,d,u]),C=s.useMemo(()=>({title2MarginLeft:v,title3MarginLeft:b}),[v,b]),T=s.useMemo(()=>wi(e,t,$,E,j),[e,t,$,E,j]),G=s.useMemo(()=>T.map(W=>L[W.widthKey]),[T,L]),A=s.useMemo(()=>Lo(T.length,G),[T.length,G]),Y=s.useMemo(()=>vr(T.length,G),[T.length,G]),R=s.useMemo(()=>T.filter(W=>W.prefix==="title1"),[T]),y=s.useMemo(()=>T.filter(W=>W.prefix==="title2"||W.prefix==="title3"),[T]),U=s.useMemo(()=>$i(R,L),[R,L]),ee=s.useMemo(()=>$i(y,L),[y,L]),de=!!(t.title1||t.title2||t.title3),F=P!==null;if(!(de||F))return null;const I=(p??0)>0||o,se=(W,Le)=>{const ae=T.findIndex(Ne=>Ne.prefix===W.prefix);if(!z||Le==="single-row")return{effectiveWidth:Y[ae]??0,resolvedWidth:A[ae]??0,maxWidth:yn(ae,A)};if(Le==="two-row-top"){const Ne=R.findIndex(Oe=>Oe.prefix===W.prefix);return{effectiveWidth:U.effective[Ne]??0,resolvedWidth:U.resolved[Ne]??0,maxWidth:yn(Ne,U.resolved)}}const Q=y.findIndex(Ne=>Ne.prefix===W.prefix);return{effectiveWidth:ee.effective[Q]??0,resolvedWidth:ee.resolved[Q]??0,maxWidth:yn(Q,ee.resolved)}},J=(W,Le,ae)=>{if(!z||ae==="single-row"){const qe=W.findIndex(ve=>ve.prefix===Le.prefix),Je=W.map(ve=>L[ve.widthKey]),ot=Lo(W.length,Je);return{effectiveWidth:vr(W.length,Je)[qe]??0,resolvedWidth:ot[qe]??0,maxWidth:yn(qe,ot)}}if(ae==="two-row-top"){const qe=W.filter(ve=>ve.prefix==="title1"),Je=qe.findIndex(ve=>ve.prefix===Le.prefix),{resolved:ot,effective:Ve}=$i(qe,L);return{effectiveWidth:Ve[Je]??0,resolvedWidth:ot[Je]??0,maxWidth:yn(Je,ot)}}const Q=W.filter(qe=>qe.prefix==="title2"||qe.prefix==="title3"),Ne=Q.findIndex(qe=>qe.prefix===Le.prefix),{resolved:Oe,effective:it}=$i(Q,L);return{effectiveWidth:it[Ne]??0,resolvedWidth:Oe[Ne]??0,maxWidth:yn(Ne,Oe)}},Se=W=>ep(T,A,C,W)+(z?0:p??0),Re=()=>z?0:p??0,pe=W=>y.slice(0,W).reduce((Le,ae,Q)=>Le+(ae.marginLeftKey?C[ae.marginLeftKey]??0:0)+(ee.resolved[Q]??0),0),he=W=>{const Le=y[W];return pe(W)+(Le.marginLeftKey?C[Le.marginLeftKey]??0:0)+(ee.resolved[W]??0)},te=(W,Le,ae)=>{const Q=W.marginLeftKey?C[W.marginLeftKey]??0:0,{effectiveWidth:Ne,resolvedWidth:Oe,maxWidth:it}=ae??se(W,Le),qe=Math.max(Q,ni),Je=o&&Le==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":W.prefix,style:{width:k.scalingValue(Ne,i),...Q>0?{marginLeft:k.scalingValue(Q,i)}:{}},children:[a.jsx("p",{className:W.className,style:W.style,children:W.text}),Je&&W.marginLeftKey?a.jsx("div",{"data-controls":W.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Oe),style:{position:"absolute",top:0,left:k.scalingValue(-Q,i),width:k.scalingValue(qe,i),height:"100%",pointerEvents:"auto"}}):null,Je?a.jsx("div",{"data-controls":W.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(it),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:k.scalingValue(-Ln/2,i),width:k.scalingValue(Ln,i),height:"100%",pointerEvents:"auto"}}):null]},W.className)},le=(W="two-row")=>{const Le=T.findIndex(Ne=>Ne.prefix==="title1"),ae=Le>=0?A[Le]:L.title1Width,Q=W==="two-row"&&o;return a.jsx("div",{...Q?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ae)}:{},style:{width:k.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...Q?{pointerEvents:"auto"}:{}}})},re=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:$,"aria-hidden":"true",children:" "}),fe=W=>{const Le=wi(e,W,$,E,j);return a.jsx(a.Fragment,{children:Le.map(ae=>te(ae,"single-row",J(Le,ae,"single-row")))})},xe=W=>{const Le=wi(e,W,$,E,j),ae=Le.find(Q=>Q.prefix==="title1");return ae?te(ae,"two-row-top",J(Le,ae,"two-row-top")):null},Te=(W,Le=!1)=>{const ae=wi(e,W,$,E,j),Q=ae.filter(it=>it.prefix==="title2"||it.prefix==="title3"),Ne=o&&Le;return Q.length>0||Ne||(m??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[Q.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[a.jsx("div",{className:`${e}-titles-stack`,children:Q.map(it=>te(it,"two-row-bottom",J(ae,it,"two-row-bottom")))}),Le&&o?a.jsxs(a.Fragment,{children:[ye(),K()]}):null]}):null,(m??0)>0||Ne?a.jsx("div",{"data-controls":Ne?"titleRowMarginBottom":void 0,"data-controls-axis":Ne?"y":void 0,"data-controls-reverse":Ne?"":void 0,className:Ne?`${e}-control`:void 0,style:{height:_,width:"100%",flexShrink:0,pointerEvents:Ne?"auto":"none"}}):null]}):null},me=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:k.scalingValue(f??0,i),height:k.scalingValue(f??0,i),marginRight:H,"--close-icon-hover-color":N},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:W=>{W.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(mn,{url:P??"",fill:w,hoverFill:i&&!r?w:N,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:H,height:"100%",pointerEvents:"auto"}})]}),be=()=>F?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:me()}):null,we=W=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:W})}),g=W=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[F||de?re():null,I?le("two-row"):null,we(W),be()]}),X=(W,Le=!1)=>a.jsxs(a.Fragment,{children:[g(xe(W)),Te(W,Le)]}),Z=()=>{const W=z?-1:T.findIndex(Q=>Q.prefix==="title1"),Le=!z&&(o||(p??0)>0)?(()=>{const Q=p??0,Ne=W>=0?A[W]:L.title1Width,Oe=Math.max(Q,ni);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ne),style:{position:"absolute",top:0,left:0,width:k.scalingValue(Oe,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,ae=T.flatMap((Q,Ne)=>{if(!Q.marginLeftKey)return[];const Oe=C[Q.marginLeftKey]??0,it=Ju(T,A,C,Ne)+Re(),qe=Math.max(Oe,ni);return a.jsx("div",{"data-controls":Q.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(A[Ne]),style:{position:"absolute",top:0,left:k.scalingValue(it,i),width:k.scalingValue(qe,i),height:"100%",pointerEvents:"auto"}},Q.marginLeftKey)});return Le?[Le,...ae]:ae},ne=()=>T.map((W,Le)=>{const ae=yn(Le,A),Ne=Se(Le)-Ln/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":W.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ae),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:k.scalingValue(Ne,i),width:k.scalingValue(Ln,i),height:"100%",pointerEvents:"auto"}})},`${W.widthKey}-junction`)}),ye=()=>y.flatMap((W,Le)=>{if(!W.marginLeftKey)return[];const ae=C[W.marginLeftKey]??0,Q=pe(Le),Ne=Math.max(ae,ni),{resolvedWidth:Oe}=se(W,"two-row-bottom");return a.jsx("div",{"data-controls":W.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Oe),style:{position:"absolute",top:0,left:k.scalingValue(Q,i),width:k.scalingValue(Ne,i),height:"100%",pointerEvents:"auto"}},W.marginLeftKey)}),K=()=>y.map((W,Le)=>{const{maxWidth:ae}=se(W,"two-row-bottom"),Ne=he(Le)-Ln/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":W.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ae),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:k.scalingValue(Ne,i),width:k.scalingValue(Ln,i),height:"100%",pointerEvents:"auto"}})},`${W.widthKey}-junction`)}),D=()=>!o||z?null:a.jsxs(a.Fragment,{children:[Z(),ne()]}),ce=!!(t.title2||t.title3||(m??0)>0||o),q=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[F||de?re():null,I?le("single-row"):null,de?we(fe(t)):a.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),be(),D()]}),ue=()=>a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...ce?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:ce?void 0:{flex:"0 0 auto",height:"auto"},children:X(t,!0)}),D()]});return a.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:V,flexShrink:0},children:o&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-min":"0",className:`${e}-control`,style:{position:"absolute",top:0,left:0,width:"100%",height:B,pointerEvents:"auto"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...z?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${z?` ${e}-lightbox-content-area-stacked`:""}`,children:a.jsx("div",{className:`${e}-text-bar-cell${z?` ${e}-text-bar-cell-stacked`:""}`,style:z?void 0:{flex:1,minWidth:0,width:"100%"},children:z?ue():q()})})})]})}function xv(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function bv(e){return`
|
|
7310
|
+
`,rs={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},dv=["titleColor","subtitleColor","lightboxCounterColor"],uv={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XERA3G7J0J00XVKEXX",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEZCK8SJPAFXCKG8QN",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XES6MX14JTT1CF24BB",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{assetId:"01M3QM74XEMGJWCYNPZ3ETQTKM",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},imageCorners:{type:"number",scope:"layout",title:"Round corners",min:0,display:{type:"numeric-input"}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...rs.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:{...rs.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:{...rs.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"off",align:"top",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"b",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,imageCorners:0,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.064,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},t:{type:"b",gridLayout:{entryWidth:.1041,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.03255,titleLineHeight:.03255,titleLetterSpacing:-.00118,subtitleFontSize:.01822,subtitleLineHeight:.02083,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},d:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.25,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","align","entriesCount","lightbox","imageDisplay","imageCorners","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","verticalGap"]},{type:"row",title:"",items:["entriesCount","showText"]},{type:"row",title:"",items:["alignEntries","align"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay","imageCorners"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","direction"]},{type:"group",title:"",items:["sliderTiming","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...dv],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},pv={element:av,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.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:uv,sourceCode:cv},mv=50,Mc=10,Al="cntrl-lightbox-journal",Da=Al,Vs=`${Al}-`,Ba=e=>`${Al}-${e}`,Fl=e=>e===Da||e.startsWith(Vs),Ec=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},kc=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=Ec(t.get(Ba(e)));if(i)return i}const n=Ec(t.get(Da));if(n)return n;for(const[i]of t){if(!i.startsWith(Vs))continue;const o=i.slice(Vs.length);if(!/^\d+$/.test(o))continue;const r=Number.parseInt(o,10);if(Number.isFinite(r)&&r>=1)return r}return null},Ac=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},np=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{Fl(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(Ba(t),String(e)):i.searchParams.set(Da,String(e));const o=n?"replaceState":"pushState",r=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",r)},gv=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Ba(e)||i===Da:Fl(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)}},ip=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Ba(e)):[...t.keys()].some(n=>Fl(n))},hv=(e,t)=>{if(ip(t)){if(e){window.history.back();return}gv(t)}},fv=20,yv=2,as=e=>`max(${e}, ${fv}px)`,Po=e=>((e==null?void 0:e.image)??[]).slice(0,yv),op=e=>e.reduce((t,n)=>t+Po(n).length,0),vv=(e,t)=>{const n=e.slice(0,t).reduce((o,r)=>o+Po(r).length,1),i=Po(e[t]).length;return{start:n,end:n+i-1}},xv=(e,t)=>{const n=op(e),{start:i,end:o}=vv(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},pa=(e,t)=>t==="B"?e.flatMap((n,i)=>Po(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Po(n)})),bv=(e,t,n,i)=>{var r;if(n==="B")return`${t+1} / ${e.length}`;const o=((r=e[t])==null?void 0:r.entryIndex)??0;return xv(i,o)},Fc=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Sv=(e,t,n)=>e==="B"?t.length>1:op(n)>1,Pn=.004,ii=.004,wo={title1Width:.13,title2Width:.13,title3Width:.14},Ti=(e,t,n,i,o)=>{const r=[];return t.title1&&r.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&r.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&r.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),r},Ro=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},c)=>{if(r<=0||c<=0)return{overflow:r,widths:[c,...l]};const d=Math.min(r,c);return{overflow:r-d,widths:[c-d,...l]}},{overflow:i-1,widths:[]});return o},vr=(e,t)=>Ro(e,t),yn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Ii=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ro(e.length,n),effective:vr(e.length,n)}},rp=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),ap=(e,t,n,i)=>e.slice(0,i+1).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),Mi=["title1","title2","title3","count"],bt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Nl={title1:"1",title2:"2",title3:"3",count:"Count"},_l=e=>[bt(e,"fontFamily"),bt(e,"fontSettings"),{type:"row",items:[bt(e,"fontSize"),bt(e,"lineHeight"),bt(e,"letterSpacing"),bt(e,"wordSpacing")]},bt(e,"textAlign"),bt(e,"textAppearance")],wv=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Mi.map(e=>[Nl[e],_l(e)]))}),$v={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Cv={title1:.02,title2:.02,title3:.02,count:.017},Vi=(e,t)=>{const n=i=>{const o=bt(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[$v[t]]}},Gi=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??Cv[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return nn(i,n)};function sp({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l}){const{title1Width:c,title2Width:d,title3Width:u,title1MarginLeft:p=0,title2MarginLeft:v=0,title3MarginLeft:x=0,titleRowMarginBottom:m=0,titleHeaderLayout:h="desktop",contentMarginTop:b=0,iconMarginRight:S=0,closeIcon:M=null,closeIconMaxWidth:y=0,closeIconColor:$="#000000",closeIconHoverColor:R="#cccccc"}=n,X=A.scalingValue(b,i),B=A.scalingValue(Math.max(b,ii),i),O=A.scalingValue(S,i),N=A.scalingValue(m,i),z=h==="mobile",C=Gi("title1",Vi(n,"title1"),i),I=Gi("title2",Vi(n,"title2"),i),j=Gi("title3",Vi(n,"title3"),i),E=s.useMemo(()=>({title1Width:c??wo.title1Width,title2Width:d??wo.title2Width,title3Width:u??wo.title3Width}),[c,d,u]),w=s.useMemo(()=>({title2MarginLeft:v,title3MarginLeft:x}),[v,x]),L=s.useMemo(()=>Ti(e,t,C,I,j),[e,t,C,I,j]),V=s.useMemo(()=>L.map(H=>E[H.widthKey]),[L,E]),_=s.useMemo(()=>Ro(L.length,V),[L.length,V]),K=s.useMemo(()=>vr(L.length,V),[L.length,V]),P=s.useMemo(()=>L.filter(H=>H.prefix==="title1"),[L]),f=s.useMemo(()=>L.filter(H=>H.prefix==="title2"||H.prefix==="title3"),[L]),U=s.useMemo(()=>Ii(P,E),[P,E]),te=s.useMemo(()=>Ii(f,E),[f,E]),ce=!!(t.title1||t.title2||t.title3),F=M!==null;if(!(ce||F))return null;const T=(p??0)>0||o,le=(H,Ie)=>{const de=L.findIndex(Ne=>Ne.prefix===H.prefix);if(!z||Ie==="single-row")return{effectiveWidth:K[de]??0,resolvedWidth:_[de]??0,maxWidth:yn(de,_)};if(Ie==="two-row-top"){const Ne=P.findIndex(Oe=>Oe.prefix===H.prefix);return{effectiveWidth:U.effective[Ne]??0,resolvedWidth:U.resolved[Ne]??0,maxWidth:yn(Ne,U.resolved)}}const Z=f.findIndex(Ne=>Ne.prefix===H.prefix);return{effectiveWidth:te.effective[Z]??0,resolvedWidth:te.resolved[Z]??0,maxWidth:yn(Z,te.resolved)}},J=(H,Ie,de)=>{if(!z||de==="single-row"){const De=H.findIndex(be=>be.prefix===Ie.prefix),Ze=H.map(be=>E[be.widthKey]),at=Ro(H.length,Ze);return{effectiveWidth:vr(H.length,Ze)[De]??0,resolvedWidth:at[De]??0,maxWidth:yn(De,at)}}if(de==="two-row-top"){const De=H.filter(be=>be.prefix==="title1"),Ze=De.findIndex(be=>be.prefix===Ie.prefix),{resolved:at,effective:Xe}=Ii(De,E);return{effectiveWidth:Xe[Ze]??0,resolvedWidth:at[Ze]??0,maxWidth:yn(Ze,at)}}const Z=H.filter(De=>De.prefix==="title2"||De.prefix==="title3"),Ne=Z.findIndex(De=>De.prefix===Ie.prefix),{resolved:Oe,effective:Je}=Ii(Z,E);return{effectiveWidth:Je[Ne]??0,resolvedWidth:Oe[Ne]??0,maxWidth:yn(Ne,Oe)}},Se=H=>ap(L,_,w,H)+(z?0:p??0),Le=()=>z?0:p??0,me=H=>f.slice(0,H).reduce((Ie,de,Z)=>Ie+(de.marginLeftKey?w[de.marginLeftKey]??0:0)+(te.resolved[Z]??0),0),ye=H=>{const Ie=f[H];return me(H)+(Ie.marginLeftKey?w[Ie.marginLeftKey]??0:0)+(te.resolved[H]??0)},ee=(H,Ie,de)=>{const Z=H.marginLeftKey?w[H.marginLeftKey]??0:0,{effectiveWidth:Ne,resolvedWidth:Oe,maxWidth:Je}=de??le(H,Ie),De=Math.max(Z,ii),Ze=o&&Ie==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":H.prefix,style:{width:A.scalingValue(Ne,i),...Z>0?{marginLeft:A.scalingValue(Z,i)}:{}},children:[a.jsx("p",{className:H.className,style:H.style,children:H.text}),Ze&&H.marginLeftKey?a.jsx("div",{"data-controls":H.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Oe),style:{position:"absolute",top:0,left:A.scalingValue(-Z,i),width:A.scalingValue(De,i),height:"100%",pointerEvents:"auto"}}):null,Ze?a.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Je),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:A.scalingValue(-Pn/2,i),width:A.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}}):null]},H.className)},oe=(H="two-row")=>{const Ie=L.findIndex(Ne=>Ne.prefix==="title1"),de=Ie>=0?_[Ie]:E.title1Width,Z=H==="two-row"&&o;return a.jsx("div",{...Z?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(de)}:{},style:{width:A.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...Z?{pointerEvents:"auto"}:{}}})},re=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:C,"aria-hidden":"true",children:" "}),ge=H=>{const Ie=Ti(e,H,C,I,j);return a.jsx(a.Fragment,{children:Ie.map(de=>ee(de,"single-row",J(Ie,de,"single-row")))})},we=H=>{const Ie=Ti(e,H,C,I,j),de=Ie.find(Z=>Z.prefix==="title1");return de?ee(de,"two-row-top",J(Ie,de,"two-row-top")):null},Ae=(H,Ie=!1)=>{const de=Ti(e,H,C,I,j),Z=de.filter(Je=>Je.prefix==="title2"||Je.prefix==="title3"),Ne=o&&Ie;return Z.length>0||Ne||(m??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[Z.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[a.jsx("div",{className:`${e}-titles-stack`,children:Z.map(Je=>ee(Je,"two-row-bottom",J(de,Je,"two-row-bottom")))}),Ie&&o?a.jsxs(a.Fragment,{children:[ue(),q()]}):null]}):null,(m??0)>0||Ne?a.jsx("div",{"data-controls":Ne?"titleRowMarginBottom":void 0,"data-controls-axis":Ne?"y":void 0,"data-controls-reverse":Ne?"":void 0,className:Ne?`${e}-control`:void 0,style:{height:N,width:"100%",flexShrink:0,pointerEvents:Ne?"auto":"none"}}):null]}):null},fe=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:A.scalingValue(y??0,i),height:A.scalingValue(y??0,i),marginRight:O,"--close-icon-hover-color":R},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:H=>{H.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(gn,{url:M??"",fill:$,hoverFill:i&&!r?$:R,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:O,height:"100%",pointerEvents:"auto"}})]}),ve=()=>F?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:fe()}):null,xe=H=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:H})}),g=H=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[F||ce?re():null,T?oe("two-row"):null,xe(H),ve()]}),G=(H,Ie=!1)=>a.jsxs(a.Fragment,{children:[g(we(H)),Ae(H,Ie)]}),Q=()=>{const H=z?-1:L.findIndex(Z=>Z.prefix==="title1"),Ie=!z&&(o||(p??0)>0)?(()=>{const Z=p??0,Ne=H>=0?_[H]:E.title1Width,Oe=Math.max(Z,ii);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ne),style:{position:"absolute",top:0,left:0,width:A.scalingValue(Oe,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,de=L.flatMap((Z,Ne)=>{if(!Z.marginLeftKey)return[];const Oe=w[Z.marginLeftKey]??0,Je=rp(L,_,w,Ne)+Le(),De=Math.max(Oe,ii);return a.jsx("div",{"data-controls":Z.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(_[Ne]),style:{position:"absolute",top:0,left:A.scalingValue(Je,i),width:A.scalingValue(De,i),height:"100%",pointerEvents:"auto"}},Z.marginLeftKey)});return Ie?[Ie,...de]:de},ne=()=>L.map((H,Ie)=>{const de=yn(Ie,_),Ne=Se(Ie)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(de),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:A.scalingValue(Ne,i),width:A.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}})},`${H.widthKey}-junction`)}),ue=()=>f.flatMap((H,Ie)=>{if(!H.marginLeftKey)return[];const de=w[H.marginLeftKey]??0,Z=me(Ie),Ne=Math.max(de,ii),{resolvedWidth:Oe}=le(H,"two-row-bottom");return a.jsx("div",{"data-controls":H.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Oe),style:{position:"absolute",top:0,left:A.scalingValue(Z,i),width:A.scalingValue(Ne,i),height:"100%",pointerEvents:"auto"}},H.marginLeftKey)}),q=()=>f.map((H,Ie)=>{const{maxWidth:de}=le(H,"two-row-bottom"),Ne=ye(Ie)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(de),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:A.scalingValue(Ne,i),width:A.scalingValue(Pn,i),height:"100%",pointerEvents:"auto"}})},`${H.widthKey}-junction`)}),D=()=>!o||z?null:a.jsxs(a.Fragment,{children:[Q(),ne()]}),se=!!(t.title2||t.title3||(m??0)>0||o),Y=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[F||ce?re():null,T?oe("single-row"):null,ce?xe(ge(t)):a.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),ve(),D()]}),pe=()=>a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...se?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:se?void 0:{flex:"0 0 auto",height:"auto"},children:G(t,!0)}),D()]});return a.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:X,flexShrink:0},children:o&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-min":"0",className:`${e}-control`,style:{position:"absolute",top:0,left:0,width:"100%",height:B,pointerEvents:"auto"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...z?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${z?` ${e}-lightbox-content-area-stacked`:""}`,children:a.jsx("div",{className:`${e}-text-bar-cell${z?` ${e}-text-bar-cell-stacked`:""}`,style:z?void 0:{flex:1,minWidth:0,width:"100%"},children:z?pe():Y()})})})]})}function Tv(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Iv(e){return`
|
|
7311
7311
|
.${e}-wrapper {
|
|
7312
7312
|
display: grid;
|
|
7313
7313
|
align-items: start;
|
|
7314
7314
|
justify-content: center;
|
|
7315
|
-
min-height: ${
|
|
7315
|
+
min-height: ${Tv(48)};
|
|
7316
7316
|
}
|
|
7317
7317
|
.${e}-item {
|
|
7318
7318
|
display: flex;
|
|
@@ -7627,7 +7627,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
|
7627
7627
|
pointer-events: auto;
|
|
7628
7628
|
flex-shrink: 0;
|
|
7629
7629
|
}
|
|
7630
|
-
`}const Nc={assetId:"",name:"",objectFit:"cover"},Hn=500,qo=650,wn="cubic-bezier(0.22, 1, 0.36, 1)",Sv=72,wv=50,$v=1e4,Cv=650,Tv=500;function Iv(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function np(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=Sa(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function Lv(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?np(i,n):null}function Pv(e){return e.reduce((t,n,i)=>{const o=Hl(n.gallery),l=Wl(o).filter(c=>c.lightboxMedia).map(c=>c.lightboxMedia);return l.length===0||t.push({gridIndex:i,items:l,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function ir(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function _c(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return ir(e,i,n)}const Rv=.03;function ip(e){return e.width*Rv}const ss={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function zr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Hc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Mv(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Xs(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,c=o/r;if(l>c){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const d=r*l;return{width:d,height:r,left:i.left+(o-d)/2,top:i.top}}function Ev(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Xs(e,t.width,t.height)}function kv(e,t){if(Bo(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.assetId,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.assetId,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.assetId,n.naturalWidth,n.naturalHeight)},n.src=e.assetId}function Av(e){const t=new Set,n=[];for(const i of e){const o=Hl(i.gallery),r=Wl(o);for(const l of r)for(const c of[l.displayMedia,l.lightboxMedia])c!=null&&c.assetId&&!t.has(c.assetId)&&(t.add(c.assetId),n.push(c))}return n}function Fv({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Bo(t)?a.jsx("video",{src:t.assetId,preload:"auto",muted:!0,playsInline:!0},t.assetId):a.jsx("img",{src:t.assetId,alt:""},t.assetId))})}function Po(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=ip(n);return t==="left"?{left:l+d-i,top:r,width:i,height:o}:{left:l+c-d,top:r,width:i,height:o}}function wa(e,t,n){const i=Po(e,t,n);return{...i,left:2*i.left-e.left}}function Nv(e,t,n){const{left:i,width:o}=n,r=ip(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function op(e,t,n,i){const o=Po(e,"left",i),r=Po(e,"right",i),l=wa(e,"left",i),c=wa(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:c,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:c};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function _v(e,t,n,i){const{start:o,end:r}=op(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function Hv(e,t,n){const i=Po(e,t,n),o=wa(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}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 Hl(e){if(!e)return;if(rp(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.assetId?t:void 0,o=n!=null&&n.assetId?n:void 0;if(!(!i&&!o))return[{media:[o??i??Nc,i??o??Nc]}]}function Wv(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function Ov(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function Wl(e){if(!Array.isArray(e)||e.length===0)return[];if(rp(e)){const t=[];for(const n of e){const i=Wv(n);if(!i)continue;const o=Ov(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.assetId?o:null})}return t}return e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Bo(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.assetId)}function Dv({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Bo(e)?a.jsx("video",{src:e.assetId,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):a.jsx("img",{src:e.assetId,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function Bv({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const c=s.useRef(null);return s.useEffect(()=>{const d=c.current;return n==null||n(d??null),()=>{d==null||d.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:c,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:d=>d.stopPropagation(),style:o},e)})}function jr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Bo(e)?a.jsx("video",{src:e.assetId,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.assetId,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.assetId,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.assetId,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function zv({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:v,sourceRect:b,resolveCloseSourceRect:m,onClose:h,onPrev:x,onNext:S}){const P=s.useRef(null),f=s.useRef(null),w=s.useRef(null),N=s.useRef(new Map),[V,B]=s.useState(0),H=s.useRef(null),_=s.useRef(0),z=s.useRef(0),$=s.useRef("none"),E=s.useRef(!1),j=s.useRef(!1),L=s.useRef(!1),C=s.useRef(null),T=s.useRef(null),G=s.useRef(null),A=s.useRef(()=>{}),Y=s.useRef(null),R=s.useRef(null),y=s.useRef(null),U=s.useRef(!1),[ee,de]=s.useState(null),[F,ie]=s.useState(ss),[I,se]=s.useState(0),[J,Se]=s.useState("opening"),[Re,pe]=s.useState(0),[he,te]=s.useState(0),[le,re]=s.useState(!1),[fe,xe]=s.useState(null),[Te,me]=s.useState(null),[be,we]=s.useState(null),[g,X]=s.useState(!1),[Z,ne]=s.useState(null),[ye,K]=s.useState(!1),D=s.useRef(!1),[ce,q]=s.useState(!1),[ue,W]=s.useState(!1),Le=s.useRef(n),ae=s.useRef(void 0),Q=t[n],Ne=Q?Bo(Q):!1,Oe=he!==0||le,it=!l&&(!r||!!c),qe=d&&!l,Je=u.length>1,ot=s.useCallback((O,Ie)=>t.length<=1?null:t[(O+Ie+t.length)%t.length]??null,[t]),Ve=Je?ir(u,p,-1):ot(n,-1),ve=Je?ir(u,p,1):ot(n,1),Fe=fe===-1&&Oe?Je&&Te!==null?ir(u,Te,-1):be!==null?ot(be,-1):null:null,Xe=fe===1&&Oe?Je&&Te!==null?ir(u,Te,1):be!==null?ot(be,1):null:null,Ye=Fe&&Fe.assetId!==(Ve==null?void 0:Ve.assetId)?Fe:null,Pe=Xe&&Xe.assetId!==(ve==null?void 0:ve.assetId)?Xe:null,_e=Ve&&qe?(()=>{const O=Je?_c(u,p,-1):t.length>2?ot((n-1+t.length)%t.length,-1):null;return O&&O.assetId!==Ve.assetId?O:null})():null,Ke=ve&&qe?(()=>{const O=Je?_c(u,p,1):t.length>2?ot((n+1)%t.length,1):null;return O&&O.assetId!==ve.assetId?O:null})():null,Ze=Ye??_e,st=Pe??Ke,Ue=s.useCallback((O,Ie,je)=>{if(!O||!Ie||!je)return;const Ae=N.current,tt=Ae.get(O);(tt==null?void 0:tt.width)===Ie&&(tt==null?void 0:tt.height)===je||(Ae.set(O,{width:Ie,height:je}),B(Mt=>Mt+1))},[]),De=s.useCallback(O=>{if(!(O!=null&&O.assetId))return null;const Ie=N.current.get(O.assetId);return Ev(f.current,Ie)},[V,I]),ke=s.useCallback(()=>{if(!Q)return;const O=De(Q);if(O){de(O);return}const Ie=f.current;Ie&&de(Hc(Ie))},[Q,De]),ht=s.useCallback(O=>{if(Je){const Ie=u.length;me((p+O+Ie)%Ie),we(null);return}t.length>1&&(we((n+O+t.length)%t.length),me(null))},[Je,u.length,p,t.length,n]),Be=s.useCallback(O=>{L.current=O,re(O)},[]),ze=s.useCallback(()=>{C.current!==null&&(window.clearTimeout(C.current),C.current=null)},[]),We=s.useCallback(()=>{ze(),C.current=window.setTimeout(()=>{ze(),Be(!1)},qo+32)},[ze,Be]),mt=s.useCallback(()=>{const O=P.current;if(!O){ie({left:0,top:0,width:typeof window<"u"?window.innerWidth:ss.width,height:typeof window<"u"?window.innerHeight:ss.height});return}const Ie=O.getBoundingClientRect();ie({left:Ie.left,top:Ie.top,width:Ie.width,height:Ie.height})},[]),rt=s.useCallback((O,Ie)=>{if(Oe){if(ce&&!le)return`translate(${he}px, 0px)`;if(le&&fe!==null){const je=De(O);if(!je)return;const{x:Ae,y:tt}=_v(je,Ie,fe,F);return`translate(${Ae}px, ${tt}px)`}if(le)return"translate(0px, 0px)"}},[Oe,ce,le,he,fe,F,De]),St=s.useCallback(()=>{const O=T.current;T.current=null,ze(),Be(!1),xe(null),me(null),we(null),te(0),q(!1),E.current=!1,z.current=0,$.current="none",O===-1?x():O===1&&S()},[ze,Be,x,S]),Nt=s.useCallback(()=>{ze(),C.current=window.setTimeout(()=>{T.current!==null&&St()},qo+32)},[ze,St]),jt=s.useCallback(()=>{ze(),T.current=null,Be(!1),xe(null),me(null),we(null),te(0),q(!1),E.current=!1,z.current=0,$.current="none"},[ze,Be]),xt=s.useCallback(O=>{if(!(!qe||!ee)){if(L.current){if(T.current===O){G.current=O,St();return}jt()}ze(),ht(O),T.current=O,xe(O),Be(!0),Nt()}},[qe,ee,St,jt,ze,ht,Be,Nt]);A.current=xt;const Ce=s.useCallback(()=>{Y.current=null,U.current=!1,R.current!==null&&(window.clearInterval(R.current),R.current=null),y.current!==null&&(window.clearTimeout(y.current),y.current=null)},[]),He=s.useCallback(O=>{R.current!==null&&window.clearInterval(R.current);const Ie=U.current?Tv:Cv;R.current=window.setInterval(()=>{A.current(O)},Ie)},[]),lt=s.useCallback(O=>{Y.current!==O&&(Ce(),Y.current=O,U.current=!1,A.current(O),He(O),y.current=window.setTimeout(()=>{y.current=null,Y.current===O&&(U.current=!0,He(O))},$v))},[Ce,He]),et=s.useCallback(()=>{const O=f.current;if(!O)return;const Ie=Q==null?void 0:Q.assetId,je=Ie?N.current.get(Ie):void 0;if(je!=null&&je.width&&(je!=null&&je.height)){de(Xs(O,je.width,je.height));return}const Ae=w.current;if(Ae&&Ie&&(Ae.src===Ie||Ae.currentSrc===Ie)){const{width:Mt,height:ut}=Mv(Ae);if(Mt&&ut){Ue(Ie,Mt,ut),de(Xs(O,Mt,ut));return}}const tt=Hc(O);!tt.width||!tt.height||de(tt)},[Q==null?void 0:Q.assetId,Ue]),yt=s.useCallback(O=>{if(w.current=O,!!O){if(O instanceof HTMLVideoElement){O.readyState>=1&&O.videoWidth>0&&et();return}O.complete&&O.naturalWidth>0&&et()}},[et]),Rt=s.useCallback(()=>{mt(),et(),se(O=>O+1)},[mt,et]);s.useEffect(()=>{Rt();const O=f.current,Ie=P.current,je=new ResizeObserver(()=>Rt());return O&&je.observe(O),Ie&&je.observe(Ie),window.addEventListener("resize",Rt),()=>{je.disconnect(),window.removeEventListener("resize",Rt)}},[Rt,n,v]),s.useLayoutEffect(()=>{if(!Q)return;const O=w.current;if(O){if(O instanceof HTMLImageElement&&O.complete&&O.naturalWidth>0){et();return}O instanceof HTMLVideoElement&&O.readyState>=1&&O.videoWidth>0&&et()}},[Q==null?void 0:Q.assetId,n,et]),s.useEffect(()=>{ke()},[ke,V]),s.useEffect(()=>{const O=new Set,Ie=[],je=Ae=>{!(Ae!=null&&Ae.assetId)||O.has(Ae.assetId)||(O.add(Ae.assetId),Ie.push(Ae))};t.forEach(je),u.forEach(Ae=>Ae.items.forEach(je)),Ie.forEach(Ae=>{N.current.has(Ae.assetId)||kv(Ae,Ue)})},[t,u,Ue]),s.useEffect(()=>{if(J!=="opening"||!ee)return;if(!b){Se("open");return}X(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{X(!0),Se("open")})});return()=>cancelAnimationFrame(O)},[J,ee,b]),s.useEffect(()=>{if(J!=="closing")return;const O=setTimeout(()=>h(),Hn);return()=>clearTimeout(O)},[J,h]),s.useEffect(()=>()=>{ze()},[ze]),s.useLayoutEffect(()=>{Le.current===n&&ae.current===(Q==null?void 0:Q.assetId)||(ze(),T.current=null,xe(null),me(null),we(null),pe(0),te(0),Be(!1),W(!1),q(!1),_.current=0,z.current=0,$.current="none",E.current=!1,H.current=null,j.current=!1,w.current=null,ke(),Le.current=n,ae.current=Q==null?void 0:Q.assetId)},[n,Q==null?void 0:Q.assetId,Be,ze,ke]),s.useLayoutEffect(()=>{const O=G.current;O!==null&&(G.current=null,requestAnimationFrame(()=>{A.current(O)}))},[n,p,Q==null?void 0:Q.assetId]),s.useLayoutEffect(()=>{if(J==="opening"){D.current=!1,K(!1);return}if(J!=="open"||D.current)return;if(!Ve&&!ve){D.current=!0;return}K(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{K(!0),D.current=!0})});return()=>cancelAnimationFrame(O)},[J,Ve==null?void 0:Ve.assetId,ve==null?void 0:ve.assetId]),s.useEffect(()=>{if(J!=="open")return;const O=()=>{const ut=Tt=>{Tt.stopPropagation(),Tt.preventDefault(),document.removeEventListener("click",ut,!0)};document.addEventListener("click",ut,!0)},Ie=ut=>{const Tt=ut<0?1:-1;ze(),ht(Tt),T.current=Tt,xe(Tt),Be(!0),Nt()},je=ut=>{if(Math.abs(ut)>wv&&qe){Ie(ut);return}T.current=null,xe(null),me(null),we(null),Be(!0),te(0),We()},Ae=ut=>{if(ut.touches.length!==1||L.current)return;const Tt=ut.touches[0];j.current=!0,H.current={x:Tt.clientX,y:Tt.clientY},$.current="none",z.current=0,E.current=!1},tt=ut=>{if(!H.current||ut.touches.length!==1||L.current)return;const Tt=ut.touches[0],Ut=Tt.clientX-H.current.x,Wt=Tt.clientY-H.current.y;if($.current==="none"){if(Math.abs(Ut)<10&&Math.abs(Wt)<10)return;if(Math.abs(Ut)>Math.abs(Wt)){if(!qe)return;$.current="horizontal"}else if(Wt>0){if(!it)return;$.current="vertical"}else return}if($.current==="horizontal"){E.current=!0,q(!0),z.current=Ut,te(Ut),ut.preventDefault();return}$.current==="vertical"&&(E.current=!0,q(!0),_.current=Wt,pe(Wt),ut.preventDefault())},Mt=()=>{if(!H.current)return;const ut=$.current,Tt=E.current;if(Tt&&ut==="horizontal")je(z.current),O();else if(Tt&&ut==="vertical"){const Ut=_.current;if(it&&Ut>Sv){const Wt=window.innerHeight;_.current=Wt,W(!0),pe(Wt),Se("closing")}else _.current=0,pe(0);O()}else ut==="horizontal"&&Math.abs(z.current)>0&&(je(z.current),O());H.current=null,$.current="none",z.current=0,E.current=!1,q(!1)};return document.addEventListener("touchstart",Ae,{passive:!0}),document.addEventListener("touchmove",tt,{passive:!1}),document.addEventListener("touchend",Mt),document.addEventListener("touchcancel",Mt),()=>{document.removeEventListener("touchstart",Ae),document.removeEventListener("touchmove",tt),document.removeEventListener("touchend",Mt),document.removeEventListener("touchcancel",Mt)}},[J,qe,Be,We,ze,it,Nt,ht]);const At=s.useCallback(()=>{const O=(m==null?void 0:m())??b??null;O&&ee&&(ne(O),X(!0)),Se("closing")},[m,b,ee]);s.useEffect(()=>{const O=Ae=>{if(Ae.key==="Escape"){if(r&&c||J==="closing")return;Ce(),At();return}if(Ae.key!=="ArrowLeft"&&Ae.key!=="ArrowRight"||J!=="open"||!qe)return;Ae.preventDefault();const tt=Ae.key==="ArrowLeft"?-1:1;Ae.repeat&&Y.current===tt||lt(tt)},Ie=Ae=>{if(Ae.key!=="ArrowLeft"&&Ae.key!=="ArrowRight")return;const tt=Ae.key==="ArrowLeft"?-1:1;Y.current===tt&&Ce()},je=()=>{Ce()};return window.addEventListener("keydown",O),window.addEventListener("keyup",Ie),window.addEventListener("blur",je),()=>{window.removeEventListener("keydown",O),window.removeEventListener("keyup",Ie),window.removeEventListener("blur",je),Ce()}},[J,r,c,At,qe,lt,Ce]),s.useEffect(()=>{J!=="open"&&Ce()},[J,Ce]);const qt=()=>{J==="closing"||l||At()},$t=J==="open",zt=J==="closing",on=Re>0?Math.max(0,1-Re/500):1,vt=Re>0?Math.max(.35,1-Re/500):1,ft=s.useCallback(O=>{if(!(O.propertyName!=="transform"||!L.current)){if(T.current!==null){St();return}ze(),Be(!1)}},[ze,Be,St]),Me=J==="closing"?Z??b:b,nt=Me&&ee&&(J==="opening"||zt)?Iv(Me,ee):void 0,ct=Oe&&Q?rt(Q,"center"):Re>0?`translateY(${Re}px)`:nt,gt=ee?zr(ee,F):null,Et=!!(Me&&ee),wt=Et&&(J==="closing"||J==="open"&&g),dt={position:"absolute",top:gt==null?void 0:gt.top,left:gt==null?void 0:gt.left,width:gt==null?void 0:gt.width,height:gt==null?void 0:gt.height,objectFit:"contain",transformOrigin:"top left",transform:ct,opacity:Re>0?vt:Et?1:J==="opening"||zt?0:1,transition:ce&&!le?"none":le?`transform ${qo}ms ${wn}`:ue?`transform ${Hn}ms ${wn}, opacity ${Hn}ms ${wn}`:wt?`transform ${Hn}ms ${wn}`:J==="opening"||zt?`opacity ${Hn}ms ${wn}`:"none",pointerEvents:Ne&&$t&&!Oe?"auto":"none",touchAction:Ne&&$t?"none":void 0,zIndex:1,overflow:Ne?"hidden":void 0},Ot={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:$t&&!Oe?"auto":"none"},Lt=(O,Ie,je="adjacent")=>{const Ae=De(O);if(!Ae)return{display:"none"};const tt=je==="far"?Ie==="left"?"far-left":"far-right":Ie==="left"?"left-adjacent":"right-adjacent",{start:Mt}=fe!==null?op(Ae,tt,fe,F):{start:je==="far"?wa(Ae,Ie,F):Po(Ae,Ie,F)},ut=zr(Mt,F),Tt=rt(O,tt),Ut=!Oe&&je==="adjacent"&&$t&&!ye?Hv(Ae,Ie,F):null,Wt=je==="far"&&Oe&&fe===(Ie==="left"?-1:1),an=ce&&!le?!1:le,cn=je==="adjacent"&&$t&&ye&&!Oe;return{position:"absolute",top:ut.top,left:ut.left,width:ut.width,height:ut.height,objectFit:"contain",transform:Tt??(Ut?`translate(${Ut.x}px, ${Ut.y}px)`:void 0),opacity:je==="far"?$t&&Wt?1:0:$t?1:0,transition:an?je==="far"?`transform ${qo}ms ${wn}`:`transform ${qo}ms ${wn}, opacity ${Hn}ms ${wn}`:cn?`transform ${Hn}ms ${wn}`:J==="opening"||zt?`opacity ${Hn}ms ${wn}`:"none",pointerEvents:"none",zIndex:1}},Ht=(O,Ie)=>{const je=De(O);return je?Nv(Po(je,Ie,F),Ie,F):null},Gt=O=>Ie=>{if(!l){if(j.current){j.current=!1;return}Ie.stopPropagation(),xt(O)}},_t=Ve?Ht(Ve,"left"):null,Vt=ve?Ht(ve,"right"):null,Dt=_t?zr(_t,F):null,Ct=Vt?zr(Vt,F):null;return a.jsxs("div",{ref:P,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:J==="open"?"none":void 0},onClick:qt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:$t?on:0,transition:ce?"none":`opacity ${Hn}ms ${wn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:f,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:$t?1:0,transition:ce?"none":`opacity ${Hn}ms ${wn}`,pointerEvents:"none"},children:a.jsx(tp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:qt})})]}),$t&&Ze&&a.jsx(jr,{media:Ze,style:Lt(Ze,"left","far"),onMeasure:Ue,onTransitionEnd:ft},`far-prev-${Ze.assetId}`),$t&&Ve&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:Ve,style:Lt(Ve,"left"),onMeasure:Ue,onTransitionEnd:ft},`prev-${Ve.assetId}`),Dt&&a.jsx("div",{style:{position:"absolute",top:Dt.top,left:Dt.left,width:Dt.width,height:Dt.height,cursor:l||ce?"default":"pointer",pointerEvents:l||ce?"none":"auto",zIndex:3},onClick:Gt(-1)})]}),$t&&ve&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:ve,style:Lt(ve,"right"),onMeasure:Ue,onTransitionEnd:ft},`next-${ve.assetId}`),Ct&&a.jsx("div",{style:{position:"absolute",top:Ct.top,left:Ct.left,width:Ct.width,height:Ct.height,cursor:l||ce?"default":"pointer",pointerEvents:l||ce?"none":"auto",zIndex:3},onClick:Gt(1)})]}),$t&&st&&a.jsx(jr,{media:st,style:Lt(st,"right","far"),onMeasure:Ue,onTransitionEnd:ft},`far-next-${st.assetId}`),ee&&Q&&(Ne?a.jsx(Bv,{src:Q.assetId,phase:J,onMediaElement:yt,wrapperStyle:dt,videoStyle:Ot,onLoadedMetadata:et,onTransitionEnd:ft},`${n}-${Q.assetId}`):a.jsx("img",{ref:yt,src:Q.assetId,alt:Q.name,onLoad:et,onTransitionEnd:ft,style:dt},`${n}-${Q.assetId}`))]})}function jv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=k.useScopedStyles(),{gridLayout:d,verticalGap:u,align:p="top",imageDisplay:v}=e,b=(v==null?void 0:v.display)==="cover",m=(v==null?void 0:v.ratioValue)??"1:1",h=(v==null?void 0:v.reversed)??!1,[x,S]=m.split(":").map(Number),w=`${h?S:x} / ${h?x:S}`,N=d.entryWidth??.2,V=d.columnsCount,B=k.scalingValue(N,n),H=k.scalingValue(d.horizontalGap??0,n),_=B,z=B,$={width:_,...b?{aspectRatio:w,height:"auto",overflow:"hidden"}:{height:"auto"}},E=b?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},j=s.useRef(null),[L,C]=s.useState(!1),[T,G]=s.useState([]),[A,Y]=s.useState(0),[R,y]=s.useState(0),[U,ee]=s.useState(null),[de,F]=s.useState({title1:"",title2:"",title3:""}),ie=(()=>{const be={},we=j.current?getComputedStyle(j.current).getPropertyValue("--cntrl-article-width").trim():"";return we&&(be["--cntrl-article-width"]=we),be})(),I=!n||i||o,se=s.useMemo(()=>bv(c),[c]),J=t??[],Se=J.length%V||V,Re=Se<V&&J.length>0,pe=J.length-Se,he=Re?Math.floor((V-Se)/2)+1:1,te=s.useMemo(()=>Pv(J),[J]),le=s.useMemo(()=>Av(J),[J]),re=(be,we,g)=>{if(n&&!o&&!i)return;const X=te.findIndex(ne=>ne.gridIndex===be);if(X<0)return;const Z=te[X];y(X),G(Z.items),Y(we),F(Z.entry),ee(g??null),C(!0)},fe=s.useCallback(()=>{C(!1),ee(null)},[]),xe=s.useCallback(()=>{const be=te[R];return!be||!j.current?U:Lv(j.current,be.gridIndex,b?"cover":"contain")??U},[te,R,U,b]),Te=s.useCallback(be=>{if(te.length>1){const we=te.length,g=(R+be+we)%we,X=te[g],Z=Math.min(A,X.items.length-1);y(g),G(X.items),Y(Z),F(X.entry);return}Y(we=>(we+be+T.length)%T.length)},[te,R,A,T.length]),me=te.length>1||T.length>1;return s.useEffect(()=>{if(!L||typeof document>"u")return;const be=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=be}},[L]),s.useEffect(()=>{!n||o||i||C(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:se}}),a.jsx(Fv,{mediaList:le}),a.jsx("div",{ref:j,className:`${c}-wrapper ${c}-align-entries ${c}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${V}, ${B})`,rowGap:0,columnGap:H,width:k.scalingValue(d.wrapperWidth??0,n),[`--${c}-align-entries-row-gap`]:k.scalingValue(u??0,n)},children:J.map((be,we)=>{const g=Hl(be.gallery),X=Wl(g),Z=X.filter(q=>q.lightboxMedia).map(q=>q.lightboxMedia),ne=Math.floor(we/V)===Math.ceil(J.length/V)-1,ye=Re&&we>=pe?`${he+(we-pe)}`:void 0,K=X[0],D=K!=null&&K.lightboxMedia?Z.findIndex(q=>q.assetId===K.lightboxMedia.assetId):-1,ce=a.jsx("div",{className:`${c}-item-image-wrapper`,style:$,children:X.length>0&&a.jsx(Dv,{media:K.displayMedia,gridIndex:we,className:`${c}-item-${Bo(K.displayMedia)?"video":"image"}`.trim(),style:E,onMediaClick:I&&D>=0?q=>re(we,D,np(q.currentTarget,b?"cover":"contain")):void 0})});return a.jsx("div",{className:`${c}-item`,children:a.jsxs("div",{className:[o?`${c}-item-inner`:`${c}-item-inner-hidden`,ne?`${c}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:B,...ye?{gridColumn:ye}:{}},children:[a.jsx("div",{className:`${c}-item-title-row`,children:a.jsx("div",{style:{height:0,width:z}})}),a.jsx("a",{className:`${c}-item-image-link`,children:ce}),a.jsx("div",{className:`${c}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:z}})})]})},we)})}),L&&typeof document<"u"&&(()=>{const be=(l?document.getElementById(l):null)??document.body;return Xn.createPortal(a.jsx("div",{style:ie,"data-selection":"none",children:a.jsx(zv,{prefix:c,items:T,index:A,entry:de,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:me,lightboxEntries:te,entryIdx:R,layoutId:r,sourceRect:U,resolveCloseSourceRect:xe,onClose:fe,onPrev:()=>Te(-1),onNext:()=>Te(1)})}),be)})()]})}const Vv=`import { CommonComponentProps } from '../props';
|
|
7630
|
+
`}const Nc={assetId:"",name:"",objectFit:"cover"},On=500,Uo=650,$n="cubic-bezier(0.22, 1, 0.36, 1)",Lv=72,Pv=50,Rv=1e4,Mv=650,Ev=500;function kv(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function lp(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=Sa(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function Av(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?lp(i,n):null}function Fv(e){return e.reduce((t,n,i)=>{const o=Hl(n.gallery),l=Wl(o).filter(c=>c.lightboxMedia).map(c=>c.lightboxMedia);return l.length===0||t.push({gridIndex:i,items:l,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function ir(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function _c(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return ir(e,i,n)}const Nv=.03;function cp(e){return e.width*Nv}const ss={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function zr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Hc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function _v(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Gs(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,c=o/r;if(l>c){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const d=r*l;return{width:d,height:r,left:i.left+(o-d)/2,top:i.top}}function Hv(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Gs(e,t.width,t.height)}function Wv(e,t){if(jo(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.assetId,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.assetId,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.assetId,n.naturalWidth,n.naturalHeight)},n.src=e.assetId}function Ov(e){const t=new Set,n=[];for(const i of e){const o=Hl(i.gallery),r=Wl(o);for(const l of r)for(const c of[l.displayMedia,l.lightboxMedia])c!=null&&c.assetId&&!t.has(c.assetId)&&(t.add(c.assetId),n.push(c))}return n}function Dv({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>jo(t)?a.jsx("video",{src:t.assetId,preload:"auto",muted:!0,playsInline:!0},t.assetId):a.jsx("img",{src:t.assetId,alt:""},t.assetId))})}function Mo(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=cp(n);return t==="left"?{left:l+d-i,top:r,width:i,height:o}:{left:l+c-d,top:r,width:i,height:o}}function wa(e,t,n){const i=Mo(e,t,n);return{...i,left:2*i.left-e.left}}function Bv(e,t,n){const{left:i,width:o}=n,r=cp(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function dp(e,t,n,i){const o=Mo(e,"left",i),r=Mo(e,"right",i),l=wa(e,"left",i),c=wa(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:c,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:c};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function zv(e,t,n,i){const{start:o,end:r}=dp(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function jv(e,t,n){const i=Mo(e,t,n),o=wa(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function up(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 Hl(e){if(!e)return;if(up(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.assetId?t:void 0,o=n!=null&&n.assetId?n:void 0;if(!(!i&&!o))return[{media:[o??i??Nc,i??o??Nc]}]}function Vv(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function Gv(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function Wl(e){if(!Array.isArray(e)||e.length===0)return[];if(up(e)){const t=[];for(const n of e){const i=Vv(n);if(!i)continue;const o=Gv(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.assetId?o:null})}return t}return e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function jo(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.assetId)}function Xv({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return jo(e)?a.jsx("video",{src:e.assetId,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):a.jsx("img",{src:e.assetId,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function qv({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const c=s.useRef(null);return s.useEffect(()=>{const d=c.current;return n==null||n(d??null),()=>{d==null||d.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:c,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:d=>d.stopPropagation(),style:o},e)})}function jr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return jo(e)?a.jsx("video",{src:e.assetId,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.assetId,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.assetId,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.assetId,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function Uv({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:v,sourceRect:x,resolveCloseSourceRect:m,onClose:h,onPrev:b,onNext:S}){const M=s.useRef(null),y=s.useRef(null),$=s.useRef(null),R=s.useRef(new Map),[X,B]=s.useState(0),O=s.useRef(null),N=s.useRef(0),z=s.useRef(0),C=s.useRef("none"),I=s.useRef(!1),j=s.useRef(!1),E=s.useRef(!1),w=s.useRef(null),L=s.useRef(null),V=s.useRef(null),_=s.useRef(()=>{}),K=s.useRef(null),P=s.useRef(null),f=s.useRef(null),U=s.useRef(!1),[te,ce]=s.useState(null),[F,ie]=s.useState(ss),[T,le]=s.useState(0),[J,Se]=s.useState("opening"),[Le,me]=s.useState(0),[ye,ee]=s.useState(0),[oe,re]=s.useState(!1),[ge,we]=s.useState(null),[Ae,fe]=s.useState(null),[ve,xe]=s.useState(null),[g,G]=s.useState(!1),[Q,ne]=s.useState(null),[ue,q]=s.useState(!1),D=s.useRef(!1),[se,Y]=s.useState(!1),[pe,H]=s.useState(!1),Ie=s.useRef(n),de=s.useRef(void 0),Z=t[n],Ne=Z?jo(Z):!1,Oe=ye!==0||oe,Je=!l&&(!r||!!c),De=d&&!l,Ze=u.length>1,at=s.useCallback((W,Te)=>t.length<=1?null:t[(W+Te+t.length)%t.length]??null,[t]),Xe=Ze?ir(u,p,-1):at(n,-1),be=Ze?ir(u,p,1):at(n,1),He=ge===-1&&Oe?Ze&&Ae!==null?ir(u,Ae,-1):ve!==null?at(ve,-1):null:null,je=ge===1&&Oe?Ze&&Ae!==null?ir(u,Ae,1):ve!==null?at(ve,1):null:null,Qe=He&&He.assetId!==(Xe==null?void 0:Xe.assetId)?He:null,Ce=je&&je.assetId!==(be==null?void 0:be.assetId)?je:null,_e=Xe&&De?(()=>{const W=Ze?_c(u,p,-1):t.length>2?at((n-1+t.length)%t.length,-1):null;return W&&W.assetId!==Xe.assetId?W:null})():null,Ue=be&&De?(()=>{const W=Ze?_c(u,p,1):t.length>2?at((n+1)%t.length,1):null;return W&&W.assetId!==be.assetId?W:null})():null,Ye=Qe??_e,lt=Ce??Ue,it=s.useCallback((W,Te,ze)=>{if(!W||!Te||!ze)return;const Fe=R.current,yt=Fe.get(W);(yt==null?void 0:yt.width)===Te&&(yt==null?void 0:yt.height)===ze||(Fe.set(W,{width:Te,height:ze}),B(Ot=>Ot+1))},[]),qe=s.useCallback(W=>{if(!(W!=null&&W.assetId))return null;const Te=R.current.get(W.assetId);return Hv(y.current,Te)},[X,T]),Ee=s.useCallback(()=>{if(!Z)return;const W=qe(Z);if(W){ce(W);return}const Te=y.current;Te&&ce(Hc(Te))},[Z,qe]),pt=s.useCallback(W=>{if(Ze){const Te=u.length;fe((p+W+Te)%Te),xe(null);return}t.length>1&&(xe((n+W+t.length)%t.length),fe(null))},[Ze,u.length,p,t.length,n]),ke=s.useCallback(W=>{E.current=W,re(W)},[]),We=s.useCallback(()=>{w.current!==null&&(window.clearTimeout(w.current),w.current=null)},[]),Ve=s.useCallback(()=>{We(),w.current=window.setTimeout(()=>{We(),ke(!1)},Uo+32)},[We,ke]),ct=s.useCallback(()=>{const W=M.current;if(!W){ie({left:0,top:0,width:typeof window<"u"?window.innerWidth:ss.width,height:typeof window<"u"?window.innerHeight:ss.height});return}const Te=W.getBoundingClientRect();ie({left:Te.left,top:Te.top,width:Te.width,height:Te.height})},[]),ot=s.useCallback((W,Te)=>{if(Oe){if(se&&!oe)return`translate(${ye}px, 0px)`;if(oe&&ge!==null){const ze=qe(W);if(!ze)return;const{x:Fe,y:yt}=zv(ze,Te,ge,F);return`translate(${Fe}px, ${yt}px)`}if(oe)return"translate(0px, 0px)"}},[Oe,se,oe,ye,ge,F,qe]),xt=s.useCallback(()=>{const W=L.current;L.current=null,We(),ke(!1),we(null),fe(null),xe(null),ee(0),Y(!1),I.current=!1,z.current=0,C.current="none",W===-1?b():W===1&&S()},[We,ke,b,S]),Pt=s.useCallback(()=>{We(),w.current=window.setTimeout(()=>{L.current!==null&&xt()},Uo+32)},[We,xt]),Vt=s.useCallback(()=>{We(),L.current=null,ke(!1),we(null),fe(null),xe(null),ee(0),Y(!1),I.current=!1,z.current=0,C.current="none"},[We,ke]),vt=s.useCallback(W=>{if(!(!De||!te)){if(E.current){if(L.current===W){V.current=W,xt();return}Vt()}We(),pt(W),L.current=W,we(W),ke(!0),Pt()}},[De,te,xt,Vt,We,pt,ke,Pt]);_.current=vt;const Mt=s.useCallback(()=>{K.current=null,U.current=!1,P.current!==null&&(window.clearInterval(P.current),P.current=null),f.current!==null&&(window.clearTimeout(f.current),f.current=null)},[]),Ht=s.useCallback(W=>{P.current!==null&&window.clearInterval(P.current);const Te=U.current?Ev:Mv;P.current=window.setInterval(()=>{_.current(W)},Te)},[]),Gt=s.useCallback(W=>{K.current!==W&&(Mt(),K.current=W,U.current=!1,_.current(W),Ht(W),f.current=window.setTimeout(()=>{f.current=null,K.current===W&&(U.current=!0,Ht(W))},Rv))},[Mt,Ht]),kt=s.useCallback(()=>{const W=y.current;if(!W)return;const Te=Z==null?void 0:Z.assetId,ze=Te?R.current.get(Te):void 0;if(ze!=null&&ze.width&&(ze!=null&&ze.height)){ce(Gs(W,ze.width,ze.height));return}const Fe=$.current;if(Fe&&Te&&(Fe.src===Te||Fe.currentSrc===Te)){const{width:Ot,height:ut}=_v(Fe);if(Ot&&ut){it(Te,Ot,ut),ce(Gs(W,Ot,ut));return}}const yt=Hc(W);!yt.width||!yt.height||ce(yt)},[Z==null?void 0:Z.assetId,it]),Pe=s.useCallback(W=>{if($.current=W,!!W){if(W instanceof HTMLVideoElement){W.readyState>=1&&W.videoWidth>0&&kt();return}W.complete&&W.naturalWidth>0&&kt()}},[kt]),Be=s.useCallback(()=>{ct(),kt(),le(W=>W+1)},[ct,kt]);s.useEffect(()=>{Be();const W=y.current,Te=M.current,ze=new ResizeObserver(()=>Be());return W&&ze.observe(W),Te&&ze.observe(Te),window.addEventListener("resize",Be),()=>{ze.disconnect(),window.removeEventListener("resize",Be)}},[Be,n,v]),s.useLayoutEffect(()=>{if(!Z)return;const W=$.current;if(W){if(W instanceof HTMLImageElement&&W.complete&&W.naturalWidth>0){kt();return}W instanceof HTMLVideoElement&&W.readyState>=1&&W.videoWidth>0&&kt()}},[Z==null?void 0:Z.assetId,n,kt]),s.useEffect(()=>{Ee()},[Ee,X]),s.useEffect(()=>{const W=new Set,Te=[],ze=Fe=>{!(Fe!=null&&Fe.assetId)||W.has(Fe.assetId)||(W.add(Fe.assetId),Te.push(Fe))};t.forEach(ze),u.forEach(Fe=>Fe.items.forEach(ze)),Te.forEach(Fe=>{R.current.has(Fe.assetId)||Wv(Fe,it)})},[t,u,it]),s.useEffect(()=>{if(J!=="opening"||!te)return;if(!x){Se("open");return}G(!1);const W=requestAnimationFrame(()=>{requestAnimationFrame(()=>{G(!0),Se("open")})});return()=>cancelAnimationFrame(W)},[J,te,x]),s.useEffect(()=>{if(J!=="closing")return;const W=setTimeout(()=>h(),On);return()=>clearTimeout(W)},[J,h]),s.useEffect(()=>()=>{We()},[We]),s.useLayoutEffect(()=>{Ie.current===n&&de.current===(Z==null?void 0:Z.assetId)||(We(),L.current=null,we(null),fe(null),xe(null),me(0),ee(0),ke(!1),H(!1),Y(!1),N.current=0,z.current=0,C.current="none",I.current=!1,O.current=null,j.current=!1,$.current=null,Ee(),Ie.current=n,de.current=Z==null?void 0:Z.assetId)},[n,Z==null?void 0:Z.assetId,ke,We,Ee]),s.useLayoutEffect(()=>{const W=V.current;W!==null&&(V.current=null,requestAnimationFrame(()=>{_.current(W)}))},[n,p,Z==null?void 0:Z.assetId]),s.useLayoutEffect(()=>{if(J==="opening"){D.current=!1,q(!1);return}if(J!=="open"||D.current)return;if(!Xe&&!be){D.current=!0;return}q(!1);const W=requestAnimationFrame(()=>{requestAnimationFrame(()=>{q(!0),D.current=!0})});return()=>cancelAnimationFrame(W)},[J,Xe==null?void 0:Xe.assetId,be==null?void 0:be.assetId]),s.useEffect(()=>{if(J!=="open")return;const W=()=>{const ut=Tt=>{Tt.stopPropagation(),Tt.preventDefault(),document.removeEventListener("click",ut,!0)};document.addEventListener("click",ut,!0)},Te=ut=>{const Tt=ut<0?1:-1;We(),pt(Tt),L.current=Tt,we(Tt),ke(!0),Pt()},ze=ut=>{if(Math.abs(ut)>Pv&&De){Te(ut);return}L.current=null,we(null),fe(null),xe(null),ke(!0),ee(0),Ve()},Fe=ut=>{if(ut.touches.length!==1||E.current)return;const Tt=ut.touches[0];j.current=!0,O.current={x:Tt.clientX,y:Tt.clientY},C.current="none",z.current=0,I.current=!1},yt=ut=>{if(!O.current||ut.touches.length!==1||E.current)return;const Tt=ut.touches[0],Yt=Tt.clientX-O.current.x,It=Tt.clientY-O.current.y;if(C.current==="none"){if(Math.abs(Yt)<10&&Math.abs(It)<10)return;if(Math.abs(Yt)>Math.abs(It)){if(!De)return;C.current="horizontal"}else if(It>0){if(!Je)return;C.current="vertical"}else return}if(C.current==="horizontal"){I.current=!0,Y(!0),z.current=Yt,ee(Yt),ut.preventDefault();return}C.current==="vertical"&&(I.current=!0,Y(!0),N.current=It,me(It),ut.preventDefault())},Ot=()=>{if(!O.current)return;const ut=C.current,Tt=I.current;if(Tt&&ut==="horizontal")ze(z.current),W();else if(Tt&&ut==="vertical"){const Yt=N.current;if(Je&&Yt>Lv){const It=window.innerHeight;N.current=It,H(!0),me(It),Se("closing")}else N.current=0,me(0);W()}else ut==="horizontal"&&Math.abs(z.current)>0&&(ze(z.current),W());O.current=null,C.current="none",z.current=0,I.current=!1,Y(!1)};return document.addEventListener("touchstart",Fe,{passive:!0}),document.addEventListener("touchmove",yt,{passive:!1}),document.addEventListener("touchend",Ot),document.addEventListener("touchcancel",Ot),()=>{document.removeEventListener("touchstart",Fe),document.removeEventListener("touchmove",yt),document.removeEventListener("touchend",Ot),document.removeEventListener("touchcancel",Ot)}},[J,De,ke,Ve,We,Je,Pt,pt]);const ft=s.useCallback(()=>{const W=(m==null?void 0:m())??x??null;W&&te&&(ne(W),G(!0)),Se("closing")},[m,x,te]);s.useEffect(()=>{const W=Fe=>{if(Fe.key==="Escape"){if(r&&c||J==="closing")return;Mt(),ft();return}if(Fe.key!=="ArrowLeft"&&Fe.key!=="ArrowRight"||J!=="open"||!De)return;Fe.preventDefault();const yt=Fe.key==="ArrowLeft"?-1:1;Fe.repeat&&K.current===yt||Gt(yt)},Te=Fe=>{if(Fe.key!=="ArrowLeft"&&Fe.key!=="ArrowRight")return;const yt=Fe.key==="ArrowLeft"?-1:1;K.current===yt&&Mt()},ze=()=>{Mt()};return window.addEventListener("keydown",W),window.addEventListener("keyup",Te),window.addEventListener("blur",ze),()=>{window.removeEventListener("keydown",W),window.removeEventListener("keyup",Te),window.removeEventListener("blur",ze),Mt()}},[J,r,c,ft,De,Gt,Mt]),s.useEffect(()=>{J!=="open"&&Mt()},[J,Mt]);const $t=()=>{J==="closing"||l||ft()},et=J==="open",Et=J==="closing",Xt=Le>0?Math.max(0,1-Le/500):1,mt=Le>0?Math.max(.35,1-Le/500):1,gt=s.useCallback(W=>{if(!(W.propertyName!=="transform"||!E.current)){if(L.current!==null){xt();return}We(),ke(!1)}},[We,ke,xt]),Re=J==="closing"?Q??x:x,tt=Re&&te&&(J==="opening"||Et)?kv(Re,te):void 0,nt=Oe&&Z?ot(Z,"center"):Le>0?`translateY(${Le}px)`:tt,st=te?zr(te,F):null,At=!!(Re&&te),St=At&&(J==="closing"||J==="open"&&g),ht={position:"absolute",top:st==null?void 0:st.top,left:st==null?void 0:st.left,width:st==null?void 0:st.width,height:st==null?void 0:st.height,objectFit:"contain",transformOrigin:"top left",transform:nt,opacity:Le>0?mt:At?1:J==="opening"||Et?0:1,transition:se&&!oe?"none":oe?`transform ${Uo}ms ${$n}`:pe?`transform ${On}ms ${$n}, opacity ${On}ms ${$n}`:St?`transform ${On}ms ${$n}`:J==="opening"||Et?`opacity ${On}ms ${$n}`:"none",pointerEvents:Ne&&et&&!Oe?"auto":"none",touchAction:Ne&&et?"none":void 0,zIndex:1,overflow:Ne?"hidden":void 0},Dt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:et&&!Oe?"auto":"none"},Ct=(W,Te,ze="adjacent")=>{const Fe=qe(W);if(!Fe)return{display:"none"};const yt=ze==="far"?Te==="left"?"far-left":"far-right":Te==="left"?"left-adjacent":"right-adjacent",{start:Ot}=ge!==null?dp(Fe,yt,ge,F):{start:ze==="far"?wa(Fe,Te,F):Mo(Fe,Te,F)},ut=zr(Ot,F),Tt=ot(W,yt),Yt=!Oe&&ze==="adjacent"&&et&&!ue?jv(Fe,Te,F):null,It=ze==="far"&&Oe&&ge===(Te==="left"?-1:1),Zt=se&&!oe?!1:oe,on=ze==="adjacent"&&et&&ue&&!Oe;return{position:"absolute",top:ut.top,left:ut.left,width:ut.width,height:ut.height,objectFit:"contain",transform:Tt??(Yt?`translate(${Yt.x}px, ${Yt.y}px)`:void 0),opacity:ze==="far"?et&&It?1:0:et?1:0,transition:Zt?ze==="far"?`transform ${Uo}ms ${$n}`:`transform ${Uo}ms ${$n}, opacity ${On}ms ${$n}`:on?`transform ${On}ms ${$n}`:J==="opening"||Et?`opacity ${On}ms ${$n}`:"none",pointerEvents:"none",zIndex:1}},qt=(W,Te)=>{const ze=qe(W);return ze?Bv(Mo(ze,Te,F),Te,F):null},jt=W=>Te=>{if(!l){if(j.current){j.current=!1;return}Te.stopPropagation(),vt(W)}},Nt=Xe?qt(Xe,"left"):null,Bt=be?qt(be,"right"):null,Wt=Nt?zr(Nt,F):null,wt=Bt?zr(Bt,F):null;return a.jsxs("div",{ref:M,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:J==="open"?"none":void 0},onClick:$t,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:et?Xt:0,transition:se?"none":`opacity ${On}ms ${$n}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:y,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:et?1:0,transition:se?"none":`opacity ${On}ms ${$n}`,pointerEvents:"none"},children:a.jsx(sp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:$t})})]}),et&&Ye&&a.jsx(jr,{media:Ye,style:Ct(Ye,"left","far"),onMeasure:it,onTransitionEnd:gt},`far-prev-${Ye.assetId}`),et&&Xe&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:Xe,style:Ct(Xe,"left"),onMeasure:it,onTransitionEnd:gt},`prev-${Xe.assetId}`),Wt&&a.jsx("div",{style:{position:"absolute",top:Wt.top,left:Wt.left,width:Wt.width,height:Wt.height,cursor:l||se?"default":"pointer",pointerEvents:l||se?"none":"auto",zIndex:3},onClick:jt(-1)})]}),et&&be&&a.jsxs(a.Fragment,{children:[a.jsx(jr,{media:be,style:Ct(be,"right"),onMeasure:it,onTransitionEnd:gt},`next-${be.assetId}`),wt&&a.jsx("div",{style:{position:"absolute",top:wt.top,left:wt.left,width:wt.width,height:wt.height,cursor:l||se?"default":"pointer",pointerEvents:l||se?"none":"auto",zIndex:3},onClick:jt(1)})]}),et&<&&a.jsx(jr,{media:lt,style:Ct(lt,"right","far"),onMeasure:it,onTransitionEnd:gt},`far-next-${lt.assetId}`),te&&Z&&(Ne?a.jsx(qv,{src:Z.assetId,phase:J,onMediaElement:Pe,wrapperStyle:ht,videoStyle:Dt,onLoadedMetadata:kt,onTransitionEnd:gt},`${n}-${Z.assetId}`):a.jsx("img",{ref:Pe,src:Z.assetId,alt:Z.name,onLoad:kt,onTransitionEnd:gt,style:ht},`${n}-${Z.assetId}`))]})}function Yv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=A.useScopedStyles(),{gridLayout:d,verticalGap:u,align:p="top",imageDisplay:v}=e,x=(v==null?void 0:v.display)==="cover",m=(v==null?void 0:v.ratioValue)??"1:1",h=(v==null?void 0:v.reversed)??!1,[b,S]=m.split(":").map(Number),$=`${h?S:b} / ${h?b:S}`,R=d.entryWidth??.2,X=d.columnsCount,B=A.scalingValue(R,n),O=A.scalingValue(d.horizontalGap??0,n),N=B,z=B,C={width:N,...x?{aspectRatio:$,height:"auto",overflow:"hidden"}:{height:"auto"}},I=x?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},j=s.useRef(null),[E,w]=s.useState(!1),[L,V]=s.useState([]),[_,K]=s.useState(0),[P,f]=s.useState(0),[U,te]=s.useState(null),[ce,F]=s.useState({title1:"",title2:"",title3:""}),ie=(()=>{const ve={},xe=j.current?getComputedStyle(j.current).getPropertyValue("--cntrl-article-width").trim():"";return xe&&(ve["--cntrl-article-width"]=xe),ve})(),T=!n||i||o,le=s.useMemo(()=>Iv(c),[c]),J=t??[],Se=J.length%X||X,Le=Se<X&&J.length>0,me=J.length-Se,ye=Le?Math.floor((X-Se)/2)+1:1,ee=s.useMemo(()=>Fv(J),[J]),oe=s.useMemo(()=>Ov(J),[J]),re=(ve,xe,g)=>{if(n&&!o&&!i)return;const G=ee.findIndex(ne=>ne.gridIndex===ve);if(G<0)return;const Q=ee[G];f(G),V(Q.items),K(xe),F(Q.entry),te(g??null),w(!0)},ge=s.useCallback(()=>{w(!1),te(null)},[]),we=s.useCallback(()=>{const ve=ee[P];return!ve||!j.current?U:Av(j.current,ve.gridIndex,x?"cover":"contain")??U},[ee,P,U,x]),Ae=s.useCallback(ve=>{if(ee.length>1){const xe=ee.length,g=(P+ve+xe)%xe,G=ee[g],Q=Math.min(_,G.items.length-1);f(g),V(G.items),K(Q),F(G.entry);return}K(xe=>(xe+ve+L.length)%L.length)},[ee,P,_,L.length]),fe=ee.length>1||L.length>1;return s.useEffect(()=>{if(!E||typeof document>"u")return;const ve=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ve}},[E]),s.useEffect(()=>{!n||o||i||w(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:le}}),a.jsx(Dv,{mediaList:oe}),a.jsx("div",{ref:j,className:`${c}-wrapper ${c}-align-entries ${c}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${X}, ${B})`,rowGap:0,columnGap:O,width:A.scalingValue(d.wrapperWidth??0,n),[`--${c}-align-entries-row-gap`]:A.scalingValue(u??0,n)},children:J.map((ve,xe)=>{const g=Hl(ve.gallery),G=Wl(g),Q=G.filter(Y=>Y.lightboxMedia).map(Y=>Y.lightboxMedia),ne=Math.floor(xe/X)===Math.ceil(J.length/X)-1,ue=Le&&xe>=me?`${ye+(xe-me)}`:void 0,q=G[0],D=q!=null&&q.lightboxMedia?Q.findIndex(Y=>Y.assetId===q.lightboxMedia.assetId):-1,se=a.jsx("div",{className:`${c}-item-image-wrapper`,style:C,children:G.length>0&&a.jsx(Xv,{media:q.displayMedia,gridIndex:xe,className:`${c}-item-${jo(q.displayMedia)?"video":"image"}`.trim(),style:I,onMediaClick:T&&D>=0?Y=>re(xe,D,lp(Y.currentTarget,x?"cover":"contain")):void 0})});return a.jsx("div",{className:`${c}-item`,children:a.jsxs("div",{className:[o?`${c}-item-inner`:`${c}-item-inner-hidden`,ne?`${c}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:B,...ue?{gridColumn:ue}:{}},children:[a.jsx("div",{className:`${c}-item-title-row`,children:a.jsx("div",{style:{height:0,width:z}})}),a.jsx("a",{className:`${c}-item-image-link`,children:se}),a.jsx("div",{className:`${c}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:z}})})]})},xe)})}),E&&typeof document<"u"&&(()=>{const ve=(l?document.getElementById(l):null)??document.body;return Un.createPortal(a.jsx("div",{style:ie,"data-selection":"none",children:a.jsx(Uv,{prefix:c,items:L,index:_,entry:ce,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:fe,lightboxEntries:ee,entryIdx:P,layoutId:r,sourceRect:U,resolveCloseSourceRect:we,onClose:ge,onPrev:()=>Ae(-1),onNext:()=>Ae(1)})}),ve)})()]})}const Kv=`import { CommonComponentProps } from '../props';
|
|
7631
7631
|
import { scalingValue, useScopedStyles } from '../utils/index';
|
|
7632
7632
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
7633
7633
|
import { createPortal } from 'react-dom';
|
|
@@ -9970,7 +9970,7 @@ export function Hive({
|
|
|
9970
9970
|
</>
|
|
9971
9971
|
);
|
|
9972
9972
|
}
|
|
9973
|
-
`,Gv="01M3SBP3P8CMVMM1ZZ0QVD2PPF",Fi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Xv(e){const t={};return t[bt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSettings")]={...Fi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSize")]={...Fi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[bt(e,"lineHeight")]={...Fi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[bt(e,"letterSpacing")]={...Fi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[bt(e,"wordSpacing")]={...Fi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[bt(e,"textAlign")]={...Fi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[bt(e,"textAppearance")]={...Fi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Ro=Li.filter(e=>e!=="count"),Uv=Ro.reduce((e,t)=>({...e,...Xv(t)}),{}),qv=Ro.reduce((e,t)=>({...e,[bt(t,"fontFamily")]:"Arial",[bt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[bt(t,"letterSpacing")]:0,[bt(t,"wordSpacing")]:0,[bt(t,"textAlign")]:"left",[bt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ls(e){return Ro.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[bt(n,"fontSize")]=i),o!==void 0&&(t[bt(n,"lineHeight")]=o),t},{})}const Yv={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Ro.map(e=>[Nl[e],_l(e)]))},Kv={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},Qv=["01M3QM74XEQE7FN1WYJN6H984H","01M3QM74XFXCSMJJ8TNR0RXSWV","01M3QM74XFQ6K4CJ0QYC7BT7VP","01M3QM74XFK2K9T3SPCZD8M7RT","01M3QM74XFV4J15XRFB85877RE","01M3QM74XFB8Q39K12G4G6CZDM","01M3QM74XFWVH9HND47HYNCBZB","01M3QM74XF3MFEKEA4E0W9F9ZQ","01M3QM74XFEQY4XMN22Q9ERGKX","01M3QM74XFWP1RY8ND8QX88J2V","01M3QM74XFD41TXQ5BQ2KFJBGQ","01M3QM74XFV8973P7WXXWJP3QK","01M3QM74XF67PD2N10JYF9409X","01M3QM74XFA5B75WMTTKRN9TM7","01M3QM74XFFQRBHCQGKWPGSAGE","01M3QM74XF1HQBTRANGVX0QVGK","01M3QM74XF8ZWGSVCX3KS5YXSC","01M3QM74XFPHGV2XFZ23ADCVFC","01M3QM74XFECQG799S95G63BDJ","01M3QM74XFW1XS568WAHG3BGN1","01M3QM74XFT1RRJ3N1JJKPK5EA","01M3QM74XFB2JQ62RPFSM145GN","01M3QM74XFH61QR5PACJS04Z5K","01M3QM74XFKD44BXHRA7SSMD7N"],Zv=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...Kv,gallery:[{media:[{assetId:Qv[t-1],name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]});return e})(),Jv={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",max:1,display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:Zv},settings:{sizing:"auto auto",properties:{gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:9999,display:{type:"numeric-input"}},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},...Uv},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Gv,closeIconColor:"#000000",closeIconHoverColor:"#999999",...qv},layoutDefaults:{m:{gridLayout:{entryWidth:.37837,horizontalGap:.081,wrapperWidth:1,columnsCount:2,lockedParam:"wrapperWidth"},verticalGap:.081,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,...ls({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{gridLayout:{entryWidth:.10416,horizontalGap:.013,wrapperWidth:1,columnsCount:8,lockedParam:"wrapperWidth"},verticalGap:.013,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.039,iconMarginRight:.026,...ls({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})},d:{gridLayout:{entryWidth:.06944,horizontalGap:.006944,wrapperWidth:1,columnsCount:12,lockedParam:"wrapperWidth"},verticalGap:.00694,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,...ls({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})}},displayRules:[{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","gridLayout","verticalGap","align","imageDisplay","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"",items:["imageDisplay","align"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[Yv]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},e0={element:jv,id:"hive",name:"Catalogue",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/hive.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.assetId",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Ro.map(e=>({path:`${bt(e,"fontFamily")}`}))]},fontRelations:{...Ro.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${bt(t,"fontFamily")}`}),{})},schema:Jv,sourceCode:Vv};function t0(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.assetId)}function n0({media:e,className:t,style:n}){const i=s.useRef(null);return s.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const r=o.play();r&&r.catch(()=>{})},[e.isVideo,e.assetId]),e.isVideo?a.jsx("video",{ref:i,className:t,src:e.assetId,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.assetId,alt:"",style:n})}function cs(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function i0(e){return String(e??"").trim().length>0}function Wc(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 Oc(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 Dc(e,t,n,i,o,r,l){const c=k.scalingValue(r,l),d=k.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?c:d,borderBottomWidth:!p||i?c:d}}function o0(e,t,n){const i=k.scalingValue(t,n),o=k.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Bc=10,zc=10,Yo={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function r0(e,t,n){return Math.max(t,Math.min(n,e))}function ds(e,t,n){return e+(t-e)*n}function a0(e,t,n,i){if(!t)return{x:0,y:0};const o=t.getBoundingClientRect(),r=o.top+o.height/2;if(e==="cursor"&&n)return{x:n.clientX+Bc,y:n.clientY+Bc};switch(e){case"left":return{x:o.left+zc+i/2,y:r};case"center":return{x:o.left+o.width/2,y:r};case"right":return{x:o.right-zc-i/2,y:r};default:return{x:o.left+o.width/2,y:r}}}function s0(e,t){const n=s.useRef(null),i=s.useRef({x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1}),o=s.useRef(null),r=s.useCallback(()=>{const m=n.current,h=i.current;m&&(m.style.transform=`translate3d(${h.x}px, ${h.y}px, 0) translate(-50%, -50%) rotate(${h.rotation.toFixed(3)}deg)`)},[]),l=s.useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},[]),c=s.useCallback(()=>{const m=i.current;t?(m.x=ds(m.x,m.targetX,Yo.positionEase),m.y=ds(m.y,m.targetY,Yo.positionEase),m.rotation=ds(m.rotation,m.targetRotation,Yo.rotationEase)):(m.x=m.targetX,m.y=m.targetY,m.rotation=m.targetRotation),r();const h=Math.abs(m.x-m.targetX)<.4&&Math.abs(m.y-m.targetY)<.4,x=Math.abs(m.rotation-m.targetRotation)<.08;!h||!x?o.current=requestAnimationFrame(c):o.current=null},[r,t]),d=s.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(c))},[c]),u=s.useCallback((m,h)=>{const x=i.current;x.targetX=m,x.targetY=h,x.targetRotation=0,x.x=m,x.y=h,x.rotation=0,x.lastX=m,x.hasLastX=!0,r(),t&&d()},[r,t,d]),p=s.useCallback((m,h)=>{if(!e)return;const x=i.current;if(t&&x.hasLastX){const S=m-x.lastX;x.targetRotation=r0(S*Yo.rotationFactor,-20,Yo.maxRotation)}else x.targetRotation=0;if(x.lastX=m,x.hasLastX=!0,x.targetX=m,x.targetY=h,t){d();return}x.x=m,x.y=h,x.rotation=x.targetRotation,r()},[e,r,t,d]),v=s.useCallback(m=>{l(),i.current.hasLastX=!1,m==null||m()},[l]),b=s.useCallback(()=>{l(),i.current={x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1},n.current&&(n.current.style.transform="")},[l]);return s.useEffect(()=>(e||b(),l),[e,b,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:v,reset:b}}function l0(e){return`
|
|
9973
|
+
`,Qv="01M3SBP3P8CMVMM1ZZ0QVD2PPF",Hi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Zv(e){const t={};return t[bt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSettings")]={...Hi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSize")]={...Hi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[bt(e,"lineHeight")]={...Hi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[bt(e,"letterSpacing")]={...Hi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[bt(e,"wordSpacing")]={...Hi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[bt(e,"textAlign")]={...Hi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[bt(e,"textAppearance")]={...Hi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Eo=Mi.filter(e=>e!=="count"),Jv=Eo.reduce((e,t)=>({...e,...Zv(t)}),{}),e0=Eo.reduce((e,t)=>({...e,[bt(t,"fontFamily")]:"Arial",[bt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[bt(t,"letterSpacing")]:0,[bt(t,"wordSpacing")]:0,[bt(t,"textAlign")]:"left",[bt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ls(e){return Eo.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[bt(n,"fontSize")]=i),o!==void 0&&(t[bt(n,"lineHeight")]=o),t},{})}const t0={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Eo.map(e=>[Nl[e],_l(e)]))},n0={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},i0=["01M3QM74XEQE7FN1WYJN6H984H","01M3QM74XFXCSMJJ8TNR0RXSWV","01M3QM74XFQ6K4CJ0QYC7BT7VP","01M3QM74XFK2K9T3SPCZD8M7RT","01M3QM74XFV4J15XRFB85877RE","01M3QM74XFB8Q39K12G4G6CZDM","01M3QM74XFWVH9HND47HYNCBZB","01M3QM74XF3MFEKEA4E0W9F9ZQ","01M3QM74XFEQY4XMN22Q9ERGKX","01M3QM74XFWP1RY8ND8QX88J2V","01M3QM74XFD41TXQ5BQ2KFJBGQ","01M3QM74XFV8973P7WXXWJP3QK","01M3QM74XF67PD2N10JYF9409X","01M3QM74XFA5B75WMTTKRN9TM7","01M3QM74XFFQRBHCQGKWPGSAGE","01M3QM74XF1HQBTRANGVX0QVGK","01M3QM74XF8ZWGSVCX3KS5YXSC","01M3QM74XFPHGV2XFZ23ADCVFC","01M3QM74XFECQG799S95G63BDJ","01M3QM74XFW1XS568WAHG3BGN1","01M3QM74XFT1RRJ3N1JJKPK5EA","01M3QM74XFB2JQ62RPFSM145GN","01M3QM74XFH61QR5PACJS04Z5K","01M3QM74XFKD44BXHRA7SSMD7N"],o0=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...n0,gallery:[{media:[{assetId:i0[t-1],name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]});return e})(),r0={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",max:1,display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:o0},settings:{sizing:"auto auto",properties:{gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:9999,display:{type:"numeric-input"}},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},...Jv},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Qv,closeIconColor:"#000000",closeIconHoverColor:"#999999",...e0},layoutDefaults:{m:{gridLayout:{entryWidth:.37837,horizontalGap:.081,wrapperWidth:1,columnsCount:2,lockedParam:"wrapperWidth"},verticalGap:.081,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,...ls({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{gridLayout:{entryWidth:.10416,horizontalGap:.013,wrapperWidth:1,columnsCount:8,lockedParam:"wrapperWidth"},verticalGap:.013,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.039,iconMarginRight:.026,...ls({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})},d:{gridLayout:{entryWidth:.06944,horizontalGap:.006944,wrapperWidth:1,columnsCount:12,lockedParam:"wrapperWidth"},verticalGap:.00694,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,...ls({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})}},displayRules:[{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","gridLayout","verticalGap","align","imageDisplay","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"",items:["imageDisplay","align"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[t0]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},a0={element:Yv,id:"hive",name:"Catalogue",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/hive.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.assetId",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Eo.map(e=>({path:`${bt(e,"fontFamily")}`}))]},fontRelations:{...Eo.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${bt(t,"fontFamily")}`}),{})},schema:r0,sourceCode:Kv};function s0(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.assetId)}function l0({media:e,className:t,style:n}){const i=s.useRef(null);return s.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const r=o.play();r&&r.catch(()=>{})},[e.isVideo,e.assetId]),e.isVideo?a.jsx("video",{ref:i,className:t,src:e.assetId,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.assetId,alt:"",style:n})}function cs(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function c0(e){return String(e??"").trim().length>0}function Wc(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 Oc(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 Dc(e,t,n,i,o,r,l){const c=A.scalingValue(r,l),d=A.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?c:d,borderBottomWidth:!p||i?c:d}}function d0(e,t,n){const i=A.scalingValue(t,n),o=A.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Bc=10,zc=10,Yo={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function u0(e,t,n){return Math.max(t,Math.min(n,e))}function ds(e,t,n){return e+(t-e)*n}function p0(e,t,n,i){if(!t)return{x:0,y:0};const o=t.getBoundingClientRect(),r=o.top+o.height/2;if(e==="cursor"&&n)return{x:n.clientX+Bc,y:n.clientY+Bc};switch(e){case"left":return{x:o.left+zc+i/2,y:r};case"center":return{x:o.left+o.width/2,y:r};case"right":return{x:o.right-zc-i/2,y:r};default:return{x:o.left+o.width/2,y:r}}}function m0(e,t){const n=s.useRef(null),i=s.useRef({x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1}),o=s.useRef(null),r=s.useCallback(()=>{const m=n.current,h=i.current;m&&(m.style.transform=`translate3d(${h.x}px, ${h.y}px, 0) translate(-50%, -50%) rotate(${h.rotation.toFixed(3)}deg)`)},[]),l=s.useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},[]),c=s.useCallback(()=>{const m=i.current;t?(m.x=ds(m.x,m.targetX,Yo.positionEase),m.y=ds(m.y,m.targetY,Yo.positionEase),m.rotation=ds(m.rotation,m.targetRotation,Yo.rotationEase)):(m.x=m.targetX,m.y=m.targetY,m.rotation=m.targetRotation),r();const h=Math.abs(m.x-m.targetX)<.4&&Math.abs(m.y-m.targetY)<.4,b=Math.abs(m.rotation-m.targetRotation)<.08;!h||!b?o.current=requestAnimationFrame(c):o.current=null},[r,t]),d=s.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(c))},[c]),u=s.useCallback((m,h)=>{const b=i.current;b.targetX=m,b.targetY=h,b.targetRotation=0,b.x=m,b.y=h,b.rotation=0,b.lastX=m,b.hasLastX=!0,r(),t&&d()},[r,t,d]),p=s.useCallback((m,h)=>{if(!e)return;const b=i.current;if(t&&b.hasLastX){const S=m-b.lastX;b.targetRotation=u0(S*Yo.rotationFactor,-20,Yo.maxRotation)}else b.targetRotation=0;if(b.lastX=m,b.hasLastX=!0,b.targetX=m,b.targetY=h,t){d();return}b.x=m,b.y=h,b.rotation=b.targetRotation,r()},[e,r,t,d]),v=s.useCallback(m=>{l(),i.current.hasLastX=!1,m==null||m()},[l]),x=s.useCallback(()=>{l(),i.current={x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1},n.current&&(n.current.style.transform="")},[l]);return s.useEffect(()=>(e||x(),l),[e,x,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:v,reset:x}}function g0(e){return`
|
|
9974
9974
|
.${e}-wrapper {
|
|
9975
9975
|
display: grid;
|
|
9976
9976
|
align-items: start;
|
|
@@ -10346,7 +10346,7 @@ a.${e}-list-item {
|
|
|
10346
10346
|
overflow-wrap: anywhere;
|
|
10347
10347
|
word-break: break-word;
|
|
10348
10348
|
}
|
|
10349
|
-
`}const Pi=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ol=["AColumn","BColumn","CColumn","DColumn","EColumn"],ai="cutLabel",xr=[...Ol,ai],za=["A","B","C","D","E"];function ap(e){return`${e}ColumnVerticalAlign`}const Us=["Top","Center","Bottom"];function Dl(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return za.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function c0(e){const t=Dl(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function d0(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return za.includes(n)?n:null}function sp(e,t,n){const i=d0(e);return i?i===t?!1:c0(n[ap(i)]):!0}function br(e){const t=Dl(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return za.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function u0(e,t,n){if(lp(e,t,n))return br(e);const i=br(e);return i.kind==="baseline"?{kind:"top"}:i}function p0(e){const t=br(e);return t.kind==="baseline"?{kind:"top"}:t}function lp(e,t,n){return sp(e,n,t)?br(e).kind==="baseline":!1}function m0(e){const t={};let n=!1;for(const i of za){const o=ap(i),r=e[o];if(e.type==="b"){const l=String(r??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}sp(r,i,e)||(t[o]="Top",n=!0)}return n?t:null}function g0(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function h0(e){const t=br(e).kind;return t==="baseline"?"center":t}function f0(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function jc(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function y0(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),r=o-i;return n.remove(),r}function us(e,t,n,i){const o=e.titleEl;if(!o)return 0;const r=o.closest(`.${n}`);if(!r)return 0;const l=y0(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const c=r.getBoundingClientRect(),d=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(c.height-d)/2:e.kind==="bottom"&&(u=c.height-d),c.top-t+u+l}function v0(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const r=o.querySelector(`.${n}`);r&&(r.style.minHeight=`${i}px`,r.style.height=`${i}px`)}),i)}function x0(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const b0={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Kt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const S0={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function w0(e){return[Kt(e,"textFontFamily"),Kt(e,"textFontSettings"),{type:"row",items:[Kt(e,"textFontSize"),Kt(e,"textLineHeight"),Kt(e,"textLetterSpacing"),Kt(e,"textWordSpacing")]},Kt(e,"textTextAlign"),Kt(e,"textTextAppearance"),`${e}VerticalAlign`]}function $0(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(xr.map(e=>[S0[e],w0(e)]))}}function $a(e,t){const n=i=>{const o=Kt(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===ai?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Vc(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 un(en(n,t))}function Gc(e,t,n,i){const o=$a(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<r?`${n} ${i}`:n}function Xc(e,t,n,i){const o=$a(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=r?{}:{[`--${n}-title-leading-gap`]:k.scalingValue((r-l)/2,i)}}const Rn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Mo=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Eo=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],ko=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],C0={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},T0=["hover","focus","filled","success","error"],Uc=.004,uo=.004,ps=uo,Bl=50,Sr=1440,wr=Bl/Sr;function cp(e){const t=typeof e=="number"&&e>0?e:Sr;return Bl/t}function I0(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 Sr}const dp={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function lr(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function L0(e,t=1){const n=t/e;return Object.fromEntries(Rn.map(i=>[i,n]))}function P0(){return Object.fromEntries([...Mo.map(e=>[e,0]),...Eo.map(e=>[e,0])])}function R0(){return Object.fromEntries(ko.map(e=>[e,0]))}function Vr(e){return Object.fromEntries(Rn.map(t=>[t,typeof e[t]=="number"?e[t]:dp[t]]))}function up(e,t,n){const i=e-wr,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const r=i/o;return{paddingLeft:t*r,paddingRight:n*r}}function ma(e,t,n){const i=zl(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((r,l)=>r+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function M0(e,t,n){const i={};for(let o=0;o<e;o+=1){const r=Mo[o],l=Eo[o],c=typeof n[r]=="number"?n[r]:0,d=typeof n[l]=="number"?n[l]:0,u=up(t[o]??0,c,d);u.paddingLeft!==c&&(i[r]=u.paddingLeft),u.paddingRight!==d&&(i[l]=u.paddingRight)}return i}function zl(e,t,n){if(e<=0)return[];const i=Rn.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),l=o.reduce((u,p)=>u+p,0)+wr;if(t>=l)return i;const c=[...o];let d=l-t;for(let u=c.length-1;u>=0&&d>0;u-=1){const p=c[u]-wr;if(p<=0)continue;const v=Math.min(d,p);c[u]-=v,d-=v}return[...c,i[e-1]]}function E0(e,t,n){if(e<=1)return{};const i=zl(e,t,n),o={};for(let r=0;r<e-1;r+=1){const l=Rn[r];i[r]!==n[l]&&(o[l]=i[r])}return o}function qc(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Pi]}function k0(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function A0(e,t,n,i){const o=Math.min(i,e.length,Rn.length),r={};for(let l=0;l<o;l+=1){const c=e[l],d=t.indexOf(c);if(d===-1)continue;const u=Rn[d],p=Mo[d],v=Eo[d],b=ko[d],m=Rn[l],h=Mo[l],x=Eo[l],S=ko[l],P=n[u],f=n[p],w=n[v],N=n[b];typeof P=="number"&&(r[m]=P),typeof f=="number"&&(r[h]=f),typeof w=="number"&&(r[x]=w),typeof N=="number"&&(r[S]=N)}return r}function pp(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 F0(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=lr(e),r=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...L0(n,o),...P0()};if(r)for(const c of ko)typeof t[c]=="number"&&(l[c]=t[c]);else Object.assign(l,R0());return pp(e,l)?l:e}function N0(e,t,n){const i=m0(e);i&&(e={...e,...i});const o=cp(n==null?void 0:n.designWidth),r=e.columns,l=t.columns,c=lr(e),d=lr(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof r=="number"?r:typeof l=="number"?l:Pi.length,v=w=>{if(u)return w;const N=Vr({...t,...w}),V=lr(w),B=ma(p,V,N),H=M0(p,B,{...t,...w});return Object.keys(H).length===0?w:{...w,...H}};if(typeof r=="number"&&r!==l)return e;const b=qc(e),m=qc(t);if(!k0(b,m))return v({...e,...A0(b,m,t,p)});if(c<d&&typeof p=="number"&&!u){const w=Vr({...t,...e});return v({...e,...E0(p,c,w)})}if(u){const w=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,N=Math.max(0,(c-o)/2);return w>N?{...e,textPaddingLR:N}:e}const h=Vr({...t,...e}),x=ma(p,d,Vr(t)),P=ma(p,c,h).some((w,N)=>w<(x[N]??w)),f=Rn.some(w=>{const N=e[w],V=t[w];return typeof N=="number"&&typeof V=="number"&&N!==V});return P||f?v(e):e}function _0(e,t,n,i){const o=t.slice(0,e).reduce((l,c)=>l+c,0),r=n.slice(e+1,t.length-1).reduce((l,c)=>l+c,0);return Math.max(wr,i-o-r-wr)}function H0(e,t){return Math.random()*(t-e)+e}function W0(e){return Object.fromEntries(Rn.map(t=>[t,typeof e[t]=="number"?e[t]:dp[t]]))}function ms(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function O0(e,t,n,i,o,r){return e.slice(0,t).map((l,c)=>{const d=Mo[c],u=Eo[c],p=ko[c];return{key:l,textPrefix:b0[l],widthKey:Rn[c],width:n[Rn[c]],paddingLeftKey:d,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[d],paddingRight:o[u],paddingBottom:r[p]}})}function D0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r,layoutId:l,portalId:c,onUpdateSettings:d}){const{prefix:u}=k.useScopedStyles(),p=!!o,{columns:v,type:b,wrapperWidth:m,entriesCount:h,cellMinHeight:x,dividerWidth:S,showVisibility:P,cut:f,showCut:w,cutCellMinHeight:N,cutLabel:V,imageSize:B,imageOnHover:H,imagePosition:_="cursor",imageInterpolation:z="on",entryHoverEffect:$,entryHoverShowOption:E,rowPaddingTop:j,rowPaddingBottom:L,rowPaddingTopB:C,columnsOrder:T,textPaddingLR:G,textColor:A,backgroundColor:Y,dividerColor:R,textHoverColor:y,backgroundHoverColor:U,dividerHoverColor:ee}=e,[de,F]=s.useState(void 0),[ie,I]=s.useState(null),se=s.useRef(null),J=H==="on"&&(!n||i),Se=_==="cursor",Re=Se&&z==="on",{anchorRef:pe,onShow:he,onCursorMove:te,exit:le}=s0(!!(J&&ie!==null),Re),re=(f??0)>0,fe=b==="b",xe=s.useRef(null),Te=s.useRef(null),[me,be]=s.useState(null),[we,g]=s.useState(Sr),X=cp(we),Z=Math.max(0,((m??0)-X)/2),ne=Math.min(G??0,Z),ye=Math.max(ne,uo),K=((m??0)+X)/2;s.useLayoutEffect(()=>{if(!n){g(Sr);return}const Me=()=>{g(I0(xe.current))};Me();const nt=xe.current;if(!nt)return;const ct=new ResizeObserver(Me);ct.observe(nt);let gt=nt;for(;gt&&!gt.style.getPropertyValue("--cntrl-article-width");)gt=gt.parentElement;return gt&&ct.observe(gt),()=>ct.disconnect()},[n,l]),s.useEffect(()=>{F(void 0)},[f,w,t,h]),s.useEffect(()=>{n&&!i&&F(void 0)},[n,i]);const D=k.buildColorVars(u,{textColor:A,backgroundColor:Y,dividerColor:R,textHoverColor:y,backgroundHoverColor:U,dividerHoverColor:ee},C0,T0),ce=r&&r!=="default"?`${u}-state-${r}`:"",ue=`${!n||i?$==="default"?`${u}-entry-hover-default`:$==="blinds"?`${u}-entry-hover-blinds`:$==="reveal"?`${u}-entry-hover-reveal`:"":""} ${ce}`.trim(),W=$==="reveal"&&(!n||i),Le=(P==null?void 0:P[0])??!1,ae=(P==null?void 0:P[1])??!1,Q=s.useRef(e),Ne=s.useRef(l);s.useEffect(()=>{if(!d||!n){Q.current=e,Ne.current=l;return}if(Ne.current!==l){Q.current=e,Ne.current=l;return}const Me=Q.current;if(!(Me!==e))return;if(typeof Me.columns=="number"&&typeof e.columns=="number"&&Me.columns!==e.columns){Q.current=e;return}const ct=N0(e,Me,{designWidth:we});Q.current=e,pp(e,ct)&&d(ct)},[e,d,n,l,we]);const Oe=s.useMemo(()=>W0(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),it=s.useMemo(()=>ms(e,Mo),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),qe=s.useMemo(()=>ms(e,Eo),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Je=s.useMemo(()=>ms(e,ko),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),ot=s.useMemo(()=>Array.isArray(T)&&T.length>0?T:[...Pi],[T]),Ve=s.useMemo(()=>O0(ot,v,Oe,it,qe,Je),[ot,v,Oe,it,qe,Je]),ve=lr(e),Fe=s.useMemo(()=>Rn.slice(0,v).map(Me=>Oe[Me]),[v,Oe]),Xe=s.useMemo(()=>zl(v,ve,Oe),[v,ve,Oe]),Ye=s.useMemo(()=>ma(v,ve,Oe),[v,ve,Oe]),Pe=s.useMemo(()=>Ve.map((Me,nt)=>up(Ye[nt]??0,Me.paddingLeft,Me.paddingRight)),[Ve,Ye]),_e=s.useMemo(()=>{const Me=h===0?1/0:h;return(t??[]).slice(0,Me).map((ct,gt)=>({id:gt,cells:Object.fromEntries(Pi.map(Et=>[Et,ct[Et]??""])),image:ct.image,link:ct.link}))},[t,h]),Ke=re?de??f:_e.length,Ze=s.useMemo(()=>re?_e.slice(0,Ke):_e,[_e,re,Ke]),st=re&&Ke<_e.length,Ue=Ze.length>1||st,De=[Le?`${u}-divider-top`:"",ae||Ue?`${u}-divider-bottom`:""].filter(Boolean).join(" "),ke=!n||i,ht=()=>{if(!ke)return;const Me=de??f;if(!w){F(_e.length);return}F(Math.min(Me+w,_e.length))},Be=Me=>k.scalingValue(Me,n??!1),ze=fe?C??0:j??0,We=L??0,mt=x??0,rt=Math.max(We,ps),St=Dc(0,Ze.length,Le,ae,st,S??0,n??!1).borderTopWidth,Nt=fe?"rowPaddingTopB":"rowPaddingTop",jt=Ve[0],xt=Ve[Ve.length-1],Ce=Pe[0],He=Pe[Pe.length-1],lt=jt&&Ce?Math.max(Ce.paddingLeft,uo):0,et=xt&&He?Math.max(He.paddingRight,uo):0,yt=ve,Rt=(Me,nt)=>a0(_,xe.current,Se?Me:null,nt),At=(Me,nt)=>{if(!J)return;const ct=Me.image;if(!(ct!=null&&ct.assetId)){le(()=>I(null));return}const gt=(B==null?void 0:B.min)??80,Et=(B==null?void 0:B.max)??320,wt=(ie==null?void 0:ie.rowId)===Me.id,dt=wt?ie.widthPx:H0(gt,Et),{x:Ot,y:Lt}=Rt(nt,dt);if(wt&&Se){te(Ot,Lt);return}I({rowId:Me.id,assetId:ct.assetId,objectFit:"contain",isVideo:t0(ct),widthPx:dt}),se.current={x:Ot,y:Lt}},qt=Me=>{if(!J||!ie||!Se)return;const{x:nt,y:ct}=Rt(Me,ie.widthPx);te(nt,ct)},$t=()=>{ie&&le(()=>I(null))},zt=Me=>{W&&Wc(Me,u),!(!J||!ie)&&le(()=>I(null))},on=Me=>{W&&Oc(Me,u)};s.useLayoutEffect(()=>{if(!ie||!se.current)return;const{x:Me,y:nt}=se.current;se.current=null,he(Me,nt)},[ie==null?void 0:ie.rowId,ie==null?void 0:ie.assetId,he]),s.useLayoutEffect(()=>{if(!p||fe){be(null);return}const Me=Te.current,nt=Me==null?void 0:Me.parentElement;if(!Me||!nt){be(null);return}const ct=()=>{const Et=Me.querySelector("[data-list-row]");if(!Et){be(null);return}const wt=nt.getBoundingClientRect(),dt=Et.getBoundingClientRect();be(dt.top-wt.top+dt.height/2)};ct();const gt=new ResizeObserver(ct);return gt.observe(Me),gt.observe(nt),()=>gt.disconnect()},[p,fe,Ze,ze,We,mt,t,e,Ve,Ye,we,S,Le,ae,st]);const vt=s.useMemo(()=>!fe&&Ol.some(Me=>{const nt=Me.charAt(0),ct=e[`${Me}VerticalAlign`];return lp(ct,e,nt)}),[fe,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var Ot;const Me=xe.current;if(!Me)return;const nt=()=>{Me.querySelectorAll("[data-list-col]").forEach(Lt=>{Lt.style.transform="";const Ht=Lt.querySelector(`.${u}-list-col`);Ht&&(Ht.style.minHeight="",Ht.style.height="");const Gt=Lt.querySelector(`.${u}-list-col-title`);Gt&&(Gt.style.transform="")})};if(fe||!vt){nt();return}const ct=()=>{const Lt=Array.from(Me.querySelectorAll("[data-list-row]")),Ht=`${u}-list-col`,Gt=`${u}-baseline-probe`;Lt.forEach(_t=>{_t.querySelectorAll("[data-list-col]").forEach(Vt=>{Vt.style.transform="";const Dt=Vt.querySelector(`.${Ht}`);Dt&&(Dt.style.minHeight="",Dt.style.height="");const Ct=Vt.querySelector(`.${u}-list-col-title`);Ct&&(Ct.style.transform="")})}),Lt.forEach(_t=>{const Vt=Array.from(_t.querySelectorAll("[data-list-col]"));v0(_t,Vt,Ht)}),Me.offsetHeight,Lt.forEach(_t=>{const Vt=Array.from(_t.querySelectorAll("[data-list-col]")),Dt=_t.getBoundingClientRect().top,Ct=new Map,O=Vt.map(Ae=>{const tt=Ae.querySelector(`.${u}-list-col-title`),Mt={el:Ae,titleEl:tt,letter:Ae.getAttribute("data-col-letter")??"",kind:Ae.getAttribute("data-valign")??"top",anchor:Ae.getAttribute("data-valign-anchor")};return Ct.set(Mt.letter,Mt),Mt}),Ie=new Map,je=(Ae,tt)=>{const Mt=Ie.get(Ae.letter);if(Mt!==void 0)return Mt;const ut=Ae.anchor?Ct.get(Ae.anchor):void 0;if(Ae.kind!=="baseline"||!ut||tt.has(Ae.letter)){const cn=us(Ae,Dt,Ht,Gt);return Ie.set(Ae.letter,cn),cn}tt.add(Ae.letter);const Tt=je(ut,tt);tt.delete(Ae.letter);const Ut=us(Ae,Dt,Ht,Gt),Wt=Tt-Ut;x0(Ae.titleEl,Wt);const an=us(Ae,Dt,Ht,Gt);return Ie.set(Ae.letter,an),an};O.forEach(Ae=>je(Ae,new Set))})};let gt=null;const Et=()=>{gt===null&&(gt=requestAnimationFrame(()=>{gt=null,ct()}))};ct();const wt=new ResizeObserver(()=>Et());wt.observe(Me);let dt=!1;return typeof document<"u"&&((Ot=document.fonts)!=null&&Ot.ready)&&document.fonts.ready.then(()=>{dt||Et()}),()=>{dt=!0,gt!==null&&(cancelAnimationFrame(gt),gt=null),wt.disconnect(),nt()}},[vt,fe,e,t,we,Ze,Ye]);const ft=s.useMemo(()=>l0(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ft}}),a.jsx("div",{style:D,children:a.jsxs("div",{ref:xe,className:`${u}-wrapper ${ue}${De?` ${De}`:""}${fe?` ${u}-type-b`:""}`.trim(),style:{width:k.scalingValue(m??0,n)},onMouseMove:J?qt:void 0,onMouseLeave:J?$t:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[Ze.map((Me,nt)=>{var wt;const ct=(((wt=Me.link)==null?void 0:wt.length)??0)>0,gt=ct&&(!n||i)?"a":"div",Et=Dc(nt,Ze.length,Le,ae,st,S??0,n??!1);return a.jsxs(gt,{ref:nt===0?dt=>{Te.current=dt}:void 0,className:`${u}-list-item${ct||E==="always"?` ${u}-list-item-has-link`:""}${st&&nt===Ze.length-1?` ${u}-list-item-before-cut`:""}`,...ct?{href:Me.link,target:"_blank"}:{},style:Et,onMouseEnter:dt=>{W&&(ct||E==="always")&&Wc(dt,u),J&&At(Me,dt)},onMouseLeave:dt=>{W&&(ct||E==="always")&&Oc(dt,u)},children:[ze>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:Be(ze)}}),a.jsxs("div",{className:`${u}-list-cols-row${fe?"":` ${u}-list-cols-row-h`}${p&&nt===0&&fe?` ${u}-list-cols-row-controls`:""}`,...fe?{}:{"data-list-row":""},style:fe?void 0:{minHeight:Be(mt)},children:[Ve.map((dt,Ot)=>{const Lt=Ot===Ve.length-1,Ht=Pe[Ot],Gt=dt.paddingBottom,_t=i0(Me.cells[dt.key]),Vt=fe&&_t&&Gt>0,Dt=fe?{minHeight:Be(mt)}:{width:Be(Ye[Ot])},Ct=fe?{paddingLeft:Be(ne),paddingRight:Be(ne)}:{paddingLeft:Be(Ht.paddingLeft),paddingRight:Be(Ht.paddingRight)},O=dt.textPrefix.charAt(0),Ie=fe?p0(e[`${dt.textPrefix}VerticalAlign`]):u0(e[`${dt.textPrefix}VerticalAlign`],e,O),je=fe&&_t&&p&&nt===0;return fe&&!_t?null:a.jsxs("div",{className:fe?`${u}-list-col-wrap`:void 0,...fe?{}:{"data-list-col":"","data-col-letter":O,"data-valign":Ie.kind,...Ie.kind==="baseline"?{"data-valign-anchor":Ie.anchorLetter}:{}},children:[a.jsx("div",{className:`${u}-list-col${Lt?` ${u}-list-col-last`:""}`,style:{...Ct,...Dt,...fe?{justifyContent:jc(Ie.kind)}:{}},"data-test":dt.width,children:a.jsx("span",{className:Gc(e,dt.textPrefix,`${u}-list-col-title`,`${u}-text-tight-leading`),style:{...Vc($a(e,dt.textPrefix),n),...Xc(e,dt.textPrefix,u,n),...fe?{}:g0(Ie.kind)},children:Me.cells[dt.key]??null})}),Vt&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:Be(Gt)}}),je&&a.jsx("div",{"data-controls":dt.paddingBottomKey,"data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Be(Math.max(Gt,ps))}})]},dt.key)}),p&&nt===0&&fe&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(K),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:0,width:Be(ye),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(K),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:Be(Math.max(ye,ve-ye)),width:Be(ye),height:"100%"}})]})]}),!fe&&We>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:Be(We)}}),p&&nt===0&&!fe&&a.jsx("div",{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${u}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Be(rt)}})]},Me.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Nt,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":fe?"center":"left-y",className:`${u}-control-anchor`,style:{top:St,left:0,width:"100%",height:Be(Math.max(ze,ps))}})},"row-padding-handles"),p&&!fe&&jt&&xt&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":jt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ye[0]-((Ce==null?void 0:Ce.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":me??void 0,className:`${u}-control-anchor`,style:{top:0,left:0,width:Be(lt),height:"100%"}}),a.jsx("div",{"data-controls":xt.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ye[Ve.length-1]-((He==null?void 0:He.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":me??void 0,className:`${u}-control-anchor`,style:{top:0,left:Be(yt-et),width:Be(et),height:"100%"}})]},"column-edge-padding-handles"),p&&!fe&&Ve.slice(0,-1).map((Me,nt)=>{const ct=Ve[nt+1],gt=Xe.slice(0,nt+1).reduce((Lt,Ht)=>Lt+Ht,0),Et=Pe[nt],wt=Pe[nt+1],dt=Math.max(Et.paddingRight,uo),Ot=Math.max(wt.paddingLeft,uo);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Me.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ye[nt]-Et.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":me??void 0,className:`${u}-control-anchor`,style:{top:0,left:Be(gt-dt),width:Be(dt),height:"100%"}}),a.jsx("div",{"data-controls":ct.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ye[nt+1]-wt.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":me??void 0,className:`${u}-control-anchor`,style:{top:0,left:Be(gt),width:Be(Ot),height:"100%"}})]},`${Me.paddingRightKey}-padding`)}),p&&!fe&&Ve.slice(0,-1).map((Me,nt)=>{const ct=_0(nt,Xe,Fe,ve),Et=Xe.slice(0,nt+1).reduce((wt,dt)=>wt+dt,0)-Uc/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Me.widthKey,"data-controls-axis":"x","data-controls-min":String(Bl),"data-controls-max-fraction":String(ct),"data-controls-variant":"column-width",className:`${u}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Be(Et),width:Be(Uc),height:"calc(100%)",pointerEvents:"auto"}})},`${Me.widthKey}-junction`)})]}),st&&(()=>{const Me=$a(e,ai),nt=h0(e.cutLabelVerticalAlign),ct=Me.textTextAlign==="justify"||fe;return a.jsx("button",{type:"button",className:`${u}-cut-item`,style:{minHeight:Be(N??0),cursor:ke?"pointer":"default",...o0(ae,S??0,n??!1)},onClick:ke?ht:void 0,onMouseEnter:W||J?zt:void 0,onMouseLeave:W?on:void 0,children:a.jsx("div",{className:`${u}-list-cols-row`,style:{...fe?{paddingLeft:Be(ne),paddingRight:Be(ne)}:{},justifyContent:f0(Me.textTextAlign),alignItems:jc(nt)},children:a.jsx("span",{className:Gc(e,ai,`${u}-cut-label`,`${u}-text-tight-leading`),style:{...Vc(Me,n),...Xc(e,ai,u,n),...ct?{width:"100%"}:{}},children:V})})})})(),J&&ie&&typeof document<"u"&&(()=>{const Me=`${ie.widthPx}px`,nt={width:Me,height:"auto",maxHeight:Me,objectFit:"contain"},ct=(c?document.getElementById(c):null)??document.body;return Xn.createPortal(a.jsx("div",{ref:pe,className:`${u}-hover-media-anchor`,"data-selection":"none",children:a.jsx(n0,{media:ie,className:ie.isVideo?`${u}-hover-video`:`${u}-hover-image`,style:nt},`${ie.rowId}-${ie.assetId}`)}),ct)})()]})})]})}const B0=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
|
|
10349
|
+
`}const Ei=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ol=["AColumn","BColumn","CColumn","DColumn","EColumn"],si="cutLabel",xr=[...Ol,si],za=["A","B","C","D","E"];function pp(e){return`${e}ColumnVerticalAlign`}const Xs=["Top","Center","Bottom"];function Dl(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return za.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function h0(e){const t=Dl(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function f0(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return za.includes(n)?n:null}function mp(e,t,n){const i=f0(e);return i?i===t?!1:h0(n[pp(i)]):!0}function br(e){const t=Dl(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return za.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function y0(e,t,n){if(gp(e,t,n))return br(e);const i=br(e);return i.kind==="baseline"?{kind:"top"}:i}function v0(e){const t=br(e);return t.kind==="baseline"?{kind:"top"}:t}function gp(e,t,n){return mp(e,n,t)?br(e).kind==="baseline":!1}function x0(e){const t={};let n=!1;for(const i of za){const o=pp(i),r=e[o];if(e.type==="b"){const l=String(r??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}mp(r,i,e)||(t[o]="Top",n=!0)}return n?t:null}function b0(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function S0(e){const t=br(e).kind;return t==="baseline"?"center":t}function w0(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function jc(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function $0(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),r=o-i;return n.remove(),r}function us(e,t,n,i){const o=e.titleEl;if(!o)return 0;const r=o.closest(`.${n}`);if(!r)return 0;const l=$0(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const c=r.getBoundingClientRect(),d=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(c.height-d)/2:e.kind==="bottom"&&(u=c.height-d),c.top-t+u+l}function C0(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const r=o.querySelector(`.${n}`);r&&(r.style.minHeight=`${i}px`,r.style.height=`${i}px`)}),i)}function T0(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const I0={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Qt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const L0={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function P0(e){return[Qt(e,"textFontFamily"),Qt(e,"textFontSettings"),{type:"row",items:[Qt(e,"textFontSize"),Qt(e,"textLineHeight"),Qt(e,"textLetterSpacing"),Qt(e,"textWordSpacing")]},Qt(e,"textTextAlign"),Qt(e,"textTextAppearance"),`${e}VerticalAlign`]}function R0(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(xr.map(e=>[L0[e],P0(e)]))}}function $a(e,t){const n=i=>{const o=Qt(t,i);return e[o]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===si?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Vc(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 pn(nn(n,t))}function Gc(e,t,n,i){const o=$a(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<r?`${n} ${i}`:n}function Xc(e,t,n,i){const o=$a(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=r?{}:{[`--${n}-title-leading-gap`]:A.scalingValue((r-l)/2,i)}}const Mn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],ko=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Ao=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Fo=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],M0={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},E0=["hover","focus","filled","success","error"],qc=.004,mo=.004,ps=mo,Bl=50,Sr=1440,wr=Bl/Sr;function hp(e){const t=typeof e=="number"&&e>0?e:Sr;return Bl/t}function k0(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 Sr}const fp={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function lr(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function A0(e,t=1){const n=t/e;return Object.fromEntries(Mn.map(i=>[i,n]))}function F0(){return Object.fromEntries([...ko.map(e=>[e,0]),...Ao.map(e=>[e,0])])}function N0(){return Object.fromEntries(Fo.map(e=>[e,0]))}function Vr(e){return Object.fromEntries(Mn.map(t=>[t,typeof e[t]=="number"?e[t]:fp[t]]))}function yp(e,t,n){const i=e-wr,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const r=i/o;return{paddingLeft:t*r,paddingRight:n*r}}function ma(e,t,n){const i=zl(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((r,l)=>r+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function _0(e,t,n){const i={};for(let o=0;o<e;o+=1){const r=ko[o],l=Ao[o],c=typeof n[r]=="number"?n[r]:0,d=typeof n[l]=="number"?n[l]:0,u=yp(t[o]??0,c,d);u.paddingLeft!==c&&(i[r]=u.paddingLeft),u.paddingRight!==d&&(i[l]=u.paddingRight)}return i}function zl(e,t,n){if(e<=0)return[];const i=Mn.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),l=o.reduce((u,p)=>u+p,0)+wr;if(t>=l)return i;const c=[...o];let d=l-t;for(let u=c.length-1;u>=0&&d>0;u-=1){const p=c[u]-wr;if(p<=0)continue;const v=Math.min(d,p);c[u]-=v,d-=v}return[...c,i[e-1]]}function H0(e,t,n){if(e<=1)return{};const i=zl(e,t,n),o={};for(let r=0;r<e-1;r+=1){const l=Mn[r];i[r]!==n[l]&&(o[l]=i[r])}return o}function Uc(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Ei]}function W0(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function O0(e,t,n,i){const o=Math.min(i,e.length,Mn.length),r={};for(let l=0;l<o;l+=1){const c=e[l],d=t.indexOf(c);if(d===-1)continue;const u=Mn[d],p=ko[d],v=Ao[d],x=Fo[d],m=Mn[l],h=ko[l],b=Ao[l],S=Fo[l],M=n[u],y=n[p],$=n[v],R=n[x];typeof M=="number"&&(r[m]=M),typeof y=="number"&&(r[h]=y),typeof $=="number"&&(r[b]=$),typeof R=="number"&&(r[S]=R)}return r}function vp(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 D0(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=lr(e),r=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...A0(n,o),...F0()};if(r)for(const c of Fo)typeof t[c]=="number"&&(l[c]=t[c]);else Object.assign(l,N0());return vp(e,l)?l:e}function B0(e,t,n){const i=x0(e);i&&(e={...e,...i});const o=hp(n==null?void 0:n.designWidth),r=e.columns,l=t.columns,c=lr(e),d=lr(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof r=="number"?r:typeof l=="number"?l:Ei.length,v=$=>{if(u)return $;const R=Vr({...t,...$}),X=lr($),B=ma(p,X,R),O=_0(p,B,{...t,...$});return Object.keys(O).length===0?$:{...$,...O}};if(typeof r=="number"&&r!==l)return e;const x=Uc(e),m=Uc(t);if(!W0(x,m))return v({...e,...O0(x,m,t,p)});if(c<d&&typeof p=="number"&&!u){const $=Vr({...t,...e});return v({...e,...H0(p,c,$)})}if(u){const $=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,R=Math.max(0,(c-o)/2);return $>R?{...e,textPaddingLR:R}:e}const h=Vr({...t,...e}),b=ma(p,d,Vr(t)),M=ma(p,c,h).some(($,R)=>$<(b[R]??$)),y=Mn.some($=>{const R=e[$],X=t[$];return typeof R=="number"&&typeof X=="number"&&R!==X});return M||y?v(e):e}function z0(e,t,n,i){const o=t.slice(0,e).reduce((l,c)=>l+c,0),r=n.slice(e+1,t.length-1).reduce((l,c)=>l+c,0);return Math.max(wr,i-o-r-wr)}function j0(e,t){return Math.random()*(t-e)+e}function V0(e){return Object.fromEntries(Mn.map(t=>[t,typeof e[t]=="number"?e[t]:fp[t]]))}function ms(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function G0(e,t,n,i,o,r){return e.slice(0,t).map((l,c)=>{const d=ko[c],u=Ao[c],p=Fo[c];return{key:l,textPrefix:I0[l],widthKey:Mn[c],width:n[Mn[c]],paddingLeftKey:d,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[d],paddingRight:o[u],paddingBottom:r[p]}})}function X0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r,layoutId:l,portalId:c,onUpdateSettings:d}){const{prefix:u}=A.useScopedStyles(),p=!!o,{columns:v,type:x,wrapperWidth:m,entriesCount:h,cellMinHeight:b,dividerWidth:S,showVisibility:M,cut:y,showCut:$,cutCellMinHeight:R,cutLabel:X,imageSize:B,imageOnHover:O,imagePosition:N="cursor",imageInterpolation:z="on",entryHoverEffect:C,entryHoverShowOption:I,rowPaddingTop:j,rowPaddingBottom:E,rowPaddingTopB:w,columnsOrder:L,textPaddingLR:V,textColor:_,backgroundColor:K,dividerColor:P,textHoverColor:f,backgroundHoverColor:U,dividerHoverColor:te}=e,[ce,F]=s.useState(void 0),[ie,T]=s.useState(null),le=s.useRef(null),J=O==="on"&&(!n||i),Se=N==="cursor",Le=Se&&z==="on",{anchorRef:me,onShow:ye,onCursorMove:ee,exit:oe}=m0(!!(J&&ie!==null),Le),re=(y??0)>0,ge=x==="b",we=s.useRef(null),Ae=s.useRef(null),[fe,ve]=s.useState(null),[xe,g]=s.useState(Sr),G=hp(xe),Q=Math.max(0,((m??0)-G)/2),ne=Math.min(V??0,Q),ue=Math.max(ne,mo),q=((m??0)+G)/2;s.useLayoutEffect(()=>{if(!n){g(Sr);return}const Re=()=>{g(k0(we.current))};Re();const tt=we.current;if(!tt)return;const nt=new ResizeObserver(Re);nt.observe(tt);let st=tt;for(;st&&!st.style.getPropertyValue("--cntrl-article-width");)st=st.parentElement;return st&&nt.observe(st),()=>nt.disconnect()},[n,l]),s.useEffect(()=>{F(void 0)},[y,$,t,h]),s.useEffect(()=>{n&&!i&&F(void 0)},[n,i]);const D=A.buildColorVars(u,{textColor:_,backgroundColor:K,dividerColor:P,textHoverColor:f,backgroundHoverColor:U,dividerHoverColor:te},M0,E0),se=r&&r!=="default"?`${u}-state-${r}`:"",pe=`${!n||i?C==="default"?`${u}-entry-hover-default`:C==="blinds"?`${u}-entry-hover-blinds`:C==="reveal"?`${u}-entry-hover-reveal`:"":""} ${se}`.trim(),H=C==="reveal"&&(!n||i),Ie=(M==null?void 0:M[0])??!1,de=(M==null?void 0:M[1])??!1,Z=s.useRef(e),Ne=s.useRef(l);s.useEffect(()=>{if(!d||!n){Z.current=e,Ne.current=l;return}if(Ne.current!==l){Z.current=e,Ne.current=l;return}const Re=Z.current;if(!(Re!==e))return;if(typeof Re.columns=="number"&&typeof e.columns=="number"&&Re.columns!==e.columns){Z.current=e;return}const nt=B0(e,Re,{designWidth:xe});Z.current=e,vp(e,nt)&&d(nt)},[e,d,n,l,xe]);const Oe=s.useMemo(()=>V0(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),Je=s.useMemo(()=>ms(e,ko),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),De=s.useMemo(()=>ms(e,Ao),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Ze=s.useMemo(()=>ms(e,Fo),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),at=s.useMemo(()=>Array.isArray(L)&&L.length>0?L:[...Ei],[L]),Xe=s.useMemo(()=>G0(at,v,Oe,Je,De,Ze),[at,v,Oe,Je,De,Ze]),be=lr(e),He=s.useMemo(()=>Mn.slice(0,v).map(Re=>Oe[Re]),[v,Oe]),je=s.useMemo(()=>zl(v,be,Oe),[v,be,Oe]),Qe=s.useMemo(()=>ma(v,be,Oe),[v,be,Oe]),Ce=s.useMemo(()=>Xe.map((Re,tt)=>yp(Qe[tt]??0,Re.paddingLeft,Re.paddingRight)),[Xe,Qe]),_e=s.useMemo(()=>{const Re=h===0?1/0:h;return(t??[]).slice(0,Re).map((nt,st)=>({id:st,cells:Object.fromEntries(Ei.map(At=>[At,nt[At]??""])),image:nt.image,link:nt.link}))},[t,h]),Ue=re?ce??y:_e.length,Ye=s.useMemo(()=>re?_e.slice(0,Ue):_e,[_e,re,Ue]),lt=re&&Ue<_e.length,it=Ye.length>1||lt,qe=[Ie?`${u}-divider-top`:"",de||it?`${u}-divider-bottom`:""].filter(Boolean).join(" "),Ee=!n||i,pt=()=>{if(!Ee)return;const Re=ce??y;if(!$){F(_e.length);return}F(Math.min(Re+$,_e.length))},ke=Re=>A.scalingValue(Re,n??!1),We=ge?w??0:j??0,Ve=E??0,ct=b??0,ot=Math.max(Ve,ps),xt=Dc(0,Ye.length,Ie,de,lt,S??0,n??!1).borderTopWidth,Pt=ge?"rowPaddingTopB":"rowPaddingTop",Vt=Xe[0],vt=Xe[Xe.length-1],Mt=Ce[0],Ht=Ce[Ce.length-1],Gt=Vt&&Mt?Math.max(Mt.paddingLeft,mo):0,kt=vt&&Ht?Math.max(Ht.paddingRight,mo):0,Pe=be,Be=(Re,tt)=>p0(N,we.current,Se?Re:null,tt),ft=(Re,tt)=>{if(!J)return;const nt=Re.image;if(!(nt!=null&&nt.assetId)){oe(()=>T(null));return}const st=(B==null?void 0:B.min)??80,At=(B==null?void 0:B.max)??320,St=(ie==null?void 0:ie.rowId)===Re.id,ht=St?ie.widthPx:j0(st,At),{x:Dt,y:Ct}=Be(tt,ht);if(St&&Se){ee(Dt,Ct);return}T({rowId:Re.id,assetId:nt.assetId,objectFit:"contain",isVideo:s0(nt),widthPx:ht}),le.current={x:Dt,y:Ct}},$t=Re=>{if(!J||!ie||!Se)return;const{x:tt,y:nt}=Be(Re,ie.widthPx);ee(tt,nt)},et=()=>{ie&&oe(()=>T(null))},Et=Re=>{H&&Wc(Re,u),!(!J||!ie)&&oe(()=>T(null))},Xt=Re=>{H&&Oc(Re,u)};s.useLayoutEffect(()=>{if(!ie||!le.current)return;const{x:Re,y:tt}=le.current;le.current=null,ye(Re,tt)},[ie==null?void 0:ie.rowId,ie==null?void 0:ie.assetId,ye]),s.useLayoutEffect(()=>{if(!p||ge){ve(null);return}const Re=Ae.current,tt=Re==null?void 0:Re.parentElement;if(!Re||!tt){ve(null);return}const nt=()=>{const At=Re.querySelector("[data-list-row]");if(!At){ve(null);return}const St=tt.getBoundingClientRect(),ht=At.getBoundingClientRect();ve(ht.top-St.top+ht.height/2)};nt();const st=new ResizeObserver(nt);return st.observe(Re),st.observe(tt),()=>st.disconnect()},[p,ge,Ye,We,Ve,ct,t,e,Xe,Qe,xe,S,Ie,de,lt]);const mt=s.useMemo(()=>!ge&&Ol.some(Re=>{const tt=Re.charAt(0),nt=e[`${Re}VerticalAlign`];return gp(nt,e,tt)}),[ge,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var Dt;const Re=we.current;if(!Re)return;const tt=()=>{Re.querySelectorAll("[data-list-col]").forEach(Ct=>{Ct.style.transform="";const qt=Ct.querySelector(`.${u}-list-col`);qt&&(qt.style.minHeight="",qt.style.height="");const jt=Ct.querySelector(`.${u}-list-col-title`);jt&&(jt.style.transform="")})};if(ge||!mt){tt();return}const nt=()=>{const Ct=Array.from(Re.querySelectorAll("[data-list-row]")),qt=`${u}-list-col`,jt=`${u}-baseline-probe`;Ct.forEach(Nt=>{Nt.querySelectorAll("[data-list-col]").forEach(Bt=>{Bt.style.transform="";const Wt=Bt.querySelector(`.${qt}`);Wt&&(Wt.style.minHeight="",Wt.style.height="");const wt=Bt.querySelector(`.${u}-list-col-title`);wt&&(wt.style.transform="")})}),Ct.forEach(Nt=>{const Bt=Array.from(Nt.querySelectorAll("[data-list-col]"));C0(Nt,Bt,qt)}),Re.offsetHeight,Ct.forEach(Nt=>{const Bt=Array.from(Nt.querySelectorAll("[data-list-col]")),Wt=Nt.getBoundingClientRect().top,wt=new Map,W=Bt.map(Fe=>{const yt=Fe.querySelector(`.${u}-list-col-title`),Ot={el:Fe,titleEl:yt,letter:Fe.getAttribute("data-col-letter")??"",kind:Fe.getAttribute("data-valign")??"top",anchor:Fe.getAttribute("data-valign-anchor")};return wt.set(Ot.letter,Ot),Ot}),Te=new Map,ze=(Fe,yt)=>{const Ot=Te.get(Fe.letter);if(Ot!==void 0)return Ot;const ut=Fe.anchor?wt.get(Fe.anchor):void 0;if(Fe.kind!=="baseline"||!ut||yt.has(Fe.letter)){const on=us(Fe,Wt,qt,jt);return Te.set(Fe.letter,on),on}yt.add(Fe.letter);const Tt=ze(ut,yt);yt.delete(Fe.letter);const Yt=us(Fe,Wt,qt,jt),It=Tt-Yt;T0(Fe.titleEl,It);const Zt=us(Fe,Wt,qt,jt);return Te.set(Fe.letter,Zt),Zt};W.forEach(Fe=>ze(Fe,new Set))})};let st=null;const At=()=>{st===null&&(st=requestAnimationFrame(()=>{st=null,nt()}))};nt();const St=new ResizeObserver(()=>At());St.observe(Re);let ht=!1;return typeof document<"u"&&((Dt=document.fonts)!=null&&Dt.ready)&&document.fonts.ready.then(()=>{ht||At()}),()=>{ht=!0,st!==null&&(cancelAnimationFrame(st),st=null),St.disconnect(),tt()}},[mt,ge,e,t,xe,Ye,Qe]);const gt=s.useMemo(()=>g0(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:gt}}),a.jsx("div",{style:D,children:a.jsxs("div",{ref:we,className:`${u}-wrapper ${pe}${qe?` ${qe}`:""}${ge?` ${u}-type-b`:""}`.trim(),style:{width:A.scalingValue(m??0,n)},onMouseMove:J?$t:void 0,onMouseLeave:J?et:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[Ye.map((Re,tt)=>{var St;const nt=(((St=Re.link)==null?void 0:St.length)??0)>0,st=nt&&(!n||i)?"a":"div",At=Dc(tt,Ye.length,Ie,de,lt,S??0,n??!1);return a.jsxs(st,{ref:tt===0?ht=>{Ae.current=ht}:void 0,className:`${u}-list-item${nt||I==="always"?` ${u}-list-item-has-link`:""}${lt&&tt===Ye.length-1?` ${u}-list-item-before-cut`:""}`,...nt?{href:Re.link,target:"_blank"}:{},style:At,onMouseEnter:ht=>{H&&(nt||I==="always")&&Wc(ht,u),J&&ft(Re,ht)},onMouseLeave:ht=>{H&&(nt||I==="always")&&Oc(ht,u)},children:[We>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:ke(We)}}),a.jsxs("div",{className:`${u}-list-cols-row${ge?"":` ${u}-list-cols-row-h`}${p&&tt===0&&ge?` ${u}-list-cols-row-controls`:""}`,...ge?{}:{"data-list-row":""},style:ge?void 0:{minHeight:ke(ct)},children:[Xe.map((ht,Dt)=>{const Ct=Dt===Xe.length-1,qt=Ce[Dt],jt=ht.paddingBottom,Nt=c0(Re.cells[ht.key]),Bt=ge&&Nt&&jt>0,Wt=ge?{minHeight:ke(ct)}:{width:ke(Qe[Dt])},wt=ge?{paddingLeft:ke(ne),paddingRight:ke(ne)}:{paddingLeft:ke(qt.paddingLeft),paddingRight:ke(qt.paddingRight)},W=ht.textPrefix.charAt(0),Te=ge?v0(e[`${ht.textPrefix}VerticalAlign`]):y0(e[`${ht.textPrefix}VerticalAlign`],e,W),ze=ge&&Nt&&p&&tt===0;return ge&&!Nt?null:a.jsxs("div",{className:ge?`${u}-list-col-wrap`:void 0,...ge?{}:{"data-list-col":"","data-col-letter":W,"data-valign":Te.kind,...Te.kind==="baseline"?{"data-valign-anchor":Te.anchorLetter}:{}},children:[a.jsx("div",{className:`${u}-list-col${Ct?` ${u}-list-col-last`:""}`,style:{...wt,...Wt,...ge?{justifyContent:jc(Te.kind)}:{}},"data-test":ht.width,children:a.jsx("span",{className:Gc(e,ht.textPrefix,`${u}-list-col-title`,`${u}-text-tight-leading`),style:{...Vc($a(e,ht.textPrefix),n),...Xc(e,ht.textPrefix,u,n),...ge?{}:b0(Te.kind)},children:Re.cells[ht.key]??null})}),Bt&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:ke(jt)}}),ze&&a.jsx("div",{"data-controls":ht.paddingBottomKey,"data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:ke(Math.max(jt,ps))}})]},ht.key)}),p&&tt===0&&ge&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(q),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:0,width:ke(ue),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(q),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:ke(Math.max(ue,be-ue)),width:ke(ue),height:"100%"}})]})]}),!ge&&Ve>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:ke(Ve)}}),p&&tt===0&&!ge&&a.jsx("div",{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${u}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:ke(ot)}})]},Re.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Pt,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":ge?"center":"left-y",className:`${u}-control-anchor`,style:{top:xt,left:0,width:"100%",height:ke(Math.max(We,ps))}})},"row-padding-handles"),p&&!ge&&Vt&&vt&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Vt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Qe[0]-((Mt==null?void 0:Mt.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":fe??void 0,className:`${u}-control-anchor`,style:{top:0,left:0,width:ke(Gt),height:"100%"}}),a.jsx("div",{"data-controls":vt.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Qe[Xe.length-1]-((Ht==null?void 0:Ht.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":fe??void 0,className:`${u}-control-anchor`,style:{top:0,left:ke(Pe-kt),width:ke(kt),height:"100%"}})]},"column-edge-padding-handles"),p&&!ge&&Xe.slice(0,-1).map((Re,tt)=>{const nt=Xe[tt+1],st=je.slice(0,tt+1).reduce((Ct,qt)=>Ct+qt,0),At=Ce[tt],St=Ce[tt+1],ht=Math.max(At.paddingRight,mo),Dt=Math.max(St.paddingLeft,mo);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Re.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Qe[tt]-At.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":fe??void 0,className:`${u}-control-anchor`,style:{top:0,left:ke(st-ht),width:ke(ht),height:"100%"}}),a.jsx("div",{"data-controls":nt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Qe[tt+1]-St.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":fe??void 0,className:`${u}-control-anchor`,style:{top:0,left:ke(st),width:ke(Dt),height:"100%"}})]},`${Re.paddingRightKey}-padding`)}),p&&!ge&&Xe.slice(0,-1).map((Re,tt)=>{const nt=z0(tt,je,He,be),At=je.slice(0,tt+1).reduce((St,ht)=>St+ht,0)-qc/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Re.widthKey,"data-controls-axis":"x","data-controls-min":String(Bl),"data-controls-max-fraction":String(nt),"data-controls-variant":"column-width",className:`${u}-col-resize-handle`,style:{position:"absolute",top:"0px",left:ke(At),width:ke(qc),height:"calc(100%)",pointerEvents:"auto"}})},`${Re.widthKey}-junction`)})]}),lt&&(()=>{const Re=$a(e,si),tt=S0(e.cutLabelVerticalAlign),nt=Re.textTextAlign==="justify"||ge;return a.jsx("button",{type:"button",className:`${u}-cut-item`,style:{minHeight:ke(R??0),cursor:Ee?"pointer":"default",...d0(de,S??0,n??!1)},onClick:Ee?pt:void 0,onMouseEnter:H||J?Et:void 0,onMouseLeave:H?Xt:void 0,children:a.jsx("div",{className:`${u}-list-cols-row`,style:{...ge?{paddingLeft:ke(ne),paddingRight:ke(ne)}:{},justifyContent:w0(Re.textTextAlign),alignItems:jc(tt)},children:a.jsx("span",{className:Gc(e,si,`${u}-cut-label`,`${u}-text-tight-leading`),style:{...Vc(Re,n),...Xc(e,si,u,n),...nt?{width:"100%"}:{}},children:X})})})})(),J&&ie&&typeof document<"u"&&(()=>{const Re=`${ie.widthPx}px`,tt={width:Re,height:"auto",maxHeight:Re,objectFit:"contain"},nt=(c?document.getElementById(c):null)??document.body;return Un.createPortal(a.jsx("div",{ref:me,className:`${u}-hover-media-anchor`,"data-selection":"none",children:a.jsx(l0,{media:ie,className:ie.isVideo?`${u}-hover-video`:`${u}-hover-image`,style:tt},`${ie.rowId}-${ie.assetId}`)}),nt)})()]})})]})}const q0=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
|
|
10350
10350
|
import { createPortal } from 'react-dom';
|
|
10351
10351
|
import { CommonComponentProps } from '../props';
|
|
10352
10352
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
|
|
@@ -13436,7 +13436,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
13436
13436
|
</>
|
|
13437
13437
|
);
|
|
13438
13438
|
}
|
|
13439
|
-
`,zo=["A","B","C","D","E"],Yc=[...Us,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Ni={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function z0(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Gr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function j0(){return Object.fromEntries(zo.map((e,t)=>{const n=Pi[t],i=`${e} column`;return[n,z0(i)]}))}function V0(){const e={};for(const t of zo)e[`${t}ColumnWidth`]=Gr(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Gr(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Gr(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Gr(`${t} column padding bottom`);return e}function Kc(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Pi]};for(const r of zo)i[`${r}ColumnWidth`]=r==="A"?.0798:.32,i[`${r}ColumnPaddingLeft`]=0,i[`${r}ColumnPaddingRight`]=0,i[`${r}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function G0(e){const t={};if(e===ai)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Us]},enum:[...Us]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Yc],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Yc]}}return t[Kt(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Kt(e,"textFontSettings")]={...Ni.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Kt(e,"textFontSize")]={...Ni.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Kt(e,"textLineHeight")]={...Ni.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Kt(e,"textLetterSpacing")]={...Ni.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Kt(e,"textWordSpacing")]={...Ni.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Kt(e,"textTextAlign")]={...Ni.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Kt(e,"textTextAppearance")]={...Ni.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const X0=xr.reduce((e,t)=>({...e,...G0(t)}),{});function U0(e){return{verticalAlign:e===ai?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===ai?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function q0(e,t={}){var n;return{...U0(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Qc=new Set(["textFontFamily","textFontSettings"]);function Y0(e,t,n){const i=r=>n===void 0?!0:n==="common"?Qc.has(r):!Qc.has(r),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Dl(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Kt(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Kt(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Kt(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Kt(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Kt(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Kt(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Kt(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Kt(e,"textTextAppearance")]=t.textTextAppearance),o}function ga(e={},t){return xr.reduce((n,i)=>({...n,...Y0(i,q0(i,e),t)}),{})}const K0=ga(),Q0=$0();function mp(e){return[Kt(e,"textFontFamily"),Kt(e,"textFontSettings"),Kt(e,"textFontSize"),Kt(e,"textLineHeight"),Kt(e,"textLetterSpacing"),Kt(e,"textWordSpacing"),Kt(e,"textTextAlign"),Kt(e,"textTextAppearance"),`${e}VerticalAlign`]}function Z0(){const e=[];return Ol.forEach((t,n)=>{const i=Pi[n],o=mp(t);for(let r=1;r<Pi.length;r+=1){const l=[{name:"columns",value:r},...Array.from({length:r},(c,d)=>({name:`columnsOrder.${d}`,value:i,isNotEqual:!0}))];o.forEach(c=>{e.push({if:l,then:{name:`properties.${c}.display.visible`,value:!1}})})}}),e}const J0=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];mp(ai);const ex=[...zo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],_i=[{objectFit:"contain",assetId:"01M3QM74XESYN1HRYH9VRTZ5CK"},{objectFit:"contain",assetId:"01M3QM74XEVZ9F59FC7M9BA63Q"},{objectFit:"contain",assetId:"01M3QM74XEE2101QD8PM6E4JSA"},{objectFit:"contain",assetId:"01M3QM74XE20C38X4NND20C5R4"},{objectFit:"contain",assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA"},{objectFit:"contain",assetId:"01M3QM74XEBS5231QA4355P4VQ"},{objectFit:"contain",assetId:"01M3QM74XEWT5YM43KF6PEYRCV"}],tx=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:_i[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:_i[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:_i[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:_i[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:_i[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:_i[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:_i[6],link:""}],nx=[...zo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],ix={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...j0(),image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:tx},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imagePosition:{type:"string",scope:"layout",title:"Image Position",display:{type:"toggle-cycle",enum:["left","center","right","cursor"]}},imageInterpolation:{type:"boolean",scope:"common",title:"Interpolation",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...V0(),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"}},...X0,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",imagePosition:"cursor",imageInterpolation:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...K0,...ga({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Kc({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},...ga({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Kc({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},...ga({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Z0(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...ex.map(e=>({if:{name:"type",value:"b"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"a"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...zo.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}})),{if:{name:"imagePosition",value:"cursor",isNotEqual:!0},then:{name:"properties.imageInterpolation.display.enabled",value:!1}}],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imagePosition","imageInterpolation","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...nx]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"Entries",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"",items:["imagePosition","imageInterpolation"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",Q0]}],paletteBookmark:{items:[...J0],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},ox={element:D0,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>F0(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme-list-default.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...xr.map(e=>({path:`${Kt(e,"textFontFamily")}`}))]},fontRelations:{...xr.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${Kt(t,"textFontFamily")}`}),{})},schema:ix,sourceCode:B0},Zc=300,mi=.004,rx={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"},ax=["hover","focus","filled","success","error"];function sx(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Jc(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function ed(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:k.scalingValue((o-t)/2,i)}}function lx(e){return`
|
|
13439
|
+
`,Vo=["A","B","C","D","E"],Yc=[...Xs,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Wi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function U0(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Gr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Y0(){return Object.fromEntries(Vo.map((e,t)=>{const n=Ei[t],i=`${e} column`;return[n,U0(i)]}))}function K0(){const e={};for(const t of Vo)e[`${t}ColumnWidth`]=Gr(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Gr(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Gr(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Gr(`${t} column padding bottom`);return e}function Kc(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Ei]};for(const r of Vo)i[`${r}ColumnWidth`]=r==="A"?.0798:.32,i[`${r}ColumnPaddingLeft`]=0,i[`${r}ColumnPaddingRight`]=0,i[`${r}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function Q0(e){const t={};if(e===si)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Xs]},enum:[...Xs]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Yc],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Yc]}}return t[Qt(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Qt(e,"textFontSettings")]={...Wi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Qt(e,"textFontSize")]={...Wi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Qt(e,"textLineHeight")]={...Wi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Qt(e,"textLetterSpacing")]={...Wi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Qt(e,"textWordSpacing")]={...Wi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Qt(e,"textTextAlign")]={...Wi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Qt(e,"textTextAppearance")]={...Wi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const Z0=xr.reduce((e,t)=>({...e,...Q0(t)}),{});function J0(e){return{verticalAlign:e===si?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===si?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function ex(e,t={}){var n;return{...J0(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const Qc=new Set(["textFontFamily","textFontSettings"]);function tx(e,t,n){const i=r=>n===void 0?!0:n==="common"?Qc.has(r):!Qc.has(r),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Dl(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Qt(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Qt(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Qt(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Qt(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Qt(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Qt(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Qt(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Qt(e,"textTextAppearance")]=t.textTextAppearance),o}function ga(e={},t){return xr.reduce((n,i)=>({...n,...tx(i,ex(i,e),t)}),{})}const nx=ga(),ix=R0();function xp(e){return[Qt(e,"textFontFamily"),Qt(e,"textFontSettings"),Qt(e,"textFontSize"),Qt(e,"textLineHeight"),Qt(e,"textLetterSpacing"),Qt(e,"textWordSpacing"),Qt(e,"textTextAlign"),Qt(e,"textTextAppearance"),`${e}VerticalAlign`]}function ox(){const e=[];return Ol.forEach((t,n)=>{const i=Ei[n],o=xp(t);for(let r=1;r<Ei.length;r+=1){const l=[{name:"columns",value:r},...Array.from({length:r},(c,d)=>({name:`columnsOrder.${d}`,value:i,isNotEqual:!0}))];o.forEach(c=>{e.push({if:l,then:{name:`properties.${c}.display.visible`,value:!1}})})}}),e}const rx=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];xp(si);const ax=[...Vo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Oi=[{objectFit:"contain",assetId:"01M3QM74XESYN1HRYH9VRTZ5CK"},{objectFit:"contain",assetId:"01M3QM74XEVZ9F59FC7M9BA63Q"},{objectFit:"contain",assetId:"01M3QM74XEE2101QD8PM6E4JSA"},{objectFit:"contain",assetId:"01M3QM74XE20C38X4NND20C5R4"},{objectFit:"contain",assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA"},{objectFit:"contain",assetId:"01M3QM74XEBS5231QA4355P4VQ"},{objectFit:"contain",assetId:"01M3QM74XEWT5YM43KF6PEYRCV"}],sx=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Oi[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Oi[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Oi[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Oi[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Oi[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Oi[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Oi[6],link:""}],lx=[...Vo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],cx={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...Y0(),image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:sx},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imagePosition:{type:"string",scope:"layout",title:"Image Position",display:{type:"toggle-cycle",enum:["left","center","right","cursor"]}},imageInterpolation:{type:"boolean",scope:"common",title:"Interpolation",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...K0(),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"}},...Z0,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",imagePosition:"cursor",imageInterpolation:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...nx,...ga({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Kc({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},...ga({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Kc({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},...ga({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...ox(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...ax.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}},...Vo.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}})),{if:{name:"imagePosition",value:"cursor",isNotEqual:!0},then:{name:"properties.imageInterpolation.display.enabled",value:!1}}],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imagePosition","imageInterpolation","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...lx]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"Entries",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"",items:["imagePosition","imageInterpolation"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",ix]}],paletteBookmark:{items:[...rx],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},dx={element:X0,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>D0(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme-list-default.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...xr.map(e=>({path:`${Qt(e,"textFontFamily")}`}))]},fontRelations:{...xr.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${Qt(t,"textFontFamily")}`}),{})},schema:cx,sourceCode:q0},Zc=300,fi=.004,ux={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"},px=["hover","focus","filled","success","error"];function mx(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Jc(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function ed(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:A.scalingValue((o-t)/2,i)}}function gx(e){return`
|
|
13440
13440
|
.${e}-wrapper {
|
|
13441
13441
|
box-sizing: border-box;
|
|
13442
13442
|
display: flex;
|
|
@@ -13498,7 +13498,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
13498
13498
|
display: flex;
|
|
13499
13499
|
align-items: center;
|
|
13500
13500
|
justify-content: space-between;
|
|
13501
|
-
gap: ${
|
|
13501
|
+
gap: ${mx(20)};
|
|
13502
13502
|
width: 100%;
|
|
13503
13503
|
min-width: 0;
|
|
13504
13504
|
min-height: var(--${e}-question-min-height, unset);
|
|
@@ -13601,7 +13601,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
|
|
|
13601
13601
|
pointer-events: none;
|
|
13602
13602
|
z-index: 2;
|
|
13603
13603
|
}
|
|
13604
|
-
`}function td(e,t,n,i,o,r,l,c){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:r??0,textAppearance:l,color:c??"#000000"}}function
|
|
13604
|
+
`}function td(e,t,n,i,o,r,l,c){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:r??0,textAppearance:l,color:c??"#000000"}}function hx({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r}){const{prefix:l}=A.useScopedStyles(),c=o??!1,{wrapperWidth:d=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:v="solid",entryHoverEffect:x="default",autoclose:m="off",icon:h,iconMaxWidth:b=.00833,iconPaddingRight:S=0,iconAnimation:M="rotate 45",questionColor:y="#000000",answerColor:$="#000000",dividerColor:R="#0000001F",iconColor:X="#000000",questionHoverColor:B="#666666",iconHoverColor:O="#666666",iconActiveColor:N="#000000",dividerHoverColor:z="#000000",questionFontFamily:C,questionFontSettings:I,questionFontSize:j,questionLineHeight:E,questionLetterSpacing:w,questionWordSpacing:L,questionTextAppearance:V,answerFontFamily:_,answerFontSettings:K,answerFontSize:P,answerLineHeight:f,answerLetterSpacing:U,answerWordSpacing:te,answerTextAppearance:ce,questionPaddingLeft:F=0,questionPaddingTop:ie=0,questionPaddingBottom:T=0,answerPaddingLeft:le=0,answerPaddingRight:J=0,answerPaddingTop:Se=0,answerPaddingBottom:Le=0}=e,me=t??[],[ye,ee]=s.useState(()=>new Set),oe=!n||i;s.useEffect(()=>{ee(new Set)},[m]),s.useEffect(()=>{n&&!o&&!i&&ee(new Set)},[n,o,i]);const re=Qe=>A.scalingValue(Qe,n??!1),ge=Math.max(F,fi),we=Math.max(ie,fi),Ae=Math.max(T,fi),fe=Math.max(le,fi),ve=Math.max(J,fi),xe=Math.max(Se,fi),g=Math.max(Le,fi),G=Math.max(0,(d??1)-S-b),Q=Math.max(0,(d??1)-J),ne=Math.max(0,(d??1)-le),ue=Math.max(S,fi),q=Math.max(0,(d??1)-F-b),D=s.useMemo(()=>ye.size===0?0:Math.min(...ye),[ye]),se=s.useCallback(Qe=>ye.has(Qe),[ye]),Y=oe&&x==="default"?`${l}-entry-hover-default`:"",pe=h??"",H=pe!=="",Ie=M.replace(/^rotate /,""),de=`${l}-icon-anim-${Ie}`,Z=pn(nn(td(C,I,j,E,w,L,V,y),n)),Ne=pn(nn(td(_,K,P,f,U,te,ce,$),n)),Oe=Jc(j,E,`${l}-question`,`${l}-text-tight-leading`),Je=Jc(P,f,`${l}-answer-text`,`${l}-text-tight-leading`),De=ed(j,E,l,n),Ze=ed(P,f,l,n),at=A.buildColorVars(l,{questionColor:y,answerColor:$,dividerColor:R,iconColor:X,questionHoverColor:B,iconHoverColor:O,iconActiveColor:N,dividerHoverColor:z},ux,px),Xe=r&&r!=="default"?`${l}-state-${r}`:"",be=s.useCallback(Qe=>{oe&&ee(Ce=>{if(Ce.has(Qe)){const Ue=new Set(Ce);return Ue.delete(Qe),Ue}if(m==="on")return new Set([Qe]);const _e=new Set(Ce);return _e.add(Qe),_e})},[oe,m]),He=s.useMemo(()=>gx(l),[l]),je={[`--${l}-divider-width`]:A.scalingValue(p,n??!1),[`--${l}-divider-style`]:v,[`--${l}-icon-max-width`]:A.scalingValue(b,n??!1),...u>0?{[`--${l}-question-min-height`]:A.scalingValue(u,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:He}}),a.jsx("div",{style:at,children:a.jsx("div",{className:Rt(`${l}-wrapper`,n&&!i&&`${l}-editor`,Y,Xe),style:{width:A.scalingValue(d,n??!1),maxWidth:"100%",...je},children:me.map((Qe,Ce)=>{var qe;const _e=se(Ce),Ue=((qe=Qe.question)==null?void 0:qe.trim())??"",Ye=Qe.answer,lt=((Ye==null?void 0:Ye.length)??0)>0,it=c&&Ce===D;return a.jsxs("div",{className:Rt(`${l}-item`,_e&&`${l}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${l}-question-controls`,children:[it&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"questionPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:re(we)}}),a.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(G),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:re(ge),height:"100%"}}),a.jsx("div",{"data-controls":"iconPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(q),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:re(ue),height:"100%"}})]}),a.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":_e,style:{...Z,...De,paddingLeft:re(F),paddingRight:re(S)},onClick:()=>be(Ce),children:[ie>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:re(ie)},"aria-hidden":"true"}),a.jsxs("span",{className:`${l}-question-row`,children:[a.jsx("span",{className:Oe,children:Ue}),lt&&(H?a.jsx("span",{className:`${l}-icon ${l}-icon-custom ${de}`,"aria-hidden":"true",children:a.jsx(gn,{url:pe,fill:`var(--${l}-icon-color)`,hoverFill:`var(--${l}-icon-hover-color, var(--${l}-icon-color))`,className:`${l}-icon-image`})}):a.jsx("span",{className:`${l}-icon ${l}-icon-default ${de}`,"aria-hidden":"true"}))]}),T>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:re(T)},"aria-hidden":"true"})]}),it&&a.jsx("div",{"data-controls":"questionPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:re(Ae)}})]}),lt&&Ye&&a.jsx("div",{className:`${l}-panel`,"aria-hidden":!_e,children:a.jsx("div",{className:`${l}-panel-inner`,children:a.jsxs("div",{className:`${l}-answer-controls`,children:[it&&_e&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"answerPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:re(xe)}}),a.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Q),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:re(fe),height:"100%"}}),a.jsx("div",{"data-controls":"answerPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ne),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:re(ve),height:"100%"}})]}),Se>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:re(Se)}}),a.jsx("div",{className:`${l}-answer`,style:{...Ne,...Ze,paddingLeft:re(le),paddingRight:re(J)},children:a.jsx("div",{className:Je,children:a.jsx(Zi,{content:Ye})})}),Le>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:re(Le)}}),it&&_e&&a.jsx("div",{"data-controls":"answerPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:re(g)}})]})})})]},Ce)})})})]})}const fx=`import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
13605
13605
|
import cn from 'classnames';
|
|
13606
13606
|
import { CommonComponentProps } from '../props';
|
|
13607
13607
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
|
|
@@ -14349,7 +14349,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
14349
14349
|
</>
|
|
14350
14350
|
);
|
|
14351
14351
|
}
|
|
14352
|
-
`;function gi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const nd={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},ux=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],px={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:gi("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:{...nd.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:{...nd.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:gi("Question Padding Left"),questionPaddingTop:gi("Question Padding Top"),questionPaddingBottom:gi("Question Padding Bottom"),answerPaddingLeft:gi("Answer Padding Left"),answerPaddingRight:gi("Answer Padding Right"),answerPaddingTop:gi("Answer Padding Top"),answerPaddingBottom:gi("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"01M3QM74XGFBPMXNEQB1BXSD9E",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:[...ux],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},mx={element:cx,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/FAQ_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"questionFontFamily"},{path:"answerFontFamily"}]},fontRelations:{questionFontSettings:"questionFontFamily",answerFontSettings:"answerFontFamily"},schema:px,sourceCode:dx},si=e=>e.display==="cover",ja=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},id=100,gx=.2,od=8,gp=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,r]=s.useState(0),[l,c]=s.useState(!1),d=s.useRef(null),u=s.useRef(0);u.current=o;const p=s.useMemo(()=>typeof window>"u"?id:Math.max(id,window.innerHeight*gx),[]),v=s.useCallback($=>Math.max(0,1-$/(p*1.5)),[p]),b=s.useCallback($=>Math.max(0,1-$/(p*.45)),[p]),m=s.useCallback($=>{const E=typeof window<"u"?window.innerHeight:800,j=Math.max(.88,1-$/E*.12);return`translateY(${$}px) scale(${j})`},[]),h=s.useCallback(()=>{d.current=null},[]),x=s.useCallback(()=>{c(!0),r(0),window.setTimeout(()=>c(!1),n),h()},[n,h]),S=s.useCallback(()=>{const $=typeof window<"u"?window.innerHeight:800;c(!0),r($),window.setTimeout(()=>{t(),h(),c(!1)},Math.min(n,200))},[n,t,h]),P=s.useCallback($=>{!e||l||$.pointerType==="touch"&&(i!=null&&i($.target)||(d.current={startX:$.clientX,startY:$.clientY,isLocked:null,pointerId:$.pointerId}))},[e,l,i]),f=s.useCallback($=>{const E=d.current;if(!e||!E||$.pointerType!=="touch"||E.pointerId!==$.pointerId)return;const j=$.clientX-E.startX,L=$.clientY-E.startY;if(E.isLocked===null){if(Math.abs(j)<od&&Math.abs(L)<od)return;if(L>0&&L>Math.abs(j))E.isLocked=!0,$.currentTarget.setPointerCapture($.pointerId);else{E.isLocked=!1,h();return}}if(!E.isLocked)return;$.preventDefault();const C=Math.max(0,L);u.current=C,r(C)},[e,h]),w=s.useCallback($=>{const E=d.current;if(!e||!E||$.pointerType!=="touch"||E.pointerId!==$.pointerId)return;const j=E.isLocked===!0;if($.currentTarget.hasPointerCapture($.pointerId)&&$.currentTarget.releasePointerCapture($.pointerId),!j){h();return}$.clientY-E.startY>=p?S():x()},[p,S,e,h,x]),N=s.useCallback($=>{w($)},[w]),V=s.useCallback($=>{w($)},[w]),B=o>0,H=l?`transform ${n}ms ease`:"none",_=l?`opacity ${n}ms ease`:"none",z=o>0||l;return{isSwipeDragging:B,backdropStyle:{opacity:v(o),transition:_},mediaAreaStyle:{transform:m(o),transition:H,touchAction:B?"none":void 0,willChange:B?"transform":void 0},overlayContentStyle:z?{opacity:b(o),transition:_}:void 0,swipeHandlers:e?{onPointerDown:P,onPointerMove:f,onPointerUp:N,onPointerCancel:V}:{},dismissAreaStyle:e?{touchAction:B?"none":"pan-x"}:void 0}},hx="[data-lightbox-scrollable]",jl=(e=!0)=>{s.useEffect(()=>{if(!e)return;const t=window.scrollY,n=document.body.style.overflow,i=document.body.style.position,o=document.body.style.top,r=document.body.style.width,l=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${t}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const c=d=>{const u=d.target;u instanceof Element&&u.closest(hx)||d.preventDefault()};return document.addEventListener("touchmove",c,{passive:!1}),()=>{document.removeEventListener("touchmove",c),document.body.style.overflow=n,document.body.style.position=i,document.body.style.top=o,document.body.style.width=r,document.documentElement.style.overflow=l,window.scrollTo({top:t,left:0,behavior:"instant"})}},[e])},fx=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},yx=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},vx=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},xx=(e,t,n,{duration:i,easing:o,onComplete:r})=>{const l=e.scrollLeft,c=n-l,d=l-n,u=(h,x)=>{yx(t),e.scrollLeft=h,x&&(r==null||r())};if(Math.abs(c)<.5)return u(n,!0),()=>{};let p=!1,v=0;const b=()=>{t.removeEventListener("transitionend",m),clearTimeout(v)},m=h=>{h.target!==t||h.propertyName!=="transform"||p||(p=!0,b(),u(n,!0))};return t.addEventListener("transitionend",m),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${d}px, 0, 0)`,v=window.setTimeout(()=>{p||(p=!0,b(),u(n,!0))},i+64),()=>{p||(p=!0,b(),u(l-vx(t),!1))}},cr=300,bx=900,Sx=1500,wx="cubic-bezier(0.16, 1, 0.3, 1)",$x=3e3,Cx=2,Tx=16,Ix=.05,Lx=1,Xr=.3,Px=50,Rx=20,oo=.004,Ao=["title1","title2","title3"],Mx={title1:"1",title2:"2",title3:"3"},Ex={title1:"title1Color",title2:"title2Color",title3:"title3Color"},kx={title1:.02,title2:.02,title3:.02},Ur=e=>`max(${e}, ${Rx}px)`,Ax=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]}},Fx=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=Ax(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Qt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Nx=e=>[Qt(e,"fontFamily"),Qt(e,"fontSettings"),{type:"row",items:[Qt(e,"fontSize"),Qt(e,"lineHeight"),Qt(e,"letterSpacing"),Qt(e,"wordSpacing")]},Qt(e,"textAlign"),Qt(e,"textAppearance")],_x=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Ao.map(e=>[Mx[e],Nx(e)]))}),Vl=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},c)=>{if(r<=0||c<=0)return{overflow:r,widths:[c,...l]};const d=Math.min(r,c);return{overflow:r-d,widths:[c-d,...l]}},{overflow:i-1,widths:[]});return o},hp=(e,t)=>Vl(e,t),qr=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},rd=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Vl(e.length,n),effective:hp(e.length,n)}},Hx=(e,t,n,i,o,r,l)=>{const c=[];return t&&c.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&c.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:r,text:n}),i&&c.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),c},gs=(e,t)=>{const n=i=>{const o=Qt(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[Ex[t]]}},Wx=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),hs=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??kx[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return en(i,n)},Ox=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l})=>{const{backgroundColor:c,thumbnailSize:d,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:v,closeIcon:b,closeIconMaxWidth:m,closeIconColor:h,closeIconHoverColor:x,thumbnailTrigger:S,thumbnailVisibility:P,thumbnailObjectFit:f,thumbnailActive:w,thumbnailActiveColor:N,title1Width:V,title2Width:B,title3Width:H,title1MarginLeft:_=0,title2MarginLeft:z=0,title3MarginLeft:$=0,titleRowMarginBottom:E=0,titleHeaderLayout:j="desktop",contentMarginTop:L,iconMarginLeft:C}=n,T=M=>k.scalingValue(M,i??!1),G=d??n.thumnailSize??.03,A=T(G),Y=T(u),R=T(p??.02),y=T(v??0),U=T(L??0),ee=Ur(U),de=T(C??0),[F,ie]=s.useState(0),I=s.useRef(F);I.current=F;const se=t[F],{title1:J,title2:Se,title3:Re}=Fx(se),pe=hs("title1",gs(n,"title1"),i),he=hs("title2",gs(n,"title2"),i),te=hs("title3",gs(n,"title3"),i),le=j==="mobile",re=!o&&(!i||r),fe=re,xe=re,Te=re,me=si(f),be=me?{"--image-aspect-ratio":ja(f)}:void 0,we=!!(J||Se||Re),g=s.useMemo(()=>Hx(e,J,Se,Re,pe,he,te),[e,F,J,Se,Re,pe,he,te]),X=s.useMemo(()=>({title1Width:V,title2Width:B,title3Width:H}),[V,B,H]),Z=s.useMemo(()=>g.map(M=>X[M.widthKey]),[g,X]),ne=s.useMemo(()=>Vl(g.length,Z),[g.length,Z]),ye=s.useMemo(()=>hp(g.length,Z),[g.length,Z]),K=s.useMemo(()=>g.filter(M=>M.prefix==="title1"),[g]),D=s.useMemo(()=>g.filter(M=>M.prefix==="title2"||M.prefix==="title3"),[g]),ce=s.useMemo(()=>rd(K,X),[K,X]),q=s.useMemo(()=>rd(D,X),[D,X]),ue=s.useCallback((M,oe)=>{const ge=g.indexOf(M);if(!le||oe==="single-row")return{effectiveWidth:ye[ge]??0,resolvedWidth:ne[ge]??0,maxWidth:qr(ge,ne)};if(oe==="two-row-top"){const Ge=K.indexOf(M);return{effectiveWidth:ce.effective[Ge]??0,resolvedWidth:ce.resolved[Ge]??0,maxWidth:qr(Ge,ce.resolved)}}const Ee=D.indexOf(M);return{effectiveWidth:q.effective[Ee]??0,resolvedWidth:q.resolved[Ee]??0,maxWidth:qr(Ee,q.resolved)}},[D,q,ye,ne,g,K,ce,le]),W=s.useCallback(M=>k.scalingValue(M,i??!1),[i]),Le=W(E??0),ae=s.useMemo(()=>({title1MarginLeft:_,title2MarginLeft:z,title3MarginLeft:$}),[_,z,$]),Q=s.useCallback(M=>g.slice(0,M+1).reduce((oe,ge,Ee)=>oe+(ge!=null&&ge.marginLeftKey?ae[ge.marginLeftKey]??0:0)+(ne[Ee]??0),0)+(le?0:_??0),[g,ae,ne,le,_]),Ne=s.useCallback(()=>le?0:_??0,[le,_]),Oe=s.useCallback(M=>D.slice(0,M).reduce((oe,ge,Ee)=>oe+(ge.marginLeftKey?ae[ge.marginLeftKey]??0:0)+(q.resolved[Ee]??0),0),[D,q.resolved,ae]),it=s.useCallback(M=>{const oe=D[M];return Oe(M)+(oe.marginLeftKey?ae[oe.marginLeftKey]??0:0)+(q.resolved[M]??0)},[D,q.resolved,Oe,ae]),qe=(M,oe)=>{const ge=M.marginLeftKey?ae[M.marginLeftKey]??0:0,{effectiveWidth:Ee,resolvedWidth:Ge,maxWidth:pt}=ue(M,oe),Ft=o&&oe==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":M.prefix,style:{...oe==="single-row"?{gridArea:M.prefix}:{},width:W(Ee),...ge>0?{marginLeft:W(ge)}:{}},children:[a.jsx("p",{className:M.className,style:M.style,children:M.text}),Ft&&M.marginLeftKey&&a.jsx("div",{"data-controls":M.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ge),style:{position:"absolute",top:0,left:W(-ge),width:`max(${W(ge)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Ft&&a.jsx("div",{"data-controls":M.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(pt),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:W(-oo/2),width:W(oo),height:"100%",pointerEvents:"auto"}})]},M.className)},Je=()=>{const M=le?-1:g.findIndex(Ee=>Ee.prefix==="title1"),oe=!le&&(o||(_??0)>0)?(()=>{const Ee=_??0,Ge=M>=0?ne[M]:V??0;return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ge),style:{position:"absolute",top:0,left:0,width:`max(${W(Ee)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,ge=g.flatMap((Ee,Ge)=>{if(!Ee.marginLeftKey)return[];const pt=ae[Ee.marginLeftKey]??0,Ft=Wx(g,ne,ae,Ge)+Ne();return a.jsx("div",{"data-controls":Ee.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ne[Ge]),style:{position:"absolute",top:0,left:W(Ft),width:`max(${W(pt)}, 10px)`,height:"100%",pointerEvents:"auto"}},Ee.marginLeftKey)});return oe?[oe,...ge]:ge},ot=()=>g.map((M,oe)=>{const ge=qr(oe,ne),Ge=Q(oe)-oo/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":M.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ge),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:W(Ge),width:W(oo),height:"100%",pointerEvents:"auto"}})},`${M.widthKey}-junction`)}),Ve=()=>D.flatMap((M,oe)=>{if(!M.marginLeftKey)return[];const ge=ae[M.marginLeftKey]??0,Ee=Oe(oe),{resolvedWidth:Ge}=ue(M,"two-row-bottom");return a.jsx("div",{"data-controls":M.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ge),style:{position:"absolute",top:0,left:W(Ee),width:`max(${W(ge)}, 10px)`,height:"100%",pointerEvents:"auto"}},M.marginLeftKey)}),ve=()=>D.map((M,oe)=>{const{maxWidth:ge}=ue(M,"two-row-bottom"),Ge=it(oe)-oo/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":M.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ge),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:W(Ge),width:W(oo),height:"100%",pointerEvents:"auto"}})},`${M.widthKey}-junction`)}),Fe=s.useRef(null),Xe=s.useRef(null),Ye=s.useRef(null),Pe=s.useRef(null),_e=s.useRef([]),Ke=s.useRef([]),Ze=s.useRef(0),st=s.useRef(null),Ue=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),De=s.useRef(null),ke=s.useRef(null),ht=s.useRef(0),Be=s.useRef("forward"),ze=s.useRef(0),We=s.useRef(null),mt=s.useRef(!1),rt=t.length>1&&(!o||!!r),St=rt?3:1,Nt=s.useMemo(()=>Array.from({length:St},()=>t).flat(),[t,St]),[jt,xt]=s.useState(!1),[Ce,He]=s.useState(!1),[lt,et]=s.useState(!0),yt=s.useRef(null),Rt=s.useRef(null),At=s.useRef(!1),qt=s.useRef(!1),$t=s.useRef(null),zt=s.useRef(null),on=fe&&!lt,vt=s.useCallback(()=>{fe&&(et(!0),zt.current&&clearTimeout(zt.current),zt.current=setTimeout(()=>{Ue.current.isActive||et(!1)},$x))},[fe]),ft=s.useCallback(()=>{o||qt.current||(qt.current=!0,He(!1),$t.current=setTimeout(()=>{l()},cr))},[o,l]),Me=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":on?"true":"false",style:{width:k.scalingValue(m??0,i),height:k.scalingValue(m??0,i),marginRight:de,"--close-icon-hover-color":x},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:ft,"aria-label":"Close",children:a.jsx(mn,{url:b,fill:h,hoverFill:i&&!r?h:x,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:de,height:"100%",pointerEvents:"auto"}})]}),nt=(M="two-row")=>a.jsx("div",{...M==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:W(_??0),flexShrink:0,...M==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...M==="two-row"&&o?{pointerEvents:"auto"}:{}}}),ct=()=>{const M=g.find(Ee=>Ee.prefix==="title1"),oe=g.filter(Ee=>Ee.prefix==="title2"||Ee.prefix==="title3"),ge=oe.length>0||o||(E??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(_??0)>0||o?nt():null,M&&qe(M,"two-row-top"),b&&Me()]}),ge?a.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[oe.length>0?a.jsxs("div",{className:`${e}-header-row-bottom`,children:[oe.map(Ee=>qe(Ee,"two-row-bottom")),o&&a.jsxs(a.Fragment,{children:[Ve(),ve()]})]}):null,a.jsx("div",{"data-controls":o?"titleRowMarginBottom":void 0,"data-controls-axis":o?"y":void 0,"data-controls-reverse":o?"":void 0,className:o?`${e}-control`:void 0,style:{height:Le,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},gt=()=>a.jsxs(a.Fragment,{children:[(_??0)>0||o?nt("single-row"):null,g.map(M=>qe(M,"single-row")),o?a.jsxs(a.Fragment,{children:[Je(),ot()]}):null,b?Me():null]}),Et=s.useCallback(M=>!!(M.closest("[data-controls]")||M.closest(`.${e}-thumbnails`)||M.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:wt,backdropStyle:dt,mediaAreaStyle:Ot,overlayContentStyle:Lt,swipeHandlers:Ht,dismissAreaStyle:Gt}=gp({enabled:re??!1,onClose:ft,animMs:cr,isBlockedTarget:Et}),_t=()=>{if(!rt||t.length===0)return Ze.current=0,0;const M=Ke.current[0],oe=Ke.current[t.length];if(!M||!oe)return Ze.current;const ge=oe.offsetLeft-M.offsetLeft;return ge>0&&(Ze.current=ge),Ze.current},Vt=(M=!1)=>{if(!rt)return;const oe=Xe.current,ge=_t();!oe||ge<=0||ge<oe.clientWidth*.25||(oe.scrollLeft<=0?(oe.scrollLeft+=ge,M&&(Ue.current.scrollLeft+=ge),mt.current&&(ze.current+=ge)):oe.scrollLeft>=ge*2&&(oe.scrollLeft-=ge,M&&(Ue.current.scrollLeft-=ge),mt.current&&(ze.current-=ge)))},Dt=(M,oe=(ge=>(ge=Xe.current)==null?void 0:ge.scrollLeft)()??0)=>{if(!rt)return M;let Ee=t.length+M,Ge=1/0;for(let pt=0;pt<St;pt++){const Ft=pt*t.length+M,Xt=Ke.current[Ft];if(!Xt)continue;const rn=Math.abs(Xt.offsetLeft-oe);rn<Ge&&(Ge=rn,Ee=Ft)}return Ee},Ct=M=>{const oe=Xe.current;return!M||!oe?!1:M.offsetWidth>oe.clientWidth+1},O=M=>{const oe=Xe.current;if(!M||!oe||!Ct(M))return!1;const ge=M.offsetLeft,Ee=ge+M.offsetWidth;return oe.scrollLeft>=ge-1&&oe.scrollLeft+oe.clientWidth<=Ee+1},Ie=(M=(oe=>(oe=Xe.current)==null?void 0:oe.scrollLeft)()??0)=>{for(let Ee=0;Ee<Ke.current.length;Ee+=1){const Ge=Ke.current[Ee];if(Ge&&O(Ge))return Ee}let ge={flatIndex:0,distance:1/0};return Ke.current.forEach((Ee,Ge)=>{if(!Ee)return;const pt=Math.abs(Ee.offsetLeft-M);pt<ge.distance&&(ge={flatIndex:Ge,distance:pt})}),ge.flatIndex},je=M=>{Xe.current&&Ke.current.forEach(oe=>{oe&&(oe.style.scrollSnapAlign=Ct(oe)&&M==="backward"?"end":"start")})},Ae=(M,oe,ge)=>{const Ee=M-oe,Ge=Ie(oe),pt=Ke.current[Ge];if(O(pt))return Ie(M)%t.length;const Ft=Ke.current[Ge+1],Xt=pt?Ft?Ft.offsetLeft-pt.offsetLeft:pt.offsetWidth:0,rn=Xt>0?Ee>Xt*Xr?1:Ee<-Xt*Xr?-1:0:0;return rn===0?ge:rt?(ge+rn+t.length)%t.length:Math.max(0,Math.min(t.length-1,ge+rn))},tt=s.useCallback((M=!1)=>{if(P!=="on"||o)return;const oe=Pe.current,ge=I.current,Ee=_e.current[ge];if(!oe||!Ee||oe.scrollWidth<=oe.clientWidth)return;const Ge=oe.scrollLeft,pt=Ge+oe.clientWidth,Ft=Ee.offsetLeft,Xt=Ft+Ee.offsetWidth;if(Ft>=Ge&&Xt<=pt)return;const rn=oe.scrollWidth-oe.clientWidth;let Zt=Ge;if(!M&&yt.current===null){const ui=_e.current[ge-1],En=_e.current[ge+1],Qn=ui?Ee.offsetLeft-ui.offsetLeft:En?En.offsetLeft-Ee.offsetLeft:Ee.offsetWidth;Xt>pt?Zt+=Qn:Ft<Ge&&(Zt-=Qn)}else Xt>pt?Zt=Xt-oe.clientWidth:Zt=Ft;oe.scrollLeft=Math.max(0,Math.min(rn,Zt))},[o,P]),Mt=s.useCallback((M=!1)=>{M&&(At.current=!0),Rt.current===null&&(Rt.current=requestAnimationFrame(()=>{Rt.current=null;const oe=At.current;At.current=!1,tt(oe)}))},[tt]),ut=s.useCallback(M=>{if(M===I.current)return;const oe=I.current;I.current=M;const ge=Math.abs(M-oe)>1,Ee=rt&&t.length>1&&(oe===t.length-1&&M===0||oe===0&&M===t.length-1);ie(M),Mt(ge||Ee)},[t.length,rt,Mt]),Tt=()=>{if(!Xe.current||t.length===0||yt.current!==null||Ue.current.isActive&&Ue.current.hasMoved)return;const M=Xe.current.scrollLeft,oe=Ie(M)%t.length;oe!==I.current&&ut(oe)},Ut=()=>{yt.current=null},Wt=M=>{const oe=Xe.current;oe&&(oe.style.scrollSnapType=M?"":"none")},an=()=>{var M;(M=ke.current)==null||M.call(ke),ke.current=null},cn=()=>{We.current!==null&&(cancelAnimationFrame(We.current),We.current=null),mt.current=!1},qn=()=>{const M=Xe.current;if(!M){We.current=null,mt.current=!1;return}const oe=ze.current-M.scrollLeft;if(Math.abs(oe)<.5){M.scrollLeft=ze.current,Vt(),Tt(),We.current=null,mt.current=!1;return}M.scrollLeft+=oe*Ix,Vt(),Tt(),vt(),We.current=requestAnimationFrame(qn)},Yn=()=>{const M=Ye.current;M&&(M.style.transition="",M.style.transform="",M.style.willChange="")},Qi=(M,oe,ge,Ee)=>{Yn(),M.scrollLeft=oe,ht.current=M.scrollLeft,Vt(),ge!==void 0?(I.current=ge,ie(ge)):Tt(),Wt(!0),Ee==null||Ee()},hn=(M,{behavior:oe="smooth",activeIndex:ge,onComplete:Ee}={})=>{const Ge=Xe.current,pt=Ye.current;if(!Ge||!pt)return;if(cn(),an(),Wt(!1),oe==="auto"){Qi(Ge,M,ge,Ee);return}const Ft=Math.abs(M-Ge.scrollLeft),Xt=fx(Ft,bx,Sx,Ge.clientWidth*.55);ke.current=xx(Ge,pt,M,{duration:Xt,easing:wx,onComplete:()=>{ke.current=null,Qi(Ge,M,ge,Ee)}})},Vo=(M="smooth")=>{const oe=Xe.current;if(!oe||t.length===0)return;const ge=Ie()%t.length,Ee=Dt(ge,oe.scrollLeft),Ge=Ke.current[Ee];Ge&&hn(Ge.offsetLeft,{behavior:M,activeIndex:ge})},Go=(M,oe="smooth",ge,Ee)=>{const Ge=Xe.current;if(!Ge||t.length===0)return;const pt=(Ee??Ge.scrollLeft)-M,Ft=Ie(M),Xt=Ke.current[Ft];if(O(Xt)){Wt(!0),Tt();return}const rn=Ke.current[Ft+1],Zt=Xt?rn?rn.offsetLeft-Xt.offsetLeft:Xt.offsetWidth:0;if((Zt>0?pt>Zt*Xr?1:pt<-Zt*Xr?-1:0:0)!==0){const Kl=ge??Ft%t.length,Xo=Ae(Ee??Ge.scrollLeft,M,Kl);xn(Xo,oe);return}const En=Ee??Ge.scrollLeft,Qn=Ie(En),kr=Ke.current[Qn];if(kr&&Math.abs(kr.offsetLeft-En)<1){Wt(!0),Tt();return}Vo("auto")},xn=(M,oe="smooth")=>{const ge=Xe.current;if(!ge||t.length===0)return;const Ee=Dt(M,ge.scrollLeft),Ge=Ke.current[Ee];Ge&&(oe==="smooth"?yt.current=M:yt.current=null,I.current=M,ie(M),Mt(!0),hn(Ge.offsetLeft,{behavior:oe,activeIndex:M,onComplete:oe==="smooth"?Ut:void 0}))},di=()=>{De.current&&(window.removeEventListener("pointerup",De.current),window.removeEventListener("pointercancel",De.current),De.current=null)},Zi=(M,oe,ge,Ee,Ge)=>{const pt=ge-M,Ft=Ee-oe,Xt=Math.abs(pt),rn=Math.abs(Ft);if(Xt<Px||Xt<=rn)return!1;const Zt=pt<0?1:-1,ui=rt?(Ge+Zt+t.length)%t.length:Math.max(0,Math.min(t.length-1,Ge+Zt));return ui===Ge?!1:(xn(ui),!0)},bn=M=>{if(!Ue.current.isActive)return;di();const oe=Xe.current;if(!oe)return;const{scrollLeft:ge,startActiveIndex:Ee,hasMoved:Ge}=Ue.current,pt=oe.scrollLeft;Vt(!0),Ue.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},xt(!1),M!==void 0&&oe.hasPointerCapture(M)&&oe.releasePointerCapture(M),Ge?Go(ge,"smooth",Ee,pt):(Wt(!0),Tt()),vt()},Kn=(M,oe)=>{const ge=st.current;st.current=null,ge&&(Zi(ge.startX,ge.startY,M,oe,ge.startActiveIndex),vt())},Ji=M=>{if(!xe)return;if(M.pointerType==="touch"){if(cn(),Wt(!0),Et(M.target))return;st.current={startX:M.clientX,startY:M.clientY,startActiveIndex:I.current};return}if(M.pointerType!=="mouse"||M.button!==0||Et(M.target))return;const oe=Xe.current;if(!oe)return;cn(),an(),Yn(),yt.current=null,Ue.current={isActive:!0,startX:M.clientX,scrollLeft:oe.scrollLeft,startActiveIndex:I.current,hasMoved:!1},Wt(!1),vt(),oe.setPointerCapture(M.pointerId),di();const ge=Ee=>{Ee.pointerType==="mouse"&&bn(Ee.pointerId)};De.current=ge,window.addEventListener("pointerup",ge),window.addEventListener("pointercancel",ge)},eo=M=>{if(!xe||M.pointerType!=="mouse")return;const oe=Xe.current;if(!oe||!Ue.current.isActive)return;if(M.buttons===0){bn(M.pointerId);return}const ge=M.clientX-Ue.current.startX;Math.abs(ge)>Lx&&(Ue.current.hasMoved=!0,xt(!0)),Ue.current.hasMoved&&(M.preventDefault(),oe.scrollLeft=Ue.current.scrollLeft-ge,Vt(!0),Tt(),vt())},$e=M=>{if(xe){if(M.pointerType==="touch"){M.type==="pointerup"?Kn(M.clientX,M.clientY):st.current=null;return}M.pointerType==="mouse"&&bn(M.pointerId)}},Qe=M=>{!xe||M.pointerType!=="mouse"||bn(M.pointerId)};return jl(),s.useEffect(()=>{const M=requestAnimationFrame(()=>He(!0));return()=>{cancelAnimationFrame(M),an(),di(),Rt.current!==null&&(cancelAnimationFrame(Rt.current),Rt.current=null),$t.current&&clearTimeout($t.current),zt.current&&clearTimeout(zt.current)}},[]),s.useEffect(()=>{if(!fe){et(!0);return}vt();const M=()=>vt();return document.addEventListener("pointermove",M,{passive:!0}),document.addEventListener("pointerdown",M,{passive:!0}),()=>{document.removeEventListener("pointermove",M),document.removeEventListener("pointerdown",M),zt.current&&clearTimeout(zt.current)}},[fe,vt]),s.useEffect(()=>{const M=oe=>{oe.key==="Escape"&&ft()};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[ft]),s.useLayoutEffect(()=>{_t()},[y,t.length,rt]),s.useLayoutEffect(()=>{o||xn(I.current,"auto")},[y,o]),s.useLayoutEffect(()=>{xn(0,"auto")},[t.length,rt]),s.useEffect(()=>{const M=Xe.current;if(!M||o||!re)return;const oe=ge=>{if(ge.preventDefault(),Math.abs(ge.deltaY)<=Math.abs(ge.deltaX))return;const Ee=ge.deltaMode===1?Tx:ge.deltaMode===2?M.clientHeight:1,Ge=ge.deltaY*Ee*Cx;if(Ge!==0){if(an(),mt.current||(mt.current=!0,ze.current=M.scrollLeft,yt.current=null,Wt(!1)),ze.current+=Ge,!rt){const pt=M.scrollWidth-M.clientWidth;ze.current=Math.max(0,Math.min(pt,ze.current))}vt(),We.current===null&&(We.current=requestAnimationFrame(qn))}};return M.addEventListener("wheel",oe,{passive:!1}),()=>{M.removeEventListener("wheel",oe),cn()}},[o,re,rt]),s.useEffect(()=>{const M=Xe.current;if(!M)return;const oe=()=>{Vt(Ue.current.isActive);const Ee=M.scrollLeft,Ge=Ee-ht.current;ht.current=Ee;const pt=Ze.current>0?Ze.current*.5:1/0;if(Ge!==0&&Math.abs(Ge)<pt){const Ft=Ge>0?"forward":"backward";Ft!==Be.current&&(Be.current=Ft,je(Ft))}Ue.current.isActive&&Ue.current.hasMoved||Tt()};M.addEventListener("scroll",oe,{passive:!0});const ge=new ResizeObserver(()=>{_t(),Vt(Ue.current.isActive),je(Be.current),Tt()});return ge.observe(M),()=>{an(),M.removeEventListener("scroll",oe),ge.disconnect()}},[t.length,rt]),a.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{wt||ft()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:Ce?1:0,transition:`opacity ${cr}ms ease`,pointerEvents:Ce?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:c,...dt}}),a.jsxs("div",{ref:Fe,className:`${e}-lightbox-dismiss-area`,style:Gt,...Ht,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Ot,onClick:M=>M.stopPropagation(),children:a.jsx("div",{ref:Xe,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":xe&&t.length>0?"true":"false","data-mouse-dragging":jt?"true":"false",onPointerDown:Ji,onPointerMove:eo,onPointerUp:$e,onPointerCancel:$e,onLostPointerCapture:Qe,children:a.jsx("div",{ref:Ye,className:`${e}-lightbox-strip-track`,style:{gap:y},children:Nt.map((M,oe)=>{const ge=M.image.objectFit??"contain",Ee=oe%t.length,Ge=Math.floor(oe/t.length),pt=Ur(y),Ft=`calc(-0.5 * (${pt} + ${y}))`;return a.jsxs("div",{ref:Xt=>Ke.current[oe]=Xt,className:`${e}-strip-item`,style:{height:j==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[a.jsx("img",{src:M.image.assetId,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:ge}}),o&&Ee<t.length-1&&Ge===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Ft,width:pt,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Ge}-${M.image.assetId}-${Ee}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":on?"true":"false",style:Lt,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:U,flexShrink:0,pointerEvents:"none"},children:o&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-handle-left-fraction":"0.05",style:{position:"absolute",left:0,right:0,top:0,height:ee,pointerEvents:"auto",zIndex:3}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:a.jsx("div",{className:`${e}-lightbox-content-area${le?` ${e}-lightbox-content-area-stacked`:""}`,children:(we||b)&&a.jsx("div",{className:`${e}-header ${le?`${e}-header-two-row`:`${e}-header-single-row`}`,children:le?ct():we||b?gt():null})})})]}),t.length>1&&P==="on"&&(()=>{const M=Ur(R),oe=`calc(-0.5 * (${R} + ${M}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:R},children:a.jsx("div",{ref:Pe,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:ge=>ge.stopPropagation(),children:a.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":w,style:{gap:Y,"--thumbnail-active-color":N},children:[t.map((ge,Ee)=>{const Ge=Ur(Y),pt=`calc(-0.5 * (${Ge} + ${Y}))`;return a.jsxs("div",{ref:Ft=>{_e.current[Ee]=Ft},style:{position:"relative",flex:"0 0 auto"},children:[a.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":F===Ee?"true":"false",onClick:()=>re&&S==="click"&&xn(Ee),onMouseEnter:()=>Te&&S==="hover"&&xn(Ee),"aria-label":ge.image.name?`View ${ge.image.name}`:`View image ${Ee+1}`,"aria-current":F===Ee?"true":void 0,children:a.jsx("img",{className:`${e}-thumb-image${me?` ${e}-thumb-image-cover`:""}`,src:ge.image.assetId,alt:"",draggable:!1,style:{...be,maxWidth:A,maxHeight:A,width:f.display==="cover"?"auto":"100%",height:"auto",objectFit:f.display==="cover"?"cover":"contain"}})}),o&&Ee<t.length-1&&a.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:pt,width:Ge,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${ge.image.assetId}-${Ee}`)}),o&&a.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:oe,height:M,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Dx(e){return`
|
|
14352
|
+
`;function yi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const nd={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},yx=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],vx={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:yi("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:{...nd.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:{...nd.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:yi("Question Padding Left"),questionPaddingTop:yi("Question Padding Top"),questionPaddingBottom:yi("Question Padding Bottom"),answerPaddingLeft:yi("Answer Padding Left"),answerPaddingRight:yi("Answer Padding Right"),answerPaddingTop:yi("Answer Padding Top"),answerPaddingBottom:yi("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"01M3QM74XGFBPMXNEQB1BXSD9E",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:[...yx],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},xx={element:hx,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/FAQ_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"questionFontFamily"},{path:"answerFontFamily"}]},fontRelations:{questionFontSettings:"questionFontFamily",answerFontSettings:"answerFontFamily"},schema:vx,sourceCode:fx},li=e=>e.display==="cover",ja=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},id=100,bx=.2,od=8,bp=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,r]=s.useState(0),[l,c]=s.useState(!1),d=s.useRef(null),u=s.useRef(0);u.current=o;const p=s.useMemo(()=>typeof window>"u"?id:Math.max(id,window.innerHeight*bx),[]),v=s.useCallback(C=>Math.max(0,1-C/(p*1.5)),[p]),x=s.useCallback(C=>Math.max(0,1-C/(p*.45)),[p]),m=s.useCallback(C=>{const I=typeof window<"u"?window.innerHeight:800,j=Math.max(.88,1-C/I*.12);return`translateY(${C}px) scale(${j})`},[]),h=s.useCallback(()=>{d.current=null},[]),b=s.useCallback(()=>{c(!0),r(0),window.setTimeout(()=>c(!1),n),h()},[n,h]),S=s.useCallback(()=>{const C=typeof window<"u"?window.innerHeight:800;c(!0),r(C),window.setTimeout(()=>{t(),h(),c(!1)},Math.min(n,200))},[n,t,h]),M=s.useCallback(C=>{!e||l||C.pointerType==="touch"&&(i!=null&&i(C.target)||(d.current={startX:C.clientX,startY:C.clientY,isLocked:null,pointerId:C.pointerId}))},[e,l,i]),y=s.useCallback(C=>{const I=d.current;if(!e||!I||C.pointerType!=="touch"||I.pointerId!==C.pointerId)return;const j=C.clientX-I.startX,E=C.clientY-I.startY;if(I.isLocked===null){if(Math.abs(j)<od&&Math.abs(E)<od)return;if(E>0&&E>Math.abs(j))I.isLocked=!0,C.currentTarget.setPointerCapture(C.pointerId);else{I.isLocked=!1,h();return}}if(!I.isLocked)return;C.preventDefault();const w=Math.max(0,E);u.current=w,r(w)},[e,h]),$=s.useCallback(C=>{const I=d.current;if(!e||!I||C.pointerType!=="touch"||I.pointerId!==C.pointerId)return;const j=I.isLocked===!0;if(C.currentTarget.hasPointerCapture(C.pointerId)&&C.currentTarget.releasePointerCapture(C.pointerId),!j){h();return}C.clientY-I.startY>=p?S():b()},[p,S,e,h,b]),R=s.useCallback(C=>{$(C)},[$]),X=s.useCallback(C=>{$(C)},[$]),B=o>0,O=l?`transform ${n}ms ease`:"none",N=l?`opacity ${n}ms ease`:"none",z=o>0||l;return{isSwipeDragging:B,backdropStyle:{opacity:v(o),transition:N},mediaAreaStyle:{transform:m(o),transition:O,touchAction:B?"none":void 0,willChange:B?"transform":void 0},overlayContentStyle:z?{opacity:x(o),transition:N}:void 0,swipeHandlers:e?{onPointerDown:M,onPointerMove:y,onPointerUp:R,onPointerCancel:X}:{},dismissAreaStyle:e?{touchAction:B?"none":"pan-x"}:void 0}},Sx="[data-lightbox-scrollable]",jl=(e=!0)=>{s.useEffect(()=>{if(!e)return;const t=window.scrollY,n=document.body.style.overflow,i=document.body.style.position,o=document.body.style.top,r=document.body.style.width,l=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${t}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const c=d=>{const u=d.target;u instanceof Element&&u.closest(Sx)||d.preventDefault()};return document.addEventListener("touchmove",c,{passive:!1}),()=>{document.removeEventListener("touchmove",c),document.body.style.overflow=n,document.body.style.position=i,document.body.style.top=o,document.body.style.width=r,document.documentElement.style.overflow=l,window.scrollTo({top:t,left:0,behavior:"instant"})}},[e])},wx=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},$x=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Cx=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Tx=(e,t,n,{duration:i,easing:o,onComplete:r})=>{const l=e.scrollLeft,c=n-l,d=l-n,u=(h,b)=>{$x(t),e.scrollLeft=h,b&&(r==null||r())};if(Math.abs(c)<.5)return u(n,!0),()=>{};let p=!1,v=0;const x=()=>{t.removeEventListener("transitionend",m),clearTimeout(v)},m=h=>{h.target!==t||h.propertyName!=="transform"||p||(p=!0,x(),u(n,!0))};return t.addEventListener("transitionend",m),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${d}px, 0, 0)`,v=window.setTimeout(()=>{p||(p=!0,x(),u(n,!0))},i+64),()=>{p||(p=!0,x(),u(l-Cx(t),!1))}},cr=300,Ix=900,Lx=1500,Px="cubic-bezier(0.16, 1, 0.3, 1)",Rx=3e3,Mx=2,Ex=16,kx=.05,Ax=1,Xr=.3,Fx=50,Nx=20,ao=.004,No=["title1","title2","title3"],_x={title1:"1",title2:"2",title3:"3"},Hx={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Wx={title1:.02,title2:.02,title3:.02},qr=e=>`max(${e}, ${Nx}px)`,Ox=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]}},Dx=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=Ox(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Jt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Bx=e=>[Jt(e,"fontFamily"),Jt(e,"fontSettings"),{type:"row",items:[Jt(e,"fontSize"),Jt(e,"lineHeight"),Jt(e,"letterSpacing"),Jt(e,"wordSpacing")]},Jt(e,"textAlign"),Jt(e,"textAppearance")],zx=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(No.map(e=>[_x[e],Bx(e)]))}),Vl=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},c)=>{if(r<=0||c<=0)return{overflow:r,widths:[c,...l]};const d=Math.min(r,c);return{overflow:r-d,widths:[c-d,...l]}},{overflow:i-1,widths:[]});return o},Sp=(e,t)=>Vl(e,t),Ur=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},rd=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Vl(e.length,n),effective:Sp(e.length,n)}},jx=(e,t,n,i,o,r,l)=>{const c=[];return t&&c.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&c.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:r,text:n}),i&&c.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),c},gs=(e,t)=>{const n=i=>{const o=Jt(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[Hx[t]]}},Vx=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),hs=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??Wx[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return nn(i,n)},Gx=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l})=>{const{backgroundColor:c,thumbnailSize:d,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:v,closeIcon:x,closeIconMaxWidth:m,closeIconColor:h,closeIconHoverColor:b,thumbnailTrigger:S,thumbnailVisibility:M,thumbnailObjectFit:y,thumbnailActive:$,thumbnailActiveColor:R,title1Width:X,title2Width:B,title3Width:O,title1MarginLeft:N=0,title2MarginLeft:z=0,title3MarginLeft:C=0,titleRowMarginBottom:I=0,titleHeaderLayout:j="desktop",contentMarginTop:E,iconMarginLeft:w}=n,L=k=>A.scalingValue(k,i??!1),V=d??n.thumnailSize??.03,_=L(V),K=L(u),P=L(p??.02),f=L(v??0),U=L(E??0),te=qr(U),ce=L(w??0),[F,ie]=s.useState(0),T=s.useRef(F);T.current=F;const le=t[F],{title1:J,title2:Se,title3:Le}=Dx(le),me=hs("title1",gs(n,"title1"),i),ye=hs("title2",gs(n,"title2"),i),ee=hs("title3",gs(n,"title3"),i),oe=j==="mobile",re=!o&&(!i||r),ge=re,we=re,Ae=re,fe=li(y),ve=fe?{"--image-aspect-ratio":ja(y)}:void 0,xe=!!(J||Se||Le),g=s.useMemo(()=>jx(e,J,Se,Le,me,ye,ee),[e,F,J,Se,Le,me,ye,ee]),G=s.useMemo(()=>({title1Width:X,title2Width:B,title3Width:O}),[X,B,O]),Q=s.useMemo(()=>g.map(k=>G[k.widthKey]),[g,G]),ne=s.useMemo(()=>Vl(g.length,Q),[g.length,Q]),ue=s.useMemo(()=>Sp(g.length,Q),[g.length,Q]),q=s.useMemo(()=>g.filter(k=>k.prefix==="title1"),[g]),D=s.useMemo(()=>g.filter(k=>k.prefix==="title2"||k.prefix==="title3"),[g]),se=s.useMemo(()=>rd(q,G),[q,G]),Y=s.useMemo(()=>rd(D,G),[D,G]),pe=s.useCallback((k,ae)=>{const he=g.indexOf(k);if(!oe||ae==="single-row")return{effectiveWidth:ue[he]??0,resolvedWidth:ne[he]??0,maxWidth:Ur(he,ne)};if(ae==="two-row-top"){const Ge=q.indexOf(k);return{effectiveWidth:se.effective[Ge]??0,resolvedWidth:se.resolved[Ge]??0,maxWidth:Ur(Ge,se.resolved)}}const Me=D.indexOf(k);return{effectiveWidth:Y.effective[Me]??0,resolvedWidth:Y.resolved[Me]??0,maxWidth:Ur(Me,Y.resolved)}},[D,Y,ue,ne,g,q,se,oe]),H=s.useCallback(k=>A.scalingValue(k,i??!1),[i]),Ie=H(I??0),de=s.useMemo(()=>({title1MarginLeft:N,title2MarginLeft:z,title3MarginLeft:C}),[N,z,C]),Z=s.useCallback(k=>g.slice(0,k+1).reduce((ae,he,Me)=>ae+(he!=null&&he.marginLeftKey?de[he.marginLeftKey]??0:0)+(ne[Me]??0),0)+(oe?0:N??0),[g,de,ne,oe,N]),Ne=s.useCallback(()=>oe?0:N??0,[oe,N]),Oe=s.useCallback(k=>D.slice(0,k).reduce((ae,he,Me)=>ae+(he.marginLeftKey?de[he.marginLeftKey]??0:0)+(Y.resolved[Me]??0),0),[D,Y.resolved,de]),Je=s.useCallback(k=>{const ae=D[k];return Oe(k)+(ae.marginLeftKey?de[ae.marginLeftKey]??0:0)+(Y.resolved[k]??0)},[D,Y.resolved,Oe,de]),De=(k,ae)=>{const he=k.marginLeftKey?de[k.marginLeftKey]??0:0,{effectiveWidth:Me,resolvedWidth:Ge,maxWidth:dt}=pe(k,ae),_t=o&&ae==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":k.prefix,style:{...ae==="single-row"?{gridArea:k.prefix}:{},width:H(Me),...he>0?{marginLeft:H(he)}:{}},children:[a.jsx("p",{className:k.className,style:k.style,children:k.text}),_t&&k.marginLeftKey&&a.jsx("div",{"data-controls":k.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ge),style:{position:"absolute",top:0,left:H(-he),width:`max(${H(he)}, 10px)`,height:"100%",pointerEvents:"auto"}}),_t&&a.jsx("div",{"data-controls":k.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(dt),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:H(-ao/2),width:H(ao),height:"100%",pointerEvents:"auto"}})]},k.className)},Ze=()=>{const k=oe?-1:g.findIndex(Me=>Me.prefix==="title1"),ae=!oe&&(o||(N??0)>0)?(()=>{const Me=N??0,Ge=k>=0?ne[k]:X??0;return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ge),style:{position:"absolute",top:0,left:0,width:`max(${H(Me)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,he=g.flatMap((Me,Ge)=>{if(!Me.marginLeftKey)return[];const dt=de[Me.marginLeftKey]??0,_t=Vx(g,ne,de,Ge)+Ne();return a.jsx("div",{"data-controls":Me.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ne[Ge]),style:{position:"absolute",top:0,left:H(_t),width:`max(${H(dt)}, 10px)`,height:"100%",pointerEvents:"auto"}},Me.marginLeftKey)});return ae?[ae,...he]:he},at=()=>g.map((k,ae)=>{const he=Ur(ae,ne),Ge=Z(ae)-ao/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":k.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(he),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:H(Ge),width:H(ao),height:"100%",pointerEvents:"auto"}})},`${k.widthKey}-junction`)}),Xe=()=>D.flatMap((k,ae)=>{if(!k.marginLeftKey)return[];const he=de[k.marginLeftKey]??0,Me=Oe(ae),{resolvedWidth:Ge}=pe(k,"two-row-bottom");return a.jsx("div",{"data-controls":k.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ge),style:{position:"absolute",top:0,left:H(Me),width:`max(${H(he)}, 10px)`,height:"100%",pointerEvents:"auto"}},k.marginLeftKey)}),be=()=>D.map((k,ae)=>{const{maxWidth:he}=pe(k,"two-row-bottom"),Ge=Je(ae)-ao/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":k.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(he),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:H(Ge),width:H(ao),height:"100%",pointerEvents:"auto"}})},`${k.widthKey}-junction`)}),He=s.useRef(null),je=s.useRef(null),Qe=s.useRef(null),Ce=s.useRef(null),_e=s.useRef([]),Ue=s.useRef([]),Ye=s.useRef(0),lt=s.useRef(null),it=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),qe=s.useRef(null),Ee=s.useRef(null),pt=s.useRef(0),ke=s.useRef("forward"),We=s.useRef(0),Ve=s.useRef(null),ct=s.useRef(!1),ot=t.length>1&&(!o||!!r),xt=ot?3:1,Pt=s.useMemo(()=>Array.from({length:xt},()=>t).flat(),[t,xt]),[Vt,vt]=s.useState(!1),[Mt,Ht]=s.useState(!1),[Gt,kt]=s.useState(!0),Pe=s.useRef(null),Be=s.useRef(null),ft=s.useRef(!1),$t=s.useRef(!1),et=s.useRef(null),Et=s.useRef(null),Xt=ge&&!Gt,mt=s.useCallback(()=>{ge&&(kt(!0),Et.current&&clearTimeout(Et.current),Et.current=setTimeout(()=>{it.current.isActive||kt(!1)},Rx))},[ge]),gt=s.useCallback(()=>{o||$t.current||($t.current=!0,Ht(!1),et.current=setTimeout(()=>{l()},cr))},[o,l]),Re=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":Xt?"true":"false",style:{width:A.scalingValue(m??0,i),height:A.scalingValue(m??0,i),marginRight:ce,"--close-icon-hover-color":b},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:gt,"aria-label":"Close",children:a.jsx(gn,{url:x,fill:h,hoverFill:i&&!r?h:b,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:ce,height:"100%",pointerEvents:"auto"}})]}),tt=(k="two-row")=>a.jsx("div",{...k==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:H(N??0),flexShrink:0,...k==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...k==="two-row"&&o?{pointerEvents:"auto"}:{}}}),nt=()=>{const k=g.find(Me=>Me.prefix==="title1"),ae=g.filter(Me=>Me.prefix==="title2"||Me.prefix==="title3"),he=ae.length>0||o||(I??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(N??0)>0||o?tt():null,k&&De(k,"two-row-top"),x&&Re()]}),he?a.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[ae.length>0?a.jsxs("div",{className:`${e}-header-row-bottom`,children:[ae.map(Me=>De(Me,"two-row-bottom")),o&&a.jsxs(a.Fragment,{children:[Xe(),be()]})]}):null,a.jsx("div",{"data-controls":o?"titleRowMarginBottom":void 0,"data-controls-axis":o?"y":void 0,"data-controls-reverse":o?"":void 0,className:o?`${e}-control`:void 0,style:{height:Ie,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},st=()=>a.jsxs(a.Fragment,{children:[(N??0)>0||o?tt("single-row"):null,g.map(k=>De(k,"single-row")),o?a.jsxs(a.Fragment,{children:[Ze(),at()]}):null,x?Re():null]}),At=s.useCallback(k=>!!(k.closest("[data-controls]")||k.closest(`.${e}-thumbnails`)||k.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:St,backdropStyle:ht,mediaAreaStyle:Dt,overlayContentStyle:Ct,swipeHandlers:qt,dismissAreaStyle:jt}=bp({enabled:re??!1,onClose:gt,animMs:cr,isBlockedTarget:At}),Nt=()=>{if(!ot||t.length===0)return Ye.current=0,0;const k=Ue.current[0],ae=Ue.current[t.length];if(!k||!ae)return Ye.current;const he=ae.offsetLeft-k.offsetLeft;return he>0&&(Ye.current=he),Ye.current},Bt=(k=!1)=>{if(!ot)return;const ae=je.current,he=Nt();!ae||he<=0||he<ae.clientWidth*.25||(ae.scrollLeft<=0?(ae.scrollLeft+=he,k&&(it.current.scrollLeft+=he),ct.current&&(We.current+=he)):ae.scrollLeft>=he*2&&(ae.scrollLeft-=he,k&&(it.current.scrollLeft-=he),ct.current&&(We.current-=he)))},Wt=(k,ae=(he=>(he=je.current)==null?void 0:he.scrollLeft)()??0)=>{if(!ot)return k;let Me=t.length+k,Ge=1/0;for(let dt=0;dt<xt;dt++){const _t=dt*t.length+k,Ut=Ue.current[_t];if(!Ut)continue;const sn=Math.abs(Ut.offsetLeft-ae);sn<Ge&&(Ge=sn,Me=_t)}return Me},wt=k=>{const ae=je.current;return!k||!ae?!1:k.offsetWidth>ae.clientWidth+1},W=k=>{const ae=je.current;if(!k||!ae||!wt(k))return!1;const he=k.offsetLeft,Me=he+k.offsetWidth;return ae.scrollLeft>=he-1&&ae.scrollLeft+ae.clientWidth<=Me+1},Te=(k=(ae=>(ae=je.current)==null?void 0:ae.scrollLeft)()??0)=>{for(let Me=0;Me<Ue.current.length;Me+=1){const Ge=Ue.current[Me];if(Ge&&W(Ge))return Me}let he={flatIndex:0,distance:1/0};return Ue.current.forEach((Me,Ge)=>{if(!Me)return;const dt=Math.abs(Me.offsetLeft-k);dt<he.distance&&(he={flatIndex:Ge,distance:dt})}),he.flatIndex},ze=k=>{je.current&&Ue.current.forEach(ae=>{ae&&(ae.style.scrollSnapAlign=wt(ae)&&k==="backward"?"end":"start")})},Fe=(k,ae,he)=>{const Me=k-ae,Ge=Te(ae),dt=Ue.current[Ge];if(W(dt))return Te(k)%t.length;const _t=Ue.current[Ge+1],Ut=dt?_t?_t.offsetLeft-dt.offsetLeft:dt.offsetWidth:0,sn=Ut>0?Me>Ut*Xr?1:Me<-Ut*Xr?-1:0:0;return sn===0?he:ot?(he+sn+t.length)%t.length:Math.max(0,Math.min(t.length-1,he+sn))},yt=s.useCallback((k=!1)=>{if(M!=="on"||o)return;const ae=Ce.current,he=T.current,Me=_e.current[he];if(!ae||!Me||ae.scrollWidth<=ae.clientWidth)return;const Ge=ae.scrollLeft,dt=Ge+ae.clientWidth,_t=Me.offsetLeft,Ut=_t+Me.offsetWidth;if(_t>=Ge&&Ut<=dt)return;const sn=ae.scrollWidth-ae.clientWidth;let en=Ge;if(!k&&Pe.current===null){const gi=_e.current[he-1],kn=_e.current[he+1],Zn=gi?Me.offsetLeft-gi.offsetLeft:kn?kn.offsetLeft-Me.offsetLeft:Me.offsetWidth;Ut>dt?en+=Zn:_t<Ge&&(en-=Zn)}else Ut>dt?en=Ut-ae.clientWidth:en=_t;ae.scrollLeft=Math.max(0,Math.min(sn,en))},[o,M]),Ot=s.useCallback((k=!1)=>{k&&(ft.current=!0),Be.current===null&&(Be.current=requestAnimationFrame(()=>{Be.current=null;const ae=ft.current;ft.current=!1,yt(ae)}))},[yt]),ut=s.useCallback(k=>{if(k===T.current)return;const ae=T.current;T.current=k;const he=Math.abs(k-ae)>1,Me=ot&&t.length>1&&(ae===t.length-1&&k===0||ae===0&&k===t.length-1);ie(k),Ot(he||Me)},[t.length,ot,Ot]),Tt=()=>{if(!je.current||t.length===0||Pe.current!==null||it.current.isActive&&it.current.hasMoved)return;const k=je.current.scrollLeft,ae=Te(k)%t.length;ae!==T.current&&ut(ae)},Yt=()=>{Pe.current=null},It=k=>{const ae=je.current;ae&&(ae.style.scrollSnapType=k?"":"none")},Zt=()=>{var k;(k=Ee.current)==null||k.call(Ee),Ee.current=null},on=()=>{Ve.current!==null&&(cancelAnimationFrame(Ve.current),Ve.current=null),ct.current=!1},Wn=()=>{const k=je.current;if(!k){Ve.current=null,ct.current=!1;return}const ae=We.current-k.scrollLeft;if(Math.abs(ae)<.5){k.scrollLeft=We.current,Bt(),Tt(),Ve.current=null,ct.current=!1;return}k.scrollLeft+=ae*kx,Bt(),Tt(),mt(),Ve.current=requestAnimationFrame(Wn)},xn=()=>{const k=Qe.current;k&&(k.style.transition="",k.style.transform="",k.style.willChange="")},ui=(k,ae,he,Me)=>{xn(),k.scrollLeft=ae,pt.current=k.scrollLeft,Bt(),he!==void 0?(T.current=he,ie(he)):Tt(),It(!0),Me==null||Me()},dn=(k,{behavior:ae="smooth",activeIndex:he,onComplete:Me}={})=>{const Ge=je.current,dt=Qe.current;if(!Ge||!dt)return;if(on(),Zt(),It(!1),ae==="auto"){ui(Ge,k,he,Me);return}const _t=Math.abs(k-Ge.scrollLeft),Ut=wx(_t,Ix,Lx,Ge.clientWidth*.55);Ee.current=Tx(Ge,dt,k,{duration:Ut,easing:Px,onComplete:()=>{Ee.current=null,ui(Ge,k,he,Me)}})},pi=(k="smooth")=>{const ae=je.current;if(!ae||t.length===0)return;const he=Te()%t.length,Me=Wt(he,ae.scrollLeft),Ge=Ue.current[Me];Ge&&dn(Ge.offsetLeft,{behavior:k,activeIndex:he})},Kn=(k,ae="smooth",he,Me)=>{const Ge=je.current;if(!Ge||t.length===0)return;const dt=(Me??Ge.scrollLeft)-k,_t=Te(k),Ut=Ue.current[_t];if(W(Ut)){It(!0),Tt();return}const sn=Ue.current[_t+1],en=Ut?sn?sn.offsetLeft-Ut.offsetLeft:Ut.offsetWidth:0;if((en>0?dt>en*Xr?1:dt<-en*Xr?-1:0:0)!==0){const Kl=he??_t%t.length,Xo=Fe(Me??Ge.scrollLeft,k,Kl);bn(Xo,ae);return}const kn=Me??Ge.scrollLeft,Zn=Te(kn),kr=Ue.current[Zn];if(kr&&Math.abs(kr.offsetLeft-kn)<1){It(!0),Tt();return}pi("auto")},bn=(k,ae="smooth")=>{const he=je.current;if(!he||t.length===0)return;const Me=Wt(k,he.scrollLeft),Ge=Ue.current[Me];Ge&&(ae==="smooth"?Pe.current=k:Pe.current=null,T.current=k,ie(k),Ot(!0),dn(Ge.offsetLeft,{behavior:ae,activeIndex:k,onComplete:ae==="smooth"?Yt:void 0}))},mi=()=>{qe.current&&(window.removeEventListener("pointerup",qe.current),window.removeEventListener("pointercancel",qe.current),qe.current=null)},eo=(k,ae,he,Me,Ge)=>{const dt=he-k,_t=Me-ae,Ut=Math.abs(dt),sn=Math.abs(_t);if(Ut<Fx||Ut<=sn)return!1;const en=dt<0?1:-1,gi=ot?(Ge+en+t.length)%t.length:Math.max(0,Math.min(t.length-1,Ge+en));return gi===Ge?!1:(bn(gi),!0)},Sn=k=>{if(!it.current.isActive)return;mi();const ae=je.current;if(!ae)return;const{scrollLeft:he,startActiveIndex:Me,hasMoved:Ge}=it.current,dt=ae.scrollLeft;Bt(!0),it.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},vt(!1),k!==void 0&&ae.hasPointerCapture(k)&&ae.releasePointerCapture(k),Ge?Kn(he,"smooth",Me,dt):(It(!0),Tt()),mt()},Qn=(k,ae)=>{const he=lt.current;lt.current=null,he&&(eo(he.startX,he.startY,k,ae,he.startActiveIndex),mt())},to=k=>{if(!we)return;if(k.pointerType==="touch"){if(on(),It(!0),At(k.target))return;lt.current={startX:k.clientX,startY:k.clientY,startActiveIndex:T.current};return}if(k.pointerType!=="mouse"||k.button!==0||At(k.target))return;const ae=je.current;if(!ae)return;on(),Zt(),xn(),Pe.current=null,it.current={isActive:!0,startX:k.clientX,scrollLeft:ae.scrollLeft,startActiveIndex:T.current,hasMoved:!1},It(!1),mt(),ae.setPointerCapture(k.pointerId),mi();const he=Me=>{Me.pointerType==="mouse"&&Sn(Me.pointerId)};qe.current=he,window.addEventListener("pointerup",he),window.addEventListener("pointercancel",he)},no=k=>{if(!we||k.pointerType!=="mouse")return;const ae=je.current;if(!ae||!it.current.isActive)return;if(k.buttons===0){Sn(k.pointerId);return}const he=k.clientX-it.current.startX;Math.abs(he)>Ax&&(it.current.hasMoved=!0,vt(!0)),it.current.hasMoved&&(k.preventDefault(),ae.scrollLeft=it.current.scrollLeft-he,Bt(!0),Tt(),mt())},$e=k=>{if(we){if(k.pointerType==="touch"){k.type==="pointerup"?Qn(k.clientX,k.clientY):lt.current=null;return}k.pointerType==="mouse"&&Sn(k.pointerId)}},Ke=k=>{!we||k.pointerType!=="mouse"||Sn(k.pointerId)};return jl(),s.useEffect(()=>{const k=requestAnimationFrame(()=>Ht(!0));return()=>{cancelAnimationFrame(k),Zt(),mi(),Be.current!==null&&(cancelAnimationFrame(Be.current),Be.current=null),et.current&&clearTimeout(et.current),Et.current&&clearTimeout(Et.current)}},[]),s.useEffect(()=>{if(!ge){kt(!0);return}mt();const k=()=>mt();return document.addEventListener("pointermove",k,{passive:!0}),document.addEventListener("pointerdown",k,{passive:!0}),()=>{document.removeEventListener("pointermove",k),document.removeEventListener("pointerdown",k),Et.current&&clearTimeout(Et.current)}},[ge,mt]),s.useEffect(()=>{const k=ae=>{ae.key==="Escape"&>()};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[gt]),s.useLayoutEffect(()=>{Nt()},[f,t.length,ot]),s.useLayoutEffect(()=>{o||bn(T.current,"auto")},[f,o]),s.useLayoutEffect(()=>{bn(0,"auto")},[t.length,ot]),s.useEffect(()=>{const k=je.current;if(!k||o||!re)return;const ae=he=>{if(he.preventDefault(),Math.abs(he.deltaY)<=Math.abs(he.deltaX))return;const Me=he.deltaMode===1?Ex:he.deltaMode===2?k.clientHeight:1,Ge=he.deltaY*Me*Mx;if(Ge!==0){if(Zt(),ct.current||(ct.current=!0,We.current=k.scrollLeft,Pe.current=null,It(!1)),We.current+=Ge,!ot){const dt=k.scrollWidth-k.clientWidth;We.current=Math.max(0,Math.min(dt,We.current))}mt(),Ve.current===null&&(Ve.current=requestAnimationFrame(Wn))}};return k.addEventListener("wheel",ae,{passive:!1}),()=>{k.removeEventListener("wheel",ae),on()}},[o,re,ot]),s.useEffect(()=>{const k=je.current;if(!k)return;const ae=()=>{Bt(it.current.isActive);const Me=k.scrollLeft,Ge=Me-pt.current;pt.current=Me;const dt=Ye.current>0?Ye.current*.5:1/0;if(Ge!==0&&Math.abs(Ge)<dt){const _t=Ge>0?"forward":"backward";_t!==ke.current&&(ke.current=_t,ze(_t))}it.current.isActive&&it.current.hasMoved||Tt()};k.addEventListener("scroll",ae,{passive:!0});const he=new ResizeObserver(()=>{Nt(),Bt(it.current.isActive),ze(ke.current),Tt()});return he.observe(k),()=>{Zt(),k.removeEventListener("scroll",ae),he.disconnect()}},[t.length,ot]),a.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{St||gt()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:Mt?1:0,transition:`opacity ${cr}ms ease`,pointerEvents:Mt?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:c,...ht}}),a.jsxs("div",{ref:He,className:`${e}-lightbox-dismiss-area`,style:jt,...qt,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Dt,onClick:k=>k.stopPropagation(),children:a.jsx("div",{ref:je,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":we&&t.length>0?"true":"false","data-mouse-dragging":Vt?"true":"false",onPointerDown:to,onPointerMove:no,onPointerUp:$e,onPointerCancel:$e,onLostPointerCapture:Ke,children:a.jsx("div",{ref:Qe,className:`${e}-lightbox-strip-track`,style:{gap:f},children:Pt.map((k,ae)=>{const he=k.image.objectFit??"contain",Me=ae%t.length,Ge=Math.floor(ae/t.length),dt=qr(f),_t=`calc(-0.5 * (${dt} + ${f}))`;return a.jsxs("div",{ref:Ut=>Ue.current[ae]=Ut,className:`${e}-strip-item`,style:{height:j==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[a.jsx("img",{src:k.image.assetId,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:he}}),o&&Me<t.length-1&&Ge===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:_t,width:dt,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Ge}-${k.image.assetId}-${Me}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":Xt?"true":"false",style:Ct,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:U,flexShrink:0,pointerEvents:"none"},children:o&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-handle-left-fraction":"0.05",style:{position:"absolute",left:0,right:0,top:0,height:te,pointerEvents:"auto",zIndex:3}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:a.jsx("div",{className:`${e}-lightbox-content-area${oe?` ${e}-lightbox-content-area-stacked`:""}`,children:(xe||x)&&a.jsx("div",{className:`${e}-header ${oe?`${e}-header-two-row`:`${e}-header-single-row`}`,children:oe?nt():xe||x?st():null})})})]}),t.length>1&&M==="on"&&(()=>{const k=qr(P),ae=`calc(-0.5 * (${P} + ${k}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:P},children:a.jsx("div",{ref:Ce,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:he=>he.stopPropagation(),children:a.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":$,style:{gap:K,"--thumbnail-active-color":R},children:[t.map((he,Me)=>{const Ge=qr(K),dt=`calc(-0.5 * (${Ge} + ${K}))`;return a.jsxs("div",{ref:_t=>{_e.current[Me]=_t},style:{position:"relative",flex:"0 0 auto"},children:[a.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":F===Me?"true":"false",onClick:()=>re&&S==="click"&&bn(Me),onMouseEnter:()=>Ae&&S==="hover"&&bn(Me),"aria-label":he.image.name?`View ${he.image.name}`:`View image ${Me+1}`,"aria-current":F===Me?"true":void 0,children:a.jsx("img",{className:`${e}-thumb-image${fe?` ${e}-thumb-image-cover`:""}`,src:he.image.assetId,alt:"",draggable:!1,style:{...ve,maxWidth:_,maxHeight:_,width:y.display==="cover"?"auto":"100%",height:"auto",objectFit:y.display==="cover"?"cover":"contain"}})}),o&&Me<t.length-1&&a.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:dt,width:Ge,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${he.image.assetId}-${Me}`)}),o&&a.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:ae,height:k,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Xx(e){return`
|
|
14353
14353
|
.${e}-wrapper {
|
|
14354
14354
|
position: relative;
|
|
14355
14355
|
width: 100%;
|
|
@@ -14734,7 +14734,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
|
|
|
14734
14734
|
pointer-events: auto;
|
|
14735
14735
|
z-index: 10;
|
|
14736
14736
|
}
|
|
14737
|
-
`}const
|
|
14737
|
+
`}const qx=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r})=>{const{prefix:l}=A.useScopedStyles(),{cover:c,coverFit:d}=e,u=s.useRef(null),[p,v]=s.useState(!1),x=t??[],m=p&&x.length>0,h=()=>{x.length!==0&&v(!0)};return s.useEffect(()=>{!n||i||o||v(!1)},[n,i,o]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Xx(l)}}),c&&a.jsx("div",{className:`${l}-cover ${li(d)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>h(),style:{...li(d)?{"--image-aspect-ratio":ja(d)}:{}},"aria-label":"Open image gallery",children:a.jsx("img",{className:`${l}-cover-image ${li(d)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:c,alt:"cover"})})]}),m&&typeof document<"u"&&(()=>{const b=(r?document.getElementById(r):null)??document.body;return Un.createPortal(a.jsx(Gx,{prefix:l,images:x,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>v(!1)}),b)})()]})},Ux=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
|
|
14738
14738
|
import { createPortal } from 'react-dom';
|
|
14739
14739
|
import { CommonComponentProps } from '../props';
|
|
14740
14740
|
import { useScopedStyles } from '../utils/useScopedStyles';
|
|
@@ -15280,7 +15280,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
|
|
|
15280
15280
|
</>
|
|
15281
15281
|
);
|
|
15282
15282
|
};
|
|
15283
|
-
`,jx="01M3SBP3P8CMVMM1ZZ0QVD2PPF",Hi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Vx(e){const t={};return t[Qt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Qt(e,"fontSettings")]={...Hi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Qt(e,"fontSize")]={...Hi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Qt(e,"lineHeight")]={...Hi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Qt(e,"letterSpacing")]={...Hi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Qt(e,"wordSpacing")]={...Hi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Qt(e,"textAlign")]={...Hi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Qt(e,"textAppearance")]={...Hi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Gx=Ao.reduce((e,t)=>({...e,...Vx(t)}),{}),Xx=Ao.reduce((e,t)=>({...e,[Qt(t,"fontFamily")]:"Goudy Bookletter 1911",[Qt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Qt(t,"letterSpacing")]:0,[Qt(t,"wordSpacing")]:0,[Qt(t,"textAlign")]:"left",[Qt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function fs(e){return Ao.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Qt(n,"fontSize")]=i),o!==void 0&&(t[Qt(n,"lineHeight")]=o),t},{})}const Ux=_x(),qx={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailSize:{type:"number",scope:"layout",title:"Thumbnail Size",min:0,display:{type:"range-control"}},thumbnailGap:{type:"number",scope:"layout",title:"Thumbnail Gap",min:0,display:{type:"range-control"}},thumbnailMarginBottom:{type:"number",scope:"layout",title:"Thumbnail Margin Bottom",min:0,display:{type:"range-control"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"layout",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"layout",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"layout",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up","none"]}},thumbnailActiveColor:{type:"string",scope:"layout",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"layout",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"layout",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"layout",title:"Caption Default",display:{type:"palette-color-picker"}},...Gx,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:"01M3QM74XESYN1HRYH9VRTZ5CK",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:jx,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...Xx},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,contentMarginTop:.08,iconMarginLeft:.02,...fs({title1FontSize:.042,title1LineHeight:.042,title2FontSize:.042,title2LineHeight:.042,title3FontSize:.042,title3LineHeight:.042})},t:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.039,contentMarginTop:.015,iconMarginLeft:.02,...fs({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,contentMarginTop:.015,iconMarginLeft:.02,...fs({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:[Ux]}],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:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},Yx={element:Bx,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:qx,sourceCode:zx,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0},{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Ao.map(e=>({path:`${Qt(e,"fontFamily")}`}))]},fontRelations:{...Ao.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Qt(t,"fontFamily")}`}),{})}},Kx=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,initialSlideIndex:l=0,enableUrlSync:c=!1,journalItemId:d=null,onBeforeClose:u,onClose:p})=>{const{type:v,coverFit:b,backgroundColor:m,imageGap:h,maxWidth:x,maxHeight:S,textTransition:P,title1Width:f,title2Width:w,title3Width:N,title1MarginLeft:V=0,title2MarginLeft:B=0,title3MarginLeft:H=0,titleRowMarginBottom:_=0,titleHeaderLayout:z="single-row",countCloseGap:$=0,closeIcon:E,closeIconMaxWidth:j,closeIconColor:L,closeIconHoverColor:C,contentMarginTop:T=0,iconMarginRight:G=0}=n,A=s.useCallback($e=>k.scalingValue($e,i??!1),[i]),Y=A(h??0),R=`${x}%`,y=`${S}%`,U=A($),ee=A(T),de=A(G),F=zi("title1",Bi(n,"title1"),i),ie=zi("title2",Bi(n,"title2"),i),I=zi("title3",Bi(n,"title3"),i),se=zi("count",Bi(n,"count"),i),J=z==="mobile",Se=!i||!!r,Re=!o&&(!i||!!r),pe=s.useMemo(()=>pa(t,v),[t,v]),[he,te]=s.useState(l),le=pe[he],re=le==null?void 0:le.entry,[fe,xe]=s.useState(!1),[Te,me]=s.useState(null),[be,we]=s.useState(!1),[g,X]=s.useState(null),[Z,ne]=s.useState(!1),[ye,K]=s.useState(0),[D,ce]=s.useState(),[q,ue]=s.useState(),[W,Le]=s.useState(null),ae=s.useRef(null),Q=s.useRef(0),Ne=s.useRef(0),Oe=s.useRef(0),it=s.useRef(!1),qe=s.useRef(null),Je=s.useRef(null),ot=s.useRef(null),Ve=s.useRef(null),ve=s.useRef(null),Fe=s.useRef(null),Xe=s.useRef(null),Ye=s.useCallback(()=>{const $e=Je.current;if(!$e)return;const Qe=$e.closest(`.${e}-lightbox-content-area`);if(!Qe)return $e.getBoundingClientRect().width;const M=Array.from(Qe.children).reduce((oe,ge)=>!(ge instanceof HTMLElement)||ge.contains($e)?oe:oe+ge.getBoundingClientRect().width,0);return Qe.getBoundingClientRect().width-M},[e]),Pe=s.useCallback(()=>{ae.current&&(clearTimeout(ae.current),ae.current=null)},[]),_e=s.useCallback($e=>{$e===Q.current&&(X(null),ne(!1))},[]),Ke=s.useCallback(()=>{o||it.current||(it.current=!0,u==null||u(),xe(!1),qe.current=setTimeout(()=>{p()},300))},[o,u,p]),Ze=s.useCallback($e=>!!($e.closest("[data-controls]")||$e.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:st,backdropStyle:Ue,mediaAreaStyle:De,overlayContentStyle:ke,swipeHandlers:ht,dismissAreaStyle:Be}=gp({enabled:Re,onClose:Ke,animMs:300,isBlockedTarget:Ze}),ze=s.useCallback($e=>{c&&Ku($e+1,d,!0)},[c,d]),We=s.useCallback($e=>{if($e)return $e.getBoundingClientRect().height},[]),mt=s.useCallback($e=>{if(pe.length===0)return;const Qe=($e%pe.length+pe.length)%pe.length;if(Qe===he)return;const M=pe[he],oe=pe[Qe];Q.current+=1;const ge=Q.current,Ee=P==="fade"&&Fc(M==null?void 0:M.entry)!==Fc(oe==null?void 0:oe.entry),Ge=We(ot.current),pt=Ee?(()=>{const Xt=Ye();Xn.flushSync(()=>{Le(oe.entry)}),ot.current&&Xt&&(ot.current.style.width=`${Xt}px`);const rn=We(ot.current);return ot.current&&(ot.current.style.width=""),{measuredIncomingTitlesHeight:rn,incomingTitlesMeasureWidth:Xt}})():void 0,Ft=Math.max(Ge??0,(pt==null?void 0:pt.measuredIncomingTitlesHeight)??0)||void 0;K(ge),X(he),ne(!0),te(Qe),ze(Qe),Oe.current=Qe,Ee?(Pe(),Ft&&ce(Ft),pt!=null&&pt.incomingTitlesMeasureWidth&&ue(pt.incomingTitlesMeasureWidth),me((M==null?void 0:M.entryIndex)??null),we(!0),Ne.current=oe.entryIndex,ae.current=setTimeout(()=>{me(null),we(!1),ce(void 0),ue(void 0),Le(null),ae.current=null},400)):(Pe(),me(null),we(!1),ce(void 0),ue(void 0),Le(null),Ne.current=oe.entryIndex)},[he,Pe,Ye,We,pe,ze,P]),rt=s.useCallback(()=>{Xe.current=null},[]),St=s.useCallback($e=>{!Se||pe.length<=1||$e.pointerType==="mouse"&&$e.button!==0||$e.target.closest("[data-controls]")||(Xe.current={startX:$e.clientX,startY:$e.clientY,pointerId:$e.pointerId})},[Se,pe.length]),Nt=s.useCallback($e=>{var Xt;if(!Se||pe.length<=1||$e.pointerType==="mouse"&&$e.button!==0)return;if(st){rt();return}const Qe=Xe.current;if(!Qe||Qe.pointerId!==$e.pointerId||(rt(),$e.target.closest("[data-controls]")))return;const oe=$e.clientX-Qe.startX,ge=$e.clientY-Qe.startY,Ee=Math.abs(oe),Ge=Math.abs(ge);if(Ee>=sv&&Ee>Ge){mt(oe>0?he-1:he+1);return}if(Ee>Mc||Ge>Mc)return;const pt=(Xt=Ve.current)==null?void 0:Xt.getBoundingClientRect(),Ft=pt?pt.left+pt.width/2:window.innerWidth/2;mt($e.clientX<Ft?he-1:he+1)},[he,Se,mt,st,rt,pe.length]),jt=s.useCallback($e=>{const Qe=Xe.current;(Qe==null?void 0:Qe.pointerId)===$e.pointerId&&rt()},[rt]);jl(),s.useEffect(()=>{Fe.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const $e=requestAnimationFrame(()=>{xe(!0),requestAnimationFrame(()=>{ve.current?ve.current.focus():Ve.current&&Ve.current.focus()})});return()=>{cancelAnimationFrame($e),qe.current&&clearTimeout(qe.current),ae.current&&clearTimeout(ae.current);const Qe=Fe.current;Qe&&document.contains(Qe)&&Qe.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var $e;P!=="fade"&&(Ne.current=(($e=pe[he])==null?void 0:$e.entryIndex)??0,Pe(),me(null),we(!1),ce(void 0),ue(void 0))},[he,Pe,pe,P]),s.useEffect(()=>{const $e=Qe=>{if(Qe.key==="Escape"){Ke();return}if(Qe.key==="ArrowLeft"&&pe.length>1){mt(he-1);return}if(Qe.key==="ArrowRight"&&pe.length>1){mt(he+1);return}if(Qe.key==="Tab"&&Ve.current){const M=Ve.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),oe=Array.from(M).filter(pt=>!pt.closest('[aria-hidden="true"]'));if(oe.length===0)return;const ge=oe[0],Ee=oe[oe.length-1],Ge=document.activeElement;Qe.shiftKey?(Ge===ge||!Ve.current.contains(Ge))&&(Qe.preventDefault(),Ee.focus()):(Ge===Ee||!Ve.current.contains(Ge))&&(Qe.preventDefault(),ge.focus())}};return window.addEventListener("keydown",$e),()=>window.removeEventListener("keydown",$e)},[mt,Ke,he,pe.length]),s.useLayoutEffect(()=>{Pe(),Q.current=0,K(0),X(null),ne(!1),me(null),we(!1),ce(void 0),ue(void 0),Le(null),te($e=>{const Qe=Math.max(0,pe.length-1);return Math.min($e,Qe)})},[Pe,t.length,v,pe.length]),s.useLayoutEffect(()=>{var M;const $e=Math.max(0,pe.length-1),Qe=Math.min(Math.max(0,l),$e);Oe.current=Qe,Ne.current=((M=pe[Qe])==null?void 0:M.entryIndex)??0,te(Qe)},[l]);const xt=Te!==null?t[Te]:null,Ce=g!==null?pe[g]:null,He=(re==null?void 0:re.title1)||(re==null?void 0:re.title2)||(re==null?void 0:re.title3)||(xt==null?void 0:xt.title1)||(xt==null?void 0:xt.title2)||(xt==null?void 0:xt.title3),lt=hv(v,pe,t),et=E!==null,yt=He||lt||et,Rt=lt&&et?{gap:U}:void 0,At=`${e}-titles-stack${J?` ${e}-titles-stack-stacked`:""}`,qt=`${e}-titles-layer-out${J?` ${e}-titles-layer-out-stacked`:""}`,$t=`${e}-titles-layer-out`,zt=(V??0)>0||o,on=A(_),vt=s.useMemo(()=>({title1Width:f??bo.title1Width,title2Width:w??bo.title2Width,title3Width:N??bo.title3Width}),[f,w,N]),ft=s.useMemo(()=>({title2MarginLeft:B,title3MarginLeft:H}),[B,H]),Me=s.useMemo(()=>re?wi(e,re,F,ie,I):[],[e,re,F,ie,I]),nt=s.useMemo(()=>Me.map($e=>vt[$e.widthKey]),[Me,vt]),ct=s.useMemo(()=>Lo(Me.length,nt),[Me.length,nt]),gt=s.useMemo(()=>vr(Me.length,nt),[Me.length,nt]),Et=s.useMemo(()=>Me.filter($e=>$e.prefix==="title1"),[Me]),wt=s.useMemo(()=>Me.filter($e=>$e.prefix==="title2"||$e.prefix==="title3"),[Me]),dt=s.useMemo(()=>$i(Et,vt),[Et,vt]),Ot=s.useMemo(()=>$i(wt,vt),[wt,vt]),Lt=s.useCallback(($e,Qe)=>{const M=Me.findIndex(ge=>ge.prefix===$e.prefix);if(!J||Qe==="single-row")return{effectiveWidth:gt[M]??0,resolvedWidth:ct[M]??0,maxWidth:yn(M,ct)};if(Qe==="two-row-top"){const ge=Et.findIndex(Ee=>Ee.prefix===$e.prefix);return{effectiveWidth:dt.effective[ge]??0,resolvedWidth:dt.resolved[ge]??0,maxWidth:yn(ge,dt.resolved)}}const oe=wt.findIndex(ge=>ge.prefix===$e.prefix);return{effectiveWidth:Ot.effective[oe]??0,resolvedWidth:Ot.resolved[oe]??0,maxWidth:yn(oe,Ot.resolved)}},[Me,wt,Ot,gt,ct,Et,dt,J]),Ht=s.useCallback($e=>ep(Me,ct,ft,$e)+(J?0:V??0),[Me,ct,ft,J,V]),Gt=s.useCallback(()=>J?0:V??0,[J,V]),_t=s.useCallback($e=>wt.slice(0,$e).reduce((Qe,M,oe)=>Qe+(M.marginLeftKey?ft[M.marginLeftKey]??0:0)+(Ot.resolved[oe]??0),0),[wt,Ot.resolved,ft]),Vt=s.useCallback($e=>{const Qe=wt[$e];return _t($e)+(Qe.marginLeftKey?ft[Qe.marginLeftKey]??0:0)+(Ot.resolved[$e]??0)},[wt,Ot.resolved,_t,ft]),Dt=s.useCallback(($e,Qe,M)=>{if(!J||M==="single-row"){const pt=$e.findIndex(Zt=>Zt.prefix===Qe.prefix),Ft=$e.map(Zt=>vt[Zt.widthKey]),Xt=Lo($e.length,Ft);return{effectiveWidth:vr($e.length,Ft)[pt]??0,resolvedWidth:Xt[pt]??0,maxWidth:yn(pt,Xt)}}if(M==="two-row-top"){const pt=$e.filter(Zt=>Zt.prefix==="title1"),Ft=pt.findIndex(Zt=>Zt.prefix===Qe.prefix),{resolved:Xt,effective:rn}=$i(pt,vt);return{effectiveWidth:rn[Ft]??0,resolvedWidth:Xt[Ft]??0,maxWidth:yn(Ft,Xt)}}const oe=$e.filter(pt=>pt.prefix==="title2"||pt.prefix==="title3"),ge=oe.findIndex(pt=>pt.prefix===Qe.prefix),{resolved:Ee,effective:Ge}=$i(oe,vt);return{effectiveWidth:Ge[ge]??0,resolvedWidth:Ee[ge]??0,maxWidth:yn(ge,Ee)}},[vt,J]),Ct=($e,Qe,M)=>{const oe=$e.marginLeftKey?ft[$e.marginLeftKey]??0:0,{effectiveWidth:ge,resolvedWidth:Ee,maxWidth:Ge}=M??Lt($e,Qe),pt=Math.max(oe,ni),Ft=o&&Qe==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":$e.prefix,style:{width:A(ge),...oe>0?{marginLeft:A(oe)}:{}},children:[a.jsx("p",{className:$e.className,style:$e.style,children:$e.text}),Ft&&$e.marginLeftKey?a.jsx("div",{"data-controls":$e.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ee),style:{position:"absolute",top:0,left:A(-oe),width:A(pt),height:"100%",pointerEvents:"auto"}}):null,Ft?a.jsx("div",{"data-controls":$e.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ge),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:A(-Ln/2),width:A(Ln),height:"100%",pointerEvents:"auto"}}):null]},$e.className)},O=($e="two-row")=>{const Qe=Me.findIndex(ge=>ge.prefix==="title1"),M=Qe>=0?ct[Qe]:vt.title1Width,oe=$e==="two-row"&&o;return a.jsx("div",{...oe?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(M)}:{},style:{width:A(V??0),flexShrink:0,alignSelf:"stretch",...oe?{pointerEvents:"auto"}:{}}})},Ie=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:F,"aria-hidden":"true",children:" "}),je=()=>a.jsx("span",{className:`${e}-entry-counter`,style:se,"aria-live":"polite","aria-atomic":"true",children:gv(pe,he,v,t)}),Ae=()=>lt?o&&et?a.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[je(),a.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${as(U)} + ${U}))`,width:as(U),height:"100%",pointerEvents:"auto",zIndex:3}})]}):je():null,tt=()=>!lt&&!et?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Rt,children:[Ae(),et?Tt():null]}),Mt=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[lt||He?Ie():null,zt?O("single-row"):null,Wt(re),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),tt(),xn()]}),ut=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[lt||He?Ie():null,zt?O("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:be&&D?{minHeight:D}:void 0,children:[a.jsx("div",{ref:ot,className:At,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Yn(W||re)}),a.jsxs("div",{ref:Je,className:At,style:{position:be?"absolute":"relative",inset:be?0:void 0,width:"100%",...be&&q?{width:q,maxWidth:"100%"}:void 0},children:[xt&&be?a.jsx("div",{className:`${qt} ${e}-titles-fade-out`,children:Yn(xt)}):null,a.jsx("div",{className:`${e}-titles-layer-in${be?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Yn(re)})]})]}),tt(),xn()]}),Tt=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:k.scalingValue(j??0,i),height:k.scalingValue(j??0,i),marginRight:de,"--close-icon-hover-color":C},children:[a.jsx("button",{ref:ve,type:"button",className:`${e}-close-icon-inner`,onClick:Ke,"aria-label":"Close",children:a.jsx(mn,{url:E??"",fill:L,hoverFill:i&&!r?L:C,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:de,height:"100%",pointerEvents:"auto"}})]}),Ut=($e,Qe)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[lt||He?Ie():null,zt?O("two-row"):null,Qe!==void 0?a.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Qe},children:$e}):a.jsxs(a.Fragment,{children:[$e,a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),tt()]}),Wt=$e=>{if(!$e)return null;const Qe=wi(e,$e,F,ie,I);return a.jsx(a.Fragment,{children:Qe.map(M=>Ct(M,"single-row",Dt(Qe,M,"single-row")))})},an=$e=>{if(!$e)return null;const Qe=wi(e,$e,F,ie,I),M=Qe.find(oe=>oe.prefix==="title1");return M?Ct(M,"two-row-top",Dt(Qe,M,"two-row-top")):null},cn=($e,Qe=!1)=>{const M=$e?wi(e,$e,F,ie,I):[],oe=M.filter(Ge=>Ge.prefix==="title2"||Ge.prefix==="title3"),ge=o&&Qe;return oe.length>0||ge||(_??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[oe.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[oe.map(Ge=>Ct(Ge,"two-row-bottom",Dt(M,Ge,"two-row-bottom"))),Qe&&o?a.jsxs(a.Fragment,{children:[Vo(),Go()]}):null]}):null,(_??0)>0||ge?a.jsx("div",{"data-controls":ge?"titleRowMarginBottom":void 0,"data-controls-axis":ge?"y":void 0,"data-controls-reverse":ge?"":void 0,className:ge?`${e}-control`:void 0,style:{height:on,width:"100%",flexShrink:0,pointerEvents:ge?"auto":"none"}}):null]}):null},qn=($e,Qe=!1)=>a.jsxs(a.Fragment,{children:[Ut(an($e)),cn($e,Qe)]}),Yn=$e=>J?a.jsx("div",{className:`${e}-titles-row-two-row`,children:qn($e)}):$e?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Wt($e)}):null,Qi=()=>{const $e=J?-1:Me.findIndex(oe=>oe.prefix==="title1"),Qe=!J&&(o||(V??0)>0)?(()=>{const oe=V??0,ge=$e>=0?ct[$e]:vt.title1Width,Ee=Math.max(oe,ni);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ge),style:{position:"absolute",top:0,left:0,width:A(Ee),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,M=Me.flatMap((oe,ge)=>{if(!oe.marginLeftKey)return[];const Ee=ft[oe.marginLeftKey]??0,Ge=Ju(Me,ct,ft,ge)+Gt(),pt=Math.max(Ee,ni);return a.jsx("div",{"data-controls":oe.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ct[ge]),style:{position:"absolute",top:0,left:A(Ge),width:A(pt),height:"100%",pointerEvents:"auto"}},oe.marginLeftKey)});return Qe?[Qe,...M]:M},hn=()=>Me.map(($e,Qe)=>{const M=yn(Qe,ct),ge=Ht(Qe)-Ln/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":$e.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(M),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:A(ge),width:A(Ln),height:"100%",pointerEvents:"auto"}})},`${$e.widthKey}-junction`)}),Vo=()=>wt.flatMap(($e,Qe)=>{if(!$e.marginLeftKey)return[];const M=ft[$e.marginLeftKey]??0,oe=_t(Qe),ge=Math.max(M,ni),{resolvedWidth:Ee}=Lt($e,"two-row-bottom");return a.jsx("div",{"data-controls":$e.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ee),style:{position:"absolute",top:0,left:A(oe),width:A(ge),height:"100%",pointerEvents:"auto"}},$e.marginLeftKey)}),Go=()=>wt.map(($e,Qe)=>{const{maxWidth:M}=Lt($e,"two-row-bottom"),ge=Vt(Qe)-Ln/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":$e.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(M),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:A(ge),width:A(Ln),height:"100%",pointerEvents:"auto"}})},`${$e.widthKey}-junction`)}),xn=()=>!o||J?null:a.jsxs(a.Fragment,{children:[Qi(),hn()]}),di=$e=>{const Qe=!$e.objectFit&&si(b);return{className:`${e}-slide-image-cell${Qe?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:R,maxHeight:y,...Qe?{"--image-aspect-ratio":ja(b)}:{}}}},Zi=$e=>$e.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":$e.objectFit}}:si(b)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},bn=$e=>{if($e.length===0)return null;const Qe=$e.length>1,M=as(Y),oe=`calc(-0.5 * (${M} + ${Y}))`;if($e.length===1){const ge=$e[0];return a.jsx("div",{...di(ge),children:a.jsx("img",{...Zi(ge),src:ge.assetId,alt:ge.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:Qe?{gap:Y}:void 0,children:$e.map((ge,Ee)=>a.jsxs("div",{...di(ge),children:[a.jsx("img",{...Zi(ge),src:ge.assetId,alt:ge.name??"",draggable:!1}),o&&Qe&&Ee<$e.length-1&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:oe,width:M,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${ge.assetId}-${Ee}`))})},Kn=!!(re!=null&&re.title2||re!=null&&re.title3||xt!=null&&xt.title2||xt!=null&&xt.title3||(_??0)>0||o),Ji=()=>a.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[a.jsx("div",{ref:ot,className:At,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:qn(W||re)}),a.jsxs("div",{ref:Je,className:`${e}-titles-row-two-row`,style:{...be&&D?{minHeight:D}:void 0,...be&&q?{width:q,maxWidth:"100%"}:void 0},children:[Ut(a.jsxs("div",{className:At,style:{position:be?"absolute":"relative",inset:be?0:void 0,width:"100%"},children:[xt&&be?a.jsx("div",{className:`${$t} ${e}-titles-fade-out`,children:an(xt)}):null,a.jsx("div",{className:`${e}-titles-layer-in${be?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:an(re)})]}),be&&D?D:void 0),Kn?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[xt&&be?a.jsx("div",{className:`${qt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:cn(xt)}):null,a.jsx("div",{className:`${e}-titles-layer-in${be?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${J?` ${e}-titles-layer-in-stacked`:""}`,children:cn(re,!0)})]}):null]})]}),eo=()=>{const $e=Kn;return a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...$e?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:$e?void 0:{flex:"0 0 auto",height:"auto"},children:qn(re,!0)}),xn()]})};return a.jsxs("div",{ref:Ve,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{st||Ke()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:et?void 0:-1,style:{opacity:fe?1:0,transition:"opacity 300ms ease",pointerEvents:fe?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:m,...Ue}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:Be,...ht,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:De,onClick:$e=>$e.stopPropagation(),children:a.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":Se&&pe.length>1?"true":"false",onPointerDown:Se?St:void 0,onPointerUp:Se?Nt:void 0,onPointerCancel:Se?jt:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[Ce&&Z?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:$e=>{$e.target===$e.currentTarget&&_e(ye)},children:a.jsx("div",{className:`${e}-slide-area`,children:bn(Ce.images)})},`slide-out-${ye}`):null,a.jsx("div",{className:`${e}-slide-layer-in${Z?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:le?bn(le.images):null})},`slide-in-${ye}-${he}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:ke,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ee,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...J?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${J?` ${e}-lightbox-content-area-stacked`:""}`,children:yt&&a.jsx("div",{className:`${e}-text-bar-cell${J?` ${e}-text-bar-cell-stacked`:""}`,style:J?void 0:{flex:1,minWidth:0,width:"100%"},children:J?P==="fade"?Ji():eo():P==="fade"?ut():Mt()})})})]})]})]})};function Qx(e){return`
|
|
15283
|
+
`,Yx="01M3SBP3P8CMVMM1ZZ0QVD2PPF",Di={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 Kx(e){const t={};return t[Jt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Jt(e,"fontSettings")]={...Di.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Jt(e,"fontSize")]={...Di.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Jt(e,"lineHeight")]={...Di.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Jt(e,"letterSpacing")]={...Di.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Jt(e,"wordSpacing")]={...Di.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Jt(e,"textAlign")]={...Di.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Jt(e,"textAppearance")]={...Di.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Qx=No.reduce((e,t)=>({...e,...Kx(t)}),{}),Zx=No.reduce((e,t)=>({...e,[Jt(t,"fontFamily")]:"Goudy Bookletter 1911",[Jt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Jt(t,"letterSpacing")]:0,[Jt(t,"wordSpacing")]:0,[Jt(t,"textAlign")]:"left",[Jt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function fs(e){return No.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Jt(n,"fontSize")]=i),o!==void 0&&(t[Jt(n,"lineHeight")]=o),t},{})}const Jx=zx(),eb={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailSize:{type:"number",scope:"layout",title:"Thumbnail Size",min:0,display:{type:"range-control"}},thumbnailGap:{type:"number",scope:"layout",title:"Thumbnail Gap",min:0,display:{type:"range-control"}},thumbnailMarginBottom:{type:"number",scope:"layout",title:"Thumbnail Margin Bottom",min:0,display:{type:"range-control"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"layout",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"layout",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"layout",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up","none"]}},thumbnailActiveColor:{type:"string",scope:"layout",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"layout",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"layout",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"layout",title:"Caption Default",display:{type:"palette-color-picker"}},...Qx,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:"01M3QM74XESYN1HRYH9VRTZ5CK",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Yx,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...Zx},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,contentMarginTop:.08,iconMarginLeft:.02,...fs({title1FontSize:.042,title1LineHeight:.042,title2FontSize:.042,title2LineHeight:.042,title3FontSize:.042,title3LineHeight:.042})},t:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.039,contentMarginTop:.015,iconMarginLeft:.02,...fs({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,contentMarginTop:.015,iconMarginLeft:.02,...fs({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:[Jx]}],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:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},tb={element:qx,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:eb,sourceCode:Ux,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0},{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...No.map(e=>({path:`${Jt(e,"fontFamily")}`}))]},fontRelations:{...No.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Jt(t,"fontFamily")}`}),{})}},nb=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,initialSlideIndex:l=0,enableUrlSync:c=!1,journalItemId:d=null,onBeforeClose:u,onClose:p})=>{const{type:v,coverFit:x,backgroundColor:m,imageGap:h,maxWidth:b,maxHeight:S,textTransition:M,title1Width:y,title2Width:$,title3Width:R,title1MarginLeft:X=0,title2MarginLeft:B=0,title3MarginLeft:O=0,titleRowMarginBottom:N=0,titleHeaderLayout:z="single-row",countCloseGap:C=0,closeIcon:I,closeIconMaxWidth:j,closeIconColor:E,closeIconHoverColor:w,contentMarginTop:L=0,iconMarginRight:V=0}=n,_=s.useCallback($e=>A.scalingValue($e,i??!1),[i]),K=_(h??0),P=`${b}%`,f=`${S}%`,U=_(C),te=_(L),ce=_(V),F=Gi("title1",Vi(n,"title1"),i),ie=Gi("title2",Vi(n,"title2"),i),T=Gi("title3",Vi(n,"title3"),i),le=Gi("count",Vi(n,"count"),i),J=z==="mobile",Se=!i||!!r,Le=!o&&(!i||!!r),me=s.useMemo(()=>pa(t,v),[t,v]),[ye,ee]=s.useState(l),oe=me[ye],re=oe==null?void 0:oe.entry,[ge,we]=s.useState(!1),[Ae,fe]=s.useState(null),[ve,xe]=s.useState(!1),[g,G]=s.useState(null),[Q,ne]=s.useState(!1),[ue,q]=s.useState(0),[D,se]=s.useState(),[Y,pe]=s.useState(),[H,Ie]=s.useState(null),de=s.useRef(null),Z=s.useRef(0),Ne=s.useRef(0),Oe=s.useRef(0),Je=s.useRef(!1),De=s.useRef(null),Ze=s.useRef(null),at=s.useRef(null),Xe=s.useRef(null),be=s.useRef(null),He=s.useRef(null),je=s.useRef(null),Qe=s.useCallback(()=>{const $e=Ze.current;if(!$e)return;const Ke=$e.closest(`.${e}-lightbox-content-area`);if(!Ke)return $e.getBoundingClientRect().width;const k=Array.from(Ke.children).reduce((ae,he)=>!(he instanceof HTMLElement)||he.contains($e)?ae:ae+he.getBoundingClientRect().width,0);return Ke.getBoundingClientRect().width-k},[e]),Ce=s.useCallback(()=>{de.current&&(clearTimeout(de.current),de.current=null)},[]),_e=s.useCallback($e=>{$e===Z.current&&(G(null),ne(!1))},[]),Ue=s.useCallback(()=>{o||Je.current||(Je.current=!0,u==null||u(),we(!1),De.current=setTimeout(()=>{p()},300))},[o,u,p]),Ye=s.useCallback($e=>!!($e.closest("[data-controls]")||$e.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:lt,backdropStyle:it,mediaAreaStyle:qe,overlayContentStyle:Ee,swipeHandlers:pt,dismissAreaStyle:ke}=bp({enabled:Le,onClose:Ue,animMs:300,isBlockedTarget:Ye}),We=s.useCallback($e=>{c&&np($e+1,d,!0)},[c,d]),Ve=s.useCallback($e=>{if($e)return $e.getBoundingClientRect().height},[]),ct=s.useCallback($e=>{if(me.length===0)return;const Ke=($e%me.length+me.length)%me.length;if(Ke===ye)return;const k=me[ye],ae=me[Ke];Z.current+=1;const he=Z.current,Me=M==="fade"&&Fc(k==null?void 0:k.entry)!==Fc(ae==null?void 0:ae.entry),Ge=Ve(at.current),dt=Me?(()=>{const Ut=Qe();Un.flushSync(()=>{Ie(ae.entry)}),at.current&&Ut&&(at.current.style.width=`${Ut}px`);const sn=Ve(at.current);return at.current&&(at.current.style.width=""),{measuredIncomingTitlesHeight:sn,incomingTitlesMeasureWidth:Ut}})():void 0,_t=Math.max(Ge??0,(dt==null?void 0:dt.measuredIncomingTitlesHeight)??0)||void 0;q(he),G(ye),ne(!0),ee(Ke),We(Ke),Oe.current=Ke,Me?(Ce(),_t&&se(_t),dt!=null&&dt.incomingTitlesMeasureWidth&&pe(dt.incomingTitlesMeasureWidth),fe((k==null?void 0:k.entryIndex)??null),xe(!0),Ne.current=ae.entryIndex,de.current=setTimeout(()=>{fe(null),xe(!1),se(void 0),pe(void 0),Ie(null),de.current=null},400)):(Ce(),fe(null),xe(!1),se(void 0),pe(void 0),Ie(null),Ne.current=ae.entryIndex)},[ye,Ce,Qe,Ve,me,We,M]),ot=s.useCallback(()=>{je.current=null},[]),xt=s.useCallback($e=>{!Se||me.length<=1||$e.pointerType==="mouse"&&$e.button!==0||$e.target.closest("[data-controls]")||(je.current={startX:$e.clientX,startY:$e.clientY,pointerId:$e.pointerId})},[Se,me.length]),Pt=s.useCallback($e=>{var Ut;if(!Se||me.length<=1||$e.pointerType==="mouse"&&$e.button!==0)return;if(lt){ot();return}const Ke=je.current;if(!Ke||Ke.pointerId!==$e.pointerId||(ot(),$e.target.closest("[data-controls]")))return;const ae=$e.clientX-Ke.startX,he=$e.clientY-Ke.startY,Me=Math.abs(ae),Ge=Math.abs(he);if(Me>=mv&&Me>Ge){ct(ae>0?ye-1:ye+1);return}if(Me>Mc||Ge>Mc)return;const dt=(Ut=Xe.current)==null?void 0:Ut.getBoundingClientRect(),_t=dt?dt.left+dt.width/2:window.innerWidth/2;ct($e.clientX<_t?ye-1:ye+1)},[ye,Se,ct,lt,ot,me.length]),Vt=s.useCallback($e=>{const Ke=je.current;(Ke==null?void 0:Ke.pointerId)===$e.pointerId&&ot()},[ot]);jl(),s.useEffect(()=>{He.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const $e=requestAnimationFrame(()=>{we(!0),requestAnimationFrame(()=>{be.current?be.current.focus():Xe.current&&Xe.current.focus()})});return()=>{cancelAnimationFrame($e),De.current&&clearTimeout(De.current),de.current&&clearTimeout(de.current);const Ke=He.current;Ke&&document.contains(Ke)&&Ke.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var $e;M!=="fade"&&(Ne.current=(($e=me[ye])==null?void 0:$e.entryIndex)??0,Ce(),fe(null),xe(!1),se(void 0),pe(void 0))},[ye,Ce,me,M]),s.useEffect(()=>{const $e=Ke=>{if(Ke.key==="Escape"){Ue();return}if(Ke.key==="ArrowLeft"&&me.length>1){ct(ye-1);return}if(Ke.key==="ArrowRight"&&me.length>1){ct(ye+1);return}if(Ke.key==="Tab"&&Xe.current){const k=Xe.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),ae=Array.from(k).filter(dt=>!dt.closest('[aria-hidden="true"]'));if(ae.length===0)return;const he=ae[0],Me=ae[ae.length-1],Ge=document.activeElement;Ke.shiftKey?(Ge===he||!Xe.current.contains(Ge))&&(Ke.preventDefault(),Me.focus()):(Ge===Me||!Xe.current.contains(Ge))&&(Ke.preventDefault(),he.focus())}};return window.addEventListener("keydown",$e),()=>window.removeEventListener("keydown",$e)},[ct,Ue,ye,me.length]),s.useLayoutEffect(()=>{Ce(),Z.current=0,q(0),G(null),ne(!1),fe(null),xe(!1),se(void 0),pe(void 0),Ie(null),ee($e=>{const Ke=Math.max(0,me.length-1);return Math.min($e,Ke)})},[Ce,t.length,v,me.length]),s.useLayoutEffect(()=>{var k;const $e=Math.max(0,me.length-1),Ke=Math.min(Math.max(0,l),$e);Oe.current=Ke,Ne.current=((k=me[Ke])==null?void 0:k.entryIndex)??0,ee(Ke)},[l]);const vt=Ae!==null?t[Ae]:null,Mt=g!==null?me[g]:null,Ht=(re==null?void 0:re.title1)||(re==null?void 0:re.title2)||(re==null?void 0:re.title3)||(vt==null?void 0:vt.title1)||(vt==null?void 0:vt.title2)||(vt==null?void 0:vt.title3),Gt=Sv(v,me,t),kt=I!==null,Pe=Ht||Gt||kt,Be=Gt&&kt?{gap:U}:void 0,ft=`${e}-titles-stack${J?` ${e}-titles-stack-stacked`:""}`,$t=`${e}-titles-layer-out${J?` ${e}-titles-layer-out-stacked`:""}`,et=`${e}-titles-layer-out`,Et=(X??0)>0||o,Xt=_(N),mt=s.useMemo(()=>({title1Width:y??wo.title1Width,title2Width:$??wo.title2Width,title3Width:R??wo.title3Width}),[y,$,R]),gt=s.useMemo(()=>({title2MarginLeft:B,title3MarginLeft:O}),[B,O]),Re=s.useMemo(()=>re?Ti(e,re,F,ie,T):[],[e,re,F,ie,T]),tt=s.useMemo(()=>Re.map($e=>mt[$e.widthKey]),[Re,mt]),nt=s.useMemo(()=>Ro(Re.length,tt),[Re.length,tt]),st=s.useMemo(()=>vr(Re.length,tt),[Re.length,tt]),At=s.useMemo(()=>Re.filter($e=>$e.prefix==="title1"),[Re]),St=s.useMemo(()=>Re.filter($e=>$e.prefix==="title2"||$e.prefix==="title3"),[Re]),ht=s.useMemo(()=>Ii(At,mt),[At,mt]),Dt=s.useMemo(()=>Ii(St,mt),[St,mt]),Ct=s.useCallback(($e,Ke)=>{const k=Re.findIndex(he=>he.prefix===$e.prefix);if(!J||Ke==="single-row")return{effectiveWidth:st[k]??0,resolvedWidth:nt[k]??0,maxWidth:yn(k,nt)};if(Ke==="two-row-top"){const he=At.findIndex(Me=>Me.prefix===$e.prefix);return{effectiveWidth:ht.effective[he]??0,resolvedWidth:ht.resolved[he]??0,maxWidth:yn(he,ht.resolved)}}const ae=St.findIndex(he=>he.prefix===$e.prefix);return{effectiveWidth:Dt.effective[ae]??0,resolvedWidth:Dt.resolved[ae]??0,maxWidth:yn(ae,Dt.resolved)}},[Re,St,Dt,st,nt,At,ht,J]),qt=s.useCallback($e=>ap(Re,nt,gt,$e)+(J?0:X??0),[Re,nt,gt,J,X]),jt=s.useCallback(()=>J?0:X??0,[J,X]),Nt=s.useCallback($e=>St.slice(0,$e).reduce((Ke,k,ae)=>Ke+(k.marginLeftKey?gt[k.marginLeftKey]??0:0)+(Dt.resolved[ae]??0),0),[St,Dt.resolved,gt]),Bt=s.useCallback($e=>{const Ke=St[$e];return Nt($e)+(Ke.marginLeftKey?gt[Ke.marginLeftKey]??0:0)+(Dt.resolved[$e]??0)},[St,Dt.resolved,Nt,gt]),Wt=s.useCallback(($e,Ke,k)=>{if(!J||k==="single-row"){const dt=$e.findIndex(en=>en.prefix===Ke.prefix),_t=$e.map(en=>mt[en.widthKey]),Ut=Ro($e.length,_t);return{effectiveWidth:vr($e.length,_t)[dt]??0,resolvedWidth:Ut[dt]??0,maxWidth:yn(dt,Ut)}}if(k==="two-row-top"){const dt=$e.filter(en=>en.prefix==="title1"),_t=dt.findIndex(en=>en.prefix===Ke.prefix),{resolved:Ut,effective:sn}=Ii(dt,mt);return{effectiveWidth:sn[_t]??0,resolvedWidth:Ut[_t]??0,maxWidth:yn(_t,Ut)}}const ae=$e.filter(dt=>dt.prefix==="title2"||dt.prefix==="title3"),he=ae.findIndex(dt=>dt.prefix===Ke.prefix),{resolved:Me,effective:Ge}=Ii(ae,mt);return{effectiveWidth:Ge[he]??0,resolvedWidth:Me[he]??0,maxWidth:yn(he,Me)}},[mt,J]),wt=($e,Ke,k)=>{const ae=$e.marginLeftKey?gt[$e.marginLeftKey]??0:0,{effectiveWidth:he,resolvedWidth:Me,maxWidth:Ge}=k??Ct($e,Ke),dt=Math.max(ae,ii),_t=o&&Ke==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":$e.prefix,style:{width:_(he),...ae>0?{marginLeft:_(ae)}:{}},children:[a.jsx("p",{className:$e.className,style:$e.style,children:$e.text}),_t&&$e.marginLeftKey?a.jsx("div",{"data-controls":$e.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Me),style:{position:"absolute",top:0,left:_(-ae),width:_(dt),height:"100%",pointerEvents:"auto"}}):null,_t?a.jsx("div",{"data-controls":$e.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ge),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:_(-Pn/2),width:_(Pn),height:"100%",pointerEvents:"auto"}}):null]},$e.className)},W=($e="two-row")=>{const Ke=Re.findIndex(he=>he.prefix==="title1"),k=Ke>=0?nt[Ke]:mt.title1Width,ae=$e==="two-row"&&o;return a.jsx("div",{...ae?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(k)}:{},style:{width:_(X??0),flexShrink:0,alignSelf:"stretch",...ae?{pointerEvents:"auto"}:{}}})},Te=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:F,"aria-hidden":"true",children:" "}),ze=()=>a.jsx("span",{className:`${e}-entry-counter`,style:le,"aria-live":"polite","aria-atomic":"true",children:bv(me,ye,v,t)}),Fe=()=>Gt?o&&kt?a.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[ze(),a.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${as(U)} + ${U}))`,width:as(U),height:"100%",pointerEvents:"auto",zIndex:3}})]}):ze():null,yt=()=>!Gt&&!kt?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Be,children:[Fe(),kt?Tt():null]}),Ot=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Gt||Ht?Te():null,Et?W("single-row"):null,It(re),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),yt(),bn()]}),ut=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Gt||Ht?Te():null,Et?W("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:ve&&D?{minHeight:D}:void 0,children:[a.jsx("div",{ref:at,className:ft,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:xn(H||re)}),a.jsxs("div",{ref:Ze,className:ft,style:{position:ve?"absolute":"relative",inset:ve?0:void 0,width:"100%",...ve&&Y?{width:Y,maxWidth:"100%"}:void 0},children:[vt&&ve?a.jsx("div",{className:`${$t} ${e}-titles-fade-out`,children:xn(vt)}):null,a.jsx("div",{className:`${e}-titles-layer-in${ve?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:xn(re)})]})]}),yt(),bn()]}),Tt=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:A.scalingValue(j??0,i),height:A.scalingValue(j??0,i),marginRight:ce,"--close-icon-hover-color":w},children:[a.jsx("button",{ref:be,type:"button",className:`${e}-close-icon-inner`,onClick:Ue,"aria-label":"Close",children:a.jsx(gn,{url:I??"",fill:E,hoverFill:i&&!r?E:w,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:ce,height:"100%",pointerEvents:"auto"}})]}),Yt=($e,Ke)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[Gt||Ht?Te():null,Et?W("two-row"):null,Ke!==void 0?a.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Ke},children:$e}):a.jsxs(a.Fragment,{children:[$e,a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),yt()]}),It=$e=>{if(!$e)return null;const Ke=Ti(e,$e,F,ie,T);return a.jsx(a.Fragment,{children:Ke.map(k=>wt(k,"single-row",Wt(Ke,k,"single-row")))})},Zt=$e=>{if(!$e)return null;const Ke=Ti(e,$e,F,ie,T),k=Ke.find(ae=>ae.prefix==="title1");return k?wt(k,"two-row-top",Wt(Ke,k,"two-row-top")):null},on=($e,Ke=!1)=>{const k=$e?Ti(e,$e,F,ie,T):[],ae=k.filter(Ge=>Ge.prefix==="title2"||Ge.prefix==="title3"),he=o&&Ke;return ae.length>0||he||(N??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[ae.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[ae.map(Ge=>wt(Ge,"two-row-bottom",Wt(k,Ge,"two-row-bottom"))),Ke&&o?a.jsxs(a.Fragment,{children:[pi(),Kn()]}):null]}):null,(N??0)>0||he?a.jsx("div",{"data-controls":he?"titleRowMarginBottom":void 0,"data-controls-axis":he?"y":void 0,"data-controls-reverse":he?"":void 0,className:he?`${e}-control`:void 0,style:{height:Xt,width:"100%",flexShrink:0,pointerEvents:he?"auto":"none"}}):null]}):null},Wn=($e,Ke=!1)=>a.jsxs(a.Fragment,{children:[Yt(Zt($e)),on($e,Ke)]}),xn=$e=>J?a.jsx("div",{className:`${e}-titles-row-two-row`,children:Wn($e)}):$e?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:It($e)}):null,ui=()=>{const $e=J?-1:Re.findIndex(ae=>ae.prefix==="title1"),Ke=!J&&(o||(X??0)>0)?(()=>{const ae=X??0,he=$e>=0?nt[$e]:mt.title1Width,Me=Math.max(ae,ii);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(he),style:{position:"absolute",top:0,left:0,width:_(Me),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,k=Re.flatMap((ae,he)=>{if(!ae.marginLeftKey)return[];const Me=gt[ae.marginLeftKey]??0,Ge=rp(Re,nt,gt,he)+jt(),dt=Math.max(Me,ii);return a.jsx("div",{"data-controls":ae.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(nt[he]),style:{position:"absolute",top:0,left:_(Ge),width:_(dt),height:"100%",pointerEvents:"auto"}},ae.marginLeftKey)});return Ke?[Ke,...k]:k},dn=()=>Re.map(($e,Ke)=>{const k=yn(Ke,nt),he=qt(Ke)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":$e.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(k),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:_(he),width:_(Pn),height:"100%",pointerEvents:"auto"}})},`${$e.widthKey}-junction`)}),pi=()=>St.flatMap(($e,Ke)=>{if(!$e.marginLeftKey)return[];const k=gt[$e.marginLeftKey]??0,ae=Nt(Ke),he=Math.max(k,ii),{resolvedWidth:Me}=Ct($e,"two-row-bottom");return a.jsx("div",{"data-controls":$e.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Me),style:{position:"absolute",top:0,left:_(ae),width:_(he),height:"100%",pointerEvents:"auto"}},$e.marginLeftKey)}),Kn=()=>St.map(($e,Ke)=>{const{maxWidth:k}=Ct($e,"two-row-bottom"),he=Bt(Ke)-Pn/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":$e.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(k),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:_(he),width:_(Pn),height:"100%",pointerEvents:"auto"}})},`${$e.widthKey}-junction`)}),bn=()=>!o||J?null:a.jsxs(a.Fragment,{children:[ui(),dn()]}),mi=$e=>{const Ke=!$e.objectFit&&li(x);return{className:`${e}-slide-image-cell${Ke?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:P,maxHeight:f,...Ke?{"--image-aspect-ratio":ja(x)}:{}}}},eo=$e=>$e.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":$e.objectFit}}:li(x)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},Sn=$e=>{if($e.length===0)return null;const Ke=$e.length>1,k=as(K),ae=`calc(-0.5 * (${k} + ${K}))`;if($e.length===1){const he=$e[0];return a.jsx("div",{...mi(he),children:a.jsx("img",{...eo(he),src:he.assetId,alt:he.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:Ke?{gap:K}:void 0,children:$e.map((he,Me)=>a.jsxs("div",{...mi(he),children:[a.jsx("img",{...eo(he),src:he.assetId,alt:he.name??"",draggable:!1}),o&&Ke&&Me<$e.length-1&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:ae,width:k,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${he.assetId}-${Me}`))})},Qn=!!(re!=null&&re.title2||re!=null&&re.title3||vt!=null&&vt.title2||vt!=null&&vt.title3||(N??0)>0||o),to=()=>a.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[a.jsx("div",{ref:at,className:ft,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Wn(H||re)}),a.jsxs("div",{ref:Ze,className:`${e}-titles-row-two-row`,style:{...ve&&D?{minHeight:D}:void 0,...ve&&Y?{width:Y,maxWidth:"100%"}:void 0},children:[Yt(a.jsxs("div",{className:ft,style:{position:ve?"absolute":"relative",inset:ve?0:void 0,width:"100%"},children:[vt&&ve?a.jsx("div",{className:`${et} ${e}-titles-fade-out`,children:Zt(vt)}):null,a.jsx("div",{className:`${e}-titles-layer-in${ve?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Zt(re)})]}),ve&&D?D:void 0),Qn?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[vt&&ve?a.jsx("div",{className:`${$t} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:on(vt)}):null,a.jsx("div",{className:`${e}-titles-layer-in${ve?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${J?` ${e}-titles-layer-in-stacked`:""}`,children:on(re,!0)})]}):null]})]}),no=()=>{const $e=Qn;return a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...$e?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:$e?void 0:{flex:"0 0 auto",height:"auto"},children:Wn(re,!0)}),bn()]})};return a.jsxs("div",{ref:Xe,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{lt||Ue()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:kt?void 0:-1,style:{opacity:ge?1:0,transition:"opacity 300ms ease",pointerEvents:ge?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:m,...it}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:ke,...pt,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:qe,onClick:$e=>$e.stopPropagation(),children:a.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":Se&&me.length>1?"true":"false",onPointerDown:Se?xt:void 0,onPointerUp:Se?Pt:void 0,onPointerCancel:Se?Vt:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[Mt&&Q?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:$e=>{$e.target===$e.currentTarget&&_e(ue)},children:a.jsx("div",{className:`${e}-slide-area`,children:Sn(Mt.images)})},`slide-out-${ue}`):null,a.jsx("div",{className:`${e}-slide-layer-in${Q?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:oe?Sn(oe.images):null})},`slide-in-${ue}-${ye}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Ee,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:te,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...J?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${J?` ${e}-lightbox-content-area-stacked`:""}`,children:Pe&&a.jsx("div",{className:`${e}-text-bar-cell${J?` ${e}-text-bar-cell-stacked`:""}`,style:J?void 0:{flex:1,minWidth:0,width:"100%"},children:J?M==="fade"?to():no():M==="fade"?ut():Ot()})})})]})]})]})};function ib(e){return`
|
|
15284
15284
|
.${e}-wrapper {
|
|
15285
15285
|
position: relative;
|
|
15286
15286
|
width: 100%;
|
|
@@ -15802,7 +15802,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
|
|
|
15802
15802
|
pointer-events: auto;
|
|
15803
15803
|
z-index: 10;
|
|
15804
15804
|
}
|
|
15805
|
-
`}const
|
|
15805
|
+
`}const ob=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r,metadata:l})=>{const{prefix:c}=A.useScopedStyles(),d=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:v}=e,x=s.useRef(null),[m,h]=s.useState(!1),[b,S]=s.useState(0),M=s.useRef(!1),y=s.useRef(!1),$=s.useRef(!1),R=s.useMemo(()=>(t??[]).filter(C=>Po(C).length>0),[t]),X=m&&R.length>0,B=!n,O=s.useCallback(()=>{B&&($.current=!0,hv(y.current,d),y.current=!1)},[B,d]),N=(C=0)=>{if(R.length===0||n&&!i&&!o)return;const I=pa(R,v),j=Math.max(0,Math.min(C,I.length-1));if(S(j),B){const E=ip();np(j+1,d,E),y.current=!E}h(!0)},z=s.useCallback(()=>{h(!1),$.current=!1},[]);return s.useEffect(()=>{!n||i||o||h(!1)},[n,i,o]),s.useEffect(()=>{if(!B||typeof window>"u")return;const C=window.history.scrollRestoration;return window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration=C}},[B]),s.useEffect(()=>{if(!B||M.current)return;M.current=!0;const C=kc(d);if(!C)return;const I=Ac(C,pa(R,v).length);I<0||(S(I),h(!0))},[R,d,B,v]),s.useEffect(()=>{if(!B)return;const C=()=>{if($.current){$.current=!1,h(!1);return}const I=kc(d);if(!I){h(!1);return}const j=Ac(I,pa(R,v).length);if(j<0){h(!1);return}y.current=!1,S(j),h(!0)};return window.addEventListener("popstate",C),()=>window.removeEventListener("popstate",C)},[R,d,B,v]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:x,className:`${c}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ib(c)}}),u?a.jsx("button",{type:"button",className:`${c}-cover ${li(p)?`${c}-ratio-wrapper-cover`:`${c}-ratio-wrapper-fit`}`,onClick:()=>N(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...li(p)?{"--image-aspect-ratio":ja(p)}:{}},"aria-label":"Open journal gallery",children:a.jsx("img",{className:`${c}-cover-image ${li(p)?`${c}-cover-image-cover`:`${c}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),X&&typeof document<"u"&&(()=>{const C=(r?document.getElementById(r):null)??document.body;return Un.createPortal(a.jsx(nb,{prefix:c,entries:R,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:b,enableUrlSync:B,journalItemId:d,onBeforeClose:O,onClose:z}),C)})()]})},rb=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
|
|
15806
15806
|
import { createPortal } from 'react-dom';
|
|
15807
15807
|
import { CommonComponentProps } from '../props';
|
|
15808
15808
|
import { useScopedStyles } from '../utils/useScopedStyles';
|
|
@@ -16567,7 +16567,7 @@ export type LightboxJournalSettings = {
|
|
|
16567
16567
|
closeIconColor: string;
|
|
16568
16568
|
closeIconHoverColor: string;
|
|
16569
16569
|
};
|
|
16570
|
-
`,eb="01M3SBP3P8CMVMM1ZZ0QVD2PPF",Wi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function tb(e){const t={};return t[bt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSettings")]={...Wi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSize")]={...Wi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[bt(e,"lineHeight")]={...Wi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[bt(e,"letterSpacing")]={...Wi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[bt(e,"wordSpacing")]={...Wi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[bt(e,"textAlign")]={...Wi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[bt(e,"textAppearance")]={...Wi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const nb=Li.reduce((e,t)=>({...e,...tb(t)}),{}),ib=Li.reduce((e,t)=>({...e,[bt(t,"fontFamily")]:"Goudy Bookletter 1911",[bt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[bt(t,"letterSpacing")]:0,[bt(t,"wordSpacing")]:0,[bt(t,"textAlign")]:"left",[bt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ys(e){return Li.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[bt(n,"fontSize")]=i),o!==void 0&&(t[bt(n,"lineHeight")]=o),t},{})}const ob=fv(),rb={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"}},...nb,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:"01M3QM74XESYN1HRYH9VRTZ5CK",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:eb,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...ib,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.08,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.04,...ys({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},t:{type:"A",imageGap:.05,maxHeight:80,maxWidth:40,closeIconMaxWidth:.03,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.16,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.03,...ys({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208,countFontSize:.0208,countLineHeight:.0208})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.0125,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...ys({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:[ob]}],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:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]}}},default:[{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"contain"},{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"contain"},{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"contain"}]}]}},ab={element:Zx,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:rb,sourceCode:Jx,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0},{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Li.map(e=>({path:`${bt(e,"fontFamily")}`}))]},fontRelations:{...Li.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${bt(t,"fontFamily")}`}),{})}},sb={sizeType:"custom",value:700,min:400,max:700};function Ca(e,t){return{widthPx:e,heightPx:e*t}}function qs(e,t,n,i,o,r){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,r/2),i-r/2)}}function ad(e,t,n,i){const{heightPx:o}=Ca(n,i);return qs(e/2,t/2,e,t,n,o)}function fp(e,t,n){for(const i of n){const{heightPx:o}=Ca(i.widthPx,i.aspectRatio),r=i.widthPx/2,l=o/2;if(e>=i.x-r&&e<=i.x+r&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function lb(e,t,n,i,o,r,l,c){if(o==="system")return"none";const d=i.getBoundingClientRect(),u=document.elementFromPoint(d.left+e,d.top+t);return u&&u.closest("a")?"none":fp(e,t,n)||r==="area"?l??"none":c??"none"}function sd(e,t,n){var c;const{sizeType:i,value:o,min:r,max:l}=t;return i==="custom"?o:i==="as is"?((c=n.get(e))==null?void 0:c.naturalWidth)??o:Math.round(Math.random()*(l-r)+r)}function cb(e){return`
|
|
16570
|
+
`,ab="01M3SBP3P8CMVMM1ZZ0QVD2PPF",Bi={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 sb(e){const t={};return t[bt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSettings")]={...Bi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSize")]={...Bi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[bt(e,"lineHeight")]={...Bi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[bt(e,"letterSpacing")]={...Bi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[bt(e,"wordSpacing")]={...Bi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[bt(e,"textAlign")]={...Bi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[bt(e,"textAppearance")]={...Bi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const lb=Mi.reduce((e,t)=>({...e,...sb(t)}),{}),cb=Mi.reduce((e,t)=>({...e,[bt(t,"fontFamily")]:"Goudy Bookletter 1911",[bt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[bt(t,"letterSpacing")]:0,[bt(t,"wordSpacing")]:0,[bt(t,"textAlign")]:"left",[bt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ys(e){return Mi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[bt(n,"fontSize")]=i),o!==void 0&&(t[bt(n,"lineHeight")]=o),t},{})}const db=wv(),ub={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"}},...lb,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:"01M3QM74XESYN1HRYH9VRTZ5CK",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:ab,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...cb,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.08,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.04,...ys({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},t:{type:"A",imageGap:.05,maxHeight:80,maxWidth:40,closeIconMaxWidth:.03,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.16,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.03,...ys({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208,countFontSize:.0208,countLineHeight:.0208})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.0125,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...ys({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:[db]}],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:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]}}},default:[{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"contain"},{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"contain"},{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"contain"}]}]}},pb={element:ob,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:ub,sourceCode:rb,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0},{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[...Mi.map(e=>({path:`${bt(e,"fontFamily")}`}))]},fontRelations:{...Mi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${bt(t,"fontFamily")}`}),{})}},mb={sizeType:"custom",value:700,min:400,max:700};function Ca(e,t){return{widthPx:e,heightPx:e*t}}function qs(e,t,n,i,o,r){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,r/2),i-r/2)}}function ad(e,t,n,i){const{heightPx:o}=Ca(n,i);return qs(e/2,t/2,e,t,n,o)}function wp(e,t,n){for(const i of n){const{heightPx:o}=Ca(i.widthPx,i.aspectRatio),r=i.widthPx/2,l=o/2;if(e>=i.x-r&&e<=i.x+r&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function gb(e,t,n,i,o,r,l,c){if(o==="system")return"none";const d=i.getBoundingClientRect(),u=document.elementFromPoint(d.left+e,d.top+t);return u&&u.closest("a")?"none":wp(e,t,n)||r==="area"?l??"none":c??"none"}function sd(e,t,n){var c;const{sizeType:i,value:o,min:r,max:l}=t;return i==="custom"?o:i==="as is"?((c=n.get(e))==null?void 0:c.naturalWidth)??o:Math.round(Math.random()*(l-r)+r)}function hb(e){return`
|
|
16571
16571
|
.${e}-root {
|
|
16572
16572
|
position: absolute;
|
|
16573
16573
|
top: 0;
|
|
@@ -16602,7 +16602,7 @@ export type LightboxJournalSettings = {
|
|
|
16602
16602
|
width: 32px;
|
|
16603
16603
|
height: 32px;
|
|
16604
16604
|
}
|
|
16605
|
-
`}function
|
|
16605
|
+
`}function fb(e){return new Promise(t=>{const n=new Image;n.onload=()=>{t({aspectRatio:n.naturalHeight/n.naturalWidth,naturalWidth:n.naturalWidth})},n.onerror=()=>{t({aspectRatio:1,naturalWidth:700})},n.src=e})}async function yb(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await fb(i)]));return new Map(n)}function vb({settings:e,content:t=[],isEditor:n}){const{prefix:i}=A.useScopedStyles(),[o,r]=s.useState(null),[l,c]=s.useState([]),[d,u]=s.useState(0),p=s.useRef(0),[v,x]=s.useState({x:0,y:0}),[m,h]=s.useState("none"),b=s.useRef({x:0,y:0}),[S,M]=s.useState(!1),[y,$]=s.useState(!1),R=s.useRef(new Map),{imageSize:X=mb,cursor:B="system",target:O="area",position:N="random",visible:z="all",defaultCursor:C=null,hoverCursor:I=null}=e,j=t.filter(P=>{var f;return!!((f=P==null?void 0:P.image)!=null&&f.assetId)}),E=s.useMemo(()=>hb(i),[i]),w=s.useCallback((P,f,U=l)=>{if(!o)return;const te=o.getBoundingClientRect(),ce=P-te.left,F=f-te.top;x({x:ce,y:F}),h(gb(ce,F,U,o,B,O,I,C))},[o,l,B,O,I,C]);s.useEffect(()=>{const P=[...j.map(U=>U.image.assetId),C,I].filter(U=>!!U);if(P.length===0){R.current=new Map,$(!0);return}let f=!1;return $(!1),yb(P).then(U=>{f||(R.current=U,$(!0))}),()=>{f=!0}},[t,C,I]),s.useEffect(()=>{if(!o)return;const P=U=>{U.stopPropagation(),b.current={x:U.clientX,y:U.clientY},w(U.clientX,U.clientY)},f=()=>{S&&w(b.current.x,b.current.y)};return o.addEventListener("mousemove",P),window.addEventListener("scroll",f,!0),()=>{o.removeEventListener("mousemove",P),window.removeEventListener("scroll",f,!0)}},[o,S,w]),s.useEffect(()=>{!o||!S||w(b.current.x,b.current.y)},[l,o,S,w]),s.useEffect(()=>{S||h("none")},[S]);const L=(P,f,U,te={})=>{var J,Se;if(!((J=P==null?void 0:P.image)!=null&&J.assetId))return null;const ce=((Se=R.current.get(P.image.assetId))==null?void 0:Se.aspectRatio)??1,F=sd(P.image.assetId,X,R.current),{heightPx:ie}=Ca(F,ce);let T=0,le=0;return N==="same"?{x:T,y:le}=ad(f,U,F,ce):(T=te.x??Math.random()*f,le=te.y??Math.random()*U,{x:T,y:le}=qs(T,le,f,U,F,ie)),{id:p.current++,assetId:P.image.assetId,link:P.link,name:P.image.name,x:T,y:le,xRatio:T/f,yRatio:le/U,aspectRatio:ce,widthPx:F}},V=()=>{if(!o)return;const P=o.getBoundingClientRect(),f=P.width,U=P.height;f===0||U===0||c(te=>te.length===0?te:te.map(ce=>{const F=X.sizeType==="random"?ce.widthPx:sd(ce.assetId,X,R.current),{heightPx:ie}=Ca(F,ce.aspectRatio);if(N==="same"){const{x:J,y:Se}=ad(f,U,F,ce.aspectRatio);return{...ce,x:J,y:Se,widthPx:F}}const{x:T,y:le}=qs(ce.xRatio*f,ce.yRatio*U,f,U,F,ie);return{...ce,x:T,y:le,widthPx:F}}))};s.useEffect(()=>{if(!o||j.length===0||!y)return;const P=o.getBoundingClientRect(),f=P.width,U=P.height,te=L(j[0],f,U);te&&(c([te]),u(j.length>1?1:0))},[X,N,o,t,y]),s.useEffect(()=>{if(!o)return;V();const P=new ResizeObserver(V);return P.observe(o),window.addEventListener("resize",V),()=>{P.disconnect(),window.removeEventListener("resize",V)}},[o,N,X,l.length]),s.useEffect(()=>{z==="last One"&&c(P=>P.length>0?[P[P.length-1]]:[])},[z]);const _=P=>{if(!o||j.length===0||!y)return;const f=o.getBoundingClientRect(),U=P.clientX-f.left,te=P.clientY-f.top;if(O==="image"&&!wp(U,te,l))return;let ce=0,F=0;N==="on Click"?(ce=U,F=te):N==="same"?(ce=f.width/2,F=f.height/2):(ce=Math.random()*f.width,F=Math.random()*f.height);const ie=j[d%j.length],T=L(ie,f.width,f.height,{x:ce,y:F});if(!T)return;const le=z==="all"?[...l,T]:[T];c(le),u(J=>(J+1)%j.length),w(P.clientX,P.clientY,le)},K=B==="custom"&&m!=="none";return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:E}}),a.jsxs("div",{ref:r,onClick:_,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),className:`${i}-root`,style:{cursor:K?"none":"default"},children:[l.map(P=>a.jsx("div",{className:`${i}-wrapper`,style:{top:`${P.y}px`,left:`${P.x}px`,width:`${P.widthPx}px`,cursor:K?"none":"default"},children:O==="area"&&P.link?a.jsx("a",{href:P.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:a.jsx("img",{src:P.assetId,alt:P.name,className:`${i}-image`})}):a.jsx("img",{src:P.assetId,alt:P.name,className:`${i}-image`})},P.id)),S&&K&&a.jsx("div",{className:`${i}-cursor`,style:{left:`${v.x}px`,top:`${v.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const xb=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
16606
16606
|
import { CommonComponentProps } from '../props';
|
|
16607
16607
|
import { useScopedStyles } from '../utils/index';
|
|
16608
16608
|
|
|
@@ -17132,7 +17132,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
|
|
|
17132
17132
|
</>
|
|
17133
17133
|
);
|
|
17134
17134
|
}
|
|
17135
|
-
`,
|
|
17135
|
+
`,bb={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"}},required:["assetId","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"Slider-1.png"},link:""},{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"Slider-2.png"},link:""},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"Slider-3.png"},link:""},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"Slider-4.png"},link:""},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"Slider-5.png"},link:""},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"Slider-6.png"},link:""},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"Slider-7.png"},link:""}]},settings:{sizing:"manual",properties:{imageSize:{type:"object",scope:"layout",title:"Img Size",display:{type:"toggle-cycle-numeric-input",enum:["custom","as is","random"],inputs:{custom:"single","as is":"none",random:"range"},defaultValue:700,defaultMin:400,defaultMax:700},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},cursor:{type:"string",scope:"common",title:"Cursor",display:{type:"toggle-cycle",enum:["system","custom"]}},target:{type:"string",scope:"common",title:"Target",display:{type:"toggle-cycle",enum:["area","image"]}},position:{type:"string",scope:"common",title:"Position",display:{type:"toggle-cycle",enum:["random","same","on Click"]}},visible:{type:"string",scope:"common",title:"Visible",display:{type:"toggle-cycle",enum:["all","last One"]}},defaultCursor:{type:["string","null"],scope:"common",title:"Default",display:{type:"settings-image-input",visible:!1}},hoverCursor:{type:["string","null"],scope:"common",title:"Hover",display:{type:"settings-image-input",visible:!1}}},defaults:{imageSize:{sizeType:"custom",value:700,min:400,max:700},cursor:"system",target:"area",position:"random",visible:"all",defaultCursor:null,hoverCursor:null},layoutDefaults:{m:{imageSize:{sizeType:"custom",value:500,min:400,max:700}},t:{imageSize:{sizeType:"custom",value:600,min:400,max:700}},d:{imageSize:{sizeType:"custom",value:700,min:400,max:700}}},displayRules:[{if:{name:"cursor",value:"custom"},then:{name:"properties.defaultCursor.display.visible",value:!0}},{if:{name:"cursor",value:"custom"},then:{name:"properties.hoverCursor.display.visible",value:!0}}],layout:["__componentName__","imageSize","cursor","target","position","visible","defaultCursor","hoverCursor"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["imageSize"]},{type:"row",title:"",items:["cursor","target"]},{type:"row",title:"",items:["position","visible"]},{type:"row",title:"Custom Cursor",items:["defaultCursor","hoverCursor"]}]}]},Sb={element:vb,id:"click-gallerie",name:"Click",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},schema:bb,sourceCode:xb,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"defaultCursor"},{path:"hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},wb=100,$b=70,vi="cubic-bezier(0.86, 0, 0.07, 1)";function Cb(e){return`
|
|
17136
17136
|
.${e}-wrapper {
|
|
17137
17137
|
position: relative;
|
|
17138
17138
|
width: 100%;
|
|
@@ -17167,34 +17167,34 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
|
|
|
17167
17167
|
}
|
|
17168
17168
|
.${e}-incoming-next {
|
|
17169
17169
|
z-index: 4;
|
|
17170
|
-
transition: transform var(--${e}-transition-ms) ${
|
|
17170
|
+
transition: transform var(--${e}-transition-ms) ${vi};
|
|
17171
17171
|
}
|
|
17172
17172
|
.${e}-incoming-prev {
|
|
17173
17173
|
z-index: 4;
|
|
17174
|
-
transition: transform var(--${e}-transition-ms) ${
|
|
17174
|
+
transition: transform var(--${e}-transition-ms) ${vi};
|
|
17175
17175
|
}
|
|
17176
17176
|
.${e}-outgoing {
|
|
17177
17177
|
will-change: transform;
|
|
17178
17178
|
}
|
|
17179
17179
|
.${e}-outgoing-next {
|
|
17180
17180
|
z-index: 3;
|
|
17181
|
-
transition: transform var(--${e}-transition-ms) ${
|
|
17181
|
+
transition: transform var(--${e}-transition-ms) ${vi};
|
|
17182
17182
|
}
|
|
17183
17183
|
.${e}-outgoing-prev {
|
|
17184
17184
|
z-index: 3;
|
|
17185
|
-
transition: transform var(--${e}-transition-ms) ${
|
|
17185
|
+
transition: transform var(--${e}-transition-ms) ${vi};
|
|
17186
17186
|
}
|
|
17187
17187
|
.${e}-outgoing-next .${e}-effect-image {
|
|
17188
|
-
transition: filter var(--${e}-transition-ms) ${
|
|
17188
|
+
transition: filter var(--${e}-transition-ms) ${vi};
|
|
17189
17189
|
}
|
|
17190
17190
|
.${e}-outgoing-prev .${e}-effect-image {
|
|
17191
|
-
transition: filter var(--${e}-transition-ms) ${
|
|
17191
|
+
transition: filter var(--${e}-transition-ms) ${vi};
|
|
17192
17192
|
}
|
|
17193
17193
|
.${e}-incoming .${e}-effect-image {
|
|
17194
|
-
transition: filter var(--${e}-transition-ms) ${
|
|
17194
|
+
transition: filter var(--${e}-transition-ms) ${vi};
|
|
17195
17195
|
}
|
|
17196
17196
|
.${e}-background .${e}-effect-image {
|
|
17197
|
-
transition: filter var(--${e}-transition-ms) ${
|
|
17197
|
+
transition: filter var(--${e}-transition-ms) ${vi};
|
|
17198
17198
|
}
|
|
17199
17199
|
.${e}-snap .${e}-incoming,
|
|
17200
17200
|
.${e}-snap .${e}-outgoing,
|
|
@@ -17242,7 +17242,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
|
|
|
17242
17242
|
display: block;
|
|
17243
17243
|
pointer-events: none;
|
|
17244
17244
|
}
|
|
17245
|
-
`}function
|
|
17245
|
+
`}function Tb(e){return e==="blur"?$b:e==="greyscale"?wb:0}function Ko(e,t=1,n=1){const i=Tb(e)*Math.max(0,Math.min(1,t));if(e==="greyscale")return`grayscale(${i}%)`;if(e==="blur"){const o=i/4;return o<=0?"none":`blur(${o/Math.max(n,1)}px)`}return"none"}function ld(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function Ib(e,t){return t<=1?0:(e-1+t)%t}function Lb(e,t=1){return!e||e.height===0?t:e.width/e.height}function Pb(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const r=e*i/100,l=t*o/100;let c=r,d=c/n;return d>l&&(d=l,c=d*n),{widthPercent:c/e*100,heightPercent:d/t*100}}function cd(e,t,n){if(e<=0||t<=0)return 1;const i=e*n.widthPercent/100,o=t*n.heightPercent/100;return i<=0||o<=0?1:Math.max(e/i,t/o)}function $p(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function dd(e,t,n){return{...$p(e),[`--${n}-stage-scale`]:t}}function Rb(e,t){[...new Set(e.filter(Boolean))].forEach(i=>{const o=new Image;o.onload=()=>{o.naturalWidth>0&&o.naturalHeight>0&&t(i,{width:o.naturalWidth,height:o.naturalHeight})},o.src=i})}function Mb({settings:e,content:t,isEditor:n,isPreviewMode:i}){var xe,g,G,Q,ne,ue,q;const{prefix:o}=A.useScopedStyles(),r=s.useMemo(()=>Cb(o),[o]),{imageSize:l,maxWidth:c,maxHeight:d,transition:u=1e3,bgImage:p="greyscale"}=e,v=t??[],x=ld(v.length),[m,h]=s.useState(x.activeIndex),[b,S]=s.useState(x.backgroundIndex),[M,y]=s.useState(!1),[$,R]=s.useState(!1),[X,B]=s.useState(null),[O,N]=s.useState(null),[z,C]=s.useState(0),[I,j]=s.useState(1),[E,w]=s.useState("none"),[L,V]=s.useState("next"),[_,K]=s.useState({}),[P,f]=s.useState({width:0,height:0}),U=s.useRef(null),te=s.useRef(null),ce=!n||!!i,F=l??60,ie=Math.max(10,Math.min(100,c??F)),T=Math.max(10,Math.min(100,d??F)),le=Math.max(100,u),J=Ko(p),Se=s.useCallback(D=>{const se=Lb(D?_[D]:void 0);return Pb(P.width,P.height,se,ie,T)},[P.height,P.width,_,T,ie]);s.useEffect(()=>{const D=te.current;if(!D)return;const se=new ResizeObserver(([Y])=>{const{width:pe,height:H}=Y.contentRect;f({width:pe,height:H})});return se.observe(D),()=>se.disconnect()},[]),s.useEffect(()=>{const D=(t??[]).map(se=>{var Y;return(Y=se.image)==null?void 0:Y.assetId}).filter(se=>!!se);Rb(D,(se,Y)=>{K(pe=>{var H,Ie;return((H=pe[se])==null?void 0:H.width)===Y.width&&((Ie=pe[se])==null?void 0:Ie.height)===Y.height?pe:{...pe,[se]:Y}})})},[t]),s.useEffect(()=>{const{backgroundIndex:D,activeIndex:se}=ld(v.length);h(se),S(D),y(!1),R(!1),B(null),N(null),C(0),j(1),w("none"),V("next")},[v.length,t]),s.useEffect(()=>()=>{U.current&&clearTimeout(U.current)},[]);const Le=s.useCallback(D=>{var de,Z,Ne,Oe;if(!ce||M||v.length<=1)return;const se=D==="next"?(m+1)%v.length:(m-1+v.length)%v.length,Y=Se((Z=(de=v[m])==null?void 0:de.image)==null?void 0:Z.assetId),pe=Se((Oe=(Ne=v[se])==null?void 0:Ne.image)==null?void 0:Oe.assetId),H=cd(P.width,P.height,Y),Ie=cd(P.width,P.height,pe);U.current&&clearTimeout(U.current),V(D),R(!0),y(!0),D==="next"?(B(m),N(se),C(0),j(1),w(Ko(p,0,1))):(S(Ib(se,v.length)),B(se),N(m),C(1),j(Ie),w(Ko(p,1,Ie))),requestAnimationFrame(()=>{R(!1),requestAnimationFrame(()=>{D==="next"?(C(1),j(H),w(Ko(p,1,H))):(C(0),j(1),w(Ko(p,0,1)))})}),U.current=setTimeout(()=>{D==="next"&&S(m),h(se),B(null),N(null),y(!1)},le)},[m,p,P.height,P.width,Se,M,ce,v,le]),me=v[m],ye=b!==null?v[b]:null,ee=X!==null?v[X]:null,oe=O!==null?v[O]:null,re=v.length<=1?0:(m-1+v.length)%v.length,ge=v.length<=1?0:(m+1)%v.length,we=Se((xe=me==null?void 0:me.image)==null?void 0:xe.assetId),Ae=Se((g=ee==null?void 0:ee.image)==null?void 0:g.assetId),fe=Se((G=oe==null?void 0:oe.image)==null?void 0:G.assetId),ve={[`--${o}-transition-ms`]:`${le}ms`};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),a.jsxs("div",{ref:te,className:Rt(`${o}-wrapper`,$&&`${o}-snap`,n&&!i&&`${o}-editor`),style:ve,"aria-label":"Zoom gallery",children:[((Q=ye==null?void 0:ye.image)==null?void 0:Q.assetId)&&a.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:ye.image.assetId,alt:"",style:{filter:J}})}),M&&((ne=ee==null?void 0:ee.image)==null?void 0:ne.assetId)&&a.jsx("div",{className:Rt(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${L}`),style:dd(Ae,I,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:ee.image.assetId,alt:"",style:{filter:E}})}),M&&((ue=oe==null?void 0:oe.image)==null?void 0:ue.assetId)&&a.jsx("div",{className:Rt(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${L}`),style:dd(fe,z,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-image`,src:oe.image.assetId,alt:""})}),!M&&((q=me==null?void 0:me.image)==null?void 0:q.assetId)&&a.jsx("div",{className:Rt(`${o}-stage`,`${o}-foreground`),style:$p(we),children:a.jsx("img",{className:`${o}-image`,src:me.image.assetId,alt:me.image.name??""})}),ce&&v.length>1&&!M&&a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:Rt(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Le("prev"),"aria-label":`Show previous image (${re+1} of ${v.length})`}),a.jsx("button",{type:"button",className:Rt(`${o}-nav`,`${o}-nav-next`),onClick:()=>Le("next"),"aria-label":`Show next image (${ge+1} of ${v.length})`})]})]})]})}const Eb=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
17246
17246
|
import cn from 'classnames';
|
|
17247
17247
|
import { CommonComponentProps } from '../props';
|
|
17248
17248
|
import { useScopedStyles } from '../utils/useScopedStyles';
|
|
@@ -17761,7 +17761,7 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
|
|
|
17761
17761
|
</>
|
|
17762
17762
|
);
|
|
17763
17763
|
}
|
|
17764
|
-
`,
|
|
17764
|
+
`,kb={type:"object",version:1,settings:{sizing:"manual",properties:{maxWidth:{type:"number",scope:"common",title:"Max width (%)",display:{type:"percentage-input"},min:10,max:100},maxHeight:{type:"number",scope:"common",title:"Max height (%)",display:{type:"percentage-input"},min:10,max:100},transition:{type:"number",scope:"common",title:"Transition (ms)",display:{type:"common-numeric-input"},min:100,max:9999},bgImage:{type:"string",scope:"common",title:"BG image",display:{type:"toggle-cycle",enum:["greyscale","blur","as is"]}}},defaults:{maxWidth:60,maxHeight:60,transition:700,bgImage:"greyscale"},layout:["__componentName__","maxWidth","maxHeight","transition","bgImage"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["maxWidth","maxHeight"]},{type:"row",title:"",items:["transition","bgImage"]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",isObjectFitEditable:!1}}}},default:[{image:{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:""}},{image:{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:""}},{image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:""}},{image:{assetId:"01M3QM74XE20C38X4NND20C5R4",name:""}},{image:{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:""}},{image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:""}},{image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:""}}]}},Ab={element:Mb,id:"scale",name:"Scale",category:"galleries",version:1,defaultSize:{d:{width:920,height:540},m:{width:"100%",height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Scale.mp4"},schema:kb,sourceCode:Eb,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Fb={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},Nb=["hover","active"],vs={left:"flex-start",center:"center",right:"flex-end"};function _b(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 Hb(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Wb(e){const t=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-box-shadow-color, transparent)`,n=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-inner-box-shadow-color, transparent)`,i=`${t}, ${n}`,o=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-hover-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,r=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-hover-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,l=`${o}, ${r}`,c=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-active-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,d=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-active-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,u=`${c}, ${d}`,p=`0 4px 12px rgba(0, 0, 0, 0.15), ${n}`,v=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,x=`.${e}-button:hover, ${v}`,m=h=>`.${e}-hover-effect-${h}:hover, .${e}-hover-effect-${h}:focus-visible, a:focus-visible .${e}-hover-effect-${h}`;return`
|
|
17765
17765
|
.${e}-root {
|
|
17766
17766
|
line-height: 0;
|
|
17767
17767
|
}
|
|
@@ -17924,7 +17924,7 @@ a:focus-visible .${e}-hover-effect-content-roll .${e}-content-roll-layer-hover,
|
|
|
17924
17924
|
transform: translateY(-50%);
|
|
17925
17925
|
opacity: 1;
|
|
17926
17926
|
}
|
|
17927
|
-
${
|
|
17927
|
+
${x} {
|
|
17928
17928
|
background-color: var(--${e}-hover-background-color, var(--${e}-background-color));
|
|
17929
17929
|
color: var(--${e}-hover-text-color, var(--${e}-text-color));
|
|
17930
17930
|
border-color: var(--${e}-hover-border-color, var(--${e}-border-color));
|
|
@@ -18003,7 +18003,7 @@ a:active .${e}-button .${e}-icon-image,
|
|
|
18003
18003
|
height: calc(1em * var(--${e}-icon-scale, 1));
|
|
18004
18004
|
width: calc(1em * var(--${e}-icon-scale, 1));
|
|
18005
18005
|
}
|
|
18006
|
-
`}function xs(e,t,n="",i,o){const r=t();return a.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[a.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:r}),a.jsxs("span",{className:`${e}-content-roll-viewport`,children:[a.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),a.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function ud(e,t,n="fill",i=100,o=0,r){if(!t)return null;const l=a.jsx(
|
|
18006
|
+
`}function xs(e,t,n="",i,o){const r=t();return a.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[a.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:r}),a.jsxs("span",{className:`${e}-content-roll-viewport`,children:[a.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),a.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function ud(e,t,n="fill",i=100,o=0,r){if(!t)return null;const l=a.jsx(gn,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return a.jsx("span",{className:`${e}-icon ${e}-icon-inline`,style:{[`--${e}-icon-scale`]:i/100},"aria-hidden":"true",children:l});if(n==="fixed"&&o>0){const c=A.scalingValue(o,r);return a.jsx("span",{className:`${e}-icon`,style:{width:c,height:c},"aria-hidden":"true",children:l})}return a.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:l})}function Ob({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:r}=A.useScopedStyles(),l=s.useMemo(()=>Wb(r),[r]),{type:c="a",label:d="Button",icon:u,alignment:p="center",alignA:v,order:x="text-icon",gap:m=0,iconSize:h=0,iconWidthC:b=0,dimensions:S=!1,padding:M={top:0,right:0,bottom:0,left:0},cornerRadius:y=0,boxShadow:$={top:0,left:0,right:0,bottom:0},boxShadowColor:R="rgba(0, 0, 0, 0)",innerBoxShadow:X={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:B="rgba(0, 0, 0, 0)",stroke:O=0,blur:N=0,backgroundColor:z="#000000",textColor:C="#ffffff",borderColor:I="#ffffff",iconColor:j="#ffffff",hoverEffect:E="none",fontFamily:w,fontSettings:L,fontSize:V,lineHeight:_,letterSpacing:K=0,wordSpacing:P=0,textAppearance:f,stateOverrides:U,minWidth:te=0,minHeight:ce=0,width:F=0,height:ie=0}=e,T=A.buildColorVars(r,{backgroundColor:z,textColor:C,borderColor:I,iconColor:j,boxShadowColor:R,innerBoxShadowColor:B},Fb,Nb,U),le=i&&i!=="default"?`${r}-state-${i}`:"",J=t&&!n?`${r}-editing`:"",Se=E!=="none"&&(!t||n||i==="hover")?`${r}-hover-effect-${E}`:"",Le=E==="reveal"||E==="swipe",me=E==="content-roll",ye=E==="reveal"&&(!t||n),ee=S===!0,re=c==="a"?v??p:p,ge=c==="c",we=c!=="b",Ae={fontSettings:{fontFamily:w,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:V??.01,lineHeight:_,letterSpacing:K,wordSpacing:P,textAppearance:f,color:C},ve={...we?pn(nn(Ae,t)):{},[`--${r}-box-shadow-x`]:A.scalingValue($.left,t),[`--${r}-box-shadow-y`]:A.scalingValue($.top,t),[`--${r}-box-shadow-blur`]:A.scalingValue($.right,t),[`--${r}-box-shadow-spread`]:A.scalingValue($.bottom,t),[`--${r}-inner-box-shadow-x`]:A.scalingValue(X.left,t),[`--${r}-inner-box-shadow-y`]:A.scalingValue(X.top,t),[`--${r}-inner-box-shadow-blur`]:A.scalingValue(X.right,t),[`--${r}-inner-box-shadow-spread`]:A.scalingValue(X.bottom,t),[`--${r}-backdrop-blur`]:N>0?`blur(${A.scalingValue(N,t)})`:void 0,paddingTop:A.scalingValue(M.top,t),paddingRight:A.scalingValue(M.right,t),paddingBottom:A.scalingValue(M.bottom,t),paddingLeft:A.scalingValue(M.left,t),borderRadius:A.scalingValue(y,t),borderWidth:A.scalingValue(O,t),...ge?{}:{justifyContent:vs[re],textAlign:re},...ge&&!me?{gap:A.scalingValue(m,t)}:{},...ee?{width:A.scalingValue(F,t),height:A.scalingValue(ie,t)}:{minWidth:A.scalingValue(te,t),minHeight:A.scalingValue(ce,t),...ge?{width:"100%"}:{}}};let xe;const g={display:"inline-flex",alignItems:"center",justifyContent:ge?vs[re]:vs[c==="a"?re:"center"],gap:ge?A.scalingValue(m,t):void 0,width:"100%",height:"100%",...c==="a"?{textAlign:re}:{}};if(c==="b"){const ne=()=>ud(r,u,h>0?"fixed":"fill",100,h,t);xe=me?xs(r,ne,`${r}-icon-roll`,void 0,g):ne()}else if(c==="c"){const ne=()=>{const ue=a.jsx("span",{className:`${r}-text`,style:{textAlign:re},children:d}),q=ud(r,u,b>0?"fixed":"fill",100,b,t);return x==="icon-text"?a.jsxs(a.Fragment,{children:[q,ue]}):a.jsxs(a.Fragment,{children:[ue,q]})};xe=me?xs(r,ne,`${r}-icon-text-roll`,void 0,g):ne()}else xe=me?xs(r,()=>d,`${r}-label-roll`,void 0,g):Le?a.jsx("span",{className:`${r}-button-inner`,children:d}):d;const G=ye?ne=>_b(ne,r):void 0,Q=ye?ne=>Hb(ne,r):void 0;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),a.jsx("div",{className:`${r}-root`,style:T,children:a.jsx("div",{className:`${r}-wrapper ${le} ${J}`.trim(),children:a.jsx("div",{className:`${r}-button ${Se}`.trim(),style:ve,onMouseEnter:G,onMouseLeave:Q,role:"button",tabIndex:o||t&&!n?void 0:0,children:xe})})})]})}const Db=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
|
|
18007
18007
|
import { SvgImage } from '../helpers/SvgImage/SvgImage';
|
|
18008
18008
|
import { CommonComponentProps } from '../props';
|
|
18009
18009
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
|
|
@@ -18635,7 +18635,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
|
|
|
18635
18635
|
</>
|
|
18636
18636
|
);
|
|
18637
18637
|
}
|
|
18638
|
-
`,Nb={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},_b=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],Hb={type:"object",version:1,settings:{sizing:"auto",hasLinkParameter:!0,properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},label:{type:"string",scope:"common",title:"Label",display:{type:"label-input"}},icon:{type:["string","null"],scope:"common",title:"Icon",display:{type:"settings-image-input",visible:!1}},alignment:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"]}},alignA:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"],visible:!1}},order:{type:"string",scope:"layout",title:"Order",display:{type:"toggle-cycle",enum:["text-icon","icon-text"],visible:!1}},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconSize:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconWidthC:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},dimensions:{type:"boolean",scope:"layout",title:"Dimensions",display:{type:"toggle",enum:["auto","fixed"]}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}},boxShadow:{type:"object",scope:"layout",title:"Shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},boxShadowColor:{type:"string",scope:"common",title:"Shadow Default",titleByState:{default:"Shadow Default",hover:"Shadow Hover",active:"Shadow Active"},display:{type:"palette-color-picker"}},innerBoxShadow:{type:"object",scope:"layout",title:"Inner shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},innerBoxShadowColor:{type:"string",scope:"common",title:"Inner Shadow Default",titleByState:{default:"Inner Shadow Default",hover:"Inner Shadow Hover",active:"Inner Shadow Active"},display:{type:"palette-color-picker"}},stroke:{type:"number",scope:"layout",title:"Stroke Width",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"number",scope:"layout",title:"Blur",display:{type:"numeric-input"},min:0,max:100},backgroundColor:{type:"string",scope:"common",title:"BG Default",titleByState:{default:"BG Default",hover:"BG Hover",active:"BG Active"},display:{type:"palette-color-picker"}},textColor:{type:"string",scope:"common",title:"Text Default",titleByState:{default:"Text Default",hover:"Text Hover",active:"Text Active"},display:{type:"palette-color-picker"}},borderColor:{type:"string",scope:"common",title:"Border Default",titleByState:{default:"Border Default",hover:"Border Hover",active:"Border Active"},display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover",active:"Icon Active"},display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},hoverEffect:{type:"string",scope:"layout",title:"Hover effect",display:{type:"toggle-cycle",enum:["none","scale-up","lift","reveal","swipe","content-roll"]}},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},fontSettings:{...Nb.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},fontSize:{type:"number",scope:"layout",title:"Font size",display:{type:"font-size"}},lineHeight:{type:"number",scope:"layout",title:"Line height",display:{type:"line-height-input"}},letterSpacing:{type:"number",scope:"layout",title:"Letter spacing",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",scope:"layout",title:"Word spacing",display:{type:"word-spacing-input"}},textAppearance:{type:"object",scope:"layout",title:"Text appearance",display:{type:"text-appearance"}},minWidth:{type:"number",scope:"layout",title:"Min width",display:{type:"numeric-input"},min:0,max:9999},minHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input",visible:!1},min:0,max:9999},height:{type:"number",scope:"layout",title:"Height",display:{type:"numeric-input",visible:!1},min:0,max:9999}},defaults:{label:"Button",icon:"01M3QM74XG7DQZZXTPG1E8EBBC",boxShadowColor:"#000000",innerBoxShadowColor:"#000000",backgroundColor:"#2E12F0",textColor:"#ffffff",borderColor:"#ffffff",iconColor:"#ffffff",fontFamily:"Arial",fontSettings:{fontWeight:400,fontStyle:"normal"},blur:0,stateOverrides:{hover:{backgroundColor:"#3642EF"},active:{backgroundColor:"#475FFF"}}},layoutDefaults:{m:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/375,right:20/375,bottom:10/375,left:20/375},minWidth:0/375,minHeight:0/375,width:100/375,height:100/375,cornerRadius:20/375,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/375,gap:10/375,iconWidthC:16/375,fontSize:16/375,lineHeight:16/375,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},t:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/768,right:20/768,bottom:10/768,left:20/768},minWidth:0/768,minHeight:0/768,width:100/768,height:100/768,cornerRadius:20/768,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/768,gap:10/768,iconWidthC:16/768,fontSize:16/768,lineHeight:16/768,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},d:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/1440,right:20/1440,bottom:10/1440,left:20/1440},minWidth:0/1440,minHeight:0/1440,width:100/1440,height:100/1440,cornerRadius:20/1440,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/1440,gap:10/1440,iconWidthC:16/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}},layout:["__componentName__","type","label","icon","alignment","order","gap","iconSize","iconWidthC","hoverEffect",{type:"row",title:"",items:["dimensions","padding"]},"cornerRadius","blur","boxShadow","boxShadowColor","innerBoxShadow","innerBoxShadowColor",{type:"row",title:"",items:["stroke","borderColor"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]}],displayRules:[{if:{name:"type",value:"a"},then:{name:"properties.icon.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignment.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignA.display.visible",value:!0}},{if:{name:"type",value:"a"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"b"},then:{name:"properties.label.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontFamily.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSettings.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSize.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.lineHeight.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.letterSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.wordSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.textAppearance.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.iconSize.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.order.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.iconWidthC.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.gap.display.visible",value:!0}},{if:{name:"stroke",value:0},then:{name:"properties.borderColor.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minWidth.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minHeight.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.width.display.visible",value:!0}},{if:{name:"dimensions",value:!0},then:{name:"properties.height.display.visible",value:!0}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["label","icon","iconSize","alignA"]},{type:"row",title:"",items:["alignment","order"]},{type:"row",title:"",items:["gap","iconWidthC"]},{type:"row",title:"",items:["dimensions","padding"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]},{type:"row",title:"",items:["hoverEffect","cornerRadius"]},{type:"row",title:"",items:["blur"]},{type:"row",title:"",items:["boxShadow"]},{type:"row",title:"",items:["innerBoxShadow"]},{type:"row",title:"",items:["stroke"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily","fontSettings",{type:"row",title:"",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAppearance"]}],paletteBookmark:{items:[..._b],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],hover:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],active:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"]}},states:["default","hover","active"]},Wb={element:Ab,id:"simple-button",name:"Simple Button",category:"ui-elements",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/button-preview.png"},schema:Hb,sourceCode:Fb,assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}};function Ob(e){return`
|
|
18638
|
+
`,Bb={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},zb=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],jb={type:"object",version:1,settings:{sizing:"auto",hasLinkParameter:!0,properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},label:{type:"string",scope:"common",title:"Label",display:{type:"label-input"}},icon:{type:["string","null"],scope:"common",title:"Icon",display:{type:"settings-image-input",visible:!1}},alignment:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"]}},alignA:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"],visible:!1}},order:{type:"string",scope:"layout",title:"Order",display:{type:"toggle-cycle",enum:["text-icon","icon-text"],visible:!1}},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconSize:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconWidthC:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},dimensions:{type:"boolean",scope:"layout",title:"Dimensions",display:{type:"toggle",enum:["auto","fixed"]}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}},boxShadow:{type:"object",scope:"layout",title:"Shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},boxShadowColor:{type:"string",scope:"common",title:"Shadow Default",titleByState:{default:"Shadow Default",hover:"Shadow Hover",active:"Shadow Active"},display:{type:"palette-color-picker"}},innerBoxShadow:{type:"object",scope:"layout",title:"Inner shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},innerBoxShadowColor:{type:"string",scope:"common",title:"Inner Shadow Default",titleByState:{default:"Inner Shadow Default",hover:"Inner Shadow Hover",active:"Inner Shadow Active"},display:{type:"palette-color-picker"}},stroke:{type:"number",scope:"layout",title:"Stroke Width",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"number",scope:"layout",title:"Blur",display:{type:"numeric-input"},min:0,max:100},backgroundColor:{type:"string",scope:"common",title:"BG Default",titleByState:{default:"BG Default",hover:"BG Hover",active:"BG Active"},display:{type:"palette-color-picker"}},textColor:{type:"string",scope:"common",title:"Text Default",titleByState:{default:"Text Default",hover:"Text Hover",active:"Text Active"},display:{type:"palette-color-picker"}},borderColor:{type:"string",scope:"common",title:"Border Default",titleByState:{default:"Border Default",hover:"Border Hover",active:"Border Active"},display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover",active:"Icon Active"},display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},hoverEffect:{type:"string",scope:"layout",title:"Hover effect",display:{type:"toggle-cycle",enum:["none","scale-up","lift","reveal","swipe","content-roll"]}},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},fontSettings:{...Bb.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},fontSize:{type:"number",scope:"layout",title:"Font size",display:{type:"font-size"}},lineHeight:{type:"number",scope:"layout",title:"Line height",display:{type:"line-height-input"}},letterSpacing:{type:"number",scope:"layout",title:"Letter spacing",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",scope:"layout",title:"Word spacing",display:{type:"word-spacing-input"}},textAppearance:{type:"object",scope:"layout",title:"Text appearance",display:{type:"text-appearance"}},minWidth:{type:"number",scope:"layout",title:"Min width",display:{type:"numeric-input"},min:0,max:9999},minHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input",visible:!1},min:0,max:9999},height:{type:"number",scope:"layout",title:"Height",display:{type:"numeric-input",visible:!1},min:0,max:9999}},defaults:{label:"Button",icon:"01M3QM74XG7DQZZXTPG1E8EBBC",boxShadowColor:"#000000",innerBoxShadowColor:"#000000",backgroundColor:"#2E12F0",textColor:"#ffffff",borderColor:"#ffffff",iconColor:"#ffffff",fontFamily:"Arial",fontSettings:{fontWeight:400,fontStyle:"normal"},blur:0,stateOverrides:{hover:{backgroundColor:"#3642EF"},active:{backgroundColor:"#475FFF"}}},layoutDefaults:{m:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/375,right:20/375,bottom:10/375,left:20/375},minWidth:0/375,minHeight:0/375,width:100/375,height:100/375,cornerRadius:20/375,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/375,gap:10/375,iconWidthC:16/375,fontSize:16/375,lineHeight:16/375,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},t:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/768,right:20/768,bottom:10/768,left:20/768},minWidth:0/768,minHeight:0/768,width:100/768,height:100/768,cornerRadius:20/768,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/768,gap:10/768,iconWidthC:16/768,fontSize:16/768,lineHeight:16/768,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},d:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/1440,right:20/1440,bottom:10/1440,left:20/1440},minWidth:0/1440,minHeight:0/1440,width:100/1440,height:100/1440,cornerRadius:20/1440,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/1440,gap:10/1440,iconWidthC:16/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}},layout:["__componentName__","type","label","icon","alignment","order","gap","iconSize","iconWidthC","hoverEffect",{type:"row",title:"",items:["dimensions","padding"]},"cornerRadius","blur","boxShadow","boxShadowColor","innerBoxShadow","innerBoxShadowColor",{type:"row",title:"",items:["stroke","borderColor"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]}],displayRules:[{if:{name:"type",value:"a"},then:{name:"properties.icon.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignment.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignA.display.visible",value:!0}},{if:{name:"type",value:"a"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"b"},then:{name:"properties.label.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontFamily.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSettings.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSize.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.lineHeight.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.letterSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.wordSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.textAppearance.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.iconSize.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.order.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.iconWidthC.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.gap.display.visible",value:!0}},{if:{name:"stroke",value:0},then:{name:"properties.borderColor.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minWidth.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minHeight.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.width.display.visible",value:!0}},{if:{name:"dimensions",value:!0},then:{name:"properties.height.display.visible",value:!0}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["label","icon","iconSize","alignA"]},{type:"row",title:"",items:["alignment","order"]},{type:"row",title:"",items:["gap","iconWidthC"]},{type:"row",title:"",items:["dimensions","padding"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]},{type:"row",title:"",items:["hoverEffect","cornerRadius"]},{type:"row",title:"",items:["blur"]},{type:"row",title:"",items:["boxShadow"]},{type:"row",title:"",items:["innerBoxShadow"]},{type:"row",title:"",items:["stroke"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily","fontSettings",{type:"row",title:"",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAppearance"]}],paletteBookmark:{items:[...zb],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],hover:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],active:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"]}},states:["default","hover","active"]},Vb={element:Ob,id:"simple-button",name:"Simple Button",category:"ui-elements",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/button-preview.png"},schema:jb,sourceCode:Db,assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}};function Gb(e){return`
|
|
18639
18639
|
.${e}-titles-row {
|
|
18640
18640
|
position: relative;
|
|
18641
18641
|
flex: 0 1 auto;
|
|
@@ -18833,7 +18833,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
|
|
|
18833
18833
|
pointer-events: auto;
|
|
18834
18834
|
flex-shrink: 0;
|
|
18835
18835
|
}
|
|
18836
|
-
`}const Wn=500,Qo=650,$n="cubic-bezier(0.22, 1, 0.36, 1)",Db=72,Bb=50,zb=1e4,jb=650,Vb=500;function Gb(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function vp(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=Sa(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function Xb(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?vp(i,n):null}function Ub(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.assetId&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function or(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function pd(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return or(e,i,n)}const qb=.03;function xp(e){return e.width*qb}const bs={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Yr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function md(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Yb(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Ys(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,c=o/r;if(l>c){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const d=r*l;return{width:d,height:r,left:i.left+(o-d)/2,top:i.top}}function Kb(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Ys(e,t.width,t.height)}function Qb(e,t){if(Va(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.assetId,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.assetId,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.assetId,n.naturalWidth,n.naturalHeight)},n.src=e.assetId}function Zb(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.assetId)||t.has(o.assetId)||(t.add(o.assetId),n.push(o))}return n}function Jb({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Va(t)?a.jsx("video",{src:t.assetId,preload:"auto",muted:!0,playsInline:!0},t.assetId):a.jsx("img",{src:t.assetId,alt:""},t.assetId))})}function Fo(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=xp(n);return t==="left"?{left:l+d-i,top:r,width:i,height:o}:{left:l+c-d,top:r,width:i,height:o}}function Ta(e,t,n){const i=Fo(e,t,n);return{...i,left:2*i.left-e.left}}function eS(e,t,n){const{left:i,width:o}=n,r=xp(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function bp(e,t,n,i){const o=Fo(e,"left",i),r=Fo(e,"right",i),l=Ta(e,"left",i),c=Ta(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:c,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:c};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function tS(e,t,n,i){const{start:o,end:r}=bp(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function nS(e,t,n){const i=Fo(e,t,n),o=Ta(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Va(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.assetId)}function iS({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const c=s.useRef(null);return s.useEffect(()=>{const d=c.current;return n==null||n(d??null),()=>{d==null||d.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:c,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:d=>d.stopPropagation(),style:o},e)})}function Kr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Va(e)?a.jsx("video",{src:e.assetId,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.assetId,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.assetId,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.assetId,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function oS({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:v,sourceRect:b,resolveCloseSourceRect:m,onClose:h,onPrev:x,onNext:S}){const P=s.useRef(null),f=s.useRef(null),w=s.useRef(null),N=s.useRef(new Map),[V,B]=s.useState(0),H=s.useRef(null),_=s.useRef(0),z=s.useRef(0),$=s.useRef("none"),E=s.useRef(!1),j=s.useRef(!1),L=s.useRef(!1),C=s.useRef(null),T=s.useRef(null),G=s.useRef(null),A=s.useRef(()=>{}),Y=s.useRef(null),R=s.useRef(null),y=s.useRef(null),U=s.useRef(!1),[ee,de]=s.useState(null),[F,ie]=s.useState(bs),[I,se]=s.useState(0),[J,Se]=s.useState("opening"),[Re,pe]=s.useState(0),[he,te]=s.useState(0),[le,re]=s.useState(!1),[fe,xe]=s.useState(null),[Te,me]=s.useState(null),[be,we]=s.useState(null),[g,X]=s.useState(!1),[Z,ne]=s.useState(null),[ye,K]=s.useState(!1),D=s.useRef(!1),[ce,q]=s.useState(!1),[ue,W]=s.useState(!1),Le=s.useRef(n),ae=s.useRef(void 0),Q=t[n],Ne=Q?Va(Q):!1,Oe=he!==0||le,it=!l&&(!r||!!c),qe=d&&!l,Je=u.length>1,ot=s.useCallback((O,Ie)=>t.length<=1?null:t[(O+Ie+t.length)%t.length]??null,[t]),Ve=Je?or(u,p,-1):ot(n,-1),ve=Je?or(u,p,1):ot(n,1),Fe=fe===-1&&Oe?Je&&Te!==null?or(u,Te,-1):be!==null?ot(be,-1):null:null,Xe=fe===1&&Oe?Je&&Te!==null?or(u,Te,1):be!==null?ot(be,1):null:null,Ye=Fe&&Fe.assetId!==(Ve==null?void 0:Ve.assetId)?Fe:null,Pe=Xe&&Xe.assetId!==(ve==null?void 0:ve.assetId)?Xe:null,_e=Ve&&qe?(()=>{const O=Je?pd(u,p,-1):t.length>2?ot((n-1+t.length)%t.length,-1):null;return O&&O.assetId!==Ve.assetId?O:null})():null,Ke=ve&&qe?(()=>{const O=Je?pd(u,p,1):t.length>2?ot((n+1)%t.length,1):null;return O&&O.assetId!==ve.assetId?O:null})():null,Ze=Ye??_e,st=Pe??Ke,Ue=s.useCallback((O,Ie,je)=>{if(!O||!Ie||!je)return;const Ae=N.current,tt=Ae.get(O);(tt==null?void 0:tt.width)===Ie&&(tt==null?void 0:tt.height)===je||(Ae.set(O,{width:Ie,height:je}),B(Mt=>Mt+1))},[]),De=s.useCallback(O=>{if(!(O!=null&&O.assetId))return null;const Ie=N.current.get(O.assetId);return Kb(f.current,Ie)},[V,I]),ke=s.useCallback(()=>{if(!Q)return;const O=De(Q);if(O){de(O);return}const Ie=f.current;Ie&&de(md(Ie))},[Q,De]),ht=s.useCallback(O=>{if(Je){const Ie=u.length;me((p+O+Ie)%Ie),we(null);return}t.length>1&&(we((n+O+t.length)%t.length),me(null))},[Je,u.length,p,t.length,n]),Be=s.useCallback(O=>{L.current=O,re(O)},[]),ze=s.useCallback(()=>{C.current!==null&&(window.clearTimeout(C.current),C.current=null)},[]),We=s.useCallback(()=>{ze(),C.current=window.setTimeout(()=>{ze(),Be(!1)},Qo+32)},[ze,Be]),mt=s.useCallback(()=>{const O=P.current;if(!O){ie({left:0,top:0,width:typeof window<"u"?window.innerWidth:bs.width,height:typeof window<"u"?window.innerHeight:bs.height});return}const Ie=O.getBoundingClientRect();ie({left:Ie.left,top:Ie.top,width:Ie.width,height:Ie.height})},[]),rt=s.useCallback((O,Ie)=>{if(Oe){if(ce&&!le)return`translate(${he}px, 0px)`;if(le&&fe!==null){const je=De(O);if(!je)return;const{x:Ae,y:tt}=tS(je,Ie,fe,F);return`translate(${Ae}px, ${tt}px)`}if(le)return"translate(0px, 0px)"}},[Oe,ce,le,he,fe,F,De]),St=s.useCallback(()=>{const O=T.current;T.current=null,ze(),Be(!1),xe(null),me(null),we(null),te(0),q(!1),E.current=!1,z.current=0,$.current="none",O===-1?x():O===1&&S()},[ze,Be,x,S]),Nt=s.useCallback(()=>{ze(),C.current=window.setTimeout(()=>{T.current!==null&&St()},Qo+32)},[ze,St]),jt=s.useCallback(()=>{ze(),T.current=null,Be(!1),xe(null),me(null),we(null),te(0),q(!1),E.current=!1,z.current=0,$.current="none"},[ze,Be]),xt=s.useCallback(O=>{if(!(!qe||!ee)){if(L.current){if(T.current===O){G.current=O,St();return}jt()}ze(),ht(O),T.current=O,xe(O),Be(!0),Nt()}},[qe,ee,St,jt,ze,ht,Be,Nt]);A.current=xt;const Ce=s.useCallback(()=>{Y.current=null,U.current=!1,R.current!==null&&(window.clearInterval(R.current),R.current=null),y.current!==null&&(window.clearTimeout(y.current),y.current=null)},[]),He=s.useCallback(O=>{R.current!==null&&window.clearInterval(R.current);const Ie=U.current?Vb:jb;R.current=window.setInterval(()=>{A.current(O)},Ie)},[]),lt=s.useCallback(O=>{Y.current!==O&&(Ce(),Y.current=O,U.current=!1,A.current(O),He(O),y.current=window.setTimeout(()=>{y.current=null,Y.current===O&&(U.current=!0,He(O))},zb))},[Ce,He]),et=s.useCallback(()=>{const O=f.current;if(!O)return;const Ie=Q==null?void 0:Q.assetId,je=Ie?N.current.get(Ie):void 0;if(je!=null&&je.width&&(je!=null&&je.height)){de(Ys(O,je.width,je.height));return}const Ae=w.current;if(Ae&&Ie&&(Ae.src===Ie||Ae.currentSrc===Ie)){const{width:Mt,height:ut}=Yb(Ae);if(Mt&&ut){Ue(Ie,Mt,ut),de(Ys(O,Mt,ut));return}}const tt=md(O);!tt.width||!tt.height||de(tt)},[Q==null?void 0:Q.assetId,Ue]),yt=s.useCallback(O=>{if(w.current=O,!!O){if(O instanceof HTMLVideoElement){O.readyState>=1&&O.videoWidth>0&&et();return}O.complete&&O.naturalWidth>0&&et()}},[et]),Rt=s.useCallback(()=>{mt(),et(),se(O=>O+1)},[mt,et]);s.useEffect(()=>{Rt();const O=f.current,Ie=P.current,je=new ResizeObserver(()=>Rt());return O&&je.observe(O),Ie&&je.observe(Ie),window.addEventListener("resize",Rt),()=>{je.disconnect(),window.removeEventListener("resize",Rt)}},[Rt,n,v]),s.useLayoutEffect(()=>{if(!Q)return;const O=w.current;if(O){if(O instanceof HTMLImageElement&&O.complete&&O.naturalWidth>0){et();return}O instanceof HTMLVideoElement&&O.readyState>=1&&O.videoWidth>0&&et()}},[Q==null?void 0:Q.assetId,n,et]),s.useEffect(()=>{ke()},[ke,V]),s.useEffect(()=>{const O=new Set,Ie=[],je=Ae=>{!(Ae!=null&&Ae.assetId)||O.has(Ae.assetId)||(O.add(Ae.assetId),Ie.push(Ae))};t.forEach(je),u.forEach(Ae=>Ae.items.forEach(je)),Ie.forEach(Ae=>{N.current.has(Ae.assetId)||Qb(Ae,Ue)})},[t,u,Ue]),s.useEffect(()=>{if(J!=="opening"||!ee)return;if(!b){Se("open");return}X(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{X(!0),Se("open")})});return()=>cancelAnimationFrame(O)},[J,ee,b]),s.useEffect(()=>{if(J!=="closing")return;const O=setTimeout(()=>h(),Wn);return()=>clearTimeout(O)},[J,h]),s.useEffect(()=>()=>{ze()},[ze]),s.useLayoutEffect(()=>{Le.current===n&&ae.current===(Q==null?void 0:Q.assetId)||(ze(),T.current=null,xe(null),me(null),we(null),pe(0),te(0),Be(!1),W(!1),q(!1),_.current=0,z.current=0,$.current="none",E.current=!1,H.current=null,j.current=!1,w.current=null,ke(),Le.current=n,ae.current=Q==null?void 0:Q.assetId)},[n,Q==null?void 0:Q.assetId,Be,ze,ke]),s.useLayoutEffect(()=>{const O=G.current;O!==null&&(G.current=null,requestAnimationFrame(()=>{A.current(O)}))},[n,p,Q==null?void 0:Q.assetId]),s.useLayoutEffect(()=>{if(J==="opening"){D.current=!1,K(!1);return}if(J!=="open"||D.current)return;if(!Ve&&!ve){D.current=!0;return}K(!1);const O=requestAnimationFrame(()=>{requestAnimationFrame(()=>{K(!0),D.current=!0})});return()=>cancelAnimationFrame(O)},[J,Ve==null?void 0:Ve.assetId,ve==null?void 0:ve.assetId]),s.useEffect(()=>{if(J!=="open")return;const O=()=>{const ut=Tt=>{Tt.stopPropagation(),Tt.preventDefault(),document.removeEventListener("click",ut,!0)};document.addEventListener("click",ut,!0)},Ie=ut=>{const Tt=ut<0?1:-1;ze(),ht(Tt),T.current=Tt,xe(Tt),Be(!0),Nt()},je=ut=>{if(Math.abs(ut)>Bb&&qe){Ie(ut);return}T.current=null,xe(null),me(null),we(null),Be(!0),te(0),We()},Ae=ut=>{if(ut.touches.length!==1||L.current)return;const Tt=ut.touches[0];j.current=!0,H.current={x:Tt.clientX,y:Tt.clientY},$.current="none",z.current=0,E.current=!1},tt=ut=>{if(!H.current||ut.touches.length!==1||L.current)return;const Tt=ut.touches[0],Ut=Tt.clientX-H.current.x,Wt=Tt.clientY-H.current.y;if($.current==="none"){if(Math.abs(Ut)<10&&Math.abs(Wt)<10)return;if(Math.abs(Ut)>Math.abs(Wt)){if(!qe)return;$.current="horizontal"}else if(Wt>0){if(!it)return;$.current="vertical"}else return}if($.current==="horizontal"){E.current=!0,q(!0),z.current=Ut,te(Ut),ut.preventDefault();return}$.current==="vertical"&&(E.current=!0,q(!0),_.current=Wt,pe(Wt),ut.preventDefault())},Mt=()=>{if(!H.current)return;const ut=$.current,Tt=E.current;if(Tt&&ut==="horizontal")je(z.current),O();else if(Tt&&ut==="vertical"){const Ut=_.current;if(it&&Ut>Db){const Wt=window.innerHeight;_.current=Wt,W(!0),pe(Wt),Se("closing")}else _.current=0,pe(0);O()}else ut==="horizontal"&&Math.abs(z.current)>0&&(je(z.current),O());H.current=null,$.current="none",z.current=0,E.current=!1,q(!1)};return document.addEventListener("touchstart",Ae,{passive:!0}),document.addEventListener("touchmove",tt,{passive:!1}),document.addEventListener("touchend",Mt),document.addEventListener("touchcancel",Mt),()=>{document.removeEventListener("touchstart",Ae),document.removeEventListener("touchmove",tt),document.removeEventListener("touchend",Mt),document.removeEventListener("touchcancel",Mt)}},[J,qe,Be,We,ze,it,Nt,ht]);const At=s.useCallback(()=>{const O=(m==null?void 0:m())??b??null;O&&ee&&(ne(O),X(!0)),Se("closing")},[m,b,ee]);s.useEffect(()=>{const O=Ae=>{if(Ae.key==="Escape"){if(r&&c||J==="closing")return;Ce(),At();return}if(Ae.key!=="ArrowLeft"&&Ae.key!=="ArrowRight"||J!=="open"||!qe)return;Ae.preventDefault();const tt=Ae.key==="ArrowLeft"?-1:1;Ae.repeat&&Y.current===tt||lt(tt)},Ie=Ae=>{if(Ae.key!=="ArrowLeft"&&Ae.key!=="ArrowRight")return;const tt=Ae.key==="ArrowLeft"?-1:1;Y.current===tt&&Ce()},je=()=>{Ce()};return window.addEventListener("keydown",O),window.addEventListener("keyup",Ie),window.addEventListener("blur",je),()=>{window.removeEventListener("keydown",O),window.removeEventListener("keyup",Ie),window.removeEventListener("blur",je),Ce()}},[J,r,c,At,qe,lt,Ce]),s.useEffect(()=>{J!=="open"&&Ce()},[J,Ce]);const qt=()=>{J==="closing"||l||At()},$t=J==="open",zt=J==="closing",on=Re>0?Math.max(0,1-Re/500):1,vt=Re>0?Math.max(.35,1-Re/500):1,ft=s.useCallback(O=>{if(!(O.propertyName!=="transform"||!L.current)){if(T.current!==null){St();return}ze(),Be(!1)}},[ze,Be,St]),Me=J==="closing"?Z??b:b,nt=Me&&ee&&(J==="opening"||zt)?Gb(Me,ee):void 0,ct=Oe&&Q?rt(Q,"center"):Re>0?`translateY(${Re}px)`:nt,gt=ee?Yr(ee,F):null,Et=!!(Me&&ee),wt=Et&&(J==="closing"||J==="open"&&g),dt={position:"absolute",top:gt==null?void 0:gt.top,left:gt==null?void 0:gt.left,width:gt==null?void 0:gt.width,height:gt==null?void 0:gt.height,objectFit:"contain",transformOrigin:"top left",transform:ct,opacity:Re>0?vt:Et?1:J==="opening"||zt?0:1,transition:ce&&!le?"none":le?`transform ${Qo}ms ${$n}`:ue?`transform ${Wn}ms ${$n}, opacity ${Wn}ms ${$n}`:wt?`transform ${Wn}ms ${$n}`:J==="opening"||zt?`opacity ${Wn}ms ${$n}`:"none",pointerEvents:Ne&&$t&&!Oe?"auto":"none",touchAction:Ne&&$t?"none":void 0,zIndex:1,overflow:Ne?"hidden":void 0},Ot={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:$t&&!Oe?"auto":"none"},Lt=(O,Ie,je="adjacent")=>{const Ae=De(O);if(!Ae)return{display:"none"};const tt=je==="far"?Ie==="left"?"far-left":"far-right":Ie==="left"?"left-adjacent":"right-adjacent",{start:Mt}=fe!==null?bp(Ae,tt,fe,F):{start:je==="far"?Ta(Ae,Ie,F):Fo(Ae,Ie,F)},ut=Yr(Mt,F),Tt=rt(O,tt),Ut=!Oe&&je==="adjacent"&&$t&&!ye?nS(Ae,Ie,F):null,Wt=je==="far"&&Oe&&fe===(Ie==="left"?-1:1),an=ce&&!le?!1:le,cn=je==="adjacent"&&$t&&ye&&!Oe;return{position:"absolute",top:ut.top,left:ut.left,width:ut.width,height:ut.height,objectFit:"contain",transform:Tt??(Ut?`translate(${Ut.x}px, ${Ut.y}px)`:void 0),opacity:je==="far"?$t&&Wt?1:0:$t?1:0,transition:an?je==="far"?`transform ${Qo}ms ${$n}`:`transform ${Qo}ms ${$n}, opacity ${Wn}ms ${$n}`:cn?`transform ${Wn}ms ${$n}`:J==="opening"||zt?`opacity ${Wn}ms ${$n}`:"none",pointerEvents:"none",zIndex:1}},Ht=(O,Ie)=>{const je=De(O);return je?eS(Fo(je,Ie,F),Ie,F):null},Gt=O=>Ie=>{if(!l){if(j.current){j.current=!1;return}Ie.stopPropagation(),xt(O)}},_t=Ve?Ht(Ve,"left"):null,Vt=ve?Ht(ve,"right"):null,Dt=_t?Yr(_t,F):null,Ct=Vt?Yr(Vt,F):null;return a.jsxs("div",{ref:P,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:J==="open"?"none":void 0},onClick:qt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:$t?on:0,transition:ce?"none":`opacity ${Wn}ms ${$n}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:f,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:$t?1:0,transition:ce?"none":`opacity ${Wn}ms ${$n}`,pointerEvents:"none"},children:a.jsx(tp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:qt})})]}),$t&&Ze&&a.jsx(Kr,{media:Ze,style:Lt(Ze,"left","far"),onMeasure:Ue,onTransitionEnd:ft},`far-prev-${Ze.assetId}`),$t&&Ve&&a.jsxs(a.Fragment,{children:[a.jsx(Kr,{media:Ve,style:Lt(Ve,"left"),onMeasure:Ue,onTransitionEnd:ft},`prev-${Ve.assetId}`),Dt&&a.jsx("div",{style:{position:"absolute",top:Dt.top,left:Dt.left,width:Dt.width,height:Dt.height,cursor:l||ce?"default":"pointer",pointerEvents:l||ce?"none":"auto",zIndex:3},onClick:Gt(-1)})]}),$t&&ve&&a.jsxs(a.Fragment,{children:[a.jsx(Kr,{media:ve,style:Lt(ve,"right"),onMeasure:Ue,onTransitionEnd:ft},`next-${ve.assetId}`),Ct&&a.jsx("div",{style:{position:"absolute",top:Ct.top,left:Ct.left,width:Ct.width,height:Ct.height,cursor:l||ce?"default":"pointer",pointerEvents:l||ce?"none":"auto",zIndex:3},onClick:Gt(1)})]}),$t&&st&&a.jsx(Kr,{media:st,style:Lt(st,"right","far"),onMeasure:Ue,onTransitionEnd:ft},`far-next-${st.assetId}`),ee&&Q&&(Ne?a.jsx(iS,{src:Q.assetId,phase:J,onMediaElement:yt,wrapperStyle:dt,videoStyle:Ot,onLoadedMetadata:et,onTransitionEnd:ft},`${n}-${Q.assetId}`):a.jsx("img",{ref:yt,src:Q.assetId,alt:Q.name,onLoad:et,onTransitionEnd:ft,style:dt},`${n}-${Q.assetId}`))]})}const rS=20,aS=.18;function sS(e){return`
|
|
18836
|
+
`}const Dn=500,Qo=650,Cn="cubic-bezier(0.22, 1, 0.36, 1)",Xb=72,qb=50,Ub=1e4,Yb=650,Kb=500;function Qb(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function Cp(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=Sa(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function Zb(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?Cp(i,n):null}function Jb(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.assetId&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function or(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function pd(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return or(e,i,n)}const eS=.03;function Tp(e){return e.width*eS}const bs={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Yr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function md(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function tS(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Us(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,c=o/r;if(l>c){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const d=r*l;return{width:d,height:r,left:i.left+(o-d)/2,top:i.top}}function nS(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Us(e,t.width,t.height)}function iS(e,t){if(Va(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.assetId,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.assetId,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.assetId,n.naturalWidth,n.naturalHeight)},n.src=e.assetId}function oS(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.assetId)||t.has(o.assetId)||(t.add(o.assetId),n.push(o))}return n}function rS({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Va(t)?a.jsx("video",{src:t.assetId,preload:"auto",muted:!0,playsInline:!0},t.assetId):a.jsx("img",{src:t.assetId,alt:""},t.assetId))})}function _o(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=Tp(n);return t==="left"?{left:l+d-i,top:r,width:i,height:o}:{left:l+c-d,top:r,width:i,height:o}}function Ta(e,t,n){const i=_o(e,t,n);return{...i,left:2*i.left-e.left}}function aS(e,t,n){const{left:i,width:o}=n,r=Tp(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function Ip(e,t,n,i){const o=_o(e,"left",i),r=_o(e,"right",i),l=Ta(e,"left",i),c=Ta(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:c,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:c};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function sS(e,t,n,i){const{start:o,end:r}=Ip(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function lS(e,t,n){const i=_o(e,t,n),o=Ta(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Va(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.assetId)}function cS({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const c=s.useRef(null);return s.useEffect(()=>{const d=c.current;return n==null||n(d??null),()=>{d==null||d.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:c,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:d=>d.stopPropagation(),style:o},e)})}function Kr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Va(e)?a.jsx("video",{src:e.assetId,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.assetId,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.assetId,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.assetId,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function dS({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:v,sourceRect:x,resolveCloseSourceRect:m,onClose:h,onPrev:b,onNext:S}){const M=s.useRef(null),y=s.useRef(null),$=s.useRef(null),R=s.useRef(new Map),[X,B]=s.useState(0),O=s.useRef(null),N=s.useRef(0),z=s.useRef(0),C=s.useRef("none"),I=s.useRef(!1),j=s.useRef(!1),E=s.useRef(!1),w=s.useRef(null),L=s.useRef(null),V=s.useRef(null),_=s.useRef(()=>{}),K=s.useRef(null),P=s.useRef(null),f=s.useRef(null),U=s.useRef(!1),[te,ce]=s.useState(null),[F,ie]=s.useState(bs),[T,le]=s.useState(0),[J,Se]=s.useState("opening"),[Le,me]=s.useState(0),[ye,ee]=s.useState(0),[oe,re]=s.useState(!1),[ge,we]=s.useState(null),[Ae,fe]=s.useState(null),[ve,xe]=s.useState(null),[g,G]=s.useState(!1),[Q,ne]=s.useState(null),[ue,q]=s.useState(!1),D=s.useRef(!1),[se,Y]=s.useState(!1),[pe,H]=s.useState(!1),Ie=s.useRef(n),de=s.useRef(void 0),Z=t[n],Ne=Z?Va(Z):!1,Oe=ye!==0||oe,Je=!l&&(!r||!!c),De=d&&!l,Ze=u.length>1,at=s.useCallback((W,Te)=>t.length<=1?null:t[(W+Te+t.length)%t.length]??null,[t]),Xe=Ze?or(u,p,-1):at(n,-1),be=Ze?or(u,p,1):at(n,1),He=ge===-1&&Oe?Ze&&Ae!==null?or(u,Ae,-1):ve!==null?at(ve,-1):null:null,je=ge===1&&Oe?Ze&&Ae!==null?or(u,Ae,1):ve!==null?at(ve,1):null:null,Qe=He&&He.assetId!==(Xe==null?void 0:Xe.assetId)?He:null,Ce=je&&je.assetId!==(be==null?void 0:be.assetId)?je:null,_e=Xe&&De?(()=>{const W=Ze?pd(u,p,-1):t.length>2?at((n-1+t.length)%t.length,-1):null;return W&&W.assetId!==Xe.assetId?W:null})():null,Ue=be&&De?(()=>{const W=Ze?pd(u,p,1):t.length>2?at((n+1)%t.length,1):null;return W&&W.assetId!==be.assetId?W:null})():null,Ye=Qe??_e,lt=Ce??Ue,it=s.useCallback((W,Te,ze)=>{if(!W||!Te||!ze)return;const Fe=R.current,yt=Fe.get(W);(yt==null?void 0:yt.width)===Te&&(yt==null?void 0:yt.height)===ze||(Fe.set(W,{width:Te,height:ze}),B(Ot=>Ot+1))},[]),qe=s.useCallback(W=>{if(!(W!=null&&W.assetId))return null;const Te=R.current.get(W.assetId);return nS(y.current,Te)},[X,T]),Ee=s.useCallback(()=>{if(!Z)return;const W=qe(Z);if(W){ce(W);return}const Te=y.current;Te&&ce(md(Te))},[Z,qe]),pt=s.useCallback(W=>{if(Ze){const Te=u.length;fe((p+W+Te)%Te),xe(null);return}t.length>1&&(xe((n+W+t.length)%t.length),fe(null))},[Ze,u.length,p,t.length,n]),ke=s.useCallback(W=>{E.current=W,re(W)},[]),We=s.useCallback(()=>{w.current!==null&&(window.clearTimeout(w.current),w.current=null)},[]),Ve=s.useCallback(()=>{We(),w.current=window.setTimeout(()=>{We(),ke(!1)},Qo+32)},[We,ke]),ct=s.useCallback(()=>{const W=M.current;if(!W){ie({left:0,top:0,width:typeof window<"u"?window.innerWidth:bs.width,height:typeof window<"u"?window.innerHeight:bs.height});return}const Te=W.getBoundingClientRect();ie({left:Te.left,top:Te.top,width:Te.width,height:Te.height})},[]),ot=s.useCallback((W,Te)=>{if(Oe){if(se&&!oe)return`translate(${ye}px, 0px)`;if(oe&&ge!==null){const ze=qe(W);if(!ze)return;const{x:Fe,y:yt}=sS(ze,Te,ge,F);return`translate(${Fe}px, ${yt}px)`}if(oe)return"translate(0px, 0px)"}},[Oe,se,oe,ye,ge,F,qe]),xt=s.useCallback(()=>{const W=L.current;L.current=null,We(),ke(!1),we(null),fe(null),xe(null),ee(0),Y(!1),I.current=!1,z.current=0,C.current="none",W===-1?b():W===1&&S()},[We,ke,b,S]),Pt=s.useCallback(()=>{We(),w.current=window.setTimeout(()=>{L.current!==null&&xt()},Qo+32)},[We,xt]),Vt=s.useCallback(()=>{We(),L.current=null,ke(!1),we(null),fe(null),xe(null),ee(0),Y(!1),I.current=!1,z.current=0,C.current="none"},[We,ke]),vt=s.useCallback(W=>{if(!(!De||!te)){if(E.current){if(L.current===W){V.current=W,xt();return}Vt()}We(),pt(W),L.current=W,we(W),ke(!0),Pt()}},[De,te,xt,Vt,We,pt,ke,Pt]);_.current=vt;const Mt=s.useCallback(()=>{K.current=null,U.current=!1,P.current!==null&&(window.clearInterval(P.current),P.current=null),f.current!==null&&(window.clearTimeout(f.current),f.current=null)},[]),Ht=s.useCallback(W=>{P.current!==null&&window.clearInterval(P.current);const Te=U.current?Kb:Yb;P.current=window.setInterval(()=>{_.current(W)},Te)},[]),Gt=s.useCallback(W=>{K.current!==W&&(Mt(),K.current=W,U.current=!1,_.current(W),Ht(W),f.current=window.setTimeout(()=>{f.current=null,K.current===W&&(U.current=!0,Ht(W))},Ub))},[Mt,Ht]),kt=s.useCallback(()=>{const W=y.current;if(!W)return;const Te=Z==null?void 0:Z.assetId,ze=Te?R.current.get(Te):void 0;if(ze!=null&&ze.width&&(ze!=null&&ze.height)){ce(Us(W,ze.width,ze.height));return}const Fe=$.current;if(Fe&&Te&&(Fe.src===Te||Fe.currentSrc===Te)){const{width:Ot,height:ut}=tS(Fe);if(Ot&&ut){it(Te,Ot,ut),ce(Us(W,Ot,ut));return}}const yt=md(W);!yt.width||!yt.height||ce(yt)},[Z==null?void 0:Z.assetId,it]),Pe=s.useCallback(W=>{if($.current=W,!!W){if(W instanceof HTMLVideoElement){W.readyState>=1&&W.videoWidth>0&&kt();return}W.complete&&W.naturalWidth>0&&kt()}},[kt]),Be=s.useCallback(()=>{ct(),kt(),le(W=>W+1)},[ct,kt]);s.useEffect(()=>{Be();const W=y.current,Te=M.current,ze=new ResizeObserver(()=>Be());return W&&ze.observe(W),Te&&ze.observe(Te),window.addEventListener("resize",Be),()=>{ze.disconnect(),window.removeEventListener("resize",Be)}},[Be,n,v]),s.useLayoutEffect(()=>{if(!Z)return;const W=$.current;if(W){if(W instanceof HTMLImageElement&&W.complete&&W.naturalWidth>0){kt();return}W instanceof HTMLVideoElement&&W.readyState>=1&&W.videoWidth>0&&kt()}},[Z==null?void 0:Z.assetId,n,kt]),s.useEffect(()=>{Ee()},[Ee,X]),s.useEffect(()=>{const W=new Set,Te=[],ze=Fe=>{!(Fe!=null&&Fe.assetId)||W.has(Fe.assetId)||(W.add(Fe.assetId),Te.push(Fe))};t.forEach(ze),u.forEach(Fe=>Fe.items.forEach(ze)),Te.forEach(Fe=>{R.current.has(Fe.assetId)||iS(Fe,it)})},[t,u,it]),s.useEffect(()=>{if(J!=="opening"||!te)return;if(!x){Se("open");return}G(!1);const W=requestAnimationFrame(()=>{requestAnimationFrame(()=>{G(!0),Se("open")})});return()=>cancelAnimationFrame(W)},[J,te,x]),s.useEffect(()=>{if(J!=="closing")return;const W=setTimeout(()=>h(),Dn);return()=>clearTimeout(W)},[J,h]),s.useEffect(()=>()=>{We()},[We]),s.useLayoutEffect(()=>{Ie.current===n&&de.current===(Z==null?void 0:Z.assetId)||(We(),L.current=null,we(null),fe(null),xe(null),me(0),ee(0),ke(!1),H(!1),Y(!1),N.current=0,z.current=0,C.current="none",I.current=!1,O.current=null,j.current=!1,$.current=null,Ee(),Ie.current=n,de.current=Z==null?void 0:Z.assetId)},[n,Z==null?void 0:Z.assetId,ke,We,Ee]),s.useLayoutEffect(()=>{const W=V.current;W!==null&&(V.current=null,requestAnimationFrame(()=>{_.current(W)}))},[n,p,Z==null?void 0:Z.assetId]),s.useLayoutEffect(()=>{if(J==="opening"){D.current=!1,q(!1);return}if(J!=="open"||D.current)return;if(!Xe&&!be){D.current=!0;return}q(!1);const W=requestAnimationFrame(()=>{requestAnimationFrame(()=>{q(!0),D.current=!0})});return()=>cancelAnimationFrame(W)},[J,Xe==null?void 0:Xe.assetId,be==null?void 0:be.assetId]),s.useEffect(()=>{if(J!=="open")return;const W=()=>{const ut=Tt=>{Tt.stopPropagation(),Tt.preventDefault(),document.removeEventListener("click",ut,!0)};document.addEventListener("click",ut,!0)},Te=ut=>{const Tt=ut<0?1:-1;We(),pt(Tt),L.current=Tt,we(Tt),ke(!0),Pt()},ze=ut=>{if(Math.abs(ut)>qb&&De){Te(ut);return}L.current=null,we(null),fe(null),xe(null),ke(!0),ee(0),Ve()},Fe=ut=>{if(ut.touches.length!==1||E.current)return;const Tt=ut.touches[0];j.current=!0,O.current={x:Tt.clientX,y:Tt.clientY},C.current="none",z.current=0,I.current=!1},yt=ut=>{if(!O.current||ut.touches.length!==1||E.current)return;const Tt=ut.touches[0],Yt=Tt.clientX-O.current.x,It=Tt.clientY-O.current.y;if(C.current==="none"){if(Math.abs(Yt)<10&&Math.abs(It)<10)return;if(Math.abs(Yt)>Math.abs(It)){if(!De)return;C.current="horizontal"}else if(It>0){if(!Je)return;C.current="vertical"}else return}if(C.current==="horizontal"){I.current=!0,Y(!0),z.current=Yt,ee(Yt),ut.preventDefault();return}C.current==="vertical"&&(I.current=!0,Y(!0),N.current=It,me(It),ut.preventDefault())},Ot=()=>{if(!O.current)return;const ut=C.current,Tt=I.current;if(Tt&&ut==="horizontal")ze(z.current),W();else if(Tt&&ut==="vertical"){const Yt=N.current;if(Je&&Yt>Xb){const It=window.innerHeight;N.current=It,H(!0),me(It),Se("closing")}else N.current=0,me(0);W()}else ut==="horizontal"&&Math.abs(z.current)>0&&(ze(z.current),W());O.current=null,C.current="none",z.current=0,I.current=!1,Y(!1)};return document.addEventListener("touchstart",Fe,{passive:!0}),document.addEventListener("touchmove",yt,{passive:!1}),document.addEventListener("touchend",Ot),document.addEventListener("touchcancel",Ot),()=>{document.removeEventListener("touchstart",Fe),document.removeEventListener("touchmove",yt),document.removeEventListener("touchend",Ot),document.removeEventListener("touchcancel",Ot)}},[J,De,ke,Ve,We,Je,Pt,pt]);const ft=s.useCallback(()=>{const W=(m==null?void 0:m())??x??null;W&&te&&(ne(W),G(!0)),Se("closing")},[m,x,te]);s.useEffect(()=>{const W=Fe=>{if(Fe.key==="Escape"){if(r&&c||J==="closing")return;Mt(),ft();return}if(Fe.key!=="ArrowLeft"&&Fe.key!=="ArrowRight"||J!=="open"||!De)return;Fe.preventDefault();const yt=Fe.key==="ArrowLeft"?-1:1;Fe.repeat&&K.current===yt||Gt(yt)},Te=Fe=>{if(Fe.key!=="ArrowLeft"&&Fe.key!=="ArrowRight")return;const yt=Fe.key==="ArrowLeft"?-1:1;K.current===yt&&Mt()},ze=()=>{Mt()};return window.addEventListener("keydown",W),window.addEventListener("keyup",Te),window.addEventListener("blur",ze),()=>{window.removeEventListener("keydown",W),window.removeEventListener("keyup",Te),window.removeEventListener("blur",ze),Mt()}},[J,r,c,ft,De,Gt,Mt]),s.useEffect(()=>{J!=="open"&&Mt()},[J,Mt]);const $t=()=>{J==="closing"||l||ft()},et=J==="open",Et=J==="closing",Xt=Le>0?Math.max(0,1-Le/500):1,mt=Le>0?Math.max(.35,1-Le/500):1,gt=s.useCallback(W=>{if(!(W.propertyName!=="transform"||!E.current)){if(L.current!==null){xt();return}We(),ke(!1)}},[We,ke,xt]),Re=J==="closing"?Q??x:x,tt=Re&&te&&(J==="opening"||Et)?Qb(Re,te):void 0,nt=Oe&&Z?ot(Z,"center"):Le>0?`translateY(${Le}px)`:tt,st=te?Yr(te,F):null,At=!!(Re&&te),St=At&&(J==="closing"||J==="open"&&g),ht={position:"absolute",top:st==null?void 0:st.top,left:st==null?void 0:st.left,width:st==null?void 0:st.width,height:st==null?void 0:st.height,objectFit:"contain",transformOrigin:"top left",transform:nt,opacity:Le>0?mt:At?1:J==="opening"||Et?0:1,transition:se&&!oe?"none":oe?`transform ${Qo}ms ${Cn}`:pe?`transform ${Dn}ms ${Cn}, opacity ${Dn}ms ${Cn}`:St?`transform ${Dn}ms ${Cn}`:J==="opening"||Et?`opacity ${Dn}ms ${Cn}`:"none",pointerEvents:Ne&&et&&!Oe?"auto":"none",touchAction:Ne&&et?"none":void 0,zIndex:1,overflow:Ne?"hidden":void 0},Dt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:et&&!Oe?"auto":"none"},Ct=(W,Te,ze="adjacent")=>{const Fe=qe(W);if(!Fe)return{display:"none"};const yt=ze==="far"?Te==="left"?"far-left":"far-right":Te==="left"?"left-adjacent":"right-adjacent",{start:Ot}=ge!==null?Ip(Fe,yt,ge,F):{start:ze==="far"?Ta(Fe,Te,F):_o(Fe,Te,F)},ut=Yr(Ot,F),Tt=ot(W,yt),Yt=!Oe&&ze==="adjacent"&&et&&!ue?lS(Fe,Te,F):null,It=ze==="far"&&Oe&&ge===(Te==="left"?-1:1),Zt=se&&!oe?!1:oe,on=ze==="adjacent"&&et&&ue&&!Oe;return{position:"absolute",top:ut.top,left:ut.left,width:ut.width,height:ut.height,objectFit:"contain",transform:Tt??(Yt?`translate(${Yt.x}px, ${Yt.y}px)`:void 0),opacity:ze==="far"?et&&It?1:0:et?1:0,transition:Zt?ze==="far"?`transform ${Qo}ms ${Cn}`:`transform ${Qo}ms ${Cn}, opacity ${Dn}ms ${Cn}`:on?`transform ${Dn}ms ${Cn}`:J==="opening"||Et?`opacity ${Dn}ms ${Cn}`:"none",pointerEvents:"none",zIndex:1}},qt=(W,Te)=>{const ze=qe(W);return ze?aS(_o(ze,Te,F),Te,F):null},jt=W=>Te=>{if(!l){if(j.current){j.current=!1;return}Te.stopPropagation(),vt(W)}},Nt=Xe?qt(Xe,"left"):null,Bt=be?qt(be,"right"):null,Wt=Nt?Yr(Nt,F):null,wt=Bt?Yr(Bt,F):null;return a.jsxs("div",{ref:M,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:J==="open"?"none":void 0},onClick:$t,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:et?Xt:0,transition:se?"none":`opacity ${Dn}ms ${Cn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:y,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:et?1:0,transition:se?"none":`opacity ${Dn}ms ${Cn}`,pointerEvents:"none"},children:a.jsx(sp,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:$t})})]}),et&&Ye&&a.jsx(Kr,{media:Ye,style:Ct(Ye,"left","far"),onMeasure:it,onTransitionEnd:gt},`far-prev-${Ye.assetId}`),et&&Xe&&a.jsxs(a.Fragment,{children:[a.jsx(Kr,{media:Xe,style:Ct(Xe,"left"),onMeasure:it,onTransitionEnd:gt},`prev-${Xe.assetId}`),Wt&&a.jsx("div",{style:{position:"absolute",top:Wt.top,left:Wt.left,width:Wt.width,height:Wt.height,cursor:l||se?"default":"pointer",pointerEvents:l||se?"none":"auto",zIndex:3},onClick:jt(-1)})]}),et&&be&&a.jsxs(a.Fragment,{children:[a.jsx(Kr,{media:be,style:Ct(be,"right"),onMeasure:it,onTransitionEnd:gt},`next-${be.assetId}`),wt&&a.jsx("div",{style:{position:"absolute",top:wt.top,left:wt.left,width:wt.width,height:wt.height,cursor:l||se?"default":"pointer",pointerEvents:l||se?"none":"auto",zIndex:3},onClick:jt(1)})]}),et&<&&a.jsx(Kr,{media:lt,style:Ct(lt,"right","far"),onMeasure:it,onTransitionEnd:gt},`far-next-${lt.assetId}`),te&&Z&&(Ne?a.jsx(cS,{src:Z.assetId,phase:J,onMediaElement:Pe,wrapperStyle:ht,videoStyle:Dt,onLoadedMetadata:kt,onTransitionEnd:gt},`${n}-${Z.assetId}`):a.jsx("img",{ref:Pe,src:Z.assetId,alt:Z.name,onLoad:kt,onTransitionEnd:gt,style:ht},`${n}-${Z.assetId}`))]})}const uS=20,pS=.18;function mS(e){return`
|
|
18837
18837
|
.${e}-wrapper {
|
|
18838
18838
|
box-sizing: border-box;
|
|
18839
18839
|
max-width: 100%;
|
|
@@ -18920,8 +18920,8 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
|
|
|
18920
18920
|
z-index: 2;
|
|
18921
18921
|
pointer-events: auto;
|
|
18922
18922
|
}
|
|
18923
|
-
${
|
|
18924
|
-
`}function
|
|
18923
|
+
${Gb(e)}
|
|
18924
|
+
`}function gS(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,r]=n.split(":").map(Number),l=i?r:o,c=i?o:r;return c>0?l/c:1}function hS(e){const t=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,n=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight;return!t||!n?null:t/n}function fS(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:A.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:A.scalingValue(i*pS,n??!1),[`--${t}-image-aspect`]:gS(e)}}function yS(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.07,lineHeight:e==null?void 0:e.titleLineHeight,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,color:(e==null?void 0:e.titleColor)??"#000000"};return nn(n,t)}function vS(e){var o;const t=((o=e==null?void 0:e.imageDisplay)==null?void 0:o.display)==="cover",n=((e==null?void 0:e.lightbox)??"on")==="on",i={objectFit:t?"cover":"contain",pointerEvents:"auto",...n?{cursor:"pointer"}:null};return{objectFitMode:t?"cover":"contain",imageStyle:i}}function xS(e,t,n,i,o,r){if(!(!e||!t))return l=>{var d;const c=((d=l.currentTarget.closest(`.${i}-item`))==null?void 0:d.querySelector(`[data-waterfall-index="${n}"]`))??(l.currentTarget instanceof HTMLImageElement||l.currentTarget instanceof HTMLVideoElement?l.currentTarget:null);r(n,c?Cp(c,o):void 0)}}function bS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=A.useScopedStyles(),d=s.useMemo(()=>mS(c),[c]),u=t??[],p=(e==null?void 0:e.type)??"a",v=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,x=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,m=A.scalingValue(x,n??!1),h=`max(${m}, ${uS}px)`,{objectFitMode:b,imageStyle:S}=vS(e),M=yS(e,n),y=s.useRef(null),[$,R]=s.useState(!1),[X,B]=s.useState([]),[O,N]=s.useState(0),[z,C]=s.useState(0),[I,j]=s.useState(null),[E,w]=s.useState({title1:"",title2:"",title3:""}),L=(!n||i)&&!$,V=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},_=V.sizeType??"none",K=L&&_!=="none"?`${c}-item-image-hover-${_}`:void 0,P=(V.value??120)/100,f=s.useCallback(ye=>{!ye||_!=="scale"||(ye.style.transformOrigin=ff(ye))},[_]),U=s.useCallback(ye=>{if(ye){if(b==="contain"){const ee=hS(ye);if(ee){const oe=ye.closest(`.${c}-item-image`);oe instanceof HTMLElement&&oe.style.setProperty(`--${c}-item-media-aspect`,String(ee))}}f(ye)}},[c,f,b]),te={width:A.scalingValue(v,n??!1),...M,...fS(e,c,n),[`--${c}-image-hover-scale`]:String(P)},ce=(()=>{const ye={},ee=y.current?getComputedStyle(y.current).getPropertyValue("--cntrl-article-width").trim():"";return ee&&(ye["--cntrl-article-width"]=ee),ye})(),F=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),ie=s.useMemo(()=>Jb(u),[u]),T=s.useMemo(()=>oS(u),[u]),le=(ye,ee)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const oe=ie.findIndex(ge=>ge.gridIndex===ye);if(oe<0)return;const re=ie[oe];C(oe),B(re.items),N(0),w(re.entry),j(ee??null),R(!0)},J=s.useCallback(()=>{R(!1),j(null)},[]),Se=s.useCallback(()=>{const ye=ie[z];return!ye||!y.current?I:Zb(y.current,ye.gridIndex,b)??I},[ie,z,I,b]),Le=s.useCallback(ye=>{if(ie.length>1){const ee=ie.length,oe=(z+ye+ee)%ee,re=ie[oe];C(oe),B(re.items),N(0),w(re.entry);return}N(ee=>(ee+ye+X.length)%X.length)},[ie,z,X.length]),me=ie.length>1||X.length>1;return s.useEffect(()=>{if(!$||typeof document>"u")return;const ye=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ye}},[$]),s.useEffect(()=>{!n||o||i||R(!1)},[n,o,i]),s.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&R(!1)},[e==null?void 0:e.lightbox]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx(rS,{mediaList:T}),a.jsx("div",{ref:y,className:`${c}-wrapper ${c}-type-${p}`,style:te,children:u.map((ye,ee)=>{var ge,we;const oe=!!((ge=ye.image)!=null&&ge.assetId),re=xS(!!F,oe,ee,c,b,le);return a.jsxs("div",{className:`${c}-item`,children:[ye.title?a.jsx("span",{className:`${c}-item-title`,onClick:re,style:re?{cursor:"pointer"}:void 0,children:ye.title}):null,(we=ye.image)!=null&&we.assetId?a.jsx("span",{className:[`${c}-item-image`,b==="contain"?`${c}-item-image-fit`:void 0,K].filter(Boolean).join(" "),children:ye.image.type==="video"?a.jsx("video",{ref:U,src:ye.image.assetId,"data-waterfall-index":ee,style:S,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:re,onLoadedData:Ae=>U(Ae.currentTarget)}):a.jsx("img",{ref:U,src:ye.image.assetId,alt:ye.image.name??"","data-waterfall-index":ee,style:S,onClick:re,onLoad:Ae=>U(Ae.currentTarget)})}):null,ee<u.length-1&&a.jsx("div",{className:`${c}-item-gap-host`,style:{width:m},children:o&&!$&&a.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${c}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:h,height:"100%"}})})]},ee)})}),$&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const ye=(l?document.getElementById(l):null)??document.body;return Un.createPortal(a.jsx("div",{style:ce,"data-selection":"none",children:a.jsx(dS,{prefix:c,items:X,index:O,entry:E,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:me,lightboxEntries:ie,entryIdx:z,layoutId:r,sourceRect:I,resolveCloseSourceRect:Se,onClose:J,onPrev:()=>Le(-1),onNext:()=>Le(1)})}),ye)})()]})}const SS=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
18925
18925
|
import type React from 'react';
|
|
18926
18926
|
import { createPortal } from 'react-dom';
|
|
18927
18927
|
import { CommonComponentProps } from '../props';
|
|
@@ -19435,7 +19435,7 @@ export function Waterfall({
|
|
|
19435
19435
|
</>
|
|
19436
19436
|
);
|
|
19437
19437
|
}
|
|
19438
|
-
`,fS="01M3SBP3P8CMVMM1ZZ0QVD2PPF",vi={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 yS(e){const t={};return t[bt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSettings")]={...vi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSize")]={...vi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[bt(e,"lineHeight")]={...vi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[bt(e,"letterSpacing")]={...vi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[bt(e,"wordSpacing")]={...vi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[bt(e,"textAlign")]={...vi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[bt(e,"textAppearance")]={...vi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const No=Li.filter(e=>e!=="count"),vS=No.reduce((e,t)=>({...e,...yS(t)}),{}),xS=No.reduce((e,t)=>({...e,[bt(t,"fontFamily")]:"Arial",[bt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[bt(t,"letterSpacing")]:0,[bt(t,"wordSpacing")]:0,[bt(t,"textAlign")]:"left",[bt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ss(e){return No.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[bt(n,"fontSize")]=i),o!==void 0&&(t[bt(n,"lineHeight")]=o),t},{})}const bS={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(No.map(e=>[Nl[e],_l(e)]))},Qr={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},SS=[{title:"Salton Sea from Above",...Qr,image:{assetId:"01M3QM74XERA3G7J0J00XVKEXX",objectFit:"cover"}},{title:"Lunar Module Pilot",...Qr,image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...Qr,image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",objectFit:"cover"}},{title:"David R. Scott During EVA",...Qr,image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",objectFit:"cover"}}],wS={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},caption:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"cover",type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]}},required:["image"]},default:SS},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageHoverEffect:{type:"object",scope:"common",title:"Hover",display:{type:"toggle-cycle-numeric-input",enum:["none","scale","saturate"],inputs:{none:"none",scale:"single",saturate:"none"},defaultValue:120,showDash:!1},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},horizontalGap:{type:"number",scope:"layout",title:"Gutter",min:0,display:{type:"range-control"}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title1Color:{type:"string",scope:"common",title:"Title Lightbox",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Lightbox",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Lightbox",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...vi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},...vS},defaults:{type:"a",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightbox:"on",imageHoverEffect:{sizeType:"none",value:120,min:100,max:200},titleColor:"#000000",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:fS,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...xS},layoutDefaults:{d:{wrapperWidth:1,horizontalGap:.006944,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,titleFontSize:.0625,titleLineHeight:.05555,titleLetterSpacing:-34722e-8,...Ss({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})},m:{wrapperWidth:1,horizontalGap:.026666,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,titleFontSize:.16,titleLineHeight:.13333,...Ss({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{wrapperWidth:1,horizontalGap:.01302,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026,titleFontSize:.07,titleLineHeight:.07,...Ss({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})}},layout:["__componentName__","type","wrapperWidth","imageDisplay","lightbox","imageHoverEffect","horizontalGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["wrapperWidth","lightbox"]},{type:"row",title:"Image",items:["imageDisplay","imageHoverEffect"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Lightbox",items:[bS]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},$S={element:gS,id:"waterfall",name:"Waterfall",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/waterfall.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},...No.map(e=>({path:`${bt(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...No.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${bt(t,"fontFamily")}`}),{})},schema:wS,sourceCode:hS},So=500,Sp="cubic-bezier(0.25, 1, 0.5, 1)",CS=300,TS=5,IS=.15,LS=.4,PS=100,ro=100,gd={color:"#000000",hover:"#cccccc"},Zo={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},RS={s:{paddingY:5,paddingActive:5,borderRadius:9,dot:4,activeDot:8,gapInactive:9,inset:5},m:{paddingY:7,paddingActive:7,borderRadius:17,dot:8,activeDot:20,gapInactive:22,inset:7},l:{paddingY:10,paddingActive:10,borderRadius:29,dot:20,activeDot:38,gapInactive:26,inset:10}},ws={offset:{x:0,y:0},linkColor:"#cccccc"},hd={sizeType:"drag",value:3},MS="left";function ES(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.02,lineHeight:(e==null?void 0:e.titleLineHeight)??.02,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,textAlign:MS,color:(e==null?void 0:e.titleColor)??"#000000"};return en(n,t)}function ao(e,t,n){return`${e}: ${k.scalingValue(t/1440,n)};`}function rr(e,t){return t<=0?0:(e%t+t)%t}function kS(e,t,n,i){if(!i)return{position:rr(e+t,n),hitBoundary:!1};const o=e+t;return o>=0&&o<=n+1?{position:o,hitBoundary:!1}:{position:t>0?n+1:0,hitBoundary:!0}}function AS(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function FS(e,t){const n=document.createElement("div");n.className=t,n.setAttribute("aria-hidden","true"),e.appendChild(n);const i=(p,v)=>{n.style.transform=`translate(${p}px, ${v}px)`;const b=n.getBoundingClientRect();return{x:b.left,y:b.top}},o=i(0,0),r=i(ro,0),l=i(0,ro);e.removeChild(n);const c={x:(r.x-o.x)/ro,y:(r.y-o.y)/ro},d={x:(l.x-o.x)/ro,y:(l.y-o.y)/ro},u=c.x*d.y-d.x*c.y;return{ex:c,ey:d,det:u}}function NS(e,t,n){const{ex:i,ey:o,det:r}=e;return{x:(t*o.y-n*o.x)/r,y:(i.x*n-i.y*t)/r}}function _S(e,t){return`
|
|
19438
|
+
`,wS="01M3SBP3P8CMVMM1ZZ0QVD2PPF",Si={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 $S(e){const t={};return t[bt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSettings")]={...Si.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSize")]={...Si.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[bt(e,"lineHeight")]={...Si.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[bt(e,"letterSpacing")]={...Si.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[bt(e,"wordSpacing")]={...Si.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[bt(e,"textAlign")]={...Si.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[bt(e,"textAppearance")]={...Si.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Ho=Mi.filter(e=>e!=="count"),CS=Ho.reduce((e,t)=>({...e,...$S(t)}),{}),TS=Ho.reduce((e,t)=>({...e,[bt(t,"fontFamily")]:"Arial",[bt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[bt(t,"letterSpacing")]:0,[bt(t,"wordSpacing")]:0,[bt(t,"textAlign")]:"left",[bt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Ss(e){return Ho.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[bt(n,"fontSize")]=i),o!==void 0&&(t[bt(n,"lineHeight")]=o),t},{})}const IS={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Ho.map(e=>[Nl[e],_l(e)]))},Qr={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},LS=[{title:"Salton Sea from Above",...Qr,image:{assetId:"01M3QM74XERA3G7J0J00XVKEXX",objectFit:"cover"}},{title:"Lunar Module Pilot",...Qr,image:{assetId:"01M3QM74XEE2101QD8PM6E4JSA",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...Qr,image:{assetId:"01M3QM74XEBS5231QA4355P4VQ",objectFit:"cover"}},{title:"David R. Scott During EVA",...Qr,image:{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",objectFit:"cover"}}],PS={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},caption:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"cover",type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]}},required:["image"]},default:LS},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageHoverEffect:{type:"object",scope:"common",title:"Hover",display:{type:"toggle-cycle-numeric-input",enum:["none","scale","saturate"],inputs:{none:"none",scale:"single",saturate:"none"},defaultValue:120,showDash:!1},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},horizontalGap:{type:"number",scope:"layout",title:"Gutter",min:0,display:{type:"range-control"}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title1Color:{type:"string",scope:"common",title:"Title Lightbox",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Lightbox",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Lightbox",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Si.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},...CS},defaults:{type:"a",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightbox:"on",imageHoverEffect:{sizeType:"none",value:120,min:100,max:200},titleColor:"#000000",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:wS,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...TS},layoutDefaults:{d:{wrapperWidth:1,horizontalGap:.006944,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,titleFontSize:.0625,titleLineHeight:.05555,titleLetterSpacing:-34722e-8,...Ss({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})},m:{wrapperWidth:1,horizontalGap:.026666,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,titleFontSize:.16,titleLineHeight:.13333,...Ss({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{wrapperWidth:1,horizontalGap:.01302,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026,titleFontSize:.07,titleLineHeight:.07,...Ss({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})}},layout:["__componentName__","type","wrapperWidth","imageDisplay","lightbox","imageHoverEffect","horizontalGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["wrapperWidth","lightbox"]},{type:"row",title:"Image",items:["imageDisplay","imageHoverEffect"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Lightbox",items:[IS]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},RS={element:bS,id:"waterfall",name:"Waterfall",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/waterfall.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"closeIcon"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},...Ho.map(e=>({path:`${bt(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...Ho.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${bt(t,"fontFamily")}`}),{})},schema:PS,sourceCode:SS},$o=500,Lp="cubic-bezier(0.25, 1, 0.5, 1)",MS=300,ES=5,kS=.15,AS=.4,FS=100,so=100,gd={color:"#000000",hover:"#cccccc"},Zo={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},NS={s:{paddingY:5,paddingActive:5,borderRadius:9,dot:4,activeDot:8,gapInactive:9,inset:5},m:{paddingY:7,paddingActive:7,borderRadius:17,dot:8,activeDot:20,gapInactive:22,inset:7},l:{paddingY:10,paddingActive:10,borderRadius:29,dot:20,activeDot:38,gapInactive:26,inset:10}},ws={offset:{x:0,y:0},linkColor:"#cccccc"},hd={sizeType:"drag",value:3},_S="left";function HS(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.02,lineHeight:(e==null?void 0:e.titleLineHeight)??.02,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,textAlign:_S,color:(e==null?void 0:e.titleColor)??"#000000"};return nn(n,t)}function lo(e,t,n){return`${e}: ${A.scalingValue(t/1440,n)};`}function rr(e,t){return t<=0?0:(e%t+t)%t}function WS(e,t,n,i){if(!i)return{position:rr(e+t,n),hitBoundary:!1};const o=e+t;return o>=0&&o<=n+1?{position:o,hitBoundary:!1}:{position:t>0?n+1:0,hitBoundary:!0}}function OS(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function DS(e,t){const n=document.createElement("div");n.className=t,n.setAttribute("aria-hidden","true"),e.appendChild(n);const i=(p,v)=>{n.style.transform=`translate(${p}px, ${v}px)`;const x=n.getBoundingClientRect();return{x:x.left,y:x.top}},o=i(0,0),r=i(so,0),l=i(0,so);e.removeChild(n);const c={x:(r.x-o.x)/so,y:(r.y-o.y)/so},d={x:(l.x-o.x)/so,y:(l.y-o.y)/so},u=c.x*d.y-d.x*c.y;return{ex:c,ey:d,det:u}}function BS(e,t,n){const{ex:i,ey:o,det:r}=e;return{x:(t*o.y-n*o.x)/r,y:(i.x*n-i.y*t)/r}}function zS(e,t){return`
|
|
19439
19439
|
.${e}-wrapper {
|
|
19440
19440
|
position: relative;
|
|
19441
19441
|
width: 100%;
|
|
@@ -19507,7 +19507,7 @@ export function Waterfall({
|
|
|
19507
19507
|
top: 0;
|
|
19508
19508
|
left: 0;
|
|
19509
19509
|
opacity: 0;
|
|
19510
|
-
transition: opacity ${
|
|
19510
|
+
transition: opacity ${$o}ms ${Lp};
|
|
19511
19511
|
}
|
|
19512
19512
|
.${e}-list-fade .${e}-slide.${e}-is-active {
|
|
19513
19513
|
opacity: 1;
|
|
@@ -19534,29 +19534,29 @@ export function Waterfall({
|
|
|
19534
19534
|
top: 50%;
|
|
19535
19535
|
z-index: 1;
|
|
19536
19536
|
padding: 0;
|
|
19537
|
-
${
|
|
19538
|
-
${
|
|
19537
|
+
${lo("width",30,t)}
|
|
19538
|
+
${lo("height",30,t)}
|
|
19539
19539
|
transition: opacity 0.15s ease-in-out;
|
|
19540
19540
|
}
|
|
19541
19541
|
.${e}-arrow-prev {
|
|
19542
|
-
${
|
|
19542
|
+
${lo("left",-20,t)}
|
|
19543
19543
|
transform: translate3d(-50%, -50%, 0);
|
|
19544
19544
|
}
|
|
19545
19545
|
.${e}-arrow-next {
|
|
19546
19546
|
left: unset;
|
|
19547
|
-
${
|
|
19547
|
+
${lo("right",-20,t)}
|
|
19548
19548
|
transform: translate3d(50%, -50%, 0);
|
|
19549
19549
|
}
|
|
19550
19550
|
.${e}-arrow-prev-vertical {
|
|
19551
19551
|
left: 50%;
|
|
19552
|
-
${
|
|
19552
|
+
${lo("top",-20,t)}
|
|
19553
19553
|
transform: translate3d(-50%, -50%, 0);
|
|
19554
19554
|
}
|
|
19555
19555
|
.${e}-arrow-next-vertical {
|
|
19556
19556
|
left: 50%;
|
|
19557
19557
|
right: unset;
|
|
19558
19558
|
top: unset;
|
|
19559
|
-
${
|
|
19559
|
+
${lo("bottom",-20,t)}
|
|
19560
19560
|
transform: translate3d(-50%, 50%, 0);
|
|
19561
19561
|
}
|
|
19562
19562
|
.${e}-arrow-hidden {
|
|
@@ -19692,10 +19692,10 @@ export function Waterfall({
|
|
|
19692
19692
|
object-fit: cover;
|
|
19693
19693
|
}
|
|
19694
19694
|
.${e}-transition-reveal .${e}-slide.${e}-is-active .${e}-slider-image {
|
|
19695
|
-
animation: ${e}-reveal-horizontal ${
|
|
19695
|
+
animation: ${e}-reveal-horizontal ${$o}ms ease;
|
|
19696
19696
|
}
|
|
19697
19697
|
.${e}-transition-reveal-vertical .${e}-slide.${e}-is-active .${e}-slider-image {
|
|
19698
|
-
animation: ${e}-reveal-vertical ${
|
|
19698
|
+
animation: ${e}-reveal-vertical ${$o}ms ease;
|
|
19699
19699
|
}
|
|
19700
19700
|
@keyframes ${e}-reveal-horizontal {
|
|
19701
19701
|
from { clip-path: inset(0 100% 0 0); }
|
|
@@ -19705,7 +19705,7 @@ export function Waterfall({
|
|
|
19705
19705
|
from { clip-path: inset(100% 0 0 0); }
|
|
19706
19706
|
to { clip-path: inset(0 0 0 0); }
|
|
19707
19707
|
}
|
|
19708
|
-
`}function HS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:r}=k.useScopedStyles(),l=ES(e,n),c=t??[],d=c.length,u=(e==null?void 0:e.trigger)??hd,p=u.sizeType??"drag",v=u.value??hd.value,b=(e==null?void 0:e.direction)??"horizontal",m=(e==null?void 0:e.transition)??"slide",h=(e==null?void 0:e.nav)??"classic",x=(e==null?void 0:e.navSize)??"m",S=RS[x],P=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,f=ve=>k.scalingValue(ve*P,n),w=(e==null?void 0:e.show)??"always",N=(e==null?void 0:e.controls)??null,V=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,B=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,H=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,_=(e==null?void 0:e.controlsColor)??gd.color,z=(e==null?void 0:e.controlsHoverColor)??gd.hover,$=(e==null?void 0:e.navColor)??Zo.colors.inactive,E=(e==null?void 0:e.navPaginationColor)??Zo.colors.pagination,j=(e==null?void 0:e.navBackgroundColor)??Zo.colors.background,L=(e==null?void 0:e.linkColor)??ws.linkColor,C=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,T=b==="horizontal",G=p==="click",A=p==="drag",Y=p==="auto"&&(!n||!!i),R=!n,y=m==="slide",U=h==="classic",ee=w!=="never"&&V>0,de=w==="on hover",F=k.scalingValue(V,n),ie={width:F,height:F,maxWidth:F},I=y&&d>1,[se,J]=s.useState(0),[Se,Re]=s.useState(I?1:0),[pe,he]=s.useState(!1),[te,le]=s.useState(!1),[re,fe]=s.useState(!1),[xe,Te]=s.useState(0),[me,be]=s.useState(!1),[we,g]=s.useState(!1),X=s.useRef(!1),Z=s.useRef(Se);Z.current=Se;const ne=s.useRef(null),ye=s.useRef(0),K=s.useRef(null),D=s.useRef(null),ce=s.useRef(null),q=s.useRef(null),ue=s.useCallback(ve=>{X.current=ve,he(ve)},[]),W=s.useCallback(ve=>{if(d<2||ve===0)return;const Fe=ve>0?1:-1,Xe=Math.abs(ve);if(be(!0),ue(!0),!y){J(st=>rr(st+ve,d));return}let Ye=Z.current;const Pe=I&&(Ye===0||Ye===d+1),_e=Pe?se+1:null;Pe&&(Ye=se+1);let Ke=Xe;for(;Ke>0;){const st=kS(Ye,Fe,d,I);if(Ye=st.position,Ke-=1,st.hitBoundary){ye.current=Ke*Fe;break}}const Ze=Xe-Ke;if(Ze>0&&J(st=>rr(st+Ze*Fe,d)),Z.current=Ye,_e!==null){if(Z.current=_e,Ye===_e){le(!0),Re(Ye);return}ne.current=Ye,le(!0),Re(_e);return}le(!1),Re(Ye)},[se,d,I,y,ue]),Le=s.useCallback(ve=>{W(ve)},[W]),ae=s.useCallback(ve=>{if(d<2)return;const Fe=rr(ve,d);if(!(Fe===se&&!X.current)&&(be(!0),ue(!0),J(Fe),y)){const Xe=Fe+(I?1:0);ne.current=null,ye.current=0,Z.current=Xe,le(!1),Re(Xe)}},[se,d,I,y,ue]);s.useEffect(()=>{if(!pe)return;const ve=window.setTimeout(()=>{if(I&&(Se===0||Se===d+1)){ne.current=null,le(!0),Re(se+1);return}ue(!1)},So);return()=>window.clearTimeout(ve)},[se,d,I,pe,ue,Se]),s.useEffect(()=>{if(!te)return;let ve=0;const Fe=requestAnimationFrame(()=>{ve=requestAnimationFrame(()=>{const Xe=ne.current;ne.current=null;const Ye=ye.current;if(ye.current=0,le(!1),Xe!==null){Z.current=Xe,Re(Xe);return}if(Ye!==0){W(Ye);return}ue(!1)})});return()=>{cancelAnimationFrame(Fe),cancelAnimationFrame(ve)}},[W,ue,te]);const Q=`${I}:${d}`,Ne=s.useRef(Q);s.useEffect(()=>{if(Ne.current===Q)return;Ne.current=Q;const ve=d>0?Math.min(se,d-1):0;ce.current=null,q.current=null,fe(!1),Te(0),J(ve),le(!0),Re(ve+(I?1:0))},[se,d,I,Q]),s.useEffect(()=>{if(!me)return;const ve=window.setTimeout(()=>be(!1),CS);return()=>window.clearTimeout(ve)},[me,se]),s.useEffect(()=>{if(!Y||d<2)return;const ve=Math.max(v,.1)*1e3,Fe=window.setInterval(()=>{R&&we||Le(1)},ve);return()=>window.clearInterval(Fe)},[v,d,Le,Y,we,R]);const Oe=s.useCallback(ve=>{const Fe=ce.current;if(!Fe||Fe.pointerId!==ve.pointerId)return;ce.current=null,q.current=null;const Xe=K.current;if(Xe!=null&&Xe.hasPointerCapture(ve.pointerId)&&Xe.releasePointerCapture(ve.pointerId),!Fe.isActive){y&&Te(0);return}const Pe=!(ve.timeStamp-Fe.lastTime>PS)&&Math.abs(Fe.velocity)>LS,_e=Fe.size>0&&Math.abs(Fe.offset-Fe.baseOffset)>Fe.size*IS;if(fe(!1),!Pe&&!_e){Te(0);return}const Ke=_e?Fe.offset-Fe.baseOffset:Fe.velocity;let Ze=1;_e&&Fe.size>0&&(Ze=Math.max(1,Math.round(Math.abs(Ke)/Fe.size))),Te(0),W(Ke<0?Ze:-Ze)},[W,y]);s.useEffect(()=>{const ve=Fe=>{q.current===null||Fe.pointerId!==q.current||Oe(Fe)};return window.addEventListener("pointerup",ve),window.addEventListener("pointercancel",ve),()=>{window.removeEventListener("pointerup",ve),window.removeEventListener("pointercancel",ve)}},[Oe]);const it=ve=>{const Fe=K.current;if(!A||d<2||!Fe||ve.pointerType==="mouse"&&ve.button!==0)return;ne.current=null,ye.current=0,X.current&&ue(!1);let Xe=0;const Ye=D.current;if(y&&Ye){const Pe=T?Ye.offsetWidth:Ye.offsetHeight;if(Pe>0){const _e=AS(Ye,T);let Ke=Z.current;I&&(Ke===0||Ke===d+1)?(Ke=se+1,Z.current=Ke,le(!0),Re(Ke),Xe=0):Xe=_e+Ke*Pe,Te(Xe)}}Fe.setPointerCapture(ve.pointerId),q.current=ve.pointerId,ce.current={pointerId:ve.pointerId,startClientX:ve.clientX,startClientY:ve.clientY,axes:FS(Fe,`${r}-axis-probe`),size:T?Fe.offsetWidth:Fe.offsetHeight,isActive:!1,baseOffset:Xe,offset:Xe,lastTime:ve.timeStamp,velocity:0}},qe=ve=>{const Fe=ce.current;if(!Fe||Fe.pointerId!==ve.pointerId)return;if(ve.pointerType==="mouse"&&ve.buttons===0){Oe(ve);return}const Xe=ve.clientX-Fe.startClientX,Ye=ve.clientY-Fe.startClientY,Pe=Fe.axes?NS(Fe.axes,Xe,Ye):{x:Xe,y:Ye},_e=T?Pe.x:Pe.y,Ke=T?Pe.y:Pe.x,Ze=Fe.baseOffset+_e;if(!Fe.isActive){if(Math.max(Math.abs(_e),Math.abs(Ke))<TS)return;if(Math.abs(Ke)>Math.abs(_e)){const Ue=K.current;Ue!=null&&Ue.hasPointerCapture(Fe.pointerId)&&Ue.releasePointerCapture(Fe.pointerId),ce.current=null,q.current=null,y&&Te(0);return}Fe.isActive=!0,fe(!0)}const st=ve.timeStamp-Fe.lastTime;st>0&&(Fe.velocity=(Ze-Fe.offset)/st,Fe.lastTime=ve.timeStamp),Fe.offset=Ze,y&&Te(Ze)},Je=ve=>{Oe(ve)},ot=T?`translate3d(calc(${-Se*100}% + ${xe}px), 0, 0)`:`translate3d(0, calc(${-Se*100}% + ${xe}px), 0)`,Ve=I?[c[d-1],...c,c[0]]:c;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_S(r,n)}}),a.jsxs("div",{className:Pt(`${r}-wrapper`,{[`${r}-transition-reveal`]:m==="reveal",[`${r}-transition-reveal-vertical`]:m==="reveal"&&!T}),onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),children:[a.jsxs("div",{className:`${r}-slider-inner`,style:{backgroundColor:"transparent"},children:[a.jsx("div",{ref:K,className:Pt(`${r}-track`,{[`${r}-track-draggable`]:A,[`${r}-track-draggable-vertical`]:A&&!T}),onPointerDown:it,onPointerMove:qe,onPointerUp:Je,onPointerCancel:Je,onLostPointerCapture:ve=>{q.current===ve.pointerId&&Oe(ve)},children:a.jsx("div",{ref:D,className:Pt(`${r}-list`,{[`${r}-list-slide`]:y,[`${r}-list-slide-vertical`]:y&&!T,[`${r}-list-fade`]:!y}),style:y?{transform:ot,transition:re||te?"none":`transform ${So}ms ${Sp}`}:void 0,children:Ve.map((ve,Fe)=>{const Xe=I?rr(Fe-1,d):Fe,Pe=I&&(Fe===0||Fe===d+1)?`clone-${Fe===0?"start":"end"}`:`slide-${Xe}`;return a.jsx("div",{className:Pt(`${r}-slide`,{[`${r}-is-active`]:!y&&Xe===se}),children:a.jsx("div",{className:`${r}-slider-item`,children:a.jsx("div",{className:`${r}-img-wrapper`,children:a.jsx("img",{className:Pt(`${r}-slider-image`,{[`${r}-contain`]:ve.image.objectFit==="contain",[`${r}-cover`]:ve.image.objectFit==="cover"}),src:ve.image.assetId,alt:ve.image.name??"",draggable:!1})})})},Pe)})})}),ee&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Pt(`${r}-arrow`,{[`${r}-arrow-prev`]:T,[`${r}-arrow-prev-vertical`]:!T,[`${r}-hover-arrow`]:de}),style:{color:_,"--arrow-hover-color":z,...ie},children:a.jsxs("button",{onClick:ve=>{ve.stopPropagation(),Le(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${k.scalingValue(B,n)}, ${k.scalingValue(H*(T?1:-1),n)}) rotate(${T?"0deg":"90deg"})`},children:[N&&a.jsx(mn,{url:N,fill:_,hoverFill:z,className:Pt(`${r}-arrow-img`,`${r}-mirror`),style:ie}),!N&&a.jsx(fd,{color:_,className:Pt(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:Pt(`${r}-arrow`,{[`${r}-arrow-next`]:T,[`${r}-arrow-next-vertical`]:!T,[`${r}-hover-arrow`]:de}),style:{color:_,"--arrow-hover-color":z,...ie},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:ve=>{ve.stopPropagation(),Le(1)},style:{transform:`translate(${k.scalingValue(B*(T?-1:1),n)}, ${k.scalingValue(H,n)}) rotate(${T?"0deg":"90deg"})`},children:[N&&a.jsx(mn,{url:N,fill:_,hoverFill:z,className:`${r}-arrow-img`,style:ie}),!N&&a.jsx(fd,{color:_,className:Pt(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),G&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>Le(1)}),U&&a.jsx("div",{className:Pt(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:T,[`${r}-pagination-inside-left`]:!T}),style:T?{bottom:f(S.inset)}:{left:f(S.inset)},children:a.jsx("div",{className:Pt(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!T,[`${r}-animate-dots`]:me}),style:{backgroundColor:j,gap:f(S.gapInactive-S.activeDot+S.dot),...T?{height:f(S.activeDot+S.paddingY*2),paddingTop:f(S.paddingY),paddingBottom:f(S.paddingY),paddingLeft:f(S.paddingActive),paddingRight:f(S.paddingActive)}:{width:f(S.activeDot+S.paddingY*2),paddingLeft:f(S.paddingY),paddingRight:f(S.paddingY),paddingTop:f(S.paddingActive),paddingBottom:f(S.paddingActive)},borderRadius:f(S.borderRadius),transform:`translate(${k.scalingValue(Zo.offset.x,n)}, ${k.scalingValue(Zo.offset.y,n)})`},children:c.map((ve,Fe)=>{const Xe=Fe===se,Ye=Xe?S.activeDot:S.dot;return a.jsx("button",{onClick:()=>ae(Fe),className:`${r}-pagination-item`,style:{width:f(S.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:Xe?E:$,width:f(Ye)}})},Fe)})},`${x}-${b}`)})]}),a.jsxs("div",{className:`${r}-caption-block`,children:[a.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${r}-control`:void 0,style:{height:k.scalingValue(C,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:c.map((ve,Fe)=>a.jsx("div",{className:Pt(`${r}-caption-text`,{[`${r}-with-pointer-events`]:Fe===se&&n,[`${r}-active`]:Fe===se}),style:{...l,width:"max-content",transitionDuration:`${Math.round(So/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":L,"--link-hover-color":L,position:"relative",top:k.scalingValue(ws.offset.y,n),left:k.scalingValue(ws.offset.x,n)},children:a.jsx(Yi,{content:ve.imageCaption})})},Fe))})]})]})]})}function fd({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const WS=`import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
19708
|
+
`}function jS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:r}=A.useScopedStyles(),l=HS(e,n),c=t??[],d=c.length,u=(e==null?void 0:e.trigger)??hd,p=u.sizeType??"drag",v=u.value??hd.value,x=(e==null?void 0:e.direction)??"horizontal",m=(e==null?void 0:e.transition)??"slide",h=(e==null?void 0:e.nav)??"classic",b=(e==null?void 0:e.navSize)??"m",S=NS[b],M=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,y=be=>A.scalingValue(be*M,n),$=(e==null?void 0:e.show)??"always",R=(e==null?void 0:e.controls)??null,X=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,B=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,O=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,N=(e==null?void 0:e.controlsColor)??gd.color,z=(e==null?void 0:e.controlsHoverColor)??gd.hover,C=(e==null?void 0:e.navColor)??Zo.colors.inactive,I=(e==null?void 0:e.navPaginationColor)??Zo.colors.pagination,j=(e==null?void 0:e.navBackgroundColor)??Zo.colors.background,E=(e==null?void 0:e.linkColor)??ws.linkColor,w=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,L=x==="horizontal",V=p==="click",_=p==="drag",K=p==="auto"&&(!n||!!i),P=!n,f=m==="slide",U=h==="classic",te=$!=="never"&&X>0,ce=$==="on hover",F=A.scalingValue(X,n),ie={width:F,height:F,maxWidth:F},T=f&&d>1,[le,J]=s.useState(0),[Se,Le]=s.useState(T?1:0),[me,ye]=s.useState(!1),[ee,oe]=s.useState(!1),[re,ge]=s.useState(!1),[we,Ae]=s.useState(0),[fe,ve]=s.useState(!1),[xe,g]=s.useState(!1),G=s.useRef(!1),Q=s.useRef(Se);Q.current=Se;const ne=s.useRef(null),ue=s.useRef(0),q=s.useRef(null),D=s.useRef(null),se=s.useRef(null),Y=s.useRef(null),pe=s.useCallback(be=>{G.current=be,ye(be)},[]),H=s.useCallback(be=>{if(d<2||be===0)return;const He=be>0?1:-1,je=Math.abs(be);if(ve(!0),pe(!0),!f){J(lt=>rr(lt+be,d));return}let Qe=Q.current;const Ce=T&&(Qe===0||Qe===d+1),_e=Ce?le+1:null;Ce&&(Qe=le+1);let Ue=je;for(;Ue>0;){const lt=WS(Qe,He,d,T);if(Qe=lt.position,Ue-=1,lt.hitBoundary){ue.current=Ue*He;break}}const Ye=je-Ue;if(Ye>0&&J(lt=>rr(lt+Ye*He,d)),Q.current=Qe,_e!==null){if(Q.current=_e,Qe===_e){oe(!0),Le(Qe);return}ne.current=Qe,oe(!0),Le(_e);return}oe(!1),Le(Qe)},[le,d,T,f,pe]),Ie=s.useCallback(be=>{H(be)},[H]),de=s.useCallback(be=>{if(d<2)return;const He=rr(be,d);if(!(He===le&&!G.current)&&(ve(!0),pe(!0),J(He),f)){const je=He+(T?1:0);ne.current=null,ue.current=0,Q.current=je,oe(!1),Le(je)}},[le,d,T,f,pe]);s.useEffect(()=>{if(!me)return;const be=window.setTimeout(()=>{if(T&&(Se===0||Se===d+1)){ne.current=null,oe(!0),Le(le+1);return}pe(!1)},$o);return()=>window.clearTimeout(be)},[le,d,T,me,pe,Se]),s.useEffect(()=>{if(!ee)return;let be=0;const He=requestAnimationFrame(()=>{be=requestAnimationFrame(()=>{const je=ne.current;ne.current=null;const Qe=ue.current;if(ue.current=0,oe(!1),je!==null){Q.current=je,Le(je);return}if(Qe!==0){H(Qe);return}pe(!1)})});return()=>{cancelAnimationFrame(He),cancelAnimationFrame(be)}},[H,pe,ee]);const Z=`${T}:${d}`,Ne=s.useRef(Z);s.useEffect(()=>{if(Ne.current===Z)return;Ne.current=Z;const be=d>0?Math.min(le,d-1):0;se.current=null,Y.current=null,ge(!1),Ae(0),J(be),oe(!0),Le(be+(T?1:0))},[le,d,T,Z]),s.useEffect(()=>{if(!fe)return;const be=window.setTimeout(()=>ve(!1),MS);return()=>window.clearTimeout(be)},[fe,le]),s.useEffect(()=>{if(!K||d<2)return;const be=Math.max(v,.1)*1e3,He=window.setInterval(()=>{P&&xe||Ie(1)},be);return()=>window.clearInterval(He)},[v,d,Ie,K,xe,P]);const Oe=s.useCallback(be=>{const He=se.current;if(!He||He.pointerId!==be.pointerId)return;se.current=null,Y.current=null;const je=q.current;if(je!=null&&je.hasPointerCapture(be.pointerId)&&je.releasePointerCapture(be.pointerId),!He.isActive){f&&Ae(0);return}const Ce=!(be.timeStamp-He.lastTime>FS)&&Math.abs(He.velocity)>AS,_e=He.size>0&&Math.abs(He.offset-He.baseOffset)>He.size*kS;if(ge(!1),!Ce&&!_e){Ae(0);return}const Ue=_e?He.offset-He.baseOffset:He.velocity;let Ye=1;_e&&He.size>0&&(Ye=Math.max(1,Math.round(Math.abs(Ue)/He.size))),Ae(0),H(Ue<0?Ye:-Ye)},[H,f]);s.useEffect(()=>{const be=He=>{Y.current===null||He.pointerId!==Y.current||Oe(He)};return window.addEventListener("pointerup",be),window.addEventListener("pointercancel",be),()=>{window.removeEventListener("pointerup",be),window.removeEventListener("pointercancel",be)}},[Oe]);const Je=be=>{const He=q.current;if(!_||d<2||!He||be.pointerType==="mouse"&&be.button!==0)return;ne.current=null,ue.current=0,G.current&&pe(!1);let je=0;const Qe=D.current;if(f&&Qe){const Ce=L?Qe.offsetWidth:Qe.offsetHeight;if(Ce>0){const _e=OS(Qe,L);let Ue=Q.current;T&&(Ue===0||Ue===d+1)?(Ue=le+1,Q.current=Ue,oe(!0),Le(Ue),je=0):je=_e+Ue*Ce,Ae(je)}}He.setPointerCapture(be.pointerId),Y.current=be.pointerId,se.current={pointerId:be.pointerId,startClientX:be.clientX,startClientY:be.clientY,axes:DS(He,`${r}-axis-probe`),size:L?He.offsetWidth:He.offsetHeight,isActive:!1,baseOffset:je,offset:je,lastTime:be.timeStamp,velocity:0}},De=be=>{const He=se.current;if(!He||He.pointerId!==be.pointerId)return;if(be.pointerType==="mouse"&&be.buttons===0){Oe(be);return}const je=be.clientX-He.startClientX,Qe=be.clientY-He.startClientY,Ce=He.axes?BS(He.axes,je,Qe):{x:je,y:Qe},_e=L?Ce.x:Ce.y,Ue=L?Ce.y:Ce.x,Ye=He.baseOffset+_e;if(!He.isActive){if(Math.max(Math.abs(_e),Math.abs(Ue))<ES)return;if(Math.abs(Ue)>Math.abs(_e)){const it=q.current;it!=null&&it.hasPointerCapture(He.pointerId)&&it.releasePointerCapture(He.pointerId),se.current=null,Y.current=null,f&&Ae(0);return}He.isActive=!0,ge(!0)}const lt=be.timeStamp-He.lastTime;lt>0&&(He.velocity=(Ye-He.offset)/lt,He.lastTime=be.timeStamp),He.offset=Ye,f&&Ae(Ye)},Ze=be=>{Oe(be)},at=L?`translate3d(calc(${-Se*100}% + ${we}px), 0, 0)`:`translate3d(0, calc(${-Se*100}% + ${we}px), 0)`,Xe=T?[c[d-1],...c,c[0]]:c;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:zS(r,n)}}),a.jsxs("div",{className:Rt(`${r}-wrapper`,{[`${r}-transition-reveal`]:m==="reveal",[`${r}-transition-reveal-vertical`]:m==="reveal"&&!L}),onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),children:[a.jsxs("div",{className:`${r}-slider-inner`,style:{backgroundColor:"transparent"},children:[a.jsx("div",{ref:q,className:Rt(`${r}-track`,{[`${r}-track-draggable`]:_,[`${r}-track-draggable-vertical`]:_&&!L}),onPointerDown:Je,onPointerMove:De,onPointerUp:Ze,onPointerCancel:Ze,onLostPointerCapture:be=>{Y.current===be.pointerId&&Oe(be)},children:a.jsx("div",{ref:D,className:Rt(`${r}-list`,{[`${r}-list-slide`]:f,[`${r}-list-slide-vertical`]:f&&!L,[`${r}-list-fade`]:!f}),style:f?{transform:at,transition:re||ee?"none":`transform ${$o}ms ${Lp}`}:void 0,children:Xe.map((be,He)=>{const je=T?rr(He-1,d):He,Ce=T&&(He===0||He===d+1)?`clone-${He===0?"start":"end"}`:`slide-${je}`;return a.jsx("div",{className:Rt(`${r}-slide`,{[`${r}-is-active`]:!f&&je===le}),children:a.jsx("div",{className:`${r}-slider-item`,children:a.jsx("div",{className:`${r}-img-wrapper`,children:a.jsx("img",{className:Rt(`${r}-slider-image`,{[`${r}-contain`]:be.image.objectFit==="contain",[`${r}-cover`]:be.image.objectFit==="cover"}),src:be.image.assetId,alt:be.image.name??"",draggable:!1})})})},Ce)})})}),te&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Rt(`${r}-arrow`,{[`${r}-arrow-prev`]:L,[`${r}-arrow-prev-vertical`]:!L,[`${r}-hover-arrow`]:ce}),style:{color:N,"--arrow-hover-color":z,...ie},children:a.jsxs("button",{onClick:be=>{be.stopPropagation(),Ie(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${A.scalingValue(B,n)}, ${A.scalingValue(O*(L?1:-1),n)}) rotate(${L?"0deg":"90deg"})`},children:[R&&a.jsx(gn,{url:R,fill:N,hoverFill:z,className:Rt(`${r}-arrow-img`,`${r}-mirror`),style:ie}),!R&&a.jsx(fd,{color:N,className:Rt(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:Rt(`${r}-arrow`,{[`${r}-arrow-next`]:L,[`${r}-arrow-next-vertical`]:!L,[`${r}-hover-arrow`]:ce}),style:{color:N,"--arrow-hover-color":z,...ie},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:be=>{be.stopPropagation(),Ie(1)},style:{transform:`translate(${A.scalingValue(B*(L?-1:1),n)}, ${A.scalingValue(O,n)}) rotate(${L?"0deg":"90deg"})`},children:[R&&a.jsx(gn,{url:R,fill:N,hoverFill:z,className:`${r}-arrow-img`,style:ie}),!R&&a.jsx(fd,{color:N,className:Rt(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),V&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>Ie(1)}),U&&a.jsx("div",{className:Rt(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:L,[`${r}-pagination-inside-left`]:!L}),style:L?{bottom:y(S.inset)}:{left:y(S.inset)},children:a.jsx("div",{className:Rt(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!L,[`${r}-animate-dots`]:fe}),style:{backgroundColor:j,gap:y(S.gapInactive-S.activeDot+S.dot),...L?{height:y(S.activeDot+S.paddingY*2),paddingTop:y(S.paddingY),paddingBottom:y(S.paddingY),paddingLeft:y(S.paddingActive),paddingRight:y(S.paddingActive)}:{width:y(S.activeDot+S.paddingY*2),paddingLeft:y(S.paddingY),paddingRight:y(S.paddingY),paddingTop:y(S.paddingActive),paddingBottom:y(S.paddingActive)},borderRadius:y(S.borderRadius),transform:`translate(${A.scalingValue(Zo.offset.x,n)}, ${A.scalingValue(Zo.offset.y,n)})`},children:c.map((be,He)=>{const je=He===le,Qe=je?S.activeDot:S.dot;return a.jsx("button",{onClick:()=>de(He),className:`${r}-pagination-item`,style:{width:y(S.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:je?I:C,width:y(Qe)}})},He)})},`${b}-${x}`)})]}),a.jsxs("div",{className:`${r}-caption-block`,children:[a.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${r}-control`:void 0,style:{height:A.scalingValue(w,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:c.map((be,He)=>a.jsx("div",{className:Rt(`${r}-caption-text`,{[`${r}-with-pointer-events`]:He===le&&n,[`${r}-active`]:He===le}),style:{...l,width:"max-content",transitionDuration:`${Math.round($o/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":E,"--link-hover-color":E,position:"relative",top:A.scalingValue(ws.offset.y,n),left:A.scalingValue(ws.offset.x,n)},children:a.jsx(Zi,{content:be.imageCaption})})},He))})]})]})]})}function fd({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const VS=`import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
19709
19709
|
import cn from 'classnames';
|
|
19710
19710
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
|
|
19711
19711
|
import { scalingValue } from '../utils/scalingValue';
|
|
@@ -20886,14 +20886,14 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
|
|
|
20886
20886
|
</svg>
|
|
20887
20887
|
);
|
|
20888
20888
|
}
|
|
20889
|
-
`,
|
|
20889
|
+
`,GS={type:"object",version:1,settings:{sizing:"manual",properties:{trigger:{type:"object",scope:"common",title:"Trigger",display:{type:"toggle-cycle-numeric-input",enum:["click","drag","auto"],inputs:{click:"none",drag:"none",auto:"single"},defaultValue:3,showDash:!1},min:1,max:5,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical"]}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["slide","fade in","reveal"]}},nav:{type:"string",scope:"common",title:"Nav",display:{type:"toggle-cycle",enum:["classic","no"]}},navSize:{type:"string",scope:"layout",title:"Nav Size",display:{type:"toggle-cycle",enum:["s","m","l"]}},navUnit:{type:"number",scope:"layout",title:"",display:{type:"numeric-input",visible:!1},min:0,max:1},controls:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},controlsMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},show:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","on hover","never"]}},paddingX:{type:"number",scope:"layout",title:"Padding X",display:{type:"numeric-input"},min:-9999,max:9999},paddingY:{type:"number",scope:"layout",title:"Padding Y",display:{type:"numeric-input"},min:-9999,max:9999},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"palette-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"palette-color-picker"}},navColor:{type:"string",scope:"common",title:"Dot Nav",display:{type:"palette-color-picker"}},navPaginationColor:{type:"string",scope:"common",title:"Active Nav",display:{type:"palette-color-picker"}},navBackgroundColor:{type:"string",scope:"common",title:"BG Nav",display:{type:"palette-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"palette-color-picker"}},titleColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{type:"object",scope:"common",title:"",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}}},defaults:{trigger:{sizeType:"drag",value:3,min:1,max:5},direction:"horizontal",transition:"slide",nav:"classic",controls:null,show:"always",controlsColor:"#000000",controlsHoverColor:"#3F3F3F",navColor:"#A4A4A4",navPaginationColor:"#FFFFFF",navBackgroundColor:"#000000",linkColor:"#2E12F0",titleColor:"#000000",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{controlsMaxWidth:30/1440,paddingX:0,paddingY:0,captionMarginTop:10/1440,titleFontSize:16/1440,titleLineHeight:16/1440,navSize:"m",navUnit:1/1440},t:{controlsMaxWidth:30/768,paddingX:-10/768,paddingY:0,captionMarginTop:10/768,titleFontSize:16/768,titleLineHeight:16/768,navSize:"m",navUnit:1/768},m:{controlsMaxWidth:30/375,paddingX:-14/375,paddingY:0,captionMarginTop:10/375,titleFontSize:16/375,titleLineHeight:16/375,navSize:"m",navUnit:1/375}},displayRules:[{if:{name:"show",value:"never"},then:{name:"properties.controlsColor.display.visible",value:!1}},{if:{name:"show",value:"never"},then:{name:"properties.controlsHoverColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navPaginationColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navBackgroundColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navSize.display.visible",value:!1}}],layout:["__componentName__","trigger","direction","transition","nav","navSize","controls","controlsMaxWidth","show","paddingX","paddingY","captionMarginTop","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["trigger","direction"]},{type:"row",title:"",items:["transition","nav"]},{type:"row",title:"",items:["navSize"]},{type:"group",title:"Controls",items:[{type:"row",title:"",items:["controls","controlsMaxWidth"]},{type:"row",title:"",items:["paddingX","paddingY"]},{type:"row",title:"",items:["show"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]}]}],paletteBookmark:{items:["controlsColor","controlsHoverColor","navPaginationColor","navColor","navBackgroundColor","titleColor","linkColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["assetId","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",assetId:"01M3QM74XESYN1HRYH9VRTZ5CK"},imageCaption:[{type:"paragraph",children:[{text:"Earth-orbital mission"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XERA3G7J0J00XVKEXX"},imageCaption:[{type:"paragraph",children:[{text:"Salton Sea from Above"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEE2101QD8PM6E4JSA"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module Pilot"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEVZ9F59FC7M9BA63Q"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module 3 porch"}]}]},{image:{objectFit:"cover",assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA"},imageCaption:[{type:"paragraph",children:[{text:"Command Module"}]}]}]}},XS={element:jS,id:"slider-2-0",name:"Slider 2.0",category:"galleries",version:1,defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},schema:GS,sourceCode:VS,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},go=300/1440,qS=8/1440,ti=.004;function US(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function $s(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Cs(e,t,n,i,o="title-leading-gap"){const r=e??.01;return t===void 0||t>=r?{}:{[`--${n}-${o}`]:A.scalingValue((r-t)/2,i)}}function YS(e){return`
|
|
20890
20890
|
.${e}-wrapper {
|
|
20891
20891
|
box-sizing: border-box;
|
|
20892
20892
|
display: flex;
|
|
20893
20893
|
flex-direction: column;
|
|
20894
20894
|
position: relative;
|
|
20895
20895
|
width: 100%;
|
|
20896
|
-
min-height: ${
|
|
20896
|
+
min-height: ${US(48)};
|
|
20897
20897
|
}
|
|
20898
20898
|
.${e}-single-title-layer {
|
|
20899
20899
|
position: absolute;
|
|
@@ -21126,7 +21126,7 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
|
|
|
21126
21126
|
width: var(--cntrl-article-width, 100vw) !important;
|
|
21127
21127
|
height: var(--cntrl-viewport-height, 100vh) !important;
|
|
21128
21128
|
}
|
|
21129
|
-
`}const wp={"left-top":{horizontal:"left",vertical:"top"},"top-center":{horizontal:"center",vertical:"top"},"top-right":{horizontal:"right",vertical:"top"},"left-center":{horizontal:"left",vertical:"center"},center:{horizontal:"center",vertical:"center"},"right-center":{horizontal:"right",vertical:"center"},"left-bottom":{horizontal:"left",vertical:"bottom"},"bottom-center":{horizontal:"center",vertical:"bottom"},"right-bottom":{horizontal:"right",vertical:"bottom"}};function VS(e){return e in wp}function GS(e){if(e&&VS(e))return e;switch(e){case"center-top":return"top-center";case"right-top":return"top-right";case"top-left":return"left-top";case"center-bottom":return"bottom-center";case"bottom-left":return"left-bottom";case"bottom-right":return"right-bottom";case"center-center":return"center";case"left":return"left-center";case"right":return"right-center";case"top":return"left-top";default:return"center"}}function Gl(e){return wp[e]}const XS="rgba(28,31,34,0.9)",Zn=500,Oi="cubic-bezier(0.22, 1, 0.36, 1)",US=72,qS=50,YS={titleColor:"title-color",descriptionColor:"description-color",lightboxCounterColor:"lightbox-counter-color"},KS=[];function QS(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 ZS(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function JS(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function ew(e){if(!Array.isArray(e)||e.length===0)return[];if(QS(e)){const t=[];for(const n of e){const i=ZS(n);if(!i)continue;const o=JS(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.assetId?o:null})}return t}return e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Ks(e){return e.type==="video"}function tw(e){e.pause(),e.removeAttribute("src"),e.load()}function Zr(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function nw(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const iw=1140/1440;function ow(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function rw(e){const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`}function aw(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function sw({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:c}){return s.useEffect(()=>{const d=n.current;if(d)return()=>{tw(d)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:c,style:i})}function lw({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:c,counterClassName:d,counterStyle:u,backgroundColor:p}){const v=i==="cover",b=s.useRef(null),m=s.useRef(null),h=s.useRef(null),x=s.useRef(0),S=s.useRef(0),P=s.useRef("none"),f=s.useRef(!1),w=s.useRef(!1),N=s.useRef(!1),V=s.useRef(null),[B,H]=s.useState(null),[_,z]=s.useState("opening"),[$,E]=s.useState(0),[j,L]=s.useState(0),[C,T]=s.useState(!1),[G,A]=s.useState(!1),[Y,R]=s.useState(!1),y=s.useRef(n),U=t[n],ee=U?Ks(U):!1,de=j!==0||C,F=s.useCallback(me=>{N.current=me,T(me)},[]),ie=s.useCallback(()=>{V.current!==null&&(window.clearTimeout(V.current),V.current=null)},[]),I=s.useCallback(()=>{ie(),V.current=window.setTimeout(()=>{ie(),F(!1)},Zn+32)},[ie,F]),se=s.useCallback(()=>{const me=b.current,be=m.current;if(!me)return;const we=me.getBoundingClientRect(),g=we.width,X=we.height;if(!g||!X)return;if(i==="cover"){H({width:g,height:X,left:we.left,top:we.top});return}if(!be){H(Zr(me));return}const{width:Z,height:ne}=nw(be);if(!Z||!ne){H(Zr(me));return}const ye=Z/ne,K=g/X;if(ye>K){const D=g/ye;H({width:g,height:D,left:we.left,top:we.top+(X-D)/2})}else{const D=X*ye;H({width:D,height:X,left:we.left+(g-D)/2,top:we.top})}},[i]);s.useEffect(()=>{se();const me=b.current;if(!me)return;const be=new ResizeObserver(()=>se());return be.observe(me),()=>be.disconnect()},[se,n]),s.useEffect(()=>{_==="opening"&&B&&z("open")},[_,B]),s.useEffect(()=>{if(_!=="closing")return;const me=setTimeout(()=>r(),Zn);return()=>clearTimeout(me)},[_,r]),s.useEffect(()=>()=>{ie()},[ie]),s.useLayoutEffect(()=>{if(y.current===n)return;ie(),E(0),L(0),F(!1),R(!1),A(!1),x.current=0,S.current=0,P.current="none",f.current=!1,h.current=null,w.current=!1;const me=b.current;me&&H(Zr(me)),y.current=n},[n,F,ie]),s.useEffect(()=>{if(_!=="open")return;let me=null;const be=()=>{me&&(document.removeEventListener("click",me,!0),me=null)},we=()=>{be(),me=K=>{K.stopPropagation(),K.preventDefault(),be()},document.addEventListener("click",me,!0)},g=K=>{ie(),N.current=!1,T(!1),L(0),A(!1),f.current=!1,S.current=0,P.current="none";const D=b.current;D&&H(Zr(D)),K<0?c():l()},X=K=>{if(Math.abs(K)>qS&&t.length>1){g(K);return}F(!0),L(0),I()},Z=K=>{if(K.touches.length!==1||N.current)return;const D=K.touches[0];w.current=!0,h.current={x:D.clientX,y:D.clientY},P.current="none",S.current=0,f.current=!1},ne=K=>{if(!h.current||K.touches.length!==1||N.current)return;const D=K.touches[0],ce=D.clientX-h.current.x,q=D.clientY-h.current.y;if(P.current==="none"){if(Math.abs(ce)<10&&Math.abs(q)<10)return;if(Math.abs(ce)>Math.abs(q)){if(t.length<=1)return;P.current="horizontal"}else if(q>0)P.current="vertical";else return}if(P.current==="horizontal"){f.current=!0,A(!0),S.current=ce,L(ce),K.preventDefault();return}P.current==="vertical"&&(f.current=!0,A(!0),x.current=q,E(q),K.preventDefault())},ye=()=>{if(!h.current)return;const K=P.current,D=f.current;if(D&&K==="horizontal")X(S.current),we();else if(D&&K==="vertical")if(x.current>US){const q=window.innerHeight;x.current=q,R(!0),E(q),z("closing")}else x.current=0,E(0),we();else K==="horizontal"&&Math.abs(S.current)>0&&(X(S.current),we());h.current=null,P.current="none",S.current=0,f.current=!1,A(!1)};return document.addEventListener("touchstart",Z,{passive:!0}),document.addEventListener("touchmove",ne,{passive:!1}),document.addEventListener("touchend",ye),document.addEventListener("touchcancel",ye),()=>{document.removeEventListener("touchstart",Z),document.removeEventListener("touchmove",ne),document.removeEventListener("touchend",ye),document.removeEventListener("touchcancel",ye),be()}},[_,t.length,c,l,F,I,ie]),s.useEffect(()=>{const me=be=>{be.key==="Escape"&&(be.preventDefault(),be.stopPropagation(),_!=="closing"&&z("closing"))};return window.addEventListener("keydown",me,!0),()=>window.removeEventListener("keydown",me,!0)},[_]);const J=()=>{_!=="closing"&&z("closing")},Se=_==="open",Re=_==="closing",pe=$>0?Math.max(0,1-$/500):1,he=$>0?Math.max(.35,1-$/500):1,te=me=>{if(me.stopPropagation(),w.current){w.current=!1;return}if(t.length<=1)return;const be=me.currentTarget.getBoundingClientRect(),we=me.clientY-be.top,g=Math.min(52,be.height*.2);if(!(we>be.height-g)){if(me.clientX-be.left<be.width/2){l();return}c()}},le=me=>{if(t.length<=1)return;const be=me.currentTarget.getBoundingClientRect(),we=me.clientX-be.left,g=me.clientY-be.top,X=Math.min(52,be.height*.2);if(g>be.height-X){me.currentTarget.style.cursor="default";return}me.currentTarget.style.cursor=we<be.width/2?"w-resize":"e-resize"},re=s.useCallback(me=>{me.propertyName!=="transform"||!N.current||(ie(),F(!1))},[ie,F]),fe=de?`translateX(${j}px)`:$>0?`translateY(${$}px)`:void 0,xe={position:"fixed",top:B==null?void 0:B.top,left:B==null?void 0:B.left,width:B==null?void 0:B.width,height:B==null?void 0:B.height,objectFit:i==="cover"?"cover":"contain",transform:fe,opacity:$>0?he:_==="opening"||Re?0:1,transition:G&&!C?"none":C?`transform ${Zn}ms ${Oi}`:Y?`transform ${Zn}ms ${Oi}, opacity ${Zn}ms ${Oi}`:_==="opening"||Re?`opacity ${Zn}ms ${Oi}`:"none",pointerEvents:ee&&Se&&!de?"auto":"none",touchAction:ee&&Se?"none":void 0,zIndex:9998},Te=B?{position:"fixed",top:B.top,height:B.height,width:B.width/2,zIndex:9999}:null;return a.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:_==="open"?"none":void 0},onClick:J,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:p,opacity:Se?pe:0,transition:G?"none":`opacity ${Zn}ms ${Oi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:v?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:b,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Se?1:0,transition:`opacity ${Zn}ms ${Oi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:b,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Se?1:0,transition:`opacity ${Zn}ms ${Oi}`},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]})}),B&&U&&(ee?a.jsx(sw,{src:U.assetId,phase:_,mediaRef:m,mediaStyle:xe,onLoadedMetadata:se,onClick:te,onMouseMove:le,onTransitionEnd:re},`${n}-${U.assetId}`):a.jsx("img",{ref:m,src:U.assetId,alt:U.name,onLoad:se,onTransitionEnd:re,style:xe},`${n}-${U.assetId}`)),Se&&Te&&t.length>1&&!ee&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Te,left:B.left,cursor:"w-resize",pointerEvents:de?"none":"auto"},onClick:me=>{if(w.current){w.current=!1;return}me.stopPropagation(),l()}}),a.jsx("div",{style:{...Te,left:B.left+B.width/2,cursor:"e-resize",pointerEvents:de?"none":"auto"},onClick:me=>{if(w.current){w.current=!1;return}me.stopPropagation(),c()}})]})]})}function yd({P:e,media:t,imgWidth:n,cornerRadius:i,fillGalleryWidth:o,imageDisplay:r,isEditor:l,galleryPaddingBetween:c=0,showPaddingAfter:d=!1,showControls:u=!1,onMediaClick:p}){const v=`${e}-gallery-${Ks(t)?"video":"image"}`,b=r.display==="cover",m=rw(r),h=_=>k.scalingValue(_,l??!1),x=n??po,S=o?{width:"100%",maxWidth:"100%"}:{width:h(x),maxWidth:"100%"},P=i?{borderRadius:h(i)}:{},f={...S,...b?{aspectRatio:m,height:"auto",overflow:"hidden"}:{},...P},w={...b?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":h(x)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...b?{}:P},V={className:v,style:w,onClick:p?_=>{_.stopPropagation(),p()}:void 0},B=Math.max(c,ei),H=Ks(t)?a.jsx("video",{...V,src:t.assetId,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{...V,src:t.assetId,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[b?a.jsx("div",{style:f,children:H}):H,d&&c>0&&a.jsx("div",{className:`${e}-padding-handle`,style:{height:h(c)},"aria-hidden":"true"}),u&&d&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:h(B)}})]})}function cw({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:r,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:c,showControls:d,scaled:u,children:p}){const v=t==="a"?i:t==="c"?o:0,b=v>0||d;return a.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&b&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(v)},"aria-hidden":"true"}),d&&t==="c"&&a.jsx("div",{"data-controls":"galleryPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,left:0,width:u(l),height:"100%"}}),a.jsx("div",{className:`${e}-gallery`,style:n,children:p}),t==="a"&&b&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(v)},"aria-hidden":"true"}),d&&t==="a"&&a.jsx("div",{"data-controls":"galleryPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,right:0,width:u(r),height:"100%"}})]})}function dw(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function Jr({P:e,controlKey:t,scaled:n,height:i,paired:o,side:r}){return a.jsx("div",{"data-controls":t,...o?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{...r==="top"?{top:0}:{bottom:0},left:0,width:"100%",height:n(i)}})}function vd({P:e,controlKey:t,scaled:n,width:i,maxFraction:o,side:r,paired:l,anchorStyle:c}){return a.jsx("div",{"data-controls":t,...l?{"data-controls-paired":""}:{},"data-controls-axis":"x","data-controls-variant":"column-padding",...r==="right"?{"data-controls-reverse":""}:{},"data-controls-min":"0","data-controls-max-fraction":String(o),className:`${e}-control-anchor`,style:{top:0,...r==="left"?{left:0}:{right:0},width:n(i),height:"100%",...c}})}function Ts({P:e,title:t,description:n,position:i,titleRef:o,titleClassName:r,titleContainerStyle:l,titleTextBoxStyle:c,titleStyle:d,descriptionClassName:u,descriptionStyle:p,descriptionPadding:v,showTextBoxOutline:b=!1,showDescriptionPaddingControl:m=!1,descriptionPaddingPaired:h=!1,topPaddingControl:x,bottomPaddingControl:S}){const P=s.useRef(null),[f,w]=s.useState(0),N=t??"",V=n??"",B=V.length>0,{horizontal:H,vertical:_}=Gl(i),z=_==="center"||_==="bottom",$=_==="bottom";s.useLayoutEffect(()=>{if(!z)return;const C=P.current;if(!C||typeof ResizeObserver>"u")return;const T=()=>w(C.offsetHeight);T();const G=new ResizeObserver(T);return G.observe(C),()=>G.disconnect()},[N,V,z]);const E=a.jsx("span",{className:`${e}-title-text`,style:d,children:N}),j=B?a.jsx("span",{className:u,style:p,children:V}):null,L=B?a.jsx("div",{className:`${e}-title-texts-gap`,style:{height:v},children:m&&a.jsx("div",{"data-controls":"titleDescriptionPadding",...h?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:"100%"}})}):null;return a.jsx("div",{ref:C=>{P.current=C,o(C)},className:[r,`${e}-title-h-${H}`,`${e}-title-v-${_}`].join(" "),style:{...z?{[`--${e}-title-height`]:`${f}px`}:{},...l},children:a.jsxs("div",{className:`${e}-title-text-stack`,style:c,children:[x,a.jsx("div",{className:b?`${e}-title-text-inner`:`${e}-title-text-inner-hidden`,style:{width:"100%"},children:a.jsx("div",{className:`${e}-title-texts`,children:$?a.jsxs(a.Fragment,{children:[j,L,E]}):a.jsxs(a.Fragment,{children:[E,L,j]})})}),S]})})}const xd=45;function bd(e,t,n){let i=e;for(;i;){const o=getComputedStyle(i).getPropertyValue(t).trim();if(o){const r=parseFloat(o);if(!Number.isNaN(r))return r}i=i.parentElement}return n}function uw(e){const t=bd(e,"--cntrl-viewport-height",window.innerHeight),n=bd(e,"--cntrl-article-top",0);return{top:n,height:t,centerY:n+t/2}}function pw(e,t,n){const{vertical:i}=Gl(t),{top:o,height:r,centerY:l}=uw(n);if(i==="top"){const d=n&&parseFloat(getComputedStyle(n).top)||o;return Math.abs(e.top-d)}if(i==="bottom")return Math.abs(e.bottom-(o+r));const c=e.top+e.height/2;return Math.abs(c-l)}function mw(e,t,n){const i=Array.from({length:t},(l,c)=>{const d=e.current[c];if(!d)return 0;const u=d.getBoundingClientRect(),p=pw(u,n,d);return Math.exp(-(p*p)/(2*xd*xd))});let o=0,r=-1;return i.forEach((l,c)=>{l>r&&(r=l,o=c)}),{opacities:i,dominantIndex:o}}function gw(e,t,n){const i=s.useRef([]),[{opacities:o,dominantIndex:r},l]=s.useState(()=>({opacities:Array.from({length:e},(d,u)=>u===0?1:0),dominantIndex:0}));return s.useLayoutEffect(()=>{if(!t||e===0){l({opacities:Array.from({length:e},()=>1),dominantIndex:0});return}let d=0;const u=()=>{l(mw(i,e,n))},p=()=>{d||(d=window.requestAnimationFrame(()=>{d=0,u()}))};return u(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p,{passive:!0}),()=>{d&&window.cancelAnimationFrame(d),window.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[t,e,n]),{setTitleRef:d=>u=>{i.current[d]=u},opacities:o,dominantIndex:r}}function Sd(e,t){const[n,i]=s.useState(e),o=s.useRef(e);return s.useEffect(()=>{if(!t){o.current=e,i(e);return}const r=Array.from(o.current),l=Array.from(e),c=Math.max(r.length,l.length);if(c===0||o.current===e)return;let d=0;const u=window.setInterval(()=>{d+=1;const p=[...l.slice(0,d),...r.slice(d)].join("");o.current=p,i(p),d>=c&&window.clearInterval(u)},70);return()=>window.clearInterval(u)},[t,e]),n}function hw({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:r}){var gt,Et;const{prefix:l}=k.useScopedStyles(),c=s.useMemo(()=>jS(l),[l]),d=t??[],u=(e==null?void 0:e.wrapperWidth)??1,p=(e==null?void 0:e.type)??"a",v=(e==null?void 0:e.imgWidth)??po,b=(e==null?void 0:e.titleWidth)??iw,m=ow(e==null?void 0:e.imageDisplay),h=(e==null?void 0:e.cornerRadius)??BS,x=GS(e==null?void 0:e.position),{horizontal:S,vertical:P}=Gl(x),f=(e==null?void 0:e.titleTopPadding)??0,w=(e==null?void 0:e.titleBottomPadding)??0,N=(e==null?void 0:e.titleLeftPadding)??0,V=(e==null?void 0:e.titleRightPadding)??0,B=(e==null?void 0:e.titleDescriptionPadding)??0,H=dw(e==null?void 0:e.transition),_=(e==null?void 0:e.lightbox)??"on",z=p==="b",$=H==="fade"||H==="retype",{setTitleRef:E,dominantIndex:j}=gw(d.length,$,x),L=((gt=d[j])==null?void 0:gt.title)??"",C=((Et=d[j])==null?void 0:Et.description)??"",T=Sd(L,H==="retype"),G=Sd(C,H==="retype"),A=H==="fade"||H==="retype",Y=H==="retype"?T:L,R=H==="retype"?G:C,y=z?void 0:{width:k.scalingValue(v,n??!1)},U=_==="on"&&(!n||i||o),ee=o??!1,de=(e==null?void 0:e.galleryPaddingRight)??0,F=(e==null?void 0:e.galleryPaddingLeft)??0,ie=(e==null?void 0:e.galleryPaddingBetween)??0,I=wt=>k.scalingValue(wt,n??!1),J={width:I(b)},Se=p==="a"?de:F,Re=z?{width:"100%"}:{width:`calc(100% - ${I(v)} - ${I(Se)})`,...p==="c"?{marginLeft:"auto"}:{}},pe=Math.max(de,ei),he=Math.max(F,ei),te=Math.max(ie,ei),le=Math.max(f,ei),re=Math.max(w,ei),fe=Math.max(N,ei),xe=Math.max(V,ei),Te=Math.max(B,ei),me=Math.max(0,(u??1)-(v??po)),be=p==="a"?Math.max(0,(u??1)-(v??po)-de):p==="c"?Math.max(0,(u??1)-(v??po)-F):p==="b"?u??1:1,we=ee&&P==="top",g=ee&&P==="bottom",X=ee&&S==="left",Z=ee&&S==="right",ne=d.length>1,ye=z?void 0:I((p==="c"?F:de)+(v??po)),K=p==="c"&&ye?{left:ye}:void 0,D=p==="a"&&ye?{right:ye}:void 0,ce=z?{left:0,width:"100%"}:p==="a"?{right:I(de),width:I(v)}:{left:I(F),width:I(v)},{titleColor:q,titleFontFamily:ue,titleFontSettings:W,titleFontSize:Le,titleLineHeight:ae,titleLetterSpacing:Q,titleWordSpacing:Ne,titleAlign:Oe,titleTextAppearance:it,descriptionColor:qe,descriptionFontFamily:Je,descriptionFontSettings:ot,descriptionFontSize:Ve,descriptionLineHeight:ve,descriptionLetterSpacing:Fe,descriptionWordSpacing:Xe,descriptionAlign:Ye,descriptionTextAppearance:Pe,lightboxCounterColor:_e,lightboxCounterFontFamily:Ke,lightboxCounterFontSettings:Ze,lightboxCounterFontSize:st,lightboxCounterLineHeight:Ue,lightboxCounterLetterSpacing:De,lightboxCounterWordSpacing:ke,lightboxCounterTextAppearance:ht}=e??{},Be={fontSettings:{fontFamily:ue,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:Le??.01,lineHeight:ae,letterSpacing:Q??0,wordSpacing:Ne??0,textAlign:Oe??"left",textAppearance:it,color:q??"#000000"},We=un(en(Be,n)),mt=J,rt={...Cs(Le,ae,l,n),...Cs(Ve,ve,l,n,"description-leading-gap")},St=$s(Le,ae,`${l}-title`,`${l}-text-tight-leading`),Nt={fontSettings:{fontFamily:Je,fontWeight:(ot==null?void 0:ot.fontWeight)??400,fontStyle:(ot==null?void 0:ot.fontStyle)??"normal"},fontSize:Ve??.01,lineHeight:ve,letterSpacing:Fe??0,wordSpacing:Xe??0,textAlign:Ye??"left",textAppearance:Pe,color:qe??"#000000"},jt=un(en(Nt,n)),xt=$s(Ve,ve,`${l}-description-text`,`${l}-description-tight-leading`),Ce=I(ee?Te:B),He={fontSettings:{fontFamily:Ke,fontWeight:(Ze==null?void 0:Ze.fontWeight)??400,fontStyle:(Ze==null?void 0:Ze.fontStyle)??"normal"},fontSize:st??.01,lineHeight:Ue,letterSpacing:De??0,wordSpacing:ke??0,textAppearance:ht,color:_e??"#DEDDDD"},et={...un(en(He,n)),...Cs(st,Ue,l,n)},yt=$s(st,Ue,`${l}-lightbox-counter`,`${l}-text-tight-leading`),Rt=k.buildColorVars(l,{titleColor:q??"#000000",descriptionColor:qe??"#000000",lightboxCounterColor:_e??"#DEDDDD"},YS,KS),At=s.useRef(null),[qt,$t]=s.useState(!1),[zt,on]=s.useState([]),[vt,ft]=s.useState(0),Me=s.useCallback((wt,dt)=>{U&&(on(wt),ft(dt),$t(!0))},[U]),nt=s.useCallback(()=>{$t(!1)},[]),ct=s.useMemo(()=>{const wt={...Rt},dt=At.current?getComputedStyle(At.current).getPropertyValue("--cntrl-article-width").trim():"";return dt&&(wt["--cntrl-article-width"]=dt),wt},[Rt,qt]);return s.useEffect(()=>{if(!qt||_!=="on"||typeof document>"u")return;const wt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=wt}},[qt,_]),s.useEffect(()=>{!n||o||i||$t(!1)},[n,o,i]),s.useEffect(()=>{_==="off"&&$t(!1)},[_]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx("div",{style:Rt,children:a.jsxs("div",{ref:At,className:`${l}-wrapper`,style:{width:k.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:P==="top"?I(f):void 0,[`--${l}-title-bottom-padding`]:P==="bottom"?I(w):void 0,[`--${l}-title-left-padding`]:S==="left"?I(N):void 0,[`--${l}-title-right-padding`]:S==="right"?I(V):void 0},children:[A&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(Ts,{P:l,title:Y,description:R,position:x,titleRef:()=>{},titleClassName:`${St} ${l}-single-title`,titleContainerStyle:{...rt,...Re},titleTextBoxStyle:mt,titleStyle:We,descriptionClassName:xt,descriptionStyle:jt,descriptionPadding:Ce,showTextBoxOutline:ee,showDescriptionPaddingControl:ee,topPaddingControl:we?Jr({P:l,controlKey:"titleTopPadding",scaled:I,height:le,paired:!1,side:"top"}):void 0,bottomPaddingControl:g?Jr({P:l,controlKey:"titleBottomPadding",scaled:I,height:re,paired:!1,side:"bottom"}):void 0})}),d.map((wt,dt)=>{const Ot=ew(wt.gallery),Lt=dt<d.length-1,Ht=Ot.filter(_t=>_t.lightboxMedia).map(_t=>_t.lightboxMedia),Gt={P:l,position:x,titleRef:E(dt),titleClassName:St,titleContainerStyle:rt,titleTextBoxStyle:A?{maxWidth:"100%"}:mt,titleStyle:We,descriptionClassName:xt,descriptionStyle:jt,descriptionPadding:Ce,showTextBoxOutline:ee&&!A,showDescriptionPaddingControl:ee&&!A,descriptionPaddingPaired:ne,topPaddingControl:we&&!A?Jr({P:l,controlKey:"titleTopPadding",scaled:I,height:le,paired:ne,side:"top"}):void 0,bottomPaddingControl:g&&!A?Jr({P:l,controlKey:"titleBottomPadding",scaled:I,height:re,paired:ne,side:"bottom"}):void 0};return a.jsxs("div",{"data-item-index":dt,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:Lt?I(ie):void 0},children:[X&&vd({P:l,controlKey:"titleLeftPadding",scaled:I,width:fe,maxFraction:be,side:"left",paired:ne,anchorStyle:K}),Z&&vd({P:l,controlKey:"titleRightPadding",scaled:I,width:xe,maxFraction:be,side:"right",paired:ne,anchorStyle:D}),ee&&Lt&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-control-anchor`,style:{bottom:0,height:I(te),...ce}}),z?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:Ot.map(({displayMedia:_t,lightboxMedia:Vt},Dt)=>{const Ct=Vt?Ht.findIndex(O=>O.assetId===Vt.assetId):-1;return a.jsx(yd,{P:l,media:_t,imgWidth:v||void 0,cornerRadius:h||void 0,imageDisplay:m,isEditor:n,galleryPaddingBetween:ie,showPaddingAfter:Dt<Ot.length-1,showControls:ee,onMediaClick:U&&Ct>=0?()=>Me(Ht,Ct):void 0},`${_t.assetId}-${Dt}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(Ts,{...Gt,title:A?"":wt.title,description:A?"":wt.description})})]}):a.jsxs(a.Fragment,{children:[a.jsx(Ts,{...Gt,title:A?"":wt.title,description:A?"":wt.description}),Ot.length>0&&a.jsx(cw,{P:l,layoutType:p,galleryWidthStyle:y,galleryPaddingRight:de,galleryPaddingLeft:F,galleryPaddingRightWidth:pe,galleryPaddingLeftWidth:he,galleryPaddingMaxFraction:me,showControls:ee,scaled:I,children:Ot.map(({displayMedia:_t,lightboxMedia:Vt},Dt)=>{const Ct=Vt?Ht.findIndex(O=>O.assetId===Vt.assetId):-1;return a.jsx(yd,{P:l,media:_t,cornerRadius:h||void 0,fillGalleryWidth:!0,imageDisplay:m,isEditor:n,galleryPaddingBetween:ie,showPaddingAfter:Dt<Ot.length-1,showControls:ee,onMediaClick:U&&Ct>=0?()=>Me(Ht,Ct):void 0},`${_t.assetId}-${Dt}`)})})]})]},dt)})]})}),qt&&_==="on"&&typeof document<"u"&&e&&(()=>{const wt=(r?document.getElementById(r):null)??document.body;return Xn.createPortal(a.jsx("div",{style:ct,"data-selection":"none",children:a.jsx(lw,{prefix:l,items:zt,index:vt,imageDisplay:aw(e.lightboxImageDisplay),isEditor:n,onClose:nt,onPrev:()=>ft(dt=>(dt-1+zt.length)%zt.length),onNext:()=>ft(dt=>(dt+1)%zt.length),counterClassName:yt,counterStyle:et,backgroundColor:e.backgroundColor??XS})}),wt)})()]})}const fw=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
21129
|
+
`}const Pp={"left-top":{horizontal:"left",vertical:"top"},"top-center":{horizontal:"center",vertical:"top"},"top-right":{horizontal:"right",vertical:"top"},"left-center":{horizontal:"left",vertical:"center"},center:{horizontal:"center",vertical:"center"},"right-center":{horizontal:"right",vertical:"center"},"left-bottom":{horizontal:"left",vertical:"bottom"},"bottom-center":{horizontal:"center",vertical:"bottom"},"right-bottom":{horizontal:"right",vertical:"bottom"}};function KS(e){return e in Pp}function QS(e){if(e&&KS(e))return e;switch(e){case"center-top":return"top-center";case"right-top":return"top-right";case"top-left":return"left-top";case"center-bottom":return"bottom-center";case"bottom-left":return"left-bottom";case"bottom-right":return"right-bottom";case"center-center":return"center";case"left":return"left-center";case"right":return"right-center";case"top":return"left-top";default:return"center"}}function Gl(e){return Pp[e]}const ZS="rgba(28,31,34,0.9)",Jn=500,zi="cubic-bezier(0.22, 1, 0.36, 1)",JS=72,ew=50,tw={titleColor:"title-color",descriptionColor:"description-color",lightboxCounterColor:"lightbox-counter-color"},nw=[];function iw(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 ow(e){const[t,n]=e.media;return n!=null&&n.assetId?n:t!=null&&t.assetId?t:null}function rw(e){const[t]=e.media;return t!=null&&t.assetId?t:null}function aw(e){if(!Array.isArray(e)||e.length===0)return[];if(iw(e)){const t=[];for(const n of e){const i=ow(n);if(!i)continue;const o=rw(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.assetId?o:null})}return t}return e.filter(t=>t==null?void 0:t.assetId).map(t=>({displayMedia:t,lightboxMedia:t}))}function Ys(e){return e.type==="video"}function sw(e){e.pause(),e.removeAttribute("src"),e.load()}function Zr(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function lw(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const cw=1140/1440;function dw(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function uw(e){const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`}function pw(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function mw({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:c}){return s.useEffect(()=>{const d=n.current;if(d)return()=>{sw(d)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:c,style:i})}function gw({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:c,counterClassName:d,counterStyle:u,backgroundColor:p}){const v=i==="cover",x=s.useRef(null),m=s.useRef(null),h=s.useRef(null),b=s.useRef(0),S=s.useRef(0),M=s.useRef("none"),y=s.useRef(!1),$=s.useRef(!1),R=s.useRef(!1),X=s.useRef(null),[B,O]=s.useState(null),[N,z]=s.useState("opening"),[C,I]=s.useState(0),[j,E]=s.useState(0),[w,L]=s.useState(!1),[V,_]=s.useState(!1),[K,P]=s.useState(!1),f=s.useRef(n),U=t[n],te=U?Ys(U):!1,ce=j!==0||w,F=s.useCallback(fe=>{R.current=fe,L(fe)},[]),ie=s.useCallback(()=>{X.current!==null&&(window.clearTimeout(X.current),X.current=null)},[]),T=s.useCallback(()=>{ie(),X.current=window.setTimeout(()=>{ie(),F(!1)},Jn+32)},[ie,F]),le=s.useCallback(()=>{const fe=x.current,ve=m.current;if(!fe)return;const xe=fe.getBoundingClientRect(),g=xe.width,G=xe.height;if(!g||!G)return;if(i==="cover"){O({width:g,height:G,left:xe.left,top:xe.top});return}if(!ve){O(Zr(fe));return}const{width:Q,height:ne}=lw(ve);if(!Q||!ne){O(Zr(fe));return}const ue=Q/ne,q=g/G;if(ue>q){const D=g/ue;O({width:g,height:D,left:xe.left,top:xe.top+(G-D)/2})}else{const D=G*ue;O({width:D,height:G,left:xe.left+(g-D)/2,top:xe.top})}},[i]);s.useEffect(()=>{le();const fe=x.current;if(!fe)return;const ve=new ResizeObserver(()=>le());return ve.observe(fe),()=>ve.disconnect()},[le,n]),s.useEffect(()=>{N==="opening"&&B&&z("open")},[N,B]),s.useEffect(()=>{if(N!=="closing")return;const fe=setTimeout(()=>r(),Jn);return()=>clearTimeout(fe)},[N,r]),s.useEffect(()=>()=>{ie()},[ie]),s.useLayoutEffect(()=>{if(f.current===n)return;ie(),I(0),E(0),F(!1),P(!1),_(!1),b.current=0,S.current=0,M.current="none",y.current=!1,h.current=null,$.current=!1;const fe=x.current;fe&&O(Zr(fe)),f.current=n},[n,F,ie]),s.useEffect(()=>{if(N!=="open")return;let fe=null;const ve=()=>{fe&&(document.removeEventListener("click",fe,!0),fe=null)},xe=()=>{ve(),fe=q=>{q.stopPropagation(),q.preventDefault(),ve()},document.addEventListener("click",fe,!0)},g=q=>{ie(),R.current=!1,L(!1),E(0),_(!1),y.current=!1,S.current=0,M.current="none";const D=x.current;D&&O(Zr(D)),q<0?c():l()},G=q=>{if(Math.abs(q)>ew&&t.length>1){g(q);return}F(!0),E(0),T()},Q=q=>{if(q.touches.length!==1||R.current)return;const D=q.touches[0];$.current=!0,h.current={x:D.clientX,y:D.clientY},M.current="none",S.current=0,y.current=!1},ne=q=>{if(!h.current||q.touches.length!==1||R.current)return;const D=q.touches[0],se=D.clientX-h.current.x,Y=D.clientY-h.current.y;if(M.current==="none"){if(Math.abs(se)<10&&Math.abs(Y)<10)return;if(Math.abs(se)>Math.abs(Y)){if(t.length<=1)return;M.current="horizontal"}else if(Y>0)M.current="vertical";else return}if(M.current==="horizontal"){y.current=!0,_(!0),S.current=se,E(se),q.preventDefault();return}M.current==="vertical"&&(y.current=!0,_(!0),b.current=Y,I(Y),q.preventDefault())},ue=()=>{if(!h.current)return;const q=M.current,D=y.current;if(D&&q==="horizontal")G(S.current),xe();else if(D&&q==="vertical")if(b.current>JS){const Y=window.innerHeight;b.current=Y,P(!0),I(Y),z("closing")}else b.current=0,I(0),xe();else q==="horizontal"&&Math.abs(S.current)>0&&(G(S.current),xe());h.current=null,M.current="none",S.current=0,y.current=!1,_(!1)};return document.addEventListener("touchstart",Q,{passive:!0}),document.addEventListener("touchmove",ne,{passive:!1}),document.addEventListener("touchend",ue),document.addEventListener("touchcancel",ue),()=>{document.removeEventListener("touchstart",Q),document.removeEventListener("touchmove",ne),document.removeEventListener("touchend",ue),document.removeEventListener("touchcancel",ue),ve()}},[N,t.length,c,l,F,T,ie]),s.useEffect(()=>{const fe=ve=>{ve.key==="Escape"&&(ve.preventDefault(),ve.stopPropagation(),N!=="closing"&&z("closing"))};return window.addEventListener("keydown",fe,!0),()=>window.removeEventListener("keydown",fe,!0)},[N]);const J=()=>{N!=="closing"&&z("closing")},Se=N==="open",Le=N==="closing",me=C>0?Math.max(0,1-C/500):1,ye=C>0?Math.max(.35,1-C/500):1,ee=fe=>{if(fe.stopPropagation(),$.current){$.current=!1;return}if(t.length<=1)return;const ve=fe.currentTarget.getBoundingClientRect(),xe=fe.clientY-ve.top,g=Math.min(52,ve.height*.2);if(!(xe>ve.height-g)){if(fe.clientX-ve.left<ve.width/2){l();return}c()}},oe=fe=>{if(t.length<=1)return;const ve=fe.currentTarget.getBoundingClientRect(),xe=fe.clientX-ve.left,g=fe.clientY-ve.top,G=Math.min(52,ve.height*.2);if(g>ve.height-G){fe.currentTarget.style.cursor="default";return}fe.currentTarget.style.cursor=xe<ve.width/2?"w-resize":"e-resize"},re=s.useCallback(fe=>{fe.propertyName!=="transform"||!R.current||(ie(),F(!1))},[ie,F]),ge=ce?`translateX(${j}px)`:C>0?`translateY(${C}px)`:void 0,we={position:"fixed",top:B==null?void 0:B.top,left:B==null?void 0:B.left,width:B==null?void 0:B.width,height:B==null?void 0:B.height,objectFit:i==="cover"?"cover":"contain",transform:ge,opacity:C>0?ye:N==="opening"||Le?0:1,transition:V&&!w?"none":w?`transform ${Jn}ms ${zi}`:K?`transform ${Jn}ms ${zi}, opacity ${Jn}ms ${zi}`:N==="opening"||Le?`opacity ${Jn}ms ${zi}`:"none",pointerEvents:te&&Se&&!ce?"auto":"none",touchAction:te&&Se?"none":void 0,zIndex:9998},Ae=B?{position:"fixed",top:B.top,height:B.height,width:B.width/2,zIndex:9999}:null;return a.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:N==="open"?"none":void 0},onClick:J,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:p,opacity:Se?me:0,transition:V?"none":`opacity ${Jn}ms ${zi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:v?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:x,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Se?1:0,transition:`opacity ${Jn}ms ${zi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:x,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:Se?1:0,transition:`opacity ${Jn}ms ${zi}`},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]})}),B&&U&&(te?a.jsx(mw,{src:U.assetId,phase:N,mediaRef:m,mediaStyle:we,onLoadedMetadata:le,onClick:ee,onMouseMove:oe,onTransitionEnd:re},`${n}-${U.assetId}`):a.jsx("img",{ref:m,src:U.assetId,alt:U.name,onLoad:le,onTransitionEnd:re,style:we},`${n}-${U.assetId}`)),Se&&Ae&&t.length>1&&!te&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Ae,left:B.left,cursor:"w-resize",pointerEvents:ce?"none":"auto"},onClick:fe=>{if($.current){$.current=!1;return}fe.stopPropagation(),l()}}),a.jsx("div",{style:{...Ae,left:B.left+B.width/2,cursor:"e-resize",pointerEvents:ce?"none":"auto"},onClick:fe=>{if($.current){$.current=!1;return}fe.stopPropagation(),c()}})]})]})}function yd({P:e,media:t,imgWidth:n,cornerRadius:i,fillGalleryWidth:o,imageDisplay:r,isEditor:l,galleryPaddingBetween:c=0,showPaddingAfter:d=!1,showControls:u=!1,onMediaClick:p}){const v=`${e}-gallery-${Ys(t)?"video":"image"}`,x=r.display==="cover",m=uw(r),h=N=>A.scalingValue(N,l??!1),b=n??go,S=o?{width:"100%",maxWidth:"100%"}:{width:h(b),maxWidth:"100%"},M=i?{borderRadius:h(i)}:{},y={...S,...x?{aspectRatio:m,height:"auto",overflow:"hidden"}:{},...M},$={...x?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":h(b)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...x?{}:M},X={className:v,style:$,onClick:p?N=>{N.stopPropagation(),p()}:void 0},B=Math.max(c,ti),O=Ys(t)?a.jsx("video",{...X,src:t.assetId,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{...X,src:t.assetId,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[x?a.jsx("div",{style:y,children:O}):O,d&&c>0&&a.jsx("div",{className:`${e}-padding-handle`,style:{height:h(c)},"aria-hidden":"true"}),u&&d&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:h(B)}})]})}function hw({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:r,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:c,showControls:d,scaled:u,children:p}){const v=t==="a"?i:t==="c"?o:0,x=v>0||d;return a.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&x&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(v)},"aria-hidden":"true"}),d&&t==="c"&&a.jsx("div",{"data-controls":"galleryPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,left:0,width:u(l),height:"100%"}}),a.jsx("div",{className:`${e}-gallery`,style:n,children:p}),t==="a"&&x&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(v)},"aria-hidden":"true"}),d&&t==="a"&&a.jsx("div",{"data-controls":"galleryPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,right:0,width:u(r),height:"100%"}})]})}function fw(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function Jr({P:e,controlKey:t,scaled:n,height:i,paired:o,side:r}){return a.jsx("div",{"data-controls":t,...o?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{...r==="top"?{top:0}:{bottom:0},left:0,width:"100%",height:n(i)}})}function vd({P:e,controlKey:t,scaled:n,width:i,maxFraction:o,side:r,paired:l,anchorStyle:c}){return a.jsx("div",{"data-controls":t,...l?{"data-controls-paired":""}:{},"data-controls-axis":"x","data-controls-variant":"column-padding",...r==="right"?{"data-controls-reverse":""}:{},"data-controls-min":"0","data-controls-max-fraction":String(o),className:`${e}-control-anchor`,style:{top:0,...r==="left"?{left:0}:{right:0},width:n(i),height:"100%",...c}})}function Ts({P:e,title:t,description:n,position:i,titleRef:o,titleClassName:r,titleContainerStyle:l,titleTextBoxStyle:c,titleStyle:d,descriptionClassName:u,descriptionStyle:p,descriptionPadding:v,showTextBoxOutline:x=!1,showDescriptionPaddingControl:m=!1,descriptionPaddingPaired:h=!1,topPaddingControl:b,bottomPaddingControl:S}){const M=s.useRef(null),[y,$]=s.useState(0),R=t??"",X=n??"",B=X.length>0,{horizontal:O,vertical:N}=Gl(i),z=N==="center"||N==="bottom",C=N==="bottom";s.useLayoutEffect(()=>{if(!z)return;const w=M.current;if(!w||typeof ResizeObserver>"u")return;const L=()=>$(w.offsetHeight);L();const V=new ResizeObserver(L);return V.observe(w),()=>V.disconnect()},[R,X,z]);const I=a.jsx("span",{className:`${e}-title-text`,style:d,children:R}),j=B?a.jsx("span",{className:u,style:p,children:X}):null,E=B?a.jsx("div",{className:`${e}-title-texts-gap`,style:{height:v},children:m&&a.jsx("div",{"data-controls":"titleDescriptionPadding",...h?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:"100%"}})}):null;return a.jsx("div",{ref:w=>{M.current=w,o(w)},className:[r,`${e}-title-h-${O}`,`${e}-title-v-${N}`].join(" "),style:{...z?{[`--${e}-title-height`]:`${y}px`}:{},...l},children:a.jsxs("div",{className:`${e}-title-text-stack`,style:c,children:[b,a.jsx("div",{className:x?`${e}-title-text-inner`:`${e}-title-text-inner-hidden`,style:{width:"100%"},children:a.jsx("div",{className:`${e}-title-texts`,children:C?a.jsxs(a.Fragment,{children:[j,E,I]}):a.jsxs(a.Fragment,{children:[I,E,j]})})}),S]})})}const xd=45;function bd(e,t,n){let i=e;for(;i;){const o=getComputedStyle(i).getPropertyValue(t).trim();if(o){const r=parseFloat(o);if(!Number.isNaN(r))return r}i=i.parentElement}return n}function yw(e){const t=bd(e,"--cntrl-viewport-height",window.innerHeight),n=bd(e,"--cntrl-article-top",0);return{top:n,height:t,centerY:n+t/2}}function vw(e,t,n){const{vertical:i}=Gl(t),{top:o,height:r,centerY:l}=yw(n);if(i==="top"){const d=n&&parseFloat(getComputedStyle(n).top)||o;return Math.abs(e.top-d)}if(i==="bottom")return Math.abs(e.bottom-(o+r));const c=e.top+e.height/2;return Math.abs(c-l)}function xw(e,t,n){const i=Array.from({length:t},(l,c)=>{const d=e.current[c];if(!d)return 0;const u=d.getBoundingClientRect(),p=vw(u,n,d);return Math.exp(-(p*p)/(2*xd*xd))});let o=0,r=-1;return i.forEach((l,c)=>{l>r&&(r=l,o=c)}),{opacities:i,dominantIndex:o}}function bw(e,t,n){const i=s.useRef([]),[{opacities:o,dominantIndex:r},l]=s.useState(()=>({opacities:Array.from({length:e},(d,u)=>u===0?1:0),dominantIndex:0}));return s.useLayoutEffect(()=>{if(!t||e===0){l({opacities:Array.from({length:e},()=>1),dominantIndex:0});return}let d=0;const u=()=>{l(xw(i,e,n))},p=()=>{d||(d=window.requestAnimationFrame(()=>{d=0,u()}))};return u(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p,{passive:!0}),()=>{d&&window.cancelAnimationFrame(d),window.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[t,e,n]),{setTitleRef:d=>u=>{i.current[d]=u},opacities:o,dominantIndex:r}}function Sd(e,t){const[n,i]=s.useState(e),o=s.useRef(e);return s.useEffect(()=>{if(!t){o.current=e,i(e);return}const r=Array.from(o.current),l=Array.from(e),c=Math.max(r.length,l.length);if(c===0||o.current===e)return;let d=0;const u=window.setInterval(()=>{d+=1;const p=[...l.slice(0,d),...r.slice(d)].join("");o.current=p,i(p),d>=c&&window.clearInterval(u)},70);return()=>window.clearInterval(u)},[t,e]),n}function Sw({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:r}){var st,At;const{prefix:l}=A.useScopedStyles(),c=s.useMemo(()=>YS(l),[l]),d=t??[],u=(e==null?void 0:e.wrapperWidth)??1,p=(e==null?void 0:e.type)??"a",v=(e==null?void 0:e.imgWidth)??go,x=(e==null?void 0:e.titleWidth)??cw,m=dw(e==null?void 0:e.imageDisplay),h=(e==null?void 0:e.cornerRadius)??qS,b=QS(e==null?void 0:e.position),{horizontal:S,vertical:M}=Gl(b),y=(e==null?void 0:e.titleTopPadding)??0,$=(e==null?void 0:e.titleBottomPadding)??0,R=(e==null?void 0:e.titleLeftPadding)??0,X=(e==null?void 0:e.titleRightPadding)??0,B=(e==null?void 0:e.titleDescriptionPadding)??0,O=fw(e==null?void 0:e.transition),N=(e==null?void 0:e.lightbox)??"on",z=p==="b",C=O==="fade"||O==="retype",{setTitleRef:I,dominantIndex:j}=bw(d.length,C,b),E=((st=d[j])==null?void 0:st.title)??"",w=((At=d[j])==null?void 0:At.description)??"",L=Sd(E,O==="retype"),V=Sd(w,O==="retype"),_=O==="fade"||O==="retype",K=O==="retype"?L:E,P=O==="retype"?V:w,f=z?void 0:{width:A.scalingValue(v,n??!1)},U=N==="on"&&(!n||i||o),te=o??!1,ce=(e==null?void 0:e.galleryPaddingRight)??0,F=(e==null?void 0:e.galleryPaddingLeft)??0,ie=(e==null?void 0:e.galleryPaddingBetween)??0,T=St=>A.scalingValue(St,n??!1),J={width:T(x)},Se=p==="a"?ce:F,Le=z?{width:"100%"}:{width:`calc(100% - ${T(v)} - ${T(Se)})`,...p==="c"?{marginLeft:"auto"}:{}},me=Math.max(ce,ti),ye=Math.max(F,ti),ee=Math.max(ie,ti),oe=Math.max(y,ti),re=Math.max($,ti),ge=Math.max(R,ti),we=Math.max(X,ti),Ae=Math.max(B,ti),fe=Math.max(0,(u??1)-(v??go)),ve=p==="a"?Math.max(0,(u??1)-(v??go)-ce):p==="c"?Math.max(0,(u??1)-(v??go)-F):p==="b"?u??1:1,xe=te&&M==="top",g=te&&M==="bottom",G=te&&S==="left",Q=te&&S==="right",ne=d.length>1,ue=z?void 0:T((p==="c"?F:ce)+(v??go)),q=p==="c"&&ue?{left:ue}:void 0,D=p==="a"&&ue?{right:ue}:void 0,se=z?{left:0,width:"100%"}:p==="a"?{right:T(ce),width:T(v)}:{left:T(F),width:T(v)},{titleColor:Y,titleFontFamily:pe,titleFontSettings:H,titleFontSize:Ie,titleLineHeight:de,titleLetterSpacing:Z,titleWordSpacing:Ne,titleAlign:Oe,titleTextAppearance:Je,descriptionColor:De,descriptionFontFamily:Ze,descriptionFontSettings:at,descriptionFontSize:Xe,descriptionLineHeight:be,descriptionLetterSpacing:He,descriptionWordSpacing:je,descriptionAlign:Qe,descriptionTextAppearance:Ce,lightboxCounterColor:_e,lightboxCounterFontFamily:Ue,lightboxCounterFontSettings:Ye,lightboxCounterFontSize:lt,lightboxCounterLineHeight:it,lightboxCounterLetterSpacing:qe,lightboxCounterWordSpacing:Ee,lightboxCounterTextAppearance:pt}=e??{},ke={fontSettings:{fontFamily:pe,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:Ie??.01,lineHeight:de,letterSpacing:Z??0,wordSpacing:Ne??0,textAlign:Oe??"left",textAppearance:Je,color:Y??"#000000"},Ve=pn(nn(ke,n)),ct=J,ot={...Cs(Ie,de,l,n),...Cs(Xe,be,l,n,"description-leading-gap")},xt=$s(Ie,de,`${l}-title`,`${l}-text-tight-leading`),Pt={fontSettings:{fontFamily:Ze,fontWeight:(at==null?void 0:at.fontWeight)??400,fontStyle:(at==null?void 0:at.fontStyle)??"normal"},fontSize:Xe??.01,lineHeight:be,letterSpacing:He??0,wordSpacing:je??0,textAlign:Qe??"left",textAppearance:Ce,color:De??"#000000"},Vt=pn(nn(Pt,n)),vt=$s(Xe,be,`${l}-description-text`,`${l}-description-tight-leading`),Mt=T(te?Ae:B),Ht={fontSettings:{fontFamily:Ue,fontWeight:(Ye==null?void 0:Ye.fontWeight)??400,fontStyle:(Ye==null?void 0:Ye.fontStyle)??"normal"},fontSize:lt??.01,lineHeight:it,letterSpacing:qe??0,wordSpacing:Ee??0,textAppearance:pt,color:_e??"#DEDDDD"},kt={...pn(nn(Ht,n)),...Cs(lt,it,l,n)},Pe=$s(lt,it,`${l}-lightbox-counter`,`${l}-text-tight-leading`),Be=A.buildColorVars(l,{titleColor:Y??"#000000",descriptionColor:De??"#000000",lightboxCounterColor:_e??"#DEDDDD"},tw,nw),ft=s.useRef(null),[$t,et]=s.useState(!1),[Et,Xt]=s.useState([]),[mt,gt]=s.useState(0),Re=s.useCallback((St,ht)=>{U&&(Xt(St),gt(ht),et(!0))},[U]),tt=s.useCallback(()=>{et(!1)},[]),nt=s.useMemo(()=>{const St={...Be},ht=ft.current?getComputedStyle(ft.current).getPropertyValue("--cntrl-article-width").trim():"";return ht&&(St["--cntrl-article-width"]=ht),St},[Be,$t]);return s.useEffect(()=>{if(!$t||N!=="on"||typeof document>"u")return;const St=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=St}},[$t,N]),s.useEffect(()=>{!n||o||i||et(!1)},[n,o,i]),s.useEffect(()=>{N==="off"&&et(!1)},[N]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx("div",{style:Be,children:a.jsxs("div",{ref:ft,className:`${l}-wrapper`,style:{width:A.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:M==="top"?T(y):void 0,[`--${l}-title-bottom-padding`]:M==="bottom"?T($):void 0,[`--${l}-title-left-padding`]:S==="left"?T(R):void 0,[`--${l}-title-right-padding`]:S==="right"?T(X):void 0},children:[_&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(Ts,{P:l,title:K,description:P,position:b,titleRef:()=>{},titleClassName:`${xt} ${l}-single-title`,titleContainerStyle:{...ot,...Le},titleTextBoxStyle:ct,titleStyle:Ve,descriptionClassName:vt,descriptionStyle:Vt,descriptionPadding:Mt,showTextBoxOutline:te,showDescriptionPaddingControl:te,topPaddingControl:xe?Jr({P:l,controlKey:"titleTopPadding",scaled:T,height:oe,paired:!1,side:"top"}):void 0,bottomPaddingControl:g?Jr({P:l,controlKey:"titleBottomPadding",scaled:T,height:re,paired:!1,side:"bottom"}):void 0})}),d.map((St,ht)=>{const Dt=aw(St.gallery),Ct=ht<d.length-1,qt=Dt.filter(Nt=>Nt.lightboxMedia).map(Nt=>Nt.lightboxMedia),jt={P:l,position:b,titleRef:I(ht),titleClassName:xt,titleContainerStyle:ot,titleTextBoxStyle:_?{maxWidth:"100%"}:ct,titleStyle:Ve,descriptionClassName:vt,descriptionStyle:Vt,descriptionPadding:Mt,showTextBoxOutline:te&&!_,showDescriptionPaddingControl:te&&!_,descriptionPaddingPaired:ne,topPaddingControl:xe&&!_?Jr({P:l,controlKey:"titleTopPadding",scaled:T,height:oe,paired:ne,side:"top"}):void 0,bottomPaddingControl:g&&!_?Jr({P:l,controlKey:"titleBottomPadding",scaled:T,height:re,paired:ne,side:"bottom"}):void 0};return a.jsxs("div",{"data-item-index":ht,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:Ct?T(ie):void 0},children:[G&&vd({P:l,controlKey:"titleLeftPadding",scaled:T,width:ge,maxFraction:ve,side:"left",paired:ne,anchorStyle:q}),Q&&vd({P:l,controlKey:"titleRightPadding",scaled:T,width:we,maxFraction:ve,side:"right",paired:ne,anchorStyle:D}),te&&Ct&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-control-anchor`,style:{bottom:0,height:T(ee),...se}}),z?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:Dt.map(({displayMedia:Nt,lightboxMedia:Bt},Wt)=>{const wt=Bt?qt.findIndex(W=>W.assetId===Bt.assetId):-1;return a.jsx(yd,{P:l,media:Nt,imgWidth:v||void 0,cornerRadius:h||void 0,imageDisplay:m,isEditor:n,galleryPaddingBetween:ie,showPaddingAfter:Wt<Dt.length-1,showControls:te,onMediaClick:U&&wt>=0?()=>Re(qt,wt):void 0},`${Nt.assetId}-${Wt}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(Ts,{...jt,title:_?"":St.title,description:_?"":St.description})})]}):a.jsxs(a.Fragment,{children:[a.jsx(Ts,{...jt,title:_?"":St.title,description:_?"":St.description}),Dt.length>0&&a.jsx(hw,{P:l,layoutType:p,galleryWidthStyle:f,galleryPaddingRight:ce,galleryPaddingLeft:F,galleryPaddingRightWidth:me,galleryPaddingLeftWidth:ye,galleryPaddingMaxFraction:fe,showControls:te,scaled:T,children:Dt.map(({displayMedia:Nt,lightboxMedia:Bt},Wt)=>{const wt=Bt?qt.findIndex(W=>W.assetId===Bt.assetId):-1;return a.jsx(yd,{P:l,media:Nt,cornerRadius:h||void 0,fillGalleryWidth:!0,imageDisplay:m,isEditor:n,galleryPaddingBetween:ie,showPaddingAfter:Wt<Dt.length-1,showControls:te,onMediaClick:U&&wt>=0?()=>Re(qt,wt):void 0},`${Nt.assetId}-${Wt}`)})})]})]},ht)})]})}),$t&&N==="on"&&typeof document<"u"&&e&&(()=>{const St=(r?document.getElementById(r):null)??document.body;return Un.createPortal(a.jsx("div",{style:nt,"data-selection":"none",children:a.jsx(gw,{prefix:l,items:Et,index:mt,imageDisplay:pw(e.lightboxImageDisplay),isEditor:n,onClose:tt,onPrev:()=>gt(ht=>(ht-1+Et.length)%Et.length),onNext:()=>gt(ht=>(ht+1)%Et.length),counterClassName:Pe,counterStyle:kt,backgroundColor:e.backgroundColor??ZS})}),St)})()]})}const ww=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
21130
21130
|
import { createPortal } from 'react-dom';
|
|
21131
21131
|
import type React from 'react';
|
|
21132
21132
|
import { CommonComponentProps } from '../props';
|
|
@@ -23424,7 +23424,7 @@ export function Mercury({
|
|
|
23424
23424
|
</>
|
|
23425
23425
|
);
|
|
23426
23426
|
}
|
|
23427
|
-
`;function fi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Jo={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}}},yw={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},description:{type:"string",label:"Description",placeholder:"Add Description...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:[{title:"AX-2 Space Suit",description:"Pressure garment and life support",gallery:[{media:[{assetId:"01M3QM74XFEM0SKERMGHMJ3Q2W",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XG5SKREDC1KS41Y9E7",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGZAMX3BJWP2GWPG2V",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGWVQPRZ334BZBJ0MN",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XG89JTWMZ3JE9DMV05",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGTT2Q8FRDTYX62W0H",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]},{title:"Earth-orbital mission",description:"Hasselblad documentation series",gallery:[{media:[{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]},{title:"Salton Sea from Above",description:"Aerial survey, California",gallery:[{media:[{assetId:"01M3QM74XERA3G7J0J00XVKEXX",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGK74ANMH9PH0YAYCY",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGSP2F13EM5TFRQZGJ",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGJPAGBPVYJSM3TV07",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XF9TBBQMH8393VK14S",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XG5BANHQ2F7FV8KXSG",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGTS00H47RCAKVNGE3",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]}]},settings:{sizing:"auto auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},imgWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},titleWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},galleryPaddingRight:fi("Gallery Padding Right"),galleryPaddingLeft:fi("Gallery Padding Left"),galleryPaddingBetween:fi("Gallery Padding Between"),cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left-top","top-center","top-right","left-center","center","right-center","left-bottom","bottom-center","right-bottom"]}},titleTopPadding:fi("Title Top Padding"),titleBottomPadding:fi("Title Bottom Padding"),titleLeftPadding:fi("Title Left Padding"),titleRightPadding:fi("Title Right Padding"),titleDescriptionPadding:fi("Title Description Padding"),transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","retype","scroll"]}},titleColor:{type:"string",scope:"common",title:"Title",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Jo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleAlign:{...Jo.textAlign,scope:"layout",title:"Align"},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},descriptionColor:{type:"string",scope:"common",title:"Description",display:{type:"palette-color-picker"}},descriptionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},descriptionFontSettings:{...Jo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},descriptionFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},descriptionLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},descriptionLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},descriptionWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},descriptionAlign:{...Jo.textAlign,scope:"layout",title:"Align"},descriptionTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...Jo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{type:"a",position:"left-center",transition:"scroll",titleColor:"#000000",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleAlign:"center",titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},descriptionColor:"#000000",descriptionFontFamily:"Goudy Bookletter 1911",descriptionFontSettings:{fontWeight:400,fontStyle:"normal"},descriptionLetterSpacing:0,descriptionWordSpacing:0,descriptionAlign:"center",descriptionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",backgroundColor:"rgba(28,31,34,0.9)",lightboxCounterColor:"#DEDDDD",lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{defaultPaddingTop:30/1440,wrapperWidth:1,imgWidth:600/1440,titleWidth:400/1440,galleryPaddingRight:30/1440,galleryPaddingLeft:30/1440,galleryPaddingBetween:30/1440,titleTopPadding:0,titleBottomPadding:0,titleLeftPadding:0,titleRightPadding:0,titleDescriptionPadding:10/1440,cornerRadius:4/1440,position:"center",titleFontSize:73/1440,titleLineHeight:66/1440,descriptionFontSize:20/1440,descriptionLineHeight:24/1440,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},m:{defaultPaddingTop:10/375,wrapperWidth:1,imgWidth:170/375,titleWidth:150/375,galleryPaddingRight:10/375,galleryPaddingLeft:10/375,galleryPaddingBetween:10/375,titleTopPadding:0,titleBottomPadding:0,titleLeftPadding:10/375,titleRightPadding:10/375,titleDescriptionPadding:8/375,cornerRadius:8/375,position:"left-center",titleFontSize:30/375,titleLineHeight:25/375,descriptionFontSize:14/375,descriptionLineHeight:18/375,lightboxCounterFontSize:14/375,lightboxCounterLineHeight:14/375},t:{defaultPaddingTop:20/768,wrapperWidth:1,imgWidth:300/768,titleWidth:320/768,galleryPaddingRight:20/768,galleryPaddingLeft:20/768,galleryPaddingBetween:20/768,titleTopPadding:0,titleBottomPadding:0,titleLeftPadding:0,titleRightPadding:0,titleDescriptionPadding:8/768,cornerRadius:8/768,position:"center",titleFontSize:58/768,titleLineHeight:48/768,descriptionFontSize:16/768,descriptionLineHeight:20/768,lightboxCounterFontSize:8/768,lightboxCounterLineHeight:8/768}},displayRules:[{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}}],layout:["__componentName__","type","wrapperWidth","imgWidth","titleWidth","imageDisplay","cornerRadius","position","transition","lightbox","lightboxImageDisplay"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",items:["wrapperWidth","imgWidth"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",title:"Title",items:["position","transition"]},"titleWidth",{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",items:["backgroundColor"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleAlign","titleTextAppearance"]},{type:"group",title:"Description",items:["descriptionFontFamily","descriptionFontSettings",{type:"row",items:["descriptionFontSize","descriptionLineHeight","descriptionLetterSpacing","descriptionWordSpacing"]},"descriptionAlign","descriptionTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:["titleColor","descriptionColor","backgroundColor","lightboxCounterColor"],panelIds:["general","typeStyle"]}},vw={element:hw,id:"mercury",name:"Mercury",category:"lists",layoutMode:"structured",version:1,defaultSize:{d:{width:720,height:540}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Mercury.mp4"},schema:yw,sourceCode:fw,assetsPaths:{content:[{path:"gallery.media.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"descriptionFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",descriptionFontSettings:"descriptionFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"}},xw=10,bw=400,Sw=1,ww=1120/1440,$w=140/1440,Cw=550/1440,Tw=13,Iw=4,Lw=38/100,Pw=28/100,$p=2.8,Rw=.9,Cp=.22,Mw=.5,Ew=1,kw=1.5,Aw=0,Fw=.85;function Nw(e){return`
|
|
23427
|
+
`;function xi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Jo={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}}},$w={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},description:{type:"string",label:"Description",placeholder:"Add Description...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:[{title:"AX-2 Space Suit",description:"Pressure garment and life support",gallery:[{media:[{assetId:"01M3QM74XFEM0SKERMGHMJ3Q2W",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XG5SKREDC1KS41Y9E7",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGZAMX3BJWP2GWPG2V",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGWVQPRZ334BZBJ0MN",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XG89JTWMZ3JE9DMV05",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGTT2Q8FRDTYX62W0H",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]},{title:"Earth-orbital mission",description:"Hasselblad documentation series",gallery:[{media:[{assetId:"01M3QM74XESYN1HRYH9VRTZ5CK",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEVZ9F59FC7M9BA63Q",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEE2101QD8PM6E4JSA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XE20C38X4NND20C5R4",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEGBJMJ7Q63KMZY6NA",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEBS5231QA4355P4VQ",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XEWT5YM43KF6PEYRCV",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]},{title:"Salton Sea from Above",description:"Aerial survey, California",gallery:[{media:[{assetId:"01M3QM74XERA3G7J0J00XVKEXX",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGK74ANMH9PH0YAYCY",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGSP2F13EM5TFRQZGJ",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGJPAGBPVYJSM3TV07",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XF9TBBQMH8393VK14S",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XG5BANHQ2F7FV8KXSG",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]},{media:[{assetId:"01M3QM74XGTS00H47RCAKVNGE3",name:"",objectFit:"cover"},{assetId:"",name:"",objectFit:"cover"}]}]}]},settings:{sizing:"auto auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},imgWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},titleWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},galleryPaddingRight:xi("Gallery Padding Right"),galleryPaddingLeft:xi("Gallery Padding Left"),galleryPaddingBetween:xi("Gallery Padding Between"),cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left-top","top-center","top-right","left-center","center","right-center","left-bottom","bottom-center","right-bottom"]}},titleTopPadding:xi("Title Top Padding"),titleBottomPadding:xi("Title Bottom Padding"),titleLeftPadding:xi("Title Left Padding"),titleRightPadding:xi("Title Right Padding"),titleDescriptionPadding:xi("Title Description Padding"),transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","retype","scroll"]}},titleColor:{type:"string",scope:"common",title:"Title",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Jo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleAlign:{...Jo.textAlign,scope:"layout",title:"Align"},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},descriptionColor:{type:"string",scope:"common",title:"Description",display:{type:"palette-color-picker"}},descriptionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},descriptionFontSettings:{...Jo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},descriptionFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},descriptionLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},descriptionLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},descriptionWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},descriptionAlign:{...Jo.textAlign,scope:"layout",title:"Align"},descriptionTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...Jo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{type:"a",position:"left-center",transition:"scroll",titleColor:"#000000",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleAlign:"center",titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},descriptionColor:"#000000",descriptionFontFamily:"Goudy Bookletter 1911",descriptionFontSettings:{fontWeight:400,fontStyle:"normal"},descriptionLetterSpacing:0,descriptionWordSpacing:0,descriptionAlign:"center",descriptionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",backgroundColor:"rgba(28,31,34,0.9)",lightboxCounterColor:"#DEDDDD",lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{defaultPaddingTop:30/1440,wrapperWidth:1,imgWidth:600/1440,titleWidth:400/1440,galleryPaddingRight:30/1440,galleryPaddingLeft:30/1440,galleryPaddingBetween:30/1440,titleTopPadding:0,titleBottomPadding:0,titleLeftPadding:0,titleRightPadding:0,titleDescriptionPadding:10/1440,cornerRadius:4/1440,position:"center",titleFontSize:73/1440,titleLineHeight:66/1440,descriptionFontSize:20/1440,descriptionLineHeight:24/1440,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},m:{defaultPaddingTop:10/375,wrapperWidth:1,imgWidth:170/375,titleWidth:150/375,galleryPaddingRight:10/375,galleryPaddingLeft:10/375,galleryPaddingBetween:10/375,titleTopPadding:0,titleBottomPadding:0,titleLeftPadding:10/375,titleRightPadding:10/375,titleDescriptionPadding:8/375,cornerRadius:8/375,position:"left-center",titleFontSize:30/375,titleLineHeight:25/375,descriptionFontSize:14/375,descriptionLineHeight:18/375,lightboxCounterFontSize:14/375,lightboxCounterLineHeight:14/375},t:{defaultPaddingTop:20/768,wrapperWidth:1,imgWidth:300/768,titleWidth:320/768,galleryPaddingRight:20/768,galleryPaddingLeft:20/768,galleryPaddingBetween:20/768,titleTopPadding:0,titleBottomPadding:0,titleLeftPadding:0,titleRightPadding:0,titleDescriptionPadding:8/768,cornerRadius:8/768,position:"center",titleFontSize:58/768,titleLineHeight:48/768,descriptionFontSize:16/768,descriptionLineHeight:20/768,lightboxCounterFontSize:8/768,lightboxCounterLineHeight:8/768}},displayRules:[{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}}],layout:["__componentName__","type","wrapperWidth","imgWidth","titleWidth","imageDisplay","cornerRadius","position","transition","lightbox","lightboxImageDisplay"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",items:["wrapperWidth","imgWidth"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",title:"Title",items:["position","transition"]},"titleWidth",{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",items:["backgroundColor"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleAlign","titleTextAppearance"]},{type:"group",title:"Description",items:["descriptionFontFamily","descriptionFontSettings",{type:"row",items:["descriptionFontSize","descriptionLineHeight","descriptionLetterSpacing","descriptionWordSpacing"]},"descriptionAlign","descriptionTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:["titleColor","descriptionColor","backgroundColor","lightboxCounterColor"],panelIds:["general","typeStyle"]}},Cw={element:Sw,id:"mercury",name:"Mercury",category:"lists",layoutMode:"structured",version:1,defaultSize:{d:{width:720,height:540}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Mercury.mp4"},schema:$w,sourceCode:ww,assetsPaths:{content:[{path:"gallery.media.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"descriptionFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",descriptionFontSettings:"descriptionFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"}},Tw=10,Iw=400,Lw=1,Pw=1120/1440,Rw=140/1440,Mw=550/1440,Ew=13,kw=4,Aw=38/100,Fw=28/100,Rp=2.8,Nw=.9,Mp=.22,_w=.5,Hw=1,Ww=1.5,Ow=0,Dw=.85;function Bw(e){return`
|
|
23428
23428
|
.${e}-wrapper {
|
|
23429
23429
|
position: relative;
|
|
23430
23430
|
box-sizing: border-box;
|
|
@@ -23466,7 +23466,7 @@ export function Mercury({
|
|
|
23466
23466
|
object-fit: cover;
|
|
23467
23467
|
object-position: center;
|
|
23468
23468
|
}
|
|
23469
|
-
`}function
|
|
23469
|
+
`}function Ep(e){return Number(e.toFixed(4))}function wd(e,t,n,i){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,Math.round(r))):t}function Is(e,t,n=0,i=9999){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,r)):t}function zw(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function jw(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function Vw(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.name??"")||/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.assetId??"")}function kp(e,t){return(1-e)/(1-e*Math.cos(t))}function Gw(e){let t=0;for(let n=0;n<360;n+=1){const i=n*Math.PI/180;t=Math.max(t,Math.abs(Math.sin(i)*kp(e,i)))}return t||1}function Xw(e,t){return e?1:1+Mp*(.35+t)}function qw(e,t,n,i){const o=t*Xw(n,i);return Math.max(0,(e-o)/2)}function Uw(e,t,n){const i=kp(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function Yw(e,t,n){return e/2+t*n}function Kw(e,t,n){return`translate(calc(${e(t)} - var(--helix-base-w) / 2), -50%) scale(${Ep(n)})`}function Qw(e){return Math.round(e*1e3)}function Ap(e,t,n){const i=Math.cos(e),o=Math.cos(Dw*Math.PI/2);if(i>=o)return n;const r=(i+1)/(o+1);return Ep(t+(n-t)*r)}function Zw(e){return Ap(e,_w,Hw)}function Jw(e){return Ap(e,Ww,Ow)}function e$(e,t){if(!t)return"none";const n=Jw(e);return n<=0?"none":`blur(${n}px)`}function $d(e,t){const n=t*Math.PI*2,{offset:i,scale:o}=Uw(e.depthFactor,e.spreadFactor,n),r=Yw(e.width,e.orbitRadius,i);return{transform:Kw(e.scaled,r,o),zIndex:Qw(o),opacity:Zw(n),filter:e$(n,e.blurEnabled)}}function Fp(e,t){return(e%t+t)%t}function t$(e,t){return Xl(e,t)/t}function Xl(e,t){return Fp(e,t)}function n$(e,t){return Math.floor(e/t)}function i$(e,t,n,i){return n$(e,t)*n+Xl(e,t)*i}function Cd(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function ha(e){const t=e%1;return t<0?t+1:t}function o$(e,t,n){const i=t/Rp,o=n==="left"?-e*i:e*i;return ha(o)}function r$({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=A.useScopedStyles(),r=s.useRef(null),l=Is((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),Pw),c=Is(e==null?void 0:e.imageWidth,Rw),d=Is(e==null?void 0:e.turnHeight,Mw),u=wd(e==null?void 0:e.itemsPerTurn,Ew,3,40),p=wd(e==null?void 0:e.turns,kw,1,30),v=Math.min(Nw,Math.max(0,Aw)),x=Math.min(1,Math.max(0,Fw)),m=Math.max(0,(e==null?void 0:e.speed)??Rp),h=(e==null?void 0:e.direction)==="left"?"left":"right",b=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",S=(e==null?void 0:e.cornerRadius)??0,M=(e==null?void 0:e.blur)!=="off",y=s.useMemo(()=>zw(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),$=y.display==="cover",R=T=>A.scalingValue(T,n??!1),X=s.useMemo(()=>Gw(v),[v]),B=s.useMemo(()=>qw(l,c,$,x),[l,c,$,x]),O=s.useMemo(()=>Bw(o),[o]),N=s.useMemo(()=>({scaled:T=>A.scalingValue(T,n??!1),width:l,orbitRadius:B,depthFactor:v,spreadFactor:X,blurEnabled:M}),[n,l,B,v,X,M]),z=s.useRef([]),C=s.useRef(0),I=s.useMemo(()=>(t??[]).filter(T=>{var le;return!!((le=T.image)!=null&&le.assetId)}),[t]),j=d/u,E=c*jw(y),w=Math.min(Iw,p*u),L=Lw*u,V=w+L*2,K=Math.max(0,p-1)*d+(u-1)*j,P=m>0,f=b==="scroll"&&P,U=b==="autoplay"&&P&&(n?!!i:!0),te=U?360/(m*Tw):0,ce=I.length===0?0:V,F=s.useMemo(()=>Array.from({length:ce},(T,le)=>t$(le-L,u)),[ce,L,u]);s.useEffect(()=>{if(!U&&!f)return;const T=r.current;if(!T)return;const le=re=>{C.current=re,F.forEach((ge,we)=>{const Ae=z.current[we];if(!Ae)return;const fe=$d(N,ha(ge+re));Ae.style.transform=fe.transform,Ae.style.zIndex=String(fe.zIndex),Ae.style.opacity=String(fe.opacity),Ae.style.filter=fe.filter})};if(f){const re=T.ownerDocument.defaultView??window,ge=()=>{const Ae=T.getBoundingClientRect(),fe=re.innerHeight||T.ownerDocument.documentElement.clientHeight,ve=fe+Ae.height;if(ve<=0)return;const xe=Math.min(1,Math.max(0,(fe-Ae.top)/ve));le(o$(xe,m,h))};ge(),re.addEventListener("scroll",ge,{passive:!0,capture:!0}),re.addEventListener("resize",ge);const we=new ResizeObserver(ge);return we.observe(T),()=>{re.removeEventListener("scroll",ge,{capture:!0}),re.removeEventListener("resize",ge),we.disconnect()}}const J=h==="left"?-1:1;let Se=null,Le=null;const me=re=>{if(Le!==null){const ge=(re-Le)/1e3/te*J;C.current=ha(C.current+ge)}Le=re,le(C.current),Se=requestAnimationFrame(me)},ye=()=>{Se===null&&(Le=null,Se=requestAnimationFrame(me))},ee=()=>{Se!==null&&cancelAnimationFrame(Se),Se=null},oe=new IntersectionObserver(([re])=>{re!=null&&re.isIntersecting?ye():ee()});return oe.observe(T),()=>{ee(),oe.disconnect()}},[U,f,F,N,te,m,h]);const ie=U||f?C.current:0;return I.length===0?a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:O}}),a.jsx("div",{className:`${o}-wrapper`,style:{width:R(l)}})]}):a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:O}}),a.jsx("div",{ref:r,className:`${o}-wrapper`,style:{width:R(l),height:R(K)},children:Array.from({length:V},(T,le)=>{const J=le-L,Le=I[Fp(J,I.length)].image,me=Xl(J,u),ye=F[le],ee=i$(J,u,d,j),oe=x===0?0:(Cd(me+7.3)-.5)*x*j,re=$?1:1+(Cd(me+3.1)-.5)*2*Mp*(.35+x),ge=c*re,we={"--helix-base-w":R(ge),...$?{"--helix-base-h":R(E)}:{}},Ae={top:R(ee+oe),...we,...$d(N,ha(ye+ie))},fe=S>0?{borderRadius:R(S)}:{},ve=$?{...fe,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:fe,xe=Vw(Le)?a.jsx("video",{className:`${o}-media`,style:ve,src:Le.assetId,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:`${o}-media`,style:ve,src:Le.assetId,alt:Le.name??"",loading:"lazy",decoding:"async"});return a.jsx("div",{ref:g=>{z.current[le]=g},className:$?`${o}-item ${o}-item-cover`:`${o}-item`,style:Ae,children:$?a.jsx("div",{className:`${o}-cover`,style:fe,children:xe}):xe},`${p}-${u}-${J}`)})})]})}const a$=`import { useEffect, useMemo, useRef, type CSSProperties } from 'react';
|
|
23470
23470
|
import { CommonComponentProps } from '../props';
|
|
23471
23471
|
import { scalingValue } from '../utils/scalingValue';
|
|
23472
23472
|
import { useScopedStyles } from '../utils/useScopedStyles';
|
|
@@ -24026,7 +24026,7 @@ export function Helix({
|
|
|
24026
24026
|
</>
|
|
24027
24027
|
);
|
|
24028
24028
|
}
|
|
24029
|
-
`,t$=["01M3QM74XEA13H9Z3AZF1NGY48","01M3QM74XEZJJC5STVP0WF2GN3","01M3QM74XE170PHTE4A34MKNP3","01M3QM74XEZD3SDVVQZ1TF9JPA","01M3QM74XEPJWV4ZR7R3JPS67H"],n$={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}}}},default:t$.map(e=>({image:{assetId:e,name:""}}))},settings:{sizing:"auto auto",properties:{width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},turnHeight:{type:"number",scope:"layout",title:"Turn height",display:{type:"numeric-input"},min:0,max:9999},itemsPerTurn:{type:"number",scope:"common",title:"Per turn",display:{type:"common-numeric-input"},min:3,max:40},turns:{type:"number",scope:"common",title:"Turns",display:{type:"common-numeric-input"},min:1,max:30},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},playback:{type:"string",scope:"common",title:"Playback",display:{type:"toggle-cycle",enum:["autoplay","scroll"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"string",scope:"common",title:"Blur",display:{type:"toggle-cycle",enum:["on","off"]}}},defaults:{itemsPerTurn:14,turns:3,direction:"right",playback:"autoplay",blur:"off",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1}},layoutDefaults:{d:{defaultPaddingTop:30/1440,width:800/1440,imageWidth:160/1440,turnHeight:380/1440,speed:2.2,cornerRadius:0},m:{defaultPaddingTop:10/375,width:320/375,imageWidth:75/375,turnHeight:310/375,speed:2.8,cornerRadius:0},t:{defaultPaddingTop:20/768,width:620/768,imageWidth:100/768,turnHeight:280/768,speed:2.8,cornerRadius:0}},layout:["__componentName__","width","imageWidth","turnHeight","itemsPerTurn","turns","playback","speed","direction","imageDisplay","cornerRadius","blur"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",items:["direction","speed"]},{type:"row",items:["width"]},{type:"row",items:["imageWidth","turnHeight"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",items:["itemsPerTurn","turns"]},{type:"row",items:["playback","blur"]}]}]},i$={element:Jw,id:"helix",name:"Helix",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Helix.mp4"},version:1,defaultSize:{d:{width:720,height:540}},schema:n$,sourceCode:e$,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Cn=300,tn=300,o$=8/1440,go=.004,r$=50,a$=1440,ji=r$/a$;function s$(e){if(e==="default"||e==="compact"||e==="open")return e;if(e==="onScroll")return"compact"}function l$(e){return e==="center"||e==="right"?e:"left"}function c$(e){return e==="left"||e==="right"?e:"center"}function d$(e,t,n){const i=k.scalingValue(t,n);return e==="center"?`translateX(calc(-50% + ${i}))`:`translateX(${i})`}function u$(e,t){if(e&&typeof e=="object"){if(t&&typeof e[t]=="string")return e[t];for(const n in e)if(typeof e[n]=="string")return e[n];return}return e}function Rp(e,t){const n=(u$(e,t)??"always").trim().toLowerCase().replace(/[_-]+/g," ");return n==="open only"||n==="openonly"?"open only":n==="open and compact"||n==="openandcompact"?"open and compact":n==="default and open"||n==="defaultandopen"?"default and open":n==="default and compact"||n==="defaultandcompact"?"default and compact":"always"}function p$(e,t,n){switch(Rp(e.showIn,n)){case"open only":return!1;case"open and compact":return t==="compact";case"default and compact":return!0;case"default and open":return t==="default";default:return!0}}function m$(e,t){switch(Rp(e.showIn,t)){case"default and compact":return!1;default:return!0}}function g$(e){return(e==null?void 0:e.find(t=>t.slug===""))??(e==null?void 0:e[0])}function h$(e,t){const n=e?t==null?void 0:t.find(i=>i.id===e):g$(t);return!e&&!n?"":n?n.slug===""?"/":`/${n.slug}`:e.startsWith("/")||e.startsWith("#")||/^[a-z][a-z\d+\-.]*:/i.test(e)?e:t?`/${e}`:e}function Td(e){const t=(e??"").toLowerCase();return t==="blank"||t==="_blank"||t.includes("new")}function Mp(e){const t=e.link;if(t&&typeof t=="object"){const i=Td(t.target)?"_blank":void 0;if(t.type==="url")return{type:"url",value:t.value??t.url??"",target:i};if(t.type==="anchor")return{type:"anchor",value:t.value??"",target:i};if(t.type==="page")return{type:"page",value:t.value??"",target:i,anchor:t.anchor};if(typeof t.url=="string")return{type:"url",value:t.url,target:i}}const n=Td(e.openIn)?"_blank":void 0;return e.mode==="url"?{type:"url",value:e.url??"",target:n}:{type:"page",value:e.page??"",target:n,anchor:e.anchor}}function Qs(e,t){const n=e.label||"Link",i=Mp(e);if(i.type==="url")return{label:n,href:i.value,target:i.target};if(i.type==="anchor"){const c=i.value.replace(/^#/,"");return{label:n,href:c?`#${c}`:"",target:i.target}}const o=h$(i.value,t),r=(i.anchor??"").replace(/^#/,""),l=r?o?`${o}#${r}`:`#${r}`:o;return{label:n,href:l,target:i.target}}const bi=24,xi=bi*.125,Ep=bi*.125,Ls=(bi-(3*xi+2*Ep))/2,Id=xi+Ep;function f$({className:e,lineClassName:t}){return a.jsxs("svg",{className:e,viewBox:`0 0 ${bi} ${bi}`,"aria-hidden":"true",children:[a.jsx("rect",{className:`${t} ${t}-top`,x:"0",y:Ls,width:bi,height:xi,rx:xi/2}),a.jsx("rect",{className:`${t} ${t}-mid`,x:"0",y:Ls+Id,width:bi,height:xi,rx:xi/2}),a.jsx("rect",{className:`${t} ${t}-bot`,x:"0",y:Ls+2*Id,width:bi,height:xi,rx:xi/2})]})}function y$(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function v$(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:k.scalingValue((o-t)/2,i)}}const kp=.004;let er;function x$(){return er!==void 0?er:typeof document>"u"?(er=null,null):(er=document.createElement("canvas").getContext("2d"),er)}function b$(e){const t=getComputedStyle(e),n=parseFloat(t.fontSize)||0;if(n<=0)return 0;const i=x$();if(!i)return 0;i.font=`${t.fontStyle} ${t.fontWeight} ${n}px ${t.fontFamily}`;const o=i.measureText("H"),r=o.actualBoundingBoxAscent>0?o.actualBoundingBoxAscent:0,l=Math.max(0,o.actualBoundingBoxDescent||0),c=o.fontBoundingBoxAscent||0,d=o.fontBoundingBoxDescent||0;return r<=0||c<=0&&d<=0?0:(d-l-(c-r))/2/n}function Ld(e,t){const[n,i]=s.useState(0);return s.useLayoutEffect(()=>{const o=e.current;if(!o)return;const r=()=>{const d=b$(o);i(u=>Math.abs(u-d)<kp?u:d)};r();const l=document.fonts;l.ready.then(r).catch(()=>{}),l.addEventListener("loadingdone",r);const c=new ResizeObserver(r);return c.observe(o),()=>{l.removeEventListener("loadingdone",r),c.disconnect()}},[e,t]),n}function Pd(e){if(!(Math.abs(e)<kp))return`translateY(${e}em)`}function Rd(e){var t,n;return[e.fontFamily??"",((t=e.fontSettings)==null?void 0:t.fontWeight)??400,((n=e.fontSettings)==null?void 0:n.fontStyle)??"normal",e.fontSize??"",e.lineHeight??""].join("\0")}function Md(e){return{fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontSize:e.fontSize,lineHeight:e.lineHeight,position:"absolute",top:0,left:0,visibility:"hidden",pointerEvents:"none",whiteSpace:"nowrap"}}function Ed(e,t={}){return{fontFamily:e.fontFamily??t.fontFamily,fontSettings:e.fontSettings??t.fontSettings,fontSize:e.fontSize??t.fontSize,lineHeight:e.lineHeight??t.lineHeight,letterSpacing:e.letterSpacing??t.letterSpacing??0,wordSpacing:e.wordSpacing??t.wordSpacing??0,textAlign:e.textAlign??t.textAlign??"left",textAppearance:e.textAppearance??t.textAppearance}}function kd(e,t,n){var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??.01,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing??0,wordSpacing:t.wordSpacing??0,textAlign:t.textAlign,textAppearance:t.textAppearance,color:""};return{css:{...un(en(i,n)),...v$(t.fontSize,t.lineHeight,e,n)},className:y$(t.fontSize,t.lineHeight,`${e}-link-text`,`${e}-text-tight-leading`)}}function Ad(e){const t=e.split(/\r?\n/);return t.length===1?e:t.map((n,i)=>a.jsxs(s.Fragment,{children:[n,i<t.length-1?a.jsx("br",{}):null]},i))}function Fd(e,t,n,i){const o=Math.max(0,n-i),r=e+t;if(r<=o||r<=0)return{start:e,end:t};const l=o/r;return{start:e*l,end:t*l}}function Ap(e){const n=Math.max(ji,e.fontSize??ji),{start:i,end:o}=Fd(e.textPaddingTop,e.textPaddingBottom,1,n),{start:r,end:l}=Fd(e.textPaddingLeft,e.textPaddingRight,1,ji);return{effectivePaddingLeft:r,effectivePaddingRight:l,effectivePaddingTop:i,effectivePaddingBottom:o,panelSize:1}}function S$(e){if(e==="center"||e==="center-center")return{horizontalAlign:"center",verticalAlign:"center"};const[t,n]=e.split("-");return{horizontalAlign:t,verticalAlign:n}}function w$(e){return e.position?S$(e.position):{horizontalAlign:e.horizontalAlign??"left",verticalAlign:e.verticalAlign??"top"}}function $$(e,t){return e.textPaddingLeft!==t.textPaddingLeft||e.textPaddingRight!==t.textPaddingRight||e.textPaddingTop!==t.textPaddingTop||e.textPaddingBottom!==t.textPaddingBottom}const C$=[["onScrollIconColor","compactIconColor"],["onScrollLinkColor","compactLinkColor"],["onScrollLogoColor","compactLogoColor"],["onScrollBackgroundColor","compactBackgroundColor"],["onScrollPanelColor","compactBackgroundColor"],["onScrollLogoMaxWidth","compactLogoMaxWidth"],["onScrollLogoMaxHeight","compactLogoMaxHeight"],["onScrollLogoPosition","compactLogoPosition"],["onScrollPanelHeight","compactPanelHeight"],["onScrollIconSize","compactIconSize"],["onScrollNavTextWidth","compactNavTextWidth"],["onScrollNavGap","compactNavGap"],["onScrollNavPaddingLeft","compactNavPaddingLeft"],["onScrollNavPaddingRight","compactNavPaddingRight"],["onScrollFontFamily","compactFontFamily"],["onScrollFontSettings","compactFontSettings"],["onScrollFontSize","compactFontSize"],["onScrollLineHeight","compactLineHeight"],["onScrollLetterSpacing","compactLetterSpacing"],["onScrollWordSpacing","compactWordSpacing"],["onScrollTextAlign","compactTextAlign"],["onScrollTextAppearance","compactTextAppearance"]];function Fp(e){var o,r;const t=e,n={};for(const[l,c]of C$)e[c]!==void 0||t[l]===void 0||(n[c]=t[l]);const i=t.stateOverrides;return i&&(i.onScroll!==void 0||i["onScroll-hover"]!==void 0)&&(n.stateOverrides={...e.stateOverrides},i.onScroll!==void 0&&((o=e.stateOverrides)==null?void 0:o.compact)===void 0&&(n.stateOverrides.compact=i.onScroll),i["onScroll-hover"]!==void 0&&((r=e.stateOverrides)==null?void 0:r["compact-hover"])===void 0&&(n.stateOverrides["compact-hover"]=i["onScroll-hover"])),Object.keys(n).length===0?e:{...e,...n}}function Nd(e){var o,r,l,c,d,u,p,v,b,m,h,x,S,P,f,w;e=Fp(e);const t=e,n={};if(e.backgroundColor===void 0&&t.panelColor!==void 0&&(n.backgroundColor=t.panelColor),e.openFontFamily===void 0&&e.fontFamily!==void 0&&(n.openFontFamily=e.fontFamily),e.openFontSettings===void 0&&e.fontSettings!==void 0&&(n.openFontSettings=e.fontSettings),e.openFontSize===void 0&&e.fontSize!==void 0&&(n.openFontSize=e.fontSize),e.openLineHeight===void 0&&e.lineHeight!==void 0&&(n.openLineHeight=e.lineHeight),e.openLetterSpacing===void 0&&e.letterSpacing!==void 0&&(n.openLetterSpacing=e.letterSpacing),e.openWordSpacing===void 0&&e.wordSpacing!==void 0&&(n.openWordSpacing=e.wordSpacing),e.openTextAlign===void 0&&e.textAlign!==void 0&&(n.openTextAlign=e.textAlign),e.openTextAppearance===void 0&&e.textAppearance!==void 0&&(n.openTextAppearance=e.textAppearance),e.openLinkColor===void 0){const N=((r=(o=e.stateOverrides)==null?void 0:o.open)==null?void 0:r.openLinkColor)??((c=(l=e.stateOverrides)==null?void 0:l.open)==null?void 0:c.linkColor)??e.linkColor;N!==void 0&&(n.openLinkColor=N)}if(e.compactIconColor===void 0){const N=((u=(d=e.stateOverrides)==null?void 0:d.compact)==null?void 0:u.iconColor)??e.iconColor;N!==void 0&&(n.compactIconColor=N)}if(e.compactLinkColor===void 0){const N=((v=(p=e.stateOverrides)==null?void 0:p.compact)==null?void 0:v.linkColor)??e.linkColor;N!==void 0&&(n.compactLinkColor=N)}if(e.compactLogoColor===void 0){const N=((m=(b=e.stateOverrides)==null?void 0:b.compact)==null?void 0:m.logoColor)??e.logoColor;N!==void 0&&(n.compactLogoColor=N)}if(e.openLogoColor===void 0){const N=((x=(h=e.stateOverrides)==null?void 0:h.open)==null?void 0:x.logoColor)??e.logoColor;N!==void 0&&(n.openLogoColor=N)}if(e.compactBackgroundColor===void 0){const N=((P=(S=e.stateOverrides)==null?void 0:S.compact)==null?void 0:P.backgroundColor)??((w=(f=t.stateOverrides)==null?void 0:f.compact)==null?void 0:w.panelColor)??t.compactPanelColor??t.onScrollPanelColor??e.backgroundColor??n.backgroundColor;N!==void 0&&(n.compactBackgroundColor=N)}e.logoMaxHeight===void 0&&e.logoMaxWidth!==void 0&&(n.logoMaxHeight=e.logoMaxWidth),e.compactLogoMaxHeight===void 0&&e.compactLogoMaxWidth!==void 0&&(n.compactLogoMaxHeight=e.compactLogoMaxWidth);const i=(N,V)=>{if(e[N]!==void 0)return;const B=e[V];B!==void 0&&(n[N]=B)};return i("compactLogoMaxHeight","logoMaxHeight"),i("compactLogoPosition","logoPosition"),i("compactPanelHeight","panelHeight"),i("compactShowIcon","showIcon"),i("compactIconSize","iconSize"),i("compactNavTextWidth","navTextWidth"),i("compactNavTextPosition","navTextPosition"),i("compactNavTextOffset","navTextOffset"),i("compactNavGap","navGap"),i("compactNavPaddingLeft","navPaddingLeft"),i("compactNavPaddingRight","navPaddingRight"),i("compactFontFamily","fontFamily"),i("compactFontSettings","fontSettings"),i("compactFontSize","fontSize"),i("compactLineHeight","lineHeight"),i("compactLetterSpacing","letterSpacing"),i("compactWordSpacing","wordSpacing"),i("compactTextAlign","textAlign"),i("compactTextAppearance","textAppearance"),Object.keys(n).length===0?e:{...e,...n}}function T$(e,t){const n=Ap({textPaddingLeft:e.textPaddingLeft??0,textPaddingRight:e.textPaddingRight??0,textPaddingTop:e.textPaddingTop??0,textPaddingBottom:e.textPaddingBottom??0,fontSize:e.openFontSize??e.fontSize??t.openFontSize??t.fontSize}),i={};return(e.textPaddingLeft??0)!==n.effectivePaddingLeft&&(i.textPaddingLeft=n.effectivePaddingLeft),(e.textPaddingRight??0)!==n.effectivePaddingRight&&(i.textPaddingRight=n.effectivePaddingRight),(e.textPaddingTop??0)!==n.effectivePaddingTop&&(i.textPaddingTop=n.effectivePaddingTop),(e.textPaddingBottom??0)!==n.effectivePaddingBottom&&(i.textPaddingBottom=n.effectivePaddingBottom),Object.keys(i).length===0?e:{...e,...i}}function I$(e,t){return{paddingLeft:k.scalingValue(e.effectivePaddingLeft,t),paddingRight:k.scalingValue(e.effectivePaddingRight,t),paddingTop:k.scalingValue(e.effectivePaddingTop,t),paddingBottom:k.scalingValue(e.effectivePaddingBottom,t)}}function L$(e,t,n,i){const o=Math.max(ji,n??ji),r=Math.max(t.effectivePaddingTop,go),l=Math.max(t.effectivePaddingBottom,go),c=Math.max(0,t.panelSize-t.effectivePaddingBottom-o),d=Math.max(0,t.panelSize-t.effectivePaddingTop-o),u=Math.max(t.effectivePaddingLeft,go),p=Math.max(t.effectivePaddingRight,go),v=Math.max(0,t.panelSize-t.effectivePaddingRight-ji),b=Math.max(0,t.panelSize-t.effectivePaddingLeft-ji);return a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:i(r)}}),a.jsx("div",{"data-controls":"textPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:i(l)}}),a.jsx("div",{"data-controls":"textPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(v),className:`${e}-control-anchor`,style:{top:0,left:0,width:i(u),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(b),className:`${e}-control-anchor`,style:{top:0,right:0,width:i(p),height:"100%"}})]})}const P$={iconColor:"icon-color",closeButtonColor:"close-button-color",linkColor:"link-color",openLinkColor:"menu-link-color",compactIconColor:"compact-icon-color",compactLinkColor:"compact-link-color",compactLogoColor:"compact-logo-color",compactBackgroundColor:"compact-background-color",openLogoColor:"open-logo-color",menuBackgroundColor:"menu-background-color",overlayColor:"overlay-color",backgroundColor:"background-color",logoColor:"logo-color"},R$=["hover","open"],M$={top:"flex-start",center:"center",bottom:"flex-end"},E$={left:"flex-start",center:"center",right:"flex-end"};function k$(e){return`
|
|
24029
|
+
`,s$=["01M3QM74XEA13H9Z3AZF1NGY48","01M3QM74XEZJJC5STVP0WF2GN3","01M3QM74XE170PHTE4A34MKNP3","01M3QM74XEZD3SDVVQZ1TF9JPA","01M3QM74XEPJWV4ZR7R3JPS67H"],l$={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{assetId:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}}}},default:s$.map(e=>({image:{assetId:e,name:""}}))},settings:{sizing:"auto auto",properties:{width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},turnHeight:{type:"number",scope:"layout",title:"Turn height",display:{type:"numeric-input"},min:0,max:9999},itemsPerTurn:{type:"number",scope:"common",title:"Per turn",display:{type:"common-numeric-input"},min:3,max:40},turns:{type:"number",scope:"common",title:"Turns",display:{type:"common-numeric-input"},min:1,max:30},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},playback:{type:"string",scope:"common",title:"Playback",display:{type:"toggle-cycle",enum:["autoplay","scroll"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"string",scope:"common",title:"Blur",display:{type:"toggle-cycle",enum:["on","off"]}}},defaults:{itemsPerTurn:14,turns:3,direction:"right",playback:"autoplay",blur:"off",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1}},layoutDefaults:{d:{defaultPaddingTop:30/1440,width:800/1440,imageWidth:160/1440,turnHeight:380/1440,speed:2.2,cornerRadius:0},m:{defaultPaddingTop:10/375,width:320/375,imageWidth:75/375,turnHeight:310/375,speed:2.8,cornerRadius:0},t:{defaultPaddingTop:20/768,width:620/768,imageWidth:100/768,turnHeight:280/768,speed:2.8,cornerRadius:0}},layout:["__componentName__","width","imageWidth","turnHeight","itemsPerTurn","turns","playback","speed","direction","imageDisplay","cornerRadius","blur"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",items:["direction","speed"]},{type:"row",items:["width"]},{type:"row",items:["imageWidth","turnHeight"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",items:["itemsPerTurn","turns"]},{type:"row",items:["playback","blur"]}]}]},c$={element:r$,id:"helix",name:"Helix",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Helix.mp4"},version:1,defaultSize:{d:{width:720,height:540}},schema:l$,sourceCode:a$,assetsPaths:{content:[{path:"image.assetId",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},Tn=300,rn=300,d$=8/1440,fo=.004,u$=50,p$=1440,Xi=u$/p$;function m$(e){if(e==="default"||e==="compact"||e==="open")return e;if(e==="onScroll")return"compact"}function g$(e){return e==="center"||e==="right"?e:"left"}function h$(e){return e==="left"||e==="right"?e:"center"}function f$(e,t,n){const i=A.scalingValue(t,n);return e==="center"?`translateX(calc(-50% + ${i}))`:`translateX(${i})`}function y$(e,t){if(e&&typeof e=="object"){if(t&&typeof e[t]=="string")return e[t];for(const n in e)if(typeof e[n]=="string")return e[n];return}return e}function Np(e,t){const n=(y$(e,t)??"always").trim().toLowerCase().replace(/[_-]+/g," ");return n==="open only"||n==="openonly"?"open only":n==="open and compact"||n==="openandcompact"?"open and compact":n==="default and open"||n==="defaultandopen"?"default and open":n==="default and compact"||n==="defaultandcompact"?"default and compact":"always"}function v$(e,t,n){switch(Np(e.showIn,n)){case"open only":return!1;case"open and compact":return t==="compact";case"default and compact":return!0;case"default and open":return t==="default";default:return!0}}function x$(e,t){switch(Np(e.showIn,t)){case"default and compact":return!1;default:return!0}}function b$(e){return(e==null?void 0:e.find(t=>t.slug===""))??(e==null?void 0:e[0])}function S$(e,t){const n=e?t==null?void 0:t.find(i=>i.id===e):b$(t);return!e&&!n?"":n?n.slug===""?"/":`/${n.slug}`:e.startsWith("/")||e.startsWith("#")||/^[a-z][a-z\d+\-.]*:/i.test(e)?e:t?`/${e}`:e}function Td(e){const t=(e??"").toLowerCase();return t==="blank"||t==="_blank"||t.includes("new")}function _p(e){const t=e.link;if(t&&typeof t=="object"){const i=Td(t.target)?"_blank":void 0;if(t.type==="url")return{type:"url",value:t.value??t.url??"",target:i};if(t.type==="anchor")return{type:"anchor",value:t.value??"",target:i};if(t.type==="page")return{type:"page",value:t.value??"",target:i,anchor:t.anchor};if(typeof t.url=="string")return{type:"url",value:t.url,target:i}}const n=Td(e.openIn)?"_blank":void 0;return e.mode==="url"?{type:"url",value:e.url??"",target:n}:{type:"page",value:e.page??"",target:n,anchor:e.anchor}}function Ks(e,t){const n=e.label||"Link",i=_p(e);if(i.type==="url")return{label:n,href:i.value,target:i.target};if(i.type==="anchor"){const c=i.value.replace(/^#/,"");return{label:n,href:c?`#${c}`:"",target:i.target}}const o=S$(i.value,t),r=(i.anchor??"").replace(/^#/,""),l=r?o?`${o}#${r}`:`#${r}`:o;return{label:n,href:l,target:i.target}}const $i=24,wi=$i*.125,Hp=$i*.125,Ls=($i-(3*wi+2*Hp))/2,Id=wi+Hp;function w$({className:e,lineClassName:t}){return a.jsxs("svg",{className:e,viewBox:`0 0 ${$i} ${$i}`,"aria-hidden":"true",children:[a.jsx("rect",{className:`${t} ${t}-top`,x:"0",y:Ls,width:$i,height:wi,rx:wi/2}),a.jsx("rect",{className:`${t} ${t}-mid`,x:"0",y:Ls+Id,width:$i,height:wi,rx:wi/2}),a.jsx("rect",{className:`${t} ${t}-bot`,x:"0",y:Ls+2*Id,width:$i,height:wi,rx:wi/2})]})}function $$(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function C$(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:A.scalingValue((o-t)/2,i)}}const Wp=.004;let er;function T$(){return er!==void 0?er:typeof document>"u"?(er=null,null):(er=document.createElement("canvas").getContext("2d"),er)}function I$(e){const t=getComputedStyle(e),n=parseFloat(t.fontSize)||0;if(n<=0)return 0;const i=T$();if(!i)return 0;i.font=`${t.fontStyle} ${t.fontWeight} ${n}px ${t.fontFamily}`;const o=i.measureText("H"),r=o.actualBoundingBoxAscent>0?o.actualBoundingBoxAscent:0,l=Math.max(0,o.actualBoundingBoxDescent||0),c=o.fontBoundingBoxAscent||0,d=o.fontBoundingBoxDescent||0;return r<=0||c<=0&&d<=0?0:(d-l-(c-r))/2/n}function Ld(e,t){const[n,i]=s.useState(0);return s.useLayoutEffect(()=>{const o=e.current;if(!o)return;const r=()=>{const d=I$(o);i(u=>Math.abs(u-d)<Wp?u:d)};r();const l=document.fonts;l.ready.then(r).catch(()=>{}),l.addEventListener("loadingdone",r);const c=new ResizeObserver(r);return c.observe(o),()=>{l.removeEventListener("loadingdone",r),c.disconnect()}},[e,t]),n}function Pd(e){if(!(Math.abs(e)<Wp))return`translateY(${e}em)`}function Rd(e){var t,n;return[e.fontFamily??"",((t=e.fontSettings)==null?void 0:t.fontWeight)??400,((n=e.fontSettings)==null?void 0:n.fontStyle)??"normal",e.fontSize??"",e.lineHeight??""].join("\0")}function Md(e){return{fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontSize:e.fontSize,lineHeight:e.lineHeight,position:"absolute",top:0,left:0,visibility:"hidden",pointerEvents:"none",whiteSpace:"nowrap"}}function Ed(e,t={}){return{fontFamily:e.fontFamily??t.fontFamily,fontSettings:e.fontSettings??t.fontSettings,fontSize:e.fontSize??t.fontSize,lineHeight:e.lineHeight??t.lineHeight,letterSpacing:e.letterSpacing??t.letterSpacing??0,wordSpacing:e.wordSpacing??t.wordSpacing??0,textAlign:e.textAlign??t.textAlign??"left",textAppearance:e.textAppearance??t.textAppearance}}function kd(e,t,n){var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??.01,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing??0,wordSpacing:t.wordSpacing??0,textAlign:t.textAlign,textAppearance:t.textAppearance,color:""};return{css:{...pn(nn(i,n)),...C$(t.fontSize,t.lineHeight,e,n)},className:$$(t.fontSize,t.lineHeight,`${e}-link-text`,`${e}-text-tight-leading`)}}function Ad(e){const t=e.split(/\r?\n/);return t.length===1?e:t.map((n,i)=>a.jsxs(s.Fragment,{children:[n,i<t.length-1?a.jsx("br",{}):null]},i))}function Fd(e,t,n,i){const o=Math.max(0,n-i),r=e+t;if(r<=o||r<=0)return{start:e,end:t};const l=o/r;return{start:e*l,end:t*l}}function Op(e){const n=Math.max(Xi,e.fontSize??Xi),{start:i,end:o}=Fd(e.textPaddingTop,e.textPaddingBottom,1,n),{start:r,end:l}=Fd(e.textPaddingLeft,e.textPaddingRight,1,Xi);return{effectivePaddingLeft:r,effectivePaddingRight:l,effectivePaddingTop:i,effectivePaddingBottom:o,panelSize:1}}function L$(e){if(e==="center"||e==="center-center")return{horizontalAlign:"center",verticalAlign:"center"};const[t,n]=e.split("-");return{horizontalAlign:t,verticalAlign:n}}function P$(e){return e.position?L$(e.position):{horizontalAlign:e.horizontalAlign??"left",verticalAlign:e.verticalAlign??"top"}}function R$(e,t){return e.textPaddingLeft!==t.textPaddingLeft||e.textPaddingRight!==t.textPaddingRight||e.textPaddingTop!==t.textPaddingTop||e.textPaddingBottom!==t.textPaddingBottom}const M$=[["onScrollIconColor","compactIconColor"],["onScrollLinkColor","compactLinkColor"],["onScrollLogoColor","compactLogoColor"],["onScrollBackgroundColor","compactBackgroundColor"],["onScrollPanelColor","compactBackgroundColor"],["onScrollLogoMaxWidth","compactLogoMaxWidth"],["onScrollLogoMaxHeight","compactLogoMaxHeight"],["onScrollLogoPosition","compactLogoPosition"],["onScrollPanelHeight","compactPanelHeight"],["onScrollIconSize","compactIconSize"],["onScrollNavTextWidth","compactNavTextWidth"],["onScrollNavGap","compactNavGap"],["onScrollNavPaddingLeft","compactNavPaddingLeft"],["onScrollNavPaddingRight","compactNavPaddingRight"],["onScrollFontFamily","compactFontFamily"],["onScrollFontSettings","compactFontSettings"],["onScrollFontSize","compactFontSize"],["onScrollLineHeight","compactLineHeight"],["onScrollLetterSpacing","compactLetterSpacing"],["onScrollWordSpacing","compactWordSpacing"],["onScrollTextAlign","compactTextAlign"],["onScrollTextAppearance","compactTextAppearance"]];function Dp(e){var o,r;const t=e,n={};for(const[l,c]of M$)e[c]!==void 0||t[l]===void 0||(n[c]=t[l]);const i=t.stateOverrides;return i&&(i.onScroll!==void 0||i["onScroll-hover"]!==void 0)&&(n.stateOverrides={...e.stateOverrides},i.onScroll!==void 0&&((o=e.stateOverrides)==null?void 0:o.compact)===void 0&&(n.stateOverrides.compact=i.onScroll),i["onScroll-hover"]!==void 0&&((r=e.stateOverrides)==null?void 0:r["compact-hover"])===void 0&&(n.stateOverrides["compact-hover"]=i["onScroll-hover"])),Object.keys(n).length===0?e:{...e,...n}}function Nd(e){var o,r,l,c,d,u,p,v,x,m,h,b,S,M,y,$;e=Dp(e);const t=e,n={};if(e.backgroundColor===void 0&&t.panelColor!==void 0&&(n.backgroundColor=t.panelColor),e.openFontFamily===void 0&&e.fontFamily!==void 0&&(n.openFontFamily=e.fontFamily),e.openFontSettings===void 0&&e.fontSettings!==void 0&&(n.openFontSettings=e.fontSettings),e.openFontSize===void 0&&e.fontSize!==void 0&&(n.openFontSize=e.fontSize),e.openLineHeight===void 0&&e.lineHeight!==void 0&&(n.openLineHeight=e.lineHeight),e.openLetterSpacing===void 0&&e.letterSpacing!==void 0&&(n.openLetterSpacing=e.letterSpacing),e.openWordSpacing===void 0&&e.wordSpacing!==void 0&&(n.openWordSpacing=e.wordSpacing),e.openTextAlign===void 0&&e.textAlign!==void 0&&(n.openTextAlign=e.textAlign),e.openTextAppearance===void 0&&e.textAppearance!==void 0&&(n.openTextAppearance=e.textAppearance),e.openLinkColor===void 0){const R=((r=(o=e.stateOverrides)==null?void 0:o.open)==null?void 0:r.openLinkColor)??((c=(l=e.stateOverrides)==null?void 0:l.open)==null?void 0:c.linkColor)??e.linkColor;R!==void 0&&(n.openLinkColor=R)}if(e.compactIconColor===void 0){const R=((u=(d=e.stateOverrides)==null?void 0:d.compact)==null?void 0:u.iconColor)??e.iconColor;R!==void 0&&(n.compactIconColor=R)}if(e.compactLinkColor===void 0){const R=((v=(p=e.stateOverrides)==null?void 0:p.compact)==null?void 0:v.linkColor)??e.linkColor;R!==void 0&&(n.compactLinkColor=R)}if(e.compactLogoColor===void 0){const R=((m=(x=e.stateOverrides)==null?void 0:x.compact)==null?void 0:m.logoColor)??e.logoColor;R!==void 0&&(n.compactLogoColor=R)}if(e.openLogoColor===void 0){const R=((b=(h=e.stateOverrides)==null?void 0:h.open)==null?void 0:b.logoColor)??e.logoColor;R!==void 0&&(n.openLogoColor=R)}if(e.compactBackgroundColor===void 0){const R=((M=(S=e.stateOverrides)==null?void 0:S.compact)==null?void 0:M.backgroundColor)??(($=(y=t.stateOverrides)==null?void 0:y.compact)==null?void 0:$.panelColor)??t.compactPanelColor??t.onScrollPanelColor??e.backgroundColor??n.backgroundColor;R!==void 0&&(n.compactBackgroundColor=R)}e.logoMaxHeight===void 0&&e.logoMaxWidth!==void 0&&(n.logoMaxHeight=e.logoMaxWidth),e.compactLogoMaxHeight===void 0&&e.compactLogoMaxWidth!==void 0&&(n.compactLogoMaxHeight=e.compactLogoMaxWidth);const i=(R,X)=>{if(e[R]!==void 0)return;const B=e[X];B!==void 0&&(n[R]=B)};return i("compactLogoMaxHeight","logoMaxHeight"),i("compactLogoPosition","logoPosition"),i("compactPanelHeight","panelHeight"),i("compactShowIcon","showIcon"),i("compactIconSize","iconSize"),i("compactNavTextWidth","navTextWidth"),i("compactNavTextPosition","navTextPosition"),i("compactNavTextOffset","navTextOffset"),i("compactNavGap","navGap"),i("compactNavPaddingLeft","navPaddingLeft"),i("compactNavPaddingRight","navPaddingRight"),i("compactFontFamily","fontFamily"),i("compactFontSettings","fontSettings"),i("compactFontSize","fontSize"),i("compactLineHeight","lineHeight"),i("compactLetterSpacing","letterSpacing"),i("compactWordSpacing","wordSpacing"),i("compactTextAlign","textAlign"),i("compactTextAppearance","textAppearance"),Object.keys(n).length===0?e:{...e,...n}}function E$(e,t){const n=Op({textPaddingLeft:e.textPaddingLeft??0,textPaddingRight:e.textPaddingRight??0,textPaddingTop:e.textPaddingTop??0,textPaddingBottom:e.textPaddingBottom??0,fontSize:e.openFontSize??e.fontSize??t.openFontSize??t.fontSize}),i={};return(e.textPaddingLeft??0)!==n.effectivePaddingLeft&&(i.textPaddingLeft=n.effectivePaddingLeft),(e.textPaddingRight??0)!==n.effectivePaddingRight&&(i.textPaddingRight=n.effectivePaddingRight),(e.textPaddingTop??0)!==n.effectivePaddingTop&&(i.textPaddingTop=n.effectivePaddingTop),(e.textPaddingBottom??0)!==n.effectivePaddingBottom&&(i.textPaddingBottom=n.effectivePaddingBottom),Object.keys(i).length===0?e:{...e,...i}}function k$(e,t){return{paddingLeft:A.scalingValue(e.effectivePaddingLeft,t),paddingRight:A.scalingValue(e.effectivePaddingRight,t),paddingTop:A.scalingValue(e.effectivePaddingTop,t),paddingBottom:A.scalingValue(e.effectivePaddingBottom,t)}}function A$(e,t,n,i){const o=Math.max(Xi,n??Xi),r=Math.max(t.effectivePaddingTop,fo),l=Math.max(t.effectivePaddingBottom,fo),c=Math.max(0,t.panelSize-t.effectivePaddingBottom-o),d=Math.max(0,t.panelSize-t.effectivePaddingTop-o),u=Math.max(t.effectivePaddingLeft,fo),p=Math.max(t.effectivePaddingRight,fo),v=Math.max(0,t.panelSize-t.effectivePaddingRight-Xi),x=Math.max(0,t.panelSize-t.effectivePaddingLeft-Xi);return a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:i(r)}}),a.jsx("div",{"data-controls":"textPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:i(l)}}),a.jsx("div",{"data-controls":"textPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(v),className:`${e}-control-anchor`,style:{top:0,left:0,width:i(u),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(x),className:`${e}-control-anchor`,style:{top:0,right:0,width:i(p),height:"100%"}})]})}const F$={iconColor:"icon-color",closeButtonColor:"close-button-color",linkColor:"link-color",openLinkColor:"menu-link-color",compactIconColor:"compact-icon-color",compactLinkColor:"compact-link-color",compactLogoColor:"compact-logo-color",compactBackgroundColor:"compact-background-color",openLogoColor:"open-logo-color",menuBackgroundColor:"menu-background-color",overlayColor:"overlay-color",backgroundColor:"background-color",logoColor:"logo-color"},N$=["hover","open"],_$={top:"flex-start",center:"center",bottom:"flex-end"},H$={left:"flex-start",center:"center",right:"flex-end"};function W$(e){return`
|
|
24030
24030
|
.${e}-root {
|
|
24031
24031
|
position: relative;
|
|
24032
24032
|
display: block;
|
|
@@ -24056,7 +24056,7 @@ export function Helix({
|
|
|
24056
24056
|
background: none;
|
|
24057
24057
|
cursor: pointer;
|
|
24058
24058
|
color: var(--${e}-icon-color);
|
|
24059
|
-
transition: color ${
|
|
24059
|
+
transition: color ${Tn}ms ease;
|
|
24060
24060
|
line-height: 0;
|
|
24061
24061
|
font-size: 0;
|
|
24062
24062
|
-webkit-appearance: none;
|
|
@@ -24076,7 +24076,7 @@ export function Helix({
|
|
|
24076
24076
|
fill: currentColor;
|
|
24077
24077
|
transform-box: fill-box;
|
|
24078
24078
|
transform-origin: center;
|
|
24079
|
-
transition: transform ${
|
|
24079
|
+
transition: transform ${Tn}ms ease, opacity ${Tn}ms ease;
|
|
24080
24080
|
}
|
|
24081
24081
|
.${e}-root.${e}-open .${e}-icon-line-top {
|
|
24082
24082
|
transform: translateY(200%) rotate(45deg);
|
|
@@ -24131,7 +24131,7 @@ export function Helix({
|
|
|
24131
24131
|
margin: 0;
|
|
24132
24132
|
background-color: var(--${e}-overlay-color);
|
|
24133
24133
|
opacity: 0;
|
|
24134
|
-
transition: opacity ${
|
|
24134
|
+
transition: opacity ${Tn}ms ease, background-color ${Tn}ms ease;
|
|
24135
24135
|
}
|
|
24136
24136
|
.${e}-lightbox.${e}-lightbox-active .${e}-backdrop {
|
|
24137
24137
|
opacity: 1;
|
|
@@ -24146,7 +24146,7 @@ export function Helix({
|
|
|
24146
24146
|
flex-direction: column;
|
|
24147
24147
|
overflow-y: auto;
|
|
24148
24148
|
background-color: var(--${e}-menu-background-color);
|
|
24149
|
-
transition: transform ${
|
|
24149
|
+
transition: transform ${Tn}ms ease, opacity ${Tn}ms ease, background-color ${Tn}ms ease;
|
|
24150
24150
|
box-shadow: 0 0 24px rgba(0, 0, 0, 0.12);
|
|
24151
24151
|
}
|
|
24152
24152
|
.${e}-full-lightbox .${e}-panel {
|
|
@@ -24629,23 +24629,23 @@ export function Helix({
|
|
|
24629
24629
|
font-size: 0;
|
|
24630
24630
|
}
|
|
24631
24631
|
.${e}-nav-state-anim {
|
|
24632
|
-
transition: margin-top ${
|
|
24632
|
+
transition: margin-top ${rn}ms ease;
|
|
24633
24633
|
}
|
|
24634
24634
|
.${e}-nav-state-anim .${e}-nav-bar {
|
|
24635
24635
|
transition:
|
|
24636
|
-
background-color ${
|
|
24637
|
-
height ${
|
|
24638
|
-
min-height ${
|
|
24639
|
-
padding ${
|
|
24640
|
-
gap ${
|
|
24636
|
+
background-color ${Tn}ms ease,
|
|
24637
|
+
height ${rn}ms ease,
|
|
24638
|
+
min-height ${rn}ms ease,
|
|
24639
|
+
padding ${rn}ms ease,
|
|
24640
|
+
gap ${rn}ms ease;
|
|
24641
24641
|
}
|
|
24642
24642
|
.${e}-nav-state-anim .${e}-nav-logo,
|
|
24643
24643
|
.${e}-nav-state-anim .${e}-nav-toggle-wrap,
|
|
24644
24644
|
.${e}-nav-state-anim .${e}-nav-links {
|
|
24645
24645
|
transition:
|
|
24646
|
-
left ${
|
|
24647
|
-
right ${
|
|
24648
|
-
transform ${
|
|
24646
|
+
left ${rn}ms ease,
|
|
24647
|
+
right ${rn}ms ease,
|
|
24648
|
+
transform ${rn}ms ease;
|
|
24649
24649
|
}
|
|
24650
24650
|
.${e}-nav-state-anim .${e}-nav-logo-inner,
|
|
24651
24651
|
.${e}-nav-state-anim .${e}-nav-padding-left,
|
|
@@ -24653,26 +24653,26 @@ export function Helix({
|
|
|
24653
24653
|
.${e}-nav-state-anim .${e}-nav-gap-control,
|
|
24654
24654
|
.${e}-nav-state-anim .${e}-link-text-box {
|
|
24655
24655
|
transition:
|
|
24656
|
-
width ${
|
|
24657
|
-
height ${
|
|
24656
|
+
width ${rn}ms ease,
|
|
24657
|
+
height ${rn}ms ease;
|
|
24658
24658
|
}
|
|
24659
24659
|
.${e}-nav-state-anim .${e}-nav-logo-tint {
|
|
24660
24660
|
transition:
|
|
24661
|
-
background-color ${
|
|
24661
|
+
background-color ${rn}ms ease;
|
|
24662
24662
|
}
|
|
24663
24663
|
.${e}-nav-state-anim .${e}-nav-toggle-wrap .${e}-root {
|
|
24664
24664
|
transition:
|
|
24665
|
-
width ${
|
|
24666
|
-
height ${
|
|
24667
|
-
min-width ${
|
|
24668
|
-
min-height ${
|
|
24669
|
-
max-width ${
|
|
24670
|
-
max-height ${
|
|
24665
|
+
width ${rn}ms ease,
|
|
24666
|
+
height ${rn}ms ease,
|
|
24667
|
+
min-width ${rn}ms ease,
|
|
24668
|
+
min-height ${rn}ms ease,
|
|
24669
|
+
max-width ${rn}ms ease,
|
|
24670
|
+
max-height ${rn}ms ease;
|
|
24671
24671
|
}
|
|
24672
24672
|
.${e}-nav-state-anim .${e}-icon-line {
|
|
24673
24673
|
transition:
|
|
24674
|
-
transform ${
|
|
24675
|
-
opacity ${
|
|
24674
|
+
transform ${Tn}ms ease,
|
|
24675
|
+
opacity ${Tn}ms ease;
|
|
24676
24676
|
}
|
|
24677
24677
|
.${e}-nav-state-anim .${e}-nav-link,
|
|
24678
24678
|
.${e}-nav-state-anim .${e}-link,
|
|
@@ -24680,13 +24680,13 @@ export function Helix({
|
|
|
24680
24680
|
.${e}-nav-state-anim .${e}-text-tight-leading {
|
|
24681
24681
|
transition:
|
|
24682
24682
|
color 200ms ease,
|
|
24683
|
-
font-size ${
|
|
24684
|
-
line-height ${
|
|
24685
|
-
letter-spacing ${
|
|
24686
|
-
word-spacing ${
|
|
24687
|
-
padding ${
|
|
24683
|
+
font-size ${rn}ms ease,
|
|
24684
|
+
line-height ${rn}ms ease,
|
|
24685
|
+
letter-spacing ${rn}ms ease,
|
|
24686
|
+
word-spacing ${rn}ms ease,
|
|
24687
|
+
padding ${rn}ms ease;
|
|
24688
24688
|
}
|
|
24689
|
-
`}function Zs(e){return e?!e.startsWith("http://")&&!e.startsWith("https://")&&!e.startsWith("blob:")&&!e.startsWith("data:"):!1}function A$(e,t){var i;const n=(i=e.logo)==null?void 0:i.icon;return!e.logo||Zs(n)||!t?e:{...e,logo:{...e.logo,icon:t}}}function F$(e){return`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`}function N$(e){const t=e.trim().toLowerCase();return t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")?!0:t.includes(".svg")}function _$(e){const t=N$(e),[n,i]=s.useState(!1);return s.useEffect(()=>{if(t||!e.startsWith("blob:")){i(!1);return}let o=!1;return fetch(e).then(r=>r.blob()).then(async r=>{if(o)return;if(r.type.includes("svg")){i(!0);return}if(r.type.startsWith("image/")&&!r.type.includes("svg")){i(!1);return}const l=await r.text();o||i(/<svg[\s>]/i.test(l.trim()))}).catch(()=>{o||i(!1)}),()=>{o=!0}},[t,e]),t||n}function H$(e,t){const[n,i]=s.useState(yr(e)?e:null);return s.useEffect(()=>{if(!t||!e){i(null);return}if(yr(e)){i(e);return}let o=!1;return zu(e).then(r=>{o||i(r)}).catch(()=>{o||i(null)}),()=>{o=!0}},[t,e]),t?n:null}function W$(e){const t=e.indexOf("#");if(t===-1)return"";try{return decodeURIComponent(e.slice(t+1))}catch{return e.slice(t+1)}}function O$(e){if(!e||e.startsWith("#"))return!0;try{return new URL(e,window.location.href).pathname===window.location.pathname}catch{return!1}}function Np(e){if(!e)return null;const t=document.getElementById(e),n=document.querySelector(`[data-section-id="${CSS.escape(e)}"]`),i=t??n;return i instanceof HTMLElement?i:null}function _d(e){const t=Np(e);return t?(t.scrollIntoView({behavior:"smooth",block:"start"}),!0):!1}function D$(e,t,n={}){const{isEditor:i,isPreviewMode:o,item:r,pages:l,onLinkNavigate:c}=n,d=n.runAfterClose??(b=>b()),u=e.currentTarget.getAttribute("href")??"",p=W$(u),v=e.currentTarget.target==="_blank";if(r&&c){e.preventDefault(),e.stopPropagation();const b=Qs(r,l),m=Mp(r),h={mode:m.type==="url"?"url":"page",href:b.href||u,page:m.type==="page"?m.value:void 0,url:m.type==="url"?m.value:void 0,anchor:m.type==="anchor"?m.value.replace(/^#/,""):(m.anchor??"").replace(/^#/,""),target:b.target};h.target==="_blank"?c(h):d(()=>c(h)),t();return}if(i){e.preventDefault(),d(()=>_d(p)),t();return}!v&&p&&O$(u)&&Np(p)&&(e.preventDefault(),d(()=>_d(p))),t()}const B$=["--cntrl-article-width","--cntrl-article-top","--cntrl-article-left","--cntrl-viewport-height"];function z$(e){let t=e;for(;t;){if(getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim())return t;t=t.parentElement}return e}function j$(e){const t={},n=z$(e);if(!n)return t;const i=getComputedStyle(n);for(const o of B$){const r=i.getPropertyValue(o).trim();r&&(t[o]=r)}return t}function Hd(e,t,n,i,o){return a.jsx("span",{className:`${e}-link-text-box`,style:{width:o(n),maxWidth:"100%"},children:a.jsx("span",{className:i?`${e}-link-text-inner`:`${e}-link-text-inner-hidden`,style:{width:"100%"},children:t})})}function V$({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,activeEvent:o,currentState:r,isSwitchClone:l=!1,unavailableStates:c=[],layoutId:d,pages:u,onLinkNavigate:p,onUpdateSettings:v,onOpenChange:b}){var tc;const{prefix:m}=k.useScopedStyles(),h=s.useRef(null),x=s.useRef(null),S=s.useRef(null),P=s.useRef(null),f=s.useRef(null),w=s.useRef(0),N=s.useRef(null),V=s.useRef(null),B=s.useRef(d),H=s.useMemo(()=>k$(m),[m]),[_,z]=s.useState(!1),[$,E]=s.useState(!1),[j,L]=s.useState(!1),C=s$(r),T=s.useMemo(()=>new Set(c),[c]),G=kt=>!!(kt&&T.has(kt)),Y=!!(t&&!i&&C==="open"&&!G("open"))||!(t&&!i)&&_,R=!!(t&&!i),y=Y&&!R;jl(y),s.useEffect(()=>{if(!Y||!R)return;const kt=document.documentElement,Yt=kt.style.overflow;return kt.style.overflow="hidden",()=>{kt.style.overflow=Yt}},[Y,R]);const U=!G("compact")&&!G("onScroll"),ee=!t||!!i&&!n,de=o&&o!=="default"?o:void 0,F=U&&C==="compact"?"compact":"default",[ie,I]=s.useState(F),[se,J]=s.useState(!1),Se=!n;F!==ie&&(I(F),Se&&J(!0));const Re=Fp(e),{logo:pe,logoMaxHeight:he=120/1440,logoPosition:te="left",panelHeight:le=60/1440,backgroundColor:re="#b3b3b3",logoColor:fe="#000000",position:xe,horizontalAlign:Te,verticalAlign:me,iconColor:be="#000000",showIcon:we="on",iconSize:g=16/1440,linkColor:X="#000000",openLinkColor:Z="#000000",compactIconColor:ne="#000000",compactLinkColor:ye="#000000",compactLogoColor:K="#000000",compactBackgroundColor:D="#ffffff",compactLogoMaxHeight:ce=120/1440,compactLogoPosition:q,compactPanelHeight:ue=60/1440,compactShowIcon:W="on",compactIconSize:Le=16/1440,compactNavTextWidth:ae,compactNavTextPosition:Q,compactNavTextOffset:Ne,compactNavGap:Oe,compactNavPaddingLeft:it=10/1440,compactNavPaddingRight:qe=10/1440,compactFontFamily:Je,compactFontSettings:ot,compactFontSize:Ve,compactLineHeight:ve,compactLetterSpacing:Fe=0,compactWordSpacing:Xe=0,compactTextAlign:Ye="left",compactTextAppearance:Pe,openLogoColor:_e="#000000",menuBackgroundColor:Ke="#ffffff",overlayColor:Ze="rgba(0, 0, 0, 0.45)",closeButtonColor:st="#000000",effect:Ue="fade",openPanelSize:De=100,textWidth:ke=280/1440,navTextWidth:ht,navTextPosition:Be="center",navTextOffset:ze=0,gap:We=0,navGap:mt,navPaddingLeft:rt=10/1440,navPaddingRight:St=10/1440,textPaddingLeft:Nt=10/1440,textPaddingRight:jt=10/1440,textPaddingTop:xt=10/1440,textPaddingBottom:Ce=10/1440,fontFamily:He,fontSettings:lt,fontSize:et,lineHeight:yt,letterSpacing:Rt=0,wordSpacing:At=0,textAlign:qt="left",textAppearance:$t,openFontFamily:zt,openFontSettings:on,openFontSize:vt,openLineHeight:ft,openLetterSpacing:Me,openWordSpacing:nt,openTextAlign:ct,openTextAppearance:gt,stateOverrides:Et,link:wt}=Re,{horizontalAlign:dt,verticalAlign:Ot}=w$({position:xe,horizontalAlign:Te,verticalAlign:me}),Lt=F==="compact",Ht=Lt?ce:he,Gt=l$(Lt?q:te),_t=Lt?ue:le,Vt=Lt?Le:g,Dt=Lt?ae:ht,Ct=c$(Lt?Q:Be),O=(Lt?Ne:ze)??0,Ie=Lt?Oe:mt,je=Lt?it:rt,Ae=Lt?qe:St,tt=Dt??ke,Mt=Y||(Lt?W:we)!=="off",ut=k.buildColorVars(m,{iconColor:be,closeButtonColor:st,linkColor:X,openLinkColor:Z,compactIconColor:ne,compactLinkColor:ye,compactLogoColor:K,compactBackgroundColor:D,openLogoColor:_e,menuBackgroundColor:Ke,overlayColor:Ze,backgroundColor:re,logoColor:fe},P$,R$,Et),Tt=Ed(Lt?{fontFamily:Je,fontSettings:ot,fontSize:Ve,lineHeight:ve,letterSpacing:Fe,wordSpacing:Xe,textAlign:Ye,textAppearance:Pe}:{fontFamily:He,fontSettings:lt,fontSize:et,lineHeight:yt,letterSpacing:Rt,wordSpacing:At,textAlign:qt,textAppearance:$t}),Ut=Ed({fontFamily:zt,fontSettings:on,fontSize:vt,lineHeight:ft,letterSpacing:Me,wordSpacing:nt,textAlign:ct,textAppearance:gt},Tt),Wt=kd(m,Tt,t),an=kd(m,Ut,t),cn=Ld(S,Rd(Tt)),qn=Ld(P,Rd(Ut)),Yn={...an.css,whiteSpace:"pre-wrap",transform:Pd(qn)},Qi=an.className,hn=kt=>k.scalingValue(kt,t),Vo=Ie??We,Go=Math.max(je,go),xn=Math.max(Ae,go),di=Math.max(0,1-Vt),Zi=Math.max(0,1-Vt),bn=n??!1,Kn=bn&&!Y,Ji=s.useMemo(()=>Ap({textPaddingLeft:Nt,textPaddingRight:jt,textPaddingTop:xt,textPaddingBottom:Ce,fontSize:Ut.fontSize}),[Nt,jt,xt,Ce,Ut.fontSize]),eo=kt=>{const Yt=a.jsx("span",{className:Qi,style:Yn,children:Ad(kt)});return Hd(m,Yt,ke,bn,hn)},Qe=Ue==="left"||Ue==="right"?{width:`${De}%`}:{height:`${De}%`},M={...I$(Ji,t),...Qe,alignItems:E$[dt],justifyContent:M$[Ot]},oe=s.useRef(e),ge=s.useRef(d),Ee=s.useRef(null);Zs((tc=e.logo)==null?void 0:tc.icon)&&(Ee.current=e.logo.icon),s.useEffect(()=>{var Nr;if(!v||!t){oe.current=e,ge.current=d;return}const kt=(Nr=e.logo)==null?void 0:Nr.icon;if(e.logo&&!Zs(kt)&&!Ee.current){oe.current=e,ge.current=d;return}const Yt=_r=>{v(A$(_r,Ee.current))};if(ge.current!==d){oe.current=e,ge.current=d;const _r=Nd(e);_r!==e&&Yt(_r);return}const ln=Nd(e),fn=oe.current,Sn=fn!==e,kn=Sn?T$(ln,fn):ln;oe.current=e;const to=ln!==e,Uo=Sn&&$$(ln,kn);!to&&!Uo||Yt(kn)},[e,v,t,d]);const Ge=k.scalingValue(Vt,t),pt={width:Ge,height:Ge,minWidth:Ge,minHeight:Ge,maxWidth:Ge,maxHeight:Ge},Ft={...Wt.css,textDecoration:"none",transform:Pd(cn)},Xt=Wt.className,rn=(pe==null?void 0:pe.mode)!=="Off",Zt=(pe==null?void 0:pe.icon)??"",ui=_$(Zt),En=H$(Zt,ui),Qn=!!En,kr=hn(Math.min(Ht,_t)),Xo=!!(rn&&Zt&&Gt==="right")?"left":"right",Ql=Array.isArray(wt)?wt:[],Ga=[F!=="default"?`${m}-state-${F}`:"",Y||C==="open"?`${m}-state-open`:"",de&&de!==F&&de!==C?`${m}-state-${de}`:""].filter(Boolean).join(" "),Xp=t&&!i?`${m}-editor`:"",Zl=ee?`${m}-interactive`:"",Up=Se&&(F!==ie||se)?`${m}-nav-state-anim`:"",qp=Y?`${m}-open`:"",Yp=s.useMemo(()=>j$(h.current),[$,Y,d]),Xa=()=>{z(!1)},Ua=!t||i,Kp=kt=>{if(y){V.current=kt;return}kt()};s.useEffect(()=>{if(Y)return;const kt=V.current;V.current=null,kt==null||kt()},[Y]);const Jl=(kt,Yt)=>{D$(kt,Xa,{isEditor:t,isPreviewMode:i,item:Yt,pages:u,onLinkNavigate:p,runAfterClose:Kp})},Qp=()=>{t&&!i||z(kt=>!kt)},Zp=kt=>{kt.pointerType==="touch"&&kt.currentTarget.blur()},Ar=()=>{N.current!==null&&(window.clearTimeout(N.current),N.current=null)};s.useEffect(()=>{if(!se)return;const kt=window.setTimeout(()=>{J(!1)},tn);return()=>window.clearTimeout(kt)},[se,F]),s.useEffect(()=>{if(Y){Ar(),E(!0);return}return w.current+=1,L(!1),Ar(),N.current=window.setTimeout(()=>{N.current=null,E(!1)},Cn),Ar},[Y]),s.useLayoutEffect(()=>{B.current!==d&&(B.current=d,w.current+=1,Ar(),z(!1),L(!1),E(!1))},[d]),s.useLayoutEffect(()=>{var ln;if(!$||!Y)return;const kt=w.current+1;w.current=kt,L(!1),(ln=x.current)==null||ln.offsetHeight;const Yt=requestAnimationFrame(()=>{w.current===kt&&L(!0)});return()=>{cancelAnimationFrame(Yt)}},[$,Y]),s.useLayoutEffect(()=>{if(!y||!$)return;const kt=f.current;if(!kt)return;const Yt=getComputedStyle(kt).backgroundColor;if(!Yt)return;const ln=document.documentElement,{body:fn}=document,Sn=ln.style.backgroundColor,kn=fn.style.backgroundColor;return ln.style.backgroundColor=Yt,fn.style.backgroundColor=Yt,()=>{ln.style.backgroundColor=Sn,fn.style.backgroundColor=kn}},[y,$,Ga,Ke,Et]),s.useEffect(()=>{b==null||b(Y)},[Y,b]),s.useEffect(()=>{if(!Y)return;const kt=Yt=>{Yt.key==="Escape"&&(t&&i||Xa())};return window.addEventListener("keydown",kt),()=>window.removeEventListener("keydown",kt)},[Y,t,i]),s.useEffect(()=>{t&&!i&&C!=="open"&&z(!1)},[t,i,C]),s.useEffect(()=>{i&&z(!1)},[i]);const ec=bn&&Y,Jp=kt=>Ql.filter(Yt=>m$(Yt,d)).map((Yt,ln)=>{const{label:fn,href:Sn,target:kn}=Qs(Yt,u),to=Sn?a.jsx("a",{href:Sn,target:kn,rel:kn==="_blank"?"noopener noreferrer":void 0,className:`${kt} ${m}-has-href`,onClick:Uo=>Jl(Uo,Yt),children:eo(fn)}):a.jsx("span",{className:kt,children:eo(fn)});return a.jsxs(s.Fragment,{children:[ln>0&&a.jsx("div",{"data-controls":ec?"gap":void 0,"data-controls-axis":"y",className:ec?`${m}-gap-control`:void 0,style:{height:hn(We)}}),to]},ln)}),em=$?a.jsxs("div",{ref:x,"data-selection":"none",className:[`${m}-lightbox`,`${m}-full-lightbox ${m}-effect-${Ue}`,j?`${m}-lightbox-active`:"",`${m}-lightbox-editor`,n?`${m}-lightbox-edit-mode`:"",Zl,Ga].filter(Boolean).join(" "),style:{...ut,...Yp},"aria-hidden":!j,children:[a.jsx("div",{className:[`${m}-backdrop`,Ua?`${m}-backdrop-clickable`:""].filter(Boolean).join(" "),"aria-hidden":"true",onClick:Ua?Xa:void 0}),a.jsxs("nav",{className:[`${m}-panel`,Ua?`${m}-panel-blocking`:""].filter(Boolean).join(" "),style:M,"aria-label":"Menu","data-lightbox-scrollable":"",children:[bn&&L$(m,Ji,Ut.fontSize,hn),Jp(`${m}-link`)]}),y?a.jsx("div",{ref:f,className:`${m}-safari-tint`,"aria-hidden":"true"}):null]}):null,tm=()=>a.jsx("button",{type:"button",className:`${m}-toggle`,onClick:Qp,onPointerUp:Zp,"aria-expanded":Y,"aria-label":Y?"Close menu":"Open menu",children:a.jsx(f$,{className:`${m}-icon`,lineClassName:`${m}-icon-line`})}),Fr=kt=>{const Yt=kt==="left",ln=Yt?je:Ae,fn=Yt?Go:xn,Sn=Yt?di:Zi,kn=Lt?Yt?"compactNavPaddingLeft":"compactNavPaddingRight":Yt?"navPaddingLeft":"navPaddingRight";return a.jsx("div",{className:Yt?`${m}-nav-padding-left`:`${m}-nav-padding-right`,style:{width:hn(ln),flexShrink:0},children:Kn?a.jsx("div",{"data-controls":kn,"data-controls-axis":"x","data-controls-variant":"column-padding",...Yt?{}:{"data-controls-reverse":""},"data-controls-min":"0","data-controls-max-fraction":String(Sn),className:`${m}-control-anchor`,style:{top:0,[Yt?"left":"right"]:0,width:hn(fn),height:"100%"}}):null})},nm=(kt,Yt)=>{const{label:ln,href:fn,target:Sn}=Qs(kt,u),kn=a.jsx("span",{className:Xt,style:Ft,children:Ad(ln)}),to=Hd(m,kn,tt,Kn,hn),Uo=fn?a.jsx("a",{href:fn,target:Sn,rel:Sn==="_blank"?"noopener noreferrer":void 0,className:`${m}-nav-link ${m}-has-href`,onClick:Nr=>Jl(Nr,kt),children:to}):a.jsx("span",{className:`${m}-nav-link`,children:to});return a.jsxs(s.Fragment,{children:[Yt>0&&a.jsx("div",{"data-controls":Kn?Lt?"compactNavGap":"navGap":void 0,"data-controls-axis":"x",className:Kn?`${m}-gap-control ${m}-nav-gap-control`:`${m}-nav-gap-control}`,style:{width:hn(Vo),flexShrink:0}}),Uo]},Yt)},im={...ut,height:k.scalingValue(_t,t),minHeight:k.scalingValue(_t,t),[`--${m}-panel-height`]:k.scalingValue(_t,t)},om=l&&F==="default"&&C!=="open"&&!i?hn(le+o$):"0px";return a.jsxs("div",{ref:h,className:`${m}-root ${Ga} ${Xp} ${Zl} ${Up}`.trim(),style:{width:"100%",height:"100%",lineHeight:0,fontSize:0,marginTop:om,...ut},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:H}}),a.jsx("span",{ref:S,"aria-hidden":!0,style:Md(Wt.css),children:"H"}),a.jsx("span",{ref:P,"aria-hidden":!0,style:Md(an.css),children:"H"}),a.jsx("div",{className:`${m}-nav-slide`,children:a.jsxs("div",{className:`${m}-nav-bar`,style:im,children:[rn&&Zt?a.jsxs("div",{className:`${m}-nav-logo ${m}-nav-logo-${Gt}`,children:[Gt==="left"?Fr("left"):null,a.jsxs("div",{className:`${m}-nav-logo-inner${Qn?` ${m}-nav-logo-tinted`:""}`,style:{height:kr,...Qn&&En?{[`--${m}-logo-image`]:F$(En)}:{}},children:[a.jsx("img",{src:Qn&&En?En:Zt,alt:"",className:`${m}-nav-logo-img`}),Qn?a.jsx("span",{className:`${m}-nav-logo-tint`,"aria-hidden":"true"}):null]}),Gt==="right"?Fr("right"):null]}):null,a.jsx("nav",{className:`${m}-nav-links ${m}-nav-links-${Ct}`,style:{transform:d$(Ct,O,t)},"aria-label":"Navigation",children:a.jsx("div",{className:`${m}-nav-links-inner`,children:Ql.filter(kt=>p$(kt,F,d)).map((kt,Yt)=>nm(kt,Yt))})})]})}),em,a.jsxs("div",{className:`${m}-nav-toggle-wrap ${m}-nav-toggle-wrap-${Xo}`,children:[Xo==="left"?Fr("left"):null,Mt?a.jsx("div",{className:`${m}-root ${qp}`.trim(),style:pt,children:tm()}):null,Xo==="right"?Fr("right"):null]})]})}const G$=`import { Fragment, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type MouseEvent, type PointerEvent, type ReactNode } from 'react';
|
|
24689
|
+
`}function Qs(e){return e?!e.startsWith("http://")&&!e.startsWith("https://")&&!e.startsWith("blob:")&&!e.startsWith("data:"):!1}function O$(e,t){var i;const n=(i=e.logo)==null?void 0:i.icon;return!e.logo||Qs(n)||!t?e:{...e,logo:{...e.logo,icon:t}}}function D$(e){return`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`}function B$(e){const t=e.trim().toLowerCase();return t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")?!0:t.includes(".svg")}function z$(e){const t=B$(e),[n,i]=s.useState(!1);return s.useEffect(()=>{if(t||!e.startsWith("blob:")){i(!1);return}let o=!1;return fetch(e).then(r=>r.blob()).then(async r=>{if(o)return;if(r.type.includes("svg")){i(!0);return}if(r.type.startsWith("image/")&&!r.type.includes("svg")){i(!1);return}const l=await r.text();o||i(/<svg[\s>]/i.test(l.trim()))}).catch(()=>{o||i(!1)}),()=>{o=!0}},[t,e]),t||n}function j$(e,t){const[n,i]=s.useState(yr(e)?e:null);return s.useEffect(()=>{if(!t||!e){i(null);return}if(yr(e)){i(e);return}let o=!1;return Uu(e).then(r=>{o||i(r)}).catch(()=>{o||i(null)}),()=>{o=!0}},[t,e]),t?n:null}function V$(e){const t=e.indexOf("#");if(t===-1)return"";try{return decodeURIComponent(e.slice(t+1))}catch{return e.slice(t+1)}}function G$(e){if(!e||e.startsWith("#"))return!0;try{return new URL(e,window.location.href).pathname===window.location.pathname}catch{return!1}}function Bp(e){if(!e)return null;const t=document.getElementById(e),n=document.querySelector(`[data-section-id="${CSS.escape(e)}"]`),i=t??n;return i instanceof HTMLElement?i:null}function _d(e){const t=Bp(e);return t?(t.scrollIntoView({behavior:"smooth",block:"start"}),!0):!1}function X$(e,t,n={}){const{isEditor:i,isPreviewMode:o,item:r,pages:l,onLinkNavigate:c}=n,d=n.runAfterClose??(x=>x()),u=e.currentTarget.getAttribute("href")??"",p=V$(u),v=e.currentTarget.target==="_blank";if(r&&c){e.preventDefault(),e.stopPropagation();const x=Ks(r,l),m=_p(r),h={mode:m.type==="url"?"url":"page",href:x.href||u,page:m.type==="page"?m.value:void 0,url:m.type==="url"?m.value:void 0,anchor:m.type==="anchor"?m.value.replace(/^#/,""):(m.anchor??"").replace(/^#/,""),target:x.target};h.target==="_blank"?c(h):d(()=>c(h)),t();return}if(i){e.preventDefault(),d(()=>_d(p)),t();return}!v&&p&&G$(u)&&Bp(p)&&(e.preventDefault(),d(()=>_d(p))),t()}const q$=["--cntrl-article-width","--cntrl-article-top","--cntrl-article-left","--cntrl-viewport-height"];function U$(e){let t=e;for(;t;){if(getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim())return t;t=t.parentElement}return e}function Y$(e){const t={},n=U$(e);if(!n)return t;const i=getComputedStyle(n);for(const o of q$){const r=i.getPropertyValue(o).trim();r&&(t[o]=r)}return t}function Hd(e,t,n,i,o){return a.jsx("span",{className:`${e}-link-text-box`,style:{width:o(n),maxWidth:"100%"},children:a.jsx("span",{className:i?`${e}-link-text-inner`:`${e}-link-text-inner-hidden`,style:{width:"100%"},children:t})})}function K$({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,activeEvent:o,currentState:r,isSwitchClone:l=!1,unavailableStates:c=[],layoutId:d,pages:u,onLinkNavigate:p,onUpdateSettings:v,onOpenChange:x}){var tc;const{prefix:m}=A.useScopedStyles(),h=s.useRef(null),b=s.useRef(null),S=s.useRef(null),M=s.useRef(null),y=s.useRef(null),$=s.useRef(0),R=s.useRef(null),X=s.useRef(null),B=s.useRef(d),O=s.useMemo(()=>W$(m),[m]),[N,z]=s.useState(!1),[C,I]=s.useState(!1),[j,E]=s.useState(!1),w=m$(r),L=s.useMemo(()=>new Set(c),[c]),V=Ft=>!!(Ft&&L.has(Ft)),K=!!(t&&!i&&w==="open"&&!V("open"))||!(t&&!i)&&N,P=!!(t&&!i),f=K&&!P;jl(f),s.useEffect(()=>{if(!K||!P)return;const Ft=document.documentElement,Kt=Ft.style.overflow;return Ft.style.overflow="hidden",()=>{Ft.style.overflow=Kt}},[K,P]);const U=!V("compact")&&!V("onScroll"),te=!t||!!i&&!n,ce=o&&o!=="default"?o:void 0,F=U&&w==="compact"?"compact":"default",[ie,T]=s.useState(F),[le,J]=s.useState(!1),Se=!n;F!==ie&&(T(F),Se&&J(!0));const Le=Dp(e),{logo:me,logoMaxHeight:ye=120/1440,logoPosition:ee="left",panelHeight:oe=60/1440,backgroundColor:re="#b3b3b3",logoColor:ge="#000000",position:we,horizontalAlign:Ae,verticalAlign:fe,iconColor:ve="#000000",showIcon:xe="on",iconSize:g=16/1440,linkColor:G="#000000",openLinkColor:Q="#000000",compactIconColor:ne="#000000",compactLinkColor:ue="#000000",compactLogoColor:q="#000000",compactBackgroundColor:D="#ffffff",compactLogoMaxHeight:se=120/1440,compactLogoPosition:Y,compactPanelHeight:pe=60/1440,compactShowIcon:H="on",compactIconSize:Ie=16/1440,compactNavTextWidth:de,compactNavTextPosition:Z,compactNavTextOffset:Ne,compactNavGap:Oe,compactNavPaddingLeft:Je=10/1440,compactNavPaddingRight:De=10/1440,compactFontFamily:Ze,compactFontSettings:at,compactFontSize:Xe,compactLineHeight:be,compactLetterSpacing:He=0,compactWordSpacing:je=0,compactTextAlign:Qe="left",compactTextAppearance:Ce,openLogoColor:_e="#000000",menuBackgroundColor:Ue="#ffffff",overlayColor:Ye="rgba(0, 0, 0, 0.45)",closeButtonColor:lt="#000000",effect:it="fade",openPanelSize:qe=100,textWidth:Ee=280/1440,navTextWidth:pt,navTextPosition:ke="center",navTextOffset:We=0,gap:Ve=0,navGap:ct,navPaddingLeft:ot=10/1440,navPaddingRight:xt=10/1440,textPaddingLeft:Pt=10/1440,textPaddingRight:Vt=10/1440,textPaddingTop:vt=10/1440,textPaddingBottom:Mt=10/1440,fontFamily:Ht,fontSettings:Gt,fontSize:kt,lineHeight:Pe,letterSpacing:Be=0,wordSpacing:ft=0,textAlign:$t="left",textAppearance:et,openFontFamily:Et,openFontSettings:Xt,openFontSize:mt,openLineHeight:gt,openLetterSpacing:Re,openWordSpacing:tt,openTextAlign:nt,openTextAppearance:st,stateOverrides:At,link:St}=Le,{horizontalAlign:ht,verticalAlign:Dt}=P$({position:we,horizontalAlign:Ae,verticalAlign:fe}),Ct=F==="compact",qt=Ct?se:ye,jt=g$(Ct?Y:ee),Nt=Ct?pe:oe,Bt=Ct?Ie:g,Wt=Ct?de:pt,wt=h$(Ct?Z:ke),W=(Ct?Ne:We)??0,Te=Ct?Oe:ct,ze=Ct?Je:ot,Fe=Ct?De:xt,yt=Wt??Ee,Ot=K||(Ct?H:xe)!=="off",ut=A.buildColorVars(m,{iconColor:ve,closeButtonColor:lt,linkColor:G,openLinkColor:Q,compactIconColor:ne,compactLinkColor:ue,compactLogoColor:q,compactBackgroundColor:D,openLogoColor:_e,menuBackgroundColor:Ue,overlayColor:Ye,backgroundColor:re,logoColor:ge},F$,N$,At),Tt=Ed(Ct?{fontFamily:Ze,fontSettings:at,fontSize:Xe,lineHeight:be,letterSpacing:He,wordSpacing:je,textAlign:Qe,textAppearance:Ce}:{fontFamily:Ht,fontSettings:Gt,fontSize:kt,lineHeight:Pe,letterSpacing:Be,wordSpacing:ft,textAlign:$t,textAppearance:et}),Yt=Ed({fontFamily:Et,fontSettings:Xt,fontSize:mt,lineHeight:gt,letterSpacing:Re,wordSpacing:tt,textAlign:nt,textAppearance:st},Tt),It=kd(m,Tt,t),Zt=kd(m,Yt,t),on=Ld(S,Rd(Tt)),Wn=Ld(M,Rd(Yt)),xn={...Zt.css,whiteSpace:"pre-wrap",transform:Pd(Wn)},ui=Zt.className,dn=Ft=>A.scalingValue(Ft,t),pi=Te??Ve,Kn=Math.max(ze,fo),bn=Math.max(Fe,fo),mi=Math.max(0,1-Bt),eo=Math.max(0,1-Bt),Sn=n??!1,Qn=Sn&&!K,to=s.useMemo(()=>Op({textPaddingLeft:Pt,textPaddingRight:Vt,textPaddingTop:vt,textPaddingBottom:Mt,fontSize:Yt.fontSize}),[Pt,Vt,vt,Mt,Yt.fontSize]),no=Ft=>{const Kt=a.jsx("span",{className:ui,style:xn,children:Ad(Ft)});return Hd(m,Kt,Ee,Sn,dn)},Ke=it==="left"||it==="right"?{width:`${qe}%`}:{height:`${qe}%`},k={...k$(to,t),...Ke,alignItems:H$[ht],justifyContent:_$[Dt]},ae=s.useRef(e),he=s.useRef(d),Me=s.useRef(null);Qs((tc=e.logo)==null?void 0:tc.icon)&&(Me.current=e.logo.icon),s.useEffect(()=>{var Nr;if(!v||!t){ae.current=e,he.current=d;return}const Ft=(Nr=e.logo)==null?void 0:Nr.icon;if(e.logo&&!Qs(Ft)&&!Me.current){ae.current=e,he.current=d;return}const Kt=_r=>{v(O$(_r,Me.current))};if(he.current!==d){ae.current=e,he.current=d;const _r=Nd(e);_r!==e&&Kt(_r);return}const cn=Nd(e),fn=ae.current,wn=fn!==e,An=wn?E$(cn,fn):cn;ae.current=e;const io=cn!==e,qo=wn&&R$(cn,An);!io&&!qo||Kt(An)},[e,v,t,d]);const Ge=A.scalingValue(Bt,t),dt={width:Ge,height:Ge,minWidth:Ge,minHeight:Ge,maxWidth:Ge,maxHeight:Ge},_t={...It.css,textDecoration:"none",transform:Pd(on)},Ut=It.className,sn=(me==null?void 0:me.mode)!=="Off",en=(me==null?void 0:me.icon)??"",gi=z$(en),kn=j$(en,gi),Zn=!!kn,kr=dn(Math.min(qt,Nt)),Xo=!!(sn&&en&&jt==="right")?"left":"right",Ql=Array.isArray(St)?St:[],Ga=[F!=="default"?`${m}-state-${F}`:"",K||w==="open"?`${m}-state-open`:"",ce&&ce!==F&&ce!==w?`${m}-state-${ce}`:""].filter(Boolean).join(" "),Zp=t&&!i?`${m}-editor`:"",Zl=te?`${m}-interactive`:"",Jp=Se&&(F!==ie||le)?`${m}-nav-state-anim`:"",em=K?`${m}-open`:"",tm=s.useMemo(()=>Y$(h.current),[C,K,d]),Xa=()=>{z(!1)},qa=!t||i,nm=Ft=>{if(f){X.current=Ft;return}Ft()};s.useEffect(()=>{if(K)return;const Ft=X.current;X.current=null,Ft==null||Ft()},[K]);const Jl=(Ft,Kt)=>{X$(Ft,Xa,{isEditor:t,isPreviewMode:i,item:Kt,pages:u,onLinkNavigate:p,runAfterClose:nm})},im=()=>{t&&!i||z(Ft=>!Ft)},om=Ft=>{Ft.pointerType==="touch"&&Ft.currentTarget.blur()},Ar=()=>{R.current!==null&&(window.clearTimeout(R.current),R.current=null)};s.useEffect(()=>{if(!le)return;const Ft=window.setTimeout(()=>{J(!1)},rn);return()=>window.clearTimeout(Ft)},[le,F]),s.useEffect(()=>{if(K){Ar(),I(!0);return}return $.current+=1,E(!1),Ar(),R.current=window.setTimeout(()=>{R.current=null,I(!1)},Tn),Ar},[K]),s.useLayoutEffect(()=>{B.current!==d&&(B.current=d,$.current+=1,Ar(),z(!1),E(!1),I(!1))},[d]),s.useLayoutEffect(()=>{var cn;if(!C||!K)return;const Ft=$.current+1;$.current=Ft,E(!1),(cn=b.current)==null||cn.offsetHeight;const Kt=requestAnimationFrame(()=>{$.current===Ft&&E(!0)});return()=>{cancelAnimationFrame(Kt)}},[C,K]),s.useLayoutEffect(()=>{if(!f||!C)return;const Ft=y.current;if(!Ft)return;const Kt=getComputedStyle(Ft).backgroundColor;if(!Kt)return;const cn=document.documentElement,{body:fn}=document,wn=cn.style.backgroundColor,An=fn.style.backgroundColor;return cn.style.backgroundColor=Kt,fn.style.backgroundColor=Kt,()=>{cn.style.backgroundColor=wn,fn.style.backgroundColor=An}},[f,C,Ga,Ue,At]),s.useEffect(()=>{x==null||x(K)},[K,x]),s.useEffect(()=>{if(!K)return;const Ft=Kt=>{Kt.key==="Escape"&&(t&&i||Xa())};return window.addEventListener("keydown",Ft),()=>window.removeEventListener("keydown",Ft)},[K,t,i]),s.useEffect(()=>{t&&!i&&w!=="open"&&z(!1)},[t,i,w]),s.useEffect(()=>{i&&z(!1)},[i]);const ec=Sn&&K,rm=Ft=>Ql.filter(Kt=>x$(Kt,d)).map((Kt,cn)=>{const{label:fn,href:wn,target:An}=Ks(Kt,u),io=wn?a.jsx("a",{href:wn,target:An,rel:An==="_blank"?"noopener noreferrer":void 0,className:`${Ft} ${m}-has-href`,onClick:qo=>Jl(qo,Kt),children:no(fn)}):a.jsx("span",{className:Ft,children:no(fn)});return a.jsxs(s.Fragment,{children:[cn>0&&a.jsx("div",{"data-controls":ec?"gap":void 0,"data-controls-axis":"y",className:ec?`${m}-gap-control`:void 0,style:{height:dn(Ve)}}),io]},cn)}),am=C?a.jsxs("div",{ref:b,"data-selection":"none",className:[`${m}-lightbox`,`${m}-full-lightbox ${m}-effect-${it}`,j?`${m}-lightbox-active`:"",`${m}-lightbox-editor`,n?`${m}-lightbox-edit-mode`:"",Zl,Ga].filter(Boolean).join(" "),style:{...ut,...tm},"aria-hidden":!j,children:[a.jsx("div",{className:[`${m}-backdrop`,qa?`${m}-backdrop-clickable`:""].filter(Boolean).join(" "),"aria-hidden":"true",onClick:qa?Xa:void 0}),a.jsxs("nav",{className:[`${m}-panel`,qa?`${m}-panel-blocking`:""].filter(Boolean).join(" "),style:k,"aria-label":"Menu","data-lightbox-scrollable":"",children:[Sn&&A$(m,to,Yt.fontSize,dn),rm(`${m}-link`)]}),f?a.jsx("div",{ref:y,className:`${m}-safari-tint`,"aria-hidden":"true"}):null]}):null,sm=()=>a.jsx("button",{type:"button",className:`${m}-toggle`,onClick:im,onPointerUp:om,"aria-expanded":K,"aria-label":K?"Close menu":"Open menu",children:a.jsx(w$,{className:`${m}-icon`,lineClassName:`${m}-icon-line`})}),Fr=Ft=>{const Kt=Ft==="left",cn=Kt?ze:Fe,fn=Kt?Kn:bn,wn=Kt?mi:eo,An=Ct?Kt?"compactNavPaddingLeft":"compactNavPaddingRight":Kt?"navPaddingLeft":"navPaddingRight";return a.jsx("div",{className:Kt?`${m}-nav-padding-left`:`${m}-nav-padding-right`,style:{width:dn(cn),flexShrink:0},children:Qn?a.jsx("div",{"data-controls":An,"data-controls-axis":"x","data-controls-variant":"column-padding",...Kt?{}:{"data-controls-reverse":""},"data-controls-min":"0","data-controls-max-fraction":String(wn),className:`${m}-control-anchor`,style:{top:0,[Kt?"left":"right"]:0,width:dn(fn),height:"100%"}}):null})},lm=(Ft,Kt)=>{const{label:cn,href:fn,target:wn}=Ks(Ft,u),An=a.jsx("span",{className:Ut,style:_t,children:Ad(cn)}),io=Hd(m,An,yt,Qn,dn),qo=fn?a.jsx("a",{href:fn,target:wn,rel:wn==="_blank"?"noopener noreferrer":void 0,className:`${m}-nav-link ${m}-has-href`,onClick:Nr=>Jl(Nr,Ft),children:io}):a.jsx("span",{className:`${m}-nav-link`,children:io});return a.jsxs(s.Fragment,{children:[Kt>0&&a.jsx("div",{"data-controls":Qn?Ct?"compactNavGap":"navGap":void 0,"data-controls-axis":"x",className:Qn?`${m}-gap-control ${m}-nav-gap-control`:`${m}-nav-gap-control}`,style:{width:dn(pi),flexShrink:0}}),qo]},Kt)},cm={...ut,height:A.scalingValue(Nt,t),minHeight:A.scalingValue(Nt,t),[`--${m}-panel-height`]:A.scalingValue(Nt,t)},dm=l&&F==="default"&&w!=="open"&&!i?dn(oe+d$):"0px";return a.jsxs("div",{ref:h,className:`${m}-root ${Ga} ${Zp} ${Zl} ${Jp}`.trim(),style:{width:"100%",height:"100%",lineHeight:0,fontSize:0,marginTop:dm,...ut},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:O}}),a.jsx("span",{ref:S,"aria-hidden":!0,style:Md(It.css),children:"H"}),a.jsx("span",{ref:M,"aria-hidden":!0,style:Md(Zt.css),children:"H"}),a.jsx("div",{className:`${m}-nav-slide`,children:a.jsxs("div",{className:`${m}-nav-bar`,style:cm,children:[sn&&en?a.jsxs("div",{className:`${m}-nav-logo ${m}-nav-logo-${jt}`,children:[jt==="left"?Fr("left"):null,a.jsxs("div",{className:`${m}-nav-logo-inner${Zn?` ${m}-nav-logo-tinted`:""}`,style:{height:kr,...Zn&&kn?{[`--${m}-logo-image`]:D$(kn)}:{}},children:[a.jsx("img",{src:Zn&&kn?kn:en,alt:"",className:`${m}-nav-logo-img`}),Zn?a.jsx("span",{className:`${m}-nav-logo-tint`,"aria-hidden":"true"}):null]}),jt==="right"?Fr("right"):null]}):null,a.jsx("nav",{className:`${m}-nav-links ${m}-nav-links-${wt}`,style:{transform:f$(wt,W,t)},"aria-label":"Navigation",children:a.jsx("div",{className:`${m}-nav-links-inner`,children:Ql.filter(Ft=>v$(Ft,F,d)).map((Ft,Kt)=>lm(Ft,Kt))})})]})}),am,a.jsxs("div",{className:`${m}-nav-toggle-wrap ${m}-nav-toggle-wrap-${Xo}`,children:[Xo==="left"?Fr("left"):null,Ot?a.jsx("div",{className:`${m}-root ${em}`.trim(),style:dt,children:sm()}):null,Xo==="right"?Fr("right"):null]})]})}const Q$=`import { Fragment, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type MouseEvent, type PointerEvent, type ReactNode } from 'react';
|
|
24690
24690
|
import { CommonComponentProps } from '../props';
|
|
24691
24691
|
import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
|
|
24692
24692
|
import { useLightboxScrollLock } from '../utils/useLightboxScrollLock';
|
|
@@ -27327,7 +27327,8 @@ export function Burger({
|
|
|
27327
27327
|
</div>
|
|
27328
27328
|
);
|
|
27329
27329
|
}
|
|
27330
|
-
`;function tr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Di={fontSettings:{type:"object",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function yi(e,t){return e?`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`:t}function Ul(e){return{[yi(e,"fontFamily")]:{type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},[yi(e,"fontSettings")]:{...Di.fontSettings,scope:"common",title:""},[yi(e,"fontSize")]:{...Di.fontSize,scope:"layout",title:""},[yi(e,"lineHeight")]:{...Di.lineHeight,scope:"layout",title:""},[yi(e,"letterSpacing")]:{...Di.letterSpacing,scope:"layout",title:""},[yi(e,"wordSpacing")]:{...Di.wordSpacing,scope:"layout",title:""},[yi(e,"textAlign")]:{...Di.textAlign,scope:"layout",title:""},[yi(e,"textAppearance")]:{...Di.textAppearance,scope:"layout",title:""}}}const X$=Ul(""),U$=Ul("open"),q$=Ul("compact"),Y$=["__componentName__",{type:"row",items:["panelHeight","navTextWidth"]},{type:"row",title:"",items:["navTextPosition","navTextOffset"]},{type:"row",title:"Logo",items:["logoMaxHeight","logoPosition"]},{type:"row",title:"Hamburger",items:["iconSize","showIcon"]},"fontFamily","fontSettings",{type:"row",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAlign","textAppearance","navGap","navPaddingLeft","navPaddingRight"],K$=["__componentName__",{type:"row",items:["compactPanelHeight","compactNavTextWidth"]},{type:"row",title:"",items:["compactNavTextPosition","compactNavTextOffset"]},{type:"row",title:"Logo",items:["compactLogoMaxHeight","compactLogoPosition"]},{type:"row",title:"Hamburger",items:["compactIconSize","compactShowIcon"]},"compactFontFamily","compactFontSettings",{type:"row",items:["compactFontSize","compactLineHeight","compactLetterSpacing","compactWordSpacing"]},"compactTextAlign","compactTextAppearance","compactNavGap","compactNavPaddingLeft","compactNavPaddingRight"],Q$=["__componentName__",{type:"row",title:"Text",items:["textWidth","position"]},{type:"row",title:"Menu",items:["openPanelSize","effect"]},"openFontFamily","openFontSettings",{type:"row",items:["openFontSize","openLineHeight","openLetterSpacing","openWordSpacing"]},"openTextAlign","openTextAppearance"],Jn={textTransform:"none",textDecoration:"none",fontVariant:"normal"},Ps={fontWeight:400,fontStyle:"normal"},ea={d:"Always",t:"Open Only",m:"Open Only"},Z$=["left-top","center-top","right-top","left-center","center","right-center","left-bottom","center-bottom","right-bottom"],J$=["iconColor","logoColor","linkColor","backgroundColor"],eC={type:"object",version:1,settings:{sizing:"auto manual",properties:{link:{type:"array",scope:"common",display:{type:"page-url-link"},items:{type:"object",properties:{link:{type:"object",properties:{type:{type:"string",enum:["url","page","anchor"]},value:{type:"string",message:"Paste URL here..."},target:{type:"string",enum:["blank","self"]},anchor:{type:"string"}}},label:{type:"string"},showIn:{type:"string",scope:"layout",enum:["Always","Open Only","Open and Compact","Default and Open","Default and Compact"]}}}},logo:{type:"object",scope:"common",title:"Logo",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Logo",display:{type:"settings-image-input"}}}},logoMaxHeight:{type:"number",scope:"layout",title:"Max Height",display:{type:"numeric-input"},min:0,max:9999},logoPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},compactLogoPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},logoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{default:"Logo Default",hover:"Logo Hover"},display:{type:"palette-color-picker"}},panelHeight:{type:"number",scope:"layout",title:"Menu Height",display:{type:"numeric-input"},min:0,max:9999},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover"},display:{type:"palette-color-picker"}},showIcon:{type:"string",scope:"layout",title:"Show",display:{type:"toggle-cycle",enum:["on","off"]}},iconSize:{type:"number",scope:"layout",title:"Size",display:{type:"numeric-input"},min:0,max:9999},linkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{default:"Text Default",hover:"Text Hover"},display:{type:"palette-color-picker"}},compactShowIcon:{type:"string",scope:"layout",title:"Show",display:{type:"toggle-cycle",enum:["on","off"]}},compactIconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{compact:"Icon Default","compact-hover":"Icon Hover"},display:{type:"palette-color-picker"}},compactLinkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{compact:"Text Default","compact-hover":"Text Hover"},display:{type:"palette-color-picker"}},compactLogoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{compact:"Logo Default","compact-hover":"Logo Hover"},display:{type:"palette-color-picker"}},compactBackgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},openLinkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{open:"Text Default","open-hover":"Text Hover"},display:{type:"palette-color-picker"}},openLogoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{open:"Logo Default","open-hover":"Logo Hover"},display:{type:"palette-color-picker"}},menuBackgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},overlayColor:{type:"string",scope:"common",title:"Overlay Default",display:{type:"palette-color-picker"}},closeButtonColor:{type:"string",scope:"common",title:"Close Default",titleByState:{open:"Close Default","open-hover":"Close Hover"},display:{type:"palette-color-picker"}},effect:{type:"string",scope:"layout",title:"Effect",display:{type:"toggle-cycle",enum:["fade","left","top","right","bottom"]}},openPanelSize:{type:"number",scope:"layout",title:"Height",display:{type:"percentage-input"},min:0,max:100},textWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},navTextWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},navTextPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},navTextOffset:{type:"number",scope:"layout",title:"Offset",display:{type:"numeric-input"},min:-9999,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:[...Z$]}},stateOverrides:{type:"object",scope:"common"},gap:tr("Gap"),navGap:{type:"number",scope:"layout",title:"Nav gap",min:0,max:100,display:{type:"range-control",visible:!1}},navPaddingLeft:{type:"number",scope:"layout",title:"Nav padding left",min:0,max:100,display:{type:"range-control",visible:!1}},navPaddingRight:{type:"number",scope:"layout",title:"Nav padding right",min:0,max:100,display:{type:"range-control",visible:!1}},textPaddingLeft:tr("Text padding left"),textPaddingRight:tr("Text padding right"),textPaddingTop:tr("Text padding top"),textPaddingBottom:tr("Text padding bottom"),compactLogoMaxHeight:{type:"number",scope:"layout",title:"Max Height",display:{type:"numeric-input"},min:0,max:9999},compactPanelHeight:{type:"number",scope:"layout",title:"Menu Height",display:{type:"numeric-input"},min:0,max:9999},compactIconSize:{type:"number",scope:"layout",title:"Size",display:{type:"numeric-input"},min:0,max:9999},compactNavTextWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},compactNavTextPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},compactNavTextOffset:{type:"number",scope:"layout",title:"Offset",display:{type:"numeric-input"},min:-9999,max:9999},compactNavGap:{type:"number",scope:"layout",title:"Nav gap",min:0,max:100,display:{type:"range-control",visible:!1}},compactNavPaddingLeft:{type:"number",scope:"layout",title:"Nav padding left",min:0,max:100,display:{type:"range-control",visible:!1}},compactNavPaddingRight:{type:"number",scope:"layout",title:"Nav padding right",min:0,max:100,display:{type:"range-control",visible:!1}},...X$,...U$,...q$},defaults:{link:[{link:{type:"page",value:"",target:"self"},label:"Home",showIn:ea},{link:{type:"page",value:"",target:"self"},label:"Works",showIn:ea},{link:{type:"page",value:"",target:"self"},label:"About",showIn:ea},{link:{type:"page",value:"",target:"self"},label:"Contact",showIn:ea}],logo:{mode:"On",icon:"01M3QM74XE09DSJCWGD1XM6Y45"},backgroundColor:"#ffffff",logoColor:"#000000",iconColor:"#000000",linkColor:"#000000",openLinkColor:"#000000",compactIconColor:"#000000",compactLinkColor:"#000000",compactLogoColor:"#000000",compactBackgroundColor:"#ffffff",openLogoColor:"#000000",menuBackgroundColor:"#ffffff",overlayColor:"rgba(0, 0, 0, 0.45)",closeButtonColor:"#000000",effect:"fade",showIcon:"on",compactShowIcon:"on",logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",compactNavTextPosition:"center",navTextOffset:0,compactNavTextOffset:0,position:"left-top",fontFamily:"Goudy Bookletter 1911",fontSettings:Ps,textAlign:"left",openFontFamily:"Goudy Bookletter 1911",openFontSettings:Ps,openTextAlign:"left",compactFontFamily:"Goudy Bookletter 1911",compactFontSettings:Ps,compactTextAlign:"left",stateOverrides:{hover:{linkColor:"#666666",iconColor:"#666666",logoColor:"#666666"},"open-hover":{closeButtonColor:"#666666"}}},displayRules:[{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.openLogoColor.display.visible",value:!1}},{if:{name:"effect",value:"left"},then:{name:"properties.openPanelSize.title",value:"Width"}},{if:{name:"effect",value:"right"},then:{name:"properties.openPanelSize.title",value:"Width"}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconSize.display.visible",value:!1}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconSize.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconColor.display.visible",value:!1}}],layoutDefaults:{m:{position:"center",panelHeight:50/375,logoMaxHeight:30/375,logoPosition:"center",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:30/375,textWidth:240/375,openPanelSize:100,navTextWidth:120/375,gap:24/375,navGap:24/375,navPaddingLeft:20/375,navPaddingRight:20/375,textPaddingLeft:10/375,textPaddingRight:10/375,textPaddingTop:10/375,textPaddingBottom:10/375,fontSize:16/375,lineHeight:20/375,letterSpacing:0,wordSpacing:0,textAppearance:Jn,openFontSize:34/375,openLineHeight:20/375,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Jn,openTextAlign:"center",compactPanelHeight:40/375,compactLogoMaxHeight:20/375,compactShowIcon:"on",compactIconSize:16/375,compactNavTextWidth:80/375,compactNavGap:24/375,compactNavPaddingLeft:20/375,compactNavPaddingRight:20/375,compactFontSize:16/375,compactLineHeight:20/375,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:Jn},t:{textAlign:"center",position:"center",panelHeight:60/768,logoMaxHeight:30/768,logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:16/768,textWidth:300/768,openPanelSize:100,navTextWidth:90/768,gap:32/768,navGap:32/768,navPaddingLeft:20/768,navPaddingRight:20/768,textPaddingLeft:10/768,textPaddingRight:10/768,textPaddingTop:10/768,textPaddingBottom:10/768,fontSize:18/768,lineHeight:20/768,letterSpacing:0,wordSpacing:0,textAppearance:Jn,openFontSize:75/768,openLineHeight:20/768,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Jn,openTextAlign:"center",compactTextAlign:"center",compactPanelHeight:40/768,compactLogoMaxHeight:20/768,compactShowIcon:"on",compactIconSize:16/768,compactNavTextWidth:80/768,compactNavGap:32/768,compactNavPaddingLeft:20/768,compactNavPaddingRight:20/768,compactFontSize:16/768,compactLineHeight:20/768,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:Jn},d:{position:"center",panelHeight:50/1440,logoMaxHeight:30/1440,logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:20/1440,textWidth:300/1440,openPanelSize:100,navTextWidth:60/1440,gap:12/1440,navGap:64/1440,navPaddingLeft:10/1440,navPaddingRight:10/1440,textPaddingLeft:10/1440,textPaddingRight:10/1440,textPaddingTop:10/1440,textPaddingBottom:10/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:Jn,textAlign:"center",openFontSize:90/1440,openLineHeight:16/1440,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Jn,openTextAlign:"center",compactPanelHeight:30/1440,compactLogoMaxHeight:20/1440,compactShowIcon:"on",compactIconSize:20/1440,compactNavTextWidth:60/1440,compactNavGap:20/1440,compactNavPaddingLeft:10/1440,compactNavPaddingRight:10/1440,compactFontSize:16/1440,compactLineHeight:16/1440,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:Jn,compactTextAlign:"center"}},layout:["__componentName__","link","logo","logoMaxHeight","logoPosition","panelHeight","backgroundColor","logoColor","iconColor","showIcon","iconSize","linkColor","openLinkColor","compactShowIcon","compactIconColor","compactLinkColor","compactLogoColor","compactBackgroundColor","compactLogoMaxHeight","compactLogoPosition","compactPanelHeight","compactIconSize","compactNavTextWidth","compactNavTextPosition","compactNavTextOffset","compactNavGap","compactNavPaddingLeft","compactNavPaddingRight","compactFontFamily","compactFontSettings","compactFontSize","compactLineHeight","compactLetterSpacing","compactWordSpacing","compactTextAlign","compactTextAppearance","openLogoColor","menuBackgroundColor","overlayColor","closeButtonColor","effect","textWidth","navTextWidth","navTextPosition","navTextOffset","position","gap","navGap","navPaddingLeft","navPaddingRight","textPaddingLeft","textPaddingRight","textPaddingTop","textPaddingBottom","fontFamily","fontSettings","fontSize","lineHeight","letterSpacing","wordSpacing","textAlign","textAppearance","openFontFamily","openFontSettings","openFontSize","openLineHeight","openLetterSpacing","openWordSpacing","openTextAlign","openTextAppearance"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","logo"]},{id:"default",icon:"default",title:"Default",tooltip:"Default State",layout:Y$},{id:"compact",icon:"compact",title:"Compact",tooltip:"Compact State",layout:K$,availableWhen:{navigationPosition:["switch"]}},{id:"open",icon:"open",title:"Open",tooltip:"Open State",layout:Q$},{id:"links",icon:"content",title:"Links",tooltip:"Link Settings",layout:["__componentName__","link"]}],paletteBookmark:{items:[...J$],panelIds:["default","compact","open"],stateItems:{default:["iconColor","logoColor","linkColor","backgroundColor"],hover:["iconColor","logoColor","linkColor"],compact:["compactIconColor","compactLogoColor","compactLinkColor","compactBackgroundColor"],"compact-hover":["compactIconColor","compactLogoColor","compactLinkColor"],open:["closeButtonColor","openLogoColor","openLinkColor","menuBackgroundColor","overlayColor"],"open-hover":["closeButtonColor","openLogoColor","openLinkColor"]}},states:["default","hover"],statePanels:["default","compact","open"]},tC={element:V$,id:"basic-burger",name:"Basic Burger",category:"navigation",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple Burger.png"},layoutMode:"navigation",defaultSize:{d:{width:"100%",height:60/1440},t:{width:"100%",height:60/768},m:{width:"100%",height:56/375}},defaultNavigationPosition:{d:"switch",t:"switch",m:"stickyTop"},schema:eC,sourceCode:G$,assetsPaths:{content:[],parameters:[{path:"logo.icon",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"},{path:"openFontFamily"},{path:"compactFontFamily"}]},fontRelations:{fontSettings:"fontFamily",openFontSettings:"openFontFamily",compactFontSettings:"compactFontFamily"}},Wd=120,Od=3,nC=.12,ql={x:0,y:0,width:100,height:100};function wo(e,t){return e.map(n=>n.map(i=>({x:(i.x-t.x)/t.width,y:(i.y-t.y)/t.height})))}function Ia(e){return e<0?0:e>1?1:e}function Dd(e,t){return e.filter(n=>n.length>0).map(n=>`M ${n.map(i=>`${i.x*t.width} ${i.y*t.height}`).join(" L ")} Z`).join(" ")}function iC(e,t){let n=1/0,i=1/0,o=-1/0,r=-1/0;for(const d of e)for(const u of d){const p=u.x*t.width,v=u.y*t.height;p<n&&(n=p),p>o&&(o=p),v<i&&(i=v),v>r&&(r=v)}const l=o-n,c=r-i;return!isFinite(l)||!isFinite(c)||l<=0||c<=0?null:{x:n,y:i,width:l,height:c}}function oC(e){return e.map(([t,n])=>({x:t,y:n}))}function Rs(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const c of e)for(const d of c)d.x<t&&(t=d.x),d.x>i&&(i=d.x),d.y<n&&(n=d.y),d.y>o&&(o=d.y);const r=i-t,l=o-n;return!isFinite(r)||!isFinite(l)||r<=0||l<=0?e:e.map(c=>c.map(d=>({x:(d.x-t)/r,y:(d.y-n)/l})))}function rC(e,t){const n=[];for(const o of e)for(let r=0;r<o.length;r+=1){const l=o[r],c=o[(r+1)%o.length];(l.y<=t&&c.y>t||c.y<=t&&l.y>t)&&n.push(l.x+(t-l.y)/(c.y-l.y)*(c.x-l.x))}n.sort((o,r)=>o-r);const i=[];for(let o=0;o+1<n.length;o+=2){const r=Ia(n[o]),l=Ia(n[o+1]);l>r&&i.push({x0:r,x1:l})}return aC(i)}function aC(e){if(e.length<2)return e;const t=[...e].sort((i,o)=>i.x0-o.x0),n=[t[0]];for(let i=1;i<t.length;i+=1){const o=n[n.length-1],r=t[i];r.x0<=o.x1?o.x1=Math.max(o.x1,r.x1):n.push({...r})}return n}function sC(e,t){const n=[];let i=0,o=0;for(;i<e.length&&o<t.length;){const r=Math.max(e[i].x0,t[o].x0),l=Math.min(e[i].x1,t[o].x1);l>r&&n.push({x0:r,x1:l}),e[i].x1<t[o].x1?i+=1:o+=1}return n}function lC(e){const t=[];let n=0;for(const i of e)i.x0>n&&t.push({x0:n,x1:i.x0}),n=Math.max(n,i.x1);return n<1&&t.push({x0:n,x1:1}),t}function cC(e,t){const n=[];for(const i of e){if(t.x1<=i.x0||t.x0>=i.x1){n.push(i);continue}t.x0>i.x0&&n.push({x0:i.x0,x1:t.x0}),t.x1<i.x1&&n.push({x0:t.x1,x1:i.x1})}return n}function dC(e,t,n,i){let o=null;for(let r=0;r<Od;r+=1){const l=Ia(t+(n-t)*r/Math.max(1,Od-1)),c=rC(e,l),d=i==="avoid"?lC(c):c;if(o=o===null?d:sC(o,d),o.length===0)return[]}return o??[]}function Bd(e,t="stretch",n=ql){const i=e.trim();if(!i)return null;if(/^[Mm]/.test(i)){const l=Ri(i),c=$r(l);if(c.length)return t==="viewbox"?wo(c,n):Rs(c);if(typeof document>"u")return null;const d=i.split(/(?=[Mm])/).map(v=>v.trim()).filter(Boolean),u=document.createElementNS("http://www.w3.org/2000/svg","svg"),p=[];for(const v of d){const b=document.createElementNS("http://www.w3.org/2000/svg","path");b.setAttribute("d",v),u.appendChild(b);let m=0;try{m=b.getTotalLength()}catch{m=0}if(!m)continue;const h=[];for(let x=0;x<Wd;x+=1){const S=b.getPointAtLength(x/Wd*m);h.push({x:S.x,y:S.y})}p.push(h)}return p.length?t==="viewbox"?wo(p,n):Rs(p):null}const o=i.split(/[\s,]+/).map(Number).filter(l=>!Number.isNaN(l));if(o.length<6)return null;const r=[];for(let l=0;l+1<o.length;l+=2)r.push({x:o[l],y:o[l+1]});return t==="viewbox"?wo([r],n):Rs([r])}const Yl={bobbin:"M57.63,0 L57.63,37.24 L74.66,37.24 L74.66,56.07 L57.63,100 L33.84,100 L16.81,56.07 L16.81,37.24 L33.84,37.24 L33.84,0 Z",circle:"M50,0 C77.61,0 100,22.39 100,50 C100,77.61 77.61,100 50,100 C22.39,100 0,77.61 0,50 C0,22.39 22.39,0 50,0 Z",shield:"M0,0 L100,0 L100,50 L50,100 L0,50 Z",vase:"M25.37,0 L91.55,0 C91.55,0 74.8,25.14 83.07,50.03 C91.34,74.92 74.61,100 74.61,100 L8.43,100 C8.43,100 32.3,75.08 23.9,50 C15.5,24.92 25.37,0 25.37,0 Z",parallelogram:"M25.37,0 L91.55,0 L74.61,100 L8.43,100 Z",diamond:"M50,0 L80,50 L50,100 L20,50 Z"},Js="0 0 100 100",La=100,el=16,uC=12,pC=16,Ms=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,mC=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g,zd=Math.PI/4,gC=8,hC=Math.PI/18,fC=8,ho=24,fo=[];function yC(){return[{closed:!0,nodes:[{p:{x:0,y:0},in:null,out:null},{p:{x:1,y:0},in:null,out:null},{p:{x:1,y:1},in:null,out:null},{p:{x:0,y:1},in:null,out:null}]}]}function Es(e,t){return dn(e,n=>({x:(n.x-t.x)/t.width,y:(n.y-t.y)/t.height}))}function vC(e){const t=Ci(e),n=t.maxX-t.minX,i=t.maxY-t.minY;return!isFinite(n)||!isFinite(i)||n<=0||i<=0?e:dn(e,o=>({x:(o.x-t.minX)/n,y:(o.y-t.minY)/i}))}function xC(e,t){if(!(t.width>0)||!(t.height>0))return e;const n=Math.min(t.width,t.height),i=(t.width-n)/2,o=(t.height-n)/2;return dn(e,r=>({x:(i+r.x*n)/t.width,y:(o+r.y*n)/t.height}))}function jd(e,t,n,i,o,r){let l=[];if(t&&t.length)l=Es(t,i);else{const c=e.trim();if(c&&/^[Mm]/.test(c)){const d=Ri(c);d.length&&(l=n==="viewbox"?Es(d,i):vC(d))}if(!l.length){const d=o!=="custom"?Yl[o]:void 0;d?l=Es(Ri(d),ql):l=yC()}}return o==="circle"?xC(l,r):l}function Vd(e,t){return!(t.width>0)||!(t.height>0)||!e.length?"":_o(dn(e,n=>({x:n.x*t.width,y:n.y*t.height})))}function tl(e){const t=e==="rectangle"||e==="custom"?void 0:Yl[e];return t?wo($r(Ri(t)),ql):[oC([[0,0],[1,0],[1,1],[0,1]])]}function bC(e){const t=e.match(mC);return t?t.map(Number).filter(n=>!Number.isNaN(n)):[]}function Tn(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function nl(e,t){return{x:t.x*2-e.x,y:t.y*2-e.y}}function pn(e){return{x:e.x,y:e.y}}function SC(e){return{p:pn(e.p),in:e.in?pn(e.in):null,out:e.out?pn(e.out):null}}function zn(e){return e.map(t=>({closed:t.closed,nodes:t.nodes.map(SC)}))}function dn(e,t){return e.map(n=>({closed:n.closed,nodes:n.nodes.map(i=>({p:t(i.p),in:i.in?t(i.in):null,out:i.out?t(i.out):null}))}))}function Gd(e,t,n,i=n){return dn(e,o=>({x:t.x+(o.x-t.x)*n,y:t.y+(o.y-t.y)*i}))}function wC(e,t,n,i,o,r,l){let c=Math.abs(t),d=Math.abs(n);if(!c||!d||e.x===l.x&&e.y===l.y)return[{c1:pn(e),c2:pn(l),p:pn(l)}];const u=i*Math.PI/180,p=Math.cos(u),v=Math.sin(u),b=(e.x-l.x)/2,m=(e.y-l.y)/2,h=p*b+v*m,x=-v*b+p*m,S=h*h/(c*c)+x*x/(d*d);if(S>1){const Y=Math.sqrt(S);c*=Y,d*=Y}const P=o===r?-1:1,f=c*c*x*x+d*d*h*h,w=Math.max(0,c*c*d*d-f),N=f===0?0:P*Math.sqrt(w/f),V=N*c*x/d,B=-N*d*h/c,H=p*V-v*B+(e.x+l.x)/2,_=v*V+p*B+(e.y+l.y)/2,z=Math.atan2((x-B)/d,(h-V)/c);let E=Math.atan2((-x-B)/d,(-h-V)/c)-z;!r&&E>0&&(E-=Math.PI*2),r&&E<0&&(E+=Math.PI*2);const j=Math.max(1,Math.ceil(Math.abs(E)/(Math.PI/2))),L=E/j,C=4/3*Math.tan(L/4),T=(Y,R)=>({x:H+p*c*Y-v*d*R,y:_+v*c*Y+p*d*R}),G=[];let A=z;for(let Y=0;Y<j;Y+=1){const R=A+L,y=Math.cos(A),U=Math.sin(A),ee=Math.cos(R),de=Math.sin(R);G.push({c1:T(y-C*U,U+C*y),c2:T(ee+C*de,de-C*ee),p:Y===j-1?pn(l):T(ee,de)}),A=R}return G}function Ri(e){const t=(e??"").trim();if(!t)return[];const n=[];let i=[],o=!1,r={x:0,y:0},l={x:0,y:0},c=null,d=null;const u=()=>{if(o&&i.length>2){const m=i[0],h=i[i.length-1];Math.abs(m.p.x-h.p.x)<1e-6&&Math.abs(m.p.y-h.p.y)<1e-6&&(m.in=h.in??m.in,i.pop())}i.length>1&&n.push({nodes:i,closed:o}),i=[],o=!1},p=(m,h)=>{i.push({p:m,in:Gn(h??null,m),out:null}),r=m},v=m=>{if(!i.length)return;const h=i[i.length-1];h.out=Gn(m,h.p)};Ms.lastIndex=0;let b=Ms.exec(t);for(;b!==null;){const m=b[1],h=m.toUpperCase(),x=m!==h,S=bC(b[2]),P=f=>x?{x:r.x+S[f],y:r.y+S[f+1]}:{x:S[f],y:S[f+1]};if(h==="Z")o=!0,u(),r=pn(l),c=null,d=null;else if(h==="M"){for(let f=0;f+1<S.length;f+=2){const w=P(f);f===0&&(u(),l=pn(w)),p(w)}c=null,d=null}else if(h==="L"){for(let f=0;f+1<S.length;f+=2)p(P(f));c=null,d=null}else if(h==="H"){for(const f of S)p({x:x?r.x+f:f,y:r.y});c=null,d=null}else if(h==="V"){for(const f of S)p({x:r.x,y:x?r.y+f:f});c=null,d=null}else if(h==="C"){for(let f=0;f+5<S.length;f+=6){const w=P(f),N=P(f+2),V=P(f+4);v(w),p(V,N),c=N}d=null}else if(h==="S"){for(let f=0;f+3<S.length;f+=4){const w=c?nl(c,r):pn(r),N=P(f),V=P(f+2);v(w),p(V,N),c=N}d=null}else if(h==="Q")for(let f=0;f+3<S.length;f+=4){const w=P(f),N=P(f+2);v(Tn(r,w,2/3)),p(N,Tn(N,w,2/3)),d=w,c=null}else if(h==="T")for(let f=0;f+1<S.length;f+=2){const w=d?nl(d,r):pn(r),N=P(f);v(Tn(r,w,2/3)),p(N,Tn(N,w,2/3)),d=w,c=null}else if(h==="A")for(let f=0;f+6<S.length;f+=7){const w=x?{x:r.x+S[f+5],y:r.y+S[f+6]}:{x:S[f+5],y:S[f+6]};for(const N of wC(r,S[f],S[f+1],S[f+2],S[f+3]!==0,S[f+4]!==0,w))v(N.c1),p(N.p,N.c2);c=null,d=null}b=Ms.exec(t)}return u(),n}function Dn(e){return`${Number(e.toFixed(2))}`}function Gn(e,t){return!e||Math.abs(e.x-t.x)<1e-6&&Math.abs(e.y-t.y)<1e-6?null:e}function _p(e){return!!(Gn(e.in,e.p)||Gn(e.out,e.p))}function jo(e,t){return!Gn(e.out,e.p)&&!Gn(t.in,t.p)}function Xd(e,t){if(jo(e,t))return`L${Dn(t.p.x)},${Dn(t.p.y)}`;const n=Gn(e.out,e.p)??e.p,i=Gn(t.in,t.p)??t.p;return`C${Dn(n.x)},${Dn(n.y)} ${Dn(i.x)},${Dn(i.y)} ${Dn(t.p.x)},${Dn(t.p.y)}`}function _o(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const[i,...o]=n.nodes;t.push(`M${Dn(i.p.x)},${Dn(i.p.y)}`);let r=i;for(const l of o)t.push(Xd(r,l)),r=l;if(n.closed){const l=Xd(r,i);l.charAt(0)==="C"&&t.push(l),t.push("Z")}}return t.join(" ")}function Hp(e){const t=[];for(let n=0;n+1<e.nodes.length;n+=1)t.push({from:e.nodes[n],to:e.nodes[n+1],index:n});if(e.closed&&e.nodes.length>2){const n=e.nodes.length-1;t.push({from:e.nodes[n],to:e.nodes[0],index:n})}return t}function il(e,t,n){if(jo(e,t))return Tn(e.p,t.p,n);const i=e.out??e.p,o=t.in??t.p,r=1-n,l=r*r*r,c=3*r*r*n,d=3*r*n*n,u=n*n*n;return{x:l*e.p.x+c*i.x+d*o.x+u*t.p.x,y:l*e.p.y+c*i.y+d*o.y+u*t.p.y}}function $r(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const i=[];for(const o of Hp(n)){if(jo(o.from,o.to)){i.push(pn(o.from.p));continue}for(let r=0;r<el;r+=1)i.push(il(o.from,o.to,r/el))}n.closed||i.push(pn(n.nodes[n.nodes.length-1].p)),i.length>2&&t.push(i)}return t}function Ci(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const r of $r(e))for(const l of r)l.x<t&&(t=l.x),l.x>i&&(i=l.x),l.y<n&&(n=l.y),l.y>o&&(o=l.y);return{minX:t,minY:n,maxX:i,maxY:o}}function $C(e){const t=Ci(e);return!isFinite(t.minX)||!isFinite(t.maxX)||!isFinite(t.minY)||!isFinite(t.maxY)?null:{x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}}function Wp(e,t,n){const i={x:(n.x-e.x)/6,y:(n.y-e.y)/6};return{in:{x:t.x-i.x,y:t.y-i.y},out:{x:t.x+i.x,y:t.y+i.y}}}function Op(e){return e.filter(t=>t.length>2).map(t=>{if(t.length<=uC)return{closed:!0,nodes:t.map(r=>({p:pn(r),in:null,out:null}))};const n=Math.max(1,Math.round(t.length/pC)),i=[];for(let r=0;r<t.length;r+=n)i.push(t[r]);const o=i.length;return{closed:!0,nodes:i.map((r,l)=>({p:pn(r),...Wp(i[(l-1+o)%o],r,i[(l+1)%o])}))}})}function Dp(e,t,n=1){if(!e.length)return!1;const i=Ci(e);if(!isFinite(i.minX)||!isFinite(i.maxX))return!1;const o=i.maxX-i.minX,r=i.maxY-i.minY;if(o<=t.width*2.5&&r<=t.height*2.5)return!1;const l=Math.max(n,t.width*.5),c=Math.max(n,t.height*.5);return i.minX<t.x-l||i.minY<t.y-c||i.maxX>t.x+t.width+l||i.maxY>t.y+t.height+c}function CC(e,t,n,i,o,r,l){const c=t.width>0?n.width/t.width:1,d=t.height>0?n.height/t.height:1;return!(r>0)||!(l>0)||!(c>0)||!(d>0)?e:dn(e,u=>{const p=i+(u.x-t.x)*r,v=o+(u.y-t.y)*l;return{x:t.x+p/c,y:t.y+v/d}})}function TC(e,t){if(!e.length)return e;const n=Ci(e),i=n.maxX-n.minX,o=n.maxY-n.minY;if(!(i>0)||!(o>0)||n.minX>=t.x-1e-6&&n.minY>=t.y-1e-6&&n.maxX<=t.x+t.width+1e-6&&n.maxY<=t.y+t.height+1e-6)return e;const l=Math.min(t.width/i,t.height/o),c=t.x+(t.width-i*l)/2,d=t.y+(t.height-o*l)/2;return dn(e,u=>({x:c+(u.x-n.minX)*l,y:d+(u.y-n.minY)*l}))}function Bp(e){const t={x:0,y:0,width:La,height:La},n=e!=="custom"?Yl[e]:void 0,i=n?dn(Ri(n),r=>({x:r.x/100*t.width+t.x,y:r.y/100*t.height+t.y})):dn(Op(tl("rectangle")),r=>({x:r.x*t.width+t.x,y:r.y*t.height+t.y})),o=TC(i,t);return{shape:e,customPath:_o(o),pathFit:"viewbox",pathViewBox:Js}}function ta(e,t){return t>0?Math.round(e/t)*t:e}function IC(e,t,n,i){var u;const o=(u=e[t])==null?void 0:u.nodes[n];if(!o)return e;const r=i.x-o.p.x,l=i.y-o.p.y,c=zn(e),d=c[t].nodes[n];return d.p={x:o.p.x+r,y:o.p.y+l},d.in&&(d.in={x:d.in.x+r,y:d.in.y+l}),d.out&&(d.out={x:d.out.x+r,y:d.out.y+l}),c}function Ud(e,t,n,i){var r;if(!t.length)return e;const o=zn(e);for(const{contour:l,node:c}of t){const d=(r=o[l])==null?void 0:r.nodes[c];d&&(d.p={x:d.p.x+n,y:d.p.y+i},d.in&&(d.in={x:d.in.x+n,y:d.in.y+i}),d.out&&(d.out={x:d.out.x+n,y:d.out.y+i}))}return o}function LC(e,t){const n=new Map;for(const{contour:o,node:r}of t){const l=n.get(o)??[];l.push(r),n.set(o,l)}let i=e;return n.forEach((o,r)=>{const l=[...o].sort((c,d)=>d-c);for(const c of l)i=zp(i,r,c)}),i}function PC(e,t,n,i,o,r){var u;if(!((u=e[t])==null?void 0:u.nodes[n]))return e;const c=zn(e),d=c[t].nodes[n];if(d[i]=pn(o),r){const p=i==="in"?"out":"in";d[p]=nl(o,d.p)}return c}function RC(e,t,n,i){var l;const o=(l=e[t])==null?void 0:l.nodes[n];if(!o||!o[i])return e;const r=zn(e);return r[t].nodes[n][i]=null,r}function MC(e,t,n,i){const o=e[t];if(!o)return{contours:e,nodeIndex:-1};const r=o.nodes[n],l=o.nodes[(n+1)%o.nodes.length];if(!r||!l)return{contours:e,nodeIndex:-1};const c=zn(e),d=c[t].nodes,u=n+1;if(jo(r,l))return d.splice(u,0,{p:Tn(r.p,l.p,i),in:null,out:null}),{contours:c,nodeIndex:u};const p=r.out??r.p,v=l.in??l.p,b=Tn(r.p,p,i),m=Tn(p,v,i),h=Tn(v,l.p,i),x=Tn(b,m,i),S=Tn(m,h,i),P=Tn(x,S,i),f=(n+1)%o.nodes.length;return d[n].out=b,d[f].in=h,d.splice(u,0,{p:P,in:x,out:S}),{contours:c,nodeIndex:u}}function zp(e,t,n){const i=e[t];if(!i||i.nodes.length<=3)return e;const o=zn(e);return o[t].nodes.splice(n,1),o}function qd(e,t,n){const i=e[t];if(!(i==null?void 0:i.nodes[n]))return e;const r=zn(e),l=r[t].nodes,c=l[n],d=l.length,u=(n-1+d)%d,p=(n+1)%d,v=!!Gn(l[u].out,l[u].p),b=!!Gn(l[p].in,l[p].p);if(_p(c)||v||b)return c.in=null,c.out=null,l[u].out=null,l[p].in=null,r;const m=Wp(l[u].p,c.p,l[p].p);return c.in=m.in,c.out=m.out,r}function EC(e,t,n){const i=n.x-t.x,o=n.y-t.y,r=i*i+o*o,l=r===0?0:Math.max(0,Math.min(1,((e.x-t.x)*i+(e.y-t.y)*o)/r)),c={x:t.x+i*l,y:t.y+o*l};return{t:l,distance:Math.hypot(e.x-c.x,e.y-c.y),point:c}}function Yd(e,t){let n=null;return e.forEach((i,o)=>{for(const r of Hp(i)){const l=jo(r.from,r.to)?1:el;for(let c=0;c<l;c+=1){const d=c/l,u=(c+1)/l,p=EC(t,il(r.from,r.to,d),il(r.from,r.to,u));(!n||p.distance<n.distance)&&(n={contour:o,segment:r.index,t:d+(u-d)*p.t,distance:p.distance,point:p.point})}}}),n}function kC(e,t){const n=[];return e.forEach((i,o)=>{i.nodes.forEach((r,l)=>{o===t.contour&&l===t.node||n.push(r.p)})}),n}function Kd(e,t,n){const i=t.filter((r,l)=>isFinite(r)&&t.findIndex(c=>Math.abs(c-r)<1e-6)===l),o=i.map(r=>({value:r,axis:r,from:null}));for(const r of e)o.push({value:r[n],axis:null,from:r});for(const r of i)for(const l of e)o.push({value:r*2-l[n],axis:r,from:l});return o}function Qd(e,t,n,i,o){const r=i(t)[n];let l=null,c=1/0;for(const d of e){const u=n==="x"?{x:d.value,y:t.y}:{x:t.x,y:d.value},p=Math.abs(i(u)[n]-r);p>o||l&&p>=c||(l=d,c=p)}return l}function AC(e,t){return e.length===t.length&&e.every((n,i)=>n.kind===t[i].kind&&n.a.x===t[i].a.x&&n.a.y===t[i].a.y&&n.b.x===t[i].b.x&&n.b.y===t[i].b.y)}function FC(e){const t=Math.PI*2;return((e+Math.PI)%t+t)%t-Math.PI}function ol(e,t){const n=t.x-e.x,i=t.y-e.y,o=Math.hypot(n,i);return o<1e-6?null:{x:n/o,y:i/o}}function NC(e,t){const n=ol(e,t);return n?{kind:"align",a:{x:e.x-n.x*ho,y:e.y-n.y*ho},b:{x:t.x+n.x*ho,y:t.y+n.y*ho}}:{kind:"align",a:e,b:t}}function rl(e,t,n){return t==="x"?{kind:"center",a:{x:e,y:0},b:{x:e,y:n.height}}:{kind:"center",a:{x:0,y:e},b:{x:n.width,y:e}}}function Zd(e,t,n,i,o){if(e.axis===null)return NC(n,o(e.from??n));const r=t==="x"?{x:e.axis,y:0}:{x:0,y:e.axis};return rl(o(r)[t],t,i)}function _C(e,t,n,i,o){const r=[],l=o(e);return t&&e.x===t.value&&r.push(Zd(t,"x",l,i,o)),n&&e.y===n.value&&r.push(Zd(n,"y",l,i,o)),r}function HC(e,t,n,i){const o=e==null?void 0:e.nodes[t];if(!e||!o)return null;const r=i(o.p),l=n==="in"?o.out:o.in;if(l)return ol(i(l),r);const c=e.nodes.length,d=t+(n==="in"?1:-1);if(!e.closed&&(d<0||d>=c))return null;const u=e.nodes[(d+c)%c];if(!u)return null;const p=(n==="in"?u.in:u.out)??u.p;return ol(i(p),r)}function WC(e,t,n,i,o,r,l){const c=r(t),d=r(e),u=d.x-c.x,p=d.y-c.y,v=Math.hypot(u,p);if(v<1e-6)return{point:e,guides:fo};const b=Math.atan2(p,u),m=Math.round(b/zd)*zd;let h=o?m:null,x=!1;if(!o){const B=[];n&&B.push({angle:Math.atan2(n.y,n.x),smooth:!0}),B.push({angle:m,smooth:!1});for(const H of B){const _=FC(H.angle-b);if(!(Math.abs(_)>hC)&&!(Math.abs(Math.sin(_))*v>gC)){h=H.angle,x=H.smooth;break}}}const S=i!==null&&i>0&&Math.abs(v-i)<=fC;if(h===null&&!S)return{point:e,guides:fo};const P=h??b,f=S?i:v,w={x:Math.cos(P),y:Math.sin(P)},N=f+(h===null?0:ho),V=S?f:x?ho:0;return{point:l({x:c.x+w.x*f,y:c.y+w.y*f}),guides:[{kind:"angle",a:{x:c.x-w.x*V,y:c.y-w.y*V},b:{x:c.x+w.x*N,y:c.y+w.y*N}}]}}const al=.1,sl=8,OC=4,Jd=10,Pa=(e,t)=>{switch(t){case"nw":return{x:e.minX,y:e.minY};case"ne":return{x:e.maxX,y:e.minY};case"se":return{x:e.maxX,y:e.maxY};case"sw":return{x:e.minX,y:e.maxY}}},jp=e=>{switch(e){case"nw":return"se";case"ne":return"sw";case"se":return"nw";case"sw":return"ne"}},ll=(e,t)=>{const n=Pa(e,t),i=t==="nw"||t==="sw"?-1:1,o=t==="nw"||t==="ne"?-1:1;return{x:n.x+i*Jd,y:n.y+o*Jd}},cl=(e,t)=>!(t.width>0)||!(t.height>0)||!(e.width>0)||!(e.height>0)?1:Math.max(e.width/t.width,e.height/t.height),Vi=(e,t,n)=>{const i=cl(e,t)*n;return{width:t.width*i,height:t.height*i}},Bn=(e,t,n)=>(e-t)*n,yo=(e,t,n,i)=>{const o=e-t;if(Math.abs(o)<1e-6)return .5;const r=n/o;return(i==null?void 0:i.clamp)===!1?r:Math.abs(o)<OC?.5:Ia(r)},DC=(e,t,n,i,o,r)=>{const l=Vi(e,n,r),c=e.x+Bn(e.width,l.width,i),d=e.y+Bn(e.height,l.height,o),u=cl(e,n),p=cl(t,n),v=Math.min(sl,Math.max(al,p>0?r*(u/p):r)),b=Vi(t,n,v);return{focalX:yo(t.width,b.width,c-t.x,{clamp:!1}),focalY:yo(t.height,b.height,d-t.y,{clamp:!1}),scale:v}},eu=1.08,na=14,ia=8;function BC({P:e,box:t,bounds:n,natural:i,imageUrl:o,maskPath:r,stage:l,onStageChange:c,focalX:d,focalY:u,scale:p,onChange:v,onCommit:b}){const m=s.useRef(null),h=`pretext-image-ghost-${s.useId().replace(/:/g,"")}`,x=s.useRef(null),S=s.useRef(null),P=s.useRef({focalX:d,focalY:u,scale:p});P.current={focalX:d,focalY:u,scale:p};const f=l==="image";s.useEffect(()=>{var L;f&&((L=m.current)==null||L.focus({preventScroll:!0}))},[f]);const w=s.useCallback((L,C)=>{var G;const T=(G=m.current)==null?void 0:G.getBoundingClientRect();return!T||T.width<=0||T.height<=0?{x:0,y:0}:{x:(L-T.left)/T.width*t.width,y:(C-T.top)/T.height*t.height}},[t.width,t.height]),N=L=>{var T,G;if(!i)return;L.stopPropagation(),L.preventDefault(),(T=m.current)==null||T.focus({preventScroll:!0});const C=Vi(n,i,p);x.current={pointerId:L.pointerId,origin:w(L.clientX,L.clientY),startX:Bn(n.width,C.width,d),startY:Bn(n.height,C.height,u),width:C.width,height:C.height,moved:!1},(G=m.current)==null||G.setPointerCapture(L.pointerId)},V=(L,C)=>{var ee,de;if(!i)return;L.stopPropagation(),L.preventDefault(),(ee=m.current)==null||ee.focus({preventScroll:!0});const T=Vi(n,i,p),G=Bn(n.width,T.width,d),A=Bn(n.height,T.height,u),Y={minX:G,minY:A,maxX:G+T.width,maxY:A+T.height},R=Pa(Y,jp(C)),y=Pa(Y,C),U=Math.hypot(y.x-R.x,y.y-R.y);!isFinite(U)||U<=0||(S.current={pointerId:L.pointerId,anchor:R,startDistance:U,startScale:p,startX:G,startY:A,moved:!1},(de=m.current)==null||de.setPointerCapture(L.pointerId))},B=L=>{if(!i)return;const C=S.current;if(C&&L.pointerId===C.pointerId){L.stopPropagation(),L.preventDefault();const G=w(L.clientX,L.clientY),A={x:G.x-n.x,y:G.y-n.y},Y=Math.hypot(A.x-C.anchor.x,A.y-C.anchor.y),R=Math.min(sl,Math.max(al,C.startScale*(Y/C.startDistance)));if(!C.moved&&Math.abs(R-C.startScale)<1e-4)return;C.moved=!0;const y=R/C.startScale,U=C.anchor.x+(C.startX-C.anchor.x)*y,ee=C.anchor.y+(C.startY-C.anchor.y)*y,de=Vi(n,i,R);v({focalX:yo(n.width,de.width,U),focalY:yo(n.height,de.height,ee),scale:R});return}const T=x.current;if(T&&L.pointerId===T.pointerId){L.stopPropagation(),L.preventDefault();const G=w(L.clientX,L.clientY),A=G.x-T.origin.x,Y=G.y-T.origin.y;if(!T.moved&&A===0&&Y===0)return;T.moved=!0,v({focalX:yo(n.width,T.width,T.startX+A),focalY:yo(n.height,T.height,T.startY+Y),scale:p})}},H=L=>{var G,A;const C=x.current;if(C&&L.pointerId===C.pointerId){x.current=null,L.stopPropagation(),(G=m.current)!=null&&G.hasPointerCapture(C.pointerId)&&m.current.releasePointerCapture(C.pointerId),C.moved&&b(P.current);return}const T=S.current;T&&L.pointerId===T.pointerId&&(S.current=null,L.stopPropagation(),(A=m.current)!=null&&A.hasPointerCapture(T.pointerId)&&m.current.releasePointerCapture(T.pointerId),T.moved&&b(P.current))},_=L=>{if(L.key==="Escape"){L.stopPropagation(),c("none");return}if(L.key==="="||L.key==="+"||L.key==="-"||L.key==="_"){L.preventDefault(),L.stopPropagation();const C=L.key==="="||L.key==="+",T=Math.min(sl,Math.max(al,p*(C?eu:1/eu))),G={focalX:d,focalY:u,scale:T};v(G),b(G)}},z=["nw","ne","se","sw"],$={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height},E=s.useMemo(()=>{const L=i??{width:n.width,height:n.height},C=Vi(n,L,p);return!(C.width>0)||!(C.height>0)?null:{x:n.x+Bn(n.width,C.width,d),y:n.y+Bn(n.height,C.height,u),width:C.width,height:C.height}},[i,n.x,n.y,n.width,n.height,d,u,p]),j=E?{minX:E.x,minY:E.y,maxX:E.x+E.width,maxY:E.y+E.height}:$;return a.jsxs("svg",{ref:m,className:`${e}-editor${f?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:_,onPointerMove:B,onPointerUp:H,onPointerCancel:H,onLostPointerCapture:H,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>c("none")}),f&&o&&E&&r&&a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsxs("mask",{id:h,maskUnits:"userSpaceOnUse",x:E.x,y:E.y,width:E.width,height:E.height,children:[a.jsx("rect",{x:E.x,y:E.y,width:E.width,height:E.height,fill:"#FFFFFF"}),a.jsx("path",{d:r,fillRule:"evenodd",fill:"#000000"})]})}),a.jsx("image",{className:`${e}-editor-ghost`,href:o??void 0,x:E.x,y:E.y,width:E.width,height:E.height,preserveAspectRatio:"none",mask:`url(#${h})`}),a.jsx("rect",{className:`${e}-editor-image-bounds`,x:E.x,y:E.y,width:E.width,height:E.height})]}),f&&a.jsxs(a.Fragment,{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:n.x,y:n.y,width:n.width,height:n.height}),a.jsx("rect",{className:`${e}-editor-body`,x:n.x,y:n.y,width:n.width,height:n.height,onPointerDown:N}),z.map(L=>{const C=ll(j,L),T=L==="ne"||L==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:C.x-ia/2,y:C.y-ia/2,width:ia,height:ia}),a.jsx("rect",{className:`${e}-editor-scale-grab${T?` ${e}-editor-scale-grab-nesw`:""}`,x:C.x-na/2,y:C.y-na/2,width:na,height:na,onPointerDown:G=>V(G,L)})]},L)})]})]})}const dl=10,zC=dl*2,On=7,jC=4,so=9,VC=3.5,tu=1.08,GC=.05,oa=14,XC=1,ra=14,aa=8;function UC({P:e,box:t,viewBox:n,contours:i,snap:o,stretchToBox:r,uniformStretch:l=!1,stage:c,onStageChange:d,onSelectionChange:u,onChange:p,onCommit:v}){const b=s.useRef(null),m=s.useRef(null),h=s.useRef(i);h.current=i;const x=s.useRef(null),S=s.useRef(null),P=s.useRef(null),f=s.useRef(null),[w,N]=s.useState([]),[V,B]=s.useState(fo),[H,_]=s.useState(null),z=s.useCallback(g=>{B(X=>AC(X,g)?X:g)},[]),$=c==="shape";s.useEffect(()=>{var g;$&&((g=b.current)==null||g.focus({preventScroll:!0}))},[$]),s.useEffect(()=>{$||N(g=>g.length?[]:g)},[$]);const E=w.length>0;s.useEffect(()=>{u==null||u(E)},[E,u]),s.useEffect(()=>()=>u==null?void 0:u(!1),[u]);const j=n.width>0?t.width/n.width:1,L=n.height>0?t.height/n.height:1,C=Math.min(j,L),T=r&&l?C:j,G=r&&l?C:L,A=r&&l?(t.width-n.width*C)/2:0,Y=r&&l?(t.height-n.height*C)/2:0,R=s.useCallback(g=>r?{x:A+(g.x-n.x)*T,y:Y+(g.y-n.y)*G}:{x:g.x-n.x,y:g.y-n.y},[r,n,T,G,A,Y]),y=s.useCallback(g=>r?{x:n.x+(T>0?(g.x-A)/T:0),y:n.y+(G>0?(g.y-Y)/G:0)}:{x:n.x+g.x,y:n.y+g.y},[r,n,T,G,A,Y]),U=s.useMemo(()=>y({x:t.width/2,y:t.height/2}),[y,t.width,t.height]),ee=s.useCallback((g,X)=>{var ne;const Z=(ne=b.current)==null?void 0:ne.getBoundingClientRect();if(!Z||Z.width<=0||Z.height<=0)return{x:0,y:0};if(r){const ye=(g-Z.left)/Z.width*t.width,K=(X-Z.top)/Z.height*t.height;return{x:n.x+(T>0?(ye-A)/T:0),y:n.y+(G>0?(K-Y)/G:0)}}return{x:n.x+(g-Z.left),y:n.y+(X-Z.top)}},[r,n,t.width,t.height,T,G,A,Y]),de=s.useCallback((g,X)=>{var ne;const Z=(ne=b.current)==null?void 0:ne.getBoundingClientRect();return!Z||Z.width<=0||Z.height<=0?{x:0,y:0}:{x:(g-Z.left)/Z.width*t.width,y:(X-Z.top)/Z.height*t.height}},[t.width,t.height]),F=s.useCallback((g,X)=>{const Z=l&&!(X!=null&&X.preserveShape)?CC(g,n,t,A,Y,T,G):g;v(Z,X)},[v,l,n,t,A,Y,T,G]),ie=s.useCallback(()=>{_(null)},[]),I=s.useCallback((g,X,Z)=>{if(!Z||x.current||S.current||P.current||f.current){ie();return}const ne=de(g,X),ye=dn(h.current,R);for(const W of ye)for(const Le of W.nodes)if(Math.hypot(Le.p.x-ne.x,Le.p.y-ne.y)<=so){ie();return}const K=Yd(ye,ne);if(!K||K.distance>dl){ie();return}const D=ye[K.contour],ce=D==null?void 0:D.nodes[K.segment],q=D==null?void 0:D.nodes[(K.segment+1)%((D==null?void 0:D.nodes.length)??1)],ue=!!(ce&&q&&!jo(ce,q));_(W=>W&&W.curved===ue&&Math.hypot(W.point.x-K.point.x,W.point.y-K.point.y)<.25?W:{point:K.point,curved:ue})},[de,R,ie]),se=g=>{var Oe;const X=g.metaKey||g.ctrlKey,Z=P.current;if(Z&&g.pointerId===Z.pointerId){if(g.stopPropagation(),g.preventDefault(),Z.startDistance<=0)return;const it=ee(g.clientX,g.clientY),qe=Math.hypot(it.x-Z.origin.x,it.y-Z.origin.y),Je=Math.max(GC,qe/Z.startDistance);if(!Z.moved&&Math.abs(Je-1)<1e-4)return;Z.moved=!0,p(Gd(Z.startContours,Z.origin,Je));return}const ne=S.current;if(ne&&g.pointerId===ne.pointerId){g.stopPropagation(),g.preventDefault();const it=ee(g.clientX,g.clientY),{bbox:qe}=ne,Je=qe.maxX-qe.minX,ot=qe.maxY-qe.minY,Ve=it.x-ne.origin.x,ve=it.y-ne.origin.y;let Fe=Ve,Xe=ve;if(isFinite(Je)&&isFinite(ot))if(r){let Pe=n.x,_e=n.x+n.width,Ke=n.y,Ze=n.y+n.height;l&&(T>0&&(Pe=n.x+(0-A)/T,_e=n.x+(t.width-A)/T),G>0&&(Ke=n.y+(0-Y)/G,Ze=n.y+(t.height-Y)/G));const st=Math.min(Pe,_e-Je),Ue=Math.max(Pe,_e-Je),De=Math.min(Ke,Ze-ot),ke=Math.max(Ke,Ze-ot),ht=Math.min(Ue,Math.max(st,qe.minX+Ve)),Be=Math.min(ke,Math.max(De,qe.minY+ve));Fe=ht-qe.minX,Xe=Be-qe.minY}else{const Pe=qe.minX-n.x,_e=qe.minY-n.y,Ke=Math.min(0,t.width-Je),Ze=Math.max(0,t.width-Je),st=Math.min(0,t.height-ot),Ue=Math.max(0,t.height-ot),De=Math.min(Ze,Math.max(Ke,Pe+Ve)),ke=Math.min(Ue,Math.max(st,_e+ve));Fe=De-Pe,Xe=ke-_e}const Ye=[];if(!X&&isFinite(Je)&&isFinite(ot)){const Pe=R({x:qe.minX+Je/2+Fe,y:qe.minY+ot/2+Xe}),_e={x:t.width/2,y:t.height/2};Math.abs(Pe.x-_e.x)<=oa&&(Fe=U.x-qe.minX-Je/2,Ye.push(rl(_e.x,"x",t))),Math.abs(Pe.y-_e.y)<=oa&&(Xe=U.y-qe.minY-ot/2,Ye.push(rl(_e.y,"y",t)))}if(!ne.moved&&Fe===0&&Xe===0)return;ne.moved=!0,z(Ye.length?Ye:fo),p(dn(ne.startContours,Pe=>({x:Pe.x+Fe,y:Pe.y+Xe})),{carryImage:!0});return}const ye=f.current;if(ye&&g.pointerId===ye.pointerId){g.stopPropagation(),g.preventDefault();const it=ee(g.clientX,g.clientY);let qe=it.x-ye.origin.x,Je=it.y-ye.origin.y;if(g.shiftKey&&(Math.abs(qe)>Math.abs(Je)?Je=0:qe=0),!ye.moved&&qe===0&&Je===0)return;ye.moved=!0,p(Ud(ye.startContours,ye.selection,qe,Je));return}const K=x.current;if(!K||g.pointerId!==K.pointerId){I(g.clientX,g.clientY,w.length>0||$);return}ie(),g.stopPropagation(),g.preventDefault();const D=ee(g.clientX,g.clientY);if(K.kind==="anchor"){const it={x:K.anchor.x+(D.x-K.origin.x),y:K.anchor.y+(D.y-K.origin.y)},qe=X?[]:kC(h.current,{contour:K.contour,node:K.node}),Je=X||!K.center?[]:[K.center],ot=Qd(Kd(qe,Je.map(Fe=>Fe.x),"x"),it,"x",R,oa),Ve=Qd(Kd(qe,Je.map(Fe=>Fe.y),"y"),it,"y",R,oa),ve=X?it:{x:(ot==null?void 0:ot.value)??ta(it.x,o),y:(Ve==null?void 0:Ve.value)??ta(it.y,o)};if(g.shiftKey&&(Math.abs(ve.x-K.anchor.x)>Math.abs(ve.y-K.anchor.y)?ve.y=K.anchor.y:ve.x=K.anchor.x),!K.moved&&ve.x===K.anchor.x&&ve.y===K.anchor.y)return;K.moved=!0,z(_C(ve,ot,Ve,t,R)),p(IC(h.current,K.contour,K.node,ve));return}const ce=(Oe=h.current[K.contour])==null?void 0:Oe.nodes[K.node],q=K.mirror&&!g.altKey,ue=q||X?null:K.kind==="in"?ce==null?void 0:ce.out:ce==null?void 0:ce.in,W=ce?R(ce.p):null,Le=ue?R(ue):null,ae=ce&&(!X||g.shiftKey)?WC(D,ce.p,q||X?null:HC(h.current[K.contour],K.node,K.kind,R),W&&Le?Math.hypot(Le.x-W.x,Le.y-W.y):null,g.shiftKey,R,y):{point:D,guides:fo},Q=ae.guides.length?ae.point:X?D:{x:ta(D.x,o),y:ta(D.y,o)},Ne=K.kind==="in"?ce==null?void 0:ce.in:ce==null?void 0:ce.out;!K.moved&&Ne&&Q.x===Ne.x&&Q.y===Ne.y||(K.moved=!0,z(ae.guides),p(PC(h.current,K.contour,K.node,K.kind,Q,q)))},J=g=>{z(fo);const X=P.current;if(X&&g.pointerId===X.pointerId){P.current=null,g.stopPropagation();const ue=b.current;ue!=null&&ue.hasPointerCapture(X.pointerId)&&ue.releasePointerCapture(X.pointerId),X.moved&&F(h.current,{preserveShape:!0});return}const Z=S.current;if(Z&&g.pointerId===Z.pointerId){S.current=null,g.stopPropagation();const ue=b.current;ue!=null&&ue.hasPointerCapture(Z.pointerId)&&ue.releasePointerCapture(Z.pointerId),Z.moved?F(h.current,{preserveShape:!0}):N([]);return}const ne=f.current;if(ne&&g.pointerId===ne.pointerId){f.current=null,g.stopPropagation();const ue=b.current;ue!=null&&ue.hasPointerCapture(ne.pointerId)&&ue.releasePointerCapture(ne.pointerId),ne.moved&&F(h.current);return}const ye=x.current;if(!ye||g.pointerId!==ye.pointerId)return;x.current=null,g.stopPropagation();const K=b.current;K!=null&&K.hasPointerCapture(ye.pointerId)&&K.releasePointerCapture(ye.pointerId);const D=Math.hypot(g.clientX-ye.clientOrigin.x,g.clientY-ye.clientOrigin.y);if(ye.moved||D>jC){ye.moved&&F(h.current);return}if(!ye.toggleOnRelease||g.type!=="pointerup")return;const q=qd(h.current,ye.contour,ye.node);q!==h.current&&(p(q),F(q))},Se=g=>{g.stopPropagation()},Re=g=>{var X,Z;g.stopPropagation(),g.preventDefault(),ie(),(X=b.current)==null||X.focus({preventScroll:!0}),S.current={pointerId:g.pointerId,origin:ee(g.clientX,g.clientY),startContours:zn(i),bbox:Ci(i),moved:!1},(Z=b.current)==null||Z.setPointerCapture(g.pointerId)},pe=(g,X)=>{var D,ce;g.stopPropagation(),g.preventDefault(),ie(),(D=b.current)==null||D.focus({preventScroll:!0}),N([]),d("shape");const Z=Ci(i),ne=Pa(Z,jp(X)),ye=ll(Z,X),K=Math.hypot(ye.x-ne.x,ye.y-ne.y);!isFinite(K)||K<=0||(P.current={pointerId:g.pointerId,corner:X,origin:ne,startDistance:K,startContours:zn(i),moved:!1},(ce=b.current)==null||ce.setPointerCapture(g.pointerId))},he=(g,X,Z,ne)=>{var D,ce,q,ue;g.stopPropagation(),g.preventDefault(),ie(),(D=b.current)==null||D.focus({preventScroll:!0});const ye=(ce=i[Z])==null?void 0:ce.nodes[ne];if(!ye)return;if(g.altKey){const W=X==="anchor"?zp(i,Z,ne):RC(i,Z,ne,X);if(W===i)return;N(X==="anchor"?[]:[{contour:Z,node:ne}]),p(W),F(W);return}const K=g.metaKey||g.ctrlKey;if(X==="anchor"&&g.shiftKey&&!K){N(W=>W.some(Le=>Le.contour===Z&&Le.node===ne)?W.filter(Le=>!(Le.contour===Z&&Le.node===ne)):[...W,{contour:Z,node:ne}]);return}if(X==="anchor"&&!K&&w.length>1&&w.some(W=>W.contour===Z&&W.node===ne)){f.current={pointerId:g.pointerId,origin:ee(g.clientX,g.clientY),startContours:zn(i),selection:w,moved:!1},(q=b.current)==null||q.setPointerCapture(g.pointerId);return}N([{contour:Z,node:ne}]),x.current={kind:X,contour:Z,node:ne,pointerId:g.pointerId,origin:ee(g.clientX,g.clientY),clientOrigin:{x:g.clientX,y:g.clientY},anchor:ye.p,center:$C(i),mirror:X!=="anchor"&&!!(ye.in&&ye.out),toggleOnRelease:K,moved:!1},(ue=b.current)==null||ue.setPointerCapture(g.pointerId)},te=g=>{g.stopPropagation(),g.preventDefault(),ie();const X=dn(i,R),Z=Yd(X,de(g.clientX,g.clientY));if(!Z||Z.distance>dl)return;const{contours:ne,nodeIndex:ye}=MC(i,Z.contour,Z.segment,Z.t);ye<0||(N([{contour:Z.contour,node:ye}]),p(ne),F(ne))},le=g=>{if(g.key==="="||g.key==="+"||g.key==="-"||g.key==="_"){g.preventDefault(),g.stopPropagation();const K=Ci(i);if(!isFinite(K.minX)||!isFinite(K.maxX))return;const D={x:(K.minX+K.maxX)/2,y:(K.minY+K.maxY)/2},q=g.key==="="||g.key==="+"?tu:1/tu,ue=Gd(i,D,q);p(ue),F(ue,{preserveShape:!0});return}if(g.key==="Escape"){g.stopPropagation(),N([]),d("none");return}if(!w.length)return;if(g.key==="Backspace"||g.key==="Delete"){g.preventDefault(),g.stopPropagation();const K=LC(i,w);if(K===i)return;N([]),p(K),F(K);return}const X=o>0?o:XC,Z=g.shiftKey?X*10:X,ne={ArrowLeft:[-Z,0],ArrowRight:[Z,0],ArrowUp:[0,-Z],ArrowDown:[0,Z]}[g.key];if(!ne)return;g.preventDefault(),g.stopPropagation();const ye=Ud(i,w,ne[0],ne[1]);p(ye),F(ye)},re=s.useMemo(()=>_o(dn(i,R)),[i,R]),fe=s.useMemo(()=>Ci(i),[i]),xe=R({x:fe.minX,y:fe.minY}),Te={width:R({x:fe.maxX,y:fe.minY}).x-xe.x,height:R({x:fe.minX,y:fe.maxY}).y-xe.y},me=$&&w.length===0&&isFinite(fe.minX)&&isFinite(fe.maxX)&&fe.maxX>fe.minX&&fe.maxY>fe.minY,be=w.length>0||$,we=be;return a.jsxs("svg",{ref:b,className:`${e}-editor${be?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:le,onPointerDown:()=>{var g;return(g=b.current)==null?void 0:g.focus({preventScroll:!0})},onPointerMove:se,onPointerLeave:ie,onPointerUp:J,onPointerCancel:J,onLostPointerCapture:J,onContextMenu:g=>{g.preventDefault()},"data-pretext-path-editor":!0,"data-selection":"none",children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>{N([]),d("none")},onClick:te}),we&&a.jsx("path",{className:`${e}-editor-outline`,d:re}),we&&V.map((g,X)=>a.jsx("line",{className:`${e}-editor-snap ${e}-editor-snap-${g.kind}`,x1:g.a.x,y1:g.a.y,x2:g.b.x,y2:g.b.y},`${g.kind}-${X}`)),a.jsx("path",{ref:m,className:`${e}-editor-body`,d:re,fillRule:"evenodd",onPointerDown:Re,onClick:te}),we&&a.jsx("path",{className:`${e}-editor-hit`,d:re,style:{strokeWidth:zC},onClick:te}),we&&H&&a.jsx("rect",{className:`${e}-editor-add-preview`,x:H.point.x-On/2,y:H.point.y-On/2,width:On,height:On,rx:H.curved?On/2:0}),we&&i.map((g,X)=>g.nodes.map((Z,ne)=>{const ye=w.some(D=>D.contour===X&&D.node===ne),K=R(Z.p);return a.jsxs("g",{children:[ye&&w.length===1&&["in","out"].map(D=>{const ce=Z[D];if(!ce)return null;const q=R(ce);return a.jsxs("g",{children:[a.jsx("line",{className:`${e}-editor-handle-line`,x1:K.x,y1:K.y,x2:q.x,y2:q.y}),a.jsx("circle",{className:`${e}-editor-handle`,cx:q.x,cy:q.y,r:VC}),a.jsx("circle",{className:`${e}-editor-grab`,cx:q.x,cy:q.y,r:so,onPointerDown:ue=>he(ue,D,X,ne),onClick:Se})]},D)}),a.jsx("rect",{className:`${e}-editor-anchor${ye?` ${e}-editor-anchor-selected`:""}`,x:K.x-On/2,y:K.y-On/2,width:On,height:On,rx:_p(Z)?On/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:K.x-so,y:K.y-so,width:so*2,height:so*2,onPointerDown:D=>he(D,"anchor",X,ne),onClick:Se,onDoubleClick:D=>{D.stopPropagation(),D.preventDefault();const ce=qd(i,X,ne);p(ce),F(ce)}})]},`${X}-${ne}`)})),me&&a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:xe.x,y:xe.y,width:Te.width,height:Te.height}),["nw","ne","se","sw"].map(g=>{const X=R(ll(fe,g)),Z=g==="ne"||g==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:X.x-aa/2,y:X.y-aa/2,width:aa,height:aa}),a.jsx("rect",{className:`${e}-editor-scale-grab${Z?` ${e}-editor-scale-grab-nesw`:""}`,x:X.x-ra/2,y:X.y-ra/2,width:ra,height:ra,onPointerDown:ne=>pe(ne,g),onClick:Se})]},g)})]})]})}const qC=4e3,YC=/^(?:https?:|mailto:|tel:)/i;function Vp(e){return!!e&&typeof e=="object"&&e.type==="link"}function KC(e){if(!e)return;const t=e.replace(/\s+/g,"");if(!(/^[a-z][a-z0-9+.-]*:/i.test(t)&&!YC.test(t)))return t}function QC(e){const t=[];return e.forEach((n,i)=>{const o=(r,l,c)=>{for(const d of r){if(Vp(d)){o(d.children??[],KC(d.value),d.target);continue}const u=d,p=(u==null?void 0:u.text)??"";if(p.trim())for(const v of p.split(/\s+/))v&&t.push({text:v,leaf:u,href:l,target:c,para:i})}};o((n==null?void 0:n.children)??[])}),t}function nu(e){return{...e.fontFamily&&{fontFamily:Do(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}function ZC(e){return e.map(t=>{const n=[],i=o=>{for(const r of o){if(Vp(r)){i(r.children??[]);continue}n.push((r==null?void 0:r.text)??"")}};return i((t==null?void 0:t.children)??[]),n.join("")})}function JC(e,t,n,i,o){if(t<=0||!e.length||n<=0||i<=0)return e;const r=o==="avoid"?1:-1;return e.map(l=>{if(!l.length)return l;let c=1/0,d=-1/0,u=1/0,p=-1/0;for(const m of l){const h=m.x*n,x=m.y*i;h<c&&(c=h),h>d&&(d=h),x<u&&(u=x),x>p&&(p=x)}const v=(c+d)/2,b=(u+p)/2;return l.map(m=>{const h=m.x*n,x=m.y*i,S=h-v,P=x-b,f=Math.sqrt(S*S+P*P);if(f<1e-6)return m;const N=Math.max(0,f+r*t)/f;return{x:(v+S*N)/n,y:(b+P*N)/i}})})}const ks=2,As=2;function eT(e,t,n,i,o){if(e.kind!=="whole")return null;const r=t[e.originalIndex],l=e.token.text;if(!r||l.length<ks+As)return null;const c=Math.min(r.length-As,l.length-As);let d=-1;for(let u=c;u>=ks;u-=1)if(r[u-1]*i+o*i<=n){d=u;break}return d<ks?null:{fragmentText:`${l.slice(0,d)}-`,remainderText:l.slice(d),fragmentWidth:r[d-1]+o,remainderWidth:Math.max(0,e.width-r[d-1])}}function iu(e){const{tokens:t,widths:n,rings:i,mode:o,align:r,scale:l,width:c,height:d,allowOverflow:u,capInset:p,capLines:v}=e,b=!!e.hyphenate,m=e.charWidths??[],h=e.hyphenWidth??0,x=e.lineHeight*l,S=e.spaceWidth*l,P=Math.max(0,e.shapeMargin??0),f=[],w=t.map((A,Y)=>({token:A,originalIndex:Y,width:n[Y],kind:"whole"}));if(!w.length||c<=0||x<=0)return{segments:f,placed:0,height:0,capLeft:0,capTop:0,renderTokens:t};const N=Math.max(1,S*.5),V=x*nC,B=JC(i,P,c,d,o),H=Math.max(1,Math.floor(e.columns??1)),_=H>1?Math.max(0,e.columnGap??0):0,z=(c-_*(H-1))/H;let $=0,E=0,j=0,L=0,C=0,T=null;for(let A=0;A<H&&$<w.length&&z>0;A+=1){const Y=A*(z+_),R=Y+z,y=u&&A===H-1;let U=w[$].token.para,ee=0;for(;$<w.length&&j<qC;){const de=ee+x>d;if(de&&!y)break;const F=w[$].token.para;if(F>U+1){ee+=x*(F-U-1),U=F-1,j+=1;continue}let ie=de?[{x0:Y,x1:R}]:dC(B,(ee+V)/d,(ee+x-V)/d,o).map(se=>({x0:Math.max(Y,se.x0*c),x1:Math.min(R,se.x1*c)})).filter(se=>se.x1>se.x0);p>0&&v>0&&A===0&&!de&&ie.length&&(T===null&&(T=j,L=ie[0].x0,C=ee),j-T<v&&(ie=cC(ie,{x0:L,x1:L+p})));const I=ie.reduce((se,J)=>Math.max(se,J.x1-J.x0),0);for(const se of ie){const J=se.x1-se.x0;if(J<N)continue;if($>=w.length||w[$].token.para!==F)break;const Se=$;let Re=0;for(;$<w.length&&w[$].token.para===F;){const pe=w[$],he=$===Se,te=pe.width*l,le=he?te:S+te;if(Re+le<=J){Re+=le,$+=1;continue}if(he&&J>=I-.5&&te>z-.5){Re+=le,$+=1;continue}if(b){const fe=J-Re-(he?0:S),xe=eT(pe,m,fe,l,h);if(xe){const Te={token:{...pe.token,text:xe.fragmentText},originalIndex:pe.originalIndex,width:xe.fragmentWidth,kind:"fragment"},me={token:{...pe.token,text:xe.remainderText},originalIndex:pe.originalIndex,width:xe.remainderWidth,kind:"remainder"};w.splice($,1,Te,me),Re+=(he?0:S)+xe.fragmentWidth*l,$+=1}}break}if($>Se){const pe=$>=w.length||w[$].token.para!==F;f.push({top:ee,left:se.x0,width:J,from:Se,to:$,justify:r==="justify"&&!pe})}if($>=w.length||w[$].token.para!==F)break}U=F,ee+=x,j+=1}E=Math.max(E,ee)}let G=0;if($>0){const A=w[$-1];G=A.kind==="fragment"?A.originalIndex:A.originalIndex+1}return{segments:f,placed:G,height:f.length?E:0,capLeft:L,capTop:C,renderTokens:w.map(A=>A.token)}}const tT=.12,nT=2,iT=10,Fs=.25,oT=e=>{const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}},rT=(e,t)=>Math.abs(e.top-t.top)<.5&&Math.abs(e.left-t.left)<.5&&Math.abs(e.width-t.width)<.5&&Math.abs(e.height-t.height)<.5,aT=(e,t)=>{const[n,i]=s.useState(null);return s.useEffect(()=>{if(!e||!t){i(null);return}let o=0,r=null;const l=()=>{const c=oT(e);(!r||!rT(r,c))&&(r=c,i(c)),o=requestAnimationFrame(l)};return l(),()=>cancelAnimationFrame(o)},[e,t]),n},Ns=(e,t)=>{if(!(t.width>0)||!(t.height>0))return e;const n=Math.min(t.width,t.height),i=(t.width-n)/2,o=(t.height-n)/2;return e.map(r=>r.map(l=>({x:(i+l.x*n)/t.width,y:(o+l.y*n)/t.height})))},nr=typeof window>"u"?s.useEffect:s.useLayoutEffect;function sT(){return typeof document>"u"?null:document.body}function lT({P:e,item:t,shape:n,customPath:i,pathFit:o,viewBox:r,mode:l,align:c,allowOverflow:d,fitEnabled:u,scale:p,onFitScale:v,padding:b,columns:m,gutter:h,hyphenate:x,showOverflowIndicator:S,dropCapLines:P,dropCapSize:f,showGuides:w,typography:N,imageUrl:V,imageFocalX:B,imageFocalY:H,imageScale:_,imageCustomPath:z,imagePathEdited:$,pathDragActive:E,pathCarryImage:j,onCarryImageConsumed:L,pathEditor:C,imageEditor:T}){var jt,xt;const G=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[A,Y]=s.useState(null),R=s.useRef(null),[y,U]=s.useState({width:0,height:0}),[ee,de]=s.useState(0),[F,ie]=s.useState(0),[I,se]=s.useState(null),[J,Se]=s.useState(0),[Re,pe]=s.useState("none");s.useEffect(()=>{!C&&!T&&pe("none")},[C,T]);const[he,te]=s.useState(null);s.useEffect(()=>{if(!V||typeof Image>"u"){te(null);return}let Ce=!1;const He=new Image;return He.onload=()=>{Ce||te({width:He.naturalWidth,height:He.naturalHeight})},He.src=V,()=>{Ce=!0}},[V]);const le=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),re=s.useMemo(()=>QC(le),[le]),fe=s.useMemo(()=>ZC(le),[le]),xe=P>0&&f>1?((xt=(jt=re[0])==null?void 0:jt.text)==null?void 0:xt.charAt(0))??"":"",Te=(C==null?void 0:C.contours)??null,me=s.useMemo(()=>{let Ce=[];if(Te){const He=$r(Te);He.length&&(Ce=wo(He,r))}if(!Ce.length){const He=i.trim(),lt=He?Bd(He,o,r):null;lt&<.length?Ce=lt:Ce=tl(n==="custom"?"rectangle":n)}return n==="circle"?Ns(Ce,y):Ce},[Te,n,i,o,r,y.width,y.height]),be=C==null?void 0:C.onConvert,we=(C==null?void 0:C.needsConversion)??!1,g=s.useMemo(()=>{if(n==="circle")return!1;const Ce=Te??(i.trim()?Ri(i):null);return!!(Ce&&Dp(Ce,r))},[Te,i,r,n]),[X,Z]=s.useState(null);nr(()=>{if(!g){X&&Z(null);return}!X&&y.width>0&&y.height>0&&Z({width:y.width,height:y.height})},[g,y.width,y.height,X]);const ne=s.useMemo(()=>{if(!g||y.width<=0||y.height<=0)return me;const Ce=X??y,He=r.width/Ce.width,lt=r.height/Ce.height;return me.map(et=>et.map(yt=>({x:yt.x*He,y:yt.y*lt})))},[me,g,X,r.width,r.height,y.width,y.height]),ye=s.useMemo(()=>{if(Te){const et=$r(Te);if(et.length){const yt=wo(et,r);return n==="circle"?Ns(yt,y):yt}}const Ce=z.trim(),He=Ce?Bd(Ce,o,r):null,lt=He&&He.length?He:tl(n==="custom"?"rectangle":n);return n==="circle"?Ns(lt,y):lt},[Te,n,z,o,r,y.width,y.height]),K=s.useMemo(()=>{if(!g||y.width<=0||y.height<=0)return ye;const Ce=X??y,He=r.width/Ce.width,lt=r.height/Ce.height;return ye.map(et=>et.map(yt=>({x:yt.x*He,y:yt.y*lt})))},[ye,g,X,r.width,r.height,y.width,y.height]),D=s.useRef(null),ce=s.useRef(!1);s.useEffect(()=>{if(!(!be||y.width<=0||y.height<=0)){if(g){if(D.current===i)return;const Ce=Te??(i.trim()?Ri(i):null);if(!(Ce!=null&&Ce.length))return;const He=dn(Ce,lt=>({x:r.x+(lt.x-r.x)/y.width*r.width,y:r.y+(lt.y-r.y)/y.height*r.height}));D.current=_o(He),be(He);return}!we||!me.length||ce.current||(ce.current=!0,be(dn(Op(me),Ce=>({x:Ce.x*La,y:Ce.y*La}))))}},[we,g,be,me,Te,i,r,y.width,y.height]);const q=s.useCallback(()=>{const Ce=A;if(!Ce)return;const He=Ce.getBoundingClientRect(),lt=window.getComputedStyle(Ce),et=parseFloat(lt.paddingTop)||0;de(At=>Math.abs(At-et)<.5?At:et);const yt=parseFloat(lt.columnGap)||0;ie(At=>Math.abs(At-yt)<.5?At:yt);const Rt={width:He.width,height:He.height};U(At=>Math.abs(At.width-Rt.width)<.5&&Math.abs(At.height-Rt.height)<.5?At:Rt)},[A]);nr(()=>{const Ce=A;if(!Ce||typeof ResizeObserver>"u")return;q();const He=new ResizeObserver(q);return He.observe(Ce),()=>He.disconnect()},[A,q]),nr(()=>{q()},[b,h,q]),s.useEffect(()=>{const Ce=typeof document<"u"?document.fonts:void 0;Ce!=null&&Ce.ready&&Ce.ready.then(()=>{Se(He=>He+1)})},[]),nr(()=>{const Ce=R.current;if(!Ce)return;if(!re.length){se(null);return}const He=[],lt=document.createDocumentFragment();for(const tt of re){const Mt=document.createElement("span");Object.assign(Mt.style,nu(tt.leaf)),Mt.textContent=tt.text,lt.appendChild(Mt),He.push(Mt)}const et=document.createElement("span");et.textContent=" ",lt.appendChild(et);const yt=document.createElement("span");yt.textContent="-",lt.appendChild(yt);const Rt=xe||"H",At=document.createElement("span");At.textContent=Rt,At.style.lineHeight="1",lt.appendChild(At),Ce.replaceChildren(lt);const qt=window.getComputedStyle(Ce),$t=parseFloat(qt.fontSize)||16,zt=parseFloat(qt.lineHeight),on=Number.isNaN(zt)?$t*1.2:zt,vt=Math.max(on,$t),ft=document.createElement("span");ft.textContent=Rt,ft.style.lineHeight=`${vt}px`;const Me=document.createElement("span");Me.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",ft.appendChild(Me),Ce.appendChild(ft);const nt=ft.getBoundingClientRect().top,ct=Me.getBoundingClientRect().top,gt=Math.max(1,ct-nt);ft.remove();let Et=gt*.8;const dt=document.createElement("canvas").getContext("2d"),Ot=tt=>`${qt.fontStyle} ${qt.fontWeight} ${tt}px ${qt.fontFamily}`;if(dt){dt.font=Ot($t);const tt=dt.measureText(Rt).actualBoundingBoxAscent;tt>0&&(Et=tt)}const Lt=f>1?(f-1)*vt+Et:Et;let Ht=$t*(Lt/Et);if(dt){dt.font=Ot(Ht);const tt=dt.measureText(Rt).actualBoundingBoxAscent;tt>0&&(Ht=Ht*(Lt/tt))}At.style.fontSize=`${Ht}px`,At.style.lineHeight=`${Ht}px`;const Gt=document.createElement("span");Gt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",At.appendChild(Gt);const _t=Math.max(1,Gt.getBoundingClientRect().top-At.getBoundingClientRect().top);Gt.remove();const Dt=(f-1)*vt+gt-_t,Ct=He.map(tt=>tt.getBoundingClientRect().width),O=et.getBoundingClientRect().width,Ie=yt.getBoundingClientRect().width,je=xe?At.getBoundingClientRect().width:0,Ae=x?He.map(tt=>{const Mt=tt.firstChild;if(!(Mt instanceof Text)||Mt.data.length<4)return;const ut=document.createRange(),Tt=tt.getBoundingClientRect().left,Ut=[];for(let Wt=1;Wt<=Mt.data.length;Wt+=1)ut.setStart(Mt,0),ut.setEnd(Mt,Wt),Ut.push(ut.getBoundingClientRect().right-Tt);return Ut}):[];Ce.replaceChildren(),se({widths:Ct,spaceWidth:O,dashWidth:Ie,charWidths:Ae,lineHeight:vt,capWidth:je,dropCapFontSize:Ht,dropCapTopAdjust:Dt})},[re,N,xe,P,f,J,y.width,x]);const ue=I&&xe?I.capWidth+I.lineHeight*tT:0,W=Math.max(P,Math.ceil(f)),Le=s.useMemo(()=>{if(!I||!re.length||y.width<=0||y.height<=0||!u)return 1;const Ce=et=>iu({tokens:re,widths:I.widths,spaceWidth:I.spaceWidth,lineHeight:I.lineHeight,width:y.width,height:y.height,rings:ne,mode:l,align:c,scale:et,allowOverflow:!1,capInset:ue*et,capLines:xe?W:0,hyphenate:x,charWidths:I.charWidths,hyphenWidth:I.dashWidth,shapeMargin:ee,columns:m,columnGap:F});if(Ce(1).placed>=re.length)return 1;if(Ce(Fs).placed<re.length)return Fs;let He=Fs,lt=1;for(let et=0;et<iT;et+=1){const yt=(He+lt)/2;Ce(yt).placed>=re.length?He=yt:lt=yt}return He},[I,re,y.width,y.height,ne,l,c,u,ue,xe,W,x,ee,m,F]);s.useEffect(()=>{v(Le)},[Le,v]);const ae=u?Math.min(p,Le):1,Q=s.useMemo(()=>!I||!re.length||y.width<=0||y.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0,renderTokens:re}:iu({tokens:re,widths:I.widths,spaceWidth:I.spaceWidth,lineHeight:I.lineHeight,width:y.width,height:y.height,rings:ne,mode:l,align:c,scale:ae,allowOverflow:d,capInset:ue*ae,capLines:xe?W:0,hyphenate:x,charWidths:I.charWidths,hyphenWidth:I.dashWidth,shapeMargin:ee,columns:m,columnGap:F}),[I,re,y.width,y.height,ne,l,c,ae,d,ue,xe,W,x,ee,m,F]),Ne=S&&re.length>0&&Q.placed<re.length,Oe=I?I.dropCapFontSize*ae:0,it=I?I.dropCapTopAdjust*ae:0,qe=c==="justify"?"left":c,Je=I?I.lineHeight*ae:0,ot=Q.segments.length?Q.segments[Q.segments.length-1]:null,Ve=ot?{top:ot.top+Je,left:ot.left+ot.width/2}:{top:y.height,left:y.width/2},ve=!!(C&&Te&&y.width>0&&y.height>0),Fe=!!T,Xe=(ve||Fe)&&y.width>0&&y.height>0,Ye=aT(A,Xe),Pe=Xe&&Ye?sT():null,_e=s.useRef(!1),Ke=s.useCallback(Ce=>{_e.current=Ce},[]);s.useEffect(()=>{if(!ve&&!Fe)return;const Ce=He=>{const lt=A;if(!lt)return;const et=lt.getBoundingClientRect();He.clientX>=et.left&&He.clientX<=et.right&&He.clientY>=et.top&&He.clientY<=et.bottom&&(He.preventDefault(),He.stopPropagation(),pe(Rt=>Rt==="shape"&&_e.current?Rt:Rt==="shape"&&Fe?"image":ve?"shape":"image"))};return document.addEventListener("dblclick",Ce,!0),()=>document.removeEventListener("dblclick",Ce,!0)},[ve,Fe,A]);const Ze=s.useMemo(()=>V&&y.width>0&&y.height>0?iC(K,y):null,[V,K,y.width,y.height]),st=s.useRef(null),Ue=(()=>{const Ce=st.current;return j||!$||!T||!he||!Ze||!Ce||z===Ce.customPath||Ce.shape!==n&&n!=="custom"?null:DC(Ce.bounds,Ze,he,Ce.focalX,Ce.focalY,Ce.scale)})();nr(()=>{if(!T){st.current=null;return}if(E||!he||!Ze)return;const Ce=st.current,He=!!(Ce&&z!==Ce.customPath);He&&Ue&&T.onCommit(Ue),He&&j&&(L==null||L()),st.current={rings:K,bounds:Ze,focalX:(Ue==null?void 0:Ue.focalX)??B,focalY:(Ue==null?void 0:Ue.focalY)??H,scale:(Ue==null?void 0:Ue.scale)??_,customPath:z,shape:n}},[E,j,z,n,K,Ze,T,he,B,H,_,Ue,L]);const De=st.current,ke=!!(E&&!j&&De&&!Ue),ht=ke&&De?De.focalX:(Ue==null?void 0:Ue.focalX)??B,Be=ke&&De?De.focalY:(Ue==null?void 0:Ue.focalY)??H,ze=ke&&De?De.scale:(Ue==null?void 0:Ue.scale)??_,We=ke&&De?De.bounds:Ze,mt=s.useMemo(()=>{if(!(y.width>0)||!(y.height>0))return"";let Ce=jd(i,Te,o,r,n,y);if(g){const He=X??y,lt=r.width/He.width,et=r.height/He.height;Ce=dn(Ce,yt=>({x:yt.x*lt,y:yt.y*et}))}return Vd(Ce,y)||Dd(ne,y)},[i,Te,o,r,n,y.width,y.height,g,X,ne]),rt=s.useMemo(()=>{if(!V||!(y.width>0)||!(y.height>0))return"";let Ce=jd(z,Te,o,r,n,y);if(g){const He=X??y,lt=r.width/He.width,et=r.height/He.height;Ce=dn(Ce,yt=>({x:yt.x*lt,y:yt.y*et}))}return Vd(Ce,y)||Dd(K,y)},[V,z,Te,o,r,n,y.width,y.height,g,X,K]),St=`${G}-clip`,Nt=s.useMemo(()=>{if(!We)return null;const Ce=he??{width:We.width,height:We.height},He=Vi(We,Ce,ze);return{x:Bn(We.width,He.width,ht),y:Bn(We.height,He.height,Be),width:He.width,height:He.height}},[We,he,ht,Be,ze]);return a.jsxs("div",{className:`${e}-column`,style:{padding:b,columnGap:h},ref:Y,children:[mt?a.jsxs("svg",{className:`${e}-shape-fill`,style:{top:0,left:0,width:y.width,height:y.height},viewBox:`0 0 ${y.width} ${y.height}`,preserveAspectRatio:"none","aria-hidden":!0,children:[a.jsx("path",{className:`${e}-shape-fill-path`,d:mt,fillRule:"evenodd"}),V&&rt&&We&&Nt?a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsx("clipPath",{id:St,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:rt,fillRule:"evenodd"})})}),a.jsx("image",{href:V,x:We.x+Nt.x,y:We.y+Nt.y,width:Nt.width,height:Nt.height,preserveAspectRatio:"none",clipPath:`url(#${St})`})]}):null]}):null,a.jsxs("div",{className:`${e}-flow${d?"":` ${e}-clip`}`,style:{...N,["--"+e+"-fit"]:ae,top:0,left:0,width:y.width,height:y.height},children:[a.jsx("div",{className:`${e}-measure`,ref:R,style:N,"aria-hidden":!0}),Q.segments.map((Ce,He)=>{const lt=Q.renderTokens.slice(Ce.from,Ce.to),et=He===0;return a.jsx("div",{className:`${e}-line${Ce.justify?` ${e}-line-justify`:""}`,"aria-hidden":!0,style:{top:`${Ce.top}px`,left:`${Ce.left}px`,width:`${Ce.width}px`,textAlign:Ce.justify?void 0:qe},children:lt.map((yt,Rt)=>{const qt=xe&&et&&Ce.from===0&&Rt===0?yt.text.slice(1):yt.text,$t=nu(yt.leaf),zt=yt.href?a.jsx("a",{className:`${e}-link`,href:yt.href,target:yt.target,rel:yt.target?"noopener noreferrer":void 0,style:$t,children:qt}):a.jsx("span",{style:$t,children:qt});return a.jsxs("span",{children:[!Ce.justify&&Rt>0?" ":null,zt]},Rt)})},`${Ce.from}-${Ce.to}-${He}`)}),w&&!Te&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:ne.map((Ce,He)=>a.jsx("polygon",{points:Ce.map(lt=>`${lt.x},${lt.y}`).join(" ")},He))})]}),xe&&I&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...N,top:`${Q.capTop+it}px`,left:`${Q.capLeft}px`,fontSize:`${Oe}px`,lineHeight:`${Oe}px`},children:xe}),Pe&&Ye&&(Te&&C||T)&&Xn.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:Ye.top,left:Ye.left,width:Ye.width,height:Ye.height,zIndex:nT,pointerEvents:"none"},children:[Te&&C&&a.jsx(UC,{P:e,box:{width:Ye.width,height:Ye.height},viewBox:r,contours:Te,snap:C.snap,stretchToBox:!g,uniformStretch:n==="circle",stage:Re,onStageChange:pe,onSelectionChange:Ke,onChange:C.onChange,onCommit:C.onCommit}),T&&We&&a.jsx(BC,{P:e,box:{width:Ye.width,height:Ye.height},bounds:We,natural:he,imageUrl:V,maskPath:rt,stage:Re,onStageChange:pe,focalX:ht,focalY:Be,scale:ze,onChange:T.onChange,onCommit:T.onCommit})]}),Pe),a.jsx("div",{className:`${e}-a11y`,children:fe.map((Ce,He)=>a.jsx("p",{children:Ce},He))}),Ne&&a.jsxs("svg",{className:`${e}-overflow-icon`,width:"33",height:"24",viewBox:"0 0 33 24",style:{top:Ve.top,left:Ve.left},"aria-hidden":!0,children:[a.jsx("path",{d:"M12.8,4 L20.2,4 C24.68042,4 26.9206301,4 28.631924,4.87194781 C31.3123488,6.23769248 33,8.99168887 33,12 C33,15.0083111 31.3123488,17.7623075 28.631924,19.1280522 C26.9206301,20 24.68042,20 20.2,20 L12.8,20 C8.31957995,20 6.07936993,20 4.368076,19.1280522 C1.68765116,17.7623075 0,15.0083111 0,12 C0,8.99168887 1.68765116,6.23769248 4.368076,4.87194781 C6.07936993,4 8.31957995,4 12.8,4 Z",fill:"#FF4400"}),a.jsx("path",{transform:"translate(5, 0)",fill:"#FFFFFF",d:"M12,5.625 C12.3846269,5.625 12.7016304,5.91453014 12.7449542,6.28753416 L12.75,6.375 L12.75,11.25 L17.625,11.25 C18.0392136,11.25 18.375,11.5857864 18.375,12 C18.375,12.3846269 18.0854699,12.7016304 17.7124658,12.7449542 L17.625,12.75 L12.75,12.75 L12.75,17.625 C12.75,18.0392136 12.4142136,18.375 12,18.375 C11.6153731,18.375 11.2983696,18.0854699 11.2550458,17.7124658 L11.25,17.625 L11.25,12.75 L6.375,12.75 C5.96078644,12.75 5.625,12.4142136 5.625,12 C5.625,11.6153731 5.91453014,11.2983696 6.28753416,11.2550458 L6.375,11.25 L11.25,11.25 L11.25,6.375 C11.25,5.96078644 11.5857864,5.625 12,5.625 Z"})]})]})}const Gp=["diamond","parallelogram","vase","circle","shield","bobbin","custom"],cT={x:0,y:0,width:100,height:100},dT=e=>{const t=(e??"").trim().split(/[\s,]+/).map(Number).filter(n=>!Number.isNaN(n));return t.length<4||t[2]<=0||t[3]<=0?cT:{x:t[0],y:t[1],width:t[2],height:t[3]}},uT=e=>`
|
|
27330
|
+
`;function tr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const ji={fontSettings:{type:"object",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function bi(e,t){return e?`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`:t}function ql(e){return{[bi(e,"fontFamily")]:{type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},[bi(e,"fontSettings")]:{...ji.fontSettings,scope:"common",title:""},[bi(e,"fontSize")]:{...ji.fontSize,scope:"layout",title:""},[bi(e,"lineHeight")]:{...ji.lineHeight,scope:"layout",title:""},[bi(e,"letterSpacing")]:{...ji.letterSpacing,scope:"layout",title:""},[bi(e,"wordSpacing")]:{...ji.wordSpacing,scope:"layout",title:""},[bi(e,"textAlign")]:{...ji.textAlign,scope:"layout",title:""},[bi(e,"textAppearance")]:{...ji.textAppearance,scope:"layout",title:""}}}const Z$=ql(""),J$=ql("open"),eC=ql("compact"),tC=["__componentName__",{type:"row",items:["panelHeight","navTextWidth"]},{type:"row",title:"",items:["navTextPosition","navTextOffset"]},{type:"row",title:"Logo",items:["logoMaxHeight","logoPosition"]},{type:"row",title:"Hamburger",items:["iconSize","showIcon"]},"fontFamily","fontSettings",{type:"row",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAlign","textAppearance","navGap","navPaddingLeft","navPaddingRight"],nC=["__componentName__",{type:"row",items:["compactPanelHeight","compactNavTextWidth"]},{type:"row",title:"",items:["compactNavTextPosition","compactNavTextOffset"]},{type:"row",title:"Logo",items:["compactLogoMaxHeight","compactLogoPosition"]},{type:"row",title:"Hamburger",items:["compactIconSize","compactShowIcon"]},"compactFontFamily","compactFontSettings",{type:"row",items:["compactFontSize","compactLineHeight","compactLetterSpacing","compactWordSpacing"]},"compactTextAlign","compactTextAppearance","compactNavGap","compactNavPaddingLeft","compactNavPaddingRight"],iC=["__componentName__",{type:"row",title:"Text",items:["textWidth","position"]},{type:"row",title:"Menu",items:["openPanelSize","effect"]},"openFontFamily","openFontSettings",{type:"row",items:["openFontSize","openLineHeight","openLetterSpacing","openWordSpacing"]},"openTextAlign","openTextAppearance"],ei={textTransform:"none",textDecoration:"none",fontVariant:"normal"},Ps={fontWeight:400,fontStyle:"normal"},ea={d:"Always",t:"Open Only",m:"Open Only"},oC=["left-top","center-top","right-top","left-center","center","right-center","left-bottom","center-bottom","right-bottom"],rC=["iconColor","logoColor","linkColor","backgroundColor"],aC={type:"object",version:1,settings:{sizing:"auto manual",properties:{link:{type:"array",scope:"common",display:{type:"page-url-link"},items:{type:"object",properties:{link:{type:"object",properties:{type:{type:"string",enum:["url","page","anchor"]},value:{type:"string",message:"Paste URL here..."},target:{type:"string",enum:["blank","self"]},anchor:{type:"string"}}},label:{type:"string"},showIn:{type:"string",scope:"layout",enum:["Always","Open Only","Open and Compact","Default and Open","Default and Compact"]}}}},logo:{type:"object",scope:"common",title:"Logo",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Logo",display:{type:"settings-image-input"}}}},logoMaxHeight:{type:"number",scope:"layout",title:"Max Height",display:{type:"numeric-input"},min:0,max:9999},logoPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},compactLogoPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},logoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{default:"Logo Default",hover:"Logo Hover"},display:{type:"palette-color-picker"}},panelHeight:{type:"number",scope:"layout",title:"Menu Height",display:{type:"numeric-input"},min:0,max:9999},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover"},display:{type:"palette-color-picker"}},showIcon:{type:"string",scope:"layout",title:"Show",display:{type:"toggle-cycle",enum:["on","off"]}},iconSize:{type:"number",scope:"layout",title:"Size",display:{type:"numeric-input"},min:0,max:9999},linkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{default:"Text Default",hover:"Text Hover"},display:{type:"palette-color-picker"}},compactShowIcon:{type:"string",scope:"layout",title:"Show",display:{type:"toggle-cycle",enum:["on","off"]}},compactIconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{compact:"Icon Default","compact-hover":"Icon Hover"},display:{type:"palette-color-picker"}},compactLinkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{compact:"Text Default","compact-hover":"Text Hover"},display:{type:"palette-color-picker"}},compactLogoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{compact:"Logo Default","compact-hover":"Logo Hover"},display:{type:"palette-color-picker"}},compactBackgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},openLinkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{open:"Text Default","open-hover":"Text Hover"},display:{type:"palette-color-picker"}},openLogoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{open:"Logo Default","open-hover":"Logo Hover"},display:{type:"palette-color-picker"}},menuBackgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},overlayColor:{type:"string",scope:"common",title:"Overlay Default",display:{type:"palette-color-picker"}},closeButtonColor:{type:"string",scope:"common",title:"Close Default",titleByState:{open:"Close Default","open-hover":"Close Hover"},display:{type:"palette-color-picker"}},effect:{type:"string",scope:"layout",title:"Effect",display:{type:"toggle-cycle",enum:["fade","left","top","right","bottom"]}},openPanelSize:{type:"number",scope:"layout",title:"Height",display:{type:"percentage-input"},min:0,max:100},textWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},navTextWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},navTextPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},navTextOffset:{type:"number",scope:"layout",title:"Offset",display:{type:"numeric-input"},min:-9999,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:[...oC]}},stateOverrides:{type:"object",scope:"common"},gap:tr("Gap"),navGap:{type:"number",scope:"layout",title:"Nav gap",min:0,max:100,display:{type:"range-control",visible:!1}},navPaddingLeft:{type:"number",scope:"layout",title:"Nav padding left",min:0,max:100,display:{type:"range-control",visible:!1}},navPaddingRight:{type:"number",scope:"layout",title:"Nav padding right",min:0,max:100,display:{type:"range-control",visible:!1}},textPaddingLeft:tr("Text padding left"),textPaddingRight:tr("Text padding right"),textPaddingTop:tr("Text padding top"),textPaddingBottom:tr("Text padding bottom"),compactLogoMaxHeight:{type:"number",scope:"layout",title:"Max Height",display:{type:"numeric-input"},min:0,max:9999},compactPanelHeight:{type:"number",scope:"layout",title:"Menu Height",display:{type:"numeric-input"},min:0,max:9999},compactIconSize:{type:"number",scope:"layout",title:"Size",display:{type:"numeric-input"},min:0,max:9999},compactNavTextWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},compactNavTextPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},compactNavTextOffset:{type:"number",scope:"layout",title:"Offset",display:{type:"numeric-input"},min:-9999,max:9999},compactNavGap:{type:"number",scope:"layout",title:"Nav gap",min:0,max:100,display:{type:"range-control",visible:!1}},compactNavPaddingLeft:{type:"number",scope:"layout",title:"Nav padding left",min:0,max:100,display:{type:"range-control",visible:!1}},compactNavPaddingRight:{type:"number",scope:"layout",title:"Nav padding right",min:0,max:100,display:{type:"range-control",visible:!1}},...Z$,...J$,...eC},defaults:{link:[{link:{type:"page",value:"",target:"self"},label:"Home",showIn:ea},{link:{type:"page",value:"",target:"self"},label:"Works",showIn:ea},{link:{type:"page",value:"",target:"self"},label:"About",showIn:ea},{link:{type:"page",value:"",target:"self"},label:"Contact",showIn:ea}],logo:{mode:"On",icon:"01M3QM74XE09DSJCWGD1XM6Y45"},backgroundColor:"#ffffff",logoColor:"#000000",iconColor:"#000000",linkColor:"#000000",openLinkColor:"#000000",compactIconColor:"#000000",compactLinkColor:"#000000",compactLogoColor:"#000000",compactBackgroundColor:"#ffffff",openLogoColor:"#000000",menuBackgroundColor:"#ffffff",overlayColor:"rgba(0, 0, 0, 0.45)",closeButtonColor:"#000000",effect:"fade",showIcon:"on",compactShowIcon:"on",logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",compactNavTextPosition:"center",navTextOffset:0,compactNavTextOffset:0,position:"left-top",fontFamily:"Goudy Bookletter 1911",fontSettings:Ps,textAlign:"left",openFontFamily:"Goudy Bookletter 1911",openFontSettings:Ps,openTextAlign:"left",compactFontFamily:"Goudy Bookletter 1911",compactFontSettings:Ps,compactTextAlign:"left",stateOverrides:{hover:{linkColor:"#666666",iconColor:"#666666",logoColor:"#666666"},"open-hover":{closeButtonColor:"#666666"}}},displayRules:[{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.openLogoColor.display.visible",value:!1}},{if:{name:"effect",value:"left"},then:{name:"properties.openPanelSize.title",value:"Width"}},{if:{name:"effect",value:"right"},then:{name:"properties.openPanelSize.title",value:"Width"}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconSize.display.visible",value:!1}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconSize.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconColor.display.visible",value:!1}}],layoutDefaults:{m:{position:"center",panelHeight:50/375,logoMaxHeight:30/375,logoPosition:"center",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:30/375,textWidth:240/375,openPanelSize:100,navTextWidth:120/375,gap:24/375,navGap:24/375,navPaddingLeft:20/375,navPaddingRight:20/375,textPaddingLeft:10/375,textPaddingRight:10/375,textPaddingTop:10/375,textPaddingBottom:10/375,fontSize:16/375,lineHeight:20/375,letterSpacing:0,wordSpacing:0,textAppearance:ei,openFontSize:34/375,openLineHeight:20/375,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:ei,openTextAlign:"center",compactPanelHeight:40/375,compactLogoMaxHeight:20/375,compactShowIcon:"on",compactIconSize:16/375,compactNavTextWidth:80/375,compactNavGap:24/375,compactNavPaddingLeft:20/375,compactNavPaddingRight:20/375,compactFontSize:16/375,compactLineHeight:20/375,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:ei},t:{textAlign:"center",position:"center",panelHeight:60/768,logoMaxHeight:30/768,logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:16/768,textWidth:300/768,openPanelSize:100,navTextWidth:90/768,gap:32/768,navGap:32/768,navPaddingLeft:20/768,navPaddingRight:20/768,textPaddingLeft:10/768,textPaddingRight:10/768,textPaddingTop:10/768,textPaddingBottom:10/768,fontSize:18/768,lineHeight:20/768,letterSpacing:0,wordSpacing:0,textAppearance:ei,openFontSize:75/768,openLineHeight:20/768,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:ei,openTextAlign:"center",compactTextAlign:"center",compactPanelHeight:40/768,compactLogoMaxHeight:20/768,compactShowIcon:"on",compactIconSize:16/768,compactNavTextWidth:80/768,compactNavGap:32/768,compactNavPaddingLeft:20/768,compactNavPaddingRight:20/768,compactFontSize:16/768,compactLineHeight:20/768,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:ei},d:{position:"center",panelHeight:50/1440,logoMaxHeight:30/1440,logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:20/1440,textWidth:300/1440,openPanelSize:100,navTextWidth:60/1440,gap:12/1440,navGap:64/1440,navPaddingLeft:10/1440,navPaddingRight:10/1440,textPaddingLeft:10/1440,textPaddingRight:10/1440,textPaddingTop:10/1440,textPaddingBottom:10/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:ei,textAlign:"center",openFontSize:90/1440,openLineHeight:16/1440,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:ei,openTextAlign:"center",compactPanelHeight:30/1440,compactLogoMaxHeight:20/1440,compactShowIcon:"on",compactIconSize:20/1440,compactNavTextWidth:60/1440,compactNavGap:20/1440,compactNavPaddingLeft:10/1440,compactNavPaddingRight:10/1440,compactFontSize:16/1440,compactLineHeight:16/1440,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:ei,compactTextAlign:"center"}},layout:["__componentName__","link","logo","logoMaxHeight","logoPosition","panelHeight","backgroundColor","logoColor","iconColor","showIcon","iconSize","linkColor","openLinkColor","compactShowIcon","compactIconColor","compactLinkColor","compactLogoColor","compactBackgroundColor","compactLogoMaxHeight","compactLogoPosition","compactPanelHeight","compactIconSize","compactNavTextWidth","compactNavTextPosition","compactNavTextOffset","compactNavGap","compactNavPaddingLeft","compactNavPaddingRight","compactFontFamily","compactFontSettings","compactFontSize","compactLineHeight","compactLetterSpacing","compactWordSpacing","compactTextAlign","compactTextAppearance","openLogoColor","menuBackgroundColor","overlayColor","closeButtonColor","effect","textWidth","navTextWidth","navTextPosition","navTextOffset","position","gap","navGap","navPaddingLeft","navPaddingRight","textPaddingLeft","textPaddingRight","textPaddingTop","textPaddingBottom","fontFamily","fontSettings","fontSize","lineHeight","letterSpacing","wordSpacing","textAlign","textAppearance","openFontFamily","openFontSettings","openFontSize","openLineHeight","openLetterSpacing","openWordSpacing","openTextAlign","openTextAppearance"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","logo"]},{id:"default",icon:"default",title:"Default",tooltip:"Default State",layout:tC},{id:"compact",icon:"compact",title:"Compact",tooltip:"Compact State",layout:nC,availableWhen:{navigationPosition:["switch"]}},{id:"open",icon:"open",title:"Open",tooltip:"Open State",layout:iC},{id:"links",icon:"content",title:"Links",tooltip:"Link Settings",layout:["__componentName__","link"]}],paletteBookmark:{items:[...rC],panelIds:["default","compact","open"],stateItems:{default:["iconColor","logoColor","linkColor","backgroundColor"],hover:["iconColor","logoColor","linkColor"],compact:["compactIconColor","compactLogoColor","compactLinkColor","compactBackgroundColor"],"compact-hover":["compactIconColor","compactLogoColor","compactLinkColor"],open:["closeButtonColor","openLogoColor","openLinkColor","menuBackgroundColor","overlayColor"],"open-hover":["closeButtonColor","openLogoColor","openLinkColor"]}},states:["default","hover"],statePanels:["default","compact","open"]},sC={element:K$,id:"basic-burger",name:"Basic Burger",category:"navigation",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple Burger.png"},layoutMode:"navigation",defaultSize:{d:{width:"100%",height:60/1440},t:{width:"100%",height:60/768},m:{width:"100%",height:56/375}},defaultNavigationPosition:{d:"switch",t:"switch",m:"stickyTop"},schema:aC,sourceCode:Q$,assetsPaths:{content:[],parameters:[{path:"logo.icon",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"},{path:"openFontFamily"},{path:"compactFontFamily"}]},fontRelations:{fontSettings:"fontFamily",openFontSettings:"openFontFamily",compactFontSettings:"compactFontFamily"}},Wd=120,Od=3,lC=.12,Ul={x:0,y:0,width:100,height:100};function Co(e,t){return e.map(n=>n.map(i=>({x:(i.x-t.x)/t.width,y:(i.y-t.y)/t.height})))}function Ia(e){return e<0?0:e>1?1:e}function Dd(e,t){return e.filter(n=>n.length>0).map(n=>`M ${n.map(i=>`${i.x*t.width} ${i.y*t.height}`).join(" L ")} Z`).join(" ")}function cC(e,t){let n=1/0,i=1/0,o=-1/0,r=-1/0;for(const d of e)for(const u of d){const p=u.x*t.width,v=u.y*t.height;p<n&&(n=p),p>o&&(o=p),v<i&&(i=v),v>r&&(r=v)}const l=o-n,c=r-i;return!isFinite(l)||!isFinite(c)||l<=0||c<=0?null:{x:n,y:i,width:l,height:c}}function dC(e){return e.map(([t,n])=>({x:t,y:n}))}function Rs(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const c of e)for(const d of c)d.x<t&&(t=d.x),d.x>i&&(i=d.x),d.y<n&&(n=d.y),d.y>o&&(o=d.y);const r=i-t,l=o-n;return!isFinite(r)||!isFinite(l)||r<=0||l<=0?e:e.map(c=>c.map(d=>({x:(d.x-t)/r,y:(d.y-n)/l})))}function uC(e,t){const n=[];for(const o of e)for(let r=0;r<o.length;r+=1){const l=o[r],c=o[(r+1)%o.length];(l.y<=t&&c.y>t||c.y<=t&&l.y>t)&&n.push(l.x+(t-l.y)/(c.y-l.y)*(c.x-l.x))}n.sort((o,r)=>o-r);const i=[];for(let o=0;o+1<n.length;o+=2){const r=Ia(n[o]),l=Ia(n[o+1]);l>r&&i.push({x0:r,x1:l})}return pC(i)}function pC(e){if(e.length<2)return e;const t=[...e].sort((i,o)=>i.x0-o.x0),n=[t[0]];for(let i=1;i<t.length;i+=1){const o=n[n.length-1],r=t[i];r.x0<=o.x1?o.x1=Math.max(o.x1,r.x1):n.push({...r})}return n}function mC(e,t){const n=[];let i=0,o=0;for(;i<e.length&&o<t.length;){const r=Math.max(e[i].x0,t[o].x0),l=Math.min(e[i].x1,t[o].x1);l>r&&n.push({x0:r,x1:l}),e[i].x1<t[o].x1?i+=1:o+=1}return n}function gC(e){const t=[];let n=0;for(const i of e)i.x0>n&&t.push({x0:n,x1:i.x0}),n=Math.max(n,i.x1);return n<1&&t.push({x0:n,x1:1}),t}function hC(e,t){const n=[];for(const i of e){if(t.x1<=i.x0||t.x0>=i.x1){n.push(i);continue}t.x0>i.x0&&n.push({x0:i.x0,x1:t.x0}),t.x1<i.x1&&n.push({x0:t.x1,x1:i.x1})}return n}function fC(e,t,n,i){let o=null;for(let r=0;r<Od;r+=1){const l=Ia(t+(n-t)*r/Math.max(1,Od-1)),c=uC(e,l),d=i==="avoid"?gC(c):c;if(o=o===null?d:mC(o,d),o.length===0)return[]}return o??[]}function Bd(e,t="stretch",n=Ul){const i=e.trim();if(!i)return null;if(/^[Mm]/.test(i)){const l=ki(i),c=$r(l);if(c.length)return t==="viewbox"?Co(c,n):Rs(c);if(typeof document>"u")return null;const d=i.split(/(?=[Mm])/).map(v=>v.trim()).filter(Boolean),u=document.createElementNS("http://www.w3.org/2000/svg","svg"),p=[];for(const v of d){const x=document.createElementNS("http://www.w3.org/2000/svg","path");x.setAttribute("d",v),u.appendChild(x);let m=0;try{m=x.getTotalLength()}catch{m=0}if(!m)continue;const h=[];for(let b=0;b<Wd;b+=1){const S=x.getPointAtLength(b/Wd*m);h.push({x:S.x,y:S.y})}p.push(h)}return p.length?t==="viewbox"?Co(p,n):Rs(p):null}const o=i.split(/[\s,]+/).map(Number).filter(l=>!Number.isNaN(l));if(o.length<6)return null;const r=[];for(let l=0;l+1<o.length;l+=2)r.push({x:o[l],y:o[l+1]});return t==="viewbox"?Co([r],n):Rs([r])}const Yl={bobbin:"M57.63,0 L57.63,37.24 L74.66,37.24 L74.66,56.07 L57.63,100 L33.84,100 L16.81,56.07 L16.81,37.24 L33.84,37.24 L33.84,0 Z",circle:"M50,0 C77.61,0 100,22.39 100,50 C100,77.61 77.61,100 50,100 C22.39,100 0,77.61 0,50 C0,22.39 22.39,0 50,0 Z",shield:"M0,0 L100,0 L100,50 L50,100 L0,50 Z",vase:"M25.37,0 L91.55,0 C91.55,0 74.8,25.14 83.07,50.03 C91.34,74.92 74.61,100 74.61,100 L8.43,100 C8.43,100 32.3,75.08 23.9,50 C15.5,24.92 25.37,0 25.37,0 Z",parallelogram:"M25.37,0 L91.55,0 L74.61,100 L8.43,100 Z",diamond:"M50,0 L80,50 L50,100 L20,50 Z"},Zs="0 0 100 100",La=100,Js=16,yC=12,vC=16,Ms=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,xC=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g,zd=Math.PI/4,bC=8,SC=Math.PI/18,wC=8,yo=24,vo=[];function $C(){return[{closed:!0,nodes:[{p:{x:0,y:0},in:null,out:null},{p:{x:1,y:0},in:null,out:null},{p:{x:1,y:1},in:null,out:null},{p:{x:0,y:1},in:null,out:null}]}]}function Es(e,t){return un(e,n=>({x:(n.x-t.x)/t.width,y:(n.y-t.y)/t.height}))}function CC(e){const t=Li(e),n=t.maxX-t.minX,i=t.maxY-t.minY;return!isFinite(n)||!isFinite(i)||n<=0||i<=0?e:un(e,o=>({x:(o.x-t.minX)/n,y:(o.y-t.minY)/i}))}function TC(e,t){if(!(t.width>0)||!(t.height>0))return e;const n=Math.min(t.width,t.height),i=(t.width-n)/2,o=(t.height-n)/2;return un(e,r=>({x:(i+r.x*n)/t.width,y:(o+r.y*n)/t.height}))}function jd(e,t,n,i,o,r){let l=[];if(t&&t.length)l=Es(t,i);else{const c=e.trim();if(c&&/^[Mm]/.test(c)){const d=ki(c);d.length&&(l=n==="viewbox"?Es(d,i):CC(d))}if(!l.length){const d=o!=="custom"?Yl[o]:void 0;d?l=Es(ki(d),Ul):l=$C()}}return o==="circle"?TC(l,r):l}function Vd(e,t){return!(t.width>0)||!(t.height>0)||!e.length?"":Wo(un(e,n=>({x:n.x*t.width,y:n.y*t.height})))}function el(e){const t=e==="rectangle"||e==="custom"?void 0:Yl[e];return t?Co($r(ki(t)),Ul):[dC([[0,0],[1,0],[1,1],[0,1]])]}function IC(e){const t=e.match(xC);return t?t.map(Number).filter(n=>!Number.isNaN(n)):[]}function In(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function tl(e,t){return{x:t.x*2-e.x,y:t.y*2-e.y}}function mn(e){return{x:e.x,y:e.y}}function LC(e){return{p:mn(e.p),in:e.in?mn(e.in):null,out:e.out?mn(e.out):null}}function Vn(e){return e.map(t=>({closed:t.closed,nodes:t.nodes.map(LC)}))}function un(e,t){return e.map(n=>({closed:n.closed,nodes:n.nodes.map(i=>({p:t(i.p),in:i.in?t(i.in):null,out:i.out?t(i.out):null}))}))}function Gd(e,t,n,i=n){return un(e,o=>({x:t.x+(o.x-t.x)*n,y:t.y+(o.y-t.y)*i}))}function PC(e,t,n,i,o,r,l){let c=Math.abs(t),d=Math.abs(n);if(!c||!d||e.x===l.x&&e.y===l.y)return[{c1:mn(e),c2:mn(l),p:mn(l)}];const u=i*Math.PI/180,p=Math.cos(u),v=Math.sin(u),x=(e.x-l.x)/2,m=(e.y-l.y)/2,h=p*x+v*m,b=-v*x+p*m,S=h*h/(c*c)+b*b/(d*d);if(S>1){const K=Math.sqrt(S);c*=K,d*=K}const M=o===r?-1:1,y=c*c*b*b+d*d*h*h,$=Math.max(0,c*c*d*d-y),R=y===0?0:M*Math.sqrt($/y),X=R*c*b/d,B=-R*d*h/c,O=p*X-v*B+(e.x+l.x)/2,N=v*X+p*B+(e.y+l.y)/2,z=Math.atan2((b-B)/d,(h-X)/c);let I=Math.atan2((-b-B)/d,(-h-X)/c)-z;!r&&I>0&&(I-=Math.PI*2),r&&I<0&&(I+=Math.PI*2);const j=Math.max(1,Math.ceil(Math.abs(I)/(Math.PI/2))),E=I/j,w=4/3*Math.tan(E/4),L=(K,P)=>({x:O+p*c*K-v*d*P,y:N+v*c*K+p*d*P}),V=[];let _=z;for(let K=0;K<j;K+=1){const P=_+E,f=Math.cos(_),U=Math.sin(_),te=Math.cos(P),ce=Math.sin(P);V.push({c1:L(f-w*U,U+w*f),c2:L(te+w*ce,ce-w*te),p:K===j-1?mn(l):L(te,ce)}),_=P}return V}function ki(e){const t=(e??"").trim();if(!t)return[];const n=[];let i=[],o=!1,r={x:0,y:0},l={x:0,y:0},c=null,d=null;const u=()=>{if(o&&i.length>2){const m=i[0],h=i[i.length-1];Math.abs(m.p.x-h.p.x)<1e-6&&Math.abs(m.p.y-h.p.y)<1e-6&&(m.in=h.in??m.in,i.pop())}i.length>1&&n.push({nodes:i,closed:o}),i=[],o=!1},p=(m,h)=>{i.push({p:m,in:qn(h??null,m),out:null}),r=m},v=m=>{if(!i.length)return;const h=i[i.length-1];h.out=qn(m,h.p)};Ms.lastIndex=0;let x=Ms.exec(t);for(;x!==null;){const m=x[1],h=m.toUpperCase(),b=m!==h,S=IC(x[2]),M=y=>b?{x:r.x+S[y],y:r.y+S[y+1]}:{x:S[y],y:S[y+1]};if(h==="Z")o=!0,u(),r=mn(l),c=null,d=null;else if(h==="M"){for(let y=0;y+1<S.length;y+=2){const $=M(y);y===0&&(u(),l=mn($)),p($)}c=null,d=null}else if(h==="L"){for(let y=0;y+1<S.length;y+=2)p(M(y));c=null,d=null}else if(h==="H"){for(const y of S)p({x:b?r.x+y:y,y:r.y});c=null,d=null}else if(h==="V"){for(const y of S)p({x:r.x,y:b?r.y+y:y});c=null,d=null}else if(h==="C"){for(let y=0;y+5<S.length;y+=6){const $=M(y),R=M(y+2),X=M(y+4);v($),p(X,R),c=R}d=null}else if(h==="S"){for(let y=0;y+3<S.length;y+=4){const $=c?tl(c,r):mn(r),R=M(y),X=M(y+2);v($),p(X,R),c=R}d=null}else if(h==="Q")for(let y=0;y+3<S.length;y+=4){const $=M(y),R=M(y+2);v(In(r,$,2/3)),p(R,In(R,$,2/3)),d=$,c=null}else if(h==="T")for(let y=0;y+1<S.length;y+=2){const $=d?tl(d,r):mn(r),R=M(y);v(In(r,$,2/3)),p(R,In(R,$,2/3)),d=$,c=null}else if(h==="A")for(let y=0;y+6<S.length;y+=7){const $=b?{x:r.x+S[y+5],y:r.y+S[y+6]}:{x:S[y+5],y:S[y+6]};for(const R of PC(r,S[y],S[y+1],S[y+2],S[y+3]!==0,S[y+4]!==0,$))v(R.c1),p(R.p,R.c2);c=null,d=null}x=Ms.exec(t)}return u(),n}function zn(e){return`${Number(e.toFixed(2))}`}function qn(e,t){return!e||Math.abs(e.x-t.x)<1e-6&&Math.abs(e.y-t.y)<1e-6?null:e}function zp(e){return!!(qn(e.in,e.p)||qn(e.out,e.p))}function Go(e,t){return!qn(e.out,e.p)&&!qn(t.in,t.p)}function Xd(e,t){if(Go(e,t))return`L${zn(t.p.x)},${zn(t.p.y)}`;const n=qn(e.out,e.p)??e.p,i=qn(t.in,t.p)??t.p;return`C${zn(n.x)},${zn(n.y)} ${zn(i.x)},${zn(i.y)} ${zn(t.p.x)},${zn(t.p.y)}`}function Wo(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const[i,...o]=n.nodes;t.push(`M${zn(i.p.x)},${zn(i.p.y)}`);let r=i;for(const l of o)t.push(Xd(r,l)),r=l;if(n.closed){const l=Xd(r,i);l.charAt(0)==="C"&&t.push(l),t.push("Z")}}return t.join(" ")}function jp(e){const t=[];for(let n=0;n+1<e.nodes.length;n+=1)t.push({from:e.nodes[n],to:e.nodes[n+1],index:n});if(e.closed&&e.nodes.length>2){const n=e.nodes.length-1;t.push({from:e.nodes[n],to:e.nodes[0],index:n})}return t}function nl(e,t,n){if(Go(e,t))return In(e.p,t.p,n);const i=e.out??e.p,o=t.in??t.p,r=1-n,l=r*r*r,c=3*r*r*n,d=3*r*n*n,u=n*n*n;return{x:l*e.p.x+c*i.x+d*o.x+u*t.p.x,y:l*e.p.y+c*i.y+d*o.y+u*t.p.y}}function $r(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const i=[];for(const o of jp(n)){if(Go(o.from,o.to)){i.push(mn(o.from.p));continue}for(let r=0;r<Js;r+=1)i.push(nl(o.from,o.to,r/Js))}n.closed||i.push(mn(n.nodes[n.nodes.length-1].p)),i.length>2&&t.push(i)}return t}function Li(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const r of $r(e))for(const l of r)l.x<t&&(t=l.x),l.x>i&&(i=l.x),l.y<n&&(n=l.y),l.y>o&&(o=l.y);return{minX:t,minY:n,maxX:i,maxY:o}}function RC(e){const t=Li(e);return!isFinite(t.minX)||!isFinite(t.maxX)||!isFinite(t.minY)||!isFinite(t.maxY)?null:{x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}}function Vp(e,t,n){const i={x:(n.x-e.x)/6,y:(n.y-e.y)/6};return{in:{x:t.x-i.x,y:t.y-i.y},out:{x:t.x+i.x,y:t.y+i.y}}}function Gp(e){return e.filter(t=>t.length>2).map(t=>{if(t.length<=yC)return{closed:!0,nodes:t.map(r=>({p:mn(r),in:null,out:null}))};const n=Math.max(1,Math.round(t.length/vC)),i=[];for(let r=0;r<t.length;r+=n)i.push(t[r]);const o=i.length;return{closed:!0,nodes:i.map((r,l)=>({p:mn(r),...Vp(i[(l-1+o)%o],r,i[(l+1)%o])}))}})}function Xp(e,t,n=1){if(!e.length)return!1;const i=Li(e);if(!isFinite(i.minX)||!isFinite(i.maxX))return!1;const o=i.maxX-i.minX,r=i.maxY-i.minY;if(o<=t.width*2.5&&r<=t.height*2.5)return!1;const l=Math.max(n,t.width*.5),c=Math.max(n,t.height*.5);return i.minX<t.x-l||i.minY<t.y-c||i.maxX>t.x+t.width+l||i.maxY>t.y+t.height+c}function MC(e,t,n,i,o,r,l){const c=t.width>0?n.width/t.width:1,d=t.height>0?n.height/t.height:1;return!(r>0)||!(l>0)||!(c>0)||!(d>0)?e:un(e,u=>{const p=i+(u.x-t.x)*r,v=o+(u.y-t.y)*l;return{x:t.x+p/c,y:t.y+v/d}})}function EC(e,t){if(!e.length)return e;const n=Li(e),i=n.maxX-n.minX,o=n.maxY-n.minY;if(!(i>0)||!(o>0)||n.minX>=t.x-1e-6&&n.minY>=t.y-1e-6&&n.maxX<=t.x+t.width+1e-6&&n.maxY<=t.y+t.height+1e-6)return e;const l=Math.min(t.width/i,t.height/o),c=t.x+(t.width-i*l)/2,d=t.y+(t.height-o*l)/2;return un(e,u=>({x:c+(u.x-n.minX)*l,y:d+(u.y-n.minY)*l}))}function qp(e){const t={x:0,y:0,width:La,height:La},n=e!=="custom"?Yl[e]:void 0,i=n?un(ki(n),r=>({x:r.x/100*t.width+t.x,y:r.y/100*t.height+t.y})):un(Gp(el("rectangle")),r=>({x:r.x*t.width+t.x,y:r.y*t.height+t.y})),o=EC(i,t);return{shape:e,customPath:Wo(o),pathFit:"viewbox",pathViewBox:Zs}}function ta(e,t){return t>0?Math.round(e/t)*t:e}function kC(e,t,n,i){var u;const o=(u=e[t])==null?void 0:u.nodes[n];if(!o)return e;const r=i.x-o.p.x,l=i.y-o.p.y,c=Vn(e),d=c[t].nodes[n];return d.p={x:o.p.x+r,y:o.p.y+l},d.in&&(d.in={x:d.in.x+r,y:d.in.y+l}),d.out&&(d.out={x:d.out.x+r,y:d.out.y+l}),c}function qd(e,t,n,i){var r;if(!t.length)return e;const o=Vn(e);for(const{contour:l,node:c}of t){const d=(r=o[l])==null?void 0:r.nodes[c];d&&(d.p={x:d.p.x+n,y:d.p.y+i},d.in&&(d.in={x:d.in.x+n,y:d.in.y+i}),d.out&&(d.out={x:d.out.x+n,y:d.out.y+i}))}return o}function AC(e,t){const n=new Map;for(const{contour:o,node:r}of t){const l=n.get(o)??[];l.push(r),n.set(o,l)}let i=e;return n.forEach((o,r)=>{const l=[...o].sort((c,d)=>d-c);for(const c of l)i=Up(i,r,c)}),i}function FC(e,t,n,i,o,r){var u;if(!((u=e[t])==null?void 0:u.nodes[n]))return e;const c=Vn(e),d=c[t].nodes[n];if(d[i]=mn(o),r){const p=i==="in"?"out":"in";d[p]=tl(o,d.p)}return c}function NC(e,t,n,i){var l;const o=(l=e[t])==null?void 0:l.nodes[n];if(!o||!o[i])return e;const r=Vn(e);return r[t].nodes[n][i]=null,r}function _C(e,t,n,i){const o=e[t];if(!o)return{contours:e,nodeIndex:-1};const r=o.nodes[n],l=o.nodes[(n+1)%o.nodes.length];if(!r||!l)return{contours:e,nodeIndex:-1};const c=Vn(e),d=c[t].nodes,u=n+1;if(Go(r,l))return d.splice(u,0,{p:In(r.p,l.p,i),in:null,out:null}),{contours:c,nodeIndex:u};const p=r.out??r.p,v=l.in??l.p,x=In(r.p,p,i),m=In(p,v,i),h=In(v,l.p,i),b=In(x,m,i),S=In(m,h,i),M=In(b,S,i),y=(n+1)%o.nodes.length;return d[n].out=x,d[y].in=h,d.splice(u,0,{p:M,in:b,out:S}),{contours:c,nodeIndex:u}}function Up(e,t,n){const i=e[t];if(!i||i.nodes.length<=3)return e;const o=Vn(e);return o[t].nodes.splice(n,1),o}function Ud(e,t,n){const i=e[t];if(!(i==null?void 0:i.nodes[n]))return e;const r=Vn(e),l=r[t].nodes,c=l[n],d=l.length,u=(n-1+d)%d,p=(n+1)%d,v=!!qn(l[u].out,l[u].p),x=!!qn(l[p].in,l[p].p);if(zp(c)||v||x)return c.in=null,c.out=null,l[u].out=null,l[p].in=null,r;const m=Vp(l[u].p,c.p,l[p].p);return c.in=m.in,c.out=m.out,r}function HC(e,t,n){const i=n.x-t.x,o=n.y-t.y,r=i*i+o*o,l=r===0?0:Math.max(0,Math.min(1,((e.x-t.x)*i+(e.y-t.y)*o)/r)),c={x:t.x+i*l,y:t.y+o*l};return{t:l,distance:Math.hypot(e.x-c.x,e.y-c.y),point:c}}function Yd(e,t){let n=null;return e.forEach((i,o)=>{for(const r of jp(i)){const l=Go(r.from,r.to)?1:Js;for(let c=0;c<l;c+=1){const d=c/l,u=(c+1)/l,p=HC(t,nl(r.from,r.to,d),nl(r.from,r.to,u));(!n||p.distance<n.distance)&&(n={contour:o,segment:r.index,t:d+(u-d)*p.t,distance:p.distance,point:p.point})}}}),n}function WC(e,t){const n=[];return e.forEach((i,o)=>{i.nodes.forEach((r,l)=>{o===t.contour&&l===t.node||n.push(r.p)})}),n}function Kd(e,t,n){const i=t.filter((r,l)=>isFinite(r)&&t.findIndex(c=>Math.abs(c-r)<1e-6)===l),o=i.map(r=>({value:r,axis:r,from:null}));for(const r of e)o.push({value:r[n],axis:null,from:r});for(const r of i)for(const l of e)o.push({value:r*2-l[n],axis:r,from:l});return o}function Qd(e,t,n,i,o){const r=i(t)[n];let l=null,c=1/0;for(const d of e){const u=n==="x"?{x:d.value,y:t.y}:{x:t.x,y:d.value},p=Math.abs(i(u)[n]-r);p>o||l&&p>=c||(l=d,c=p)}return l}function OC(e,t){return e.length===t.length&&e.every((n,i)=>n.kind===t[i].kind&&n.a.x===t[i].a.x&&n.a.y===t[i].a.y&&n.b.x===t[i].b.x&&n.b.y===t[i].b.y)}function DC(e){const t=Math.PI*2;return((e+Math.PI)%t+t)%t-Math.PI}function il(e,t){const n=t.x-e.x,i=t.y-e.y,o=Math.hypot(n,i);return o<1e-6?null:{x:n/o,y:i/o}}function BC(e,t){const n=il(e,t);return n?{kind:"align",a:{x:e.x-n.x*yo,y:e.y-n.y*yo},b:{x:t.x+n.x*yo,y:t.y+n.y*yo}}:{kind:"align",a:e,b:t}}function ol(e,t,n){return t==="x"?{kind:"center",a:{x:e,y:0},b:{x:e,y:n.height}}:{kind:"center",a:{x:0,y:e},b:{x:n.width,y:e}}}function Zd(e,t,n,i,o){if(e.axis===null)return BC(n,o(e.from??n));const r=t==="x"?{x:e.axis,y:0}:{x:0,y:e.axis};return ol(o(r)[t],t,i)}function zC(e,t,n,i,o){const r=[],l=o(e);return t&&e.x===t.value&&r.push(Zd(t,"x",l,i,o)),n&&e.y===n.value&&r.push(Zd(n,"y",l,i,o)),r}function jC(e,t,n,i){const o=e==null?void 0:e.nodes[t];if(!e||!o)return null;const r=i(o.p),l=n==="in"?o.out:o.in;if(l)return il(i(l),r);const c=e.nodes.length,d=t+(n==="in"?1:-1);if(!e.closed&&(d<0||d>=c))return null;const u=e.nodes[(d+c)%c];if(!u)return null;const p=(n==="in"?u.in:u.out)??u.p;return il(i(p),r)}function VC(e,t,n,i,o,r,l){const c=r(t),d=r(e),u=d.x-c.x,p=d.y-c.y,v=Math.hypot(u,p);if(v<1e-6)return{point:e,guides:vo};const x=Math.atan2(p,u),m=Math.round(x/zd)*zd;let h=o?m:null,b=!1;if(!o){const B=[];n&&B.push({angle:Math.atan2(n.y,n.x),smooth:!0}),B.push({angle:m,smooth:!1});for(const O of B){const N=DC(O.angle-x);if(!(Math.abs(N)>SC)&&!(Math.abs(Math.sin(N))*v>bC)){h=O.angle,b=O.smooth;break}}}const S=i!==null&&i>0&&Math.abs(v-i)<=wC;if(h===null&&!S)return{point:e,guides:vo};const M=h??x,y=S?i:v,$={x:Math.cos(M),y:Math.sin(M)},R=y+(h===null?0:yo),X=S?y:b?yo:0;return{point:l({x:c.x+$.x*y,y:c.y+$.y*y}),guides:[{kind:"angle",a:{x:c.x-$.x*X,y:c.y-$.y*X},b:{x:c.x+$.x*R,y:c.y+$.y*R}}]}}const rl=.1,al=8,GC=4,Jd=10,Pa=(e,t)=>{switch(t){case"nw":return{x:e.minX,y:e.minY};case"ne":return{x:e.maxX,y:e.minY};case"se":return{x:e.maxX,y:e.maxY};case"sw":return{x:e.minX,y:e.maxY}}},Yp=e=>{switch(e){case"nw":return"se";case"ne":return"sw";case"se":return"nw";case"sw":return"ne"}},sl=(e,t)=>{const n=Pa(e,t),i=t==="nw"||t==="sw"?-1:1,o=t==="nw"||t==="ne"?-1:1;return{x:n.x+i*Jd,y:n.y+o*Jd}},ll=(e,t)=>!(t.width>0)||!(t.height>0)||!(e.width>0)||!(e.height>0)?1:Math.max(e.width/t.width,e.height/t.height),qi=(e,t,n)=>{const i=ll(e,t)*n;return{width:t.width*i,height:t.height*i}},jn=(e,t,n)=>(e-t)*n,xo=(e,t,n,i)=>{const o=e-t;if(Math.abs(o)<1e-6)return .5;const r=n/o;return(i==null?void 0:i.clamp)===!1?r:Math.abs(o)<GC?.5:Ia(r)},XC=(e,t,n,i,o,r)=>{const l=qi(e,n,r),c=e.x+jn(e.width,l.width,i),d=e.y+jn(e.height,l.height,o),u=ll(e,n),p=ll(t,n),v=Math.min(al,Math.max(rl,p>0?r*(u/p):r)),x=qi(t,n,v);return{focalX:xo(t.width,x.width,c-t.x,{clamp:!1}),focalY:xo(t.height,x.height,d-t.y,{clamp:!1}),scale:v}},qC=6,UC=3,YC=2,ks="",KC=new RegExp("\\p{L}","gu"),eu=20,QC={arb:"ar",azj:"az",bel:"be",bos:"bs",bul:"bg",ces:"cs",deu:"de",eng:"en",fas:"fa",fra:"fr",hau:"ha",hin:"hi",hrv:"hr",hun:"hu",ibo:"ig",ind:"id",ita:"it",jav:"jv",kaz:"kk",kin:"rw",lin:"ln",mar:"mr",nep:"ne",nld:"nl",nya:"ny",pol:"pl",por:"pt",ron:"ro",run:"rn",rus:"ru",som:"so",spa:"es",srp:"sr",sun:"su",swe:"sv",swh:"sw",tgl:"tl",tur:"tr",ukr:"uk",urd:"ur",uzn:"uz",vie:"vi",yor:"yo",zlm:"ms",zul:"zu"},cl={be:()=>Promise.resolve().then(()=>require("./index-B1vNL0m-.js")).then(e=>e.index),bg:()=>Promise.resolve().then(()=>require("./index-kFrlcZxC.js")).then(e=>e.index),cs:()=>Promise.resolve().then(()=>require("./index-B6E31HBG.js")).then(e=>e.index),de:()=>Promise.resolve().then(()=>require("./index-CNFsG2yO.js")).then(e=>e.index),en:()=>Promise.resolve().then(()=>require("./index-x_p4zv7D.js")).then(e=>e.index),"en-gb":()=>Promise.resolve().then(()=>require("./index-BkmSPu6z.js")).then(e=>e.index),es:()=>Promise.resolve().then(()=>require("./index-CADju5Cy.js")).then(e=>e.index),fr:()=>Promise.resolve().then(()=>require("./index-Rwqfce2n.js")).then(e=>e.index),hi:()=>Promise.resolve().then(()=>require("./index-HhE2sJlU.js")).then(e=>e.index),hr:()=>Promise.resolve().then(()=>require("./index-DapMA5nM.js")).then(e=>e.index),hu:()=>Promise.resolve().then(()=>require("./index-kjKI70JX.js")).then(e=>e.index),id:()=>Promise.resolve().then(()=>require("./index-BlAuAthm.js")).then(e=>e.index),it:()=>Promise.resolve().then(()=>require("./index-BK-G0i5L.js")).then(e=>e.index),mr:()=>Promise.resolve().then(()=>require("./index-CIgabTwE.js")).then(e=>e.index),nl:()=>Promise.resolve().then(()=>require("./index-BrL2zv3x.js")).then(e=>e.index),pl:()=>Promise.resolve().then(()=>require("./index-DehKWXGA.js")).then(e=>e.index),pt:()=>Promise.resolve().then(()=>require("./index-C0cxTf5o.js")).then(e=>e.index),ro:()=>Promise.resolve().then(()=>require("./index-CJ0NMfJ3.js")).then(e=>e.index),ru:()=>Promise.resolve().then(()=>require("./index-gBhj9Tcu.js")).then(e=>e.index),sr:()=>Promise.resolve().then(()=>require("./index-1HMblVmZ.js")).then(e=>e.index),sv:()=>Promise.resolve().then(()=>require("./index-CDO1-R3j.js")).then(e=>e.index),tr:()=>Promise.resolve().then(()=>require("./index-CG_43X7q.js")).then(e=>e.index),uk:()=>Promise.resolve().then(()=>require("./index-Ypt3vHbi.js")).then(e=>e.index)},ZC=(e,t)=>{const n=e;return t(n)??t(n.default)??null};let tu=null;const JC=()=>(tu??(tu=Promise.resolve().then(()=>require("./index-2JTNRDR1.js")).then(e=>e.franc).catch(()=>null)),tu),nu=new Map,eT=e=>{let t=nu.get(e);return t||(t=cl[e]().then(n=>ZC(n,i=>i==null?void 0:i.hyphenateSync)).catch(()=>null),nu.set(e,t)),t},iu=e=>{if(!e)return null;const t=e.toLowerCase();if(cl[t])return t;const n=t.split("-")[0];return cl[n]?n:null},tT=(e,t)=>{const n=t.trim();if(n.length<eu)return;const i=e(n,{minLength:eu});if(i!=="und")return QC[i]??i},nT={hyphenateSync:null};function iT(e,t){const[n,i]=s.useState(null);return s.useEffect(()=>{if(!e)return;let o=!1;return JC().then(async r=>{const l=r?tT(r,t):void 0,c=typeof document<"u"?document.documentElement.lang:"",d=iu(l)??iu(c)??"en",u=await eT(d);o||i({lang:l,hyphenateSync:u})}),()=>{o=!0}},[e,t]),e&&n?n:nT}const ou=e=>{var t;return((t=e.match(KC))==null?void 0:t.length)??0};function oT(e,t){if(e.length<2||e.includes(ks))return;const n=new Set;if(t){const o=t(e,{hyphenChar:ks,minWordLength:qC});let r=0;for(let l=0;l<o.length;l+=1)o[l]===ks?n.add(r):r+=1}for(let o=1;o<e.length-1;o+=1)e[o-1]==="-"&&n.add(o);const i=[...n].filter(o=>{const r=e[o-1]==="-";return o>0&&o<e.length&&ou(e.slice(0,o))>=(r?1:UC)&&ou(e.slice(o))>=(r?1:YC)}).sort((o,r)=>o-r);return i.length?i:void 0}const ru=1.08,na=14,ia=8;function rT({P:e,box:t,bounds:n,natural:i,imageUrl:o,maskPath:r,stage:l,onStageChange:c,focalX:d,focalY:u,scale:p,onChange:v,onCommit:x}){const m=s.useRef(null),h=`pretext-image-ghost-${s.useId().replace(/:/g,"")}`,b=s.useRef(null),S=s.useRef(null),M=s.useRef({focalX:d,focalY:u,scale:p});M.current={focalX:d,focalY:u,scale:p};const y=l==="image";s.useEffect(()=>{var E;y&&((E=m.current)==null||E.focus({preventScroll:!0}))},[y]);const $=s.useCallback((E,w)=>{var V;const L=(V=m.current)==null?void 0:V.getBoundingClientRect();return!L||L.width<=0||L.height<=0?{x:0,y:0}:{x:(E-L.left)/L.width*t.width,y:(w-L.top)/L.height*t.height}},[t.width,t.height]),R=E=>{var L,V;if(!i)return;E.stopPropagation(),E.preventDefault(),(L=m.current)==null||L.focus({preventScroll:!0});const w=qi(n,i,p);b.current={pointerId:E.pointerId,origin:$(E.clientX,E.clientY),startX:jn(n.width,w.width,d),startY:jn(n.height,w.height,u),width:w.width,height:w.height,moved:!1},(V=m.current)==null||V.setPointerCapture(E.pointerId)},X=(E,w)=>{var te,ce;if(!i)return;E.stopPropagation(),E.preventDefault(),(te=m.current)==null||te.focus({preventScroll:!0});const L=qi(n,i,p),V=jn(n.width,L.width,d),_=jn(n.height,L.height,u),K={minX:V,minY:_,maxX:V+L.width,maxY:_+L.height},P=Pa(K,Yp(w)),f=Pa(K,w),U=Math.hypot(f.x-P.x,f.y-P.y);!isFinite(U)||U<=0||(S.current={pointerId:E.pointerId,anchor:P,startDistance:U,startScale:p,startX:V,startY:_,moved:!1},(ce=m.current)==null||ce.setPointerCapture(E.pointerId))},B=E=>{if(!i)return;const w=S.current;if(w&&E.pointerId===w.pointerId){E.stopPropagation(),E.preventDefault();const V=$(E.clientX,E.clientY),_={x:V.x-n.x,y:V.y-n.y},K=Math.hypot(_.x-w.anchor.x,_.y-w.anchor.y),P=Math.min(al,Math.max(rl,w.startScale*(K/w.startDistance)));if(!w.moved&&Math.abs(P-w.startScale)<1e-4)return;w.moved=!0;const f=P/w.startScale,U=w.anchor.x+(w.startX-w.anchor.x)*f,te=w.anchor.y+(w.startY-w.anchor.y)*f,ce=qi(n,i,P);v({focalX:xo(n.width,ce.width,U),focalY:xo(n.height,ce.height,te),scale:P});return}const L=b.current;if(L&&E.pointerId===L.pointerId){E.stopPropagation(),E.preventDefault();const V=$(E.clientX,E.clientY),_=V.x-L.origin.x,K=V.y-L.origin.y;if(!L.moved&&_===0&&K===0)return;L.moved=!0,v({focalX:xo(n.width,L.width,L.startX+_),focalY:xo(n.height,L.height,L.startY+K),scale:p})}},O=E=>{var V,_;const w=b.current;if(w&&E.pointerId===w.pointerId){b.current=null,E.stopPropagation(),(V=m.current)!=null&&V.hasPointerCapture(w.pointerId)&&m.current.releasePointerCapture(w.pointerId),w.moved&&x(M.current);return}const L=S.current;L&&E.pointerId===L.pointerId&&(S.current=null,E.stopPropagation(),(_=m.current)!=null&&_.hasPointerCapture(L.pointerId)&&m.current.releasePointerCapture(L.pointerId),L.moved&&x(M.current))},N=E=>{if(E.key==="Escape"){E.stopPropagation(),c("none");return}if(E.key==="="||E.key==="+"||E.key==="-"||E.key==="_"){E.preventDefault(),E.stopPropagation();const w=E.key==="="||E.key==="+",L=Math.min(al,Math.max(rl,p*(w?ru:1/ru))),V={focalX:d,focalY:u,scale:L};v(V),x(V)}},z=["nw","ne","se","sw"],C={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height},I=s.useMemo(()=>{const E=i??{width:n.width,height:n.height},w=qi(n,E,p);return!(w.width>0)||!(w.height>0)?null:{x:n.x+jn(n.width,w.width,d),y:n.y+jn(n.height,w.height,u),width:w.width,height:w.height}},[i,n.x,n.y,n.width,n.height,d,u,p]),j=I?{minX:I.x,minY:I.y,maxX:I.x+I.width,maxY:I.y+I.height}:C;return a.jsxs("svg",{ref:m,className:`${e}-editor${y?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:N,onPointerMove:B,onPointerUp:O,onPointerCancel:O,onLostPointerCapture:O,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>c("none")}),y&&o&&I&&r&&a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsxs("mask",{id:h,maskUnits:"userSpaceOnUse",x:I.x,y:I.y,width:I.width,height:I.height,children:[a.jsx("rect",{x:I.x,y:I.y,width:I.width,height:I.height,fill:"#FFFFFF"}),a.jsx("path",{d:r,fillRule:"evenodd",fill:"#000000"})]})}),a.jsx("image",{className:`${e}-editor-ghost`,href:o??void 0,x:I.x,y:I.y,width:I.width,height:I.height,preserveAspectRatio:"none",mask:`url(#${h})`}),a.jsx("rect",{className:`${e}-editor-image-bounds`,x:I.x,y:I.y,width:I.width,height:I.height})]}),y&&a.jsxs(a.Fragment,{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:n.x,y:n.y,width:n.width,height:n.height}),a.jsx("rect",{className:`${e}-editor-body`,x:n.x,y:n.y,width:n.width,height:n.height,onPointerDown:R}),z.map(E=>{const w=sl(j,E),L=E==="ne"||E==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:w.x-ia/2,y:w.y-ia/2,width:ia,height:ia}),a.jsx("rect",{className:`${e}-editor-scale-grab${L?` ${e}-editor-scale-grab-nesw`:""}`,x:w.x-na/2,y:w.y-na/2,width:na,height:na,onPointerDown:V=>X(V,E)})]},E)})]})]})}const dl=10,aT=dl*2,Bn=7,sT=4,co=9,lT=3.5,au=1.08,cT=.05,oa=14,dT=1,ra=14,aa=8;function uT({P:e,box:t,viewBox:n,contours:i,snap:o,stretchToBox:r,uniformStretch:l=!1,stage:c,onStageChange:d,onSelectionChange:u,onChange:p,onCommit:v}){const x=s.useRef(null),m=s.useRef(null),h=s.useRef(i);h.current=i;const b=s.useRef(null),S=s.useRef(null),M=s.useRef(null),y=s.useRef(null),[$,R]=s.useState([]),[X,B]=s.useState(vo),[O,N]=s.useState(null),z=s.useCallback(g=>{B(G=>OC(G,g)?G:g)},[]),C=c==="shape";s.useEffect(()=>{var g;C&&((g=x.current)==null||g.focus({preventScroll:!0}))},[C]),s.useEffect(()=>{C||R(g=>g.length?[]:g)},[C]);const I=$.length>0;s.useEffect(()=>{u==null||u(I)},[I,u]),s.useEffect(()=>()=>u==null?void 0:u(!1),[u]);const j=n.width>0?t.width/n.width:1,E=n.height>0?t.height/n.height:1,w=Math.min(j,E),L=r&&l?w:j,V=r&&l?w:E,_=r&&l?(t.width-n.width*w)/2:0,K=r&&l?(t.height-n.height*w)/2:0,P=s.useCallback(g=>r?{x:_+(g.x-n.x)*L,y:K+(g.y-n.y)*V}:{x:g.x-n.x,y:g.y-n.y},[r,n,L,V,_,K]),f=s.useCallback(g=>r?{x:n.x+(L>0?(g.x-_)/L:0),y:n.y+(V>0?(g.y-K)/V:0)}:{x:n.x+g.x,y:n.y+g.y},[r,n,L,V,_,K]),U=s.useMemo(()=>f({x:t.width/2,y:t.height/2}),[f,t.width,t.height]),te=s.useCallback((g,G)=>{var ne;const Q=(ne=x.current)==null?void 0:ne.getBoundingClientRect();if(!Q||Q.width<=0||Q.height<=0)return{x:0,y:0};if(r){const ue=(g-Q.left)/Q.width*t.width,q=(G-Q.top)/Q.height*t.height;return{x:n.x+(L>0?(ue-_)/L:0),y:n.y+(V>0?(q-K)/V:0)}}return{x:n.x+(g-Q.left),y:n.y+(G-Q.top)}},[r,n,t.width,t.height,L,V,_,K]),ce=s.useCallback((g,G)=>{var ne;const Q=(ne=x.current)==null?void 0:ne.getBoundingClientRect();return!Q||Q.width<=0||Q.height<=0?{x:0,y:0}:{x:(g-Q.left)/Q.width*t.width,y:(G-Q.top)/Q.height*t.height}},[t.width,t.height]),F=s.useCallback((g,G)=>{const Q=l&&!(G!=null&&G.preserveShape)?MC(g,n,t,_,K,L,V):g;v(Q,G)},[v,l,n,t,_,K,L,V]),ie=s.useCallback(()=>{N(null)},[]),T=s.useCallback((g,G,Q)=>{if(!Q||b.current||S.current||M.current||y.current){ie();return}const ne=ce(g,G),ue=un(h.current,P);for(const H of ue)for(const Ie of H.nodes)if(Math.hypot(Ie.p.x-ne.x,Ie.p.y-ne.y)<=co){ie();return}const q=Yd(ue,ne);if(!q||q.distance>dl){ie();return}const D=ue[q.contour],se=D==null?void 0:D.nodes[q.segment],Y=D==null?void 0:D.nodes[(q.segment+1)%((D==null?void 0:D.nodes.length)??1)],pe=!!(se&&Y&&!Go(se,Y));N(H=>H&&H.curved===pe&&Math.hypot(H.point.x-q.point.x,H.point.y-q.point.y)<.25?H:{point:q.point,curved:pe})},[ce,P,ie]),le=g=>{var Oe;const G=g.metaKey||g.ctrlKey,Q=M.current;if(Q&&g.pointerId===Q.pointerId){if(g.stopPropagation(),g.preventDefault(),Q.startDistance<=0)return;const Je=te(g.clientX,g.clientY),De=Math.hypot(Je.x-Q.origin.x,Je.y-Q.origin.y),Ze=Math.max(cT,De/Q.startDistance);if(!Q.moved&&Math.abs(Ze-1)<1e-4)return;Q.moved=!0,p(Gd(Q.startContours,Q.origin,Ze));return}const ne=S.current;if(ne&&g.pointerId===ne.pointerId){g.stopPropagation(),g.preventDefault();const Je=te(g.clientX,g.clientY),{bbox:De}=ne,Ze=De.maxX-De.minX,at=De.maxY-De.minY,Xe=Je.x-ne.origin.x,be=Je.y-ne.origin.y;let He=Xe,je=be;if(isFinite(Ze)&&isFinite(at))if(r){let Ce=n.x,_e=n.x+n.width,Ue=n.y,Ye=n.y+n.height;l&&(L>0&&(Ce=n.x+(0-_)/L,_e=n.x+(t.width-_)/L),V>0&&(Ue=n.y+(0-K)/V,Ye=n.y+(t.height-K)/V));const lt=Math.min(Ce,_e-Ze),it=Math.max(Ce,_e-Ze),qe=Math.min(Ue,Ye-at),Ee=Math.max(Ue,Ye-at),pt=Math.min(it,Math.max(lt,De.minX+Xe)),ke=Math.min(Ee,Math.max(qe,De.minY+be));He=pt-De.minX,je=ke-De.minY}else{const Ce=De.minX-n.x,_e=De.minY-n.y,Ue=Math.min(0,t.width-Ze),Ye=Math.max(0,t.width-Ze),lt=Math.min(0,t.height-at),it=Math.max(0,t.height-at),qe=Math.min(Ye,Math.max(Ue,Ce+Xe)),Ee=Math.min(it,Math.max(lt,_e+be));He=qe-Ce,je=Ee-_e}const Qe=[];if(!G&&isFinite(Ze)&&isFinite(at)){const Ce=P({x:De.minX+Ze/2+He,y:De.minY+at/2+je}),_e={x:t.width/2,y:t.height/2};Math.abs(Ce.x-_e.x)<=oa&&(He=U.x-De.minX-Ze/2,Qe.push(ol(_e.x,"x",t))),Math.abs(Ce.y-_e.y)<=oa&&(je=U.y-De.minY-at/2,Qe.push(ol(_e.y,"y",t)))}if(!ne.moved&&He===0&&je===0)return;ne.moved=!0,z(Qe.length?Qe:vo),p(un(ne.startContours,Ce=>({x:Ce.x+He,y:Ce.y+je})),{carryImage:!0});return}const ue=y.current;if(ue&&g.pointerId===ue.pointerId){g.stopPropagation(),g.preventDefault();const Je=te(g.clientX,g.clientY);let De=Je.x-ue.origin.x,Ze=Je.y-ue.origin.y;if(g.shiftKey&&(Math.abs(De)>Math.abs(Ze)?Ze=0:De=0),!ue.moved&&De===0&&Ze===0)return;ue.moved=!0,p(qd(ue.startContours,ue.selection,De,Ze));return}const q=b.current;if(!q||g.pointerId!==q.pointerId){T(g.clientX,g.clientY,$.length>0||C);return}ie(),g.stopPropagation(),g.preventDefault();const D=te(g.clientX,g.clientY);if(q.kind==="anchor"){const Je={x:q.anchor.x+(D.x-q.origin.x),y:q.anchor.y+(D.y-q.origin.y)},De=G?[]:WC(h.current,{contour:q.contour,node:q.node}),Ze=G||!q.center?[]:[q.center],at=Qd(Kd(De,Ze.map(He=>He.x),"x"),Je,"x",P,oa),Xe=Qd(Kd(De,Ze.map(He=>He.y),"y"),Je,"y",P,oa),be=G?Je:{x:(at==null?void 0:at.value)??ta(Je.x,o),y:(Xe==null?void 0:Xe.value)??ta(Je.y,o)};if(g.shiftKey&&(Math.abs(be.x-q.anchor.x)>Math.abs(be.y-q.anchor.y)?be.y=q.anchor.y:be.x=q.anchor.x),!q.moved&&be.x===q.anchor.x&&be.y===q.anchor.y)return;q.moved=!0,z(zC(be,at,Xe,t,P)),p(kC(h.current,q.contour,q.node,be));return}const se=(Oe=h.current[q.contour])==null?void 0:Oe.nodes[q.node],Y=q.mirror&&!g.altKey,pe=Y||G?null:q.kind==="in"?se==null?void 0:se.out:se==null?void 0:se.in,H=se?P(se.p):null,Ie=pe?P(pe):null,de=se&&(!G||g.shiftKey)?VC(D,se.p,Y||G?null:jC(h.current[q.contour],q.node,q.kind,P),H&&Ie?Math.hypot(Ie.x-H.x,Ie.y-H.y):null,g.shiftKey,P,f):{point:D,guides:vo},Z=de.guides.length?de.point:G?D:{x:ta(D.x,o),y:ta(D.y,o)},Ne=q.kind==="in"?se==null?void 0:se.in:se==null?void 0:se.out;!q.moved&&Ne&&Z.x===Ne.x&&Z.y===Ne.y||(q.moved=!0,z(de.guides),p(FC(h.current,q.contour,q.node,q.kind,Z,Y)))},J=g=>{z(vo);const G=M.current;if(G&&g.pointerId===G.pointerId){M.current=null,g.stopPropagation();const pe=x.current;pe!=null&&pe.hasPointerCapture(G.pointerId)&&pe.releasePointerCapture(G.pointerId),G.moved&&F(h.current,{preserveShape:!0});return}const Q=S.current;if(Q&&g.pointerId===Q.pointerId){S.current=null,g.stopPropagation();const pe=x.current;pe!=null&&pe.hasPointerCapture(Q.pointerId)&&pe.releasePointerCapture(Q.pointerId),Q.moved?F(h.current,{preserveShape:!0}):R([]);return}const ne=y.current;if(ne&&g.pointerId===ne.pointerId){y.current=null,g.stopPropagation();const pe=x.current;pe!=null&&pe.hasPointerCapture(ne.pointerId)&&pe.releasePointerCapture(ne.pointerId),ne.moved&&F(h.current);return}const ue=b.current;if(!ue||g.pointerId!==ue.pointerId)return;b.current=null,g.stopPropagation();const q=x.current;q!=null&&q.hasPointerCapture(ue.pointerId)&&q.releasePointerCapture(ue.pointerId);const D=Math.hypot(g.clientX-ue.clientOrigin.x,g.clientY-ue.clientOrigin.y);if(ue.moved||D>sT){ue.moved&&F(h.current);return}if(!ue.toggleOnRelease||g.type!=="pointerup")return;const Y=Ud(h.current,ue.contour,ue.node);Y!==h.current&&(p(Y),F(Y))},Se=g=>{g.stopPropagation()},Le=g=>{var G,Q;g.stopPropagation(),g.preventDefault(),ie(),(G=x.current)==null||G.focus({preventScroll:!0}),S.current={pointerId:g.pointerId,origin:te(g.clientX,g.clientY),startContours:Vn(i),bbox:Li(i),moved:!1},(Q=x.current)==null||Q.setPointerCapture(g.pointerId)},me=(g,G)=>{var D,se;g.stopPropagation(),g.preventDefault(),ie(),(D=x.current)==null||D.focus({preventScroll:!0}),R([]),d("shape");const Q=Li(i),ne=Pa(Q,Yp(G)),ue=sl(Q,G),q=Math.hypot(ue.x-ne.x,ue.y-ne.y);!isFinite(q)||q<=0||(M.current={pointerId:g.pointerId,corner:G,origin:ne,startDistance:q,startContours:Vn(i),moved:!1},(se=x.current)==null||se.setPointerCapture(g.pointerId))},ye=(g,G,Q,ne)=>{var D,se,Y,pe;g.stopPropagation(),g.preventDefault(),ie(),(D=x.current)==null||D.focus({preventScroll:!0});const ue=(se=i[Q])==null?void 0:se.nodes[ne];if(!ue)return;if(g.altKey){const H=G==="anchor"?Up(i,Q,ne):NC(i,Q,ne,G);if(H===i)return;R(G==="anchor"?[]:[{contour:Q,node:ne}]),p(H),F(H);return}const q=g.metaKey||g.ctrlKey;if(G==="anchor"&&g.shiftKey&&!q){R(H=>H.some(Ie=>Ie.contour===Q&&Ie.node===ne)?H.filter(Ie=>!(Ie.contour===Q&&Ie.node===ne)):[...H,{contour:Q,node:ne}]);return}if(G==="anchor"&&!q&&$.length>1&&$.some(H=>H.contour===Q&&H.node===ne)){y.current={pointerId:g.pointerId,origin:te(g.clientX,g.clientY),startContours:Vn(i),selection:$,moved:!1},(Y=x.current)==null||Y.setPointerCapture(g.pointerId);return}R([{contour:Q,node:ne}]),b.current={kind:G,contour:Q,node:ne,pointerId:g.pointerId,origin:te(g.clientX,g.clientY),clientOrigin:{x:g.clientX,y:g.clientY},anchor:ue.p,center:RC(i),mirror:G!=="anchor"&&!!(ue.in&&ue.out),toggleOnRelease:q,moved:!1},(pe=x.current)==null||pe.setPointerCapture(g.pointerId)},ee=g=>{g.stopPropagation(),g.preventDefault(),ie();const G=un(i,P),Q=Yd(G,ce(g.clientX,g.clientY));if(!Q||Q.distance>dl)return;const{contours:ne,nodeIndex:ue}=_C(i,Q.contour,Q.segment,Q.t);ue<0||(R([{contour:Q.contour,node:ue}]),p(ne),F(ne))},oe=g=>{if(g.key==="="||g.key==="+"||g.key==="-"||g.key==="_"){g.preventDefault(),g.stopPropagation();const q=Li(i);if(!isFinite(q.minX)||!isFinite(q.maxX))return;const D={x:(q.minX+q.maxX)/2,y:(q.minY+q.maxY)/2},Y=g.key==="="||g.key==="+"?au:1/au,pe=Gd(i,D,Y);p(pe),F(pe,{preserveShape:!0});return}if(g.key==="Escape"){g.stopPropagation(),R([]),d("none");return}if(!$.length)return;if(g.key==="Backspace"||g.key==="Delete"){g.preventDefault(),g.stopPropagation();const q=AC(i,$);if(q===i)return;R([]),p(q),F(q);return}const G=o>0?o:dT,Q=g.shiftKey?G*10:G,ne={ArrowLeft:[-Q,0],ArrowRight:[Q,0],ArrowUp:[0,-Q],ArrowDown:[0,Q]}[g.key];if(!ne)return;g.preventDefault(),g.stopPropagation();const ue=qd(i,$,ne[0],ne[1]);p(ue),F(ue)},re=s.useMemo(()=>Wo(un(i,P)),[i,P]),ge=s.useMemo(()=>Li(i),[i]),we=P({x:ge.minX,y:ge.minY}),Ae={width:P({x:ge.maxX,y:ge.minY}).x-we.x,height:P({x:ge.minX,y:ge.maxY}).y-we.y},fe=C&&$.length===0&&isFinite(ge.minX)&&isFinite(ge.maxX)&&ge.maxX>ge.minX&&ge.maxY>ge.minY,ve=$.length>0||C,xe=ve;return a.jsxs("svg",{ref:x,className:`${e}-editor${ve?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:oe,onPointerDown:()=>{var g;return(g=x.current)==null?void 0:g.focus({preventScroll:!0})},onPointerMove:le,onPointerLeave:ie,onPointerUp:J,onPointerCancel:J,onLostPointerCapture:J,onContextMenu:g=>{g.preventDefault()},"data-pretext-path-editor":!0,"data-selection":"none",children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>{R([]),d("none")},onClick:ee}),xe&&a.jsx("path",{className:`${e}-editor-outline`,d:re}),xe&&X.map((g,G)=>a.jsx("line",{className:`${e}-editor-snap ${e}-editor-snap-${g.kind}`,x1:g.a.x,y1:g.a.y,x2:g.b.x,y2:g.b.y},`${g.kind}-${G}`)),a.jsx("path",{ref:m,className:`${e}-editor-body`,d:re,fillRule:"evenodd",onPointerDown:Le,onClick:ee}),xe&&a.jsx("path",{className:`${e}-editor-hit`,d:re,style:{strokeWidth:aT},onClick:ee}),xe&&O&&a.jsx("rect",{className:`${e}-editor-add-preview`,x:O.point.x-Bn/2,y:O.point.y-Bn/2,width:Bn,height:Bn,rx:O.curved?Bn/2:0}),xe&&i.map((g,G)=>g.nodes.map((Q,ne)=>{const ue=$.some(D=>D.contour===G&&D.node===ne),q=P(Q.p);return a.jsxs("g",{children:[ue&&$.length===1&&["in","out"].map(D=>{const se=Q[D];if(!se)return null;const Y=P(se);return a.jsxs("g",{children:[a.jsx("line",{className:`${e}-editor-handle-line`,x1:q.x,y1:q.y,x2:Y.x,y2:Y.y}),a.jsx("circle",{className:`${e}-editor-handle`,cx:Y.x,cy:Y.y,r:lT}),a.jsx("circle",{className:`${e}-editor-grab`,cx:Y.x,cy:Y.y,r:co,onPointerDown:pe=>ye(pe,D,G,ne),onClick:Se})]},D)}),a.jsx("rect",{className:`${e}-editor-anchor${ue?` ${e}-editor-anchor-selected`:""}`,x:q.x-Bn/2,y:q.y-Bn/2,width:Bn,height:Bn,rx:zp(Q)?Bn/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:q.x-co,y:q.y-co,width:co*2,height:co*2,onPointerDown:D=>ye(D,"anchor",G,ne),onClick:Se,onDoubleClick:D=>{D.stopPropagation(),D.preventDefault();const se=Ud(i,G,ne);p(se),F(se)}})]},`${G}-${ne}`)})),fe&&a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:we.x,y:we.y,width:Ae.width,height:Ae.height}),["nw","ne","se","sw"].map(g=>{const G=P(sl(ge,g)),Q=g==="ne"||g==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:G.x-aa/2,y:G.y-aa/2,width:aa,height:aa}),a.jsx("rect",{className:`${e}-editor-scale-grab${Q?` ${e}-editor-scale-grab-nesw`:""}`,x:G.x-ra/2,y:G.y-ra/2,width:ra,height:ra,onPointerDown:ne=>me(ne,g),onClick:Se})]},g)})]})]})}const pT=4e3,mT=/^(?:https?:|mailto:|tel:)/i;function Kp(e){return!!e&&typeof e=="object"&&e.type==="link"}function gT(e){if(!e)return;const t=e.replace(/\s+/g,"");if(!(/^[a-z][a-z0-9+.-]*:/i.test(t)&&!mT.test(t)))return t}function hT(e){const t=[];return e.forEach((n,i)=>{const o=(r,l,c)=>{for(const d of r){if(Kp(d)){o(d.children??[],gT(d.value),d.target);continue}const u=d,p=(u==null?void 0:u.text)??"";if(p.trim())for(const v of p.split(/\s+/))v&&t.push({text:v,leaf:u,href:l,target:c,para:i})}};o((n==null?void 0:n.children)??[])}),t}function su(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"}}}function fT(e){return e.map(t=>{const n=[],i=o=>{for(const r of o){if(Kp(r)){i(r.children??[]);continue}n.push((r==null?void 0:r.text)??"")}};return i((t==null?void 0:t.children)??[]),n.join("")})}function yT(e,t,n,i,o){if(t<=0||!e.length||n<=0||i<=0)return e;const r=o==="avoid"?1:-1;return e.map(l=>{if(!l.length)return l;let c=1/0,d=-1/0,u=1/0,p=-1/0;for(const m of l){const h=m.x*n,b=m.y*i;h<c&&(c=h),h>d&&(d=h),b<u&&(u=b),b>p&&(p=b)}const v=(c+d)/2,x=(u+p)/2;return l.map(m=>{const h=m.x*n,b=m.y*i,S=h-v,M=b-x,y=Math.sqrt(S*S+M*M);if(y<1e-6)return m;const R=Math.max(0,y+r*t)/y;return{x:(v+S*R)/n,y:(x+M*R)/i}})})}const vT=.75;function lu(e,t,n,i,o,r){if(e.kind==="fragment"||!t)return null;const l=e.token.text,c=e.offset>0?t[e.offset-1]:0,d=n?n.map(u=>u-e.offset).filter(u=>u>=(e.offset>0?2:1)&&u<l.length):Array.from({length:l.length-1},(u,p)=>p+1);for(let u=d.length-1;u>=0;u-=1){const p=d[u];if(e.offset+p>t.length)continue;const v=!!n&&l[p-1]!=="-",x=t[e.offset+p-1]-c,m=x+(v?r:0);if(!(m*o>i))return{chars:p,fragmentText:v?`${l.slice(0,p)}-`:l.slice(0,p),remainderText:l.slice(p),fragmentWidth:m,remainderWidth:Math.max(0,e.width-x)}}return null}function cu(e){const{tokens:t,widths:n,rings:i,mode:o,align:r,scale:l,width:c,height:d,allowOverflow:u,capInset:p,capLines:v}=e,x=!!e.hyphenate,m=e.charWidths??[],h=e.hyphenPoints??[],b=e.hyphenWidth??0,S=e.lineHeight*l,M=e.spaceWidth*l,y=Math.max(0,e.shapeMargin??0),$=[],R=t.map((P,f)=>({token:P,originalIndex:f,width:n[f],kind:"whole",offset:0}));if(!R.length||c<=0||S<=0)return{segments:$,placed:0,height:0,capLeft:0,capTop:0,renderTokens:t};const X=Math.max(1,M*.5),B=S*lC,O=yT(i,y,c,d,o),N=Math.max(1,Math.floor(e.columns??1)),z=N>1?Math.max(0,e.columnGap??0):0,C=(c-z*(N-1))/N;let I=0,j=0,E=0,w=0,L=0,V=null;const _=(P,f,U)=>fC(O,(P+B)/d,(P+S-B)/d,o).map(te=>({x0:Math.max(f,te.x0*c),x1:Math.min(U,te.x1*c)})).filter(te=>te.x1>te.x0);for(let P=0;P<N&&I<R.length&&C>0;P+=1){const f=P*(C+z),U=f+C,te=u&&P===N-1;let ce=0;for(let T=0;T+S<=d;T+=S)for(const le of _(T,f,U))ce=Math.max(ce,le.x1-le.x0);let F=R[I].token.para,ie=0;for(;I<R.length&&E<pT;){const T=ie+S>d;if(T&&!te)break;const le=R[I].token.para;if(le>F+1){ie+=S*(le-F-1),F=le-1,E+=1;continue}let J=T?[{x0:f,x1:U}]:_(ie,f,U);p>0&&v>0&&P===0&&!T&&J.length&&(V===null&&(V=E,w=J[0].x0,L=ie),E-V<v&&(J=hC(J,{x0:w,x1:w+p})));const Se=J.reduce((Le,me)=>Math.max(Le,me.x1-me.x0),0);for(const Le of J){const me=Le.x1-Le.x0;if(me<X)continue;if(I>=R.length||R[I].token.para!==le)break;const ye=I;let ee=0;for(;I<R.length&&R[I].token.para===le;){const oe=R[I],re=I===ye,ge=oe.width*l,we=re?ge:M+ge;if(ee+we<=me){ee+=we,I+=1;continue}const Ae=me-ee-(re?0:M),fe=re&&ge>C-.5,ve=me>=Se-.5&&me>=ce*vT,xe=m[oe.originalIndex],g=h[oe.originalIndex],G=(x&&g?lu(oe,xe,g,Ae,l,b):null)??(fe&&ve?lu(oe,xe,void 0,Ae,l,b):null);if(G){const Q={token:{...oe.token,text:G.fragmentText},originalIndex:oe.originalIndex,width:G.fragmentWidth,kind:"fragment",offset:oe.offset},ne={token:{...oe.token,text:G.remainderText},originalIndex:oe.originalIndex,width:G.remainderWidth,kind:"remainder",offset:oe.offset+G.chars};R.splice(I,1,Q,ne),ee+=(re?0:M)+G.fragmentWidth*l,I+=1;break}if(fe&&N===1&&me>=ce-.5){ee+=we,I+=1;continue}break}if(I>ye){const oe=I>=R.length||R[I].token.para!==le;$.push({top:ie,left:Le.x0,width:me,from:ye,to:I,justify:r==="justify"&&!oe})}if(I>=R.length||R[I].token.para!==le)break}F=le,ie+=S,E+=1}j=Math.max(j,ie)}let K=0;if(I>0){const P=R[I-1];K=P.kind==="fragment"?P.originalIndex:P.originalIndex+1}return{segments:$,placed:K,height:$.length?j:0,capLeft:w,capTop:L,renderTokens:R.map(P=>P.token)}}const xT=.12,bT=2,ST=10,As=.25,wT=e=>{const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}},$T=(e,t)=>Math.abs(e.top-t.top)<.5&&Math.abs(e.left-t.left)<.5&&Math.abs(e.width-t.width)<.5&&Math.abs(e.height-t.height)<.5,CT=(e,t)=>{const[n,i]=s.useState(null);return s.useEffect(()=>{if(!e||!t){i(null);return}let o=0,r=null;const l=()=>{const c=wT(e);(!r||!$T(r,c))&&(r=c,i(c)),o=requestAnimationFrame(l)};return l(),()=>cancelAnimationFrame(o)},[e,t]),n},Fs=(e,t)=>{if(!(t.width>0)||!(t.height>0))return e;const n=Math.min(t.width,t.height),i=(t.width-n)/2,o=(t.height-n)/2;return e.map(r=>r.map(l=>({x:(i+l.x*n)/t.width,y:(o+l.y*n)/t.height})))},nr=typeof window>"u"?s.useEffect:s.useLayoutEffect;function TT(){return typeof document>"u"?null:document.body}function IT({P:e,item:t,shape:n,customPath:i,pathFit:o,viewBox:r,mode:l,align:c,allowOverflow:d,fitEnabled:u,scale:p,onFitScale:v,padding:x,columns:m,gutter:h,hyphenate:b,showOverflowIndicator:S,dropCapLines:M,dropCapSize:y,showGuides:$,typography:R,imageUrl:X,imageFocalX:B,imageFocalY:O,imageScale:N,imageCustomPath:z,imagePathEdited:C,pathDragActive:I,pathCarryImage:j,onCarryImageConsumed:E,pathEditor:w,imageEditor:L}){var Gt,kt;const V=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[_,K]=s.useState(null),P=s.useRef(null),[f,U]=s.useState({width:0,height:0}),[te,ce]=s.useState(0),[F,ie]=s.useState(0),[T,le]=s.useState(null),[J,Se]=s.useState(0),[Le,me]=s.useState("none");s.useEffect(()=>{!w&&!L&&me("none")},[w,L]);const[ye,ee]=s.useState(null);s.useEffect(()=>{if(!X||typeof Image>"u"){ee(null);return}let Pe=!1;const Be=new Image;return Be.onload=()=>{Pe||ee({width:Be.naturalWidth,height:Be.naturalHeight})},Be.src=X,()=>{Pe=!0}},[X]);const oe=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),re=s.useMemo(()=>hT(oe),[oe]),ge=s.useMemo(()=>fT(oe),[oe]),we=s.useMemo(()=>ge.join(`
|
|
27331
|
+
`),[ge]),{lang:Ae,hyphenateSync:fe}=iT(b,we),ve=s.useMemo(()=>b?re.map(Pe=>oT(Pe.text,fe)):[],[b,re,fe]),xe=M>0&&y>1?((kt=(Gt=re[0])==null?void 0:Gt.text)==null?void 0:kt.charAt(0))??"":"",g=(w==null?void 0:w.contours)??null,G=s.useMemo(()=>{let Pe=[];if(g){const Be=$r(g);Be.length&&(Pe=Co(Be,r))}if(!Pe.length){const Be=i.trim(),ft=Be?Bd(Be,o,r):null;ft&&ft.length?Pe=ft:Pe=el(n==="custom"?"rectangle":n)}return n==="circle"?Fs(Pe,f):Pe},[g,n,i,o,r,f.width,f.height]),Q=w==null?void 0:w.onConvert,ne=(w==null?void 0:w.needsConversion)??!1,ue=s.useMemo(()=>{if(n==="circle")return!1;const Pe=g??(i.trim()?ki(i):null);return!!(Pe&&Xp(Pe,r))},[g,i,r,n]),[q,D]=s.useState(null);nr(()=>{if(!ue){q&&D(null);return}!q&&f.width>0&&f.height>0&&D({width:f.width,height:f.height})},[ue,f.width,f.height,q]);const se=s.useMemo(()=>{if(!ue||f.width<=0||f.height<=0)return G;const Pe=q??f,Be=r.width/Pe.width,ft=r.height/Pe.height;return G.map($t=>$t.map(et=>({x:et.x*Be,y:et.y*ft})))},[G,ue,q,r.width,r.height,f.width,f.height]),Y=s.useMemo(()=>{if(g){const $t=$r(g);if($t.length){const et=Co($t,r);return n==="circle"?Fs(et,f):et}}const Pe=z.trim(),Be=Pe?Bd(Pe,o,r):null,ft=Be&&Be.length?Be:el(n==="custom"?"rectangle":n);return n==="circle"?Fs(ft,f):ft},[g,n,z,o,r,f.width,f.height]),pe=s.useMemo(()=>{if(!ue||f.width<=0||f.height<=0)return Y;const Pe=q??f,Be=r.width/Pe.width,ft=r.height/Pe.height;return Y.map($t=>$t.map(et=>({x:et.x*Be,y:et.y*ft})))},[Y,ue,q,r.width,r.height,f.width,f.height]),H=s.useRef(null),Ie=s.useRef(!1);s.useEffect(()=>{if(!(!Q||f.width<=0||f.height<=0)){if(ue){if(H.current===i)return;const Pe=g??(i.trim()?ki(i):null);if(!(Pe!=null&&Pe.length))return;const Be=un(Pe,ft=>({x:r.x+(ft.x-r.x)/f.width*r.width,y:r.y+(ft.y-r.y)/f.height*r.height}));H.current=Wo(Be),Q(Be);return}!ne||!G.length||Ie.current||(Ie.current=!0,Q(un(Gp(G),Pe=>({x:Pe.x*La,y:Pe.y*La}))))}},[ne,ue,Q,G,g,i,r,f.width,f.height]);const de=s.useCallback(()=>{const Pe=_;if(!Pe)return;const Be=Pe.getBoundingClientRect(),ft=window.getComputedStyle(Pe),$t=parseFloat(ft.paddingTop)||0;ce(Xt=>Math.abs(Xt-$t)<.5?Xt:$t);const et=parseFloat(ft.columnGap)||0;ie(Xt=>Math.abs(Xt-et)<.5?Xt:et);const Et={width:Be.width,height:Be.height};U(Xt=>Math.abs(Xt.width-Et.width)<.5&&Math.abs(Xt.height-Et.height)<.5?Xt:Et)},[_]);nr(()=>{const Pe=_;if(!Pe||typeof ResizeObserver>"u")return;de();const Be=new ResizeObserver(de);return Be.observe(Pe),()=>Be.disconnect()},[_,de]),nr(()=>{de()},[x,h,de]),s.useEffect(()=>{const Pe=typeof document<"u"?document.fonts:void 0;Pe!=null&&Pe.ready&&Pe.ready.then(()=>{Se(Be=>Be+1)})},[]),nr(()=>{const Pe=P.current;if(!Pe)return;if(!re.length){le(null);return}const Be=[],ft=document.createDocumentFragment();for(const It of re){const Zt=document.createElement("span");Object.assign(Zt.style,su(It.leaf)),Zt.textContent=It.text,ft.appendChild(Zt),Be.push(Zt)}const $t=document.createElement("span");$t.textContent=" ",ft.appendChild($t);const et=document.createElement("span");et.textContent="-",ft.appendChild(et);const Et=xe||"H",Xt=document.createElement("span");Xt.textContent=Et,Xt.style.lineHeight="1",ft.appendChild(Xt),Pe.replaceChildren(ft);const mt=window.getComputedStyle(Pe),gt=parseFloat(mt.fontSize)||16,Re=parseFloat(mt.lineHeight),tt=Number.isNaN(Re)?gt*1.2:Re,nt=Math.max(tt,gt),st=document.createElement("span");st.textContent=Et,st.style.lineHeight=`${nt}px`;const At=document.createElement("span");At.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",st.appendChild(At),Pe.appendChild(st);const St=st.getBoundingClientRect().top,ht=At.getBoundingClientRect().top,Dt=Math.max(1,ht-St);st.remove();let Ct=Dt*.8;const jt=document.createElement("canvas").getContext("2d"),Nt=It=>`${mt.fontStyle} ${mt.fontWeight} ${It}px ${mt.fontFamily}`;if(jt){jt.font=Nt(gt);const It=jt.measureText(Et).actualBoundingBoxAscent;It>0&&(Ct=It)}const Bt=y>1?(y-1)*nt+Ct:Ct;let Wt=gt*(Bt/Ct);if(jt){jt.font=Nt(Wt);const It=jt.measureText(Et).actualBoundingBoxAscent;It>0&&(Wt=Wt*(Bt/It))}Xt.style.fontSize=`${Wt}px`,Xt.style.lineHeight=`${Wt}px`;const wt=document.createElement("span");wt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",Xt.appendChild(wt);const W=Math.max(1,wt.getBoundingClientRect().top-Xt.getBoundingClientRect().top);wt.remove();const ze=(y-1)*nt+Dt-W,Fe=Be.map(It=>It.getBoundingClientRect().width),yt=$t.getBoundingClientRect().width,Ot=et.getBoundingClientRect().width,ut=xe?Xt.getBoundingClientRect().width:0,Tt=(f.width-F*(m-1))/m,Yt=Be.map((It,Zt)=>{var pi;const on=It.firstChild;if(!(on instanceof Text)||on.data.length<2||!(Fe[Zt]>Tt-.5)&&!((pi=ve[Zt])!=null&&pi.length))return;const xn=document.createRange(),ui=It.getBoundingClientRect().left,dn=[];for(let Kn=1;Kn<=on.data.length;Kn+=1)xn.setStart(on,0),xn.setEnd(on,Kn),dn.push(xn.getBoundingClientRect().right-ui);return dn});Pe.replaceChildren(),le({widths:Fe,spaceWidth:yt,dashWidth:Ot,charWidths:Yt,lineHeight:nt,capWidth:ut,dropCapFontSize:Wt,dropCapTopAdjust:ze})},[re,R,xe,M,y,J,f.width,b,ve,m,F]);const Z=T&&xe?T.capWidth+T.lineHeight*xT:0,Ne=Math.max(M,Math.ceil(y)),Oe=s.useMemo(()=>{if(!T||!re.length||f.width<=0||f.height<=0||!u)return 1;const Pe=$t=>cu({tokens:re,widths:T.widths,spaceWidth:T.spaceWidth,lineHeight:T.lineHeight,width:f.width,height:f.height,rings:se,mode:l,align:c,scale:$t,allowOverflow:!1,capInset:Z*$t,capLines:xe?Ne:0,hyphenate:b,charWidths:T.charWidths,hyphenPoints:ve,hyphenWidth:T.dashWidth,shapeMargin:te,columns:m,columnGap:F});if(Pe(1).placed>=re.length)return 1;if(Pe(As).placed<re.length)return As;let Be=As,ft=1;for(let $t=0;$t<ST;$t+=1){const et=(Be+ft)/2;Pe(et).placed>=re.length?Be=et:ft=et}return Be},[T,re,f.width,f.height,se,l,c,u,Z,xe,Ne,b,ve,te,m,F]);s.useEffect(()=>{v(Oe)},[Oe,v]);const Je=u?Math.min(p,Oe):1,De=s.useMemo(()=>!T||!re.length||f.width<=0||f.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0,renderTokens:re}:cu({tokens:re,widths:T.widths,spaceWidth:T.spaceWidth,lineHeight:T.lineHeight,width:f.width,height:f.height,rings:se,mode:l,align:c,scale:Je,allowOverflow:d,capInset:Z*Je,capLines:xe?Ne:0,hyphenate:b,charWidths:T.charWidths,hyphenPoints:ve,hyphenWidth:T.dashWidth,shapeMargin:te,columns:m,columnGap:F}),[T,re,f.width,f.height,se,l,c,Je,d,Z,xe,Ne,b,ve,te,m,F]),Ze=S&&re.length>0&&De.placed<re.length,at=T?T.dropCapFontSize*Je:0,Xe=T?T.dropCapTopAdjust*Je:0,be=c==="justify"?"left":c,He=T?T.lineHeight*Je:0,je=De.segments.length?De.segments[De.segments.length-1]:null,Qe=je?{top:je.top+He,left:je.left+je.width/2}:{top:f.height,left:f.width/2},Ce=!!(w&&g&&f.width>0&&f.height>0),_e=!!L,Ue=(Ce||_e)&&f.width>0&&f.height>0,Ye=CT(_,Ue),lt=Ue&&Ye?TT():null,it=s.useRef(!1),qe=s.useCallback(Pe=>{it.current=Pe},[]);s.useEffect(()=>{if(!Ce&&!_e)return;const Pe=Be=>{const ft=_;if(!ft)return;const $t=ft.getBoundingClientRect();Be.clientX>=$t.left&&Be.clientX<=$t.right&&Be.clientY>=$t.top&&Be.clientY<=$t.bottom&&(Be.preventDefault(),Be.stopPropagation(),me(Et=>Et==="shape"&&it.current?Et:Et==="shape"&&_e?"image":Ce?"shape":"image"))};return document.addEventListener("dblclick",Pe,!0),()=>document.removeEventListener("dblclick",Pe,!0)},[Ce,_e,_]);const Ee=s.useMemo(()=>X&&f.width>0&&f.height>0?cC(pe,f):null,[X,pe,f.width,f.height]),pt=s.useRef(null),ke=(()=>{const Pe=pt.current;return j||!C||!L||!ye||!Ee||!Pe||z===Pe.customPath||Pe.shape!==n&&n!=="custom"?null:XC(Pe.bounds,Ee,ye,Pe.focalX,Pe.focalY,Pe.scale)})();nr(()=>{if(!L){pt.current=null;return}if(I||!ye||!Ee)return;const Pe=pt.current,Be=!!(Pe&&z!==Pe.customPath);Be&&ke&&L.onCommit(ke),Be&&j&&(E==null||E()),pt.current={rings:pe,bounds:Ee,focalX:(ke==null?void 0:ke.focalX)??B,focalY:(ke==null?void 0:ke.focalY)??O,scale:(ke==null?void 0:ke.scale)??N,customPath:z,shape:n}},[I,j,z,n,pe,Ee,L,ye,B,O,N,ke,E]);const We=pt.current,Ve=!!(I&&!j&&We&&!ke),ct=Ve&&We?We.focalX:(ke==null?void 0:ke.focalX)??B,ot=Ve&&We?We.focalY:(ke==null?void 0:ke.focalY)??O,xt=Ve&&We?We.scale:(ke==null?void 0:ke.scale)??N,Pt=Ve&&We?We.bounds:Ee,Vt=s.useMemo(()=>{if(!(f.width>0)||!(f.height>0))return"";let Pe=jd(i,g,o,r,n,f);if(ue){const Be=q??f,ft=r.width/Be.width,$t=r.height/Be.height;Pe=un(Pe,et=>({x:et.x*ft,y:et.y*$t}))}return Vd(Pe,f)||Dd(se,f)},[i,g,o,r,n,f.width,f.height,ue,q,se]),vt=s.useMemo(()=>{if(!X||!(f.width>0)||!(f.height>0))return"";let Pe=jd(z,g,o,r,n,f);if(ue){const Be=q??f,ft=r.width/Be.width,$t=r.height/Be.height;Pe=un(Pe,et=>({x:et.x*ft,y:et.y*$t}))}return Vd(Pe,f)||Dd(pe,f)},[X,z,g,o,r,n,f.width,f.height,ue,q,pe]),Mt=`${V}-clip`,Ht=s.useMemo(()=>{if(!Pt)return null;const Pe=ye??{width:Pt.width,height:Pt.height},Be=qi(Pt,Pe,xt);return{x:jn(Pt.width,Be.width,ct),y:jn(Pt.height,Be.height,ot),width:Be.width,height:Be.height}},[Pt,ye,ct,ot,xt]);return a.jsxs("div",{className:`${e}-column`,style:{padding:x,columnGap:h},lang:Ae,ref:K,children:[Vt?a.jsxs("svg",{className:`${e}-shape-fill`,style:{top:0,left:0,width:f.width,height:f.height},viewBox:`0 0 ${f.width} ${f.height}`,preserveAspectRatio:"none","aria-hidden":!0,children:[a.jsx("path",{className:`${e}-shape-fill-path`,d:Vt,fillRule:"evenodd"}),X&&vt&&Pt&&Ht?a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsx("clipPath",{id:Mt,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:vt,fillRule:"evenodd"})})}),a.jsx("image",{href:X,x:Pt.x+Ht.x,y:Pt.y+Ht.y,width:Ht.width,height:Ht.height,preserveAspectRatio:"none",clipPath:`url(#${Mt})`})]}):null]}):null,a.jsxs("div",{className:`${e}-flow${d?"":` ${e}-clip`}`,style:{...R,["--"+e+"-fit"]:Je,top:0,left:0,width:f.width,height:f.height},children:[a.jsx("div",{className:`${e}-measure`,ref:P,style:R,"aria-hidden":!0}),De.segments.map((Pe,Be)=>{const ft=De.renderTokens.slice(Pe.from,Pe.to),$t=Be===0;return a.jsx("div",{className:`${e}-line${Pe.justify?` ${e}-line-justify`:""}`,"aria-hidden":!0,style:{top:`${Pe.top}px`,left:`${Pe.left}px`,width:`${Pe.width}px`,textAlign:Pe.justify?void 0:be},children:ft.map((et,Et)=>{const mt=xe&&$t&&Pe.from===0&&Et===0?et.text.slice(1):et.text,gt=su(et.leaf),Re=et.href?a.jsx("a",{className:`${e}-link`,href:et.href,target:et.target,rel:et.target?"noopener noreferrer":void 0,style:gt,children:mt}):a.jsx("span",{style:gt,children:mt});return a.jsxs("span",{children:[!Pe.justify&&Et>0?" ":null,Re]},Et)})},`${Pe.from}-${Pe.to}-${Be}`)}),$&&!g&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:se.map((Pe,Be)=>a.jsx("polygon",{points:Pe.map(ft=>`${ft.x},${ft.y}`).join(" ")},Be))})]}),xe&&T&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...R,top:`${De.capTop+Xe}px`,left:`${De.capLeft}px`,fontSize:`${at}px`,lineHeight:`${at}px`},children:xe}),lt&&Ye&&(g&&w||L)&&Un.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:Ye.top,left:Ye.left,width:Ye.width,height:Ye.height,zIndex:bT,pointerEvents:"none"},children:[g&&w&&a.jsx(uT,{P:e,box:{width:Ye.width,height:Ye.height},viewBox:r,contours:g,snap:w.snap,stretchToBox:!ue,uniformStretch:n==="circle",stage:Le,onStageChange:me,onSelectionChange:qe,onChange:w.onChange,onCommit:w.onCommit}),L&&Pt&&a.jsx(rT,{P:e,box:{width:Ye.width,height:Ye.height},bounds:Pt,natural:ye,imageUrl:X,maskPath:vt,stage:Le,onStageChange:me,focalX:ct,focalY:ot,scale:xt,onChange:L.onChange,onCommit:L.onCommit})]}),lt),a.jsx("div",{className:`${e}-a11y`,children:ge.map((Pe,Be)=>a.jsx("p",{children:Pe},Be))}),Ze&&a.jsxs("svg",{className:`${e}-overflow-icon`,width:"33",height:"24",viewBox:"0 0 33 24",style:{top:Qe.top,left:Qe.left},"aria-hidden":!0,children:[a.jsx("path",{d:"M12.8,4 L20.2,4 C24.68042,4 26.9206301,4 28.631924,4.87194781 C31.3123488,6.23769248 33,8.99168887 33,12 C33,15.0083111 31.3123488,17.7623075 28.631924,19.1280522 C26.9206301,20 24.68042,20 20.2,20 L12.8,20 C8.31957995,20 6.07936993,20 4.368076,19.1280522 C1.68765116,17.7623075 0,15.0083111 0,12 C0,8.99168887 1.68765116,6.23769248 4.368076,4.87194781 C6.07936993,4 8.31957995,4 12.8,4 Z",fill:"#FF4400"}),a.jsx("path",{transform:"translate(5, 0)",fill:"#FFFFFF",d:"M12,5.625 C12.3846269,5.625 12.7016304,5.91453014 12.7449542,6.28753416 L12.75,6.375 L12.75,11.25 L17.625,11.25 C18.0392136,11.25 18.375,11.5857864 18.375,12 C18.375,12.3846269 18.0854699,12.7016304 17.7124658,12.7449542 L17.625,12.75 L12.75,12.75 L12.75,17.625 C12.75,18.0392136 12.4142136,18.375 12,18.375 C11.6153731,18.375 11.2983696,18.0854699 11.2550458,17.7124658 L11.25,17.625 L11.25,12.75 L6.375,12.75 C5.96078644,12.75 5.625,12.4142136 5.625,12 C5.625,11.6153731 5.91453014,11.2983696 6.28753416,11.2550458 L6.375,11.25 L11.25,11.25 L11.25,6.375 C11.25,5.96078644 11.5857864,5.625 12,5.625 Z"})]})]})}const Qp=["diamond","parallelogram","vase","circle","shield","bobbin","custom"],LT={x:0,y:0,width:100,height:100},PT=e=>{const t=(e??"").trim().split(/[\s,]+/).map(Number).filter(n=>!Number.isNaN(n));return t.length<4||t[2]<=0||t[3]<=0?LT:{x:t[0],y:t[1],width:t[2],height:t[3]}},RT=e=>`
|
|
27331
27332
|
.${e}-wrapper {
|
|
27332
27333
|
box-sizing: border-box;
|
|
27333
27334
|
display: flex;
|
|
@@ -27556,7 +27557,7 @@ export function Burger({
|
|
|
27556
27557
|
clip-path: inset(50%);
|
|
27557
27558
|
white-space: nowrap;
|
|
27558
27559
|
}
|
|
27559
|
-
`,
|
|
27560
|
+
`,MT=1;function ET({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,isSelected:r,onUpdateSettings:l}){const{prefix:c}=A.useScopedStyles(),d=s.useMemo(()=>RT(c),[c]),u=n??!1,p=!!r||!!o,v=s.useMemo(()=>Array.isArray(t)?t[0]??{}:{},[t]),x=(e==null?void 0:e.shape)??"custom",m=(e==null?void 0:e.customPath)??"",h=(e==null?void 0:e.pathFit)??"stretch",b=s.useMemo(()=>PT(e==null?void 0:e.pathViewBox),[e==null?void 0:e.pathViewBox]),S=(e==null?void 0:e.shapeMode)==="B"?"avoid":"contain",M=(e==null?void 0:e.textAlign)??"left",y=((e==null?void 0:e.overflowMode)??"clip")==="visible",$=((e==null?void 0:e.fitText)??"off")==="on",R=((e==null?void 0:e.hyphenate)??"off")==="on",X=A.scalingValue((e==null?void 0:e.padding)??0,u),B=Math.max(1,Math.round((e==null?void 0:e.columns)??1)),O=A.scalingValue((e==null?void 0:e.columnGutter)??0,u),N=(e==null?void 0:e.dropCapSize)??MT,z=Math.max(1,Math.round((e==null?void 0:e.dropCapLines)??N)),C=u&&p&&!i,I=u&&!i,[j,E]=s.useState(!1);s.useEffect(()=>{if(!u||!p){E(!1);return}const Y=()=>E(!0),pe=()=>E(!1),H=["ArticleEditor.Item:drag-start","ArticleEditor.Selection:resize-start","ArticleEditor.Selection:move-start"],Ie=["ArticleEditor.Item:drag-end","ArticleEditor.Selection:resize-end","ArticleEditor.Selection:move-end"];for(const de of H)window.addEventListener(de,Y);for(const de of Ie)window.addEventListener(de,pe);return()=>{for(const de of H)window.removeEventListener(de,Y);for(const de of Ie)window.removeEventListener(de,pe)}},[u,p]);const w=u&&p&&!i&&typeof l=="function",L=!j,V=Math.max(0,(e==null?void 0:e.pathSnap)??0),_=s.useRef(e??{}),K=s.useRef(""),P=[e==null?void 0:e.customPath,e==null?void 0:e.shape,e==null?void 0:e.pathFit,e==null?void 0:e.pathViewBox,e==null?void 0:e.imageScale,e==null?void 0:e.imageFocalX,e==null?void 0:e.imageFocalY,e==null?void 0:e.image].join("\0");if(P!==K.current)K.current=P,_.current=e??{};else if(e){const{customPath:Y,shape:pe,pathFit:H,pathViewBox:Ie,imageScale:de,imageFocalX:Z,imageFocalY:Ne,image:Oe,...Je}=e,De=_.current;for(const Ze of Object.keys(Je))if(De[Ze]!==Je[Ze]){_.current={...De,...Je};break}}const[f,U]=s.useState(null),[te,ce]=s.useState(!1),[F,ie]=s.useState(!1),T=s.useCallback(()=>ie(!1),[]),le=_.current.shape??x,J=!!(f&&(f.base===m||f.serialized===m)),Se=J&&f?f.serialized:m;s.useEffect(()=>{w||(ce(!1),ie(!1))},[w]),s.useEffect(()=>{!f||te||f.serialized===m&&U(null)},[f,m,te]);const Le=s.useMemo(()=>{if(!w)return null;if(f&&(f.base===m||f.serialized===m))return f.contours;const Y=ki(m);return Y.length?Y:null},[w,f,m]),me=!!(h==="viewbox"&&((e==null?void 0:e.pathViewBox)??"")===Zs&&Le&&(x==="circle"||!Xp(Le,b))),ye=s.useCallback((Y,pe,H)=>{const Ie=Wo(Y);if(U(de=>({base:de&&(de.base===m||de.serialized===m)?de.base:m,serialized:Ie,contours:Y})),pe){const de=_.current,Z=H!=null&&H.preserveShape?de.shape:"custom",Ne={...de,shape:Z,customPath:Ie};_.current=Ne,l==null||l(Ne)}},[m,l]),ee=s.useMemo(()=>w?{contours:me?Le:null,snap:V,needsConversion:!me,onConvert:Y=>{const pe=Wo(Y);U({base:pe,serialized:pe,contours:Y});const H={..._.current,pathFit:"viewbox",pathViewBox:Zs,customPath:pe};_.current=H,l==null||l(H)},onChange:(Y,pe)=>{ce(!0),ie(!!(pe!=null&&pe.carryImage)),ye(Y,!1)},onCommit:(Y,pe)=>{ye(Y,!0,pe),ce(!1)}}:null,[w,me,Le,V,l,ye]),oe=S==="avoid"&&!!(e!=null&&e.image),re=s.useMemo(()=>({focalX:(e==null?void 0:e.imageFocalX)??.5,focalY:(e==null?void 0:e.imageFocalY)??.5,scale:(e==null?void 0:e.imageScale)??1}),[e==null?void 0:e.imageFocalX,e==null?void 0:e.imageFocalY,e==null?void 0:e.imageScale]),[ge,we]=s.useState(null),Ae=ge??re,fe=s.useCallback(Y=>we(Y),[]),ve=s.useCallback(Y=>{we(Y);const pe={..._.current,imageFocalX:Y.focalX,imageFocalY:Y.focalY,imageScale:Y.scale};_.current=pe,l==null||l(pe)},[l]);s.useEffect(()=>{ge&&Math.abs(ge.focalX-re.focalX)<1e-9&&Math.abs(ge.focalY-re.focalY)<1e-9&&Math.abs(ge.scale-re.scale)<1e-9&&we(null)},[ge,re]);const xe=s.useMemo(()=>!w||!oe?null:{onChange:fe,onCommit:ve},[w,oe,fe,ve]),[g,G]=s.useState(void 0),Q=s.useRef(void 0),ne=s.useCallback(Y=>{const pe=Q.current;pe!==void 0&&Math.abs(pe-Y)<.005||(Q.current=Y,G(Y))},[]),ue=s.useMemo(()=>$&&typeof g=="number"?g:1,[g,$]),q=Y=>`calc(${Y} * var(--${c}-fit, 1))`,D=s.useMemo(()=>{var H,Ie,de,Z,Ne;const Y=(e==null?void 0:e.textFontSize)??.012,pe=Math.max((e==null?void 0:e.textLineHeight)??Y,Y);return{fontFamily:zo(e==null?void 0:e.textFontFamily),fontWeight:(H=e==null?void 0:e.textFontSettings)==null?void 0:H.fontWeight,fontStyle:(Ie=e==null?void 0:e.textFontSettings)==null?void 0:Ie.fontStyle,fontSize:q(A.scalingValue(Y,u)),lineHeight:q(A.scalingValue(pe,u)),letterSpacing:q(A.scalingValue((e==null?void 0:e.textLetterSpacing)??0,u)),wordSpacing:q(A.scalingValue((e==null?void 0:e.textWordSpacing)??0,u)),textTransform:(de=e==null?void 0:e.textTextAppearance)==null?void 0:de.textTransform,textDecoration:(Z=e==null?void 0:e.textTextAppearance)==null?void 0:Z.textDecoration,fontVariant:(Ne=e==null?void 0:e.textTextAppearance)==null?void 0:Ne.fontVariant}},[e,u,c]),se={[`--${c}-text-color`]:(e==null?void 0:e.textColor)??"#000000",[`--${c}-link-color`]:(e==null?void 0:e.linkColor)??(e==null?void 0:e.textColor)??"#000000",[`--${c}-background-color`]:(e==null?void 0:e.backgroundColor)??"transparent"};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx("div",{className:`${c}-wrapper`,style:{...se},children:a.jsx(IT,{P:c,item:v,shape:le,customPath:m,pathFit:h,viewBox:b,mode:S,align:M,allowOverflow:y,fitEnabled:$,scale:ue,onFitScale:ne,padding:X,columns:B,gutter:O,hyphenate:R,showOverflowIndicator:I,dropCapLines:z,dropCapSize:N,showGuides:(C||w)&&L,typography:D,imageUrl:S==="avoid"?e==null?void 0:e.image:null,imageFocalX:Ae.focalX,imageFocalY:Ae.focalY,imageScale:Ae.scale,imageCustomPath:Se,imagePathEdited:J,pathDragActive:te,pathCarryImage:F,onCarryImageConsumed:T,pathEditor:L?ee:null,imageEditor:L?xe:null})})]})}const kT=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
27560
27561
|
import type React from 'react';
|
|
27561
27562
|
import { CommonComponentProps } from '../props';
|
|
27562
27563
|
import { scalingValue, useScopedStyles } from '../utils/index';
|
|
@@ -28394,4 +28395,4 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
|
|
|
28394
28395
|
</>
|
|
28395
28396
|
);
|
|
28396
28397
|
}
|
|
28397
|
-
`,
|
|
28398
|
+
`,du=[...Qp],AT={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},FT={type:"object",version:1,settings:{sizing:"manual",properties:{shape:{type:"string",scope:"layout",display:{type:"shape-select",isFilled:!0,enum:du},enum:du},customPath:{type:"string",scope:"layout",title:"Path",tooltip:"SVG path (M…) or a point list (0,0 100,0 50,100). Used when Shape is set to custom.",display:{type:"full-width-input",placeholder:"M0,0 C…"}},pathSnap:{type:"number",scope:"common",title:"Snap",tooltip:"Grid the points snap to while dragging, in path units (the path box is 100 x 100). 0 is off.",min:0,max:25,step:.5,display:{type:"numeric-input"}},pathFit:{type:"string",scope:"common",title:"Path fit",tooltip:"Stretch — the drawing fills the box. Viewbox — the drawing keeps its position in path coordinates (0–100).",display:{type:"toggle-cycle",enum:["stretch","viewbox"]}},shapeMode:{type:"string",scope:"common",title:"",tooltip:"A — text fills the path. B — text flows around the path.",display:{type:"radio-group"},enum:["A","B"]},fitText:{type:"string",scope:"common",title:"Fit text",tooltip:"Scales the type down until all text fits the path.",display:{type:"toggle-cycle",enum:["off","on"]}},hyphenate:{type:"string",scope:"common",title:"Hyphenate",tooltip:"Breaks long words between syllables, using the detected language of the text.",display:{type:"toggle-cycle",enum:["off","on"]}},padding:{type:"number",scope:"layout",title:"Padding",tooltip:"Insets the shape and its text on all sides.",min:0,display:{type:"numeric-input"}},columns:{type:"number",scope:"layout",title:"Columns",tooltip:"Splits the text area into columns. Text fills them left to right.",min:1,max:24,step:1,display:{type:"common-numeric-input"}},columnGutter:{type:"number",scope:"layout",title:"Columns gap",tooltip:"Space between columns.",min:0,display:{type:"numeric-input"}},dropCapLines:{type:"number",scope:"common",title:"Drop cap lines",min:1,max:8,step:1,display:{type:"numeric-input"}},dropCapSize:{type:"number",scope:"common",title:"Drop cap size",tooltip:"Height of the drop cap, in lines of body text.",min:1,max:8,step:1,display:{type:"common-numeric-input"}},image:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},backgroundColor:{type:"string",scope:"common",title:"BG Shape",display:{type:"settings-color-picker"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...AT.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textAlign:{type:"string",scope:"layout",title:"",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"style-panel-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"style-panel-color-picker"}}},defaults:{...qp("circle"),pathSnap:0,shapeMode:"A",fitText:"off",hyphenate:"off",dropCapLines:1,dropCapSize:1,image:"01M3QM74XGCCGW8DXMAHA0RGGH",backgroundColor:"rgba(0, 0, 0, 0)",textFontFamily:"Basteleur",textFontSettings:{fontWeight:400,fontStyle:"normal"},textAlign:"center",textTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",linkColor:"#000000"},layoutDefaults:{m:{textFontSize:.037,textLineHeight:.048,textLetterSpacing:0,textWordSpacing:0,padding:0,columns:1,columnGutter:.04},t:{textFontSize:.018,textLineHeight:.024,textLetterSpacing:0,textWordSpacing:0,padding:0,columns:1,columnGutter:.02},d:{textFontSize:.032,textLineHeight:.0155,textLetterSpacing:-.001,textWordSpacing:0,padding:0,columns:1,columnGutter:.015}},layout:["__componentName__","shape","customPath","pathSnap","pathFit","shapeMode","fitText","hyphenate","padding","columns","columnGutter","dropCapLines","dropCapSize","image"],displayRules:[{if:{name:"shapeMode",value:"B",isNotEqual:!0},then:{name:"properties.image.display.visible",value:!1}},{if:{name:"shapeMode",value:"B",isNotEqual:!0},then:{name:"properties.padding.display.visible",value:!1}},{if:{name:"shapeMode",value:"A"},then:{name:"properties.shape.display.isFilled",value:!0}},{if:{name:"shapeMode",value:"B"},then:{name:"properties.shape.display.isFilled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["shapeMode"]},{type:"row",title:"Shape",items:["shape"]},{type:"row",items:["dropCapSize","hyphenate"]},{type:"row",items:["padding","image"]},{type:"row",items:["columns","columnGutter"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"",items:["textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textAlign","textTextAppearance"]}]}],paletteBookmark:{items:["textColor","linkColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",max:1,settings:{addItemWithoutImage:!0,addItemFromFileExplorer:!1},display:{type:"array"},items:{type:"object",properties:{text:{label:"Text",placeholder:"Add Text...",display:{type:"rich-text"}}}},default:[{text:[{type:"paragraph",children:[{text:"Le loro superficie, excelso Duca, fra loro similmente possiamo dire al medesimo modo esser proportionali commo de lor massa corporea s'è dicto, cioè irrationali per la malitia de la figura pentagona che in lo duodecedron se interpone. Ma de l'altre possano a le volte essere rationali, commo quelle del tetracedron, cubo, octocedron, per essere triangole e quadrate e note in proportione con lo diametro de la loro sphera in la quale si formano, commo s'è veduto di sopra."}]}]}]}},NT={element:ET,id:"pretext",name:"Shaped Type",category:"typography",version:1,normalizeLayoutSettingsUpdate:(e,t)=>{const n=e.shape;return typeof n!="string"||n==="custom"||Qp.indexOf(n)===-1||(t==null?void 0:t.shape)===n?e:{...e,...qp(n)}},defaultSize:{d:{width:1420,height:640},t:{width:710,height:320},m:{width:355,height:160}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/pretext.png"},schema:FT,sourceCode:kT,assetsPaths:{content:[],parameters:[{path:"image",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}},_T=[bh,Lh,Sb,bf,Rf,Of,oy,Ly,Fy,By,pv,a0,dx,xx,tb,pb,Ab,RS,Vb,XS,Cw,c$,sC,NT];exports.getAvailableStatePanels=A.getAvailableStatePanels;exports.getUnavailableStates=A.getUnavailableStates;exports.isPanelAvailable=A.isPanelAvailable;exports.components=_T;exports.isSchemaV1=um;
|