PageSourceSearch

https://megatrex4.netlify.app/assets/Gallery-D_PXfmPy.js

js megatrex4.netlify.app collected 2026-10-03 11:03:58 UTC 73,078 bytes, 2 lines download raw bytes

1import{r as n,a as Xn,j as u,R as yt,u as Yn,b as Kn,g as Pe,A as Gn,m as Ft}from"./index-B6d0Jzc1.js";const sn="carousel",tt="controller",qn="navigation",Qn="no-scroll",wt="portal",Jn="root",ln="toolbar",Wt="captions",er="counter",tr="download",ft="fullscreen",$t="slideshow",Zt="thumbnails",zt="zoom",Le="loading",ht="playing",We="error",$e="complete",nr="placeholder",Ze=e=>`active-slide-${e}`,rr=Ze(Le),or=Ze(ht),sr=Ze(We),lr=Ze($e),an="fullsize",Et="flex_center",ar="no_scroll",cn="no_scroll_padding",Ct="slide",un="slide_wrapper",ir="slide_wrapper_interactive",Ee="prev",Ce="next",Ut="swipe",Oe="close",dn="onPointerDown",fn="onPointerMove",hn="onPointerUp",mn="onPointerLeave",pn="onPointerCancel",kt="onKeyDown",cr="onKeyUp",Nt="onWheel",ur="Escape",dr="ArrowLeft",fr="ArrowRight",hr="button",mt="icon",gn="contain",Vt="cover",xn="Unknown action type",vn="yarl__";function oe(...e){return e.filter(Boolean).join(" ")}function W(e){return`${vn}${e}`}function te(e){return`--${vn}${e}`}function ze(e,t){return`${e}${t?`_${t}`:""}`}function St(e){return t=>ze(e,t)}function ke(e,t){var r;return(r=e?.[t])!==null&&r!==void 0?r:t}function mr(e,t,r){return ke(e,"{index} of {total}").replace(/\{index}/g,`${Mt(r,t.length)+1}`).replace(/\{total}/g,`${t.length}`)}function Ue(...e){return()=>{e.forEach(t=>{t()})}}function se(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 _t(){return typeof window<"u"}function Pt(e,t=0){const r=10**t;return Math.round((e+Number.EPSILON)*r)/r}function ye(e){return e.type===void 0||e.type==="image"}function It(e,t){return e.imageFit===Vt||e.imageFit!==gn&&t===Vt}function nt(e){return typeof e=="string"?Number.parseInt(e,10):e}function Je(e){if(typeof e=="number")return{pixel:e};if(typeof e=="string"){const t=nt(e);return e.endsWith("%")?{percent:t}:{pixel:t}}return{pixel:0}}function pr(e,t){const r=Je(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 gr(){return(_t()?window?.devicePixelRatio:void 0)||1}function Mt(e,t){return t>0?(e%t+t)%t:0}function bn(e){return e.length>0}function yn(e,t){return e[Mt(t,e.length)]}function pt(e,t){return bn(e)?yn(e,t):void 0}function xr(e){return ye(e)?e.src:void 0}function Ve(e,t,r){if(!r)return e;const{buttons:o,...s}=e,l=o.findIndex(i=>i===t),a=n.isValidElement(r)?n.cloneElement(r,{key:t},null):r;if(l>=0){const i=[...o];return i.splice(l,1,a),{buttons:i,...s}}return{buttons:[a,...o],...s}}function vr(e,t,r=0){return Math.min(e.preload,Math.max(e.finite?t.length-1:Math.floor(t.length/2),r))}const br=Number(n.version.split(".")[0])>=19;function yr(e){return{inert:br?e:e?"":void 0}}function wr(e){e.scrollTop}const gt={open:!1,close:()=>{},index:0,slides:[],render:{},plugins:[],toolbar:{buttons:[Oe]},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:gn,imageProps:{}},controller:{ref:null,focus:!0,aria:!1,touchAction:"none",closeOnPullUp:!1,closeOnPullDown:!1,closeOnBackdropClick:!1,closeOnEscape:!0,preventDefaultWheelX:!0,preventDefaultWheelY:!1,disableSwipeNavigation:!1},portal:{},noScroll:{disabled:!1},on:{},styles:{},className:""};function ue(e,t){return{name:e,component:t}}function ee(e,t){return{module:e,children:t}}function wn(e,t,r){return e.module.name===t?r(e):e.children?[ee(e.module,e.children.flatMap(o=>{var s;return(s=wn(o,t,r))!==null&&s!==void 0?s:[]}))]:[e]}function Ie(e,t,r){return e.flatMap(o=>{var s;return(s=wn(o,t,r))!==null&&s!==void 0?s:[]})}function Er(e,t=[],r=[]){let o=e;const s=v=>{const d=[...o];for(;d.length>0;){const m=d.pop();if(m?.module.name===v)return!0;m?.children&&d.push(...m.children)}return!1},l=(v,d)=>{if(v===""){o=[ee(d,o)];return}o=Ie(o,v,m=>[ee(d,[m])])},a=(v,d)=>{o=Ie(o,v,m=>[ee(m.module,[ee(d,m.children)])])},i=(v,d,m)=>{o=Ie(o,v,E=>{var I;return[ee(E.module,[...m?[ee(d)]:[],...(I=E.children)!==null&&I!==void 0?I:[],...m?[]:[ee(d)]])]})},c=(v,d,m)=>{o=Ie(o,v,E=>[...m?[ee(d)]:[],E,...m?[]:[ee(d)]])},h=v=>{a(tt,v)},p=(v,d)=>{o=Ie(o,v,m=>[ee(d,m.children)])},f=v=>{o=Ie(o,v,d=>d.children)},b=v=>{r.push(v)};return t.forEach(v=>{v({contains:s,addParent:l,append:a,addChild:i,addSibling:c,addM
1odule:h,replace:p,remove:f,augment:b})}),{config:o,augmentation:v=>r.reduce((d,m)=>m(d),v)}}const En=n.createContext(null),Lt=se("useA11yContext","A11yContext",En);function Cr({children:e}){const[t,r]=n.useState(!1),[o,s]=n.useState(!1),l=n.useMemo(()=>({focusWithin:t,trackFocusWithin:(i,c)=>{const h=p=>f=>{var b;f.currentTarget.contains(f.relatedTarget)||r(p),(b=p?i:c)===null||b===void 0||b(f)};return{onFocus:h(!0),onBlur:h(!1)}},autoPlaying:o,setAutoPlaying:s}),[t,o]);return n.createElement(En.Provider,{value:l},e)}const Cn=n.createContext(null),He=se("useDocument","DocumentContext",Cn);function kr({nodeRef:e,children:t}){const r=n.useMemo(()=>{const o=l=>{var a;return((a=l||e.current)===null||a===void 0?void 0:a.ownerDocument)||document};return{getOwnerDocument:o,getOwnerWindow:l=>{var a;return((a=o(l))===null||a===void 0?void 0:a.defaultView)||window}}},[e]);return n.createElement(Cn.Provider,{value:r},t)}const kn=n.createContext(null),Be=se("useEvents","EventsContext",kn);function Nr({children:e}){const[t]=n.useState({});n.useEffect(()=>()=>{Object.keys(t).forEach(o=>delete t[o])},[t]);const r=n.useMemo(()=>{const o=(a,i)=>{var c;(c=t[a])===null||c===void 0||c.splice(0,t[a].length,...t[a].filter(h=>h!==i))};return{publish:(...[a,i])=>{var c;(c=t[a])===null||c===void 0||c.forEach(h=>h(i))},subscribe:(a,i)=>(t[a]||(t[a]=[]),t[a].push(i),()=>o(a,i)),unsubscribe:o}},[t]);return n.createElement(kn.Provider,{value:r},e)}const Nn=n.createContext(null),q=se("useLightboxProps","LightboxPropsContext",Nn);function Sr({children:e,...t}){return n.createElement(Nn.Provider,{value:t},e)}const Sn=n.createContext(null),pe=se("useLightboxState","LightboxStateContext",Sn),_n=n.createContext(null),_r=se("useLightboxDispatch","LightboxDispatchContext",_n);function Pr(e,t){switch(t.type){case"swipe":{const{slides:r}=e,o=t?.increment||0,s=e.globalIndex+o,l=Mt(s,r.length),a=pt(r,l),i=o||t.duration!==void 0?{increment:o,duration:t.duration,easing:t.easing}:void 0;return{slides:r,currentIndex:l,globalIndex:s,currentSlide:a,animation:i}}case"update":return t.slides!==e.slides||t.index!==e.currentIndex?{slides:t.slides,currentIndex:t.index,globalIndex:t.index,currentSlide:pt(t.slides,t.index)}:e;default:throw new Error(xn)}}function Ir({slides:e,index:t,children:r}){const[o,s]=n.useReducer(Pr,{slides:e,currentIndex:t,globalIndex:t,currentSlide:pt(e,t)}),[l,a]=n.useState(e),[i,c]=n.useState(t);(e!==l||t!==i)&&(a(e),c(t),s({type:"update",slides:e,index:t}));const h=n.useMemo(()=>({...o,state:o,dispatch:s}),[o,s]);return n.createElement(_n.Provider,{value:s},n.createElement(Sn.Provider,{value:h},r))}const Pn=n.createContext(null),Mr=se("useRTLContext","RTLContext",Pn);function Lr({isRTL:e,children:t}){const r=n.useMemo(()=>({isRTL:e}),[e]);return n.createElement(Pn.Provider,{value:r},t)}const In=n.createContext(null),Xe=se("useTimeouts","TimeoutsContext",In);function Rr({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=a=>{t.splice(0,t.length,...t.filter(i=>i!==a))};return{setTimeout:(a,i)=>{const c=window.setTimeout(()=>{o(c),a()},i);return t.push(c),c},clearTimeout:a=>{a!==void 0&&(o(a),window.clearTimeout(a))}}},[t]);return n.createElement(In.Provider,{value:r},e)}const Ne=n.forwardRef(function({label:t,className:r,icon:o,renderIcon:s,onClick:l,style:a,...i},c){const{styles:h,labels:p}=q(),f=ke(p,t);return n.createElement("button",{ref:c,type:"button",title:f,"aria-label":f,className:oe(W(hr),r),onClick:l,style:{...a,...h.button},...i},s?s():n.createElement(o,{className:W(mt),style:h.icon}))});function Mn(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 le(e,t){return Mn(e,n.createElement("g",{fill:"currentColor"},n.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),t))}function Or(e,t){return Mn(e,n.createElement(n.Fragment,null,n.createElement("defs",null,n.createElement("mask",{id:"strike"},n.createElement("path",{d:"M0 0h24v24H0z",fill:"white"}),n.createElement("path",{d:"M0 0L24 24",stroke:"black",strokeWidth:4}))),n.createElement("path",{d:"M0.70707 2.121320L21.878680 23.292883",stroke:"currentColor",strokeWidth:2}),n.createElement("g",{fill:"currentColor",mask:"url(#strike)"},n.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),t)))}const Tr=le("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"})),jr=le("Previous",n.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),Dr=le("Next",n.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),Ar=le("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)`})))),Fr=le("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"})),me=_t()?n.useLayoutEffect:n.useEffect;function Rt(){const[e,t]=n.useState(!1);return n.useEffect(()=>{var r,o;const s=(r=window.matchMedia)===null||r===void 0?void 0:r.call(window,"(prefers-reduced-motion: reduce)");t(s?.matches);const l=a=>t(a.matches);return(o=s?.addEventListener)===null||o===void 0||o.call(s,"change",l),()=>{var a;return(a=s?.removeEventListener)===null||a===void 0?void 0:a.call(s,"change",l)}},[]),e}function Wr(e){let t=0,r=0,o=0;const l=window.getComputedStyle(e).transform.match(/matrix.*\((.+)\)/);if(l){const a=l[1].split(",").map(nt);a.length===6?(t=a[4],r=a[5]):a.length===16&&(t=a[12],r=a[13],o=a[14])}return{x:t,y:r,z:o}}function Ht(e,t){const r=n.useRef(void 0),o=n.useRef(void 0),s=Rt();return me(()=>{var l,a,i;if(e.current&&r.current!==void 0&&!s){const{keyframes:c,duration:h,easing:p,onfinish:f}=t(r.current,e.current.getBoundingClientRect(),Wr(e.current))||{};if(c&&h){(l=o.current)===null||l===void 0||l.cancel(),o.current=void 0;try{o.current=(i=(a=e.current).animate)===null||i===void 0?void 0:i.call(a,c,{duration:h,easing:p})}catch(b){console.error(b)}o.current&&(o.current.onfinish=()=>{o.current=void 0,f?.()})}}r.current=void 0}),{prepareAnimation:l=>{r.current=l},isAnimationPlaying:()=>{var l;return((l=o.current)===null||l===void 0?void 0:l.playState)==="running"}}}function Ln(){const e=n.useRef(null),t=n.useRef(void 0),[r,o]=n.useState();return{setContainerRef:n.useCallback(l=>{e.current=l,t.current&&(t.current.disconnect(),t.current=void 0);const a=()=>
1{if(l){const i=window.getComputedStyle(l),c=h=>parseFloat(h)||0;o({width:Math.round(l.clientWidth-c(i.paddingLeft)-c(i.paddingRight)),height:Math.round(l.clientHeight-c(i.paddingTop)-c(i.paddingBottom))})}else o(void 0)};a(),l&&typeof ResizeObserver<"u"&&(t.current=new ResizeObserver(a),t.current.observe(l))},[]),containerRef:e,containerRect:r}}function Qe(){const e=n.useRef(void 0),{setTimeout:t,clearTimeout:r}=Xe();return n.useCallback((o,s)=>{r(e.current),e.current=t(o,s>0?s:0)},[t,r])}function z(e){const t=n.useRef(e);return me(()=>{t.current=e}),n.useCallback((...r)=>{var o;return(o=t.current)===null||o===void 0?void 0:o.call(t,...r)},[])}function Bt(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function xt(e,t){return n.useMemo(()=>e==null&&t==null?null:r=>{Bt(e,r),Bt(t,r)},[e,t])}function Rn(e,t=!1){const r=n.useRef(!1);me(()=>{t&&r.current&&(r.current=!1,e())},[t,e]);const o=n.useCallback(()=>{r.current=!0},[]),s=n.useCallback(()=>{r.current=!1},[]);return{onFocus:o,onBlur:s}}function Ot(){return Mr().isRTL}function $r(){const[e]=n.useState({}),t=n.useCallback((s,l)=>{var a;(a=e[s])===null||a===void 0||a.forEach(i=>{l.isPropagationStopped()||i(l)})},[e]),r=n.useMemo(()=>({onPointerDown:s=>t(dn,s),onPointerMove:s=>t(fn,s),onPointerUp:s=>t(hn,s),onPointerLeave:s=>t(mn,s),onPointerCancel:s=>t(pn,s),onKeyDown:s=>t(kt,s),onKeyUp:s=>t(cr,s),onWheel:s=>t(Nt,s)}),[t]),o=n.useCallback((s,l)=>(e[s]||(e[s]=[]),e[s].unshift(l),()=>{const a=e[s];a&&a.splice(0,a.length,...a.filter(i=>i!==l))}),[e]);return{registerSensors:r,subscribeSensors:o}}function Xt(e,t){const r=n.useRef(0),o=Qe(),s=z((...l)=>{r.current=Date.now(),e(...l)});return n.useCallback((...l)=>{o(()=>{s(...l)},t-(Date.now()-r.current))},[t,s,o])}const it=St("slide"),ct=St("slide_image");function et({slide:e,offset:t,render:r,rect:o,imageFit:s,imageProps:l,onClick:a,onLoad:i,onError:c,style:h}){var p,f,b,v,d,m,E,I;const[k,g]=n.useState(Le),{publish:w}=Be(),{setTimeout:C}=Xe(),_=n.useRef(null);n.useEffect(()=>{t===0&&w(Ze(k))},[t,k,w]);const y=z(j=>{("decode"in j?j.decode():Promise.resolve()).catch(()=>{}).then(()=>{j.parentNode&&(g($e),C(()=>{i?.(j)},0))})}),T=n.useCallback(j=>{_.current=j,j?.complete&&y(j)},[y]),S=n.useCallback(j=>{y(j.currentTarget)},[y]),F=z(()=>{g(We),c?.()}),Z=It(e,s),U=(j,G)=>Number.isFinite(j)?j:G,M=U(Math.max(...((f=(p=e.srcSet)===null||p===void 0?void 0:p.map(j=>j.width))!==null&&f!==void 0?f:[]).concat(e.width?[e.width]:[]).filter(Boolean)),((b=_.current)===null||b===void 0?void 0:b.naturalWidth)||0),P=U(Math.max(...((d=(v=e.srcSet)===null||v===void 0?void 0:v.map(j=>j.height))!==null&&d!==void 0?d:[]).concat(e.height?[e.height]:[]).filter(Boolean)),((m=_.current)===null||m===void 0?void 0:m.naturalHeight)||0),A=M&&P?{maxWidth:`min(${M}px, 100%)`,maxHeight:`min(${P}px, 100%)`}:{maxWidth:"100%",maxHeight:"100%"},Y=(E=e.srcSet)===null||E===void 0?void 0:E.slice().sort((j,G)=>j.width-G.width).map(j=>`${j.src} ${j.width}w`).join(", "),X=()=>o&&!Z&&e.width&&e.height?o.height/e.height*e.width:Number.MAX_VALUE,L=Y&&o&&_t()?`${Math.round(Math.min(X(),o.width))}px`:void 0,{style:$,className:K,...B}=(typeof l=="function"?l(e):l)||{};return n.createElement(n.Fragment,null,n.createElement("img",{ref:T,onLoad:S,onError:F,onClick:a,draggable:!1,className:oe(W(ct()),Z&&W(ct("cover")),k!==$e&&W(ct("loading")),K),style:{...A,...h,...$},...B,alt:(I=e.alt)!==null&&I!==void 0?I:"",sizes:L,srcSet:Y,src:e.src}),k!==$e&&n.createElement("div",{className:W(it(nr))},k===Le&&(r?.iconLoading?r.iconLoading():n.createElement(Ar,{className:oe(W(mt),W(it(Le)))})),k===We&&(r?.iconError?r.iconError():n.createElement(Fr,{className:oe(W(mt),W(it(We)))}))))}const Zr=n.forwardRef(function({className:t,children:r,onFocus:o,onBlur:s,...l},a){const i=n.useRef(null),[c,h]=n.useState(!1),{trackFocusWithin:p}=Lt(),f=z(()=>{if(i.current){const b=window.getComputedStyle(i.current).direction==="rtl";b!==c&&h(b)}});return n.useEffect(f),n.createElement(kr,{nodeRef:i},n.createElement(Lr,{isRTL:c},n.createElement("div",{ref:xt(a,i),className:oe(W("root"),t),...p(o,s),...l},r)))});var ne;(function(e){e[e.NONE=0]="NONE",e[e.SWIPE=1]="SWIPE",e[e.PULL=2]="PULL",e[e.ANIMATION=3]="ANIMATION"})(ne||(ne={}));function On(e,t,r,o,s){n.useEffect(()=>s?()=>{}:Ue(e(dn,t),e(fn,r),e(hn,o),e(mn,o),e(pn,o)),[e,t,r,o,s])}var he;(function(e){e[e.NONE=0]="NONE",e[e.SWIPE=1]="SWIPE",e[e.PULL=2]="PULL"})(he||(he={}));const ut=30;function zr({disableSwipeNavigation:e,closeOnBackdropClick:t},r,o,s,l,a,i,c,h,p,f,b,v,d,m,E){const I=n.useRef(0),k=n.useRef([]),g=n.useRef(void 0),w=n.useRef(0),C=n.useRef(he.NONE),_=n.useCallback(M=>{g.current===M.pointerId&&(g.current=void 0,C.current=he.NONE);const P=k.current;P.splice(0,P.length,...P.filter(A=>A.pointerId!==M.pointerId))},[]),y=n.useCallback(M=>
1{_(M),M.persist(),k.current.push(M)},[_]),T=n.useCallback(M=>k.current.find(({pointerId:P})=>M.pointerId===P),[]),S=z(M=>{y(M)}),F=(M,P)=>f&&M>P||p&&M<-P,Z=z(M=>{const P=T(M);if(P)if(g.current===M.pointerId){const A=Date.now()-w.current,Y=I.current;C.current===he.SWIPE?Math.abs(Y)>.3*s||Math.abs(Y)>5&&A<l?c(Y,A):h(Y):C.current===he.PULL&&(F(Y,2*ut)?d(Y,A):m(Y)),I.current=0,C.current=he.NONE}else{const{target:A}=M;t&&A instanceof HTMLElement&&A===P.target&&(A.classList.contains(W(Ct))||A.classList.contains(W(un)))&&E()}_(M)}),U=z(M=>{const P=T(M);if(P){const A=g.current===M.pointerId;if(M.buttons===0){A&&I.current!==0?Z(M):_(P);return}const Y=M.clientX-P.clientX,X=M.clientY-P.clientY;if(g.current===void 0){const L=$=>{y(M),g.current=M.pointerId,w.current=Date.now(),C.current=$};Math.abs(Y)>Math.abs(X)&&Math.abs(Y)>ut&&o(Y)?e||(L(he.SWIPE),a()):Math.abs(X)>Math.abs(Y)&&F(X,ut)&&(L(he.PULL),b())}else A&&(C.current===he.SWIPE?(I.current=Y,i(Y)):C.current===he.PULL&&(I.current=X,v(X)))}});On(r,S,U,Z)}function Ur({preventDefaultWheelX:e,preventDefaultWheelY:t}){const r=n.useRef(null),o=z(s=>{const l=Math.abs(s.deltaX)>Math.abs(s.deltaY);(l&&e||!l&&t||s.ctrlKey)&&s.preventDefault()});return n.useCallback(s=>{var l;s?s.addEventListener("wheel",o,{passive:!1}):(l=r.current)===null||l===void 0||l.removeEventListener("wheel",o),r.current=s},[o])}function Vr(e,t,r,o,s,l,a,i,c){const h=n.useRef(0),p=n.useRef(0),f=n.useRef(void 0),b=n.useRef(void 0),v=n.useRef(0),d=n.useRef(void 0),m=n.useRef(0),{setTimeout:E,clearTimeout:I}=Xe(),k=n.useCallback(()=>{f.current&&(I(f.current),f.current=void 0)},[I]),g=n.useCallback(()=>{b.current&&(I(b.current),b.current=void 0)},[I]),w=z(()=>{e!==ne.SWIPE&&(h.current=0,m.current=0,k(),g())});n.useEffect(w,[e,w]);const C=z(y=>{b.current=void 0,h.current===y&&c(h.current)}),_=z(y=>{if(y.ctrlKey||Math.abs(y.deltaY)>Math.abs(y.deltaX))return;const T=S=>{v.current=S,I(d.current),d.current=S>0?E(()=>{v.current=0,d.current=void 0},300):void 0};if(e===ne.NONE){if(Math.abs(y.deltaX)<=1.2*Math.abs(v.current)){T(y.deltaX);return}if(!r(-y.deltaX))return;if(p.current+=y.deltaX,k(),Math.abs(p.current)>30)p.current=0,T(0),m.current=Date.now(),l();else{const S=p.current;f.current=E(()=>{f.current=void 0,S===p.current&&(p.current=0)},s)}}else if(e===ne.SWIPE){let S=h.current-y.deltaX;if(S=Math.min(Math.abs(S),o)*Math.sign(S),h.current=S,a(S),g(),Math.abs(S)>.2*o){T(y.deltaX),i(S,Date.now()-m.current);return}b.current=E(()=>C(S),2*s)}else T(y.deltaX)});n.useEffect(()=>t(Nt,_),[t,_])}const Yt=St("container"),Tn=n.createContext(null),de=se("useController","ControllerContext",Tn);function Hr({children:e,...t}){var r;const{carousel:o,animation:s,controller:l,on:a,styles:i,render:c}=t,{closeOnPullUp:h,closeOnPullDown:p,preventDefaultWheelX:f,preventDefaultWheelY:b}=l,[v,d]=n.useState(),m=pe(),E=_r(),[I,k]=n.useState(ne.NONE),g=n.useRef(0),w=n.useRef(0),C=n.useRef(1),{registerSensors:_,subscribeSensors:y}=$r(),{subscribe:T,publish:S}=Be(),F=Qe(),Z=Qe(),U=Qe(),{containerRef:M,setContainerRef:P,containerRect:A}=Ln(),Y=xt(Ur({preventDefaultWheelX:f,preventDefaultWheelY:b}),P),X=n.useRef(null),L=xt(X,void 0),{getOwnerDocument:$}=He(),K=Ot(),B=N=>(K?-1:1)*(typeof N=="number"?N:1),j=z(()=>{var N;return(N=M.current)===null||N===void 0?void 0:N.focus()}),G=z(()=>t),Q=z(()=>m),ae=n.useCallback(N=>S(Ee,N),[S]),ie=n.useCallback(N=>S(Ce,N),[S]),ve=n.useCallback(()=>S(Oe),[S]),Te=N=>!(o.finite&&(B(N)>0&&m.currentIndex===0||B(N)<0&&m.currentIndex===m.slides.length-1)),je=N=>{var H;g.current=N,(H=M.current)===null||H===void 0||H.style.setProperty(te("swipe_offset"),`${Math.round(N)}px`)},Se=N=>{var H,re;w.current=N,C.current=(()=>{const Ae=p&&N>0?N:h&&N<0?-N:0;return Math.min(Math.max(Pt(1-Ae/60*(1-.5),2),.5),1)})(),(H=M.current)===null||H===void 0||H.style.setProperty(te("pull_offset"),`${Math.round(N)}px`),(re=M.current)===null||re===void 0||re.style.setProperty(te("pull_opacity"),`${C.current}`)},{prepareAnimation:ot}=Ht(X,(N,H,re)=>{if(X.current&&A)return{keyframes:[{transform:`translate(0, ${N.rect.y-H.y+re.y}px)`,opacity:N.opacity},{transform:"translate(0, 0)",opacity:1}],duration:N.duration,easing:s.easing.fade}}),x=(N,H)=>{if(h||p){Se(N);let re=0;
1X.current&&(re=s.fade*(H?2:1),ot({rect:X.current.getBoundingClientRect(),opacity:C.current,duration:re})),U(()=>{Se(0),k(ne.NONE)},re),k(ne.ANIMATION),H||ve()}},{prepareAnimation:R,isAnimationPlaying:D}=Ht(X,(N,H,re)=>{var ge;if(X.current&&A&&(!((ge=m.animation)===null||ge===void 0)&&ge.duration)){const ce=Je(o.spacing),Ae=(ce.percent?ce.percent*A.width/100:ce.pixel)||0;return{keyframes:[{transform:`translate(${B(m.globalIndex-N.index)*(A.width+Ae)+N.rect.x-H.x+re.x}px, 0)`},{transform:"translate(0, 0)"}],duration:m.animation.duration,easing:m.animation.easing}}}),O=z(N=>{var H,re;const ge=N.offset||0,ce=ge?s.swipe:(H=s.navigation)!==null&&H!==void 0?H:s.swipe,Ae=!ge&&!D()?s.easing.navigation:s.easing.swipe;let{direction:Ye}=N;const Ke=(re=N.count)!==null&&re!==void 0?re:1;let st=ne.ANIMATION,xe=ce*Ke;if(!Ye){const Fe=A?.width,At=N.duration||0,at=Fe?ce/Fe*Math.abs(ge):ce;Ke!==0?(At<at?xe=xe/at*Math.max(At,at/5):Fe&&(xe=ce/Fe*(Fe-Math.abs(ge))),Ye=B(ge)>0?Ee:Ce):xe=ce/2}let lt=0;Ye===Ee?Te(B(1))?lt=-Ke:(st=ne.NONE,xe=ce):Ye===Ce&&(Te(B(-1))?lt=Ke:(st=ne.NONE,xe=ce)),xe=Math.round(xe),Z(()=>{je(0),k(ne.NONE)},xe),X.current&&R({rect:X.current.getBoundingClientRect(),index:m.globalIndex}),k(st),S(Ut,{type:"swipe",increment:lt,duration:xe,easing:Ae})});n.useEffect(()=>{var N,H;!((N=m.animation)===null||N===void 0)&&N.increment&&(!((H=m.animation)===null||H===void 0)&&H.duration)&&F(()=>E({type:"swipe",increment:0}),m.animation.duration)},[m.animation,E,F]);const V=[y,Te,A?.width||0,s.swipe,()=>k(ne.SWIPE),N=>je(N),(N,H)=>O({offset:N,duration:H,count:1}),N=>O({offset:N,count:0})],J=[()=>{p&&k(ne.PULL)},N=>Se(N),N=>x(N),N=>x(N,!0)];zr(l,...V,h,p,...J,ve),Vr(I,...V);const fe=z(()=>{l.focus&&$().querySelector(`.${W(wt)} .${W(Yt())}`)&&j()});n.useEffect(fe,[fe]);const _e=z(()=>{var N;(N=a.view)===null||N===void 0||N.call(a,{index:m.currentIndex})});n.useEffect(_e,[m.globalIndex,_e]),n.useEffect(()=>Ue(T(Ee,N=>O({direction:Ee,...N})),T(Ce,N=>O({direction:Ce,...N})),T(Ut,N=>E(N))),[T,O,E]);const De=n.useMemo(()=>({prev:ae,next:ie,close:ve,focus:j,slideRect:A?pr(A,o.padding):{width:0,height:0},containerRect:A||{width:0,height:0},subscribeSensors:y,containerRef:M,setCarouselRef:L,toolbarWidth:v,setToolbarWidth:d}),[ae,ie,ve,j,y,A,M,L,v,d,o.padding]);return n.useImperativeHandle(l.ref,()=>({prev:ae,next:ie,close:ve,focus:j,getLightboxProps:G,getLightboxState:Q}),[ae,ie,ve,j,G,Q]),n.createElement("div",{ref:Y,className:oe(W(Yt()),W(Et)),style:{...I===ne.SWIPE?{[te("swipe_offset")]:`${Math.round(g.current)}px`}:null,...I===ne.PULL?{[te("pull_offset")]:`${Math.round(w.current)}px`,[te("pull_opacity")]:`${C.current}`}:null,...l.touchAction!=="none"?{[te("controller_touch_action")]:l.touchAction}:null,...i.container},tabIndex:-1,..._},A&&n.createElement(Tn.Provider,{value:De},e,(r=c.controls)===null||r===void 0?void 0:r.call(c)))}const Br=ue(tt,Hr);function we(e){return ze(sn,e)}function Kt(e){return ze(Ct,e)}function Xr({slide:e,offset:t}){const r=n.useRef(null),{currentIndex:o,slides:s}=pe(),{slideRect:l,focus:a}=de(),{render:i,carousel:{imageFit:c,imageProps:h},on:{click:p},styles:{slide:f},labels:b}=q(),{getOwnerDocument:v}=He(),d=t!==0;n.useEffect(()=>{var E;d&&(!((E=r.current)===null||E===void 0)&&E.contains(v().activeElement))&&a()},[d,a,v]);const m=()=>{var E,I,k,g;let w=(E=i.slide)===null||E===void 0?void 0:E.call(i,{slide:e,offset:t,rect:l});return!w&&ye(e)&&(w=n.createElement(et,{slide:e,offset:t,render:i,rect:l,imageFit:c,imageProps:h,onClick:d?void 0:()=>p?.({index:o})})),w?n.createElement(n.Fragment,null,(I=i.slideHeader)===null||I===void 0?void 0:I.call(i,{slide:e}),((k=i.slideContainer)!==null&&k!==void 0?k:({children:C})=>C)({slide:e,children:w}),(g=i.slideFooter)===null||g===void 0?void 0:g.call(i,{slide:e})):null};return n.createElement("div",{ref:r,className:oe(W(Kt()),!d&&W(Kt("current")),W(Et)),...yr(d),style:f,role:"group","aria-roledescription":ke(b,"Slide"),"aria-label":mr(b,s,o+t)},m())}function Yr(){const e=q().styles.slide;return n.createElement("div",{className:W(Ct),style:e})}function Kr({carousel:e,labels:t}){const{slides:r,currentIndex:o,globalIndex:s}=pe(),{setCarouselRef:l}=de(),{autoPlaying:a,focusWithin:i}=Lt(),c=Je(e.spacing),h=Je(e.padding),p=vr(e,r,1),f=[];if(bn(r))for(let b=o-p;b<=o+p;b+=1){const v=yn(r,b),d=s-o+b,m=e.finite&&(b<0||b>r.length-1);f.push(m?{key:d}:{key:[`${d}
1`,xr(v)].filter(Boolean).join("|"),offset:b-o,slide:v})}return n.createElement("div",{ref:l,className:oe(W(we()),f.length>0&&W(we("with_slides"))),style:{[`${te(we("slides_count"))}`]:f.length,[`${te(we("spacing_px"))}`]:c.pixel||0,[`${te(we("spacing_percent"))}`]:c.percent||0,[`${te(we("padding_px"))}`]:h.pixel||0,[`${te(we("padding_percent"))}`]:h.percent||0},role:"region","aria-live":a&&!i?"off":"polite","aria-roledescription":ke(t,"Carousel"),"aria-label":ke(t,"Photo gallery")},f.map(({key:b,slide:v,offset:d})=>v?n.createElement(Xr,{key:b,slide:v,offset:d}):n.createElement(Yr,{key:b})))}const Gr=ue(sn,Kr);function jn(){const{carousel:e}=q(),{slides:t,currentIndex:r}=pe(),o=t.length===0||e.finite&&r===0,s=t.length===0||e.finite&&r===t.length-1;return{prevDisabled:o,nextDisabled:s}}function qr(e){var t;const r=Ot(),{publish:o}=Be(),{animation:s,controller:l}=q(),{prevDisabled:a,nextDisabled:i}=jn(),c=((t=s.navigation)!==null&&t!==void 0?t:s.swipe)/2,h=Xt(()=>o(Ee),c),p=Xt(()=>o(Ce),c),f=z(b=>{switch(b.key){case ur:if(!l.closeOnEscape)return;o(Oe);break;case dr:(r?i:a)||(r?p:h)();break;case fr:(r?a:i)||(r?h:p)();break;default:return}b.stopPropagation()});n.useEffect(()=>e(kt,f),[e,f])}function Gt({label:e,icon:t,renderIcon:r,action:o,onClick:s,disabled:l,style:a}){return n.createElement(Ne,{label:e,icon:t,renderIcon:r,className:W(`navigation_${o}`),disabled:l,onClick:s,style:a,...Rn(de().focus,l)})}function Qr({render:{buttonPrev:e,buttonNext:t,iconPrev:r,iconNext:o},styles:s}){const{prev:l,next:a,subscribeSensors:i}=de(),{prevDisabled:c,nextDisabled:h}=jn();return qr(i),n.createElement(n.Fragment,null,e?e():n.createElement(Gt,{label:"Previous",action:Ee,icon:jr,renderIcon:r,style:s.navigationPrev,disabled:c,onClick:l}),t?t():n.createElement(Gt,{label:"Next",action:Ce,icon:Dr,renderIcon:o,style:s.navigationNext,disabled:h,onClick:a}))}const Jr=ue(qn,Qr),qt=W(ar),eo=W(cn);function to(e){return"style"in e}function Qt(e,t,r){const o=window.getComputedStyle(e),s=r?"padding-left":"padding-right",l=r?o.paddingLeft:o.paddingRight,a=e.style.getPropertyValue(s);return e.style.setProperty(s,`${(nt(l)||0)+t}px`),()=>{a?e.style.setProperty(s,a):e.style.removeProperty(s)}}function no({noScroll:{disabled:e},children:t}){const r=Ot(),{getOwnerDocument:o,getOwnerWindow:s}=He();return n.useEffect(()=>{if(e)return()=>{};const l=[],a=s(),{body:i,documentElement:c}=o(),h=Math.round(a.innerWidth-c.clientWidth);if(h>0){l.push(Qt(i,h,r));const p=i.getElementsByTagName("*");for(let f=0;f<p.length;f+=1){const b=p[f];to(b)&&a.getComputedStyle(b).getPropertyValue("position")==="fixed"&&!b.classList.contains(eo)&&l.push(Qt(b,h,r))}}return i.classList.add(qt),()=>{i.classList.remove(qt),l.forEach(p=>p())}},[r,e,o,s]),n.createElement(n.Fragment,null,t)}const ro=ue(Qn,no);function Jt(e){return ze(wt,e)}function en(e,t,r){const o=e.getAttribute(t);return e.setAttribute(t,r),()=>{o?e.setAttribute(t,o):e.removeAttribute(t)}}function oo({portal:{root:e,container:{className:t,style:r,...o}={}},animation:s,styles:l,className:a,on:i,close:c,labels:h,children:p}){const[f,b]=n.useState(!1),[v,d]=n.useState(!1),m=n.useRef([]),E=n.useRef(null),{setTimeout:I}=Xe(),{subscribe:k}=Be(),w=Rt()?0:s.fade;n.useEffect(()=>(b(!0),()=>{b(!1),d(!1)}),[]);const C=z(()=>{m.current.forEach(S=>S()),m.current=[]}),_=z(()=>{var S;d(!1),C(),(S=i.exiting)===null||S===void 0||S.call(i),I(()=>{var F;(F=i.exited)===null||F===void 0||F.call(i),c()},w)});n.useEffect(()=>k(Oe,_),[k,_]);const y=z(S=>{var F,Z,U;wr(S),d(!0),(F=i.entering)===null||F===void 0||F.call(i);const M=(U=(Z=S.parentNode)===null||Z===void 0?void 0:Z.children)!==null&&U!==void 0?U:[];for(let P=0;P<M.length;P+=1){const A=M[P];["TEMPLATE","SCRIPT","STYLE"].indexOf(A.tagName)===-1&&A!==S&&(m.current.push(en(A,"inert","")),m.current.push(en(A,"aria-hidden","true")))}m.current.push(()=>{var P,A;(A=(P=E.current)===null||P===void 0?void 0:P.focus)===null||A===void 0||A.call(P)}),I(()=>{var P;(P=i.entered)===null||P===void 0||P.call(i)},w)}),T=n.useCallback(S=>{S?y(S):C()},[y,C]);return f?Xn.createPortal(n.createElement(Zr,{ref:T,className:oe(a,t,W(Jt()),W(cn),v&&W(Jt("open"))),"aria-modal":!0,role:"dialog","aria-label":ke(h,"Lightbox"),style:{...s.fade!==gt.animation.fade?{[te("fade_animation_duration")]:`${w}ms`}:null,...s.easing.fade!==gt.animation.easing.fade?{[te("fade_animation_timing_function")]:s.easing.fade}:null,...l.root,...r},onFocus:S=>
1{E.current||(E.current=S.relatedTarget)},...o},p),(typeof e=="function"?e():e)||document.body):null}const so=ue(wt,oo);function lo({children:e}){return n.createElement(n.Fragment,null,e)}const ao=ue(Jn,lo);function io(e){return ze(ln,e)}function co({toolbar:{buttons:e},render:{buttonClose:t,iconClose:r},styles:o}){const{close:s,setToolbarWidth:l}=de(),{setContainerRef:a,containerRect:i}=Ln();me(()=>{l(i?.width)},[l,i?.width]);const c=()=>t?t():n.createElement(Ne,{key:Oe,label:"Close",icon:Tr,renderIcon:r,onClick:s});return n.createElement("div",{ref:a,style:o.toolbar,className:W(io())},e?.map(h=>h===Oe?c():h))}const uo=ue(ln,co);function Dn(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=>Dn(o,t)))}function fo(e,t={}){const{easing:r,...o}=e,{easing:s,...l}=t;return{easing:{...r,...s},...o,...l}}function ho({carousel:e,animation:t,render:r,toolbar:o,controller:s,noScroll:l,on:a,plugins:i,slides:c,index:h,...p}){const{animation:f,carousel:b,render:v,toolbar:d,controller:m,noScroll:E,on:I,slides:k,index:g,plugins:w,...C}=gt,{config:_,augmentation:y}=Er([ee(so,[ee(ro,[ee(Br,[ee(Gr),ee(uo),ee(Jr)])])])],i||w),T=y({animation:fo(f,t),carousel:{...b,...e},render:{...v,...r},toolbar:{...d,...o},controller:{...m,...s},noScroll:{...E,...l},on:{...I,...a},...C,...p});return T.open?n.createElement(Sr,{...T},n.createElement(Ir,{slides:c||k,index:nt(h||g)},n.createElement(Rr,null,n.createElement(Nr,null,n.createElement(Cr,null,Dn(ee(ao,_),T)))))):null}const An={minZoom:1,maxZoomPixelRatio:1,zoomInMultiplier:2,doubleTapDelay:300,doubleClickDelay:500,doubleClickMaxStops:2,keyboardMoveDistance:50,wheelZoomDistanceFactor:100,pinchZoomDistanceFactor:100,pinchZoomV4:!1,scrollToZoom:!1,maxZoom:8};function mo(e){return Math.min(Math.max(e,Number.EPSILON),1)}function Fn(e){const{minZoom:t,...r}={...An,...e};return{minZoom:mo(t),...r}}function po(e,t,r,o){const s=n.useRef(void 0),l=n.useRef(void 0),{zoom:a}=q().animation,i=Rt(),c=z(()=>{var h,p,f;if((h=s.current)===null||h===void 0||h.cancel(),s.current=void 0,l.current&&o?.current){try{s.current=(f=(p=o.current).animate)===null||f===void 0?void 0:f.call(p,[{transform:l.current},{transform:`scale(${e}) translateX(${t}px) translateY(${r}px)`}],{duration:i?0:a??500,easing:s.current?"ease-out":"ease-in-out"})}catch(b){console.error(b)}l.current=void 0,s.current&&(s.current.onfinish=()=>{s.current=void 0})}});return me(c,[e,t,r,c]),n.useCallback(()=>{l.current=o?.current?window.getComputedStyle(o.current).transform:void 0},[o])}function go(e,t){const{on:r}=q(),o=z(()=>{var s;t||(s=r.zoom)===null||s===void 0||s.call(r,{zoom:e})});n.useEffect(o,[e,o])}function rt(){const{zoom:e}=q();return Fn(e)}function xo(e,t){var r;const o=typeof e=="function"?(r=e(t))!==null&&r!==void 0?r:An.maxZoom:e;return Math.max(o,1)}function vo(e,t){var r,o;let s={width:0,height:0},l={width:0,height:0};const{currentSlide:a}=pe(),{imageFit:i}=q().carousel,{maxZoomPixelRatio:c,maxZoom:h}=rt();if(e&&a){const f={...a,...t};if(ye(f)){const b=It(f,i),v=Math.max(...(((r=f.srcSet)===null||r===void 0?void 0:r.map(m=>m.width))||[]).concat(f.width?[f.width]:[])),d=Math.max(...(((o=f.srcSet)===null||o===void 0?void 0:o.map(m=>m.height))||[]).concat(f.height?[f.height]:[]));v>0&&d>0&&e.width>0&&e.height>0&&(l=b?{width:Math.round(Math.min(v,e.width/e.height*d)),height:Math.round(Math.min(d,e.height/e.width*v))}:{width:v,height:d},l={width:l.width*c,height:l.height*c},s=b?{width:Math.min(e.width,l.width,v),height:Math.min(e.height,l.height,d)}:{width:Math.round(Math.min(e.width,e.height/d*v,v)),height:Math.round(Math.min(e.height,e.width/v*d,d))})}else e.width>0&&e.height>0&&(t&&t.width>0&&t.height>0?s={width:Math.min(e.width,t.width),height:Math.min(e.height,t.height)}:s={width:e.width,height:e.height})}const p=a&&s.width?ye(a)?Math.max(Pt(l.width/s.width,5),1):xo(h,a):1;return{imageRect:s,maxZoom:p}}function tn(e,t){return Math.hypot(e.clientX-t.clientX,e.clientY-t.clientY)}function nn(e,t,r=100,o=2){return e*Math.min(1+Math.abs(t/r),o)**Math.sign(t)}function bo(e,t,r,o,s,l,a,i,c){const h=n.useRef([]),p=n.useRef(0),f=n.useRef(void 0),{globalIndex:b}=pe(),{getOwnerWindow:v}=He(),{containerRef:d,subscribeSensors:m}=de(),{keyboardMoveDistance:E,zoomInMultiplier:I,wheelZoomDistanceFactor:k,scrollToZoom:g,doubleTapDelay:w,doubleClickDelay:C,doubleClickMaxStops:_,pinchZoomDistanceFactor:y,pinchZoomV4:T}=rt(),S=n.useCallback(L=>{if(d.current){const{pageX:$,pageY:K}
1=L,{scrollX:B,scrollY:j}=v(),{left:G,top:Q,width:ae,height:ie}=d.current.getBoundingClientRect();return[$-G-B-ae/2,K-Q-j-ie/2]}return[]},[d,v]),F=z(L=>{const{key:$,metaKey:K,ctrlKey:B}=L,j=K||B,G=()=>{L.preventDefault(),L.stopPropagation()};if(e>1){const Q=(ae,ie)=>{G(),i(ae,ie)};$==="ArrowDown"?Q(0,E):$==="ArrowUp"?Q(0,-E):$==="ArrowLeft"?Q(-E,0):$==="ArrowRight"&&Q(E,0)}$==="+"||j&&$==="="?(G(),s()):$==="-"||j&&$==="_"?(G(),l()):j&&$==="0"&&(G(),a(1))}),Z=z(L=>{if((L.ctrlKey||g)&&Math.abs(L.deltaY)>Math.abs(L.deltaX)){L.stopPropagation(),a(nn(e,-L.deltaY,k),!0,...S(L));return}e>1&&(L.stopPropagation(),g||i(L.deltaX,L.deltaY))}),U=n.useCallback(L=>{const $=h.current;$.splice(0,$.length,...$.filter(K=>K.pointerId!==L.pointerId))},[]),M=n.useCallback(L=>{U(L),L.persist(),h.current.push(L)},[U]),P=z(L=>{var $;const K=h.current;if(L.pointerType==="mouse"&&L.buttons>1||!(!(($=c?.current)===null||$===void 0)&&$.contains(L.target)))return;e>1&&L.stopPropagation();const{timeStamp:B}=L;if(K.length===0&&B-p.current<(L.pointerType==="touch"?w:C)){p.current=0;const j=e>=1?e!==r?e*Math.max(r**(1/_),I):1:e!==t?e/Math.max(t**(-1/_),I):1;a(j,!1,...S(L))}else p.current=B;if(M(L),K.length===2){const j=tn(K[0],K[1]);f.current={previousDistance:j,initialDistance:Math.max(j,1),initialZoom:e}}}),A=z(L=>{const $=h.current,K=$.find(B=>B.pointerId===L.pointerId);if($.length===2&&f.current){L.stopPropagation(),M(L);const B=tn($[0],$[1]),j=T?f.current.initialZoom/f.current.initialDistance*B:nn(e,B-f.current.previousDistance,y);a(j,!0,...$.map(G=>S(G)).reduce((G,Q)=>Q.map((ae,ie)=>G[ie]+ae/2))),f.current.previousDistance=B;return}e>1&&(L.stopPropagation(),K&&($.length===1&&i((K.clientX-L.clientX)/e,(K.clientY-L.clientY)/e),M(L)))}),Y=n.useCallback(L=>{const $=h.current;$.length===2&&$.find(K=>K.pointerId===L.pointerId)&&(f.current=void 0),U(L)},[U]),X=n.useCallback(()=>{const L=h.current;L.splice(0,L.length),p.current=0,f.current=void 0},[]);On(m,P,A,Y,o),n.useEffect(X,[b,X]),n.useEffect(()=>o?()=>{}:Ue(X,m(kt,F),m(Nt,Z)),[o,m,X,F,Z])}function yo(e,t,r){const[o,s]=n.useState(1),[l,a]=n.useState(0),[i,c]=n.useState(0),h=po(o,l,i,r),{currentSlide:p,globalIndex:f}=pe(),{containerRect:b,slideRect:v}=de(),{minZoom:d,zoomInMultiplier:m}=rt(),E=p&&ye(p)?p.src:void 0,I=!r?.current;me(()=>{s(1),a(0),c(0)},[f,E]);const k=n.useCallback((y,T,S)=>{const F=S||o,Z=l-(y||0),U=i-(T||0),M=(e.width*F-v.width)/2/F,P=(e.height*F-v.height)/2/F;a(Math.min(Math.abs(Z),Math.max(M,0))*Math.sign(Z)),c(Math.min(Math.abs(U),Math.max(P,0))*Math.sign(U))},[o,l,i,v,e.width,e.height]),g=n.useCallback((y,T,S,F)=>{const Z=Pt(y+.01<t?y-.01>d?y:d:t,5);T||h(),k(S?S*(1/o-1/Z):0,F?F*(1/o-1/Z):0,Z),s(Z)},[o,d,t,k,h]),w=z(()=>{o>1&&(o>t&&g(t,!0),k())});me(w,[b.width,b.height,w]);const C=n.useCallback(()=>{const y=o*m;g(o<1&&y>1?1:y)},[o,m,g]),_=n.useCallback(()=>{const y=o/m;g(o>1&&y<1?1:y)},[o,m,g]);return{zoom:o,offsetX:l,offsetY:i,disabled:I,changeOffsets:k,changeZoom:g,zoomIn:C,zoomOut:_}}const Wn=n.createContext(null),Tt=se("useZoom","ZoomControllerContext",Wn);function wo({children:e}){const[t,r]=n.useState(),{slideRect:o}=de(),{ref:s,minZoom:l}=rt(),{imageRect:a,maxZoom:i}=vo(o,t?.imageDimensions),{zoom:c,offsetX:h,offsetY:p,disabled:f,changeZoom:b,changeOffsets:v,zoomIn:d,zoomOut:m}=yo(a,i,t?.zoomWrapperRef);go(c,f),bo(c,l,i,f,d,m,b,v,t?.zoomWrapperRef);const E=n.useMemo(()=>({zoom:c,minZoom:l,maxZoom:i,offsetX:h,offsetY:p,disabled:f,zoomIn:d,zoomOut:m,changeZoom:b}),[c,l,i,h,p,f,d,m,b]);n.useImperativeHandle(s,()=>E,[E]);const I=n.useMemo(()=>({...E,setZoomWrapper:r}),[E,r]);return n.createElement(Wn.Provider,{value:I},e)}const Eo=le("ZoomIn",n.createElement(n.Fragment,null,n.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),n.createElement("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"}))),Co=le("ZoomOut",n.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"})),rn=n.forwardRef(function({zoomIn:t,onLoseFocus:r},o){const s=n.useRef(!1),l=n.useRef(!1),{zoom:a,minZoom:i,maxZoom:c,zoomIn:h,zoomOut:p,disabled:f}=Tt(),{render:b}=q(),v=f||(t?a>=c:a<=i);return n.useEffect(()=>{v&&s.current&&l.current&&r(),v||(s.current=!0)},[v,r]),n.createElement(Ne,{ref:o,disabled:v,label:t?"Zoom in":"Zoom out",icon:t?Eo:Co,renderIcon:t?b.iconZoomIn:b.iconZoomOut,onClick:t?h:p,onFocus:()=>{l.current=!0},onBlur:()=>{l.current=!1}})});function ko(){const e=n.useRef(null),t=n.useRef(null),{focus:r}=de(),o=n.useCallback(a=>{var i,c;!((i=a.current)===null||i===void 0)&&i.disabled?r():(c=a.current)===null||c===void 0||c.focus()},[r]),s=n.useCallback(()=>o(e),[o]),l=n.useCallback(()=>o(t),[o]);return n.createElement(n.Fragment,null,n.createElement(rn,{zoomIn:!0,ref:e,onLoseFocus:l}),n.createElement(rn,{ref:t,onLoseFocus:s}))}function No(){const{render:e}=q(),t=Tt();
1return e.buttonZoom?n.createElement(n.Fragment,null,e.buttonZoom(t)):n.createElement(ko,null)}function So(e){var t;return(((t=e.srcSet)===null||t===void 0?void 0:t.length)||0)>0}function _o({current:e,preload:t},{type:r,source:o}){switch(r){case"fetch":return e?{current:e,preload:o}:{current:o};case"done":return o===t?{current:o}:{current:e,preload:t};default:throw new Error(xn)}}function Po(e){var t,r;const[{current:o,preload:s},l]=n.useReducer(_o,{}),{slide:a,rect:i,imageFit:c,render:h,interactive:p}=e,f=a.srcSet.sort((C,_)=>C.width-_.width),b=(t=a.width)!==null&&t!==void 0?t:f[f.length-1].width,v=(r=a.height)!==null&&r!==void 0?r:f[f.length-1].height,d=It(a,c),m=Math.max(...f.map(C=>C.width)),E=Math.min((d?Math.max:Math.min)(i.width,b*(i.height/v)),m),I=gr(),k=z(()=>{var C;const _=(C=f.find(y=>y.width>=E*I))!==null&&C!==void 0?C:f[f.length-1];(!o||f.findIndex(y=>y.src===o)<f.findIndex(y=>y===_))&&l({type:"fetch",source:_.src})});me(k,[i.width,i.height,I,k]);const g=z(C=>l({type:"done",source:C})),w={WebkitTransform:p?"initial":"translateZ(0)"};return d||Object.assign(w,i.width/i.height<b/v?{width:"100%",height:"auto"}:{width:"auto",height:"100%"}),n.createElement(n.Fragment,null,s&&s!==o&&n.createElement(et,{key:"preload",...e,offset:void 0,slide:{...a,src:s,srcSet:void 0},style:{position:"absolute",visibility:"hidden",...w},onLoad:()=>g(s),render:{...h,iconLoading:()=>null,iconError:()=>null}}),o&&n.createElement(et,{key:"current",...e,slide:{...a,src:o,srcSet:void 0},style:w}))}function Io({render:e,slide:t,offset:r,rect:o}){var s;const[l,a]=n.useState(),i=n.useRef(null),c=ye(t),{zoom:h,maxZoom:p,offsetX:f,offsetY:b,setZoomWrapper:v}=Tt(),d=h>1,{carousel:m,on:E}=q(),{currentIndex:I}=pe();me(()=>{if(r!==0||c||!i.current)return()=>{};const g=()=>{const C=i.current;if(!C)return;let _=0,y=0;for(const T of C.children)T instanceof HTMLElement&&(_=Math.max(_,T.offsetWidth),y=Math.max(y,T.offsetHeight));a(T=>T&&T.width===_&&T.height===y?T:{width:_,height:y})};if(g(),typeof ResizeObserver>"u")return()=>{};const w=new ResizeObserver(g);for(const C of i.current.children)w.observe(C);return()=>w.disconnect()},[r,c,o]),me(()=>r===0?(v({zoomWrapperRef:i,imageDimensions:l}),()=>v(void 0)):()=>{},[r,l,v]);let k=(s=e.slide)===null||s===void 0?void 0:s.call(e,{slide:t,offset:r,rect:o,zoom:h,maxZoom:p});if(!k&&c){const g={slide:t,offset:r,rect:o,render:e,imageFit:m.imageFit,imageProps:m.imageProps,onClick:r===0?()=>{var w;return(w=E.click)===null||w===void 0?void 0:w.call(E,{index:I})}:void 0};k=So(t)?n.createElement(Po,{...g,slide:t,interactive:d,rect:r===0?{width:o.width*h,height:o.height*h}:o}):n.createElement(et,{onLoad:w=>a({width:w.naturalWidth,height:w.naturalHeight}),...g})}return k?n.createElement("div",{ref:i,className:oe(W(an),W(Et),W(un),d&&W(ir)),style:r===0?{transform:`scale(${h}) translateX(${f}px) translateY(${b}px)`}:void 0},k):null}const Mo=({augment:e,addModule:t})=>{e(({zoom:r,toolbar:o,render:s,controller:l,...a})=>{const i=Fn(r);return{zoom:i,toolbar:Ve(o,zt,n.createElement(No,null)),render:{...s,slide:c=>{var h,p;return ye(c.slide)||c.slide.type!=null&&(!((h=i.supports)===null||h===void 0)&&h.includes(c.slide.type))?n.createElement(Io,{render:s,...c}):(p=s.slide)===null||p===void 0?void 0:p.call(s,c)}},controller:{...l,preventDefaultWheelY:i.scrollToZoom},...a}}),t(ue(zt,wo))},Lo={auto:!1,ref:null},$n=e=>({...Lo,...e}),Zn=n.createContext(null),Ro=se("useFullscreen","FullscreenContext",Zn);function Oo({fullscreen:e,on:t,children:r}){const{auto:o,ref:s}=$n(e),l=n.useRef(null),[a,i]=n.useState(),[c,h]=n.useState(!1),p=n.useRef(!1),{getOwnerDocument:f}=He();me(()=>{var g,w,C,_;const y=f();i(!((_=(C=(w=(g=y.fullscreenEnabled)!==null&&g!==void 0?g:y.webkitFullscreenEnabled)!==null&&w!==void 0?w:y.mozFullScreenEnabled)!==null&&C!==void 0?C:y.msFullscreenEnabled)!==null&&_!==void 0&&_))},[f]);const b=n.useCallback(()=>{var g;const w=f(),C=w.fullscreenElement||w.webkitFullscreenElement||w.mozFullScreenElement||w.msFullscreenElement;return((g=C?.shadowRoot)===null||g===void 0?void 0:g.fullscreenElement)||C},[f]),v=n.useCallback(()=>{const g=l.current;try{g.requestFullscreen?g.requestFullscreen().catch(()=>{}):g.webkitRequestFullscreen?g.webkitRequestFullscreen():g.mozRequestFullScreen?g.mozRequestFullScreen():g.msRequestFullscreen&&g.msRequestFullscreen()}catch{}},[]),d=n.useCallback(()=>
1{if(!b())return;const g=f();try{g.exitFullscreen?g.exitFullscreen().catch(()=>{}):g.webkitExitFullscreen?g.webkitExitFullscreen():g.mozCancelFullScreen?g.mozCancelFullScreen():g.msExitFullscreen&&g.msExitFullscreen()}catch{}},[b,f]);n.useEffect(()=>{const g=f(),w=()=>{h(b()===l.current)};return Ue(...["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].map(C=>(g.addEventListener(C,w),()=>g.removeEventListener(C,w))))},[b,f]);const m=z(()=>{var g;return(g=t.enterFullscreen)===null||g===void 0?void 0:g.call(t)}),E=z(()=>{var g;return(g=t.exitFullscreen)===null||g===void 0?void 0:g.call(t)});n.useEffect(()=>{c&&(p.current=!0),p.current&&(c?m:E)()},[c,m,E]);const I=z(()=>{var g;return(g=o?v:null)===null||g===void 0||g(),d});n.useEffect(I,[I]);const k=n.useMemo(()=>({fullscreen:c,disabled:a,enter:v,exit:d}),[c,a,v,d]);return n.useImperativeHandle(s,()=>k,[k]),n.createElement("div",{ref:l,className:oe(W(ft),W(an))},n.createElement(Zn.Provider,{value:k},r))}const To=le("EnterFullscreen",n.createElement("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"})),jo=le("ExitFullscreen",n.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}));function Do(){var e;const{fullscreen:t,disabled:r,enter:o,exit:s}=Ro(),{render:l}=q();return r?null:l.buttonFullscreen?n.createElement(n.Fragment,null,(e=l.buttonFullscreen)===null||e===void 0?void 0:e.call(l,{fullscreen:t,disabled:r,enter:o,exit:s})):n.createElement(Ne,{disabled:r,label:t?"Exit Fullscreen":"Enter Fullscreen",icon:t?jo:To,renderIcon:t?l.iconExitFullscreen:l.iconEnterFullscreen,onClick:t?s:o})}function Ao({augment:e,contains:t,addParent:r}){e(({fullscreen:o,toolbar:s,...l})=>({toolbar:Ve(s,ft,n.createElement(Do,null)),fullscreen:$n(o),...l})),r(t(Zt)?Zt:tt,ue(ft,Oo))}const Fo={download:void 0},zn=e=>({...Fo,...e});function Wo(e){if(!e)return;const t=/filename\*\s*=\s*UTF-8''([^;]+)/i.exec(e);if(t)try{const o=decodeURIComponent(t[1].trim());if(o)return o}catch{}const r=/filename\s*=\s*("[^"]*"|[^;]+)/i.exec(e);return r?.[1].trim().replace(/^"(.*)"$/,"$1")||void 0}function $o(e){var t,r;return(r=(t=/^content-disposition:(.*)$/im.exec(e.getAllResponseHeaders()))===null||t===void 0?void 0:t[1])!==null&&r!==void 0?r:null}function Zo(e,t){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=()=>{vt(r.response,t||Wo($o(r)))},r.onerror=()=>{console.error("Failed to download file")},r.send()}function zo(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function dt(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const r=document.createEvent("MouseEvents");
1r.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(r)}}function vt(e,t){const r=document.createElement("a");r.rel="noopener",r.download=t||"",r.download||(r.target="_blank"),typeof e=="string"?(r.href=e,r.origin!==window.location.origin?zo(r.href)?Zo(e,t):(r.target="_blank",dt(r)):dt(r)):(r.href=URL.createObjectURL(e),setTimeout(()=>URL.revokeObjectURL(r.href),3e4),setTimeout(()=>dt(r),0))}const Uo=le("DownloadIcon",n.createElement("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5z"}));function Vo(){const{render:e,on:t,download:r}=q(),{download:o}=zn(r),{currentSlide:s,currentIndex:l}=pe();if(e.buttonDownload)return n.createElement(n.Fragment,null,e.buttonDownload());const a=s&&(s.downloadUrl||typeof s.download=="string"&&s.download||typeof s.download=="object"&&s.download.url||ye(s)&&s.src)||void 0,i=o?s?.download!==!1:!!a,c=()=>{if(s&&a){const p=s.downloadFilename||typeof s.download=="object"&&s.download.filename||void 0;vt(a,p)}},h=()=>{var p;s&&((o||c)({slide:s,saveAs:vt}),(p=t.download)===null||p===void 0||p.call(t,{index:l}))};return n.createElement(Ne,{label:"Download",icon:Uo,renderIcon:e.iconDownload,disabled:!i,onClick:h})}function Ho({augment:e}){e(({toolbar:t,download:r,...o})=>({toolbar:Ve(t,tr,n.createElement(Vo,null)),download:zn(r),...o}))}const Bo={autoplay:!1,delay:3e3,ref:null},Un=e=>({...Bo,...e}),Vn=n.createContext(null),Xo=se("useSlideshow","SlideshowContext",Vn);function Yo({slideshow:e,carousel:{finite:t},on:r,children:o}){const{autoplay:s,delay:l,ref:a}=Un(e),i=n.useRef(s),[c,h]=n.useState(s),p=n.useRef(void 0),f=n.useRef(void 0),{slides:b,currentIndex:v}=pe(),{setTimeout:d,clearTimeout:m}=Xe(),{subscribe:E}=Be(),{next:I}=de(),{setAutoPlaying:k}=Lt();n.useEffect(()=>k(c),[c,k]);const g=b.length===0||t&&v===b.length-1,w=n.useCallback(()=>{!c&&!g&&h(!0)},[c,g]),C=n.useCallback(()=>{c&&h(!1)},[c]),_=n.useCallback(()=>{m(p.current),p.current=void 0},[m]),y=z(()=>{_(),!(!c||g||f.current===Le||f.current===ht)&&(p.current=d(()=>{c&&(f.current=void 0,I())},l))});n.useEffect(y,[v,c,y]),n.useEffect(()=>{c&&g&&h(!1)},[v,c,g]);const T=z(()=>{var Z;return(Z=r.slideshowStart)===null||Z===void 0?void 0:Z.call(r)}),S=z(()=>{var Z;return(Z=r.slideshowStop)===null||Z===void 0?void 0:Z.call(r)});n.useEffect(()=>{c?T():i.current&&S(),i.current=c},[c,T,S]),n.useEffect(()=>Ue(_,E(rr,()=>{f.current=Le,_()}),E(or,()=>{f.current=ht,_()}),E(sr,()=>{f.current=We,y()}),E(lr,()=>{f.current=$e,y()})),[E,_,y]);const F=n.useMemo(()=>({playing:c,disabled:g,play:w,pause:C}),[c,g,w,C]);return n.useImperativeHandle(a,()=>F,[F]),n.createElement(Vn.Provider,{value:F},o)}const Ko=le("Play",n.createElement("path",{d:"M8 5v14l11-7z"})),Go=le("Pause",n.createElement("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"}));function qo(){const{playing:e,disabled:t,play:r,pause:o}=Xo(),{render:s}=q(),l=Rn(de().focus,t);return s.buttonSlideshow?n.createElement(n.Fragment,null,s.buttonSlideshow({playing:e,disabled:t,play:r,pause:o})):n.createElement(Ne,{label:e?"Pause":"Play",icon:e?Go:Ko,renderIcon:e?s.iconSlideshowPause:s.iconSlideshowPlay,onClick:e?o:r,disabled:t,...l})}function Qo({augment:e,addModule:t}){e(({slideshow:r,toolbar:o,...s})=>({toolbar:Ve(o,$t,n.createElement(qo,null)),slideshow:Un(r),...s})),t(ue($t,Yo))}const Re=e=>W(`slide_${e}`),bt={descriptionTextAlign:"start",descriptionMaxLines:3,showToggle:!1,hidden:!1},jt=e=>({...bt,...e});function Jo(){const{captions:e}=q();return jt(e)}const Hn=n.createContext(null),Dt=se("useCaptions","CaptionsContext",Hn);function es({captions:e,children:t}){const{ref:r,hidden:o}=jt(e),[s,l]=n.useState(!o),a=n.useMemo(()=>({visible:s,show:()=>l(!0),hide:()=>l(!1)}),[s]);return n.useImperativeHandle(r,()=>a,[a]),n.createElement(Hn.Provider,{value:a},t)}function ts({title:e}){const{toolbarWidth:t}=de(),{styles:r}=q(),{visible:o}=Dt();return o?n.createElement("div",{role:"heading","aria-level":2,style:r.captionsTitleContainer,className:oe(Re("captions_container"),Re("title_container"))},n.createElement("div",{className:Re("title"),style:{...t?{[te("toolbar_width")]:`${t}px`}:null,...r.captionsTitle}},e)):null}function ns({description:e}){const{descriptionTextAlign:t,descriptionMaxLines:r}=Jo(),{styles:o,labels:s}=q(),{visible:l}=Dt();return l?n.createElement("div",{style:o.captionsDescriptionContainer,className:oe(Re("captions_container"),Re("description_container"))},n.createElement("div",{className:Re("description"),style:{...t!==bt.descriptionTextAlign||r!==bt.descriptionMaxLines?{[te("slide_description_text_align")]:t,[te("slide_description_max_lines")]:r}:null,...o.captionsDescription},role:"paragraph","aria-roledescription":ke(s,"Caption")},typeof e=="string"?e.split(`
2`).flatMap((a,i)=>[...i>0?[n.createElement("br",{key:i})]:[],a]):e)):null}const Bn=()=>n.createElement(n.Fragment,null,n.createElement("path",{strokeWidth:2,stroke:"currentColor",strokeLinejoin:"round",fill:"none",d:"M3 5l18 0l0 14l-18 0l0-14z"}),n.createElement("path",{d:"M7 15h3c.55 0 1-.45 1-1v-1H9.5v.5h-2v-3h2v.5H11v-1c0-.55-.45-1-1-1H7c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1zm7 0h3c.55 0 1-.45 1-1v-1h-1.5v.5h-2v-3h2v.5H18v-1c0-.55-.45-1-1-1h-3c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1z"}
2)),rs=le("CaptionsVisible",Bn()),os=Or("CaptionsVisible",Bn());function ss(){const{visible:e,show:t,hide:r}=Dt(),{render:o}=q();return o.buttonCaptions?n.createElement(n.Fragment,null,o.buttonCaptions({visible:e,show:t,hide:r})):n.createElement(Ne,{label:e?"Hide captions":"Show captions",icon:e?rs:os,renderIcon:e?o.iconCaptionsVisible:o.iconCaptionsHidden,onClick:e?r:t})}function ls({augment:e,addModule:t}){e(({captions:r,render:{slideFooter:o,...s},toolbar:l,...a})=>{const i=jt(r);return{render:{slideFooter:({slide:c})=>n.createElement(n.Fragment,null,o?.({slide:c}),c.title&&n.createElement(ts,{title:c.title}),c.description&&n.createElement(ns,{description:c.description})),...s},toolbar:Ve(l,Wt,i.showToggle?n.createElement(ss,null):null),captions:i,...a}}),t(ue(Wt,es))}function as(){const{slides:e,currentIndex:t}=pe();if(!e.length)return null;const r=e[t],o=r?.groupPos??t+1,s=r?.groupTotal??e.length;return s<=1?null:u.jsxs("div",{"aria-hidden":"true",className:W("group_counter"),style:{position:"absolute",top:14,left:"50%",transform:"translateX(-50%)",zIndex:10,pointerEvents:"none",display:"inline-flex",alignItems:"center",gap:6,padding:"4px 12px",borderRadius:999,background:"rgba(0,0,0,0.6)",color:"#fff",fontSize:13,fontWeight:600,lineHeight:1.4,backdropFilter:"blur(4px)",letterSpacing:.2},children:[u.jsx("span",{style:{width:7,height:7,borderRadius:999,background:"#a855f7",display:"inline-block"}}),o," / ",s]})}function is({addChild:e}){e(tt,ue(er,as))}const cs=(e,t)=>t<=1?1:e>=2.6&&t>=4?3:e>=1.45?2:1;function us({items:e,getKey:t,getAspectRatio:r,spacing:o=14,columns:s,minTileRatio:l=.55,maxTileRatio:a=2.2,render:i}){const c=n.useRef(null),[h,p]=n.useState(0);n.useEffect(()=>{const d=c.current;if(!d)return;const m=()=>p(d.clientWidth);m();const E=new ResizeObserver(m);return E.observe(d),()=>E.disconnect()},[]);const{placed:f,totalHeight:b}=n.useMemo(()=>{if(!h||e.length===0)return{placed:[],totalHeight:0};const d=Math.max(1,Math.round(s(h))),m=(h-o*(d-1))/d,E=new Array(d).fill(0),I=[],k=e.map((w,C)=>{const _=r(w)||1,y=Math.min(Math.max(_,.2),6);return{index:C,ratio:y,span:cs(y,d)}}),g=.5;for(;k.length;){let w=0;for(let P=1;P<d;P+=1)E[P]<E[w]-g&&(w=P);const C=E[w];let _=1;for(;w+_<d&&E[w+_]<=C+g;)_+=1;let y=-1;for(let P=0;P<k.length;P+=1)if(k[P].span===_){y=P;break}if(y===-1){for(let P=0;P<k.length;P+=1)if(k[P].span<_){y=P;break}}y===-1&&(y=0);const T=k.splice(y,1)[0],S=Math.min(T.span,_,d),F=m*S+o*(S-1),Z=Math.min(Math.max(T.ratio,1/a),1/l),U=F/Z;I.push({left:w*(m+o),top:C,width:F,height:U,span:S,index:T.index});const M=C+U+o;for(let P=w;P<w+S;P+=1)E[P]=M}return{placed:I,totalHeight:Math.max(0,Math.max(...E)-o)}},[e,h,s,o,r,l,a]),v=n.useCallback(d=>{const m=e[d.index];return u.jsx("div",{style:{position:"absolute",left:d.left,top:d.top,width:d.width,height:d.height},children:i(m,{width:d.width,height:d.height,span:d.span,index:d.index})},t(m,d.index))},[e,t,i]);return u.jsx("div",{ref:c,style:{position:"relative",height:b},className:"w-full",children:h>0&&f.map(v)})}const ds=yt.memo(us),Ge={art:1,"3dmodels":2,thumbnail:3,mods:4,resourcepack:5,modpack:6,website:7,webapp:8,projects:9,article:10,other:11},Me=e=>(e||"other").toLowerCase().trim(),fs=(e,t)=>t==="uk"?e.description||e.descriptionEn||"":e[`description${t==="en"?"En":t==="pl"?"Pl":t==="de"?"De":"Lolcat"}`]||e.descriptionEn||e.description||"",hs=e=>(e||"").toLowerCase().replace(/\d+/g,"").replace(/\s+/g," ").trim(),ms=e=>{const t=new Map,r=[];for(const o of e){if(o.variants&&o.variants.length){r.push(o);continue}const s=hs(o.title);if(!s){r.push(o);continue}t.has(s)||t.set(s,[]),t.get(s).push(o)}for(const o of t.values())if(o.length>1){const s=[...o].sort((l,a)=>parseInt(l.id||"0",10)-parseInt(a.id||"0",10));r.push({...s[0],variants:s.map(l=>l.url)})}else r.push(o[0]);return r},ps=e=>new Promise(t=>{const r={width:1200,height:900,ok:!1};if(!e){t(r);return}const o=new Image;o.onload=()=>t(o.naturalWidth>0&&o.naturalHeight>0?{width:o.naturalWidth,height:o.naturalHeight,ok:!0}:r),o.onerror=()=>t(r),o.src=e}),gs=4/3,xs=()=>{const{t:e,language:t}=Yn(),[r,o]=n.useState([]),[s,l]=n.useState(!1),a=n.useRef(new Map),[i,c]=n.useState(new Set),h=yt.useCallback(x=>{c(R=>{if(!x||R.has(x))return R;const D=new Set(R);return D.add(x),D})},[]),[p,f]=n.useState(""),[b,v]=n.useState([]),[d,m]=n.useState([]),[E,I]=n.useState(""),[k,g]=n.useState("newest"),[w,C]=n.useState(!1),[_,y]=n.useState(!1),[T,S]=n.useState(!1),[F,Z]=n.useState(!1),[U,M]=n.useState(!1),[P,A]=n.useState(!1),[Y,X]=n.useState(0),L=n.useRef(null);n.useEffect(()=>{let x=!1;return(async()=>{const R=await Kn();if(x)return;const D=ms(R).filter(J=>!!J.url);o(D);const O=new Set;D.forEach(J=>
2{O.add(J.url),(J.variants||[]).forEach(fe=>O.add(fe))});const V=new Set;await Promise.allSettled(Array.from(O).map(async J=>{const{width:fe,height:_e,ok:De}=await ps(J);a.current.set(J,{width:fe,height:_e}),De||V.add(J)})),!x&&(V.size&&c(J=>new Set([...J,...V])),l(!0))})(),()=>{x=!0}},[]),n.useEffect(()=>{if(U){const x=document.body.style.overflow;document.body.style.overflow="hidden";const R=D=>D.key==="Escape"&&M(!1);return document.addEventListener("keydown",R),()=>{document.body.style.overflow=x,document.removeEventListener("keydown",R)}}},[U]);const $=n.useMemo(()=>{const x=new Set(r.map(R=>Me(R.category)));return Array.from(x).sort((R,D)=>(Ge[R]??99)-(Ge[D]??99))},[r]),K=n.useMemo(()=>{const x={};return r.forEach(R=>{const D=Me(R.category);x[D]=(x[D]||0)+1}),x},[r]),B=n.useMemo(()=>{const x=new Map;return r.forEach(R=>(R.tags||[]).forEach(D=>x.set(D,(x.get(D)||0)+1))),Array.from(x.entries()).filter(([R])=>!d.includes(R)).sort((R,D)=>D[1]-R[1]||R[0].localeCompare(D[0]))},[r,d]),j=p.trim()!==""||b.length>0||d.length>0||k!=="newest"||w||_||T||F,G=()=>{f(""),v([]),m([]),I(""),g("newest"),C(!1),y(!1),S(!1),Z(!1)},Q=n.useMemo(()=>{let x=r;if(b.length){const O=new Set(b.map(Me));x=x.filter(V=>O.has(Me(V.category)))}d.length&&(x=x.filter(O=>d.every(V=>(O.tags||[]).includes(V)))),w&&(x=x.filter(O=>!!O.featured)),_&&(x=x.filter(O=>(O.variants||[]).length>1)),T&&(x=x.filter(O=>!!O.downloadUrl&&O.downloadUrl!=="#")),F&&(x=x.filter(O=>!!O.projectUrl&&O.projectUrl!=="#"));const R=p.trim().toLowerCase();R&&(x=x.filter(O=>[O.title,O.description,O.descriptionEn,Pe(O.category||"other",t),...O.tags||[]].filter(Boolean).join(" ").toLowerCase().includes(R)));const D=[...x];return D.sort((O,V)=>{switch(k){case"nameAsc":return(O.title||"").localeCompare(V.title||"");case"nameDesc":return(V.title||"").localeCompare(O.title||"");case"category":{const J=Ge[Me(O.category)]??99,fe=Ge[Me(V.category)]??99;return J-fe||(O.title||"").localeCompare(V.title||"")}default:return parseInt(V.id||"0",10)-parseInt(O.id||"0",10)}}),D},[r,b,d,w,_,T,F,p,k,t]),{photos:ae,slides:ie,starts:ve}=n.useMemo(()=>{const x=[],R=[],D=[];for(const O of Q){const V=O.variants&&O.variants.length>1?O.variants:[O.url],J=a.current.get(O.url)||{width:1200,height:900},fe=O.title||e("common.untitled"),_e=fs(O,t),De=V.length;D.push(R.length),x.push({src:O.url,...J,key:O.id,item:O}),V.forEach((N,H)=>R.push({src:N,alt:fe,title:fe,description:_e,groupPos:H+1,groupTotal:De,broken:i.has(N),category:Pe(O.category||"other",t)}))}return{photos:x,slides:R,starts:D}},[Q,s,t,e,i]),Te=x=>{X(ve[x]??0),A(!0)},je=(x,R)=>x.includes(R)?x.filter(D=>D!==R):[...x,R],Se=n.useMemo(()=>{const x=E.trim().toLowerCase();return x?B.filter(([R])=>R.toLowerCase().includes(x)):B},[B,E]),ot=(x,R)=>{const D=x.item,O=D.variants&&D.variants.length>1?D.variants.length:1,V=D.title||e("common.untitled"),J=i.has(x.src);return u.jsxs("button",{type:"button",onClick:()=>Te(R),"aria-label":V,className:`group relative block h-full w-full cursor-zoom-in overflow-hidden rounded-xl bg-gray-100 dark:bg-gray-800 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 ${D.featured?"ring-2 ring-amber-400/80 ring-offset-1 ring-offset-white dark:ring-offset-gray-900":""}`,children:[J?u.jsx(on,{title:V,category:Pe(D.category||"other",t),note:e("gallery.imageUnavailable"),fill:!0}):u.jsx("img",{src:x.src,alt:V,title:V,loading:"lazy",decoding:"async",onError:()=>h(x.src),style:{display:"block",width:"100%",height:"100%"},className:"object-cover transition-transform duration-500 group-hover:scale-[1.04]"}),u.jsxs("span",{className:"absolute top-2 left-2 flex flex-col items-start gap-1.5",children:[D.featured&&u.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 text-[11px] font-semibold rounded-full bg-amber-400 text-amber-950 shadow",title:e("gallery.featured"),children:[u.jsx("i",{className:"fas fa-star text-[9px]","aria-hidden":"true"}),e("gallery.featured")]}),u.jsx("span",{className:"px-2 py-0.5 text-[11px] font-medium bg-black/55 text-white rounded-full",children:Pe(D.category||"other",t)})]}),O>1&&u.jsxs("span",{className:"absolute top-2 right-2 inline-flex items-center gap-1 px-2 py-0.5 text-[11px] font-semibold rounded-full bg-purple-600/95 text-white shadow",children:[u.jsx("i",{className:"fas fa-layer-group text-[9px]","aria-hidden":"true"}),O]}),u.jsx("span",{className:"absolute inset-x-0 bottom-0 p-2 pt-8 bg-gradient-to-t from-black/75 via-black/25 to-transparent text-left opacity-0 group-hover:opacity-100 transition-opacity duration-300",children:u.jsx("span",{className:"block text-white text-xs font-semibold line-clamp-2",children:V})}),D.featured&&u.jsx("span",{title:e("gallery.featured"),"aria-hidden":"true",className:"absolute bottom-1.5 right-1.5 z-10 flex h-5 w-5 items-center justify-center rounded-full bg-black/55 text-amber-400 shadow-sm backdrop-blur-sm ring-1 ring-amber-400/70",children:u.jsx("i",{className:"fas fa-star text-[10px]"})})]})};return u.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-white via-primary-50/40 to-primary-100/50 dark:from-gray-900 dark:via-gray-800 dark:to-primary-900/20 relative",children:[u.jsx("div",{className:"container mx-auto px-4 py-16",children:u.jsxs("div",{className:"max-w-7xl mx-auto",children:[u.jsxs("div",{className:"text-center mb-10",children:[u.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-4 bg-gradient-to-r from-primary-600 via-primary-500 to-primary-400 bg-clip-text text-transparent",children:e("gallery.title")}),u.jsx("p",{className:"text-lg text-gray-700 dark:text-gray-300 leading-relaxed max-w-2xl mx-auto",children:e("gallery.subtitle")})]}),u.jsxs("div",{className:"mb-6",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-2 md:gap-3",children:[u.jsxs("div",{className:"relative flex-1 min-w-[220px] max-w-md",children:[u.jsx("i",{className:"fas fa-search absolute left-4 top-1/2 -translate-y-1/2 text-gray-400","aria-hidden":"true"}),u.jsx("input",{type:"search",value:p,onChange:x=>f(x.target.value),placeholder:e("gallery.searchPlaceholder"),className:"w-full pl-11 pr-4 py-3 bg-card dark:bg-gray-800/80 backdrop-blur-md border border-primary-200 dark:border-primary-700/50 rounded-2xl shadow-md focus:ring-2 focus:ring-primary-500 focus:border-transparent text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400"})]}),u.jsxs("button",{type:"button",onClick:()=>M(!0),className:"inline-flex items-center gap-2 px-4 py-3 rounded-2xl bg-card dark:bg-gray-800/80 border border-primary-200 dark:border-primary-700/50 shadow-md hover:bg-white dark:hover:bg-gray-700 text-gray-900 dark:text-white text-sm font-medium transition-colors","aria-haspopup":"dialog","aria-expanded":U,children:[u.jsx("i",{className:"fas fa-sliders-h","aria-hidden":"true"}),u.jsx("span",{children:e("gallery.openFilters")}),j&&u.jsx("span",{className:"w-5 h-5 rounded-full bg-primary-600 text-white text-xs flex items-center justify-center",children:[p.trim()?1:0,b.length,d.length,k!=="newest"?1:0,w?1:0,_?1:0,T?1:0,F?1:0].reduce((x,R)=>x+R,0)})]}),u.jsxs("label",{className:"relative inline-flex items-center gap-2 px-3 py-3 rounded-2xl bg-card dark:bg-gray-800/80 border border-primary-200 dark:border-primary-700/50 shadow-md text-sm text-gray-900 dark:text-white",children:[u.jsx("i",{className:"fas fa-sort text-gray-400","aria-hidden":"true"}),u.jsx("span",{className:"sr-only",children:e("gallery.sortBy")}),u.jsxs("select",{value:k,onChange:x=>g(x.target.value),className:"bg-transparent focus:outline-none text-sm text-gray-900 dark:text-white",children:[u.jsx("option",{value:"newest",children:e("gallery.sortNewest")}
2),u.jsx("option",{value:"nameAsc",children:e("gallery.sortNameAsc")}),u.jsx("option",{value:"nameDesc",children:e("gallery.sortNameDesc")}),u.jsx("option",{value:"category",children:e("gallery.sortCategory")})]})]})]}),j&&u.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[u.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400 font-medium uppercase tracking-wide",children:e("gallery.activeFilters")}),p.trim()&&u.jsx(be,{label:`"${p.trim()}"`,onRemove:()=>f("")}),b.map(x=>u.jsx(be,{label:Pe(x,t),onRemove:()=>v(R=>R.filter(D=>D!==x))},x)),d.map(x=>u.jsx(be,{label:`#${x}`,onRemove:()=>m(R=>R.filter(D=>D!==x))},x)),w&&u.jsx(be,{label:e("gallery.featuredOnly"),onRemove:()=>C(!1)}),_&&u.jsx(be,{label:e("gallery.hasVariants"),onRemove:()=>y(!1)}),T&&u.jsx(be,{label:e("gallery.downloadable"),onRemove:()=>S(!1)}),F&&u.jsx(be,{label:e("gallery.hasLink"),onRemove:()=>Z(!1)}),k!=="newest"&&u.jsx(be,{label:`${e("gallery.sortBy")}: ${e(vs(k))}`,onRemove:()=>g("newest")}),u.jsxs("button",{type:"button",onClick:G,className:"text-xs font-medium text-red-500 hover:text-red-600 inline-flex items-center gap-1",children:[u.jsx("i",{className:"fas fa-times text-[10px]","aria-hidden":"true"}),e("gallery.clearAll")]})]}),u.jsxs("p",{className:"mt-3 text-sm text-gray-700 dark:text-gray-400","aria-live":"polite",children:[e("gallery.showing",{shown:Q.length}),j?` · ${e("gallery.found",{found:Q.length,total:r.length})}`:""]})]}),s?Q.length===0?u.jsxs("div",{className:"py-20 text-center",children:[u.jsx("div",{className:"text-5xl mb-4",children:u.jsx("i",{className:"fas fa-images text-gray-300","aria-hidden":"true"})}),u.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white mb-2",children:e("gallery.noResults")}),u.jsx("p",{className:"text-gray-700 dark:text-gray-400 mb-6",children:e("gallery.tryAdjust")}),u.jsx("button",{type:"button",onClick:G,className:"px-6 py-3 bg-gradient-to-r from-primary-500 to-primary-600 text-white font-semibold rounded-xl shadow-md hover:shadow-lg",children:e("gallery.showAll")})]}):u.jsx(ds,{items:ae,spacing:14,getKey:x=>x.key,getAspectRatio:x=>i.has(x.src)?gs:(x.width||1200)/(x.height||900),columns:x=>x<480?2:x<820?3:x<1200?4:5,render:(x,R)=>ot(x,R.index)}):u.jsxs("div",{className:"py-20 text-center",children:[u.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600 mx-auto mb-4","aria-hidden":"true"}),u.jsx("div",{className:"text-primary-600 dark:text-primary-400",children:e("common.loading")})]})]})}),u.jsx(Gn,{children:U&&u.jsxs(u.Fragment,{children:[u.jsx(Ft.div,{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",initial:{opacity:0}
2,animate:{opacity:1},exit:{opacity:0},onClick:()=>M(!1),"aria-hidden":"true"}),u.jsxs(Ft.div,{ref:L,role:"dialog","aria-modal":"true","aria-label":e("gallery.openFilters"),className:"fixed top-0 right-0 z-50 h-full w-full max-w-md bg-white dark:bg-gray-900 shadow-2xl flex flex-col",initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"tween",duration:.25},children:[u.jsxs("div",{className:"flex items-center justify-between px-6 py-5 border-b border-gray-200 dark:border-gray-700",children:[u.jsxs("h2",{className:"text-xl font-bold text-gray-900 dark:text-white flex items-center gap-2",children:[u.jsx("i",{className:"fas fa-sliders-h text-primary-600 dark:text-primary-400","aria-hidden":"true"}),e("gallery.openFilters")]}),u.jsxs("div",{className:"flex items-center gap-2",children:[j&&u.jsxs("button",{type:"button",onClick:G,className:"text-sm text-red-500 hover:text-red-600 font-medium inline-flex items-center gap-1",children:[u.jsx("i",{className:"fas fa-undo-alt text-xs","aria-hidden":"true"}),e("gallery.clearAll")]}),u.jsx("button",{type:"button",onClick:()=>M(!1),"aria-label":e("gallery.closeFilters"),className:"w-10 h-10 rounded-full bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-700 flex items-center justify-center",children:u.jsx("i",{className:"fas fa-times","aria-hidden":"true"})})]})]}),u.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-5 space-y-7",children:[u.jsxs("section",{children:[u.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-gray-400 mb-3",children:e("gallery.categories")}),u.jsx("div",{className:"space-y-1",children:$.map(x=>{const R=b.includes(x);return u.jsxs("label",{className:"flex items-center justify-between gap-3 px-3 py-2 rounded-xl hover:bg-gray-100 dark:hover:bg-gray-800 cursor-pointer",children:[u.jsxs("span",{className:"flex items-center gap-3 text-sm text-gray-800 dark:text-gray-100",children:[u.jsx("input",{type:"checkbox",checked:R,onChange:()=>v(D=>je(D,x)),className:"w-4 h-4 accent-primary-600"}),Pe(x,t)]}),u.jsx("span",{className:"text-xs text-gray-400 tabular-nums",children:K[x]||0})]},x)})})]}),u.jsxs("section",{children:[u.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-gray-400 mb-3",children:e("gallery.tags")}),u.jsxs("div",{className:"relative mb-2",children:[u.jsx("i",{className:"fas fa-search absolute left-3 top-1/2 -translate-y-1/2 text-xs text-gray-400","aria-hidden":"true"}),u.jsx("input",{type:"search",value:E,onChange:x=>I(x.target.value),placeholder:e("gallery.searchTags"),className:"w-full pl-8 pr-3 py-2 rounded-xl bg-gray-100 dark:bg-gray-800 border border-transparent focus:border-primary-400 focus:bg-white dark:focus:bg-gray-700 text-sm text-gray-900 dark:text-white placeholder-gray-400 outline-none transition-colors"})]}),u.jsx("div",{className:"max-h-56 overflow-y-auto pr-1 space-y-1",children:Se.length===0?u.jsx("p",{className:"text-sm text-gray-400 px-1 py-2",children:e("gallery.noTagsMatch")}):Se.slice(0,40).map(([x,R])=>{const D=d.includes(x);return u.jsxs("label",{className:"flex items-center justify-between gap-3 px-3 py-1.5 rounded-xl hover:bg-gray-100 dark:hover:bg-gray-800 cursor-pointer",children:[u.jsxs("span",{className:"flex items-center gap-3 text-sm text-gray-800 dark:text-gray-100",children:[u.jsx("input",{type:"checkbox",checked:D,onChange:()=>m(O=>je(O,x)),className:"w-4 h-4 accent-primary-600"}),"#",x]}),u.jsx("span",{className:"text-xs text-gray-400 tabular-nums",children:R})]},x)})})]}),u.jsxs("section",{children:[u.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-gray-400 mb-3",children:e("gallery.options")}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(qe,{checked:w,onChange:C,label:e("gallery.featuredOnly")}),u.jsx(qe,{checked:_,onChange:y,label:e("gallery.hasVariants")}),u.jsx(qe,{checked:T,onChange:S,label:e("gallery.downloadable")}),u.jsx(qe,{checked:F,onChange:Z,label:e("gallery.hasLink")})]})]})]}),u.jsx("div",{className:"px-6 py-4 border-t border-gray-200 dark:border-gray-700",children:u.jsx("button",{type:"button",onClick:()=>M(!1),className:"w-full py-3 rounded-2xl bg-primary-600 hover:bg-primary-700 text-white font-semibold shadow-md transition-colors",children:e("gallery.showing",{shown:Q.length})})})]})]})}),u.jsx(ho,{open:P,index:Y,close:()=>A(!1),slides:ie,plugins:[is,ls,Mo,Ao,Ho,Qo],controller:{closeOnBackdropClick:!0},carousel:{finite:!1},captions:{descriptionTextAlign:"center"},render:{slide:({slide:x})=>{const R=x;if(R.broken)return u.jsx("div",{className:"flex items-center justify-center p-6",children:u.jsx("div",{className:"w-[min(90vw,520px)]",children:u.jsx(on,{title:R.title||e("common.untitled"),category:R.category,note:e("gallery.imageUnavailable"),aspectRatio:4/3})})})}}})]})},on=({title:e,category:t,note:r,aspectRatio:o=4/3,fill:s})=>u.jsxs("div",{style:s?{height:"100%"}:{aspectRatio:`${o||4/3}`},className:"flex w-full flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-gray-300 bg-gradient-to-br from-gray-100 to-gray-200 p-4 text-center dark:border-gray-600 dark:from-gray-800 dark:to-gray-900",children:[u.jsx("i",{className:"fas fa-image-slash fa-image text-2xl text-gray-400 dark:text-gray-500","aria-hidden":"true"}),u.jsx("span",{className:"line-clamp-3 text-sm font-semibold text-gray-800 dark:text-gray-100",children:e}),t&&u.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wide text-gray-500 dark:text-gray-400",children:t}),u.jsx("span",{className:"text-[11px] text-gray-400 dark:text-gray-500",children:r})]}),vs=e=>`gallery.sort${e[0].toUpperCase()}${e.slice(1)}`,be=({label:e,onRemove:t})=>u.jsxs("span",{className:"inline-flex items-center gap-1.5 pl-3 pr-1.5 py-1 rounded-full bg-primary-100 dark:bg-primary-900/50 text-primary-700 dark:text-primary-300 text-xs font-medium border border-primary-200 dark:border-primary-700/50",children:[e,u.jsx("button",{type:"button",onClick:t,"aria-label":`Remove ${e}`,className:"w-4 h-4 rounded-full bg-primary-200 dark:bg-primary-800 hover:bg-primary-300 dark:hover:bg-primary-700 flex items-center justify-center",children:u.jsx("i",{className:"fas fa-times text-[8px]","aria-hidden":"true"})})]}),qe=({checked:e,onChange:t,label:r})=>u.jsxs("label",{className:"flex items-center justify-between gap-3 px-3 py-2 rounded-xl hover:bg-gray-100 dark:hover:bg-gray-800 cursor-pointer",children:[u.jsx("span",{className:"flex items-center gap-3 text-sm text-gray-800 dark:text-gray-100",children:r}),u.jsx("span",{role:"switch","aria-checked":e,tabIndex:0,onClick:o=>{o.preventDefault(),t(!e)},onKeyDown:o=>{(o.key===" "||o.key==="Enter")&&(o.preventDefault(),t(!e))},className:`w-10 h-6 rounded-full transition-colors relative ${e?"bg-primary-600":"bg-gray-300 dark:bg-gray-700"}`,children:u.jsx("span",{className:`absolute top-0.5 w-5 h-5 rounded-full bg-white shadow transition-all ${e?"left-[18px]":"left-0.5"}`})})]}),ys=yt.memo(xs);export{ys as Gallery,ys 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.