PageSourceSearch

https://www.fc-union-berlin.de/assets/Lightbox-BPPH-55f.js

js fc-union-berlin.de collected 2026-10-02 06:46:24 UTC 29,117 bytes, 1 lines download raw bytes

1import{r as n,w as qt,j as V}from"./url-D6PfGXiy.js";import{L as Qt}from"./LoadingSpinner-B5aY5Cp0.js";import{j as Je}from"./TopTabBar-Bql5_IpW.js";import"./loading-C6oHrsra.js";const dt="carousel",ft="controller",Jt="navigation",Zt="no-scroll",Fe="portal",en="root",pt="toolbar",Re="loading",Me="error",Te="complete",tn="placeholder",nn=e=>`active-slide-${e}`,ht="flex_center",rn="no_scroll",mt="no_scroll_padding",on="slide_wrapper",Q="prev",J="next",Ze="swipe",ne="close",vt="onPointerDown",gt="onPointerMove",Et="onPointerUp",xt="onPointerLeave",bt="onPointerCancel",_t="onKeyDown",sn="onKeyUp",Ct="onWheel",cn="Escape",ln="ArrowLeft",an="ArrowRight",un="button",We="icon",wt="contain",et="cover",dn="Unknown action type",Pt="yarl__";function Y(...e){return[...e].filter(Boolean).join(" ")}function P(e){return`${Pt}${e}`}function U(e){return`--${Pt}${e}`}function le(e,t){return`${e}${t?`_${t}`:""}`}function je(e){return t=>le(e,t)}function fn(e,t){var r;return(r=e==null?void 0:e[t])!==null&&r!==void 0?r:t}function Nt(...e){return()=>{e.forEach(t=>{t()})}}function Z(e,t,r){return()=>{const o=n.useContext(r);if(!o)throw new Error(`${e} must be used within a ${t}.Provider`);return o}}function Lt(){return typeof window<"u"}function pn(e,t=0){const r=10**t;return Math.round((e+Number.EPSILON)*r)/r}function yt(e){return e.type===void 0||e.type==="image"}function hn(e,t){return e.imageFit===et||e.imageFit!==wt&&t===et}function be(e){return typeof e=="string"?Number.parseInt(e,10):e}function xe(e){if(typeof e=="number")return{pixel:e};if(typeof e=="string"){const t=be(e);return e.endsWith("%")?{percent:t}:{pixel:t}}return{pixel:0}}function mn(e,t){const r=xe(t),o=r.percent!==void 0?e.width/100*r.percent:r.pixel;return{width:Math.max(e.width-2*o,0),height:Math.max(e.height-2*o,0)}}function St(e,t){return t>0?(e%t+t)%t:0}function It(e){return e.length>0}function Ot(e,t){return e[St(t,e.length)]}function $e(e,t){return It(e)?Ot(e,t):void 0}function vn(e){return yt(e)?e.src:void 0}function gn(e,t,r=0){return Math.min(e.preload,Math.max(e.finite?t.length-1:Math.floor(t.length/2),r))}const Ue={open:!1,close:()=>{},index:0,slides:[],render:{},plugins:[],toolbar:{buttons:[ne]},labels:{},animation:{fade:250,swipe:500,easing:{fade:"ease",swipe:"ease-out",navigation:"ease-in-out"}},carousel:{finite:!1,preload:2,padding:"16px",spacing:"30%",imageFit:wt,imageProps:{}},controller:{ref:null,focus:!0,aria:!1,touchAction:"none",closeOnPullUp:!1,closeOnPullDown:!1,closeOnBackdropClick:!1,preventDefaultWheelX:!0,preventDefaultWheelY:!1},portal:{},noScroll:{disabled:!1},on:{},styles:{},className:""};function ee(e,t){return{name:e,component:t}}function T(e,t){return{module:e,children:t}}function Rt(e,t,r){return e.module.name===t?r(e):e.children?[T(e.module,e.children.flatMap(o=>{var i;return(i=Rt(o,t,r))!==null&&i!==void 0?i:[]}))]:[e]}function te(e,t,r){return e.flatMap(o=>{var i;return(i=Rt(o,t,r))!==null&&i!==void 0?i:[]})}function En(e,t=[],r=[]){let o=e;const i=m=>{const p=[...o];for(;p.length>0;){const u=p.pop();if((u==null?void 0:u.module.name)===m)return!0;u!=null&&u.children&&p.push(...u.children)}return!1},s=(m,p)=>{if(m===""){o=[T(p,o)];return}o=te(o,m,u=>[T(p,[u])])},c=(m,p)=>{o=te(o,m,u=>[T(u.module,[T(p,u.children)])])},l=(m,p,u)=>{o=te(o,m,v=>{var N;return[T(v.module,[...u?[T(p)]:[],...(N=v.children)!==null&&N!==void 0?N:[],...u?[]:[T(p)]])]})},f=(m,p,u)=>{o=te(o,m,v=>[...u?[T(p)]:[],v,...u?[]:[T(p)]])},d=m=>{c(ft,m)},h=(m,p)=>{o=te(o,m,u=>[T(p,u.children)])},g=m=>{o=te(o,m,p=>p.children)},b=m=>{r.push(m)};return t.forEach(m=>{m({contains:i,addParent:s,append:c,addChild:l,addSibling:f,addModule:d,replace:h,remove:g,augment:b})}),{config:o,augmentation:m=>r.reduce((p,u)=>u(p),m)}}const Mt=n.createContext(null),Tt=Z("useDocument","DocumentContext",Mt);function xn({nodeRef:e,children:t}){const r=n.useMemo(()=>{const o=s=>{var c;return((c=s||e.current)===null||c===void 0?void 0:c.ownerDocument)||document};return{getOwnerDocument:o,getOwnerWindow:s=>{var c;return((c=o(s))===null||c===void 0?void 0:c.defaultView)||window}}},[e]);return n.createElement(Mt.Provider,{value:r},t)}const At=n.createContext(null),_e=Z("useEvents","EventsContext",At);function bn({children:e}){const[t]=n.useState({});n.useEffect(()=>()=>{Object.keys(t).forEach(o=>delete t[o])},[t]);const r=n.useMemo(()=>{const o=(c,l)=>{var f;(f=t[c])===null||f===void 0||f.splice(0,t[c].length,...t[c].filter(d=>d!==l))};return{publish:(...[c,l])=>{var f;(f=t[c])===null||f===void 0||f.forEach(d=>d(l))},subscribe:(c,l)=>(t[c]||(t[c]=[]),t[c].push(l),()=>o(c,l)),unsubscribe:o}},[t]);return n.createElement(At.Provider,{value:r},e)}const Dt=n.createContext(null),ae=Z("useLightboxProps","LightboxPropsContext",Dt);function _n({children:e,...t}){return n.createElement(Dt.Provider,{value:t},e)}const kt=n.createContext(null),Ce=Z("useLightboxState","LightboxStateContext",kt),Wt=n.createContext(null),Cn=Z("useLightbox
1Dispatch","LightboxDispatchContext",Wt);function wn(e,t){switch(t.type){case"swipe":{const{slides:r}=e,o=(t==null?void 0:t.increment)||0,i=e.globalIndex+o,s=St(i,r.length),c=$e(r,s),l=o||t.duration?{increment:o,duration:t.duration,easing:t.easing}:void 0;return{slides:r,currentIndex:s,globalIndex:i,currentSlide:c,animation:l}}case"update":return t.slides!==e.slides||t.index!==e.currentIndex?{slides:t.slides,currentIndex:t.index,globalIndex:t.index,currentSlide:$e(t.slides,t.index)}:e;default:throw new Error(dn)}}function Pn({slides:e,index:t,children:r}){const[o,i]=n.useReducer(wn,{slides:e,currentIndex:t,globalIndex:t,currentSlide:$e(e,t)});n.useEffect(()=>{i({type:"update",slides:e,index:t})},[e,t]);const s=n.useMemo(()=>({...o,state:o,dispatch:i}),[o,i]);return n.createElement(Wt.Provider,{value:i},n.createElement(kt.Provider,{value:s},r))}const $t=n.createContext(null),we=Z("useTimeouts","TimeoutsContext",$t);function Nn({children:e}){const[t]=n.useState([]);n.useEffect(()=>()=>{t.forEach(o=>window.clearTimeout(o)),t.splice(0,t.length)},[t]);const r=n.useMemo(()=>{const o=c=>{t.splice(0,t.length,...t.filter(l=>l!==c))};return{setTimeout:(c,l)=>{const f=window.setTimeout(()=>{o(f),c()},l);return t.push(f),f},clearTimeout:c=>{c!==void 0&&(o(c),window.clearTimeout(c))}}},[t]);return n.createElement($t.Provider,{value:r},e)}const Ut=n.forwardRef(function({label:t,className:r,icon:o,renderIcon:i,onClick:s,style:c,...l},f){const{styles:d,labels:h}=ae();return n.createElement("button",{ref:f,type:"button","aria-label":fn(h,t),className:Y(P(un),r),onClick:s,style:{...c,...d.button},...l},i?i():n.createElement(o,{className:P(We),style:d.icon}))});function Ln(e,t){const r=o=>n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",...o},t);return r.displayName=e,r}function ue(e,t){return Ln(e,n.createElement("g",{fill:"currentColor"},n.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),t))}const yn=ue("Close",n.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),Sn=ue("Previous",n.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),In=ue("Next",n.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),On=ue("Loading",n.createElement(n.Fragment,null,Array.from({length:8}).map((e,t,r)=>n.createElement("line",{key:t,x1:"12",y1:"6.5",x2:"12",y2:"1.8",strokeLinecap:"round",strokeWidth:"2.6",stroke:"currentColor",strokeOpacity:1/r.length*(t+1),transform:`rotate(${360/r.length*t}, 12, 12)`})))),Rn=ue("Error",n.createElement("path",{d:"M21.9,21.9l-8.49-8.49l0,0L3.59,3.59l0,0L2.1,2.1L0.69,3.51L3,5.83V19c0,1.1,0.9,2,2,2h13.17l2.31,2.31L21.9,21.9z M5,18 l3.5-4.5l2.5,3.01L12.17,15l3,3H5z M21,18.17L5.83,3H19c1.1,0,2,0.9,2,2V18.17z"})),de=Lt()?n.useLayoutEffect:n.useEffect;function Vt(){const[e,t]=n.useState(!1);return n.useEffect(()=>{var r,o;const i=(r=window.matchMedia)===null||r===void 0?void 0:r.call(window,"(prefers-reduced-motion: reduce)");t(i==null?void 0:i.matches);const s=c=>t(c.matches);return(o=i==null?void 0:i.addEventListener)===null||o===void 0||o.call(i,"change",s),()=>{var c;return(c=i==null?void 0:i.removeEventListener)===null||c===void 0?void 0:c.call(i,"change",s)}},[]),e}function Mn(e){let t=0,r=0,o=0;const s=window.getComputedStyle(e).transform.match(/matrix.*\((.+)\)/);if(s){const c=s[1].split(",").map(be);c.length===6?(t=c[4],r=c[5]):c.length===16&&(t=c[12],r=c[13],o=c[14])}return{x:t,y:r,z:o}}function tt(e,t){const r=n.useRef(),o=n.useRef(),i=Vt();return de(()=>{var s,c,l;if(e.current&&r.current!==void 0&&!i){const{keyframes:f,duration:d,easing:h,onfinish:g}=t(r.current,e.current.getBoundingClientRect(),Mn(e.current))||{};if(f&&d){(s=o.current)===null||s===void 0||s.cancel(),o.current=void 0;try{o.current=(l=(c=e.current).animate)===null||l===void 0?void 0:l.call(c,f,{duration:d,easing:h})}catch(b){console.error(b)}o.current&&(o.current.onfinish=()=>{o.current=void 0,g==null||g()})}}r.current=void 0}),{prepareAnimation:s=>{r.current=s},isAnimationPlaying:()=>{var s;return((s=o.current)===null||s===void 0?void 0:s.playState)==="running"}}}function Ft(){const e=n.useRef(null),t=n.useRef(),[r,o]=n.useState();return{setContainerRef:n.useCallback(s=>{e.current=s,t.current&&(t.current.disconnect(),t.current=void 0);const c=()=>
1{if(s){const l=window.getComputedStyle(s),f=d=>parseFloat(d)||0;o({width:Math.round(s.clientWidth-f(l.paddingLeft)-f(l.paddingRight)),height:Math.round(s.clientHeight-f(l.paddingTop)-f(l.paddingBottom))})}else o(void 0)};c(),s&&typeof ResizeObserver<"u"&&(t.current=new ResizeObserver(c),t.current.observe(s))},[]),containerRef:e,containerRect:r}}function Ee(){const e=n.useRef(),{setTimeout:t,clearTimeout:r}=we();return n.useCallback((o,i)=>{r(e.current),e.current=t(o,i>0?i:0)},[t,r])}function M(e){const t=n.useRef(e);return de(()=>{t.current=e}),n.useCallback((...r)=>{var o;return(o=t.current)===null||o===void 0?void 0:o.call(t,...r)},[])}function nt(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Ve(e,t){return n.useMemo(()=>e==null&&t==null?null:r=>{nt(e,r),nt(t,r)},[e,t])}function Tn(e,t=!1){const r=n.useRef();de(()=>{t&&r.current&&(r.current=!1,e())},[t,e]);const o=n.useCallback(()=>{r.current=!0},[]),i=n.useCallback(()=>{r.current=!1},[]);return{onFocus:o,onBlur:i}}function Be(){const[e,t]=n.useState(!1);return de(()=>{t(window.getComputedStyle(window.document.documentElement).direction==="rtl")},[]),e}function An(){const[e]=n.useState({}),t=n.useCallback((i,s)=>{var c;(c=e[i])===null||c===void 0||c.forEach(l=>{s.isPropagationStopped()||l(s)})},[e]),r=n.useMemo(()=>({onPointerDown:i=>t(vt,i),onPointerMove:i=>t(gt,i),onPointerUp:i=>t(Et,i),onPointerLeave:i=>t(xt,i),onPointerCancel:i=>t(bt,i),onKeyDown:i=>t(_t,i),onKeyUp:i=>t(sn,i),onWheel:i=>t(Ct,i)}),[t]),o=n.useCallback((i,s)=>(e[i]||(e[i]=[]),e[i].unshift(s),()=>{const c=e[i];c&&c.splice(0,c.length,...c.filter(l=>l!==s))}),[e]);return{registerSensors:r,subscribeSensors:o}}function rt(e,t){const r=n.useRef(0),o=Ee(),i=M((...s)=>{r.current=Date.now(),e(s)});return n.useCallback((...s)=>{o(()=>{i(s)},t-(Date.now()-r.current))},[t,i,o])}const Ae=je("slide"),De=je("slide_image");function Dn({slide:e,offset:t,render:r,rect:o,imageFit:i,imageProps:s,onClick:c,onLoad:l,style:f}){var d,h,g,b,m,p,u;const[v,N]=n.useState(Re),{publish:C}=_e(),{setTimeout:O}=we(),k=n.useRef(null);n.useEffect(()=>{t===0&&C(nn(v))},[t,v,C]);const _=M(y=>{("decode"in y?y.decode():Promise.resolve()).catch(()=>{}).then(()=>{y.parentNode&&(N(Te),O(()=>{l==null||l(y)},0))})}),w=n.useCallback(y=>{k.current=y,y!=null&&y.complete&&_(y)},[_]),S=n.useCallback(y=>{_(y.currentTarget)},[_]),A=n.useCallback(()=>{N(Me)},[]),E=hn(e,i),x=(y,X)=>Number.isFinite(y)?y:X,L=x(Math.max(...((h=(d=e.srcSet)===null||d===void 0?void 0:d.map(y=>y.width))!==null&&h!==void 0?h:[]).concat(e.width?[e.width]:[]).filter(Boolean)),((g=k.current)===null||g===void 0?void 0:g.naturalWidth)||0),j=x(Math.max(...((m=(b=e.srcSet)===null||b===void 0?void 0:b.map(y=>y.height))!==null&&m!==void 0?m:[]).concat(e.height?[e.height]:[]).filter(Boolean)),((p=k.current)===null||p===void 0?void 0:p.naturalHeight)||0),$=L&&j?{maxWidth:`min(${L}px, 100%)`,maxHeight:`min(${j}px, 100%)`}:{maxWidth:"100%",maxHeight:"100%"},G=(u=e.srcSet)===null||u===void 0?void 0:u.sort((y,X)=>y.width-X.width).map(y=>`${y.src} ${y.width}w`).join(", "),R=()=>o&&!E&&e.width&&e.height?o.height/e.height*e.width:Number.MAX_VALUE,Pe=G&&o&&Lt()?`${Math.round(Math.min(R(),o.width))}px`:void 0,{style:B,className:pe,...Ne}=s||{};return n.createElement(n.Fragment,null,n.createElement("img",{ref:w,onLoad:S,onError:A,onClick:c,draggable:!1,className:Y(P(De()),E&&P(De("cover")),v!==Te&&P(De("loading")),pe),style:{...$,...f,...B},...Ne,alt:e.alt,sizes:Pe,srcSet:G,src:e.src}),v!==Te&&n.createElement("div",{className:P(Ae(tn))},v===Re&&(r!=null&&r.iconLoading?r.iconLoading():n.createElement(On,{className:Y(P(We),P(Ae(Re)))})),v===Me&&(r!=null&&r.iconError?r.iconError():n.createElement(Rn,{className:Y(P(We),P(Ae(Me)))}))))}const kn=n.forwardRef(function({className:t,children:r,...o},i){const s=n.useRef(null);return n.createElement(xn,{nodeRef:s},n.createElement("div",{ref:Ve(i,s),className:Y(P("root"),t),...o},r))});var D;(function(e){e[e.NONE=0]="NONE",e[e.SWIPE=1]="SWIPE",e[e.PULL=2]="PULL",e[e.ANIMATION=3]="ANIMATION"})(D||(D={}));function Wn(e,t,r,o,i){n.useEffect(()=>Nt(e(vt,t),e(gt,r),e(Et,o),e(xt,o),e(bt,o)),[e,t,r,o,i])}var H;(function(e){e[e.NONE=0]="NONE",e[e.SWIPE=1]="SWIPE",e[e.PULL=2]="PULL"})(H||(H={}));const ke=30;function $n(e,t,r,o,i,s,c,l,f,d,h,g,b,m){const p=n.useRef(0),u=n.useRef([]),v=n.useRef(),N=n.useRef(0),C=n.useRef(H.NONE),O=n.useCallback(E=>{v.current===E.pointerId&&(v.current=void 0,C.current=H.NONE);const x=u.current;x.splice(0,x.length,...x.filter(L=>L.pointerId!==E.pointerId))},[]),k=n.useCallback(E=>{O(E),E.persist(),u.current.push(E)},[O]),_=M(E=>{k(E)}),w=(E,x)=>d&&E>x||f&&E<-x,S=M(E=>{if(u.current.find(x=>x.pointerId===E.pointerId)&&v.current===E.pointerId){const x=Date.now()-N.current,L=p.current;C.current===H.SWIPE?Math.abs(L)>.3*r||Math.abs(L)>5&&x<o?c(L,x):l(L):C.current===H.PULL&&(w(L,2*ke)?b(L,x):m(L)),p.current=0,C.current=H.NONE}O(E)}),A=M(E=>{const x=u.current.find(L=>
1L.pointerId===E.pointerId);if(x){const L=v.current===E.pointerId;if(E.buttons===0){L&&p.current!==0?S(E):O(x);return}const j=E.clientX-x.clientX,$=E.clientY-x.clientY;if(v.current===void 0){const G=R=>{k(E),v.current=E.pointerId,N.current=Date.now(),C.current=R};Math.abs(j)>Math.abs($)&&Math.abs(j)>ke&&t(j)?(G(H.SWIPE),i()):Math.abs($)>Math.abs(j)&&w($,ke)&&(G(H.PULL),h())}else L&&(C.current===H.SWIPE?(p.current=j,s(j)):C.current===H.PULL&&(p.current=$,g($)))}});Wn(e,_,A,S)}function Un({preventDefaultWheelX:e,preventDefaultWheelY:t}){const r=n.useRef(null),o=M(i=>{const s=Math.abs(i.deltaX)>Math.abs(i.deltaY);(s&&e||!s&&t||i.ctrlKey)&&i.preventDefault()});return n.useCallback(i=>{var s;i?i.addEventListener("wheel",o,{passive:!1}):(s=r.current)===null||s===void 0||s.removeEventListener("wheel",o),r.current=i},[o])}function Vn(e,t,r,o,i,s,c,l,f){const d=n.useRef(0),h=n.useRef(0),g=n.useRef(),b=n.useRef(),m=n.useRef(0),p=n.useRef(0),{setTimeout:u,clearTimeout:v}=we(),N=n.useCallback(()=>{g.current&&(v(g.current),g.current=void 0)},[v]),C=n.useCallback(()=>{b.current&&(v(b.current),b.current=void 0)},[v]),O=M(()=>{e!==D.SWIPE&&(d.current=0,p.current=0,N(),C())});n.useEffect(O,[e,O]);const k=M(w=>{b.current=void 0,d.current===w&&f(d.current)}),_=M(w=>{if(!w.ctrlKey&&!(Math.abs(w.deltaY)>Math.abs(w.deltaX)))if(e===D.NONE){if(Math.abs(w.deltaX)<=1.2*Math.abs(m.current)){m.current=w.deltaX;return}if(!r(-w.deltaX))return;if(h.current+=w.deltaX,N(),Math.abs(h.current)>30)h.current=0,m.current=0,p.current=Date.now(),s();else{const S=h.current;g.current=u(()=>{g.current=void 0,S===h.current&&(h.current=0)},i)}}else if(e===D.SWIPE){let S=d.current-w.deltaX;if(S=Math.min(Math.abs(S),o)*Math.sign(S),d.current=S,c(S),C(),Math.abs(S)>.2*o){m.current=w.deltaX,l(S,Date.now()-p.current);return}b.current=u(()=>k(S),2*i)}else m.current=w.deltaX});n.useEffect(()=>t(Ct,_),[t,_])}const ot=je("container"),jt=n.createContext(null),fe=Z("useController","ControllerContext",jt);function Fn({children:e,...t}){var r;const{carousel:o,animation:i,controller:s,on:c,styles:l,render:f}=t,{closeOnPullUp:d,closeOnPullDown:h,preventDefaultWheelX:g,preventDefaultWheelY:b}=s,[m,p]=n.useState(),u=Ce(),v=Cn(),[N,C]=n.useState(D.NONE),O=n.useRef(0),k=n.useRef(0),_=n.useRef(1),{registerSensors:w,subscribeSensors:S}=An(),{subscribe:A,publish:E}=_e(),x=Ee(),L=Ee(),j=Ee(),{containerRef:$,setContainerRef:G,containerRect:R}=Ft(),Pe=Ve(Un({preventDefaultWheelX:g,preventDefaultWheelY:b}),G),B=n.useRef(null),pe=Ve(B,void 0),{getOwnerDocument:Ne}=Tt(),y=Be(),X=a=>(y?-1:1)*(typeof a=="number"?a:1),re=M(()=>{var a;return(a=$.current)===null||a===void 0?void 0:a.focus()}),He=M(()=>t),Xe=M(()=>u),he=n.useCallback(a=>E(Q,a),[E]),me=n.useCallback(a=>E(J,a),[E]),oe=n.useCallback(()=>E(ne),[E]),Le=a=>!(o.finite&&(X(a)>0&&u.currentIndex===0||X(a)<0&&u.currentIndex===u.slides.length-1)),ze=a=>{var I;O.current=a,(I=$.current)===null||I===void 0||I.style.setProperty(U("swipe_offset"),`${Math.round(a)}px`)},ye=a=>{var I,W;k.current=a,_.current=(()=>{const se=h&&a>
10?a:d&&a<0?-a:0;return Math.min(Math.max(pn(1-se/60*(1-.5),2),.5),1)})(),(I=$.current)===null||I===void 0||I.style.setProperty(U("pull_offset"),`${Math.round(a)}px`),(W=$.current)===null||W===void 0||W.style.setProperty(U("pull_opacity"),`${_.current}`)},{prepareAnimation:Xt}=tt(B,(a,I,W)=>{if(B.current&&R)return{keyframes:[{transform:`translate(0, ${a.rect.y-I.y+W.y}px)`,opacity:a.opacity},{transform:"translate(0, 0)",opacity:1}],duration:a.duration,easing:i.easing.fade}}),Ke=(a,I)=>{if(d||h){ye(a);let W=0;B.current&&(W=i.fade*(I?2:1),Xt({rect:B.current.getBoundingClientRect(),opacity:_.current,duration:W})),j(()=>{ye(0),C(D.NONE)},W),C(D.ANIMATION),I||oe()}},{prepareAnimation:zt,isAnimationPlaying:Kt}=tt(B,(a,I,W)=>{var z;if(B.current&&R&&(!((z=u.animation)===null||z===void 0)&&z.duration)){const F=xe(o.spacing),se=(F.percent?F.percent*R.width/100:F.pixel)||0;return{keyframes:[{transform:`translate(${X(u.globalIndex-a.index)*(R.width+se)+a.rect.x-I.x+W.x}px, 0)`},{transform:"translate(0, 0)"}],duration:u.animation.duration,easing:u.animation.easing}}}),ie=M(a=>{var I,W;const z=a.offset||0,F=z?i.swipe:(I=i.navigation)!==null&&I!==void 0?I:i.swipe,se=!z&&!Kt()?i.easing.navigation:i.easing.swipe;let{direction:ve}=a;const ge=(W=a.count)!==null&&W!==void 0?W:1;let Se=D.ANIMATION,K=F*ge;if(!ve){const ce=R==null?void 0:R.width,Qe=a.duration||0,Oe=ce?F/ce*Math.abs(z):F;ge!==0?(Qe<Oe?K=K/Oe*Math.max(Qe,Oe/5):ce&&(K=F/ce*(ce-Math.abs(z))),ve=X(z)>0?Q:J):K=F/2}let Ie=0;ve===Q?Le(X(1))?Ie=-ge:(Se=D.NONE,K=F):ve===J&&(Le(X(-1))?Ie=ge:(Se=D.NONE,K=F)),K=Math.round(K),L(()=>{ze(0),C(D.NONE)},K),B.current&&zt({rect:B.current.getBoundingClientRect(),index:u.globalIndex}),C(Se),E(Ze,{type:"swipe",increment:Ie,duration:K,easing:se})});n.useEffect(()=>{var a,I;!((a=u.animation)===null||a===void 0)&&a.increment&&(!((I=u.animation)===null||I===void 0)&&I.duration)&&x(()=>v({type:"swipe",increment:0}),u.animation.duration)},[u.animation,v,x]);const Ye=[S,Le,(R==null?void 0:R.width)||0,i.swipe,()=>C(D.SWIPE),a=>ze(a),(a,I)=>ie({offset:a,duration:I,count:1}),a=>ie({offset:a,count:0})],Yt=[()=>{h&&C(D.PULL)},a=>ye(a),a=>Ke(a),a=>Ke(a,!0)];$n(...Ye,d,h,...Yt),Vn(N,...Ye);const Ge=M(()=>{s.focus&&Ne().querySelector(`.${P(Fe)} .${P(ot())}`)&&re()});n.useEffect(Ge,[Ge]);const qe=M(()=>{var a;(a=c.view)===null||a===void 0||a.call(c,{index:u.currentIndex})});n.useEffect(qe,[u.globalIndex,qe]),n.useEffect(()=>Nt(A(Q,a=>ie({direction:Q,...a})),A(J,a=>ie({direction:J,...a})),A(Ze,a=>v(a))),[A,ie,v]);const Gt=n.useMemo(()=>({prev:he,next:me,close:oe,focus:re,slideRect:R?mn(R,o.padding):{width:0,height:0},containerRect:R||{width:0,height:0},subscribeSensors:S,containerRef:$,setCarouselRef:pe,toolbarWidth:m,setToolbarWidth:p}),[he,me,oe,re,S,R,$,pe,m,p,o.padding]);return n.useImperativeHandle(s.ref,()=>({prev:he,next:me,close:oe,focus:re,getLightboxProps:He,getLightboxState:Xe}),[he,me,oe,re,He,Xe]),n.createElement("div",{ref:Pe,className:Y(P(ot()),P(ht)),style:{...N===D.SWIPE?{[U("swipe_offset")]:`${Math.round(O.current)}px`}:null,...N===D.PULL?{[U("pull_offset")]:`${Math.round(k.current)}px`,[U("pull_opacity")]:`${_.current}`}:null,...s.touchAction!=="none"?{[U("controller_touch_action")]:s.touchAction}:null,...l.container},...s.aria?{role:"presentation","aria-live":"polite"}:null,tabIndex:-1,...w},R&&n.createElement(jt.Provider,{value:Gt},e,(r=f.controls)===null||r===void 0?void 0:r.call(f)))}const jn=ee(ft,Fn);function q(e){return le(dt,e)}function it(e){return le("slide",e)}function Bn({slide:e,offset:t}){const r=n.useRef(null),{currentIndex:o}=Ce(),{slideRect:i,close:s}=fe(),{render:c,carousel:{imageFit:l,imageProps:f},on:{click:d},controller:{closeOnBackdropClick:h},styles:{slide:g}}=ae(),b=()=>{var p,u,v,N;let C=(p=c.slide)===null||p===void 0?void 0:p.call(c,{slide:e,offset:t,rect:i});return!C&&yt(e)&&(C=n.createElement(Dn,{slide:e,offset:t,render:c,rect:i,imageFit:l,imageProps:f,onClick:t===0?()=>d==null?void 0:d({index:o}):void 0})),C?n.createElement(n.Fragment,null,(u=c.slideHeader)===null||u===void 0?void 0:u.call(c,{slide:e}),((v=c.slideContainer)!==null&&v!==void 0?v:({children:O})=>O)({slide:e,children:C}),(N=c.slideFooter)===null||N===void 0?void 0:N.call(c,{slide:e})):null},m=p=>{const u=r.current,v=p.target instanceof HTMLElement?p.target:void 0;h&&v&&u&&(v===u||Array.from(u.children).find(N=>N===v)&&v.classList.contains(P(on)))&&s()};return n.createElement("div",{ref:r,className:Y(P(it()),t===0&&P(it("current")),P(ht)),onClick:m,style:g},b())}function Hn(){const e=ae().styles.slide;return n.createElement("div",{className:P("slide"),style:e})}function Xn({carousel:e}){const{slides:t,currentIndex:r,globalIndex:o}=Ce(),{setCarouselRef:i}=fe(),s=xe(e.spacing),c=xe(e.padding),l=gn(e,t,1),f=[];if(It(t))for(let d=r-l;d<=r+l;d+=1){const h=Ot(t,d),g=o-r+d,b=e.finite&&(d<0||d>t.length-1);f.push(b?{key:g}:{key:[`${g}
1`,vn(h)].filter(Boolean).join("|"),offset:d-r,slide:h})}return n.createElement("div",{ref:i,className:Y(P(q()),f.length>0&&P(q("with_slides"))),style:{[`${U(q("slides_count"))}`]:f.length,[`${U(q("spacing_px"))}`]:s.pixel||0,[`${U(q("spacing_percent"))}`]:s.percent||0,[`${U(q("padding_px"))}`]:c.pixel||0,[`${U(q("padding_percent"))}`]:c.percent||0}},f.map(({key:d,slide:h,offset:g})=>h?n.createElement(Bn,{key:d,slide:h,offset:g}):n.createElement(Hn,{key:d})))}const zn=ee(dt,Xn);function Bt(){const{carousel:e}=ae(),{slides:t,currentIndex:r}=Ce(),o=t.length===0||e.finite&&r===0,i=t.length===0||e.finite&&r===t.length-1;return{prevDisabled:o,nextDisabled:i}}function Kn(e){var t;const r=Be(),{publish:o}=_e(),{animation:i}=ae(),{prevDisabled:s,nextDisabled:c}=Bt(),l=((t=i.navigation)!==null&&t!==void 0?t:i.swipe)/2,f=rt(()=>o(Q),l),d=rt(()=>o(J),l),h=M(g=>{switch(g.key){case cn:o(ne);break;case ln:(r?c:s)||(r?d:f)();break;case an:(r?s:c)||(r?f:d)();break}});n.useEffect(()=>e(_t,h),[e,h])}function st({label:e,icon:t,renderIcon:r,action:o,onClick:i,disabled:s,style:c}){return n.createElement(Ut,{label:e,icon:t,renderIcon:r,className:P(`navigation_${o}`),disabled:s,onClick:i,style:c,...Tn(fe().focus,s)})}function Yn({render:{buttonPrev:e,buttonNext:t,iconPrev:r,iconNext:o},styles:i}){const{prev:s,next:c,subscribeSensors:l}=fe(),{prevDisabled:f,nextDisabled:d}=Bt();return Kn(l),n.createElement(n.Fragment,null,e?e():n.createElement(st,{label:"Previous",action:Q,icon:Sn,renderIcon:r,style:i.navigationPrev,disabled:f,onClick:s}),t?t():n.createElement(st,{label:"Next",action:J,icon:In,renderIcon:o,style:i.navigationNext,disabled:d,onClick:c}))}const Gn=ee(Jt,Yn),ct=P(rn),qn=P(mt);function Qn(e){return"style"in e}function lt(e,t,r){const o=window.getComputedStyle(e),i=r?"padding-left":"padding-right",s=r?o.paddingLeft:o.paddingRight,c=e.style.getPropertyValue(i);return e.style.setProperty(i,`${(be(s)||0)+t}px`),()=>{c?e.style.setProperty(i,c):e.style.removeProperty(i)}}function Jn({noScroll:{disabled:e},children:t}){const r=Be(),{getOwnerDocument:o,getOwnerWindow:i}=Tt();return n.useEffect(()=>{if(e)return()=>{};const s=[],c=i(),{body:l,documentElement:f}=o(),d=Math.round(c.innerWidth-f.clientWidth);if(d>0){s.push(lt(l,d,r));const h=l.getElementsByTagName("*");for(let g=0;g<h.length;g+=1){const b=h[g];Qn(b)&&c.getComputedStyle(b).getPropertyValue("position")==="fixed"&&!b.classList.contains(qn)&&s.push(lt(b,d,r))}}return l.classList.add(ct),()=>{l.classList.remove(ct),s.forEach(h=>h())}},[r,e,o,i]),n.createElement(n.Fragment,null,t)}const Zn=ee(Zt,Jn);function at(e){return le(Fe,e)}function ut(e,t,r){const o=e.getAttribute(t);return e.setAttribute(t,r),()=>{o?e.setAttribute(t,o):e.removeAttribute(t)}}function er({children:e,animation:t,styles:r,className:o,on:i,portal:s,close:c}){const[l,f]=n.useState(!1),[d,h]=n.useState(!1),g=n.useRef([]),b=n.useRef(null),{setTimeout:m}=we(),{subscribe:p}=_e(),v=Vt()?0:t.fade;n.useEffect(()=>(f(!0),()=>{f(!1),h(!1)}),[]);const N=M(()=>{g.current.forEach(_=>_()),g.current=[]}),C=M(()=>{var _;h(!1),N(),(_=i.exiting)===null||_===void 0||_.call(i),m(()=>{var w;(w=i.exited)===null||w===void 0||w.call(i),c()},v)});n.useEffect(()=>p(ne,C),[p,C]);const O=M(_=>{var w,S,A;_.scrollTop,h(!0),(w=i.entering)===null||w===void 0||w.call(i);const E=(A=(S=_.parentNode)===null||S===void 0?void 0:S.children)!==null&&A!==void 0?A:[];for(let x=0;x<E.length;x+=1){const L=E[x];["TEMPLATE","SCRIPT","STYLE"].indexOf(L.tagName)===-1&&L!==_&&(g.current.push(ut(L,"inert","true")),g.current.push(ut(L,"aria-hidden","true")))}g.current.push(()=>{var x,L;(L=(x=b.current)===null||x===void 0?void 0:x.focus)===null||L===void 0||L.call(x)}),m(()=>{var x;(x=i.entered)===null||x===void 0||x.call(i)},v)}),k=n.useCallback(_=>{_?O(_):N()},[O,N]);return l?qt.createPortal(n.createElement(kn,{ref:k,className:Y(o,P(at()),P(mt),d&&P(at("open"))),role:"presentation","aria-live":"polite",style:{...t.fade!==Ue.animation.fade?{[U("fade_animation_duration")]:`${v}ms`}:null,...t.easing.fade!==Ue.animation.easing.fade?{[U("fade_animation_timing_function")]:t.easing.fade}:null,...r.root},onFocus:_=>{b.current||(b.current=_.relatedTarget)}},e),s.root||document.body):null}const tr=ee(Fe,er);function nr({children:e}){return n.createElement(n.Fragment,null,e)}const rr=ee(en,nr);function or(e){return le(pt,e)}function ir({toolbar:{buttons:e},render:{buttonClose:t,iconClose:r},styles:o}){const{close:i,setToolbarWidth:s}=fe(),{setContainerRef:c,containerRect:l}=Ft();de(()=>{s(l==null?void 0:l.width)},[s,l==null?void 0:l.width]);const f=()=>t?t():n.createElement(Ut,{key:ne,label:"Close",icon:yn,renderIcon:r,onClick:i});return n.createElement("div",{ref:c,style:o.toolbar,className:P(or())},e==null?void 0:e.map(d=>d===ne?f():d))}const sr=ee(pt,ir);function Ht(e,t){var r;return n.createElement(e.module.component,{key:e.module.name,...t},(r=e.children)===null||r===void 0?void 0:r.map(o=>Ht(o,t)))}function cr(e,t={}){const{easing:r,...o}=e,{easing:i,...s}=t;return{easing:{...r,...i},...o,...s}}function lr({carousel:e,animation:t,render:r,toolbar:o,controller:i,noScroll:s,on:c,plugins:l,slides:f,index:d,...h}){const{animation:g,carousel:b,render:m,toolbar:p,controller:u,noScroll:v,on:N,slides:C,index:O,plugins:k,..._}=Ue,{config:w,augmentation:S}
1=En([T(tr,[T(Zn,[T(jn,[T(zn),T(sr),T(Gn)])])])],l||k),A=S({animation:cr(g,t),carousel:{...b,...e},render:{...m,...r},toolbar:{...p,...o},controller:{...u,...i},noScroll:{...v,...s},on:{...N,...c},..._,...h});return A.open?n.createElement(_n,{...A},n.createElement(Pn,{slides:f||C,index:be(d||O)},n.createElement(Nn,null,n.createElement(bn,null,Ht(T(rr,w),A))))):null}function hr({show:e,onClose:t,disableControls:r=!1,...o}){const i=r?{buttonNext:()=>null,buttonPrev:()=>null}:null;return V.jsx(lr,{open:e,styles:{container:{backgroundColor:"rgba(0, 0, 0, .8)"}},render:{slide:({slide:s})=>s.type==="picture"?V.jsx(ar,{image:s.image}):null,...i},carousel:{finite:r},close:t,...o})}function ar({image:e}){const[t,r]=n.useState(!0);return V.jsxs(V.Fragment,{children:[t&&V.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:V.jsx(Qt,{className:"text-white"})}),V.jsxs("figure",{className:"m-8 flex-col md:m-16",children:[V.jsxs("picture",{children:[V.jsx("source",{type:"image/webp",srcSet:Je(e.baseUrl,{ratio:"original",size:"xxl",format:"webp"})}),V.jsx("img",{className:"h-auto max-h-[90dvh] w-auto",src:Je(e.baseUrl,{format:"jpg",size:"xxl",ratio:"original"}),width:e.width||0,height:e.height||0,alt:e.altText||"",loading:"lazy",onLoad:()=>r(!1)})]}),V.jsxs("div",{className:"flex",children:[e.caption&&V.jsx("figcaption",{className:"py-2 text-theme-secondary opacity-75 md:text-xl",children:e.caption}),e.copyright&&V.jsx("span",{className:"ml-auto py-2 text-sm italic text-theme-secondary-300 md:text-base",children:e.copyright})]})]})]})}export{hr as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.