react-motion-gallery 2.0.36 → 2.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/FullscreenRuntime-Z3RXJ2HP.mjs +4 -0
- package/dist/{GridSkeleton-B5wWBN9L.d.mts → GridSkeleton-Dpsi5tXc.d.mts} +1 -1
- package/dist/{MasonrySkeleton-D8aZRUiv.d.mts → MasonrySkeleton-Cs0x-4yL.d.mts} +1 -1
- package/dist/chunk-45TZO7MN.mjs +2 -0
- package/dist/chunk-4RPAI2F7.mjs +4 -0
- package/dist/chunk-4URHXPTV.mjs +4 -0
- package/dist/{chunk-7PF7OJT2.mjs → chunk-5HGFS3S2.mjs} +1 -1
- package/dist/{chunk-MFTASEWB.mjs → chunk-AHMXEVKY.mjs} +1 -1
- package/dist/chunk-AU4O4KU4.mjs +1 -0
- package/dist/chunk-EWWWD475.mjs +1 -0
- package/dist/{chunk-J3UHEYNG.mjs → chunk-MJAHN7TG.mjs} +1 -1
- package/dist/{chunk-63CVVCOL.mjs → chunk-MLE7BKAD.mjs} +1 -1
- package/dist/chunk-P6NLW2QN.mjs +1 -0
- package/dist/chunk-UEIIMUYB.mjs +1 -0
- package/dist/chunk-YNQPSE2N.mjs +3 -0
- package/dist/{chunk-3RVITFUD.mjs → chunk-YU2WS3GJ.mjs} +1 -1
- package/dist/core.d.mts +1 -1
- package/dist/entries.d.mts +8 -7
- package/dist/entries.mjs +1 -1
- package/dist/fullscreen-captions.d.mts +1 -1
- package/dist/fullscreen-controls.d.mts +1 -1
- package/dist/fullscreen-crossfade.d.mts +1 -1
- package/dist/fullscreen-lazy-load.d.mts +1 -1
- package/dist/fullscreen-slider.d.mts +1 -1
- package/dist/fullscreen-slider.mjs +1 -1
- package/dist/fullscreen-thumbnails.d.mts +1 -1
- package/dist/fullscreen-video.d.mts +1 -1
- package/dist/fullscreen-zoom-pan.d.mts +1 -1
- package/dist/fullscreen.d.mts +4 -3
- package/dist/fullscreen.mjs +1 -1
- package/dist/grid.d.mts +2 -2
- package/dist/grid.mjs +1 -1
- package/dist/{index-lEnLoQv4.d.mts → index-QEgABhod.d.mts} +1 -1
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +1 -1
- package/dist/{layout-DoYnPD0I.d.mts → layout-BOy4geKv.d.mts} +1 -0
- package/dist/masonry.mjs +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/{responsive-CrESIWcm.d.mts → responsive-BnHorKhC.d.mts} +25 -1
- package/dist/responsive.d.mts +1 -1
- package/dist/skeleton-base.d.mts +8 -5
- package/dist/skeleton-base.mjs +1 -1
- package/dist/skeleton-cache-provider.d.mts +7 -0
- package/dist/skeleton-cache-provider.mjs +1 -0
- package/dist/skeleton-cache.d.mts +70 -0
- package/dist/skeleton-cache.mjs +1 -0
- package/dist/skeleton-grid.d.mts +5 -4
- package/dist/skeleton-grid.mjs +1 -1
- package/dist/skeleton-masonry.d.mts +8 -6
- package/dist/skeleton-masonry.mjs +1 -1
- package/dist/skeleton-slider.d.mts +2 -1
- package/dist/skeleton-slider.mjs +5 -5
- package/package.json +9 -1
- package/dist/FullscreenRuntime-E7O76RND.mjs +0 -4
- package/dist/chunk-4BTS6IIA.mjs +0 -2
- package/dist/chunk-4ZOW533S.mjs +0 -1
- package/dist/chunk-7YGT5VBX.mjs +0 -1
- package/dist/chunk-LSHR3FZM.mjs +0 -4
- package/dist/chunk-RGS2QTPJ.mjs +0 -3
- package/dist/chunk-X3W6JPNH.mjs +0 -4
package/README.md
CHANGED
|
@@ -20,10 +20,10 @@ This table reports local gzip measurements for selected runtime surfaces. Type-o
|
|
|
20
20
|
| `Masonry` | 6.5kB |
|
|
21
21
|
| `masonry/ready` | 323.0B |
|
|
22
22
|
| `masonry/lazy-load` | 3.3kB |
|
|
23
|
-
| `Skeleton base` |
|
|
23
|
+
| `Skeleton base` | 10.6kB |
|
|
24
24
|
| `skeleton/slider` | 17.0kB |
|
|
25
25
|
| `skeleton/grid` | 10.6kB |
|
|
26
|
-
| `skeleton/masonry` |
|
|
26
|
+
| `skeleton/masonry` | 21.8kB |
|
|
27
27
|
| `Slider core` | 18.7kB |
|
|
28
28
|
| `slider/ready` | 894.0B |
|
|
29
29
|
| `slider/arrows` | 1.2kB |
|
|
@@ -38,8 +38,8 @@ This table reports local gzip measurements for selected runtime surfaces. Type-o
|
|
|
38
38
|
| `slider/crossfade` | 2.8kB |
|
|
39
39
|
| `slider/fullscreen` | 959.0B |
|
|
40
40
|
| `ThumbnailSlider` | 18.9kB |
|
|
41
|
-
| `useFullscreenController` |
|
|
42
|
-
| `fullscreen/slider` |
|
|
41
|
+
| `useFullscreenController` | 5.0kB |
|
|
42
|
+
| `fullscreen/slider` | 37.5kB |
|
|
43
43
|
| `fullscreen/controls` | 173.0B |
|
|
44
44
|
| `fullscreen/captions` | 13.1kB |
|
|
45
45
|
| `fullscreen/zoom-pan` | 9.9kB |
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import {a as a$2,f as f$2,e as e$2}from'./chunk-TIQVSK5S.mjs';import {a as a$9,d as d$4,c as c$3,b as b$3}from'./chunk-PFEGIWQJ.mjs';import {d as d$1,a as a$5}from'./chunk-ADIHG7AT.mjs';import {a as a$1,d as d$2,c as c$2}from'./chunk-XUQO5F2F.mjs';import {b}from'./chunk-P2GQPFSL.mjs';import {a as a$6}from'./chunk-LVMYHM4T.mjs';import {j,i,f,g as g$1,c as c$1,b as b$2,a as a$4,e as e$1}from'./chunk-4NT4UVB5.mjs';import {b as b$1,c,d,f as f$1,e,h,g,a as a$3}from'./chunk-HGY3QLCE.mjs';import {a}from'./chunk-ULUKLQXS.mjs';import {c as c$4}from'./chunk-NHIKOJLU.mjs';import {a as a$7}from'./chunk-UML6FCOQ.mjs';import {d as d$3}from'./chunk-WMG2LTLR.mjs';import'./chunk-L2HRIINV.mjs';import {a as a$8}from'./chunk-B4CC5AGE.mjs';import {f as f$3,g as g$2}from'./chunk-HK2DPKES.mjs';import*as F from'react';import F__default,{forwardRef,useRef,useState,useEffect,useCallback,Children,useImperativeHandle,useLayoutEffect}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {flushSync}from'react-dom';import {createRoot}from'react-dom/client';function ni({size:e=35,className:n}){return jsx("svg",{className:n,width:e,height:e,viewBox:"0 0 16 16","aria-hidden":"true",focusable:"false",children:jsx("path",{fill:"white",stroke:"#4f4f4f",strokeWidth:.5,d:"M12.96 4.46l-1.42-1.42-3.54 3.55-3.54-3.55-1.42 1.42 3.55 3.54-3.55 3.54 1.42 1.42 3.54-3.55 3.54 3.55 1.42-1.42-3.55-3.54 3.55-3.54z"})})}function ri({index:e,count:n}){return jsxs("span",{children:[e+1," / ",n]})}function rs(e,n=.4){let t=e.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight,o=Math.min(t.bottom,r)-Math.max(t.top,0);return o<=0?false:o>=t.height*n}async function kr(e){if(typeof window>"u")return;let n=document.querySelector(`[data-rmg-entry-owner="${e}"]`);if(!n||rs(n,.5))return;let t=n.getBoundingClientRect(),r=window.scrollY||document.documentElement.scrollTop||0,o=window.innerHeight||document.documentElement.clientHeight||t.height,a=t.top+r-(o-t.height)/2;window.scrollTo({top:a,behavior:"instant"});}function An(e){let n=document.querySelector(`[data-rmg-entry-owner="${e}"]`);return n?n.getAttribute("data-rmg-entry-mounted")==="1"&&n.getAttribute("data-rmg-entry-ready")==="1":false}async function Ar(e,n=1200){return typeof window>"u"?false:An(e)?true:new Promise(t=>{let r=typeof performance<"u"?performance.now():Date.now(),o=()=>{if(An(e)){t(true);return}if((typeof performance<"u"?performance.now():Date.now())-r>=n){t(false);return}requestAnimationFrame(o);};requestAnimationFrame(o);})}var is=80,ss=767;function as(e){return e.introFade||e.isVideoSlide||e.introMethod==="fade"&&e.isLatchedIntroIndex||e.hasTransformTarget===false?true:e.hasTransformTarget?false:e.introMethod==="fade"}function ls(e){let n=[Math.min(e.visualViewportWidth,e.visualViewportHeight),Math.min(e.viewportWidth,e.viewportHeight)].filter(r=>Number.isFinite(r)&&r>0);return (n.length>0?Math.min(...n)<=ss:false)&&e.hoverNone&&(e.coarsePointer||e.maxTouchPoints>0)}function oi(e){if(typeof window>"u"||typeof window.matchMedia!="function")return false;try{return window.matchMedia(e).matches}catch{return false}}function cs(){let e=typeof window<"u"?window:void 0,n=e?.visualViewport,t=typeof document<"u"?document.documentElement:void 0,r=typeof navigator<"u"?navigator:void 0;return {viewportWidth:e?.innerWidth||t?.clientWidth||0,viewportHeight:e?.innerHeight||t?.clientHeight||0,visualViewportWidth:n?.width??e?.innerWidth??t?.clientWidth??0,visualViewportHeight:n?.height??e?.innerHeight??t?.clientHeight??0,coarsePointer:oi("(pointer: coarse)"),hoverNone:oi("(hover: none)"),maxTouchPoints:r?.maxTouchPoints??0,userAgent:r?.userAgent??""}}function ii(e){let n=e.closeScroll;if(n==null||n===false)return {enabled:false,timing:"before-close",isMobile:false};let t=typeof n=="object"?n:{},r=e.mobileContext??cs(),o=typeof t.mobileDetection=="function"?!!t.mobileDetection(r):ls(r),a={...r,index:e.index,layout:e.layout,target:e.target,isMobile:o},l=typeof n=="object"?t.enabled??true:n,c;return typeof l=="function"?c=!!l(a):l==="desktop-only"?c=!o:l==="mobile-only"?c=o:c=!!l,{enabled:c,timing:t.timing==="after-close"?"after-close":"before-close",isMobile:o}}function us(e){let n=Number.isFinite(e)?Math.max(0,e):0;return Math.min(n,is)}function ds(e,n){let t=e.getBoundingClientRect();n(e,"width",`${Math.max(1,Math.round(t.width))}px`),n(e,"height",`${Math.max(1,Math.round(t.height))}px`);}var Dr=e=>`${Math.round(e)}px`;function fs(e){return e?e.parentElement??e:null}function ms(e,n){if(!n?.length)return -1;let t=n.find(r=>r.cells.some(o=>o.index===e));return t?n.indexOf(t):-1}function si(e,n,t){let r=Array.from(e.querySelectorAll(`:scope > [data-rmg-slide="true"][data-rmg-idx="${t}"]`));if(!r.length)return null;let o=r.sort((a,l)=>{let c=a.getAttribute("data-rmg-clone")==="true"?1:0,u=l.getAttribute("data-rmg-clone")==="true"?1:0;return c-u});return o.find(a=>ro(a,n,false))??o.find(a=>ro(a,n,true))??o[0]??null}function ro(e,n,t=true){let r=n.getBoundingClientRect(),o=e.getBoundingClientRect(),a=o.left>=r.left&&o.right<=r.right&&o.top>=r.top&&o.bottom<=r.bottom,l=o.right>r.left&&o.left<r.right&&o.bottom>r.top&&o.top<r.bottom;return t?l:a}function Wr(e){let n=Math.max(1,Math.round(e));return new Promise(t=>{let r=o=>{if(o<=0){t();return}requestAnimationFrame(()=>r(o-1));};r(n);})}function ui(){return Wr(4)}function ps(e){let n=Number.parseFloat(e?.trim()??"");return Number.isFinite(n)&&n>0?n:null}function ys(e,n,t,r){let o=n+(e.left-n)*r,a=t+(e.top-t)*r;return new DOMRect(o,a,e.width*r,e.height*r)}function gs(e,n){let t=e.offsetWidth>0?n.width/e.offsetWidth:NaN,r=e.offsetHeight>0?n.height/e.offsetHeight:NaN;return Number.isFinite(t)&&t>0?t:Number.isFinite(r)&&r>0?r:null}function Sr(e){if(!e)return null;let n=e.getBoundingClientRect(),t=e.matches('[data-rmg-slide="true"]')?e:e.closest('[data-rmg-slide="true"]');if(!t)return n;let r=ps(getComputedStyle(t).getPropertyValue("--rmg-scale"));if(!r||Math.abs(r-1)<1e-4)return n;let o=t.getBoundingClientRect(),a=gs(t,o);if(!a||a<=0)return n;let l=r/a;if(Math.abs(l-1)<1e-4)return n;let c=o.left+o.width/2,u=o.top+o.height/2;return ys(n,c,u,l)}function jr(e,n,t){let r=e.top,o=e.left,a=n-(e.left+e.width),l=t-(e.top+e.height);return `inset(${r}px ${a}px ${l}px ${o}px)`}function to(e,n){let t=document.createElement("div");return Object.assign(t.style,{position:"fixed",inset:"0",clipPath:e,willChange:"clip-path",transition:"none",pointerEvents:"none",zIndex:String(n)}),t}function ai(e){if(!(e instanceof HTMLElement))return false;let n=getComputedStyle(e);if(n.display==="none"||n.visibility==="hidden"||Number.parseFloat(n.opacity||"1")<=0||n.position!=="sticky"&&n.position!=="fixed")return false;let t=e.getBoundingClientRect();return !(t.width<=0||t.height<=0||t.bottom<=0||t.top>=window.innerHeight||t.top>Math.min(window.innerHeight*.25,120))}function li(e,n){return Math.min(e.right,n.right)>Math.max(e.left,n.left)}function bs(e,n){let t=e?.trim(),o=t?Array.from(document.querySelectorAll(t)):[".rmg-intro-sticky-nav",'[data-rmg-intro-sticky-nav="true"]','header[role="banner"]',"header"].flatMap(c=>Array.from(document.querySelectorAll(c))),a=null,l=-1/0;for(let c of o){if(!ai(c))continue;let u=c.getBoundingClientRect();n&&!li(u,n)||u.bottom>l&&(l=u.bottom,a=c);}if(a||t)return a;for(let c of Array.from(document.body.querySelectorAll("*"))){if(!ai(c))continue;let u=c.getBoundingClientRect();n&&!li(u,n)||u.bottom>l&&(l=u.bottom,a=c);}return a}function hs(e,n){let t=Math.max(window.innerHeight||0,document.documentElement?.clientHeight||0),r=Math.min(Math.max(n,0),t),o=e.left,a=e.right,l=Math.max(e.top,r),c=e.bottom;return c<=l||a<=o?null:new DOMRect(o,l,a-o,c-l)}function vs(e){return e?[e.overflow,e.overflowX,e.overflowY].some(n=>{let t=n?.trim().toLowerCase()??"";return t==="hidden"||t==="clip"}):false}function Rs(e,n=2){let t=[],r=e?.parentElement??null;for(;r&&r!==document.body&&r!==document.documentElement&&t.length<n;){if(vs(getComputedStyle(r))){let o=Sr(r)??r.getBoundingClientRect();o.width>0&&o.height>0&&t.push(o);}r=r.parentElement;}return t}function Ss({DURATION_MS:e,EASING:n}){let t=document.createElement("div");return Object.assign(t.style,{position:"fixed",inset:"0",clipPath:"inset(0px 0px 0px 0px)",willChange:"clip-path",pointerEvents:"none",transition:`clip-path ${e}ms ${n}`,zIndex:"9998",background:"transparent"}),document.body.appendChild(t),t.offsetWidth,t}function ci(e){let n=window.innerWidth,t=window.innerHeight,r=e.top,o=e.left,a=n-(e.left+e.width),l=t-(e.top+e.height);return `inset(${Dr(r)} ${Dr(a)} ${Dr(l)} ${Dr(o)})`}async function Es(e,n,t,r,o){let a=n.current;if(!a||!t.current?.length)return null;let l=fs(a);if(!l)return null;let c=si(a,l,e);if(!c)return null;ro(c,l,false)||oo(e,t,r,o)&&(await ui(),c=si(a,l,e)??c);let p=Sr(c)??c.getBoundingClientRect(),x=c.querySelector("img"),W=x?getComputedStyle(x):null,h=a$9(W?.objectPosition??null)??{x:.5,y:.5},j=Sr(x)??x?.getBoundingClientRect()??null,A=j?j.width:0,P=j?j.height:0;return {cropRect:p,imgEl:x,objPos:h,renderedW:A,renderedH:P,renderedRect:j}}function oo(e,n,t,r){let o=n.current,a=ms(e,o);return a<0?false:(r(a,"instant"),t?.(),true)}async function Ms(e){try{let n=e.videoWidth||Math.round(e.getBoundingClientRect().width)||1,t=e.videoHeight||Math.round(e.getBoundingClientRect().height)||1;if(!n||!t);let r=document.createElement("canvas");r.width=n,r.height=t;let o=r.getContext("2d");if(!o)return null;o.drawImage(e,0,0,n,t);let a=r.toDataURL("image/png"),l=new Image;return l.decoding="async",l.src=a,await l.decode().catch(()=>{}),l}catch{return null}}function ws(e){if(!e)return null;let n=e.querySelector("video");if(n?.poster)return n.poster;let t=e.querySelector(".plyr__poster");if(t){let r=getComputedStyle(t).backgroundImage,o=r&&/url\(["']?(.*?)["']?\)/.exec(r);if(o?.[1])return o[1]}return null}async function xs(e,n){let t=await Ms(e);if(t)return t;let r=ws(n),o=new Image;if(o.decoding="async",r){o.src=r;try{await o.decode();}catch{}}else {let a=e.videoWidth||1,l=e.videoHeight||1,c=document.createElement("canvas");c.width=Math.max(1,a),c.height=Math.max(1,l),o.src=c.toDataURL("image/png");}return o}function Ts(e){if(!e)return {x:.5,y:.5};let n=getComputedStyle(e);return a$9(n?.objectPosition??null)}function Cs(e,n){e.decoding="async",e.loading="eager",e.draggable=false,e.style.pointerEvents="none",e.style.objectFit="cover",e.style.objectPosition=`${Math.round(n.x*100)}% ${Math.round(n.y*100)}%`;}function Fs(e,n=.4){let t=e.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight,o=Math.min(t.bottom,r)-Math.max(t.top,0);return o<=0?false:o>=t.height*n}function Os(e){let n=Number.isFinite(e.rectTop)?e.rectTop:0,t=Number.isFinite(e.rectHeight)?Math.max(0,e.rectHeight):0,r=Number.isFinite(e.scrollY)?e.scrollY:0,o=Number.isFinite(e.viewportHeight)&&e.viewportHeight>0?e.viewportHeight:t,a=Number.isFinite(e.viewportOffsetTop)?Math.max(0,e.viewportOffsetTop??0):0,l=Number.isFinite(e.maxScrollY)&&e.maxScrollY!=null?Math.max(0,e.maxScrollY):Number.POSITIVE_INFINITY,c=r+n-a-(o-t)/2;return Math.min(Math.max(0,c),l)}function io(){return window.scrollY||document.documentElement.scrollTop||0}function Is(){let e=document.scrollingElement??document.documentElement,n=window.innerHeight||document.documentElement.clientHeight||0,t=document.body?.scrollHeight??0,r=Math.max(e.scrollHeight,t);return Math.max(0,r-n)}function Ls(e){let n=document.documentElement,t=document.body,r=n.style.scrollBehavior,o=t?.style.scrollBehavior??"";n.style.scrollBehavior="auto",t&&(t.style.scrollBehavior="auto");try{window.scrollTo(window.scrollX||0,e);}finally{n.style.scrollBehavior=r,t&&(t.style.scrollBehavior=o);}}async function Hs(e){let n=io(),t=0;for(let r=0;r<8;r+=1){await Wr(1);let o=io(),a=Math.abs(o-e)<=1,l=Math.abs(o-n)<=.5;if(a||l){if(t+=1,t>=2)break}else t=0;n=o;}await Wr(1);}async function no(e){if(!e)return false;let n=e.getBoundingClientRect(),t=io(),r=window.visualViewport,o=r?.height||window.innerHeight||document.documentElement.clientHeight||n.height,a=r?.offsetTop??0,l=Is(),c=Os({rectTop:n.top,rectHeight:n.height,scrollY:t,viewportHeight:o,viewportOffsetTop:a,maxScrollY:l});return Math.abs(c-t)>1?(Ls(c),await Hs(c),true):(await Wr(1),false)}async function Ps({fsSliderEl:e,nodeIdx:n,thumbCropRect:t,endClipRect:r,endObjPos:o,captionClone:a,trackStyleMutation:l,trackMutedMutation:c,safeTeardown:u,onCaptionCloneGone:p,DURATION_MS:x,EASING:W}){let h=e.querySelector(`.rmg__player[data-index="${n}"]`)||e.querySelector(".rmg__player")||null,j=h?.querySelector("video"),A=h?.getBoundingClientRect?.()||j?.getBoundingClientRect?.();if(!A){u();return}if(h){ds(h,l),l(h,"visibility","hidden"),l(h,"opacity","0");let $=h.querySelector(".plyr__poster");l($,"opacity","0");let X=h.querySelector(".plyr__controls");l(X,"opacity","0");}if(j){try{j.pause();}catch{}c(j,true);}let P=j||h?.querySelector("video");if(!P){u();return}let v=await xs(P,h);Cs(v,o);let w=v.naturalWidth||1,S=v.naturalHeight||1,K=Ts(j),H=b$3(w,S,A,K),D=b$3(w,S,t,o),I=v;Object.assign(I.style,{position:"fixed",left:"0",top:"0",width:`${w}px`,height:`${S}px`,maxWidth:"none",maxHeight:"none",transformOrigin:"50% 50%",willChange:"transform",zIndex:"2147483601",opacity:"1",transition:"none"}),I.style.transform=`translate3d(${H.cx}px, ${H.cy}px, 0) translate3d(${-w/2}px, ${-S/2}px, 0) scale(${H.scale})`;let f=Ss({DURATION_MS:x,EASING:W});f.style.clipPath=ci(A),f.appendChild(I),I.offsetWidth,f.offsetWidth;let N=()=>{if(a){try{a.remove();}catch{}p?.();}try{document.body.removeChild(f);}catch{}try{I.remove();}catch{}u();},Z=$=>{$.propertyName==="transform"&&(I.removeEventListener("transitionend",Z),N());};requestAnimationFrame(()=>{f.style.clipPath=ci(r??t),I.style.transition=`transform ${x}ms ${W}`,I.style.transform=`translate3d(${D.cx}px, ${D.cy}px, 0) translate3d(${-w/2}px, ${-S/2}px, 0) scale(${D.scale})`,I.addEventListener("transitionend",Z,{once:true}),window.setTimeout(()=>{I.removeEventListener("transitionend",Z),N();},x+120);});}var di=({children:e,fsSub:n,open:t,onClose:r,isClick:o,isAnimating:a,overlayDivRef:l,closeButtonRef:c,counterRef:u,leftChevronRef:p,rightChevronRef:x,cells:W,setShowFullscreenSlider:h,cellCount:j,setClosingModal:A,slides:P,slider:v,wrappedItems:w,centerSlider:S,setSliderIndex:K,onForceResetZoom:H,layout:D,expandableImageRefs:I,resolveLayoutlessTarget:f,entryMapRef:N,entryMediaLayout:Z,introFade:$,introDuration:X=300,introEasing:re="cubic-bezier(.4,0,.22,1)",requestFsCloseRef:ve,cancelFsCloseRef:ce,fs:T,styles:_,syncFullscreenSourceFromIndex:ue,baseZ:te,rootRef:We,introMethod:Yt,setLatchedIntroMethod:Y,latchedIntroIndex:Ve})=>{let de=X,pe=re,Re=F__default.useRef(null),Dt=F__default.useRef(0),Ut=F__default.useRef(0),ie=te??9999,Xe=F__default.useCallback(d=>{Re.current=d,We&&(We.current=d);},[We]),Ie=F__default.useRef(null),Le=F__default.useRef([]),Se=F__default.useRef(new WeakMap),xt=F__default.useRef(false),qe=F__default.useRef(false),J=F__default.useRef(null),ft=F__default.useCallback(()=>{for(let d=Le.current.length-1;d>=0;d-=1){let b=Le.current[d];if(b.kind==="style"){b.el.style[b.prop]=b.prevValue;continue}b.el.muted=b.prevValue;}Le.current=[],Se.current=new WeakMap;},[]);function De(){if(Ie.current)return;let d=document.createElement("div");d.setAttribute("data-rmg-fs-shield","true"),Object.assign(d.style,{position:"fixed",inset:"0",zIndex:String(ie+5),background:"transparent",pointerEvents:"auto",touchAction:"none",cursor:"default"});let b=q=>{q.preventDefault?.(),q.stopPropagation?.();};d.addEventListener("pointerdown",b,{capture:true}),d.addEventListener("pointerup",b,{capture:true}),d.addEventListener("pointermove",b,{capture:true}),d.addEventListener("click",b,{capture:true}),d.addEventListener("dblclick",b,{capture:true}),d.addEventListener("contextmenu",b,{capture:true}),d.addEventListener("touchstart",b,{capture:true,passive:false}),d.addEventListener("touchmove",b,{capture:true,passive:false}),d.addEventListener("touchend",b,{capture:true,passive:false}),d.addEventListener("wheel",b,{capture:true,passive:false}),d.addEventListener("keydown",b,{capture:true}),document.body.appendChild(d),Ie.current=d;}function ke(){let d=Ie.current;if(d){try{d.remove();}catch{}Ie.current=null;}}function Kt(d){let b=Re.current;if(b){if(d){b.setAttribute("data-rmg-fs-closing","true");return}b.removeAttribute("data-rmg-fs-closing");}}useEffect(()=>()=>{ce.current&&(ce.current=null),xt.current=false,qe.current=false,J.current=null,ke();},[ce]);function mn(d){let b=Re.current;return b?b.querySelector(d):null}function be(d,b,q){if(!d)return;let fe=Se.current.get(d);fe||(fe=new Set,Se.current.set(d,fe));let z=`style:${b}`;fe.has(z)||(fe.add(z),Le.current.push({kind:"style",el:d,prop:b,prevValue:d.style[b]??""})),(d.style[b]??"")!==q&&(d.style[b]=q);}function Wn(d,b){if(!d)return;let q=Se.current.get(d);q||(q=new Set,Se.current.set(d,q));let fe="media:muted";q.has(fe)||(q.add(fe),Le.current.push({kind:"muted",el:d,prevValue:d.muted})),d.muted!==b&&(d.muted=b);}let tt=F__default.useCallback(()=>{let d=Re.current;d&&(d.style.transition="",d.style.willChange="");let b=d?.querySelector(".fullscreen_slider")??null;b&&(b.style.willChange="");},[]);function Jt(d,b){let q=Math.max(1,b);return (d%q+q)%q}useEffect(()=>{if(!t)return;let d=b=>{b.key==="Escape"&&(b.preventDefault(),b.stopPropagation(),Nt());};return window.addEventListener("keydown",d,{capture:true}),()=>window.removeEventListener("keydown",d,{capture:true})},[t]),useLayoutEffect(()=>{ft(),t||tt();},[t,ft,tt]);function Jn(d,b){if(b<=1)return 0;let q=Jt(d,b),fe=q+1,z=mn(".fullscreen_slider");if(!z)return fe;let xe=Array.from(z.querySelectorAll(`[data-rmg-fs-slide="true"][data-rmg-canonical-idx="${q}"]`));if(!xe.length)return fe;let nt=(Re.current??z).getBoundingClientRect(),je=(nt.left+nt.right)/2,pn=(nt.top+nt.bottom)/2,en=null,se=Number.POSITIVE_INFINITY;for(let Wt of xe){let Te=Wt.getBoundingClientRect(),he=(Te.left+Te.right)/2,st=(Te.top+Te.bottom)/2,at=Math.abs(he-je)+Math.abs(st-pn);at<se&&(en=Wt,se=at);}let Ot=en?.getAttribute("data-index"),rt=Ot!=null?parseInt(Ot,10):NaN;return Number.isFinite(rt)?rt:fe}function Tt(d,b){if(!d)return null;let q=d.querySelector(`[data-index="${b}"]`)??null,z=(q?q.closest('[data-rmg-fs-slide="true"]'):null)?.querySelector('[data-rmg-fs-caption="true"]')??null;if(!z)return null;let xe=z.getBoundingClientRect(),Ge=z.cloneNode(true);return Object.assign(Ge.style,{position:"fixed",left:`${Math.round(xe.left)}px`,top:`${Math.round(xe.top)}px`,width:`${Math.round(xe.width)}px`,height:`${Math.round(xe.height)}px`,margin:"0",transform:"none",zIndex:"2147483602",pointerEvents:"none"}),document.body.appendChild(Ge),be(z,"visibility","hidden"),Ge}function wn(){[p.current,x.current,u.current,c.current].forEach(b=>{b&&b.classList.remove(_.open);});}function Qn(d,b,q,fe){if(fe){d.querySelectorAll("[data-index]").forEach(z=>{z.dataset.index!==String(b)&&(be(z,"transition","opacity 0.3s cubic-bezier(.4,0,.22,1)"),be(z,"opacity","0"));});return}d.querySelectorAll('[data-rmg-fs-slide="true"]').forEach(z=>{q&&z.contains(q)||(be(z,"transition","opacity 0.3s cubic-bezier(.4,0,.22,1)"),be(z,"opacity","0"));});}function Vn(){let d=l.current;if(!d)return;let b=Number.parseFloat(getComputedStyle(d).opacity),q=Number.isFinite(b)?b:1;d.style.transition="none",d.style.opacity=String(q),d.offsetWidth,d.style.transition=`opacity ${de}ms ${pe}`,requestAnimationFrame(()=>{d.style.opacity="0",d.style.pointerEvents="none";});}function Qt(d,b,q={}){if(!d)return;let fe=Number.parseFloat(getComputedStyle(d).opacity),z=Number.isFinite(fe)?fe:1;d.style.transition="none",d.style.opacity=String(z),d.offsetWidth,d.style.transition=`opacity ${de}ms ${pe}`,d.style.willChange="opacity",requestAnimationFrame(()=>{d.style.opacity=String(b),q.pointerEvents!=null&&(d.style.pointerEvents=q.pointerEvents);});}function an(d){return d?d.kind==="video"||/\.(mp4|webm|ogg)$/i.test(d.src||""):false}function it(){return xt.current?false:(xt.current=true,qe.current=false,J.current=null,ce.current=()=>{xt.current&&Ee();},De(),Kt(true),a.current=false,o.current=false,W.current=[],true)}function jt(){return qe.current?false:(qe.current=true,A(true),true)}function ln(){jt(),wn(),Vn();let d=Re.current,b=false,q,fe,z=()=>{b||(b=true,d?.removeEventListener("transitionend",xe),q!==void 0&&window.clearTimeout(q),fe!==void 0&&window.clearTimeout(fe),ce.current===Ge&&(ce.current=null),Ee());},xe=je=>{je.target!==d||je.propertyName!=="opacity"||z();},Ge=()=>{b||(b=true,d?.removeEventListener("transitionend",xe),q!==void 0&&window.clearTimeout(q),fe!==void 0&&window.clearTimeout(fe),ce.current===Ge&&(ce.current=null),Ee());};ce.current=Ge;let nt=mn(".fullscreen_slider");nt&&Qt(nt,0),d&&(d.addEventListener("transitionend",xe,{once:true}),Qt(d,0,{pointerEvents:"none"})),q=window.setTimeout(()=>{ke();},us(de)),fe=window.setTimeout(()=>{z();},de+40);}async function Nt(){if(!t||!it())return;let d=w.slice(1,-1);if(!d.length){Ee();return}let b=n.get(),q=Jt(b,d.length),fe=!D||D==="grid"||D==="masonry"||Z==="grid"||Z==="masonry",z=E=>E?E instanceof HTMLImageElement?{host:E.closest("[data-rmg-idx], .rmg__grid-item, .rmg__masonry-item, .rmg__slide")??E.parentElement,image:E}:E instanceof HTMLElement?{host:E,image:E.querySelector("img")??null}:{host:null,image:null}:{host:null,image:null},xe=E=>{let B=I.current?.[E]??null,oe=B&&typeof B=="object"&&"current"in B?B.current:B;return z(oe)},Ge=E=>W.current?.find(B=>B.index===E)?.element??null,nt=E=>{let B=xe(E),oe=f(E),ye=B.image??oe.image;return ye||(ye=(Ge(E)??document.querySelector(`[data-rmg-idx="${E}"]`))?.querySelector("img")??null),ye},je=E=>{let B=Sr(E)??E.getBoundingClientRect(),oe=getComputedStyle(E),ye=a$9(oe?.objectPosition??null)??{x:.5,y:.5};if((oe?.objectFit??"cover")!=="contain")return {cropRect:B,objPos:ye};let $e=Math.max(1,E.naturalWidth||0),Ke=Math.max(1,E.naturalHeight||0);return {cropRect:d$4($e,Ke,B,"contain",ye),objPos:ye}},pn=E=>{let B=E.destImg?Sr(E.destImg)??E.destImg.getBoundingClientRect():E.thumbCropRect,ye=bs(T.effects?.introStickyNavSelector,B)?.getBoundingClientRect();return ye?hs(E.thumbCropRect,ye.bottom)??E.thumbCropRect:E.thumbCropRect},en=async E=>{let B=mn(".fullscreen_slider");if(!B){Ee();return}let oe=Jn(q,j),ye=E.isVideoSlide?null:B.querySelector(`[data-rmg-fs-slide="true"][data-index="${oe}"]`)??null,lt=E.isVideoSlide?null:ye?.querySelector('[data-rmg-fs-media="true"]')??null,$e=E.isVideoSlide?null:a$5(lt);if(!$e&&!E.isVideoSlide){Ee();return}let Ke=pn({thumbCropRect:E.thumbCropRect,destImg:E.destImg});jt(),wn(),Vn(),Qn(B,oe,$e,E.isVideoSlide);let Ue=Tt(B,oe);if(Ue&&(Ue.style.transition=`opacity ${de}ms ${pe}`,Ue.offsetWidth,Ue.style.opacity="0"),E.isVideoSlide){await Ps({fsSliderEl:B,nodeIdx:oe,thumbCropRect:E.thumbCropRect,endClipRect:Ke,endObjPos:E.endObjPos??{x:.5,y:.5},captionClone:Ue,trackStyleMutation:be,trackMutedMutation:Wn,safeTeardown:Ee,DURATION_MS:de,EASING:pe});return}let me=$e,Q=me.parentNode||null,un=me.nextSibling||null,It=getComputedStyle(me),St=a$9(It?.objectPosition??null)??{x:.5,y:.5},Lt=It?.objectFit||"contain",Et=me.getBoundingClientRect(),Ht=Math.max(1,me.naturalWidth||Math.round(Et.width)||1),Pt=Math.max(1,me.naturalHeight||Math.round(Et.height)||1),nn=Lt==="contain"?c$3(Ht,Pt,Et,St):b$3(Ht,Pt,Et,St),pt=b$3(Ht,Pt,E.thumbCropRect,E.endObjPos),Cn=Rs(E.destImg??null,2),kt=Cn[0]??null,$t=Cn[1]??null,Bt=ie+1,_t=document.documentElement.clientWidth,Pe=window.innerHeight,Be=to(jr(Et,_t,Pe),Bt),yt=kt?to("inset(0px 0px 0px 0px)",Bt):null,ct=$t?to("inset(0px 0px 0px 0px)",Bt):null,_n={position:me.style.position,left:me.style.left,top:me.style.top,width:me.style.width,height:me.style.height,maxWidth:me.style.maxWidth,maxHeight:me.style.maxHeight,transformOrigin:me.style.transformOrigin,transform:me.style.transform,transition:me.style.transition,willChange:me.style.willChange,zIndex:me.style.zIndex,pointerEvents:me.style.pointerEvents};Object.assign(me.style,{position:"fixed",left:"0",top:"0",width:`${Ht}px`,height:`${Pt}px`,maxWidth:"none",maxHeight:"none",transformOrigin:"50% 50%",willChange:"transform",transition:"none",zIndex:"1",pointerEvents:"none"}),Be.appendChild(me),yt?(yt.appendChild(Be),ct&&ct.appendChild(yt)):ct&&ct.appendChild(Be);let zn=ct??yt??Be;document.body.appendChild(zn),me.style.transform=`translate3d(${nn.cx}px, ${nn.cy}px, 0) translate3d(${-Ht/2}px, ${-Pt/2}px, 0) scale(${nn.scale})`,me.offsetWidth,Be.offsetWidth,yt?.offsetWidth,ct?.offsetWidth,Be.style.transition=`clip-path ${de}ms ${pe}`,yt&&(yt.style.transition=`clip-path ${de}ms ${pe}`),ct&&(ct.style.transition=`clip-path ${de}ms ${pe}`),me.style.transition=`transform ${de}ms ${pe}`,requestAnimationFrame(()=>{Be.style.clipPath=jr(Ke,_t,Pe),yt&&kt&&(yt.style.clipPath=jr(kt,_t,Pe)),ct&&$t&&(ct.style.clipPath=jr($t,_t,Pe)),me.style.transform=`translate3d(${pt.cx}px, ${pt.cy}px, 0) translate3d(${-Ht/2}px, ${-Pt/2}px, 0) scale(${pt.scale})`;});let gt=false,rn=()=>{if(!gt){gt=true,me.removeEventListener("transitionend",Fn);try{Q&&(un?Q.insertBefore(me,un):Q.appendChild(me));}catch{}Object.assign(me.style,_n);try{zn.remove();}catch{}Ee();}},Fn=On=>{On.propertyName==="transform"&&rn();};me.addEventListener("transitionend",Fn,{once:true}),window.setTimeout(()=>rn(),de+80);},se=q,Ot=q,rt=null;async function Wt(){!v.current||!P.current?.length||oo(Ot,P,S,K)&&v.current.offsetWidth;}let Te=async(E={})=>{if(D!=="entries"||!N?.current)return;let B=N.current[se];if(!B)return;if(Ot=B.mediaIndex,E.scrollPage!==false)await kr(B.entryIndex);else if(!An(B.entryIndex)){ue(se);return}if(!await Ar(B.entryIndex))return;let lt=document.querySelector(`[data-rmg-entry-owner="${B.entryIndex}"]`);if(lt){for(let $e of Array.from(lt.children)){let Ke=$e;Ke.hasAttribute("data-rmg-entry-skeleton")?(Ke.style.setProperty("transition","none"),Ke.style.setProperty("opacity","0")):(Ke.style.setProperty("transition","none"),Ke.style.setProperty("opacity","1"));}await new Promise($e=>requestAnimationFrame(()=>$e()));}ue(se);},he=null;if(!fe&&D==="entries"&&N?.current){let E=N.current[se];if(E){let B=document.querySelector(`[data-rmg-entry-owner="${E.entryIndex}"]`);if(B?.style.setProperty("--rmg-entry-intro-duration","0ms"),B?.style.setProperty("--rmg-entry-intro-delay","0ms"),B?.style.setProperty("--rmg-entry-skeleton-exit-duration","0ms"),!An(E.entryIndex)){let oe=document.createElement("div");oe.className=_.spinner,oe.style.position="fixed",oe.style.zIndex=String(ie+10),oe.style.setProperty("opacity","1","important"),oe.style.setProperty("visibility","visible","important"),document.body.appendChild(oe),he=oe;}}}if(fe){let E=f(se),B=xe(se),oe=E.host??E.media??B.host??Ge(se)??document.querySelector(`[data-rmg-idx="${se}"]`)??null,ye=ii({closeScroll:T.closeScroll,index:se,layout:D,target:oe}),lt=ye.enabled&&ye.timing==="before-close";ye.enabled&&ye.timing==="after-close"&&oe&&(J.current=()=>no(oe)),lt&&await no(oe),await Te({scrollPage:lt}),rt=nt(se),rt&&!Fs(rt,.05)&&(rt=null);}else {let E=null,B=null;if(D==="entries"&&N?.current){let ye=N.current[se];ye&&(B=document.querySelector(`[data-rmg-entry-owner="${ye.entryIndex}"]`),E=ii({closeScroll:T.closeScroll,index:se,layout:D,target:B}),E.enabled&&E.timing==="after-close"&&B&&(J.current=()=>no(B)));}let oe=!E||E.enabled&&E.timing==="before-close";if(await Te({scrollPage:oe}),he){he.style.setProperty("opacity","0","important");let ye=he;setTimeout(()=>{try{ye.remove();}catch{}},200),he=null;}if(!v.current||!P.current?.length){Ee();return}}let st=d[se],at=an(st),Ye=Jt(Ve,d.length)===se;if(as({introFade:$,isVideoSlide:at,introMethod:Yt,isLatchedIntroIndex:Ye,hasTransformTarget:!at&&(!fe||!!rt)})){await Wt(),ln();return}if(!fe){if(!v.current||!P.current?.length){Ee();return}let E=async()=>{let B=await Es(Ot,v,P,S,K);if(!B){Ee();return}let oe=B.cropRect,ye=B.objPos??{x:.5,y:.5};if(B.imgEl){let{cropRect:lt,objPos:$e}=je(B.imgEl);oe=lt,ye=$e;}await en({thumbCropRect:oe,endObjPos:ye,isVideoSlide:false,destImg:B.imgEl});};if(!oo(Ot,P,S,K)){Ee();return}await ui(),await E();return}if(!I?.current){Ee();return}let mt=rt??nt(se);if(!mt){Ee();return}let{cropRect:Xt,objPos:Vt}=je(mt);await en({thumbCropRect:Xt,endObjPos:Vt,isVideoSlide:false,destImg:mt});}useEffect(()=>(ve.current=()=>{Nt();},()=>{ve.current&&(ve.current=null);}),[ve,Nt]);function Ee(){let d=J.current;J.current=null,ce.current&&(ce.current=null),xt.current=false,qe.current=false,ke(),Kt(false);let b=mn(".fullscreen_slider");b&&b.style.removeProperty("transition");let q=Re.current;q&&q.style.removeProperty("transition"),$||(b&&(b.style.opacity="0"),q&&(q.style.opacity="0",q.style.pointerEvents="none")),l.current?.remove(),l.current=null,H(),r(),h(false),A(false),Y(null),d&&typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>{d();});}let cn=T?.controls?.close?.enabled!==false,$n=()=>{Nt();},er=typeof T?.controls?.close?.render=="function"?T?.controls?.close.render():null;function xn(d,b){return Jt(d,b)}let Tn=Math.max(0,w.length-2),Ct=xn(n.get(),Math.max(1,Tn)),tr=T?.controls?.counter?.enabled!==false&&j>1,Bn=typeof T?.controls?.counter?.render=="function"?T.controls.counter.render({index:Ct,count:j}):null;return jsxs("div",{ref:Xe,"data-rmg-fs-root":"true",onPointerDown:d=>{Dt.current=d.clientX,Ut.current=d.clientY;},className:"fs_modal",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",opacity:t?1:0,pointerEvents:t?"auto":"none",zIndex:ie,"--rmg-fs-z":ie,display:"block",touchAction:"none",userSelect:"none",WebkitUserSelect:"none",contain:"layout style size",overflow:"hidden"},children:[cn&&jsx("button",{ref:c,type:"button","aria-label":"Close",onClick:()=>$n(),className:[_?.closeBtn,T?.controls?.close?.className??"",t?_.open:""].filter(Boolean).join(" "),style:{...T?.controls?.close?.style},children:er??jsx(ni,{})}),tr&&jsx("div",{ref:u,className:[_?.counter,T?.controls?.counter?.className??"",t?_.open:""].filter(Boolean).join(" "),style:{...T?.controls?.counter?.style??{}},children:Bn??jsx(ri,{index:Ct,count:j})}),e]})};function mi({side:e}){return jsx("svg",{viewBox:"0 0 16 16",width:"100%",height:"100%",focusable:"false","aria-hidden":"true",style:{display:"block"},children:jsx("polygon",{points:"4.586,3.414 9.172,8 4.586,12.586 6,14 12,8 6,2",fill:"white",stroke:"#4f4f4f",strokeWidth:"0.5"})})}var Vs=e=>1-Math.pow(1-e,3);function yi(e,n){return a$3({ownerWindow:n,axis:e})}function $s(e){let{trigger:n,isZoomed:t}=e;return (e.controls??e.controlsFade??false)&&n!=="drag"&&t}function Bs(e){let{showFullscreenSlider:n,busy:t,trigger:r,mode:o="animated",hasCrossfadeSlides:a,fromIndex:l,toIndex:c}=e,u=e.controls??e.controlsFade??false,p=e.drag??e.dragFade??false,x=e.wheel??false;return !n||t||!a||l===c?false:r==="wheel"?x:r==="requestSet"&&o==="instant"?false:r==="drag"?p:u}function _s(e){return a$6(e)}var ao=forwardRef(({sub:e$3,children:n,cellCount:t,slideIndex:r,isClick:o,isZoomed:a$3,windowSize:l,show:c$2,handleZoomToggle:u,imageRefs:p,cells:x,isPinching:W,isTouchPinching:h$1,showFullscreenSlider:j$1,isZooming:A,plyrRefs:P,closingModal:v,counterRef:w,leftChevronRef:S,rightChevronRef:K,overlayDivRef:H,direction:D,sliderGap:I=0,sliderDuration:f$3,sliderFriction:N,skipSnaps:Z,strictSnaps:$,suppressLoopRef:X,fadeOpening:re,introFade:ve,controlsFade:ce=false,dragFade:T=false,slideFadeDuration:_=120,slideFadeEasing:ue="cubic-bezier(.4,0,.22,1)",normalizedItems:te,crossfadeSlides:We,introDuration:Yt=300,introEasing:Y="cubic-bezier(.4,0,.22,1)",resetAllZoomDom:Ve,requestFsCloseRef:de,introMethod:pe,fs:Re,chromeStyles:Dt},Ut)=>{let ie=D==="rtl",Xe=ie?a.rtl:"",Ie=ie?-1:1,Le=useRef(null),Se=useRef(null),xt=useRef(null),qe=useRef(null),J=useRef(null),ft=useRef(null),De=useRef(null),ke=useRef(null),Kt=useRef(null),He=useRef(null),Nn=useRef(false),Ze=useRef(false),M=useRef(0),wr=5,mn=300,be=useRef(0),Wn=useRef(false),tt=useRef(0),Jt=useRef(0),Jn=useRef(null),Tt=useRef(null),wn=useRef([]),Qn=useRef(0),Vn=useRef(null),Qt=useRef(null),an=useRef(null),it=useRef([]),jt=useRef(null),ln=useRef(null),Nt=useRef(false),Ee=useRef(false),cn=useRef(false),$n=useRef(false),er=useRef(false),xn=useRef(0),Tn=useRef(0),Ct=useRef(0),Ft=useRef(0),tr=useRef(0),Bn=useRef(0),d$2=useRef(0),b$3=useRef(null),q=useRef(0),fe=useRef(0),z=useRef(0),xe=useRef(0),Ge=useRef(false),nt=useRef(0),je=useRef(1),pn=a$1(I),en=useRef(e$3.get()),se=useRef("none"),Ot=useRef(null),rt=useRef(null),Wt=useRef(null),Te=useRef(null),[he,st]=useState(null),[at,yn]=useState(null),Ye=useRef(null),tn=useRef(0),mt=useRef(null),Xt=useRef(null),Vt=useRef(null),E=useRef(j$1);E.current=j$1;let B=useRef(T);B.current=T;let oe=useRef(We);oe.current=We;let ye=useRef(false);function lt(...i){return i.filter(Boolean).join(" ")}function $e(i){return i?.style??void 0}function Ke(i){return i?.className??""}function Ue(i,s){return i==="left"?s?"next":"prev":s?"prev":"next"}let me=Re?.controls?.arrows?.enabled!==false&&t>1,Q=Re?.controls?.arrows,un=(i,s)=>{let m=i==="prev"?typeof Q?.renderPrev=="function"?Q.renderPrev():null:typeof Q?.renderNext=="function"?Q.renderNext():null;if(m!=null)return m;if(typeof Q?.render=="function"){let g=Q.render({dir:i});if(g!=null)return g}return jsx(mi,{side:s})};function It(i){let s=useRef(i);return useEffect(()=>{s.current=i;},[i]),s}let St=It(a$3);useEffect(()=>{Ye.current=he;},[he]);let{wheelLockMs:Lt,lockWheelFor:Et,unlockWheelNow:Ht,markWheelSeen:Pt,isWheelLocked:nn}=j();function pt(i){return (i?.clientWidth||1)+pn}function Cn(i,s){let m=s||1,g=i*m;tt.current=i,Jt.current=g,Qn.current=g;let L=d(-g,0);Jn.current=L,Vn.current=g$1(-g,0);let G=Array.from({length:m},(Oe,ht)=>-i*ht);wn.current=G;let U=qe.current,k=J.current,ne=ft.current,Me=De.current;if(!U||!k||!ne||!Me){Qt.current=null,Tt.current=null;return}Qt.current=c$1(true,G,g,L,Me),Tt.current=b$2(g,L,U,[U,k,ne,Me]);}let kt=useCallback(()=>{let i=Se.current;if(!i||!qe.current||!J.current||!ft.current||!De.current)return;let s=pt(i),m=it.current.length||1;Cn(s,m);let g=jt.current?.get()??be.current??0,L=-s*g;At(L),ae(L,0),He.current?.resetBlend();},[]);useEffect(()=>{let i=Se.current;if(!i)return;let s=()=>{kt();};s();let m=new ResizeObserver(s);return m.observe(i),()=>m.disconnect()},[c$2,kt]),useEffect(()=>{let i=Children.toArray(n);if(it.current=[],t>1)for(let s=1;s<i.length-1;s++)it.current.push({cells:[x.current[s]]});else for(let s=0;s<i.length;s++)it.current.push({cells:[x.current[s]]});},[n]);function $t(i){en.current!==i&&(en.current=i,e$3.setLocalIndex(i));}function Bt(i,s={}){let{publishVisible:m=true,resetZoom:g=true}=s;be.current=i,jt.current?.set(i),m&&$t(i),fr(i),g&&Ve();}let _t="data-rmg-global-drag",Pe="rmg-global-drag-style";function Be(){if(document.getElementById(Pe))return;let i=document.createElement("style");i.id=Pe,i.textContent=`
|
|
2
|
+
html[${_t}] * { cursor: grabbing !important; }
|
|
3
|
+
html[${_t}] { cursor: grabbing !important; }
|
|
4
|
+
`,document.head.appendChild(i);}function yt(i){let s=document.documentElement;s&&(i?s.setAttribute(_t,""):s.removeAttribute(_t));}function ct(){let i=useRef(null),s=()=>{i.current||(Be(),yt(true),i.current=g().add(window,"mouseup",m,true).add(window,"pointerup",m,true).add(window,"touchend",m,{passive:true}).add(window,"touchcancel",m,{passive:true}).add(window,"blur",m,true).add(document,"visibilitychange",()=>{document.hidden&&m();}));},m=()=>{i.current?.clear(),i.current=null,yt(false);};return useEffect(()=>m,[]),{start:s,stop:m}}let{start:_n,stop:zn}=ct(),gt=useRef(false),rn=_,Fn=ue;function On(){mt.current!=null&&(cancelAnimationFrame(mt.current),mt.current=null),Xt.current!=null&&(cancelAnimationFrame(Xt.current),Xt.current=null),Vt.current!=null&&(window.clearTimeout(Vt.current),Vt.current=null);}function Mt(i,s={}){On(),gt.current=false;let m=()=>{typeof i!="number"&&(Ye.current=null),yn(null),st(g=>g?typeof i=="number"&&g.id!==i?(Ye.current=g,g):(Ye.current=null,null):null);};if(s.sync&&Ye.current){flushSync(m);return}m();}function qn(i){let m=-zt()*i;He.current?.stop(),ke.current?.useDuration(0).useFriction(1),At(m),ae(m,0),He.current?.resetBlend();}function nr(){let i=ft.current?.get()??qe.current?.get()??Ct.current;He.current?.stop(),Nn.current=false,ke.current?.useDuration(0).useFriction(1),At(i),wt(),He.current?.resetBlend();}function rr(i,s){Ye.current&&Mt(void 0,{sync:true}),A.current=true,u(i,s);}function Br(){let i=Se.current;if(!i)return null;let s=i.cloneNode(true);return s.setAttribute("aria-hidden","true"),s.style.position="absolute",s.style.inset="0",s.style.width="100%",s.style.height="100%",s.style.margin="0",s.style.pointerEvents="none",s.removeAttribute("data-rmg-fs-hide-track-captions"),s.querySelectorAll("[id]").forEach(m=>{m.removeAttribute("id");}),s.outerHTML}function or(i=bt()){return (oe.current?.length??0)>=i}function ir(i,s,m="animated",g){let L=bt(),G=on(be.current,L),U=on(i,L),k=or(L),ne=g?.enabled??ce,Me=g?.durationMs??rn,Oe=g?.easing??Fn,ht=s==="arrow"||s==="requestSet"&&m!=="instant";if(ne&&E.current&&k&&ht&>.current&&(On(),gt.current=false),!Bs({controlsFade:ne,dragFade:T,showFullscreenSlider:E.current,busy:gt.current,trigger:s,mode:m,hasCrossfadeSlides:k,fromIndex:G,toIndex:U}))return false;nr();let le=$s({controlsFade:ne,trigger:s,isZoomed:St.current})?Br():null,Ne=!!le;On();let _e=++tn.current;gt.current=true,ln.current?.set(G);let Je={id:_e,fromIndex:G,toIndex:U,progress:0,delta:0,animate:false,durationMs:Me,easing:Oe};return Ye.current=Je,yn(le),st(Je),Bt(U,{resetZoom:!Ne}),mt.current=requestAnimationFrame(()=>{mt.current=null,tn.current===_e&&(qn(U),Ne&&Ve(),Xt.current=requestAnimationFrame(()=>{Xt.current=null,tn.current===_e&&(st(dn=>{if(!dn||dn.id!==_e)return dn;let vn={...dn,progress:1,delta:0,animate:true};return Ye.current=vn,vn}),Vt.current=window.setTimeout(()=>{Mt(_e);},Me+48));}));}),true}function sr(){return !!B.current&&E.current&&bt()>1&&or()}function Zn(i){let s=bt(),m=or(s);if(!m)return false;let g=on(be.current,s),L=e$2({currentIndex:g,delta:i,slideCount:s,wrap:s>1});if(L===g)return Mt(),false;let G=a$2(Math.abs(i)/Math.max(1,zt()));return st(U=>{let k=U&&U.fromIndex===g&&U.toIndex===L?U.id:++tn.current;gt.current=true,ln.current?.set(g);let ne={id:k,fromIndex:g,toIndex:L,progress:G,delta:i,animate:false};return Ye.current=ne,ne}),true}function _r(i){let s=Ye.current;if(!s)return Mt(),false;let m=f$2({progress:s.progress,force:i,delta:s.delta});if(gt.current=true,!m){let L=s.id;return st(G=>G?.id===L?(()=>{let U={...G,progress:0,animate:true};return Ye.current=U,U})():G),Vt.current=window.setTimeout(()=>{Mt(L);},rn+48),false}let g=s.id;return ln.current?.set(s.fromIndex),Bt(s.toIndex),st(L=>L?.id===g?(()=>{let G={...L,progress:1,animate:true};return Ye.current=G,G})():L),Vt.current=window.setTimeout(()=>{tn.current===g&&(qn(s.toIndex),Mt(g));},rn+48),true}function zt(){return tt.current||pt(Se.current)}function bt(){return it.current.length||1}function on(i,s){let m=Math.max(1,s);return (i%m+m)%m}function ar(i,s){let m=Math.round(i)*Ie;Kt.current?.to(m,s);}function lr(i){return 1-a$2(Math.abs(i*.36)/mn)}function cr(i){let s=a$2(i);Math.abs(je.current-s)<.001||(je.current=s,H.current&&(H.current.style.opacity=String(s)));}useEffect(()=>{v&&(He.current?.stop(),Ze.current=false,Mt());},[v]),useEffect(()=>{c$2||Mt();},[c$2]),useEffect(()=>()=>{Mt();},[]),useEffect(()=>{if(!Se.current||Wn.current)return;let i=Math.max(1,it.current.length||t||1),s=on(r,i);be.current=s,$t(s),fr(s),setTimeout(()=>{if(!Se.current)return;let g=-(tt.current||pt(Se.current))*s;if(Ct.current=g,Ft.current=0,qe.current&&J.current&&ft.current&&De.current)qe.current.set(g),J.current.set(g),ft.current.set(g),De.current.set(g),ae(g,0);else {let L=Math.round(g)*Ie;Se.current.style.transform=`translate3d(${L}px, 0, 0)`;}},100),Wn.current=true;},[c$2,it.current]);let ur={current:0};function dr(i=300){let s=++ur.current,m=M.current||0,g=performance.now(),L=G=>{if(s!==ur.current||Nt.current)return;let U=Math.min(1,(G-g)/i),k=Vs(U);M.current=m+(0-m)*k;let ne=ft.current.get();if(Ft.current=M.current,ar(ne,Ft.current),cr(lr(Ft.current*2)),U>=1){Ft.current=0,M.current=0,nt.current=0,cr(1),xr();return}U<1&&requestAnimationFrame(L);};requestAnimationFrame(L);}function zr(){H.current&&(H.current.style.transition="opacity 0s");}function xr(){H.current&&(H.current.style.transition="");}useEffect(()=>{if(!c$2){je.current=1;return}!j$1||v||(je.current=1,H.current&&(H.current.style.opacity="1"));},[c$2,j$1,v]);function gn(i,s={}){let{jump:m=false,direction:g}=s,L=jt.current,G=an.current,U=ke.current;if(!G||!U||!L)return;let k=bt(),ne=((be.current||0)%k+k)%k,Me=((i||0)%k+k)%k;if(k>1&&(ne===0&&Me===k-1||ne===k-1&&Me===0)&&St.current&&t>1&&be.current===0){let Ne=p,_e=Ne[1]?.current?.querySelector("img"),Je=Ne[t+1]?.current?.querySelector("img");if(_e&&Je){let dn=vt=>{if(!vt)return 1;let Gn=(vt.style.transform||"").match(/scale\(([^)]+)\)/);if(!Gn)return 1;let Rn=parseFloat(Gn[1]);return Number.isFinite(Rn)?Rn:1},vn=vt=>{let sn=vt.style.transform;if(!sn){let Gn=window.getComputedStyle(vt);sn=Gn.transform!=="none"?Gn.transform:"";}return sn||""},In=dn(_e),yr=dn(Je);if(In>1.01&&yr<=1.01){let vt=vn(_e);Je.style.transition="none",Je.style.transform=vt,Je.offsetWidth;}if(yr>1.01&&In<=1.01){let vt=vn(Je);_e.style.transition="none",_e.style.transform=vt,_e.offsetWidth;}}}let ht=L.clone().set(i).get();m?U.useDuration(0):U.useBaseDuration().useBaseFriction();let le=typeof g=="number"?g:0;G.index(ht,le);}function bn(){if(Ee.current=false,cn.current=false,W.current=false,h$1.current=false,X.current=false,St.current&&t>1&&be.current===0){let U=p,k=U[1]?.current?.querySelector("img"),ne=U[t+1]?.current?.querySelector("img");if(k&&ne){let Me=le=>{if(!le)return 1;let _e=(le.style.transform||"").match(/scale\(([^)]+)\)/);if(!_e)return 1;let Je=parseFloat(_e[1]);return Number.isFinite(Je)?Je:1},Oe=Me(k),ht=Me(ne);if(Oe>1.01&&ht<=1.01){let le=k.style.transform;if(!le){let Ne=window.getComputedStyle(k);le=Ne.transform!=="none"?Ne.transform:"";}ne.style.transition="none",ne.style.transform=le,ne.offsetWidth;}if(ht>1.01&&Oe<=1.01){let le=ne.style.transform;if(!le){let Ne=window.getComputedStyle(ne);le=Ne.transform!=="none"?Ne.transform:"";}k.style.transition="none",k.style.transform=le,k.offsetWidth;}}}let i=bt(),m=(((be.current||0)-1)%i+i)%i;if(ir(m,"arrow")){e$3.emitBasePointerDown?.();return}let g=an.current,L=ke.current;if(!g||!L)return;let G=zt();L.useBaseDuration().useBaseFriction(),g.distance(G,true),e$3.emitBasePointerDown?.();}function Yn(){if(Ee.current=false,cn.current=false,W.current=false,h$1.current=false,X.current=false,St.current&&t>1&&be.current===0){let U=p,k=U[1]?.current?.querySelector("img"),ne=U[t+1]?.current?.querySelector("img");if(k&&ne){let Me=le=>{if(!le)return 1;let _e=(le.style.transform||"").match(/scale\(([^)]+)\)/);if(!_e)return 1;let Je=parseFloat(_e[1]);return Number.isFinite(Je)?Je:1},Oe=Me(k),ht=Me(ne);if(Oe>1.01&&ht<=1.01){let le=k.style.transform;if(!le){let Ne=window.getComputedStyle(k);le=Ne.transform!=="none"?Ne.transform:"";}ne.style.transition="none",ne.style.transform=le,ne.offsetWidth;}if(ht>1.01&&Oe<=1.01){let le=ne.style.transform;if(!le){let Ne=window.getComputedStyle(ne);le=Ne.transform!=="none"?Ne.transform:"";}k.style.transition="none",k.style.transform=le,k.offsetWidth;}}}let i=bt(),m=(((be.current||0)+1)%i+i)%i;if(ir(m,"arrow")){e$3.emitBasePointerDown?.();return}let g=an.current,L=ke.current;if(!g||!L)return;let G=zt();L.useBaseDuration().useBaseFriction(),g.distance(-G,true),e$3.emitBasePointerDown?.();}function fr(i){let s=it.current.length||1,m=i+1;m=(m%s+s)%s,m===0&&(m=t),w.current&&(w.current.textContent=`${m} / ${t}`);}function Un(i){let s=Se.current;return s?s.querySelector(`[data-rmg-fs-slide="true"][data-rmg-canonical-idx="${i}"][data-rmg-clone="false"]`):null}function Tr(i){let s=Un(i);if(!s)return null;let m=s.getAttribute("data-index"),g=m!=null?parseInt(m,10):NaN;return Number.isFinite(g)?g:null}function hn(i){let s=Tr(i);if(s==null)return false;let g=(P.current[s]||null)?.plyr??null;if(!g)return false;if(typeof g.playing=="boolean"?g.playing:!g.paused)return g.pause(),true;let G=g.play();return G&&typeof G.catch=="function"&&G.catch(()=>{}),true}function Xn(){let i=Te.current;i&&(i.observer?.disconnect(),i.rafId!=null&&cancelAnimationFrame(i.rafId),Te.current=null);}function Cr(i){let s=Te.current;if(!s||s.canonicalIndex!==i)return;s.deadlineTs=performance.now()+1200;let m=()=>{if(Te.current===s){if(hn(i)){Xn();return}if(performance.now()>=s.deadlineTs){Xn();return}s.rafId=requestAnimationFrame(m);}};s.rafId=requestAnimationFrame(m);}function mr(i){Xn(),gn(i);let s=Un(i),m=Le.current;if(!s||!m)return;let g={canonicalIndex:i,observer:null,rafId:null,deadlineTs:0},L=new IntersectionObserver(G=>{if(Te.current===g){for(let k of G)if(!(!k.isIntersecting||(k.intersectionRatio??0)<.1)){g.observer?.disconnect(),g.observer=null,Cr(i);return}}},{root:m,rootMargin:"0px",threshold:[0,.1]});g.observer=L,Te.current=g,L.observe(s);}function qr(i){return !!i?.closest?.([".plyr__controls",".plyr__control--overlaid",".plyr__menu__container",".plyr__tooltip",".plyr__captions"].join(","))}function Fr(i){let s=i.changedTouches?.[0]??i.touches?.[0];return s?{x:s.clientX,y:s.clientY}:{x:i.clientX,y:i.clientY}}function Or(i){let{x:s,y:m}=Fr(i),g=document.elementFromPoint(s,m);if(!g)return null;let L=g.closest('[data-rmg-fs-slide="true"]');if(!L)return null;let G=L.querySelector('[data-rmg-video-snapshot="true"]')??L.querySelector('[data-rmg-plyr="true"]');if(!G)return null;let k=(G.querySelector(".plyr__video-wrapper")??G).getBoundingClientRect(),ne=s>=k.left&&s<=k.right&&m>=k.top&&m<=k.bottom;if(g.closest(".plyr__controls")||!ne)return null;let Me=L.getAttribute("data-index"),Oe=L.getAttribute("data-rmg-canonical-idx"),ht=Me!=null?parseInt(Me,10):NaN,le=Oe!=null?parseInt(Oe,10):NaN;return !Number.isFinite(ht)||!Number.isFinite(le)?null:{renderedIndex:ht,canonicalIndex:le,isClone:L.getAttribute("data-rmg-clone")==="true"}}function y(i,s){if(!i)return {clickedImg:null,renderedIndex:null};let m=i.closest('[data-rmg-fs-slide="true"]'),g=d$1(i),L=g?a$5(g):null;if(!L)return {clickedImg:null,renderedIndex:null};let{x:G,y:U}=Fr(s),k=L.getBoundingClientRect();if(!(G>=k.left&&G<=k.right&&U>=k.top&&U<=k.bottom))return {clickedImg:null,renderedIndex:null};let Me=m?.getAttribute("data-index")??L?.dataset.index??null,Oe=Me!=null?parseInt(Me,10):NaN;return {clickedImg:L,renderedIndex:Number.isFinite(Oe)?Oe:null}}useEffect(()=>{let i$1=Le.current,s=Se.current;if(!i$1||!s)return;let m=b();xt.current=m;let g$1=tt.current||pt(s),L=it.current.length||1,G=L-1,U=on(r,L),k=b$1(0),ne=b$1(0),Me=b$1(0),Oe=b$1(0);qe.current=k,J.current=ne,ft.current=Me,De.current=Oe,Cn(g$1,L);let le=wn.current[U]??0;k.set(le),ne.set(le),Me.set(le),Oe.set(le),Ct.current=le,Kt.current=i(s),ae(le,0);let Ne=f(G,U,true),_e=f(G,U,true);jt.current=Ne,ln.current=_e,be.current=U,$t(U),fr(U);function Je(C){let Qe=jt.current,ze=ln.current;if(!Qe||!ze)return;let ge=C.distance,Ce=C.index!==Qe.get();if(De.current.add(ge),ge&&(ke.current.duration()?He.current.start():(ke.current.seek(),wt())),Ce){ze.set(Qe.get()),Qe.set(C.index);let et=Qe.get();Bt(et,{publishVisible:!ke.current.duration()});}}let dn={distance(C,Qe){let ze=Qt.current;if(!ze)return;let ge=ze.byDistance(C,Qe);Je(ge);},index(C,Qe){let ze=Qt.current,ge=jt.current;if(!ze||!ge)return;let Ce=ge.clone().set(C).get(),et=ze.byIndex(Ce,Qe);Je(et);}};an.current=dn;let vn=c(k,Me,ne,Oe,f$3,N);if(ke.current=vn,t===1){let C=s.clientWidth,Qe=pt(s);tt.current=Qe;let ze=it.current.length||1,ge=Qe*ze,Ce=-Math.max(0,ge-C),et=0;Ot.current=d(isNaN(Ce)?0:Ce,et),rt.current=f$1(C),Wt.current=e(Ot.current,qe.current,De.current,ke.current,rt.current,f$3);}else Ot.current=null,Wt.current=null,rt.current=null;let In=h(document,window,()=>{t===1&&Wt.current?.constrain(Ze.current),ke.current?.seek();let C=vn.direction()||Math.sign(Oe.get()-k.get())||0;!X.current&&t>1&&Jt.current>0&&Tt.current?.loop(C),Ct.current=k.get();},C=>{let Qe=k.get(),ze=ne.get(),ge=Qe*C+ze*(1-C);Me.set(ge),Ct.current=ge,Ft.current=Ee.current?M.current:Ft.current,wt();let Ce=t===1&&(Wt.current?.reached()??false);ke.current?.settled()&&!Ce&&!Ze.current&&(He.current?.stop(),Nn.current=false),!St.current&&!Nn.current&&Ae(ge);});He.current=In,In.init();let yr=g(),vt=g(),sn=yi(m,window),Rn=yi({scroll:"y",cross:"x",direction(C){return C},measureSize:C=>C.height},window),Xr=false,gr=false,Gr=0,wo=0,xo=wr;function Yi(){let C=Xr?document:i$1;vt.add(C,"touchmove",Co,{passive:false}).add(C,"touchend",Kr).add(C,"mousemove",Co,{passive:false}).add(C,"mouseup",Kr);}function To(C){let Qe=C.target;if(qr(Qe))return;let ze=C.target;if(S.current?.contains(ze)||K.current?.contains(ze)||St.current||v)return;let ge=a$4(C,window);if(ge&&C.button!==0)return;ge&&C.cancelable&&C.preventDefault(),gt.current&&Mt(void 0,{sync:true}),e$3.emitBasePointerDown?.(),Xr=ge,_n(),Et(Lt),Ge.current=false,h$1.current=false,xe.current=ge?0:C.touches?.length??1,Ze.current=true,Nt.current=true,cn.current=false,W.current=false,h$1.current=false,o.current=true,se.current="none",M.current=0,xn.current=0,Tn.current=0,q.current=be.current||0,fe.current=De.current?.get()??qe.current?.get()??0,z.current=0,sn.pointerDown(C),Rn.pointerDown(C),Gr=sn.readPoint(C,"x"),wo=Rn.readPoint(C,"y"),ye.current=false;let Ce=sr();Ce?(Mt(void 0,{sync:true}),qn(be.current)):(ke.current.useFriction(0).useDuration(0),De.current.set(qe.current.get())),Yi(),Ce||He.current?.start();}function Co(C){if(St.current)return;if(!a$4(C,window)){let ut=C;if(xe.current=ut.touches?.length??1,xe.current>=2){Ge.current=true,h$1.current=true,o.current=false,se.current="none",He.current?.stop(),ut.cancelable&&ut.preventDefault();return}}let ze=sn.readPoint(C,"x"),ge=Rn.readPoint(C,"y"),Ce=Math.abs(ze-Gr),et=Math.abs(ge-wo);se.current==="none"&&(Ce>xo||et>xo)&&(se.current=Ce>=et?"x":"y",o.current=false,se.current==="y"&&(Mt(void 0,{sync:true}),Ee.current=true,xn.current=ge,M.current=0)),zr();let Ln=sn.pointerMove(C).dx*Ie;Rn.pointerMove(C),d$2.current=Bn.current,Bn.current=ze*Ie,tr.current=Ln,b$3.current=new Date;let qt=(ze-Gr)*Ie;if(z.current=qt,!gr&&!Xr&&se.current==="x"&&(!("cancelable"in C)||!C.cancelable||(gr=Ce>et,!gr)))return;if(se.current==="y"){let ut=ge-xn.current;Tn.current=ut,M.current=ut*.5,Ft.current=M.current;let Ir=ft.current.get();ar(Ir,Ft.current),cr(lr(ut)),C.preventDefault?.();return}if(sr()){cn.current=Math.abs(qt)>.5,Zn(qt),C.cancelable&&C.preventDefault?.();return}ke.current.useFriction(.3).useDuration(.75);let fn=xt.current.direction(Ln);De.current.add(fn),He.current?.start(),C.cancelable&&C.preventDefault();}function Kr(C){if(!a$4(C,window)&&(h$1.current||Ge.current)){let ge=C;if(xe.current=ge.touches?.length??0,xe.current>0)return;zn(),h$1.current=false,Ge.current=false,Ze.current=false,Nt.current=false,o.current=false,se.current="none",Ee.current=false,M.current=0,vt.clear(),gr=false,Ht(),Et(300);return}if(Nt.current=false,Ze.current=false,vt.clear(),gr=false,Ht(),Et(300),o.current){let ge=C.target,Ce=Or(C);if(Ce!=null){se.current="none",Ce.isClone?mr(Ce.canonicalIndex):gn(be.current);return}if(ge.closest("[class*='plyr__']"))return;let et=C,{clickedImg:Ln,renderedIndex:qt}=y(ge,et);if(!Ln){xr(),er.current=true,He.current?.stop(),de.current?.(),et.cancelable&&et.preventDefault();return}if(qt==null)return;let fn=p[qt];if(!fn)return;let ut=be.current;if(ut===t-1&&qt===t+1){X.current=true,R(0);return}ut!==qt&&qt!==ut+2&&rr(C,fn),ut===t-1&&qt===t+1&&rr(C,fn),Se.current&&Se.current.children.length===1&&rr(C,fn),X.current=true,R(ut);return}if(se.current==="y"){let ge=Rn.pointerUp(C).fy;if(Math.abs(ge)>.15){In?.stop(),Kt.current?.lockY(M.current),$n.current=true,de.current?.(),M.current=0,Ee.current=false;return}let et=Tn.current,Ln=l.height*.3;if(Math.abs(et)>Ln){In?.stop(),Kt.current?.lockY(M.current),$n.current=true,de.current?.(),M.current=0,Ee.current=false;return}dr(300),se.current="none",Ee.current=false;}else {let Oo=function(es){let ts=De.current?.get()??qe.current?.get()??fe.current;return _s({force:es,fallbackDirection:z.current||ts-fe.current,slideCount:it.current.length||1,currentIndex:be.current||0,dragStartIndex:q.current,wrap:t>1,skipSnaps:Z,strictSnaps:$,scrollTarget:Ui})};let Ce=sn.pointerUp(C).fx;if(ie&&(Ce=-Ce),sr()){cn.current=false,_r(Ce),se.current="none";return}let et=a$4(C,window),qt={mouse:300,touch:400}[et?"mouse":"touch"],fn=Ce*qt,ut=Qt.current,Ir=an.current,Fo=ke.current;if(!ut||!Ir||!Fo){se.current="none";return}let Ui=ut,Xi=Wt.current?.passed(),Io=fn;Xi&&(Io*=.6);let Lo=Oo(Io),Gi=N,Ki=e$1(fn,Lo),Ji=f$3,Qi=Gi+Ki/50;Fo.useDuration(Ji).useFriction(Qi),Ir.distance(Lo,true);}se.current="none";}return yr.add(i$1,"dragstart",C=>C.preventDefault(),{passive:false}).add(i$1,"selectstart",C=>C.preventDefault(),{passive:false}).add(i$1,"touchstart",To).add(i$1,"mousedown",To,{passive:false}).add(i$1,"touchcancel",()=>{h$1.current=false,Ge.current=false,Ze.current=false,Nt.current=false,se.current="none",Ee.current=false,M.current=0,vt.clear(),Ht(),Et(Lt);}).add(i$1,"contextmenu",Kr),()=>{yr.clear(),vt.clear(),He.current?.destroy(),He.current=null;}},[c$2,t]);function R(i,s="animated"){gn(i,{jump:s==="instant"});}useEffect(()=>{let i=Le.current;if(!i)return;function s(m){let g=Pt();if(gt.current){m.cancelable&&m.preventDefault?.();return}if(Ze.current){Et(Lt),m.cancelable&&m.preventDefault?.();return}if(nn(g)){Et(40),m.cancelable&&m.preventDefault?.();return}if(e$3.emitBasePointerDown?.(),a$3)return;let L=Se.current;if(!L)return;let G=L.clientWidth,k=(it.current.length||1)*(tt.current||pt(L))>G;if(!(Math.abs(m.deltaX)>Math.abs(m.deltaY))||!k)return;m.preventDefault();let Oe=(ft.current?.get()??0)-m.deltaX*Ie;De.current?.set(Oe),ke.current?.useDuration(0).useFriction(1),He.current?.start(),Ct.current=Oe,wt(),Ae(Oe);}return i.addEventListener("wheel",s,{passive:false}),()=>i.removeEventListener("wheel",s)},[a$3]);function V(i){let s=zt(),m=bt(),g=Math.round(Math.abs(i)/s);return g=(g%m+m)%m,g}function Ae(i){let s=V(i);if(be.current!==s){be.current=s,jt.current?.set(s);let m=((s+1)%t+t)%t;m===0&&(m=t),w.current&&(w.current.textContent=`${m} / ${t}`);}$t(s);}function ae(i,s){if(!Se.current)return;let m;if(Ee.current)m=Math.round(s);else {let g=nt.current,L=g+(0-g)*.2;m=Math.round(L),nt.current=m;}ar(i,m);}function wt(){ae(Ct.current,Ft.current);}function At(i){qe.current?.set(i),J.current?.set(i),ft.current?.set(i),De.current?.set(i),Ct.current=i;}useEffect(()=>{let i=0;function s(){cancelAnimationFrame(i),i=requestAnimationFrame(()=>{He.current?.stop(),kt();});}s();let m=new ResizeObserver(s);return Le.current&&m.observe(Le.current),window.addEventListener("orientationchange",s,{passive:true}),()=>{cancelAnimationFrame(i),window.removeEventListener("orientationchange",s),m.disconnect();}},[l,kt]),useEffect(()=>{let i=e$3.onRequest(s=>{switch(s.type){case "requestSet":{let m=s.mode??"animated";if(m==="instant"){let U=-zt()*s.index;At(U),ae(U,0),He.current?.stop();let k=(s.index%bt()+bt())%bt();Bt(k);break}let L=s.meta?.source==="thumbnail"?s.meta?.transition??"scroll":null;if(L==="scroll"){gn(s.index,{jump:false});break}ir(s.index,"requestSet",m,{enabled:L==="crossfade"?true:void 0,durationMs:s.meta?.crossfade?.durationMs,easing:s.meta?.crossfade?.easing})||gn(s.index,{jump:false});break}case "requestPrev":bn();break;case "requestNext":Yn();break;case "center":kt();break}});return ()=>{i();}},[e$3]),useEffect(()=>()=>{let i=Te.current;i?.observer?.disconnect(),i?.rafId!=null&&cancelAnimationFrame(i.rafId),Te.current=null;},[]);function pr(){gn(be.current,{jump:false});}useImperativeHandle(Ut,()=>({centerSlider:pr}),[pr]);function Zr(i){if(!i)return false;let s=i;return !!(s.type==="video"||s.kind==="video"||s.mediaType==="video"||s.videoSrc||s.src&&typeof s.src=="string"&&s.src.match(/\.(mp4|webm|mov)(\?|#|$)/i)||s.plyrSource||s.sources?.video)}let Yr=te?.length||t||1,_i=((r??0)%Yr+Yr)%Yr,zi=Zr(te?.[_i]),ho=pe==="fade"||ve||zi,vo=he!=null?We?.[he.fromIndex]??null:null,Ro=he!=null?We?.[he.toIndex]??null:null,So=!!he&&(!!vo||!!at)&&!!Ro,Eo=a$2(he?.progress??0),qi=he?.durationMs??rn,Zi=he?.easing??Fn,Mo=he?.animate?`opacity ${qi}ms ${Zi}`:"none";function Ur(i){let s=Dt?.open;s&&(S.current?.classList.toggle(s,i),K.current?.classList.toggle(s,i));}return useEffect(()=>{let i=0,s=0;if(!c$2||v){Ur(false);return}return Ur(false),i=requestAnimationFrame(()=>{s=requestAnimationFrame(()=>{Ur(true);});}),()=>{cancelAnimationFrame(i),cancelAnimationFrame(s);}},[c$2,v,Dt]),jsxs("div",{ref:Le,"data-rmg-fs-viewport":"true",className:`fs_viewport ${Xe}`,dir:ie?"rtl":void 0,style:{position:"absolute",inset:0,overflow:"hidden"},children:[me&&jsxs(Fragment,{children:[jsx("button",{ref:S,type:"button","aria-label":Ue("left",ie)==="prev"?"Previous":"Next",onClick:()=>{Ue("left",ie)==="prev"?bn():Yn();},className:lt(Dt?.leftChevron,Ke(Q?.arrow),Ke(Q?.prev)),style:{position:"absolute",top:"50%",left:"16px",transform:"translateY(-50%) rotate(180deg)",...$e(Q?.arrow)??{},...$e(Q?.prev)??{}},children:un(Ue("left",ie),"left")}),jsx("button",{ref:K,type:"button","aria-label":Ue("right",ie)==="prev"?"Previous":"Next",onClick:()=>{Ue("right",ie)==="prev"?bn():Yn();},className:lt(Dt?.rightChevron,Ke(Q?.arrow),Ke(Q?.next)),style:{position:"absolute",top:"50%",right:"16px",transform:"translateY(-50%)",...$e(Q?.arrow)??{},...$e(Q?.next)??{}},children:un(Ue("right",ie),"right")})]}),So&&jsxs("div",{"data-rmg-fs-crossfade-layer":"true",style:{position:"absolute",inset:0,zIndex:2,pointerEvents:"none"},children:[jsx("div",{"data-rmg-fs-crossfade-slide":"source",style:{position:"absolute",inset:0,overflow:"hidden",opacity:1-Eo,transition:Mo,willChange:"opacity"},children:at?jsx("div",{"aria-hidden":"true",style:{position:"absolute",inset:0},dangerouslySetInnerHTML:{__html:at}}):vo}),jsx("div",{"data-rmg-fs-crossfade-slide":"target",style:{position:"absolute",inset:0,opacity:Eo,transition:Mo,willChange:"opacity"},children:Ro})]},he.id),jsx("div",{ref:Se,"data-rmg-fs-track":"true","data-rmg-fs-hide-track-captions":So?"true":void 0,className:`fullscreen_slider ${Xe}`,style:{position:"absolute",inset:0,overflow:"visible",cursor:"grab",userSelect:"none",WebkitUserSelect:"none",willChange:"opacity, transform",backfaceVisibility:"hidden",transition:ho?`opacity ${Yt}ms ${Y}`:void 0,opacity:j$1?ho&&re?0:1:0},children:n})]})});ao.displayName="FullscreenSlider";var qs='[data-rmg-overlay-height-active="true"]',gi="data-rmg-overlay-height-frozen",Zs=.5,bi=1e3;function Ys(e){return Math.round((e+Number.EPSILON)*bi)/bi}function Us(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Xs(){let[e,n]=F.useState(Us);return F.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let t=window.matchMedia("(prefers-reduced-motion: reduce)"),r=()=>n(t.matches);return r(),typeof t.addEventListener=="function"?(t.addEventListener("change",r),()=>t.removeEventListener("change",r)):(t.addListener(r),()=>t.removeListener(r))},[]),e}function Er({children:e,activeKey:n,activeReady:t,durationMs:r,easing:o}){let a=F.useRef(null),l=F.useRef(null),c=F.useRef(t),[u,p]=F.useState(null),W=!Xs()&&r>0;c.current=t;let h=F.useCallback(()=>{let v=a.current;return v?v.querySelector(qs)??(v.lastElementChild instanceof HTMLElement?v.lastElementChild:null):null},[]),j=F.useCallback(()=>{let v=a.current,w=h();if(!v||!w)return null;let S=Array.from(v.children).filter(f=>f instanceof HTMLElement),K=S.map(f=>({layer:f,bottom:f.style.bottom,height:f.style.height,inset:f.style.inset,left:f.style.left,maxHeight:f.style.maxHeight,minHeight:f.style.minHeight,position:f.style.position,right:f.style.right,top:f.style.top,transform:f.style.transform,visibility:f.style.visibility,width:f.style.width,zIndex:f.style.zIndex})),H=v.style.height,D=v.style.overflow,I=v.style.transition;v.style.transition="none",v.style.height="auto",v.style.overflow="visible";for(let f of S){if(f===w){f.style.height="auto",f.style.minHeight="0",f.style.maxHeight="none";continue}f.style.position="absolute",f.style.inset="0 0 auto 0",f.style.visibility="hidden";}try{let f=w.getBoundingClientRect();return Ys(Math.max(0,f.height,w.scrollHeight))}finally{for(let f of K)f.layer.style.bottom=f.bottom,f.layer.style.height=f.height,f.layer.style.inset=f.inset,f.layer.style.left=f.left,f.layer.style.maxHeight=f.maxHeight,f.layer.style.minHeight=f.minHeight,f.layer.style.position=f.position,f.layer.style.right=f.right,f.layer.style.top=f.top,f.layer.style.transform=f.transform,f.layer.style.visibility=f.visibility,f.layer.style.width=f.width,f.layer.style.zIndex=f.zIndex;v.style.height=H,v.style.overflow=D,v.style.transition=I;}},[h]),A=F.useCallback(()=>{if(!c.current)return;let v=a.current,w=j();if(!v||w==null)return;let S=l.current;S!=null&&Math.abs(S-w)<=Zs||(S!=null&&(v.style.height=`${S}px`,v.offsetHeight),l.current=w,p(w));},[j]);F.useLayoutEffect(()=>{let v=a.current;if(!v)return;let w=Array.from(v.children).filter(S=>S instanceof HTMLElement);for(let S of w)S.getAttribute(gi)==="true"&&(S.removeAttribute(gi),S.style.inset="",S.style.bottom="",S.style.left="",S.style.right="",S.style.top="",S.style.transform="",S.style.width="",S.style.height="");}),F.useLayoutEffect(()=>{t&&A();},[n,t,A]),F.useEffect(()=>{if(!t)return;let v=h();if(!v||typeof ResizeObserver>"u")return;let w=0,S=()=>{w&&cancelAnimationFrame(w),w=requestAnimationFrame(()=>{w=0,A();});},K=new ResizeObserver(S);return K.observe(v),()=>{w&&cancelAnimationFrame(w),K.disconnect();}},[n,t,h,A]);let P=W&&u!=null?`height ${r}ms ${o}`:void 0;return jsx("div",{ref:a,"data-rmg-overlay-height-stack":"true",style:{display:"grid",alignItems:"center",gridTemplateColumns:"minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",minWidth:0,position:"relative",height:u??void 0,overflow:"visible",transition:P,willChange:P?"height":void 0},children:e})}var hi="--rmg-entry-overlay-opacity",Ks=300,Js="cubic-bezier(.4,0,.22,1)",Qs="linear";function lo(e,n){return n?(e%n+n)%n:e}function ea(e){return e==="top"?"linear-gradient(to bottom, rgba(0,0,0,0.75), transparent)":e==="left"?"linear-gradient(to right, rgba(0,0,0,0.75), transparent)":e==="right"?"linear-gradient(to left, rgba(0,0,0,0.75), transparent)":"linear-gradient(to top, rgba(0,0,0,0.75), transparent)"}function ta(e){let{placement:n,overlay:t,viewportWidth:r,viewportHeight:o}=e,a=f$3(r),l=g$2(o),c=a$8(t?.width,280,a,a),u=t?.height==null?void 0:a$8(t.height,200,a,l);return n==="top"?{top:0,left:0,right:0,...u!=null?{height:u}:{}}:n==="left"?{top:0,bottom:0,left:0,width:c}:n==="right"?{top:0,bottom:0,right:0,width:c}:{bottom:0,left:0,right:0,...u!=null?{height:u}:{}}}function vi(e){let{entriesObject:n,wrapperBaseStyle:t,viewportWidth:r,viewportHeight:o,placement:a,fadeOutMs:l,fadeOutEasing:c,opacity:u}=e;return {position:"fixed",boxSizing:"border-box",zIndex:"calc(var(--rmg-fs-z, 9999) + 1)",pointerEvents:"none",...ta({placement:a,overlay:n.overlay,viewportWidth:r,viewportHeight:o}),...t??{},opacity:u,transition:l>0?`opacity ${l}ms ${c}`:void 0,willChange:l>0?"opacity":void 0}}function na(e){let{entriesObject:n,placement:t,overlayZoomMotion:r}=e;return {boxSizing:"border-box",width:"100%",height:"100%",padding:"1.25rem 1.5rem",background:ea(t),color:"#fff",fontSize:"0.9rem",...n.overlay?.style??{},...r.contentStyle}}function ra(e){let{opacity:n,fadeOutMs:t,active:a}=e;return {...{gridArea:"1 / 1",minWidth:0,position:"relative",zIndex:a?1:2},opacity:n,transition:t>0?`opacity ${t}ms ${Qs}`:void 0,willChange:t>0?"opacity":void 0,pointerEvents:"none"}}function Ri(e){return e?.overlay?.overlayCrossfadeTarget??"overlay"}function oa(e,n=Ks){let t=e?.overlay?.overlayCrossfadeDurationMs;return typeof t=="number"&&Number.isFinite(t)?Math.max(0,t):n}function ia(e){let n=e?.overlay?.overlayCrossfadeEasing;return typeof n=="string"&&n.trim()?n:Js}function sa(e){let{prevEntryIndex:n,nextEntryIndex:t,crossfadeTarget:r}=e;return n!==t||r==="content"}function aa(e){let{layers:n,entriesObject:t,entryMap:r,wrapperBaseStyle:o,overlayZoomMotion:a,viewportWidth:l,viewportHeight:c,fadeOutMs:u,fadeOutEasing:p,resolveFsCaptionPlacement:x}=e,W=e.overlayOpacity,h=W==null?`var(${hi}, 1)`:String(W),j=t.render?.overlay,A=t.items;if(typeof j!="function"||!A?.length||!r?.length||!n.length)return null;let P=x(t.overlay?.placement,t.overlay?.breakpoint,l),v=na({entriesObject:t,placement:P,overlayZoomMotion:a}),w=n.flatMap(N=>{let Z=r[N.index];if(!Z)return [];let $=A[Z.entryIndex];if(!$)return [];let X=Array.isArray($.media)?$.media[Z.mediaIndex]??null:null;return [{layer:N,node:j({entry:$,entryIndex:Z.entryIndex,media:X,mediaIndex:Z.mediaIndex,link:Z,opacity:N.opacity,fsIndex:N.index,style:v,containerProps:{className:t.overlay?.className,style:v}})}]});if(!w.length)return null;let K=Ri(t)==="content",H=w.length-1,D=w[H]?.layer,I=D?.key??"active",f=(D?.opacity??1)>0;return K?jsx("div",{"data-rmg-fs-entry-overlay":"true",className:t.overlay?.className,style:vi({entriesObject:t,wrapperBaseStyle:o,viewportWidth:l,viewportHeight:c,placement:P,fadeOutMs:u,fadeOutEasing:p,opacity:h}),children:jsx("div",{"data-rmg-fs-entry-overlay-surface":"true",style:v,children:jsx(Er,{activeKey:I,activeReady:f,durationMs:u,easing:p,children:w.map(({layer:N,node:Z},$)=>jsx("div",{"data-rmg-fs-entry-overlay-content":"true","data-rmg-overlay-height-layer-key":String(N.key),"data-rmg-overlay-height-active":$===H?"true":void 0,style:ra({opacity:N.opacity,fadeOutMs:u,active:$===H}),"aria-hidden":$===H?void 0:true,children:Z},N.key))})})}):jsx(Fragment,{children:w.map(({layer:N,node:Z},$)=>jsx("div",{"data-rmg-fs-entry-overlay":"true",className:t.overlay?.className,style:vi({entriesObject:t,wrapperBaseStyle:o,viewportWidth:l,viewportHeight:c,placement:P,fadeOutMs:u,fadeOutEasing:p,opacity:W==null?`calc(var(${hi}, 1) * ${N.opacity})`:String(W*N.opacity)}),"aria-hidden":$===H?void 0:true,children:jsx("div",{"data-rmg-fs-entry-overlay-surface":"true",style:v,children:Z})},N.key))})}function Si(e){let{enabled:n,fsSub:t,entriesObject:r,entryMapRef:o,syncFullscreenSourceFromIndex:a,resetAllZoomDom:l,wrapperBaseStyle:c,fadeOutMs:u,closing:p,overlayZoomMotion:x,viewportWidth:W,viewportHeight:h,resolveFsCaptionPlacement:j}=e,A=Ri(r),P=oa(r,u),v=ia(r),[w,S]=F.useState(()=>[{key:1,index:lo(t.get(),o.current?.length??0),opacity:1}]),[K,H]=F.useState(0),D=F.useRef(w),I=F.useRef(lo(t.get(),o.current?.length??0)),f=F.useRef(1),N=F.useRef(a),Z=F.useRef(l),$=F.useRef({raf1:0,raf2:0,timeout:null}),X=F.useRef({raf1:0,raf2:0,timeout:null}),re=F.useCallback(()=>{let Y=$.current;Y.raf1&&cancelAnimationFrame(Y.raf1),Y.raf2&&cancelAnimationFrame(Y.raf2),Y.timeout!=null&&window.clearTimeout(Y.timeout),$.current={raf1:0,raf2:0,timeout:null};},[]),ve=F.useCallback(()=>{let Y=X.current;Y.raf1&&cancelAnimationFrame(Y.raf1),Y.raf2&&cancelAnimationFrame(Y.raf2),Y.timeout!=null&&window.clearTimeout(Y.timeout),X.current={raf1:0,raf2:0,timeout:null};},[]),ce=F.useCallback(Y=>{D.current=Y,S(Y);},[]),T=F.useCallback(Y=>lo(Y,o.current?.length??0),[o]);F.useEffect(()=>{N.current=a,Z.current=l;},[l,a]);let _=F.useCallback((Y,Ve=1)=>({key:++f.current,index:Y,opacity:Ve}),[]),ue=F.useCallback(Y=>D.current.reduce((pe,Re)=>!pe||Re.opacity>pe.opacity?Re:pe,null)??_(Y),[_]),te=F.useCallback(Y=>o.current?.[Y]?.entryIndex??-1,[o]),We=F.useCallback(Y=>{let Ve=D.current[D.current.length-1];ce([Ve?{...Ve,index:Y,opacity:1}:_(Y)]);},[_,ce]),Yt=F.useCallback(Y=>{if(p)return;re();let Ve=ue(I.current),de=_(Y,0);if(ce([{...Ve,opacity:1},de]),N.current(Y),Z.current(),P<=0){ce([{...de,opacity:1}]);return}$.current.raf1=requestAnimationFrame(()=>{$.current.raf1=0,$.current.raf2=requestAnimationFrame(()=>{$.current.raf2=0,ce([{...Ve,opacity:0},{...de,opacity:1}]),$.current.timeout=window.setTimeout(()=>{ce([{...de,opacity:1}]),$.current={raf1:0,raf2:0,timeout:null};},P);});});},[_,re,p,ce,P,ue]);return F.useEffect(()=>{if(!n){re(),ve(),H(0),ce([]);return}if(p){re(),ve(),H(0),P<=0?ce([]):X.current.timeout=window.setTimeout(()=>{ce([]),X.current={raf1:0,raf2:0,timeout:null};},P);return}ve();let Y=T(t.get());I.current=Y,We(Y),N.current(Y),H(0),X.current.raf1=requestAnimationFrame(()=>{X.current.raf1=0,X.current.raf2=requestAnimationFrame(()=>{X.current.raf2=0,H(1);});});let Ve=t.onEvent(de=>{if(de.type!=="internalIndex")return;let pe=T(de.index);if(pe===I.current&&D.current.length)return;let Re=I.current,Dt=te(Re),Ut=te(pe);I.current=pe,sa({prevEntryIndex:Dt,nextEntryIndex:Ut,crossfadeTarget:A})?Yt(pe):(re(),We(pe),N.current(pe),Z.current());});return ()=>{re(),ve(),Ve();}},[re,ve,p,ce,A,n,Yt,P,t,te,T,We]),F.useEffect(()=>()=>{re(),ve();},[re,ve]),w.length?jsx(Fragment,{children:aa({layers:w,entriesObject:r,entryMap:o.current,wrapperBaseStyle:c,overlayZoomMotion:x,viewportWidth:W,viewportHeight:h,fadeOutMs:P,fadeOutEasing:v,overlayOpacity:K,resolveFsCaptionPlacement:j})}):null}function ca(e,n){return e?.type==="video"||e?.kind==="video"||e?.mediaType==="video"||!!e?.videoSrc||!!e?.sources?.video||!!e?.plyrSource||!!n?.dataset?.rmgVideo}function ua(e){e.isConnected||document.body.appendChild(e);}function da(e){let{requested:n,item:t,fs:r,isVideoSlide:o}=e;return r.effects?.introFade||o||n==="fade"||t?.kind!=="image"&&t?.type!=="image"?"fade":"scale"}function fa(e,n,t,r){let o=document.createElement("div");return o.className=e.fullscreenOverlay,n.current=o,o.style.opacity="0",o.style.pointerEvents="none",o.style.transition="none",o.style.transition=`opacity ${t}ms ${r}`,o}function Vr(e,n){return (e??document).querySelector(n)}function Mi(e){let n=Vr(e,".fullscreen_slider");n&&n.style.removeProperty("transition");}function ma(e,n,t){let r=Vr(t,".fullscreen_slider");r&&(r.style.transition="none",r.style.opacity="0",r.offsetWidth,r.style.transition=`opacity ${e}ms ${n}`);}function pa(e){let{vw:n,vh:t,fs:r,viewportOverlay:o,fsThumbContainerRef:a,fullscreenThumbnailPosition:l,resolveFsCaptionPlacement:c}=e,u=f$3(n),p=g$2(t),x=c(r.caption?.placement,r.caption?.breakpoint,u),W=280,h=200,j=a$8(r.caption?.width,W,u,u),A=a$8(r.caption?.height,h,u,p),P=r.caption?.width==null?void 0:a$8(r.caption.width,W,u,u),v=r.caption?.height==null?void 0:a$8(r.caption.height,h,u,p),w=c(o?.placement,o?.breakpoint,u),S=o?.width==null?void 0:a$8(o.width,W,u,u),K=o?.height==null?void 0:a$8(o.height,h,u,p),H=0,D=u,I=0,f=p;r.caption?.layout!=="overlay"?x==="right"?D=Math.max(0,u-j):x==="left"?H=Math.min(u,j):x==="top"?I=Math.min(p,A):x==="bottom"&&(f=Math.max(0,p-A)):(P!=null||v!=null)&&(P!=null&&(x==="right"?D=Math.max(0,u-P):x==="left"&&(H=Math.min(u,P))),v!=null&&(x==="top"?I=Math.min(p,v):x==="bottom"&&(f=Math.max(0,p-v)))),S!=null&&(w==="right"?D=Math.max(0,D-S):w==="left"&&(H=Math.min(D,H+S))),K!=null&&(w==="top"?I=Math.min(f,I+K):w==="bottom"&&(f=Math.max(I,f-K)));let N=l??null;if(a?.current&&N){let $=a.current.offsetHeight,X=a.current.offsetWidth;N==="top"?I+=$:N==="bottom"?f-=$:N==="left"?H+=X:N==="right"&&(D-=X);}return {rect:new DOMRect(H,I,Math.max(1,D-H),Math.max(1,f-I)),effectivePlacement:x,thumbPos:N,sideWidth:j,topBottomHeight:A}}function ya(e){let{overlay:n,styles:t,fs:r,overlayCaptionRef:o,overlayCaptionRootRef:a,normalizedItems:l,index:c,introZ:u}=e;if(typeof r.caption?.render=="function"&&r.caption?.layout!=="overlay")try{let p=document.createElement("div");p.className=t.fsOverlayCaption,o.current=p,Object.assign(p.style,{position:"fixed",left:"0",top:"0",width:"0px",height:"0px",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"left",padding:"0.75rem 1rem",color:"#fff",fontSize:"0.875rem",boxSizing:"border-box",pointerEvents:"none",opacity:"0",zIndex:String(u+1)}),r.caption?.className&&r.caption.className.split(" ").map(h=>h.trim()).filter(Boolean).forEach(h=>p.classList.add(h)),r.caption?.style&&Object.assign(p.style,r.caption.style),n.appendChild(p);let x=createRoot(p);a.current=x;let W=l[c];x.render(jsx("div",{"data-rmg-fs-caption-content":"true",style:{width:"100%"},children:r.caption.render({item:W,index:c,isZoomed:!1})}));}catch(p){console.error("[RMG] Failed to render overlay caption",p);}}function ga(e){let{overlayCaption:n,captionState:t}=e,{rect:r,computedStyle:o}=t;n.style.left=`${r.left}px`,n.style.top=`${r.top}px`,n.style.width=`${r.width}px`,n.style.height=`${r.height}px`,n.style.opacity="1",n.style.display=o.display,n.style.alignItems=o.alignItems,n.style.justifyContent=o.justifyContent,n.style.padding=o.padding,n.style.textAlign=o.textAlign,n.style.boxSizing=o.boxSizing;}function Oi(e,n){e.current&&(e.current.unmount(),e.current=null),n.current&&(n.current.remove(),n.current=null);}function Ii(e,n){return e==="contain"?"contain":e==="cover"?"cover":n}function wi(e){let{fit:n,natW:t,natH:r,rect:o,objPos:a}=e;return n==="cover"?b$3(t,r,o,a):c$3(t,r,o,a)}function ba(e,n,t){return e<=t.width&&n<=t.height?{cx:t.x+t.width/2,cy:t.y+t.height/2,scale:1}:c$3(e,n,t,{x:.5,y:.5})}var ha=1024;function va(e){let{sourceNatW:n,sourceNatH:t,startRect:r,contentRect:o,targetImageState:a}=e,l=Math.max(1,a?.natW??n),c=Math.max(1,a?.natH??t),u=Math.max(l,c),p=a?.rect??o,x=Math.max(r.width,r.height,p.width,p.height,1),h=Math.max(1,Math.min(x,ha))/u;return {proxyRasterW:Math.max(1,Math.round(l*h)),proxyRasterH:Math.max(1,Math.round(c*h))}}function Ra(e,n){let t=Li(e,n);if(!t)return null;let r=t.getBoundingClientRect(),o=t.naturalWidth||0,a=t.naturalHeight||0;if(r.width<=0||r.height<=0||o<=0||a<=0)return null;let l=getComputedStyle(t),c=Ii(l?.objectFit,"contain"),u=a$9(l?.objectPosition??null)??{x:.5,y:.5};return {fit:c,objPos:u,natW:o,natH:a,rect:r}}function Li(e,n){let r=Vr(n,`[data-rmg-fs-slide="true"][data-rmg-canonical-idx="${e}"][data-rmg-clone="false"]`)?.querySelector('[data-rmg-fs-media="true"]')??null;return c$4(r)}function xi(e,n){let t=Vr(n,`[data-rmg-fs-slide="true"][data-rmg-canonical-idx="${e}"][data-rmg-clone="false"]`);if(!t)return null;let r=t.querySelector('[data-rmg-fs-caption="true"]')??t.querySelector('[data-rmg-fs-caption-content="true"]')?.parentElement??null;if(!r)return null;let o=r.getBoundingClientRect();return o.width<=0||o.height<=0?null:{rect:o,computedStyle:getComputedStyle(r)}}function Sa(e,n,t){let r=xi(e,t);return r?Promise.resolve(r):new Promise(o=>{let a=performance.now(),l=0,c=false,u=x=>{c||(c=true,l&&cancelAnimationFrame(l),o(x));},p=()=>{let x=xi(e,t);if(x){u(x);return}if(performance.now()-a>=n){u(null);return}l=requestAnimationFrame(p);};l=requestAnimationFrame(p);})}function Hi(){return new Promise(e=>requestAnimationFrame(()=>e()))}async function mo(e){let n=Math.max(1,Math.round(e));for(let t=0;t<n;t+=1)await Hi();}function Ea(e){if(!e.complete||e.naturalWidth<=0||e.naturalHeight<=0)return false;let n=e.getBoundingClientRect();if(n.width<=0||n.height<=0)return false;let t=getComputedStyle(e);if(t.display==="none"||t.visibility==="hidden")return false;let r=Number.parseFloat(t.opacity||"1");return !Number.isFinite(r)||r>=.98}async function Ma(e){let{index:n,fullscreenRoot:t,maxWaitMs:r}=e,o=performance.now(),a=null,l=null,c=null;for(;performance.now()-o<r;){let u=Li(n,t);if(u&&Ea(u)){if(typeof u.decode=="function"&&c!==u){a!==u&&(a=u,l=u.decode().then(()=>"resolved",()=>"rejected"));let p=Math.max(0,r-(performance.now()-o));if(p>0&&l){if(await Promise.race([new Promise(W=>window.setTimeout(()=>W("timeout"),p)),l])==="timeout")break;c=u;}}await mo(2);return}await Hi();}await mo(2);}function co(e,n,t){let r=e.top,o=e.left,a=n-(e.left+e.width),l=t-(e.top+e.height);return `inset(${r}px ${a}px ${l}px ${o}px)`}function Ti(e){if(!(e instanceof HTMLElement))return false;let n=getComputedStyle(e);if(n.display==="none"||n.visibility==="hidden"||Number.parseFloat(n.opacity||"1")<=0||n.position!=="sticky"&&n.position!=="fixed")return false;let t=e.getBoundingClientRect();return !(t.width<=0||t.height<=0||t.bottom<=0||t.top>=window.innerHeight||t.top>Math.min(window.innerHeight*.25,120))}function Ci(e,n){return Math.min(e.right,n.right)>Math.max(e.left,n.left)}function wa(e,n){let t=e?.trim(),o=t?Array.from(document.querySelectorAll(t)):[".rmg-intro-sticky-nav",'[data-rmg-intro-sticky-nav="true"]','header[role="banner"]',"header"].flatMap(c=>Array.from(document.querySelectorAll(c))),a=null,l=-1/0;for(let c of o){if(!Ti(c))continue;let u=c.getBoundingClientRect();n&&!Ci(u,n)||u.bottom>l&&(l=u.bottom,a=c);}if(a||t)return a;for(let c of Array.from(document.body.querySelectorAll("*"))){if(!Ti(c))continue;let u=c.getBoundingClientRect();n&&!Ci(u,n)||u.bottom>l&&(l=u.bottom,a=c);}return a}function xa(e,n){let t=Math.max(window.innerHeight||0,document.documentElement?.clientHeight||0),r=Math.min(Math.max(n,0),t),o=e.left,a=e.right,l=Math.max(e.top,r),c=e.bottom;return c<=l||a<=o?null:new DOMRect(o,l,a-o,c-l)}function uo(e,n){let t=document.createElement("div");return Object.assign(t.style,{position:"fixed",inset:"0",clipPath:e,willChange:"clip-path",transition:"none",pointerEvents:"none",zIndex:String(n)}),t}function Ta(e){return e?[e.overflow,e.overflowX,e.overflowY].some(n=>{let t=n?.trim().toLowerCase()??"";return t==="hidden"||t==="clip"}):false}function Ca(e,n=2){let t=[],r=e.parentElement;for(;r&&r!==document.body&&r!==document.documentElement&&t.length<n;){if(Ta(getComputedStyle(r))){let o=r.getBoundingClientRect();o.width>0&&o.height>0&&t.push(o);}r=r.parentElement;}return t}function Fi(e){let{overlay:n,fullscreenRoot:t,styles:r,overlayCaptionRef:o,overlayCaptionRootRef:a,setShowFullscreenSlider:l,setFsFadeOpening:c,durationMs:u,easing:p}=e;ua(n),n.style.transition="none",n.offsetWidth,n.style.transition=`opacity ${u}ms ${p}`,requestAnimationFrame(()=>{n.style.opacity="1",n.style.pointerEvents="none",o.current?.classList.add(r.open);}),queueMicrotask(()=>{flushSync(()=>{c(true),l(true);}),ma(u,p,t),requestAnimationFrame(()=>{flushSync(()=>c(false));});}),window.setTimeout(()=>{Oi(a,o);},u+30);}function Fa(e){let{overlayCaption:n,fs:t,contentRect:r,vw:o,vh:a}=e,l=f$3(o),c=g$2(a),u=a$8(t.caption?.width,280,l,l),p=a$8(t.caption?.height,200,l,c),x=t.caption?.placement==null?"bottom":typeof t.caption.placement=="string"?t.caption.placement:"bottom";x==="right"?(n.style.left=`${r.right}px`,n.style.top=`${r.top}px`,n.style.width=`${u}px`,n.style.height=`${r.height}px`):x==="left"?(n.style.left=`${r.left-u}px`,n.style.top=`${r.top}px`,n.style.width=`${u}px`,n.style.height=`${r.height}px`):x==="top"?(n.style.left=`${r.left}px`,n.style.top=`${r.top-p}px`,n.style.width=`${r.width}px`,n.style.height=`${p}px`):(n.style.left=`${r.left}px`,n.style.top=`${r.bottom}px`,n.style.width=`${r.width}px`,n.style.height=`${p}px`),n.style.opacity="1";}function Oa(e){let{originalImage:n,index:t,overlay:r,fullscreenRoot:o,styles:a,fs:l,contentRect:c,vw:u,vh:p,introZ:x,durationMs:W,easing:h,duplicateImgRef:j,overlayCaptionRef:A,overlayCaptionRootRef:P,setShowFullscreenSlider:v}=e;Mi(o);let w=n.getBoundingClientRect(),S=Math.max(1,n.naturalWidth||0),K=Math.max(1,n.naturalHeight||0),H=Ii(getComputedStyle(n).objectFit||"cover","cover"),D=getComputedStyle(n),I=a$9(D?.objectPosition??null),f=H==="contain"?d$4(S,K,w,"contain",I):w,Z=wa(l.effects?.introStickyNavSelector,w)?.getBoundingClientRect(),X=(Z!=null?xa(f,Z.bottom):null)??f,re=uo(co(X,u,p),x),ve=Ca(n,2),ce=ve[0]??null,T=ve[1]??null,_=ce?uo(co(ce,u,p),x):null,ue=T?uo(co(T,u,p),x):null,te=document.createElement("img");te.src=n.currentSrc||n.src,te.decoding="sync",te.loading="eager",Object.assign(te.style,{position:"fixed",left:"0",top:"0",width:`${S}px`,height:`${K}px`,maxWidth:"none",maxHeight:"none",transformOrigin:"50% 50%",willChange:"transform",transition:"none",opacity:"0",display:"block",zIndex:String(x),backfaceVisibility:"hidden"}),j.current=te,re.appendChild(te),_?(_.appendChild(re),ue&&ue.appendChild(_)):ue&&ue.appendChild(re);let We=ue??_??re,Yt=document.createDocumentFragment();Yt.append(r,We),document.body.appendChild(Yt);let Y=(ie,Xe,Ie)=>{te.style.transform=`translate3d(${ie.cx}px, ${ie.cy}px, 0) translate3d(${-Xe/2}px, ${-Ie/2}px, 0) scale(${ie.scale})`;},Ve=ie=>{let Xe=H==="contain"?f:w,{proxyRasterW:Ie,proxyRasterH:Le}=va({sourceNatW:S,sourceNatH:K,startRect:Xe,contentRect:c,targetImageState:ie});te.style.width=`${Ie}px`,te.style.height=`${Le}px`;let Se=wi({fit:H,natW:Ie,natH:Le,rect:Xe,objPos:I??{x:.5,y:.5}}),xt=ie?wi({fit:ie.fit,natW:Ie,natH:Le,rect:ie.rect,objPos:ie.objPos}):ba(Ie,Le,c);return {startT:Se,endT:xt,proxyRasterW:Ie,proxyRasterH:Le}};function de(ie){let{startT:Xe,endT:Ie,proxyRasterW:Le,proxyRasterH:Se}=Ve(ie);Y(Xe,Le,Se),te.style.opacity="1",r.style.opacity="0",r.style.pointerEvents="none",te.offsetWidth,re.offsetWidth,_?.offsetWidth,ue?.offsetWidth,r.offsetWidth,requestAnimationFrame(()=>{re.style.transition=`clip-path ${W}ms ${h}`,_&&(_.style.transition=`clip-path ${W}ms ${h}`),ue&&(ue.style.transition=`clip-path ${W}ms ${h}`),te.style.transition=`transform ${W}ms ${h}`,r.style.transition=`opacity ${W}ms ${h}`,requestAnimationFrame(()=>{re.style.clipPath="inset(0px 0px 0px 0px)",_&&(_.style.clipPath="inset(0px 0px 0px 0px)"),ue&&(ue.style.clipPath="inset(0px 0px 0px 0px)"),Y(Ie,Le,Se),r.style.opacity="1",r.style.pointerEvents="none";});});}let pe=false,Re=ie=>{pe||(pe=true,de(ie));},Dt=Sa(t,120,o);Re(Ra(t,o)),Dt.then(ie=>{requestAnimationFrame(()=>{let Xe=A.current;Xe&&(ie?ga({overlayCaption:Xe,captionState:ie}):Fa({overlayCaption:Xe,fs:l,contentRect:c,vw:u,vh:p}),Xe.classList.add(a.open));});});let Ut=async ie=>{ie.propertyName==="transform"&&(te.removeEventListener("transitionend",Ut),await mo(2),Mi(o),flushSync(()=>v(true)),await Ma({index:t,fullscreenRoot:o,maxWaitMs:Math.max(300,Math.min(1e3,W+500))}),requestAnimationFrame(()=>{Oi(P,A),We.remove(),te.remove(),j.current=null;}));};te.addEventListener("transitionend",Ut,{once:true});}function Pi(e){let{originalImage:n,method:t,index:r,normalizedItems:o,styles:a,fs:l,overlayDivRef:c,duplicateImgRef:u,overlayCaptionRef:p,overlayCaptionRootRef:x,fsThumbContainerRef:W,fullscreenThumbnailPosition:h,setShowFullscreenSlider:j,setFsFadeOpening:A,addShield:P,resolveFsCaptionPlacement:v,viewportOverlay:w,closestSelector:S,baseZ:K,fullscreenRootRef:H}=e,D=o[r],f=(K??9999)-1,N=H?.current??null,Z=l.effects?.introDuration??300,$=l.effects?.introEasing??"cubic-bezier(.4,0,.22,1)";P?.(400);let X=a$7(),re=window.innerHeight,ve=false;if(n){let ue=n.closest(S??(S===void 0?".rmg__grid-item, .rmg__masonry-item, .rmg__slide":""))||n.parentElement||n;ve=ca(D,ue);}else ve=D?.type==="video"||D?.kind==="video"||D?.mediaType==="video";let ce=da({requested:t,item:D,fs:l,isVideoSlide:ve}),T=fa(a,c,Z,$),{rect:_}=pa({vw:X,vh:re,fs:l,viewportOverlay:w,fsThumbContainerRef:W,fullscreenThumbnailPosition:h,resolveFsCaptionPlacement:v});if(ya({overlay:T,styles:a,fs:l,overlayCaptionRef:p,overlayCaptionRootRef:x,normalizedItems:o,index:r,introZ:f}),ce==="fade"){Fi({overlay:T,fullscreenRoot:N,styles:a,overlayCaptionRef:p,overlayCaptionRootRef:x,setShowFullscreenSlider:j,setFsFadeOpening:A,durationMs:Z,easing:$});return}if(!n){Fi({overlay:T,fullscreenRoot:N,styles:a,overlayCaptionRef:p,overlayCaptionRootRef:x,setShowFullscreenSlider:j,setFsFadeOpening:A,durationMs:Z,easing:$});return}Oa({originalImage:n,index:r,overlay:T,fullscreenRoot:N,styles:a,fs:l,contentRect:_,vw:X,vh:re,introZ:f,durationMs:Z,easing:$,duplicateImgRef:u,overlayCaptionRef:p,overlayCaptionRootRef:x,setShowFullscreenSlider:j});}function ki(e,n){return n>1&&e===n+2}function La(e,n,t){if(!ki(n,t)){let r=t||n||1;return (e%r+r)%r}return e===0?t-1:e===n-1?0:e-1}function Ha(e,n,t){return ki(n,t)&&(e===0||e===n-1)}function Pa(e){let n=e,t=n.poster??n.thumb??n.thumbSrc??"";return typeof t=="string"?t:""}function ka(e){let{item:n,index:t,canonicalIndex:r,isClone:o,imageRef:a,cells:l,isZoomed:c,showFullscreenSlider:u,getTransform:p,onPanPointerDown:x,onSuppressNextClickCapture:W,styles:h,renderImage:j,renderMode:A="track",interactive:P=u,registerCell:v=true}=e,w=n.kind==="node",S={maxWidth:"100%",maxHeight:"100%",objectFit:"contain",touchAction:"manipulation",transformOrigin:"0 0",transform:"translate(0, 0) scale(1)",cursor:P?c?"grab":"zoom-in":"default",userSelect:"none",WebkitUserSelect:"none"},K=w?jsx("div",{"data-rmg-fs-node":"true",style:{width:"100%",height:"100%",position:"relative",pointerEvents:P?"auto":"none",userSelect:"none",WebkitUserSelect:"none",display:"flex",alignItems:"center",justifyContent:"center"},children:n.node}):n.kind==="video"?(()=>{let H=Pa(n);return H?jsx("img",{alt:n.alt??`cell-${r}`,"data-index":t,className:h.fullscreenImages,draggable:"false",decoding:"async",loading:"lazy",src:H,style:{...S,display:"block",pointerEvents:"none"}}):jsx("div",{"data-rmg-fs-video-fallback":"true",style:{width:"100%",height:"100%",background:"#000"}})})():j?j({item:n,index:r,isZoomed:c,className:h.fullscreenImages,baseStyle:S}):jsx("img",{alt:n.alt??`cell-${t}`,"data-index":t,className:h.fullscreenImages,draggable:"false",decoding:"async",loading:o?"lazy":"eager",fetchPriority:o?"low":"high",src:n.src??"",srcSet:n.srcSet??void 0,sizes:n.sizes??void 0,style:{...S,display:"block"}});return jsx("div",{"data-rmg-fs-slide":"true","data-index":t,"data-rmg-canonical-idx":r,"data-rmg-clone":o?"true":"false","data-rmg-fs-render-mode":A,ref:H=>{v&&H&&!l.current.some(D=>D.element===H)&&l.current.push({element:H,index:t});},style:{transform:A==="crossfade"?"none":p(t),display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",inset:A==="crossfade"?0:void 0,left:A==="crossfade"?void 0:0,top:A==="crossfade"?void 0:0,width:A==="crossfade"?"100%":void 0,minWidth:"100%",height:"100%",margin:"auto",touchAction:P?"none":"manipulation",userSelect:"none",WebkitUserSelect:"none",pointerEvents:P?"auto":"none"},className:h.imgMargin,children:jsx("div",{ref:a,"data-rmg-zoom-pan-root":"true","data-rmg-fs-media":"true","data-rmg-fs-media-viewport":"true",onPointerDown:w||!P?void 0:H=>x(H,a),onClickCapture:W,style:{overflow:"visible",touchAction:"none",width:"100%",height:"100%",minWidth:0,display:"flex",alignItems:"center",justifyContent:"center",position:"relative",userSelect:"none",WebkitUserSelect:"none",pointerEvents:P?"auto":"none"},children:K})},`${n.src??"slide"}-${t}`)}function po(e){let{items:n,getTransform:t,imageRefs:r,cells:o,isZoomed:a,showFullscreenSlider:l,onPanPointerDown:c,onSuppressNextClickCapture:u,styles:p,renderImage:x,canonicalLength:W,renderMode:h="track"}=e,j=W??n.length;return n.map((A,P)=>{let v=La(P,n.length,j),w=Ha(P,n.length,j);return jsx(ka,{item:A,index:P,canonicalIndex:v,isClone:w,imageRef:r.current[P],cells:o,isZoomed:a,showFullscreenSlider:l,getTransform:t,onPanPointerDown:c,onSuppressNextClickCapture:u,styles:p,renderImage:x,renderMode:h,interactive:h==="track"&&l,registerCell:h==="track"},`${A.src??"slide"}-${P}`)})}function Ai(e){return po({...e,renderMode:"crossfade",showFullscreenSlider:true})}function Di(e){let{normalizedItems:n,wrappedItems:t,setWrappedItems:r,imageRefs:o}=e;F.useEffect(()=>{if(!n.length)return;let a=n[0],l=n[n.length-1];r([l,...n,a]);},[n,r]),F.useEffect(()=>{t.length&&(o.current=t.map(()=>F.createRef()));},[t,o]);}var ji="--rmg-fs-caption-overlay-opacity",Aa=300,Da="cubic-bezier(.4,0,.22,1)",ja="linear";function yo(e,n){return n?(e%n+n)%n:e}function Na(e){return e?.overlayCrossfadeTarget??"content"}function Wa(e,n=Aa){let t=e?.overlayCrossfadeDurationMs;return typeof t=="number"&&Number.isFinite(t)?Math.max(0,t):n}function Va(e){let n=e?.overlayCrossfadeEasing;return typeof n=="string"&&n.trim()?n:Da}function Ni(e){let{caption:n,viewportWidth:t,viewportHeight:r,placement:o,fadeOutMs:a,fadeOutEasing:l,opacity:c}=e;return {position:"fixed",boxSizing:"border-box",zIndex:"calc(var(--rmg-fs-z, 9999) + 1)",...Za({placement:o,caption:n,viewportWidth:t,viewportHeight:r}),opacity:c,transition:a>0?`opacity ${a}ms ${l}`:void 0,willChange:a>0?"opacity":void 0,pointerEvents:"none"}}function $a(e){let{caption:n,placement:t,captionZoomMotion:r}=e;return {padding:"1.25rem 1.5rem",background:qa(t),color:"#fff",fontSize:"0.9rem",...n?.style??{},...r.contentStyle,pointerEvents:"none"}}function go(e){let{opacity:n,fadeOutMs:t,fadeOutEasing:r,stacked:o,active:a}=e;return {...o?{gridArea:"1 / 1",minWidth:0,position:"relative",zIndex:a?1:2}:null,opacity:n,transition:t>0?`opacity ${t}ms ${o?ja:r}`:void 0,willChange:t>0?"opacity":void 0,pointerEvents:"none"}}function Ba(e,n){let t=Object.keys(e).filter(o=>o!=="children"),r=Object.keys(n).filter(o=>o!=="children");if(t.length!==r.length)return false;for(let o of t){if(!r.includes(o))return false;let a=e[o],l=n[o];if(o==="style"&&a&&l&&typeof a=="object"&&typeof l=="object"){let c=a,u=l,p=Object.keys(c),x=Object.keys(u);if(p.length!==x.length)return false;for(let W of p)if(c[W]!==u[W])return false;continue}if(a!==l)return false}return true}function $r(e){return F.isValidElement(e)&&e.type!==F.Fragment}function _a(e){if(!e.length)return false;let[n]=e;if(!n||!$r(n.node))return false;let t=n.node;return e.every(({node:r})=>$r(r)?r.type===t.type&&Ba(t.props,r.props):false)}function za(e){let{layers:n,items:t,caption:r,isZoomed:o,captionZoomMotion:a,viewportWidth:l,viewportHeight:c,fadeOutMs:u,fadeOutEasing:p,resolveFsCaptionPlacement:x}=e,W=e.overlayOpacity,h=W==null?`var(${ji}, 1)`:String(W),j=r?.render;if(typeof j!="function"||!n.length)return null;let A=n.flatMap(I=>{let f=t[I.index];return f?[{layer:I,node:j({item:f,index:I.index,isZoomed:o})}]:[]});if(!A.length)return null;let P=x(r?.placement,r?.breakpoint,l),w=Na(r)==="content",S=A.length-1,K=r?.className,H=$a({caption:r,placement:P,captionZoomMotion:a}),D=_a(A);if(w){let I=D?A[S]?.node??null:null,f=A[S]?.layer,N=f?.key??"active",Z=(f?.opacity??1)>0;return jsx("div",{"data-rmg-fs-caption":"true","data-rmg-fs-caption-overlay":"true",className:K,style:Ni({caption:r,viewportWidth:l,viewportHeight:c,placement:P,fadeOutMs:u,fadeOutEasing:p,opacity:h}),"aria-hidden":a.interactive?void 0:true,children:jsx("div",{"data-rmg-fs-caption-surface":"true",style:H,children:I&&$r(I)?F.cloneElement(I,I.props,jsx(Er,{activeKey:N,activeReady:Z,durationMs:u,easing:p,children:A.map(({layer:$,node:X},re)=>{let ve=$r(X)?X.props.children:X;return jsx("div",{"data-rmg-fs-caption-content":"true","data-rmg-overlay-height-layer-key":String($.key),"data-rmg-overlay-height-active":re===S?"true":void 0,style:go({opacity:$.opacity,fadeOutMs:u,fadeOutEasing:p,stacked:true,active:re===S}),"aria-hidden":re===S&&a.interactive?void 0:true,children:ve},$.key)})})):jsx(Er,{activeKey:N,activeReady:Z,durationMs:u,easing:p,children:A.map(({layer:$,node:X},re)=>jsx("div",{"data-rmg-fs-caption-content":"true","data-rmg-overlay-height-layer-key":String($.key),"data-rmg-overlay-height-active":re===S?"true":void 0,style:go({opacity:$.opacity,fadeOutMs:u,fadeOutEasing:p,stacked:true,active:re===S}),"aria-hidden":re===S&&a.interactive?void 0:true,children:X},$.key))})})})}return jsx(Fragment,{children:A.map(({layer:I,node:f},N)=>jsx("div",{"data-rmg-fs-caption":"true","data-rmg-fs-caption-overlay":"true",className:K,style:Ni({caption:r,viewportWidth:l,viewportHeight:c,placement:P,fadeOutMs:u,fadeOutEasing:p,opacity:W==null?`calc(var(${ji}, 1) * ${I.opacity})`:String(W*I.opacity)}),"aria-hidden":N===S&&a.interactive?void 0:true,children:jsx("div",{"data-rmg-fs-caption-surface":"true",style:H,children:jsx("div",{"data-rmg-fs-caption-content":"true",style:go({opacity:1,fadeOutMs:0,fadeOutEasing:p,stacked:false,active:true}),children:f})})},I.key))})}function Wi(e){let{enabled:n,fsSub:t,items:r,caption:o,isZoomed:a,captionZoomMotion:l,viewportWidth:c,viewportHeight:u,closing:p,fadeOutMs:x,resolveFsCaptionPlacement:W}=e,h=Wa(o,x),j=Va(o),[A,P]=F.useState(()=>[{key:1,index:yo(t.get(),r.length),opacity:1}]),[v,w]=F.useState(0),S=F.useRef(A),K=F.useRef(yo(t.get(),r.length)),H=F.useRef(1),D=F.useRef({raf1:0,raf2:0,timeout:null}),I=F.useRef({raf1:0,raf2:0,timeout:null}),f=F.useCallback(()=>{let T=D.current;T.raf1&&cancelAnimationFrame(T.raf1),T.raf2&&cancelAnimationFrame(T.raf2),T.timeout!=null&&window.clearTimeout(T.timeout),D.current={raf1:0,raf2:0,timeout:null};},[]),N=F.useCallback(()=>{let T=I.current;T.raf1&&cancelAnimationFrame(T.raf1),T.raf2&&cancelAnimationFrame(T.raf2),T.timeout!=null&&window.clearTimeout(T.timeout),I.current={raf1:0,raf2:0,timeout:null};},[]),Z=F.useCallback(T=>{S.current=T,P(T);},[]),$=F.useCallback(T=>yo(T,r.length),[r.length]),X=F.useCallback((T,_=1)=>({key:++H.current,index:T,opacity:_}),[]),re=F.useCallback(T=>S.current.reduce((te,We)=>!te||We.opacity>te.opacity?We:te,null)??X(T),[X]),ve=F.useCallback(T=>{let _=S.current[S.current.length-1];Z([_?{..._,index:T,opacity:1}:X(T)]);},[X,Z]),ce=F.useCallback(T=>{if(p)return;f();let _=re(K.current),ue=X(T,0);if(Z([{..._,opacity:1},ue]),h<=0){Z([{...ue,opacity:1}]);return}D.current.raf1=requestAnimationFrame(()=>{D.current.raf1=0,D.current.raf2=requestAnimationFrame(()=>{D.current.raf2=0,Z([{..._,opacity:0},{...ue,opacity:1}]),D.current.timeout=window.setTimeout(()=>{Z([{...ue,opacity:1}]),D.current={raf1:0,raf2:0,timeout:null};},h);});});},[X,f,p,Z,h,re]);return F.useEffect(()=>{if(!n){f(),N(),w(0),Z([]);return}if(p){f(),N(),w(0),h<=0?Z([]):I.current.timeout=window.setTimeout(()=>{Z([]),I.current={raf1:0,raf2:0,timeout:null};},h);return}N();let T=$(t.get());K.current=T,ve(T),w(0),I.current.raf1=requestAnimationFrame(()=>{I.current.raf1=0,I.current.raf2=requestAnimationFrame(()=>{I.current.raf2=0,w(1);});});let _=t.onEvent(ue=>{if(ue.type!=="internalIndex")return;let te=$(ue.index);te!==K.current&&(K.current=te,ce(te));});return ()=>{f(),N(),_();}},[f,N,p,ce,n,h,t,$,ve]),F.useEffect(()=>()=>{f(),N();},[f,N]),A.length?jsx(Fragment,{children:za({layers:A,items:r,caption:o,isZoomed:a,captionZoomMotion:l,viewportWidth:c,viewportHeight:u,fadeOutMs:h,fadeOutEasing:j,overlayOpacity:v,resolveFsCaptionPlacement:W})}):null}function qa(e){return e==="top"?"linear-gradient(to bottom, rgba(0,0,0,0.75), transparent)":e==="left"?"linear-gradient(to right, rgba(0,0,0,0.75), transparent)":e==="right"?"linear-gradient(to left, rgba(0,0,0,0.75), transparent)":"linear-gradient(to top, rgba(0,0,0,0.75), transparent)"}function Za(e){let{placement:n,caption:t,viewportWidth:r,viewportHeight:o}=e,a=f$3(r),l=g$2(o),c=a$8(t?.width,280,a,a),u=t?.height==null?void 0:a$8(t.height,200,a,l);return n==="top"?{top:0,left:0,right:0,...u!=null?{height:u}:{}}:n==="left"?{top:0,bottom:0,left:0,width:c}:n==="right"?{top:0,bottom:0,right:0,width:c}:{bottom:0,left:0,right:0,...u!=null?{height:u}:{}}}var Ya=[],Ua={};function Xa(e){return F.useMemo(()=>[],[])}function Ga(){let e=F.useRef(false),n=F.useRef(false),t=F.useCallback(()=>{},[]);return F.useMemo(()=>({isPinching:e,isTouchPinching:n,entryOverlayZoomMotion:void 0,captionZoomMotion:void 0,handlePanPointerStart:t,handleZoomToggle:t,resetAllZoomDom:t,resetForSlideNavigation:t,forceResetZoom:t}),[e,n,t])}function Ka(e){return e.reduce((n,t)=>t.runtime?{...n,...t.runtime}:n,{})}function Mn(e,n){return (e%n+n)%n}function Ja(e){return e.map(n=>{let t=n;return `${n.kind}|${t.src??""}|${t.srcSet??""}|${t.sizes??""}|${t.poster??""}`}).join("||")}function $i(e){if(!e)return;try{e?.pause?.();}catch{}let n=e?.plyr??null;try{n?.pause?.();}catch{}try{n?.media?.pause?.();}catch{}}function Qa(e){let{canonicalIndex:n,canonicalLength:t}=e;if(!Number.isFinite(n)||!Number.isFinite(t)||t<=0)return null;let r=Mn(n,t);return t>1?r+1:r}function el(e){return !!e.enabled&&e.showFullscreenModal&&e.showFullscreenSlider&&!e.closingModal&&e.item?.kind==="video"}function tl(e){let n=e?.plyr??null;if(!n||typeof n.play!="function")return false;try{let t=n.play();return t&&typeof t.catch=="function"&&t.catch(()=>{}),!0}catch{return false}}function nl(e){if(!e)return;let{width:n,height:t,minWidth:r,minHeight:o,maxWidth:a,maxHeight:l,flex:c,flexBasis:u,flexGrow:p,flexShrink:x,alignSelf:W,margin:h,marginTop:j,marginRight:A,marginBottom:P,marginLeft:v,marginBlock:w,marginBlockStart:S,marginBlockEnd:K,marginInline:H,marginInlineStart:D,marginInlineEnd:I}=e;return {width:n,height:t,minWidth:r,minHeight:o,maxWidth:a,maxHeight:l,flex:c,flexBasis:u,flexGrow:p,flexShrink:x,alignSelf:W,margin:h,marginTop:j,marginRight:A,marginBottom:P,marginLeft:v,marginBlock:w,marginBlockStart:S,marginBlockEnd:K,marginInline:H,marginInlineStart:D,marginInlineEnd:I}}function rl(e){let{fsEnabled:n,fsSub:t,showFullscreenModal:r,setShowFullscreenModal:o,isClick:a,isAnimatingRef:l,overlayDivRef:c,cells:u,setShowFullscreenSlider:p,slidesForFullscreen:x,sliderForFullscreen:W,isWrappingForFullscreen:h,setClosingModal:j,closeButtonRef:A,counterRef:P,leftChevronRef:v,rightChevronRef:w,centerSliderForFullscreen:S,setSliderIndexForFullscreen:K,layout:H,expandableImageRefs:D,resolveLayoutlessTarget:I,entryMapRef:f,entryMediaLayout:N,introFade:Z,introDuration:$,introEasing:X,fullscreenSliderApi:re,slideIndex:ve,isZoomClick:ce,isZoomed:T,windowSize:_,imageRefs:ue,wrappedItems:te,setWrappedItems:We,scale:Yt,showFullscreenSlider:Y,isZooming:Ve,singleModePlyrRefs:de,wrappedModePlyrRefs:pe,closingModal:Re,duplicateImgRef:Dt,direction:Ut,sliderGap:ie,sliderDuration:Xe,sliderFriction:Ie,sliderSkipSnaps:Le,sliderStrictSnaps:Se,suppressLoopRef:xt,fsFadeOpening:qe,normalizedItems:J,fsThumbContainerRef:ft,fullscreenThumbnailSlot:De,setFullscreenThumbnailMountEl:ke,showFsEntryOverlayMount:Kt,fsIntroReq:He,clearFsIntroReq:Nn,styles:Ze,fs:M,overlayCaptionRef:wr,overlayCaptionRootRef:mn,setFsFadeOpening:be,addShield:Wn,resolveFsCaptionPlacement:tt,requestFsCloseRef:Jt,cancelFsCloseRef:Jn,suppressNextClickRef:Tt,currentImage:wn,scaleRef:Qn,pointerDownRef:Vn,interactionModeRef:Qt,boundsX:an,boundsY:it,bodyX:jt,bodyY:ln,locX:Nt,locY:Ee,prevX:cn,prevY:$n,offX:er,offY:xn,tgtX:Tn,tgtY:Ct,axisRef:Ft,animRef:tr,setScale:Bn,previousZoom:d,panRef:b,changingSlides:q,fsIndexRef:fe,entriesObject:z,syncFullscreenSourceFromIndex:xe,setFullscreenOpen:Ge,runtimePlugins:nt=Ya}=e,je=F.useMemo(()=>Ka(nt),[nt]),pn=je.renderSlides??po,en=je.renderCrossfadeSlides??Ai,se=je.usePlyrProps??Xa,Ot=je.useZoomPanRuntime??Ga,rt=je.defaultPlayerStyle??Ua,Wt=!!je.usePlyrProps,Te=!!M.lazyLoad?.images?.enabled,he=Wt&&!!M.lazyLoad?.videos?.enabled,st=F.useRef(new Set),at=F.useRef(new Set),yn=F.useRef(new Set),Ye=F.useRef(new Set),tn=F.useRef(0),mt=F.useRef(new Set),Xt=F.useRef(new Set),Vt=F.useRef(new Map),E=F.useRef(new Set),B=F.useRef(new Set),oe=F.useRef(new Set),[ye,lt]=F.useState(0),[$e,Ke]=F.useState(null),[Ue,me]=F.useState(0),Q=J.length||0,un=F.useRef(0),It=F.useMemo(()=>Ja(J),[J]),St=F.useRef(null);!St.current&&je.createVideoSnapshotStore&&(St.current=je.createVideoSnapshotStore());let Lt=St.current;function Et(){yn.current.forEach(y=>y());}function Ht(){Ye.current.forEach(y=>y());}let Pt=F.useCallback(y=>{if(!Q)return;let R=Mn(y,Q);if(he){let V=oe.current;at.current=new Set([R,...V]),Ht();}Te&&(st.current=new Set([R]),Et());},[Q,Te,he]),nn=F.useCallback(()=>{oe.current.clear(),at.current=new Set,st.current=new Set;},[]),pt=F.useCallback(()=>{let y=t.get?.(),R=typeof y=="number"&&Number.isFinite(y)?y:tn.current;typeof R!="number"||!Number.isFinite(R)||(tn.current=R,Pt(R));},[t,Pt]);F.useEffect(()=>{if(!Te&&!he||!t)return;let y=R=>{typeof R=="number"&&(tn.current=R,Pt(R));};if(r){let R=t.get?.();typeof R=="number"&&y(R);}if(typeof t.subscribe=="function"){let R=t.subscribe(V=>y(V));return ()=>R?.()}if(typeof t.onEvent=="function"){let R=t.onEvent(V=>{if(typeof V=="number")y(V);else if(typeof V?.index=="number")y(V.index);else {let ee=t.get?.();typeof ee=="number"&&y(ee);}});return ()=>R?.()}},[Te,he,t,r,Pt]),F.useEffect(()=>{if(!t)return;let y=R=>{typeof R!="number"||!Number.isFinite(R)||lt(R);};if(r){let R=t.get?.();typeof R=="number"&&y(R);}if(typeof t.subscribe=="function"){let R=t.subscribe(V=>y(V));return ()=>R?.()}if(typeof t.onEvent=="function"){let R=t.onEvent(V=>{if(typeof V=="number")y(V);else if(typeof V?.index=="number")y(V.index);else {let ee=t.get?.();typeof ee=="number"&&y(ee);}});return ()=>R?.()}},[t,r]);function Cn(){let y=window;return y.__rmgZ||(y.__rmgZ=9999),y.__rmgZ+=1,y.__rmgZ}let kt=F.useRef(9999),$t=F.useRef(null);F.useEffect(()=>{r&&(kt.current=Cn());},[r]);let Bt=F.useRef(r);F.useEffect(()=>{let y=Bt.current;Bt.current=r,!(!r||y)&&(nn(),pt());},[r,nn,pt]);let _t=F.useRef(It);F.useEffect(()=>{_t.current!==It&&(_t.current=It,E.current.clear(),B.current.clear(),nn(),Lt?.reset?.(),r&&pt());},[It,nn,r,pt,Lt]);let Pe=H==="entries"&&typeof z.render?.overlay=="function";F.useEffect(()=>{if(!He)return;let{originalImage:y,index:R,closestSelector:V,method:ee}=He;Ke(ee??null),me(R);let Ae=De?.position??null;Pi({originalImage:y,method:ee,index:R,normalizedItems:J,styles:Ze,fs:M,overlayDivRef:c,duplicateImgRef:Dt,overlayCaptionRef:wr,overlayCaptionRootRef:mn,fsThumbContainerRef:ft,fullscreenThumbnailPosition:Ae,setShowFullscreenSlider:p,setFsFadeOpening:be,addShield:Wn,resolveFsCaptionPlacement:tt,viewportOverlay:Pe?{placement:z.overlay?.placement,width:z.overlay?.width,height:z.overlay?.height,breakpoint:z.overlay?.breakpoint}:void 0,closestSelector:V,baseZ:kt.current,fullscreenRootRef:$t}),Nn();},[z.overlay,He,De,Pe]),Di({normalizedItems:J,wrappedItems:te,setWrappedItems:We,imageRefs:ue}),F.useEffect(()=>{u.current=[];},[u,It,te.length]);let Be=Ot({fs:M,entriesObject:z,hasEntriesViewportOverlay:Pe,layout:H,resolveFsCaptionPlacement:tt,windowSize:_,currentImage:wn,scaleRef:Qn,setScale:Bn,previousZoom:d,suppressLoopRef:xt,locX:Nt,prevX:cn,offX:er,tgtX:Tn,locY:Ee,prevY:$n,offY:xn,tgtY:Ct,bodyX:jt,bodyY:ln,boundsX:an,boundsY:it,animRef:tr,panRef:b,imageRefs:ue,changingSlides:q,fullscreenSliderApi:re,isZoomed:T,pointerDownRef:Vn,interactionModeRef:Qt,axisRef:Ft,suppressNextClickRef:Tt,closingModal:Re});F.useEffect(()=>{if(!r)return;let y=t.get();fe.current=y,xe(y);},[r,t]),F.useEffect(()=>{if(!r||H!=="entries"||Re||!t||!Q||!f.current?.length)return;let y=false,R=async ee=>{if(typeof ee!="number")return;let Ae=Mn(ee,Q),ae=f.current?.[Ae];if(!ae)return;let wt=++un.current;An(ae.entryIndex)||await kr(ae.entryIndex),await Ar(ae.entryIndex),!y&&wt===un.current&&xe(Ae);},V=t.get?.();return typeof V=="number"&&R(V),()=>{y=true,un.current+=1;}},[r,H,Re,t,Q,f,xe]);let yt=!!r&&M.caption?.layout==="overlay"&&typeof M.caption?.render=="function",ct=J.length>1?ie??0:0,_n=se({items:J,source:M.video?.source,options:M.video?.options}),zn=se({items:te,source:M.video?.source,options:M.video?.options}),gt=F.useMemo(()=>d$2(),[]),rn=Ut==="rtl"?-1:1,Fn=F.useMemo(()=>c$2({length:te.length,sign:rn,gap:ct}),[ct,te.length,rn]),On=F.useMemo(()=>J.map(()=>F.createRef()),[It]),Mt=F.useRef([]),qn=F.useRef([]),nr=Be.handlePanPointerStart,bo=Be.handleZoomToggle,rr=Be.resetForSlideNavigation,Br=Be.resetAllZoomDom,or=Be.forceResetZoom??Be.resetAllZoomDom,ir=Be.isPinching,sr=Be.isTouchPinching,Zn=Be.captionZoomMotion,_r=Be.entryOverlayZoomMotion;function zt(y){let R=y;return `${y.kind}|${R.src??""}|${R.srcSet??""}|${R.sizes??""}|${R.poster??""}`}F.useEffect(()=>()=>{Lt?.destroy?.();},[Lt]);let bt=r&&!Y,on=Q?Mn(Ue,Q):null,ar=(()=>{let y=t.get?.();return typeof y=="number"&&Number.isFinite(y)?y:ye})(),lr=Q?Mn(ar,Q):null,cr=on!=null?J[on]?.kind??null:null,ur=he&&!!bt&&cr!=="video",dr=F.useRef(null);F.useEffect(()=>{r||(dr.current=null);},[r]),F.useEffect(()=>{if(!Q)return;let y=Mn(Ue,Q),R=J[y]??null;if(!el({enabled:M.video?.playOnOpen,showFullscreenModal:r,showFullscreenSlider:Y,closingModal:Re,item:R}))return;let V=Qa({canonicalIndex:y,canonicalLength:Q});if(V==null)return;let ee=Q>1?pe:de,Ae=`${It}|${y}|${Ue}`;if(dr.current===Ae)return;dr.current=Ae;let ae=false,wt=null,At=performance.now()+1600,pr=()=>{if(ae)return;let Zr=ee.current[V]??null;tl(Zr)||performance.now()>=At||(wt=window.requestAnimationFrame(pr));};return wt=window.requestAnimationFrame(pr),()=>{ae=true,wt!=null&&window.cancelAnimationFrame(wt);}},[Q,Re,M.video?.playOnOpen,Ue,It,J,r,Y,de,pe]);let zr=pn({items:J,plyrList:_n,getTransform:gt,imageRefs:ue,playerRefs:de,cells:u,isZoomed:T,showFullscreenSlider:Y,defaultPlayerStyle:rt,fsVideoStyle:M.video?.style,fsVideoClassName:M.video?.className,onPanPointerDown:(y,R)=>nr(y,R),onSuppressNextClickCapture:y=>{Tt.current&&(Tt.current=false,y.preventDefault(),y.stopPropagation());},renderCaption:M.caption?.render,captionClassName:M.caption?.className,captionStyle:M.caption?.style,captionZoomMotion:Zn,fsCaptionPlacement:M.caption?.placement,fsCaptionWidth:M.caption?.width,fsCaptionHeight:M.caption?.height,fsCaptionBreakpoint:M.caption?.breakpoint,fsCaptionLayout:M.caption?.layout,fsViewportOverlayPlacement:Pe?z.overlay?.placement:void 0,fsViewportOverlayWidth:Pe?z.overlay?.width:void 0,fsViewportOverlayHeight:Pe?z.overlay?.height:void 0,fsViewportOverlayBreakpoint:Pe?z.overlay?.breakpoint:void 0,viewportWidth:_.width,viewportHeight:_.height,resolveFsCaptionPlacement:tt,styles:{imgMargin:Ze.imgMargin,fullscreenImages:Ze.fullscreenImages},renderImage:M.renderImage,fsLazy:M.lazyLoad,fsLazyAllowedImagesRef:st,fsLazyListenersImagesRef:yn,fsLazyAllowedVideosRef:at,fsLazyListenersVideosRef:Ye,fsDecodedImagesRef:mt,fsCustomDecodedImagesRef:Xt,fsCustomResolvedSrcByKeyRef:Vt,fsPreparedVideosRef:E,videoSnapshotStore:Lt,canonicalLength:Q,activeCanonicalIndex:lr,openingCanonicalIndex:on,openingInProgress:bt,deferLiveVideoUntilVisible:ur,getMediaKey:zt}),xr=pn({items:te,plyrList:zn,getTransform:Fn,imageRefs:ue,playerRefs:pe,cells:u,isZoomed:T,showFullscreenSlider:Y,defaultPlayerStyle:rt,fsVideoStyle:M.video?.style,fsVideoClassName:M.video?.className,onPanPointerDown:(y,R)=>nr(y,R),onSuppressNextClickCapture:y=>{Tt.current&&(Tt.current=false,y.preventDefault(),y.stopPropagation());},renderCaption:M.caption?.render,captionClassName:M.caption?.className,captionStyle:M.caption?.style,captionZoomMotion:Zn,fsCaptionPlacement:M.caption?.placement,fsCaptionWidth:M.caption?.width,fsCaptionHeight:M.caption?.height,fsCaptionBreakpoint:M.caption?.breakpoint,fsCaptionLayout:M.caption?.layout,fsViewportOverlayPlacement:Pe?z.overlay?.placement:void 0,fsViewportOverlayWidth:Pe?z.overlay?.width:void 0,fsViewportOverlayHeight:Pe?z.overlay?.height:void 0,fsViewportOverlayBreakpoint:Pe?z.overlay?.breakpoint:void 0,viewportWidth:_.width,viewportHeight:_.height,resolveFsCaptionPlacement:tt,styles:{imgMargin:Ze.imgMargin,fullscreenImages:Ze.fullscreenImages},renderImage:M.renderImage,fsLazy:M.lazyLoad,fsLazyAllowedImagesRef:st,fsLazyListenersImagesRef:yn,fsLazyAllowedVideosRef:at,fsLazyListenersVideosRef:Ye,fsDecodedImagesRef:mt,fsCustomDecodedImagesRef:Xt,fsCustomResolvedSrcByKeyRef:Vt,fsPreparedVideosRef:E,videoSnapshotStore:Lt,canonicalLength:Q,activeCanonicalIndex:lr,openingCanonicalIndex:on,openingInProgress:bt,deferLiveVideoUntilVisible:ur,getMediaKey:zt}),gn=en({items:J,plyrList:_n,getTransform:gt,imageRefs:{current:On},playerRefs:Mt,cells:qn,isZoomed:T,showFullscreenSlider:true,defaultPlayerStyle:rt,fsVideoStyle:M.video?.style,fsVideoClassName:M.video?.className,onPanPointerDown:(y,R)=>nr(y,R),onSuppressNextClickCapture:y=>{Tt.current&&(Tt.current=false,y.preventDefault(),y.stopPropagation());},renderCaption:M.caption?.render,captionClassName:M.caption?.className,captionStyle:M.caption?.style,captionZoomMotion:Zn,fsCaptionPlacement:M.caption?.placement,fsCaptionWidth:M.caption?.width,fsCaptionHeight:M.caption?.height,fsCaptionBreakpoint:M.caption?.breakpoint,fsCaptionLayout:M.caption?.layout,fsViewportOverlayPlacement:Pe?z.overlay?.placement:void 0,fsViewportOverlayWidth:Pe?z.overlay?.width:void 0,fsViewportOverlayHeight:Pe?z.overlay?.height:void 0,fsViewportOverlayBreakpoint:Pe?z.overlay?.breakpoint:void 0,viewportWidth:_.width,viewportHeight:_.height,resolveFsCaptionPlacement:tt,styles:{imgMargin:Ze.imgMargin,fullscreenImages:Ze.fullscreenImages},renderImage:M.renderImage,fsLazy:M.lazyLoad,fsLazyAllowedImagesRef:st,fsLazyListenersImagesRef:yn,fsLazyAllowedVideosRef:at,fsLazyListenersVideosRef:Ye,fsDecodedImagesRef:mt,fsCustomDecodedImagesRef:Xt,fsCustomResolvedSrcByKeyRef:Vt,fsPreparedVideosRef:E,videoSnapshotStore:Lt,canonicalLength:J.length,openingCanonicalIndex:null,openingInProgress:false,deferLiveVideoUntilVisible:false,getMediaKey:zt}),bn=F.useCallback(()=>{let y=new Set;for(let V of de.current)!V||y.has(V)||(y.add(V),$i(V));for(let V of pe.current)!V||y.has(V)||(y.add(V),$i(V));if(typeof document>"u")return;document.querySelectorAll('[data-rmg-fs-slide="true"] video, [data-rmg-fs-slide="true"] audio').forEach(V=>{try{V.pause();}catch{}});},[de,pe]);F.useEffect(()=>{Re&&bn();},[Re,bn]),F.useEffect(()=>{r||bn();},[r,bn]);let Yn=F.useRef(new Set);function fr(y,R=3){let V=y.filter(ae=>ae.kind==="image"),ee=0,Ae=async()=>{for(;ee<V.length;){let ae=V[ee++],wt=`${ae.src??""}|${ae.srcSet??""}|${ae.sizes??""}`;if(Yn.current.has(wt))continue;Yn.current.add(wt);let At=new Image;At.decoding="async",At.fetchPriority="low",At.src=ae.src,At.srcset=ae.srcSet??"",At.sizes=ae.sizes??"";try{await At.decode();}catch{}}};return Promise.all(Array.from({length:R},()=>Ae()))}let Un=F.useMemo(()=>J.map(y=>y.kind==="image"?y.src??"":"").join("|"),[J]),Tr=F.useRef(null);F.useEffect(()=>{if(Te||r||Tr.current===Un)return;Tr.current=Un;let y=()=>{fr(J,3);};"requestIdleCallback"in window?window.requestIdleCallback(y,{timeout:2e3}):setTimeout(y,250);},[Te,r,Un,J]);let hn=d$3();F.useEffect(()=>{if(!hn||!r||!t||!Q)return;let y=V=>{if(typeof V!="number")return;let ee=Mn(V,Q);hn.notifyFsVisibleIndex(ee);},R=t.get?.();if(typeof R=="number"&&y(R),typeof t.subscribe=="function"){let V=t.subscribe(ee=>y(ee));return ()=>V?.()}if(typeof t.onEvent=="function"){let V=t.onEvent(ee=>{if(typeof ee=="number")y(ee);else if(typeof ee?.index=="number")y(ee.index);else {let Ae=t.get?.();typeof Ae=="number"&&y(Ae);}});return ()=>V?.()}},[hn,r,t,Q]);let Xn=F.useCallback(async y=>{let R=J[y];if(!R||R.kind!=="image")return;let V=zt(R);if(mt.current.has(V))return;let ee=new Image;ee.decoding="async",ee.fetchPriority="high",ee.src=R.src,ee.srcset=R.srcSet??"",ee.sizes=R.sizes??"";try{await ee.decode(),mt.current.add(V);}catch{}},[J]),Cr=F.useCallback(async y=>{let R=J[y];if(!R||R.kind!=="video")return;let V=zt(R);if(B.current.has(V))return;B.current.add(V);let ee=R.poster??R.thumbSrc??null;if(ee)try{let ae=new Image;ae.decoding="async",ae.fetchPriority="high",ae.src=ee,await ae.decode().catch(()=>{});}catch{}let Ae=R.src||R.videoSrc||R.sources?.[0]?.src||null;if(typeof Ae=="string"&&Ae)try{let ae=document.createElement("video");ae.preload="auto",ae.muted=!0,ae.playsInline=!0,ee&&(ae.poster=ee),ae.src=Ae,ae.load(),setTimeout(()=>{try{ae.removeAttribute("src"),ae.load();}catch{}},1500);}catch{}oe.current.add(y),at.current.add(y),Ht();},[J]);F.useEffect(()=>{if(!hn||!(Te||he))return;let R=hn.baseVisibleSub.subscribe(V=>{let ee=V?.index;if(typeof ee!="number"||!Q)return;let Ae=Mn(ee,Q);Te&&Xn(Ae),he&&Cr(Ae);});return ()=>R?.()},[hn,Te,he,Xn,Cr]);let mr=De?.position??null,qr=mr==="left"?"row-reverse":mr==="right"?"row":mr==="top"?"column-reverse":"column",Fr=nl(De?.style),Or=J.length;return jsx(Fragment,{children:n&&jsxs(di,{fsSub:t,open:r,onClose:()=>o(false),isClick:a,isAnimating:l,overlayDivRef:c,cells:u,setShowFullscreenSlider:p,cellCount:Or,slides:x,slider:W,wrappedItems:te,setClosingModal:j,closeButtonRef:A,counterRef:P,leftChevronRef:v,rightChevronRef:w,centerSlider:S,setSliderIndex:K,onForceResetZoom:()=>or(),layout:H,expandableImageRefs:D,resolveLayoutlessTarget:I,entryMapRef:f,entryMediaLayout:N,introFade:Z,introDuration:$,introEasing:X,requestFsCloseRef:Jt,cancelFsCloseRef:Jn,fs:M,styles:Ze,syncFullscreenSourceFromIndex:xe,baseZ:kt.current,rootRef:$t,introMethod:$e,setLatchedIntroMethod:Ke,latchedIntroIndex:Ue,children:[jsxs("div",{style:{position:"absolute",inset:0,display:"flex",flexDirection:qr},children:[jsx("div",{style:{flex:"1 1 auto",position:"relative",minHeight:0},children:jsx(ao,{sub:t,ref:re,cellCount:Or,slideIndex:ve,isClick:ce,isZoomed:T,windowSize:_,show:r,handleZoomToggle:bo,imageRefs:ue.current,cells:u,isPinching:ir,scale:Yt,isTouchPinching:sr,showFullscreenSlider:Y,isZooming:Ve,plyrRefs:J.length>1?pe:de,plyrRef:J.length>1?pe:de,closingModal:Re,counterRef:P,leftChevronRef:v,rightChevronRef:w,overlayDivRef:c,direction:Ut,isWrapping:h,sliderGap:ct,sliderDuration:Xe,sliderFriction:Ie,skipSnaps:Le,strictSnaps:Se,suppressLoopRef:xt,fadeOpening:qe,introFade:Z,controlsFade:!!M.effects?.crossfade?.controls,dragFade:!!M.effects?.crossfade?.drag,slideFadeDuration:M.effects?.crossfade?.durationMs,slideFadeEasing:M.effects?.crossfade?.easing,normalizedItems:J,crossfadeSlides:gn,introDuration:$,introEasing:X,resetAllZoomDom:()=>rr(),requestFsCloseRef:Jt,introMethod:$e,fs:M,chromeStyles:Ze,children:J.length>1?xr:zr})}),De&&jsx("div",{ref:ke,style:{flex:"0 0 auto",position:"relative",zIndex:1,display:"flex",alignItems:"center",justifyContent:"center",overflow:"visible",backgroundColor:"transparent",...Fr||{}}})]}),yt?jsx(Wi,{enabled:yt,fsSub:t,items:J,caption:M.caption,isZoomed:T,captionZoomMotion:Zn,viewportWidth:_.width,viewportHeight:_.height,interactive:!!Y,closing:!!Re,resolveFsCaptionPlacement:tt}):null,Kt?jsx(Si,{enabled:Kt,fsSub:t,entriesObject:z,entryMapRef:f,syncFullscreenSourceFromIndex:xe,resetAllZoomDom:Br,closing:!!Re,overlayZoomMotion:_r,viewportWidth:_.width,viewportHeight:_.height,resolveFsCaptionPlacement:tt}):null]})})}var Uc=rl;export{rl as FullscreenRuntime,Uc as default,Qa as getFullscreenVideoOpenRefIndex,el as shouldPlayFullscreenVideoOnOpen};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as SkeletonLayoutRoot, S as SkeletonNode$1, d as SkeletonWrapStyle, a as SkeletonLength, b as SkeletonShimmer } from './layout-
|
|
1
|
+
import { c as SkeletonLayoutRoot, S as SkeletonNode$1, d as SkeletonWrapStyle, a as SkeletonLength, b as SkeletonShimmer } from './layout-BOy4geKv.mjs';
|
|
2
2
|
import { R as ResponsiveGridSpan } from './types-Do4Pq-Td.mjs';
|
|
3
3
|
|
|
4
4
|
type GridSkeletonWrapStyle = SkeletonWrapStyle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as SkeletonLayoutRoot, S as SkeletonNode$1, d as SkeletonWrapStyle, a as SkeletonLength, b as SkeletonShimmer } from './layout-
|
|
1
|
+
import { c as SkeletonLayoutRoot, S as SkeletonNode$1, d as SkeletonWrapStyle, a as SkeletonLength, b as SkeletonShimmer } from './layout-BOy4geKv.mjs';
|
|
2
2
|
import { R as ResponsiveMasonrySpan } from './types-Br27DWP7.mjs';
|
|
3
3
|
|
|
4
4
|
type MasonryPlacement = "balanced" | "roundRobin" | "horizontalOrder";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-HK2DPKES.mjs';import {jsx}from'react/jsx-runtime';var p={skelRect:"ge",skelSquare:"ce",skelCircle:"pe",skelGroup:"he",skelRow:"fe",skelCol:"be",skelStack:"ve",skelText:"B",skelTextLine:"ue",skelTile:"ye",skelCardShimmer:"p",rmgSharedSkeletonShimmer:"h",skelShimmer:"C"};var R="68%",W="__NODE_SEL__",ue="(font: -apple-system-body) and (-webkit-hyphens: none)";function he(e){let n=Math.max(1,Math.trunc(e.lines??1)),t=Math.max(0,e.barHeight*e.lineHeight),o=Math.min(Math.max(0,e.barHeight),t),i=Math.max(t-o,0);return {lines:n,lineBoxHeight:t,barHeight:o,leading:i,paddingBlock:i/2,rowGap:i,totalHeight:t*n}}function L(e){let n=Math.max(e.barHeight,Math.floor(e.lineBoxHeight)),t=Math.max(n-e.barHeight,0);return {...e,lineBoxHeight:n,leading:t,paddingBlock:t/2,rowGap:t,totalHeight:n*e.lines}}function B(e,n=a$1){return !e||typeof e!="object"||Array.isArray(e)?false:Object.keys(e).some(t=>S(t,n)!=null)}function k(e,n){let t=Number.isFinite(e)?Math.trunc(e):n;return Math.max(1,t)}function C(e,n){let t=Number.isFinite(e)?Number(e):n;return Math.max(0,t)}function w(e,n){let t=Number.isFinite(e)?Number(e):n;return Math.max(0,t)}function S(e,n=a$1){let t=n[e];if(Number.isFinite(t))return Math.max(0,t);let o=Number(e);return Number.isFinite(o)?Math.max(0,o):null}function c(e){return typeof e=="number"?`${e}px`:e}function b(e){return Array.isArray(e)?e.map(c):c(e)}function pe(e){let{barWidths:n,lineCount:t,finalBarWidthFallback:o}=e;return t<=0?[o]:n.length>=t?n.slice(0,t):Array.from({length:t},(i,r)=>r<n.length?n[r]:r===t-1?o:"100%")}function O(e){let n=ke(e.lines,1,e.minWidth,e.breakpointMap),t=$(e.barHeight,typeof e.barHeight=="number"?e.barHeight:0,e.minWidth,e.breakpointMap),o=M(e.lineHeight,typeof e.lineHeight=="number"?e.lineHeight:1,e.minWidth,e.breakpointMap),i=Re(e.lastBarWidth,R,e.minWidth,e.breakpointMap),r=be(e.barWidth,"100%",e.minWidth,e.breakpointMap),s=e.barWidth==null?Array.from({length:n},(l,d)=>d===n-1?i:"100%"):Array.isArray(r)?r:Array.from({length:n},()=>r);return {lineCount:n,barWidths:pe({barWidths:s,lineCount:n,finalBarWidthFallback:e.barWidth==null?i:"100%"}),metrics:he({barHeight:t,lineHeight:o,lines:n})}}function me(e,n){return e.lineCount===n.lineCount&&e.metrics.totalHeight===n.metrics.totalHeight&&e.metrics.barHeight===n.metrics.barHeight&&e.metrics.paddingBlock===n.metrics.paddingBlock&&e.metrics.rowGap===n.metrics.rowGap&&e.barWidths.length===n.barWidths.length&&e.barWidths.every((t,o)=>t===n.barWidths[o])}function fe(e,n=a$1){return B(e,n)}function ce(e,n=a$1){return B(e,n)}function ge(e,n=a$1){return B(e,n)}function Se(e,n=a$1){return B(e,n)}function xe(e,n=a$1){return B(e,n)}function D(e,n=1,t=a$1){if(!fe(e,t))return [{minWidth:0,lines:k(typeof e=="number"?e:void 0,n)}];let o=Object.entries(e).map(([i,r])=>{let s=S(i,t);return s==null?null:{minWidth:s,lines:k(typeof r=="number"?r:Number(r),n)}}).filter(i=>!!i).sort((i,r)=>i.minWidth-r.minWidth).reduce((i,r)=>{let s=i[i.length-1];return s&&s.minWidth===r.minWidth?s.lines=r.lines:i.push(r),i},[]);return o.length===0?[{minWidth:0,lines:k(void 0,n)}]:(o[0].minWidth>0&&o.unshift({minWidth:0,lines:k(void 0,n)}),o)}function F(e,n=0,t=a$1){if(!ce(e,t))return [{minWidth:0,barHeight:C(typeof e=="number"?e:void 0,n)}];let o=Object.entries(e).map(([i,r])=>{let s=S(i,t);return s==null?null:{minWidth:s,barHeight:C(typeof r=="number"?r:Number(r),n)}}).filter(i=>!!i).sort((i,r)=>i.minWidth-r.minWidth).reduce((i,r)=>{let s=i[i.length-1];return s&&s.minWidth===r.minWidth?s.barHeight=r.barHeight:i.push(r),i},[]);return o.length===0?[{minWidth:0,barHeight:C(void 0,n)}]:(o[0].minWidth>0&&o.unshift({minWidth:0,barHeight:o[0].barHeight}),o)}function V(e,n=1,t=a$1){if(!ge(e,t))return [{minWidth:0,lineHeight:w(typeof e=="number"?e:void 0,n)}];let o=Object.entries(e).map(([i,r])=>{let s=S(i,t);return s==null?null:{minWidth:s,lineHeight:w(typeof r=="number"?r:Number(r),n)}}).filter(i=>!!i).sort((i,r)=>i.minWidth-r.minWidth).reduce((i,r)=>{let s=i[i.length-1];return s&&s.minWidth===r.minWidth?s.lineHeight=r.lineHeight:i.push(r),i},[]);return o.length===0?[{minWidth:0,lineHeight:w(void 0,n)}]:(o[0].minWidth>0&&o.unshift({minWidth:0,lineHeight:o[0].lineHeight}),o)}function ke(e,n=1,t=0,o=a$1){let i=D(e,n,o),r=i[0]?.lines??k(void 0,n);for(let s of i)t>=s.minWidth&&(r=s.lines);return r}function $(e,n=0,t=0,o=a$1){let i=F(e,n,o),r=i[0]?.barHeight??C(void 0,n);for(let s of i)t>=s.minWidth&&(r=s.barHeight);return r}function M(e,n=1,t=0,o=a$1){let i=V(e,n,o),r=i[0]?.lineHeight??w(void 0,n);for(let s of i)t>=s.minWidth&&(r=s.lineHeight);return r}function be(e,n="100%",t=0,o=a$1){let i=K(e,n,o),r=i[0]?.barWidth??b(n);for(let s of i)t>=s.minWidth&&(r=s.barWidth);return r}function K(e,n="100%",t=a$1){if(!Se(e,t))return [{minWidth:0,barWidth:b(e??n)}];let o=Object.entries(e).map(([i,r])=>{let s=S(i,t);return s==null||r==null?null:{minWidth:s,barWidth:b(r)}}).filter(i=>!!i).sort((i,r)=>i.minWidth-r.minWidth).reduce((i,r)=>{let s=i[i.length-1];return s&&s.minWidth===r.minWidth?s.barWidth=r.barWidth:i.push(r),i},[]);return o.length===0?[{minWidth:0,barWidth:b(n)}]:(o[0].minWidth>0&&o.unshift({minWidth:0,barWidth:b(n)}),o)}function q(e,n=R,t=a$1){if(!xe(e,t))return [{minWidth:0,lastBarWidth:c(e??n)}];let o=Object.entries(e).map(([i,r])=>{let s=S(i,t);return s==null||r==null?null:{minWidth:s,lastBarWidth:c(r)}}).filter(i=>!!i).sort((i,r)=>i.minWidth-r.minWidth).reduce((i,r)=>{let s=i[i.length-1];return s&&s.minWidth===r.minWidth?s.lastBarWidth=r.lastBarWidth:i.push(r),i},[]);return o.length===0?[{minWidth:0,lastBarWidth:c(n)}]:(o[0].minWidth>0&&o.unshift({minWidth:0,lastBarWidth:c(n)}),o)}function Re(e,n=R,t=0,o=a$1){let i=q(e,n,o),r=i[0]?.lastBarWidth??c(n);for(let s of i)t>=s.minWidth&&(r=s.lastBarWidth);return r}function We(e){let n=new Set,t=e.breakpointMap??a$1;for(let i of F(e.barHeight,typeof e.barHeight=="number"?e.barHeight:0,t))n.add(i.minWidth);for(let i of D(e.lines,1,t))n.add(i.minWidth);for(let i of V(e.lineHeight,typeof e.lineHeight=="number"?e.lineHeight:1,t))n.add(i.minWidth);let o=e.barWidth!=null?K(e.barWidth,"100%",t):q(e.lastBarWidth,R,t);for(let i of o)n.add(i.minWidth);return Array.from(n).sort((i,r)=>i-r)}function y(e){let n=e.breakpointMap??a$1,t=e.responsiveBy??"viewport",i=We({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,breakpointMap:n}).reduce((l,d)=>{let h=O({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,minWidth:d,breakpointMap:n}),m=l[l.length-1];return m&&me(m.state,h)||l.push({minWidth:d,state:h}),l},[]),r=i[0]?.state??O({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,minWidth:0,breakpointMap:n}),s=i.reduce((l,d)=>Math.max(l,d.state.lineCount),r.lineCount);return {baseState:r,states:i.length?i:[{minWidth:0,state:r}],maxLines:s,usesResponsiveBarCss:i.length>1,baseLines:r.lineCount,baseLastBarWidth:r.barWidths[r.lineCount-1]??R,metrics:r.metrics,responsiveBy:t}}function X(e){let n="renderState"in e?e.renderState:y({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,responsiveBy:e.responsiveBy,breakpointMap:e.breakpointMap});if(!n.usesResponsiveBarCss)return [];let t=e.selectorPlaceholder??W,o=e.fitContent===true;return n.states.map(({minWidth:i,state:r})=>{let s=`${t} [data-rmg-skel-text-line="true"]`,l=`${s}:nth-child(-n+${r.lineCount})`,d=r.lineCount<n.maxLines?`${s}:nth-child(n+${r.lineCount+1})`:null,h=r.barWidths.map((g,H)=>o?`${s}:nth-child(${H+1}){width:${g} !important;max-width:${g} !important;}`:`${s}:nth-child(${H+1}){max-width:${g} !important;}`),m=o?`${l}{display:block !important;max-width:100% !important;}`:`${l}{display:block !important;width:100% !important;max-width:100% !important;}`,x=L(r.metrics);return {minWidth:i,query:n.responsiveBy,css:[`${t}{height:${r.metrics.totalHeight}px !important;padding-block:${r.metrics.paddingBlock}px !important;row-gap:${r.metrics.rowGap}px !important;}`,`@supports ${ue}{${t}{height:${x.totalHeight}px !important;padding-block:${x.paddingBlock}px !important;row-gap:${x.rowGap}px !important;}}`,`${s}{display:none !important;height:${r.metrics.barHeight}px !important;}`,m,...d?[`${d}{display:none !important;}`]:[],...h].join("")}})}function U(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}function Be(e,n=a$1){let t=n[e];if(Number.isFinite(t))return Math.max(0,t);let o=Number(e);return Number.isFinite(o)?Math.max(0,o):null}function v(e,n=a$1){if(!U(e))return {baseStyle:e,rules:[]};let t={},o=new Map;for(let[i,r]of Object.entries(e)){let s=Be(i,n);if(s!=null&&U(r)){o.set(s,{...o.get(s)??{},...r});continue}t[i]=r;}return {baseStyle:Object.keys(t).length?t:void 0,rules:Array.from(o.entries()).sort((i,r)=>i[0]-r[0]).map(([i,r])=>({minWidth:i,style:r}))}}function z(e,n,t=a$1){let{baseStyle:o,rules:i}=v(e,t),r={...o??{}};for(let s of i){if(s.minWidth>n)break;Object.assign(r,s.style);}return Object.keys(r).length?r:void 0}function te(e,n=a$1){let{baseStyle:t,rules:o}=v(e,n);if(!t)return;if(!o.length)return t;let i=new Set;for(let s of o)for(let l of Object.keys(s.style))i.add(l);let r={};for(let[s,l]of Object.entries(t))i.has(s)||(r[s]=l);return Object.keys(r).length?r:void 0}function ie(e,n,t=a$1){let{rules:o}=v(e,t);for(let i of o)i.minWidth>0&&n.add(i.minWidth);}function re(e){let n=e.breakpointMap??a$1,t=e.selector??W,o=[],{rules:i}=v(e.value,n);if(!i.length)return [];let r=new Set([0]);for(let s of i)r.add(s.minWidth);for(let s of Array.from(r).sort((l,d)=>l-d)){let l=z(e.value,s,n),d=l?e.serialize(l):"";d&&o.push({minWidth:s,css:`${t}{${d}}`,raw:true});}return o}function a(e){if(e!=null)return typeof e=="number"?`${e}px`:e}function oe(e){if(!e)return {};let n=a(e.margin),t=a(e.marginTop),o=a(e.marginRight),i=a(e.marginBottom),r=a(e.marginLeft),s={};return n!=null&&(s.margin=n),t!=null&&(s.marginTop=t),o!=null&&(s.marginRight=o),i!=null&&(s.marginBottom=i),r!=null&&(s.marginLeft=r),s}function A(e,n){n&&(n.flex!=null&&(e.flex=n.flex),n.flexGrow!=null&&(e.flexGrow=n.flexGrow),n.flexShrink!=null&&(e.flexShrink=n.flexShrink),n.flexBasis!=null&&(e.flexBasis=a(n.flexBasis)),n.order!=null&&(e.order=n.order),n.alignSelf&&(e.alignSelf=n.alignSelf),n.boxSizing!=null&&(e.boxSizing=n.boxSizing));}function E(e,n){n&&(n.flex!=null&&e.push(`flex:${n.flex};`),n.flexGrow!=null&&e.push(`flex-grow:${n.flexGrow};`),n.flexShrink!=null&&e.push(`flex-shrink:${n.flexShrink};`),n.flexBasis!=null&&e.push(`flex-basis:${a(n.flexBasis)};`),n.order!=null&&e.push(`order:${n.order};`),n.alignSelf&&e.push(`align-self:${n.alignSelf};`),n.boxSizing!=null&&e.push(`box-sizing:${n.boxSizing};`));}function se(e,n){let t={};e?.aspectRatio!=null&&(t.aspectRatio=e.aspectRatio);let o=a(e?.width),i=a(e?.minWidth),r=a(e?.maxWidth),s=a(e?.height),l=a(e?.minHeight),d=a(e?.maxHeight);return o!=null&&(t.inlineSize=o,t.width=o),i!=null&&(t.minInlineSize=i,t.minWidth=i),r!=null&&(t.maxInlineSize=r,t.maxWidth=r),s!=null&&(t.height=s),l!=null&&(t.minHeight=l),d!=null&&(t.maxHeight=d),e?.aspectRatio!=null&&e?.height==null&&(t.height="auto"),e?.aspectRatio!=null&&e?.width==null&&e?.height==null&&(t.inlineSize="100%",t.width="100%",t.height="auto"),e?.backgroundColor&&(t["--rmg-skel-bg"]=e.backgroundColor),e?.borderRadius!=null&&(t["--rmg-skel-radius"]=a(e.borderRadius)),e?.overflow!=null&&(t.overflow=e.overflow),A(t,e),e?.scale!=null&&(t.transform=`scale(${e.scale})`),Object.assign(t,we(n)),t}function G(e,n){let t=a(n?.margin),o=a(n?.marginTop),i=a(n?.marginRight),r=a(n?.marginBottom),s=a(n?.marginLeft);t!=null&&e.push(`margin:${t};`),o!=null&&e.push(`margin-top:${o};`),i!=null&&e.push(`margin-right:${i};`),r!=null&&e.push(`margin-bottom:${r};`),s!=null&&e.push(`margin-left:${s};`);}function ve(e){if(!e)return "";let n=[],t=a(e.width),o=a(e.minWidth),i=a(e.maxWidth),r=a(e.height),s=a(e.minHeight),l=a(e.maxHeight);return e.aspectRatio!=null&&n.push(`aspect-ratio:${String(e.aspectRatio)};`),t!=null&&(n.push(`inline-size:${t};`),n.push(`width:${t};`)),o!=null&&(n.push(`min-inline-size:${o};`),n.push(`min-width:${o};`)),i!=null&&(n.push(`max-inline-size:${i};`),n.push(`max-width:${i};`)),r!=null&&n.push(`height:${r};`),s!=null&&n.push(`min-height:${s};`),l!=null&&n.push(`max-height:${l};`),e.aspectRatio!=null&&e.height==null&&n.push("height:auto;"),e.aspectRatio!=null&&e.width==null&&e.height==null&&(n.push("inline-size:100%;"),n.push("width:100%;"),n.push("height:auto;")),e.backgroundColor&&n.push(`--rmg-skel-bg:${e.backgroundColor};`),e.borderRadius!=null&&n.push(`--rmg-skel-radius:${a(e.borderRadius)};`),e.overflow!=null&&n.push(`overflow:${e.overflow};`),E(n,e),e.scale!=null&&n.push(`transform:scale(${e.scale});`),G(n,e),n.join("")}function Te(e){if(!e)return "";let n=[],t=a(e.width),o=a(e.minWidth),i=a(e.maxWidth);return t!=null&&(n.push(`inline-size:${t};`),n.push(`width:${t};`)),o!=null&&(n.push(`min-inline-size:${o};`),n.push(`min-width:${o};`)),i!=null&&(n.push(`max-inline-size:${i};`),n.push(`max-width:${i};`)),E(n,e),e.scale!=null&&n.push(`transform:scale(${e.scale});`),G(n,e),n.join("")}function Ce(e){if(!e)return "";let n=[];return e.backgroundColor&&n.push(`--rmg-skel-bg:${e.backgroundColor};`),e.borderRadius!=null&&n.push(`--rmg-skel-radius:${a(e.borderRadius)};`),n.join("")}function we(e,n){let t={},o=n?.enabledVarName??"--rmg-skel-shimmer-enabled";return e?.enabled===false&&(t[o]="0"),e?.durationMs!=null&&(t["--rmg-skel-shimmer-duration"]=`${e.durationMs}ms`),e?.angleDeg!=null&&(t["--rmg-skel-shimmer-angle"]=`${e.angleDeg}deg`),e?.opacity!=null&&(t["--rmg-skel-shimmer-opacity"]=String(e.opacity)),e?.blurPx!=null&&(t["--rmg-skel-shimmer-blur"]=`${e.blurPx}px`,t["--rmg-skel-shimmer-filter"]=e.blurPx>0?`blur(${e.blurPx}px)`:"none"),e?.timing&&(t["--rmg-skel-shimmer-timing"]=e.timing),e?.c1&&(t["--rmg-skel-shimmer-c1"]=e.c1),e?.c2&&(t["--rmg-skel-shimmer-c2"]=e.c2),e?.c3&&(t["--rmg-skel-shimmer-c3"]=e.c3),t}function Q(e,n){let t={};n!=null&&(t.height=`${n}px`);let o=a(e?.width),i=a(e?.minWidth),r=a(e?.maxWidth);return o!=null&&(t.inlineSize=o,t.width=o),i!=null&&(t.minInlineSize=i,t.minWidth=i),r!=null&&(t.maxInlineSize=r,t.maxWidth=r),A(t,e),e?.scale!=null&&(t.transform=`scale(${e.scale})`),t}function j(e){return typeof e=="string"&&e.trim()==="max-content"}function ye(e){return !e||typeof e!="object"?false:j(e.width)?true:Object.values(e).some(t=>!!t&&typeof t=="object"&&j(t.width))}function Fe(e){let n=se(e,void 0);return delete n["--rmg-skel-bg"],e?.backgroundColor!=null&&(n.backgroundColor=e.backgroundColor),e?.padding!=null&&(n.padding=a(e.padding)),e?.border!=null&&(n.border=e.border),e?.boxShadow!=null&&(n.boxShadow=e.boxShadow),e?.borderRadius!=null?(n.borderRadius=a(e.borderRadius),n.overflow=e?.overflow??"hidden"):e?.overflow!=null&&(n.overflow=e.overflow),n.boxSizing="border-box",n}function Z(e){let n={};return e&&(e.position!=null&&(n.position=e.position),e.inset!=null&&(n.inset=a(e.inset)),e.insetBlock!=null&&(n.insetBlock=a(e.insetBlock)),e.insetInline!=null&&(n.insetInline=a(e.insetInline)),e.top!=null&&(n.top=a(e.top)),e.right!=null&&(n.right=a(e.right)),e.bottom!=null&&(n.bottom=a(e.bottom)),e.left!=null&&(n.left=a(e.left)),e.zIndex!=null&&(n.zIndex=e.zIndex),e.display!=null&&(n.display=e.display),e.flexDirection!=null&&(n.flexDirection=e.flexDirection),e.gap!=null&&(n.gap=a(e.gap)),e.rowGap!=null&&(n.rowGap=a(e.rowGap)),e.columnGap!=null&&(n.columnGap=a(e.columnGap)),e.padding!=null&&(n.padding=a(e.padding)),(e.align??e.alignItems)&&(n.alignItems=e.alignItems??e.align),e.alignContent!=null&&(n.alignContent=e.alignContent),(e.justify??e.justifyContent)&&(n.justifyContent=e.justifyContent??e.justify),e.aspectRatio!=null&&(n.aspectRatio=e.aspectRatio),e.flexWrap!=null?n.flexWrap=e.flexWrap:e.wrap&&(n.flexWrap="wrap"),e.width!=null&&(n.width=a(e.width)),e.minWidth!=null&&(n.minWidth=a(e.minWidth)),e.maxWidth!=null&&(n.maxWidth=a(e.maxWidth)),e.height!=null&&(n.height=a(e.height)),e.minHeight!=null&&(n.minHeight=a(e.minHeight)),e.maxHeight!=null&&(n.maxHeight=a(e.maxHeight)),e.aspectRatio!=null&&e.height==null&&(n.height="auto"),e.backgroundColor!=null&&(n.backgroundColor=e.backgroundColor),e.borderRadius!=null&&(n.borderRadius=a(e.borderRadius)),e.border!=null&&(n.border=e.border),e.boxShadow!=null&&(n.boxShadow=e.boxShadow),e.margin!=null&&(n.margin=a(e.margin)),e.marginTop!=null&&(n.marginTop=a(e.marginTop)),e.marginRight!=null&&(n.marginRight=a(e.marginRight)),e.marginBottom!=null&&(n.marginBottom=a(e.marginBottom)),e.marginLeft!=null&&(n.marginLeft=a(e.marginLeft)),A(n,e),e.overflow!=null&&(n.overflow=e.overflow),e.transform!=null&&(n.transform=e.transform),e.pointerEvents!=null&&(n.pointerEvents=e.pointerEvents),e.opacity!=null&&(n.opacity=e.opacity)),n}function He(e,n=a$1){return v(e,n).rules.length>0}function Le(e,n=0,t=a$1){return z(e,n,t)}function Ve(e,n=0,t=a$1){return z(e,n,t)}function ae(e,n=a$1){return te(e,n)}function J(e,n=a$1){return te(e,n)}function Ke(e,n,t=a$1){ie(e,n,t);}function Y(e){return e.replace(/"/g,'\\"')}function $e(e){let n=[];return e.position!=null&&n.push(`position:${e.position};`),e.inset!=null&&n.push(`inset:${a(e.inset)};`),e.insetBlock!=null&&n.push(`inset-block:${a(e.insetBlock)};`),e.insetInline!=null&&n.push(`inset-inline:${a(e.insetInline)};`),e.top!=null&&n.push(`top:${a(e.top)};`),e.right!=null&&n.push(`right:${a(e.right)};`),e.bottom!=null&&n.push(`bottom:${a(e.bottom)};`),e.left!=null&&n.push(`left:${a(e.left)};`),e.zIndex!=null&&n.push(`z-index:${e.zIndex};`),e.display!=null&&n.push(`display:${e.display};`),e.flexDirection!=null&&n.push(`flex-direction:${e.flexDirection};`),e.gap!=null&&n.push(`gap:${a(e.gap)};`),e.rowGap!=null&&n.push(`row-gap:${a(e.rowGap)};`),e.columnGap!=null&&n.push(`column-gap:${a(e.columnGap)};`),e.padding!=null&&n.push(`padding:${a(e.padding)};`),(e.align??e.alignItems)&&n.push(`align-items:${e.alignItems??e.align};`),e.alignContent!=null&&n.push(`align-content:${e.alignContent};`),(e.justify??e.justifyContent)&&n.push(`justify-content:${e.justifyContent??e.justify};`),e.aspectRatio!=null&&n.push(`aspect-ratio:${String(e.aspectRatio)};`),e.flexWrap!=null?n.push(`flex-wrap:${e.flexWrap};`):e.wrap&&n.push("flex-wrap:wrap;"),e.width!=null&&n.push(`width:${a(e.width)};`),e.minWidth!=null&&n.push(`min-width:${a(e.minWidth)};`),e.maxWidth!=null&&n.push(`max-width:${a(e.maxWidth)};`),e.height!=null&&n.push(`height:${a(e.height)};`),e.minHeight!=null&&n.push(`min-height:${a(e.minHeight)};`),e.maxHeight!=null&&n.push(`max-height:${a(e.maxHeight)};`),e.aspectRatio!=null&&e.height==null&&n.push("height:auto;"),e.backgroundColor!=null&&n.push(`background-color:${e.backgroundColor};`),e.borderRadius!=null&&n.push(`border-radius:${a(e.borderRadius)};`),e.border!=null&&n.push(`border:${e.border};`),e.boxShadow!=null&&n.push(`box-shadow:${e.boxShadow};`),G(n,e),E(n,e),e.overflow!=null&&n.push(`overflow:${e.overflow};`),e.transform!=null&&n.push(`transform:${e.transform};`),e.pointerEvents!=null&&n.push(`pointer-events:${e.pointerEvents};`),e.opacity!=null&&n.push(`opacity:${e.opacity};`),n.join("")}function N(e){return re({value:e.style,breakpointMap:e.breakpointMap,selector:e.selector,serialize:$e})}function ee(e){return re({value:e.style,breakpointMap:e.breakpointMap,selector:e.selector,serialize:ve})}function Me(e){let n=e.breakpointMap??a$1;if(!He(e.style,n))return [];let t=e.selector??W,o=[],i=new Set([0]);ie(e.style,i,n);for(let r of Array.from(i).sort((s,l)=>s-l)){let s=Le(e.style,r,n),l=Te(s),d=Ce(s),h=[l?`${t}{${l}}`:"",d?`${t} [data-rmg-skel-text-line="true"]{${d}}`:""].filter(Boolean).join("");h&&o.push({minWidth:r,css:h,raw:true});}return o}function Ne(e){if(e.barWidths?.length)return e.barWidths;if(e.lineWidthsPx?.length)return e.lineWidthsPx.map(n=>`${Math.max(0,n)}px`)}function Pe(e){return Math.max(1,Math.min(64,Math.trunc(e)))}function _e(e,n,t){let o=e.textId,i=o?n?.[o]:void 0;if(!i)return e;let r=Pe(i.lines),s=Ne(i),l=typeof i.barHeight=="number"&&Number.isFinite(i.barHeight)?i.barHeight:typeof e.barHeight=="number"?e.barHeight:$(e.barHeight,0,0,t),d=typeof i.lineHeight=="number"&&Number.isFinite(i.lineHeight)?i.lineHeight:typeof e.lineHeight=="number"?e.lineHeight:M(e.lineHeight,1,0,t);return {...e,barHeight:l,lineHeight:d,lines:r,...s?.length?{barWidth:s}:null,lastBarWidth:s?.[Math.min(r,s.length)-1]??e.lastBarWidth,responsiveBy:void 0}}function P(e,n,t,o=a$1){if(!n)return e;if(e.kind===t){let r=e,s=Array.isArray(r.slots)?r.slots.map(l=>({...l,item:l?.item?P(l.item,n,t,o):l?.item})):void 0;return {...r,item:P(r.item,n,t,o),...s?{slots:s}:null}}let i=e;return i.kind==="text"?_e(i,n,o):i.kind==="media"?i:i.kind==="stack"||i.kind==="row"||i.kind==="col"?{...i,children:i.children.map(r=>P(r,n,t,o))}:i}function _(e,n,t=new Set){if(!e)return t;if(e.kind===n){let i=e;_(i.item,n,t);for(let r of i.slots??[])_(r.item,n,t);return t}let o=e;if(o.kind==="text")return o.textId&&t.add(o.textId),t;if(o.kind==="stack"||o.kind==="row"||o.kind==="col")for(let i of o.children)_(i,n,t);return t}function I(e,n,t,o,i=a$1){if(e.kind===o){let r=e,s=N({style:r.style,breakpointMap:i}),l=s.length?n():void 0;l&&s.length&&t.push({nodeId:l,rules:s});let d=I(r.item,n,t,o,i),h=Array.isArray(r.slots)?r.slots.map(m=>({...m,item:m?.item?I(m.item,n,t,o,i):m?.item})):void 0;return {...r,...l?{__rmgNodeId:l}:null,item:d,...h?{slots:h}:null}}switch(e.kind){case "rect":case "square":case "circle":{let r=e,s=ee({style:r.style,breakpointMap:i});if(!s.length)return e;let l=n();return t.push({nodeId:l,rules:s}),{...r,__rmgNodeId:l}}case "text":{let r=e,s=r.__rmgTextRenderState??y({barHeight:r.barHeight,barWidth:r.barWidth,lineHeight:r.lineHeight,lines:r.lines,lastBarWidth:r.lastBarWidth,responsiveBy:r.responsiveBy,breakpointMap:i}),l=[...X({renderState:s,fitContent:ye(r.style)}).map(h=>({...h,raw:true})),...Me({style:r.style,breakpointMap:i})];if(!l.length&&!r.__rmgTextRenderState)return e;let d=l.length?n():void 0;return d&&l.length&&t.push({nodeId:d,rules:l}),{...r,...d?{__rmgNodeId:d}:null,__rmgTextRenderState:s}}case "media":{let r=e,s=[...N({style:r.style,breakpointMap:i}),...ee({style:r.tile?.style,breakpointMap:i,selector:`${W} [data-rmg-skel-media-tile="true"]`})];if(!s.length)return e;let l=n();return t.push({nodeId:l,rules:s}),{...e,__rmgNodeId:l}}case "stack":case "row":case "col":{let r=e,s=N({style:r.style,breakpointMap:i}),l=s.length?n():void 0;l&&s.length&&t.push({nodeId:l,rules:s});let d=r.children.map(h=>I(h,n,t,o,i));return {...r,...l?{__rmgNodeId:l}:null,children:d}}default:return e}}function qe(e){if(!e.rules.length)return "";let n=`[${e.scopeAttr}="${Y(e.scopeId)}"]`,t=[];for(let o of e.rules){let i=`${n} [data-rmg-skel-node="${Y(o.nodeId)}"]`;for(let r of o.rules){let s=r.raw?r.css.split("__NODE_SEL__").join(i):`${i}{${r.css}}`;r.minWidth<=0?t.push(s):r.query==="container"?t.push(`@container (min-width:${r.minWidth}px){${s}}`):t.push(`@media (min-width:${r.minWidth}px){${s}}`);}}return t.join(`
|
|
2
|
+
`)}function le(e,n,t){return se(e,t?void 0:n)}function ne(e){let{kind:n,style:t,shimmer:o,disableShimmer:i,breakpointMap:r,mediaTile:s}=e,l=n==="circle"?p.skelCircle:n==="square"?p.skelSquare:p.skelRect,d=ae(t,r),h=e.__rmgNodeId;return jsx("div",{"data-rmg-skel-node":h,"data-rmg-skel-media-tile":s?"true":void 0,className:[p.skelTile,l,i?null:p.skelShimmer].filter(Boolean).join(" "),style:{...le(d,o,i),...oe(d)}})}function Ie({node:e,disableShimmer:n,breakpointMap:t}){let o=e.__rmgTextRenderState??y({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,responsiveBy:e.responsiveBy,breakpointMap:t}),i=ae(e.style,t),r=e.__rmgNodeId,s=o.responsiveBy==="container"&&o.usesResponsiveBarCss,l=L(o.baseState.metrics),d=Q(s?void 0:i,o.baseState.metrics.totalHeight),h=oe(i),m={height:o.baseState.metrics.barHeight,backgroundColor:i?.backgroundColor,borderRadius:i?.borderRadius},x=j(i?.width),g=jsx("div",{"data-rmg-skel-node":r,"data-rmg-skel-text":"true","data-rmg-skel-text-id":e.textId,className:p.skelText,style:{...d,...s?null:h,paddingBlock:`${o.baseState.metrics.paddingBlock}px`,rowGap:`${o.baseState.metrics.rowGap}px`,"--rmg-skel-text-safari-height":`${l.totalHeight}px`,"--rmg-skel-text-safari-padding-block":`${l.paddingBlock}px`,"--rmg-skel-text-safari-row-gap":`${l.rowGap}px`},children:Array.from({length:o.maxLines}).map((H,T)=>jsx("div",{"data-rmg-skel-text-line":"true",className:[p.skelTile,n?null:p.skelShimmer,p.skelTextLine].filter(Boolean).join(" "),style:{...le(m,e.shimmer,n),display:T>=o.baseState.lineCount?"none":void 0,width:x?o.baseState.barWidths[T]??"100%":"100%",maxWidth:o.baseState.barWidths[T]??"100%"}},T))});return s?jsx("div",{"data-rmg-skel-text-container":"true",style:{...Q(i),...h,containerType:"inline-size"},children:g}):g}function je({node:e,disableShimmer:n,breakpointMap:t}){let o=t??a$1;switch(e.kind){case "rect":case "square":case "circle":return jsx(ne,{...e,disableShimmer:n,breakpointMap:o});case "media":{let i=Math.max(0,e.count|0),r=e.direction??"row",s=e.tile?.shape??"rect",l=e.__rmgNodeId,d=Z(J(e.style,o));return jsx("div",{"data-rmg-skel-node":l,className:[p.skelGroup,r==="row"?p.skelRow:p.skelCol].join(" "),style:d,children:Array.from({length:i}).map((h,m)=>jsx(ne,{kind:s,style:e.tile?.style,shimmer:e.tile?.shimmer,disableShimmer:n,breakpointMap:o,mediaTile:true},m))})}case "stack":case "row":case "col":{let i=e.kind==="row"?p.skelRow:e.kind==="col"?p.skelCol:p.skelStack,r=e.__rmgNodeId,s=Z(J(e.style,o));return jsx("div",{"data-rmg-skel-node":r,className:[p.skelGroup,i].join(" "),style:s,children:e.children.map((l,d)=>jsx(je,{node:l,disableShimmer:n,breakpointMap:o},d))})}case "text":return jsx(Ie,{node:e,disableShimmer:n,breakpointMap:o});default:return null}}export{_ as A,I as B,qe as C,je as D,p as a,W as b,ue as c,he as d,L as e,ke as f,$ as g,M as h,We as i,y as j,X as k,a as l,oe as m,we as n,Fe as o,Z as p,Le as q,Ve as r,ae as s,J as t,Ke as u,Y as v,N as w,ee as x,Me as y,P as z};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import {b}from'./chunk-P6NLW2QN.mjs';import {n,l,B as B$1,C,p,t,m,a as a$2,D,v,o}from'./chunk-45TZO7MN.mjs';import {f,c,d,e}from'./chunk-Y7NUGXTR.mjs';import {a as a$1}from'./chunk-UUAWLGWO.mjs';import {a,i}from'./chunk-HK2DPKES.mjs';import*as $ from'react';import {jsx,jsxs}from'react/jsx-runtime';var R={gridSkeletonOverlay:"Re",gridSkeletonGrid:"Se",gridSkeletonItem:"K",gridSkeletonItemInner:"Te"};function B(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}function re(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}function ue(e,t){let o=t[e];if(typeof o=="number"&&Number.isFinite(o))return o;let r=parseFloat(e);return Number.isNaN(r)?0:r}function Se(e){let{templateColumns:t,breakpointMap:o}=e;if(!re(t))return [];let r=Object.entries(t).map(([s,i])=>({minWidth:ue(s,o),template:typeof i=="string"?i.trim():""})).filter(s=>s.template.length>0).sort((s,i)=>s.minWidth-i.minWidth);return r.length===0?[]:(r[0].minWidth>0?r.unshift({minWidth:0,template:r[0].template}):r[0].minWidth<0&&(r[0]={...r[0],minWidth:0}),r)}function ce(e){let{scopeId:t,columns:o,templateColumns:r,gap:s,breakpointMap:i$1,fallbackGap:c}=e,u=`${`[data-rmg-grid-skel-scope="${v(t)}"]`} .${R.gridSkeletonGrid}`,p=[],d=(n,l)=>{if(!l.length)return;let y=`${u}{${l.join("")}}`;if(n<=0){p.push(y);return}p.push(`@media (min-width:${n}px){${y}}`);},a=Se({templateColumns:r,breakpointMap:i$1});if(a.length>0)for(let n of a)d(n.minWidth,[`grid-template-columns:${n.template};`]);else if(B(o)){let n=i(o,1,i$1);for(let l of n)d(l.minWidth,[`grid-template-columns:repeat(${Math.max(1,l.count|0)}, minmax(0, 1fr));`]);}if(B(s)){let n=i(s,c,i$1);for(let l of n)d(l.minWidth,[`--rmg-grid-gap:${Math.max(0,l.count|0)}px;`]);}return p.join(`
|
|
2
|
+
`)}function ye(e$1){let{scopeId:t,items:o,breakpointMap:r,allowSpan:s}=e$1;if(!s)return "";let i=[],c$1=`[data-rmg-grid-skel-scope="${v(t)}"]`;for(let m of o){let u=m.span;if(!c(u))continue;let p=`${c$1} [data-rmg-grid-item-key="${v(m.id)}"]`,d$1=d(u,r);for(let a of d$1){let n=e(a.span);if(!n)continue;let l=`${p}{grid-column:${n};}`;if(a.minWidth<=0){i.push(l);continue}i.push(`@media (min-width:${a.minWidth}px){${l}}`);}}return i.join(`
|
|
3
|
+
`)}function ke(e){let t={...e.gridStyle||{}};return e.minColumnWidth!=null&&t["--rmg-grid-min"]==null&&(t["--rmg-grid-min"]=typeof e.minColumnWidth=="number"?`${e.minColumnWidth}px`:e.minColumnWidth),!B(e.gap)&&e.gap!=null&&t["--rmg-grid-gap"]==null&&(t["--rmg-grid-gap"]=typeof e.gap=="number"?`${Math.max(0,e.gap|0)}px`:String(e.gap)),!re(e.templateColumns)&&typeof e.templateColumns=="string"&&e.templateColumns.trim().length>0&&t.gridTemplateColumns==null?t.gridTemplateColumns=e.templateColumns.trim():e.templateColumns==null&&!B(e.columns)&&typeof e.columns=="number"&&Number.isFinite(e.columns)&&t.gridTemplateColumns==null&&(t.gridTemplateColumns=`repeat(${Math.max(1,e.columns|0)}, minmax(0, 1fr))`),t}function oe(){return {layout:{kind:"grid",item:{kind:"rect",style:{width:"100%",aspectRatio:1,borderRadius:12}},itemWrapStyle:void 0},radius:12}}function ge(e,t){if(!(!e&&!t))return {...e||{},...t||{}}}function fe(e,t){let o=e.slots?.[t];return {item:o?.item??e.item,itemWrapStyle:ge(e.itemWrapStyle,o?.itemWrapStyle)}}function he(e){if(!e)return {outerStyle:void 0,innerStyle:void 0};let t=o(e),o$1={};return t.boxShadow!=null&&(o$1["--rmg-grid-skel-wrap-shadow"]=t.boxShadow,delete t.boxShadow),t.borderRadius!=null&&(o$1["--rmg-grid-skel-wrap-shadow-radius"]=t.borderRadius),{outerStyle:Object.keys(o$1).length?o$1:void 0,innerStyle:t}}function ie({count:e,gridStyle:t$1,spec:o,breakpoints:r,columns:s,templateColumns:i,minColumnWidth:c,gap:m$1,items:u,allowItemSpans:p$1,disableShimmer:d}){let a$3=o??oe(),n$1=$.useMemo(()=>({...a,...r??{}}),[r]),l$1=a$3.layout??oe().layout,y=$.useMemo(()=>a$1("gskel_",{count:e,breakpoints:n$1,gridStyle:t$1,spec:o,columns:s,templateColumns:i,minColumnWidth:c,gap:m$1,items:u,allowItemSpans:p$1,disableShimmer:d}),[e,n$1,t$1,o,s,i,c,m$1,u,p$1,d]),C$1={...ke({gridStyle:t$1,columns:s,templateColumns:i,minColumnWidth:c,gap:m$1}),...d?null:n(a$3.shimmer,{enabledVarName:"--rmg-skel-card-shimmer-enabled"})};a$3.backgroundColor&&(C$1["--rmg-skel-bg"]=a$3.backgroundColor),a$3.radius!=null&&(C$1["--rmg-skel-radius"]=l(a$3.radius));let{layout:A,responsiveCss:x,itemLayouts:S}=$.useMemo(()=>{let k=0,f=()=>`n${++k}`,G=[],b=B$1(l$1,f,G,"grid",n$1),v=C({scopeAttr:"data-rmg-grid-skel-scope",scopeId:y,rules:G}),N=l$1,j=Array.from({length:Math.max(0,typeof N.count=="number"?N.count|0:e|0)},(Re,E)=>({id:`slot-${E}`,span:N.slots?.[E]?.span})),z=u??j,ae=ce({scopeId:y,columns:s,templateColumns:i,gap:m$1,breakpointMap:n$1,fallbackGap:typeof m$1=="number"&&Number.isFinite(m$1)?m$1:8}),pe=ye({scopeId:y,items:z,breakpointMap:n$1,allowSpan:!!p$1}),de=[v,ae,pe].filter(Boolean).join(`
|
|
4
|
+
`);return {layout:b,responsiveCss:de,itemLayouts:z}},[l$1,y,n$1,s,i,m$1,u,p$1]),g=A,O=g.__rmgNodeId,h=p(t(g.style,n$1)),M=g.count!=null?Math.max(0,g.count|0):Math.max(0,e|0);return jsxs("div",{"data-rmg-grid-skel-scope":y,className:[R.gridSkeletonOverlay,a$3.className].filter(Boolean).join(" "),children:[x?jsx("style",{dangerouslySetInnerHTML:{__html:x}}):null,jsx("div",{"data-rmg-skel-node":O,className:R.gridSkeletonGrid,style:{...C$1,...h||{},display:"grid"},children:Array.from({length:M}).map((k,f$1)=>{let G=S[f$1],{item:b,itemWrapStyle:v}=fe(g,f$1),{outerStyle:N,innerStyle:j}=he(v);return jsx("div",{"data-rmg-grid-item-key":G?.id,className:R.gridSkeletonItem,style:{...f({span:G?.span,allowSpan:!!p$1})||{},...v?m(v):null,...N||null},children:jsx("div",{className:[R.gridSkeletonItemInner,d?null:a$2.skelCardShimmer].filter(Boolean).join(" "),style:j,children:jsx(D,{node:b,disableShimmer:true,breakpointMap:n$1})})},`rmg-grid-skel-${f$1}`)})})]})}function le(e){return !!e&&typeof e=="object"&&!("kind"in e)&&"layout"in e&&e.layout?.kind==="grid"}function se(e){return !!e&&typeof e=="object"&&"kind"in e&&e.kind==="grid"}function be(e){if(le(e))return e;let{className:t,backgroundColor:o,radius:r,shimmer:s,gridStyle:i,columns:c,templateColumns:m,minColumnWidth:u,gap:p,items:d,allowItemSpans:a,...n}=e;return {className:t,backgroundColor:o,radius:r,shimmer:s,layout:n}}function Ae({layout:e,children:t,breakpoints:o,className:r,style:s,shellClassName:i,shellStyle:c,contentClassName:m,contentStyle:u,backgroundColor:p,radius:d,shimmer:a$2,disableShimmer:n$1,ariaLabel:l$1,ready:y,enabled:C,force:A,timing:x,grid:S}){let g=$.useMemo(()=>({...a,...o??{}}),[o]),O=$.useMemo(()=>a$1("skel_",{layout:e,breakpoints:g,backgroundColor:p,radius:d,shimmer:a$2,disableShimmer:n$1,grid:S}),[e,g,p,d,a$2,n$1,S]),h=$.useMemo(()=>se(e)||le(e)?be(e):null,[e]),M=h?.layout?.kind==="grid"?h.layout:null,k=se(e)?e:null,f=h?{count:S?.count??(typeof M?.count=="number"?Math.max(0,M.count|0):1),gridStyle:S?.style??k?.gridStyle,columns:S?.columns??k?.columns,templateColumns:S?.templateColumns??k?.templateColumns,minColumnWidth:S?.minColumnWidth??k?.minColumnWidth,gap:S?.gap??k?.gap,items:S?.items??k?.items,allowItemSpans:S?.allowItemSpans??k?.allowItemSpans,disableShimmer:n$1}:null,G={...s,...p?{"--rmg-skel-bg":p}:null,...d!=null?{"--rmg-skel-radius":l(d)}:null,...n$1?null:n(a$2)},b$1=h&&f?jsx("div",{"data-rmg-skeleton-scope":O,className:r,style:G,"aria-hidden":l$1?void 0:true,"aria-label":l$1,role:l$1?"status":void 0,"aria-live":l$1?"polite":void 0,children:jsx(ie,{...f,spec:h,breakpoints:g})}):null;return b$1?jsx(b,{skeletonNode:b$1,ready:y,enabled:C,force:A,timing:x,shellClassName:i,shellStyle:c,contentClassName:m,contentStyle:u,contentOwnsWrapperLayout:t!==void 0,children:t}):null}export{Ae as a};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import {p,t,v as v$1,c as c$1,u,i,B as B$1,C,q as q$1,r,j as j$1,e as e$1,f,g,d,h}from'./chunk-45TZO7MN.mjs';import {a,c,e}from'./chunk-HK2DPKES.mjs';import*as F from'react';import {jsx}from'react/jsx-runtime';var ln=Object.assign(function({children:e}){return F.createElement(F.Fragment,null,e)},{__rmgMasonryItem:true,displayName:"Masonry.Item"});function $e(t,e){let n=e[t];if(typeof n=="number"&&Number.isFinite(n))return n;let r=parseFloat(t);return Number.isNaN(r)?0:r}function Zt(t){if(t==="full")return t;if(!(typeof t!="number"||!Number.isFinite(t)))return Math.max(1,t|0)}function Fe(t){let e=F.Children.toArray(t);return e.length===0?null:e.length===1?e[0]??null:F.createElement(F.Fragment,null,t)}function He(t){return F.isValidElement(t)&&!!t.type?.__rmgMasonryItem}function un(t){if(!He(t))return {node:t};let e={span:t.props.span,className:t.props.className,style:t.props.style};return {node:Fe(t.props.children),layoutMeta:e}}function Be(t){return !!t&&typeof t=="object"&&!Array.isArray(t)}function gt(t,e){if(!Be(t)){let r=Zt(t);return r==null?[]:[{minWidth:0,span:r}]}let n=Object.entries(t).map(([r,i])=>({minWidth:$e(r,e),span:Zt(i)})).filter(r=>r.span!=null).sort((r,i)=>r.minWidth-i.minWidth);return n.length===0?[]:(n[0].minWidth>0?n.unshift({minWidth:0,span:n[0].span}):n[0].minWidth<0&&(n[0]={...n[0],minWidth:0}),n)}function Te(t,e){let n=Math.max(1,e|0);return t==="full"?n:typeof t!="number"||!Number.isFinite(t)?1:Math.max(1,Math.min(n,t|0))}function Gt(t){let{span:e,columnCount:n,width:r,breakpointMap:i}=t,s=gt(e,i);if(!s.length)return 1;let a=s[0].span;for(let o of s)if(r>=o.minWidth)a=o.span;else break;return Te(a,n)}var tt=240,ue=[55,90,130,75];function pe(t){return t!=null&&Number.isFinite(t)?[{minWidth:0,value:t}]:[]}function Ie(t){return t!=null&&Number.isFinite(t)?t:void 0}function Ae(){return {ratios:[...ue],radius:12}}function B(t){return `${Math.max(0,t)}px`}function I(t){return `calc(${t})`}function Yt(t){let e=t.trim();for(;e.startsWith("(")&&e.endsWith(")");){let n=0,r=true;for(let i=0;i<e.length;i++){let s=e[i];if(s==="("&&(n+=1),s===")"&&(n-=1),n===0&&i<e.length-1){r=false;break}if(n<0){r=false;break}}if(!r||n!==0)break;e=e.slice(1,-1).trim();}return e}function ce(t){let e=Yt(t);return e.startsWith("calc(")&&e.endsWith(")")?Yt(e.slice(5,-1).trim()):e}function j(t){return `(${ce(t)})`}function Y(t){let e=ce(t);if(!e)return null;let n=e.match(/^(-?\d*\.?\d+)([a-zA-Z%]+)?$/);if(!n)return null;let r=Number(n[1]);return Number.isFinite(r)?{value:r,unit:n[2]??null}:null}function Ve(t){let e=Y(t);return e!=null&&e.value===0}function mt(t,e,n){return Number.isFinite(t)?t===0&&n?.preferPxForZero?"0px":e?`${t}${e}`:`${t}`:e?`0${e}`:"0"}function b(t){let e=t.filter(Boolean);if(!e.length)return "0px";let n=[],r=0;for(let i of e){let s=Y(i);if(!s){n.push(i);continue}if(s.unit==="px"||s.unit==null&&s.value===0){r+=s.value;continue}n.push(i);}return (r!==0||!n.length&&r===0)&&n.push(mt(r,"px",{preferPxForZero:true})),n.length===1?n[0]:I(n.map(j).join(" + "))}function Nt(t,e){if(Ve(e))return t;let n=Y(t),r=Y(e);return n&&r&&(n.unit===r.unit&&n.unit!=null||n.unit==="px"&&r.unit==null&&r.value===0||r.unit==="px"&&n.unit==null&&n.value===0||n.unit==null&&r.unit==null)?mt(n.value-r.value,n.unit??r.unit,{preferPxForZero:(n.unit??r.unit)==="px"}):I(`${j(t)} - ${j(e)}`)}function v(t,e){if(!Number.isFinite(e))return I(`${j(t)} * ${e}`);if(e===0)return "0px";if(e===1)return t;let n=Y(t);return n?mt(n.value*e,n.unit,{preferPxForZero:n.unit==="px"}):I(`${j(t)} * ${e}`)}function Ut(t,e){if(!Number.isFinite(e)||e===0)return I(`${j(t)} / ${e}`);if(e===1)return t;let n=Y(t);return n?mt(n.value/e,n.unit,{preferPxForZero:n.unit==="px"}):I(`${j(t)} / ${e}`)}function de(t){let e=t.filter(Boolean);return e.length?e.length===1?e[0]:`max(${e.join(", ")})`:"0px"}function Xt(t,e){if(!t)return [];if(typeof t=="number")return [];if(typeof t=="string")return [];if(typeof t!="object")return [];let n=[];for(let[i,s]of Object.entries(t)){let a=Number(s);if(!Number.isFinite(a))continue;if(String(+i)===i){let l=+i;Number.isFinite(l)&&l>=0&&n.push({minWidth:l,value:a});continue}let o=e?.[i];typeof o=="number"&&Number.isFinite(o)&&n.push({minWidth:o,value:a});}n.sort((i,s)=>i.minWidth-s.minWidth);let r=[];for(let i of n){let s=r[r.length-1];s&&s.minWidth===i.minWidth?s.value=i.value:r.push(i);}return r}function Jt(t,e,n){if(t==null)return n;if(typeof t=="number")return t;if(typeof t=="string"){let r=Number(t);return Number.isFinite(r)?r:n}return e.length?e[0].value:n}function Qt(t,e,n){let r=n;for(let i of t)if(i.minWidth<=e)r=i.value;else break;return r}function Oe(t,e){if(!(!t&&!e))return {...t||{},...e||{}}}function L(t,e){if(t==null)return null;if(typeof t=="number")return Number.isFinite(t)?t:null;let n=t.trim();if(!n)return null;if(n.endsWith("%")){let i=Number(n.slice(0,-1));return !Number.isFinite(i)||e==null?null:e*i/100}let r=parseFloat(n);return Number.isFinite(r)?r:null}function T(t,e){if(t==null)return null;if(typeof t=="number")return B(t);let n=t.trim();if(!n)return null;if(n.endsWith("%")){let r=Number(n.slice(0,-1));return !Number.isFinite(r)||!e?null:v(e,r/100)}return n}function me(t){if(t==null)return null;if(typeof t=="number")return Number.isFinite(t)&&t>0?t:null;let e=t.replace(/\s+/g,"");if(!e)return null;if(e.includes("/")){let[r,i]=e.split("/"),s=Number(r),a=Number(i);return Number.isFinite(s)&&Number.isFinite(a)&&s>0&&a>0?s/a:null}let n=parseFloat(e);return Number.isFinite(n)&&n>0?n:null}function et(t,e,n){if(t==null)return 0;let r=t.toString().trim().split(/\s+/).map(i=>L(i,n)).filter(i=>Number.isFinite(i));return r.length?r.length===1?r[0]*2:r.length===2?e==="block"?r[0]*2:r[1]*2:r.length===3?e==="block"?r[0]+r[2]:r[1]*2:e==="block"?r[0]+r[2]:r[1]+r[3]:0}function nt(t,e,n){if(t==null)return null;let r=t.toString().trim().split(/\s+/).map(i=>T(i,n)).filter(Boolean);return r.length?r.length===1?v(r[0],2):r.length===2?v(e==="block"?r[0]:r[1],2):r.length===3?e==="block"?b([r[0],r[2]]):v(r[1],2):b(e==="block"?[r[0],r[2]]:[r[1],r[3]]):null}function he(t){if(typeof t!="string")return 0;let e=t.trim().split(/\s+/)[0],n=L(e);return n!=null?n*2:0}function fe(t){return he(t)}function xe(t){if(typeof t!="string")return null;let e=t.trim().split(/\s+/)[0],n=T(e);return n?v(n,2):null}function _e(t){return xe(t)}function q(t,e){return (L(t?.marginTop,e)??0)+(L(t?.marginBottom,e)??0)}function Z(t,e){let n=T(t?.marginTop,e),r=T(t?.marginBottom,e);return !n&&!r?null:b([n??"0px",r??"0px"])}function te(t,e){return t?q(t,e)+et(t.padding,"block",e)+he(t.border):0}function ee(t,e){return t?b([Z(t,e)??"0px",nt(t.padding,"block",e)??"0px",xe(t.border)??"0px"]):null}function ye(t,e){return t==null?null:Math.max(0,t-et(e?.padding,"inline",t)-fe(e?.border))}function je(t,e){if(!t)return null;let n=nt(e?.padding,"inline",t),r=_e(e?.border);return !n&&!r?t:Nt(t,b([n??"0px",r??"0px"]))}function wt(t,e){return {slope:t.slope*e,intercept:t.intercept*e}}function be(t,e){return {slope:t.slope,intercept:t.intercept-e}}function ge(t,e){if(t==null)return null;if(typeof t=="number")return Number.isFinite(t)?{slope:0,intercept:t}:null;let n=t.trim();if(!n)return null;if(n.endsWith("%")){let i=Number(n.slice(0,-1));return Number.isFinite(i)?wt(e,i/100):null}let r=parseFloat(n);return Number.isFinite(r)?{slope:0,intercept:r}:null}function Me(t,e,n){if(t==null)return {slope:0,intercept:0};let r=t.toString().trim().split(/\s+/).map(a=>ge(a,n));if(!r.length||r.some(a=>a==null))return null;let i=(a,o)=>({slope:a.slope+o.slope,intercept:a.intercept+o.intercept}),s=(a,o)=>wt(a,o);return r.length===1?s(r[0],2):r.length===2?s(r[1],2):r.length===3?s(r[1],2):i(r[1],r[3])}function De(t,e){let n=ge(t?.width,e)??e;return t?.maxWidth==null?n:null}function ze(t,e){let n=Me(e?.padding,"inline",t);return n?be({slope:t.slope-n.slope,intercept:t.intercept-n.intercept},fe(e?.border)):null}function ne(t,e){let n=Me(e?.padding,"inline",t);return n?{slope:t.slope-n.slope,intercept:t.intercept-n.intercept}:null}function pt(t,e){return t==null?null:Math.max(0,t-et(e?.padding,"inline",t))}function re(t,e){if(!t)return null;let n=nt(e?.padding,"inline",t);return n?Nt(t,n):t}function ct(t,e){let n=L(t?.width,e)??e,r=L(t?.maxWidth,e);return r==null?Math.max(0,n):Math.max(0,Math.min(n,r))}function Wt(t,e){let n=T(t?.width,e)??e,r=T(t?.maxWidth,e);return r?de([`min(${n}, ${r})`]):n}function Ce(t){let e=t.node.responsiveBy==="container"&&t.availableWidthPx!=null&&Number.isFinite(t.availableWidthPx)&&t.availableWidthPx>0?t.availableWidthPx:t.responsiveMinWidth,n=q$1(t.node.style,t.responsiveMinWidth,t.breakpointMap);if(t.conservativeContainerText&&t.node.responsiveBy==="container"){let a=t.node.__rmgTextRenderState??j$1({barHeight:t.node.barHeight,barWidth:t.node.barWidth,lineHeight:t.node.lineHeight,lines:t.node.lines,lastBarWidth:t.node.lastBarWidth,responsiveBy:t.node.responsiveBy,breakpointMap:t.breakpointMap}),o=a.states.reduce((l,c)=>c.state.metrics.totalHeight>l.metrics.totalHeight?c.state:l,a.baseState);return {style:n,metrics:t.textMetricsMode==="safari"?e$1(o.metrics):o.metrics}}let r=f(t.node.lines,1,e,t.breakpointMap),i=g(t.node.barHeight,typeof t.node.barHeight=="number"?t.node.barHeight:0,e,t.breakpointMap),s=d({barHeight:i,lineHeight:h(t.node.lineHeight,typeof t.node.lineHeight=="number"?t.node.lineHeight:1,e,t.breakpointMap),lines:r});return {style:n,metrics:t.textMetricsMode==="safari"?e$1(s):s}}function U(t,e,n=a){return r(t,e,n)}function Pt(t,e){let n=e?.responsiveMinWidth??0,r=e?.availableWidthPx??null,i=e?.breakpointMap??a,s=e?.conservativeContainerText===true,a$1=e?.textMetricsMode??"default";if(t.kind==="rect"||t.kind==="square"||t.kind==="circle"){let o=q$1(t.style,n,i),l=L(o?.height,r??void 0);if(l!=null)return l+q(o,r??void 0);let c=ct(o,r??tt);if(t.kind==="square"&&c!=null)return c+q(o,r??void 0);let u=me(o?.aspectRatio);if(u!=null&&c!=null&&c>0)return c/u+q(o,r??void 0);let p=q(o,r??void 0);return p>0?p:null}if(t.kind==="text"){let{style:o,metrics:l}=Ce({node:t,responsiveMinWidth:n,availableWidthPx:r,breakpointMap:i,conservativeContainerText:s,textMetricsMode:a$1});return l.totalHeight+q(o,r??void 0)}if(t.kind==="media"){let o=U(t.style,n,i),l=pt(r,o),c=L(o?.gap,l??void 0)??0,u=et(o?.padding,"block",r??void 0),p=Math.max(0,t.count|0),h={kind:t.tile?.shape??"rect",style:t.tile?.style,shimmer:t.tile?.shimmer},y=(t.direction??"row")==="row"&&p>1&&l!=null?Math.max(0,(l-c*Math.max(0,p-1))/p):l,m=Pt(h,{responsiveMinWidth:n,availableWidthPx:y,breakpointMap:i,conservativeContainerText:s,textMetricsMode:a$1});return m==null?u||null:(t.direction??"row")==="row"||p<=1?m+u:m*p+c*Math.max(0,p-1)+u}if(t.kind==="row"||t.kind==="col"||t.kind==="stack"){let o=U(t.style,n,i),l=pt(r,o),c=L(o?.gap,l??void 0)??0,u=et(o?.padding,"block",r??void 0),p=t.children.map(h=>Pt(h,{responsiveMinWidth:n,availableWidthPx:l,breakpointMap:i,conservativeContainerText:s,textMetricsMode:a$1})).filter(h=>h!=null);return p.length?t.kind==="row"?Math.max(...p)+u:p.reduce((h,y)=>h+y,0)+c*Math.max(0,p.length-1)+u:u||null}return null}function kt(t,e){let n=e?.responsiveMinWidth??0,r=e?.availableWidthExpr??null,i=e?.availableWidthPx??null,s=e?.breakpointMap??a,a$1=e?.conservativeContainerText===true,o=e?.textMetricsMode??"default";if(t.kind==="rect"||t.kind==="square"||t.kind==="circle"){let l=q$1(t.style,n,s),c=T(l?.height,r??void 0);if(c!=null)return b([c,Z(l,r??void 0)??"0px"]);let u=Wt(l,r??B(tt));if(t.kind==="square")return b([u,Z(l,r??void 0)??"0px"]);let p=me(l?.aspectRatio);return p!=null?b([Ut(u,p),Z(l,r??void 0)??"0px"]):Z(l,r??void 0)??null}if(t.kind==="text"){let{style:l,metrics:c}=Ce({node:t,responsiveMinWidth:n,availableWidthPx:i,breakpointMap:s,conservativeContainerText:a$1,textMetricsMode:o});return b([B(c.totalHeight),Z(l,r??void 0)??"0px"])}if(t.kind==="media"){let l=U(t.style,n,s),c=re(r,l),u=pt(i,l),p=T(l?.gap,c??void 0)??"0px",h=L(l?.gap,u??void 0)??0,y=nt(l?.padding,"block",r??void 0)??"0px",m=Math.max(0,t.count|0),f={kind:t.tile?.shape??"rect",style:t.tile?.style,shimmer:t.tile?.shimmer},S=(t.direction??"row")==="row"&&m>1&&c!=null?Ut(Nt(c,v(p,Math.max(0,m-1))),m):c,W=(t.direction??"row")==="row"&&m>1&&u!=null?Math.max(0,(u-h*Math.max(0,m-1))/m):u,M=kt(f,{responsiveMinWidth:n,availableWidthExpr:S,availableWidthPx:W,breakpointMap:s,conservativeContainerText:a$1,textMetricsMode:o});return M==null?y||null:(t.direction??"row")==="row"||m<=1?b([M,y]):b([v(M,m),v(p,Math.max(0,m-1)),y])}if(t.kind==="row"||t.kind==="col"||t.kind==="stack"){let l=U(t.style,n,s),c=re(r,l),u=pt(i,l),p=T(l?.gap,c??void 0)??"0px",h=nt(l?.padding,"block",r??void 0)??"0px",y=t.children.map(m=>kt(m,{responsiveMinWidth:n,availableWidthExpr:c,availableWidthPx:u,breakpointMap:s,conservativeContainerText:a$1,textMetricsMode:o})).filter(m=>!!m);return y.length?t.kind==="row"?b([de(y),h]):b([...y.flatMap((m,f)=>f>0?[p,m]:[m]),h]):h||null}return null}function Ke(t){if(t==null)return null;let e=Number(t);return Number.isFinite(e)?Math.max(25,Math.min(260,e)):null}function qe(t){if(t==null)return null;let e=Number(t);return Number.isFinite(e)&&e>0?e:null}function Rt(t,e){let n=t.slots?.[e];return {item:n?.item??t.item,itemWrapStyle:Oe(t.itemWrapStyle,n?.itemWrapStyle),ratio:Ke(n?.ratio),heightPx:qe(n?.heightPx),span:n?.span}}function Se(t,e,n){let r=gt(t,n);for(let i of r)e.add(i.minWidth);}function Et(t){return Gt({span:t.span,columnCount:t.columnCount,width:t.minWidth,breakpointMap:t.breakpointMap})}function xn(t,e){return We(t,e)?.key??null}function We(t,e){if(!t.length)return null;let n=t[0];for(let r of t)if(e>=r.minWidth)n=r;else break;return n}function Ze(t){let{columnsRules:e,gapRules:n,baseColumns:r,baseGapPx:i,extraMinWidths:s}=t,a=new Set([0]),o=new Set;for(let p of e)a.add(p.minWidth);for(let p of n)a.add(p.minWidth);if(s)for(let p of s){let h=Math.max(0,p|0);a.add(h),o.add(h);}let l=Array.from(a).sort((p,h)=>p-h),c$1=[],u="";for(let p of l){let h=Qt(e,p,r),y=Qt(n,p,i),m=Math.max(1,h|0),f=Math.max(0,c(y,i)),S=`c${m}_g${f}`;S===u&&!o.has(p)||(c$1.push({minWidth:p,columns:m,gapPx:f,key:S===u?`${S}_m${p}`:S}),u=S);}return c$1.length?c$1:[{minWidth:0,columns:r,gapPx:i,key:`c${r}_g${i}`}]}function Ge(t){let e$1=pe(t.layoutWidthPx).filter(r=>r.value>0);if(!e$1.length)return;if(t.viewportWidth!=null){let r=We(t.states,t.viewportWidth),i=Ie(t.layoutWidthPx);return !r||i==null||i<=0?void 0:new Map([[r.key,i]])}let n=new Map;for(let r of t.states){let i=e(e$1,r.minWidth);i!=null&&i>0&&n.set(r.key,i);}return n.size?n:void 0}function Ye(t,e){return e!=null&&Number.isFinite(e)&&e>0?Math.max(e,tt):Math.max(t.minWidth||tt,tt)}function ie(t,e){let n=Ye(t,e);return t.columns>0?(n-t.gapPx*(t.columns-1))/t.columns:n}function ut(t,e,n){if(t){if(t.kind==="masonry"){u(t.style,e,n),ut(t.item,e,n);for(let r of t.slots??[])Se(r.span,e,n),ut(r.item,e,n);return}switch(t.kind){case "rect":case "square":case "circle":u(t.style,e,n);return;case "text":u(t.style,e,n);for(let r of i({barHeight:t.barHeight,barWidth:t.barWidth,lineHeight:t.lineHeight,lines:t.lines,lastBarWidth:t.lastBarWidth,breakpointMap:n}))e.add(r);return;case "media":u(t.style,e,n),u(t.tile?.style,e,n);return;case "stack":case "row":case "col":u(t.style,e,n);for(let r of t.children)ut(r,e,n);return}}}function Ue(t){return Number.isFinite(t)?Math.max(0,Math.round(t*1e3)/1e3):null}function Xe(t,e,n){if(t<=0){n.add(0);return}if(e.slope<=0)return;let r=Ue((t-e.intercept)/e.slope);r!=null&&n.add(r);}function vt(t){let{node:e,availableWidth:n,responsiveMinWidth:r,breakpointMap:i$1,out:s}=t;if(!(!e||!n))switch(e.kind){case "rect":case "square":case "circle":return;case "text":if(e.responsiveBy!=="container")return;for(let a of i({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,breakpointMap:i$1}))Xe(a,n,s);return;case "media":{let a=U(e.style,r,i$1),o=ne(n,a);if(!o)return;let l=L(a?.gap,0)??0,c=Math.max(0,e.count|0),u=(e.direction??"row")==="row"&&c>1?wt(be(o,l*Math.max(0,c-1)),1/c):o,p={kind:e.tile?.shape??"rect",style:e.tile?.style,shimmer:e.tile?.shimmer};vt({node:p,availableWidth:u,responsiveMinWidth:r,breakpointMap:i$1,out:s});return}case "stack":case "row":case "col":{let a=U(e.style,r,i$1),o=ne(n,a);if(!o)return;for(let l of e.children)vt({node:l,availableWidth:o,responsiveMinWidth:r,breakpointMap:i$1,out:s});return}}}function Je(t){let{state:e,span:n}=t,r=Math.max(1,e.columns|0),i={slope:1/r,intercept:-(e.gapPx*Math.max(0,r-1))/r};return {slope:i.slope*n,intercept:i.intercept*n+e.gapPx*Math.max(0,n-1)}}function Qe(t){let e=new Set([0]),{state:n,itemCount:r,structuredLayout:i,spans:s,breakpointMap:a}=t;if(!i)return [];for(let o=0;o<r;o++){let l=Rt(i,o),c=Et({span:l?.span??s?.[o],columnCount:n.columns,minWidth:n.minWidth,breakpointMap:a}),u=Je({state:n,span:c}),p=De(l.itemWrapStyle,u),h=p?ze(p,l.itemWrapStyle):null;vt({node:l.item,availableWidth:h,responsiveMinWidth:n.minWidth,breakpointMap:a,out:e});}return Array.from(e).sort((o,l)=>o-l)}function tn(t){if(!t.layout)return {structuredLayout:null,responsiveCss:""};let e=t.breakpointMap??a,n=0,r=()=>`n${++n}`,i=[],s=B$1(t.layout,r,i,"masonry",e),a$1=t.scopeId?C({scopeAttr:"data-rmg-mskel-scope",scopeId:t.scopeId,rules:i}):"";return {structuredLayout:s,responsiveCss:a$1}}function en(t){let e=t?.colsCssVar??"--rmg-cols",n=t?.gapCssVar??"--rmg-gap",r=t?.containerWidthCss??"100cqw";return I(`(${r} - ((var(${e}) - 1) * var(${n}))) / var(${e})`)}function se(t){let{span:e,columnWidthCssExpr:n,gapCssExpr:r="var(--rmg-gap)"}=t;return e<=1?n:b([v(n,e),v(r,Math.max(0,e-1))])}function oe(t){let{columnStart:e,columnWidthCssExpr:n,gapCssExpr:r="var(--rmg-gap)"}=t;return e<=0?"0px":b([v(n,e),v(r,e)])}function ae(t){let{index:e,slot:n,state:r,safeRatios:i,safeHeights:s,itemWidthCssExpr:a,itemWidthPx:o,breakpointMap:l,conservativeContainerText:c,textMetricsMode:u="default"}=t;if(n){let y=Wt(n.itemWrapStyle,a),m=ct(n.itemWrapStyle,o),f=je(y,n.itemWrapStyle),S=ye(m,n.itemWrapStyle),W=kt(n.item,{responsiveMinWidth:r.minWidth,availableWidthExpr:f,availableWidthPx:S,breakpointMap:l,conservativeContainerText:c,textMetricsMode:u});if(W)return b([W,ee(n.itemWrapStyle,y)??"0px"])}let p=Wt(n?.itemWrapStyle,a),h=ee(n?.itemWrapStyle,p)??"0px";return n?.heightPx!=null?b([B(n.heightPx),h]):n?.ratio!=null?b([I(`${p} * ${n.ratio/100}`),h]):s?.length?b([B(s[e%s.length]),h]):i.length?b([I(`${p} * ${i[e%i.length]/100}`),h]):b([p,h])}function le(t){let{index:e,slot:n,state:r,safeRatios:i,safeHeights:s,itemWidthPx:a,breakpointMap:o,conservativeContainerText:l,textMetricsMode:c="default"}=t;if(n){let y=ct(n.itemWrapStyle,a),m=ye(y,n.itemWrapStyle),f=Pt(n.item,{responsiveMinWidth:r.minWidth,availableWidthPx:m,breakpointMap:o,conservativeContainerText:l,textMetricsMode:c});if(f!=null)return Math.ceil(f+te(n.itemWrapStyle,y))}let u=ct(n?.itemWrapStyle,a),p=te(n?.itemWrapStyle,u),h=n?.heightPx!=null?n.heightPx:n?.ratio!=null?Math.round(n.ratio/100*u):s?.length?s[e%s.length]:i.length?Math.round(i[e%i.length]/100*u):u;return Math.ceil(h+p)}function Mt(t,e,n){let r=0;for(let i=e;i<e+n;i++)r=Math.max(r,t[i]??0);return r}function nn(t,e,n){let r=0;for(let i=e;i<e+n;i++)r+=t[i]??0;return r}function rn(t){let e=Math.max(1,t.columnCount-t.span+1);return t.cursor%e}function Ct(t){let{itemCount:e,columnCount:n,placement:r,heights:i,gapPx:s,spans:a}=t,o=Math.max(1,n|0),l=new Array(o).fill(0),c=new Array(o).fill(0),u=[],p=0,h=0,y=0;for(let m=0;m<e;m++){let f=Math.max(1,Math.min(o,Math.round(a?.[m]??1)||1)),S=i[m]??0,W=Math.max(0,o-f),M=0,C=0;if(r==="roundRobin")M=rn({cursor:h,columnCount:o,span:f}),C=Mt(l,M,f),h+=1;else if(r==="horizontalOrder")M=y%o,M+f>o&&(M=0),C=Mt(l,M,f),y=M+f;else {let R=0,N=Number.POSITIVE_INFINITY,X=Number.POSITIVE_INFINITY;for(let d=0;d<=W;d++){let w=Mt(l,d,f),D=nn(c,d,f);(w<N||w===N&&D<X||w===N&&D===X&&d<R)&&(R=d,N=w,X=D);}M=R,C=Number.isFinite(N)?N:0;}let H=C+S+s;for(let R=M;R<M+f;R++)l[R]=H,c[R]=(c[R]??0)+1;p=Math.max(p,C+S),u.push({index:m,span:f,columnStart:M,top:C,height:S});}return {items:u,height:p}}function St(t){if(t.items.length===0)return {itemTopCssExprs:[],itemHeightCssExprs:[],shellHeightCssExpr:"0px",cssVars:{}};let e=Math.max(1,t.columnCount|0),n=new Array(e).fill(0),r=new Array(e).fill(null),i=[],s=[],a={};for(let[u,p]of t.items.entries()){let h=`--rmg-mskel-height-${p.index}`,y=`var(${h})`;a[h]=p.heightCssExpr,s.push(y);let m=0,f=null;for(let C=p.columnStart;C<p.columnStart+p.span;C++){let H=n[C]??0,R=r[C]??null;(H>m||f==null)&&(m=H,f=R);}let S=m<=0||!f?"0px":t.gapPx>0?b([f,B(t.gapPx)]):f,W=b([S,y]);i.push(S);let M=(m>0?m+t.gapPx:0)+p.heightPx;for(let C=p.columnStart;C<p.columnStart+p.span;C++)n[C]=M,r[C]=W;}let l=0,c="0px";for(let u=0;u<e;u++){let p=n[u]??0,h=r[u]??"0px";p>=l&&(l=p,c=h);}return {itemTopCssExprs:i,itemHeightCssExprs:s,shellHeightCssExpr:c,cssVars:a}}function yn(t$1){let e=t$1.spec??Ae(),n={...a,...t$1.breakpoints??{}},r=pe(t$1.layoutWidthPx).filter(d=>d.value>0),i=e.ratios??ue,s=(Array.isArray(t$1.ratios)&&t$1.ratios.length?t$1.ratios:Array.isArray(e.ratios)&&e.ratios.length?e.ratios:i).map(d=>Number(d)).filter(d=>Number.isFinite(d)).map(d=>Math.max(25,Math.min(220,d))),a$1=(Array.isArray(t$1.heightsPx)&&t$1.heightsPx.length?t$1.heightsPx:Array.isArray(e.heightsPx)&&e.heightsPx.length?e.heightsPx:null)?.map(d=>Number(d)).filter(d=>Number.isFinite(d)&&d>0)??null,o=Xt(t$1.columns,n),l=Xt(t$1.gap,n),c$1=Jt(t$1.columns,o,4),u=Jt(t$1.gap,l,8),p$1=Math.max(1,c$1|0),h=Math.max(0,c(u,8)),y=Ze({columnsRules:o,gapRules:l,baseColumns:p$1,baseGapPx:h,extraMinWidths:(()=>{let d=new Set;ut(e.layout,d,n);for(let w of t$1.spans??[])Se(w,d,n);for(let w of r)d.add(w.minWidth);return d})()}),m=Ge({states:y,layoutWidthPx:t$1.layoutWidthPx,viewportWidth:t$1.viewportWidth}),{structuredLayout:f,responsiveCss:S}=tn({layout:e.layout,scopeId:t$1.scopeId,breakpointMap:n}),W=t$1.respectLayoutCount===false?Math.max(0,t$1.count|0):f?.count!=null?Math.max(0,f.count|0):Math.max(0,t$1.count|0),M=t$1.placement??"balanced",C="--rmg-mskel-colw",H=`var(${C})`,R=en(),N="var(--rmg-gap)",X=y.map(d=>{let w=m?.has(d.key)===true,D=!w,Lt=ie(d,m?.get(d.key)),$t=x=>Array.from({length:W},(g,P)=>{let $=f?Rt(f,P):null,A=Et({span:$?.span??t$1.spans?.[P],columnCount:d.columns,minWidth:d.minWidth,breakpointMap:n}),V=Lt*A+d.gapPx*Math.max(0,A-1),k=`--rmg-mskel-width-${P}`,E=se({span:A,columnWidthCssExpr:H,gapCssExpr:N}),O=`var(${k})`,Q=le({index:P,slot:$,state:d,safeRatios:s,safeHeights:a$1,itemWidthPx:V,breakpointMap:n,conservativeContainerText:D,textMetricsMode:x}),ot=ae({index:P,slot:$,state:d,safeRatios:s,safeHeights:a$1,itemWidthCssExpr:O,itemWidthPx:V,breakpointMap:n,conservativeContainerText:D,textMetricsMode:x});return {slot:$,span:A,height:Q,heightCssExpr:ot,itemWidthPx:V,itemWidthVarName:k,itemWidthCssValue:E,itemWidthCssExpr:O}}),J=$t("default"),z=$t("safari"),Ft=Ct({itemCount:W,columnCount:d.columns,placement:M,heights:J.map(x=>x.height),gapPx:d.gapPx,spans:J.map(x=>x.span)}),rt=St({columnCount:d.columns,gapPx:d.gapPx,items:Ft.items.map((x,g)=>({index:g,columnStart:x.columnStart,span:x.span,heightPx:x.height,heightCssExpr:J[g]?.heightCssExpr??B(x.height)}))}),Ht=Ct({itemCount:W,columnCount:d.columns,placement:M,heights:z.map(x=>x.height),gapPx:d.gapPx,spans:z.map(x=>x.span)}),it=St({columnCount:d.columns,gapPx:d.gapPx,items:Ht.items.map((x,g)=>({index:g,columnStart:x.columnStart,span:x.span,heightPx:x.height,heightCssExpr:z[g]?.heightCssExpr??B(x.height)}))}),st={[C]:R};for(let x of J)st[x.itemWidthVarName]=x.itemWidthCssValue;Object.assign(st,rt.cssVars);let Re={...st,...it.cssVars},Bt=x=>!w&&f?Qe({state:d,itemCount:W,structuredLayout:f,spans:t$1.spans,breakpointMap:n}).map(g=>{let P=ie(d,g),$=Array.from({length:W},(k,E)=>{let O=Rt(f,E),Q=Et({span:O?.span??t$1.spans?.[E],columnCount:d.columns,minWidth:d.minWidth,breakpointMap:n}),ot=P*Q+d.gapPx*Math.max(0,Q-1),Ne=`var(${`--rmg-mskel-width-${E}`})`,we=le({index:E,slot:O,state:d,safeRatios:s,safeHeights:a$1,itemWidthPx:ot,breakpointMap:n,conservativeContainerText:false,textMetricsMode:x}),Le=ae({index:E,slot:O,state:d,safeRatios:s,safeHeights:a$1,itemWidthCssExpr:Ne,itemWidthPx:ot,breakpointMap:n,conservativeContainerText:false,textMetricsMode:x});return {slot:O,span:Q,height:we,heightCssExpr:Le}}),A=Ct({itemCount:W,columnCount:d.columns,placement:M,heights:$.map(k=>k.height),gapPx:d.gapPx,spans:$.map(k=>k.span)}),V=St({columnCount:d.columns,gapPx:d.gapPx,items:A.items.map((k,E)=>({index:E,columnStart:k.columnStart,span:k.span,heightPx:k.height,heightCssExpr:$[E]?.heightCssExpr??B(k.height)}))});return {minWidth:g,rootDecls:{height:V.shellHeightCssExpr,...V.cssVars},items:A.items.map((k,E)=>({index:E,topCssExpr:V.itemTopCssExprs[E],leftCssExpr:oe({columnStart:k.columnStart,columnWidthCssExpr:H,gapCssExpr:N}),widthCssExpr:se({span:k.span,columnWidthCssExpr:H,gapCssExpr:N})}))}}):void 0,Ee=Bt("default"),ve=Bt("safari");return {state:d,shellHeightCssExpr:rt.shellHeightCssExpr,positionedCssVars:st,containerCssRules:Ee,safariShellHeightCssExpr:it.shellHeightCssExpr,safariPositionedCssVars:Re,safariContainerCssRules:ve,items:J.map((x,g)=>{let P=Ft.items[g]??{span:x.span,columnStart:0,top:0,height:x.height},$=Ht.items[g]??{span:x.span,columnStart:P.columnStart,top:P.top,height:z[g]?.height??x.height};return {index:g,height:x.height,columnIndex:P.columnStart,columnStart:P.columnStart,span:P.span,top:P.top,topCssExpr:rt.itemTopCssExprs[g],leftPx:P.columnStart*(Lt+d.gapPx),leftCssExpr:oe({columnStart:P.columnStart,columnWidthCssExpr:H,gapCssExpr:N}),widthPx:x.itemWidthPx,widthCssExpr:x.itemWidthCssExpr,slot:x.slot,heightCssExpr:rt.itemHeightCssExprs[g]??x.heightCssExpr,safariHeight:z[g]?.height??x.height,safariTop:$.top,safariTopCssExpr:it.itemTopCssExprs[g],safariHeightCssExpr:it.itemHeightCssExprs[g]??z[g]?.heightCssExpr??x.heightCssExpr}})}});return {itemCount:W,states:y,variants:X,structuredLayout:f,structuredNodeId:f?.__rmgNodeId,plainStructuredStyle:f?p(t(f.style,n)):void 0,responsiveCss:S}}function bn(t,e){if(!t.length)return null;let n=t[0];for(let r of t)if(e>=r.state.minWidth)n=r;else break;return n}function sn(t){return t.items.length?Math.max(0,...t.items.map(e=>e.top+e.height)):0}function G(t,e){return `${t}:${e} !important;`}function dt(t,e="default"){let n=e==="safari"?t.safariShellHeightCssExpr??t.shellHeightCssExpr:t.shellHeightCssExpr,r=e==="safari"?t.safariPositionedCssVars??t.positionedCssVars:t.positionedCssVars,i=[["height",n??`${sn(t)}px`],["--rmg-cols",t.state.columns],["--rmg-gap",`${t.state.gapPx}px`]];for(let[s,a]of Object.entries(r??{}))i.push([s,a]);return i}function Pe(t){return t.map(([e,n])=>e==="height"?["min-height",n]:[e,n])}function gn(t){if(!t.scopeId||!t.prediction.variants.length)return "";let e=`[data-rmg-masonry-layout-seed="${v$1(t.scopeId)}"]`,n=(i,s)=>{let a=`${e}{`+i.map(([l,c])=>G(l,c)).join("")+"}",o=s.map(l=>`${`${e}>[data-rmg-idx="${l.index}"]`}{`+[G("top",l.topCssExpr??"0px"),G("left",l.leftCssExpr),G("width",l.widthCssExpr)].join("")+"}").join("");return `${a}${o}`},r=i=>{let s=dt(i),a=n(s,i.items.map(u=>({index:u.index,topCssExpr:u.topCssExpr??`${u.top}px`,leftCssExpr:u.leftCssExpr,widthCssExpr:u.widthCssExpr}))),o=(i.containerCssRules??[]).map(u=>`@container (min-width:${u.minWidth}px){${n(Object.entries(u.rootDecls),u.items)}}`).join(""),l=n(dt(i,"safari"),i.items.map(u=>({index:u.index,topCssExpr:u.safariTopCssExpr??u.topCssExpr??`${u.safariTop}px`,leftCssExpr:u.leftCssExpr,widthCssExpr:u.widthCssExpr}))),c=(i.safariContainerCssRules??[]).map(u=>`@container (min-width:${u.minWidth}px){${n(Object.entries(u.rootDecls),u.items)}}`).join("");return `${a}${o}@supports ${c$1}{${l}${c}}`};return t.prediction.variants.map(i=>{let s=r(i);return i.state.minWidth<=0?s:`@media (min-width:${i.state.minWidth}px){${s}}`}).join(`
|
|
2
|
+
`)}function Mn(t){if(!t.scopeId||!t.prediction.variants.length)return "";let e=`[data-rmg-masonry-skeleton-shell="${v$1(t.scopeId)}"]`,n=i=>`${e}{`+Pe(i).map(([s,a])=>G(s,a)).join("")+"}",r=i=>{let s=n(dt(i)),a=(i.containerCssRules??[]).map(o=>`@container (min-width:${o.minWidth}px){${n(Object.entries(o.rootDecls))}}`).join("");return `${s}${a}`};return t.prediction.variants.map(i=>{let s=r(i);return i.state.minWidth<=0?s:`@media (min-width:${i.state.minWidth}px){${s}}`}).join(`
|
|
3
|
+
`)}function Cn(t){if(!t.scopeId||!t.prediction.variants.length)return "";let e=`[data-rmg-masonry-skeleton-shell="${v$1(t.scopeId)}"]`,n=i=>`${e}{`+Pe(i).map(([s,a])=>G(s,a)).join("")+"}",r=i=>{let s=n(dt(i,"safari")),a=(i.safariContainerCssRules??[]).map(o=>`@container (min-width:${o.minWidth}px){${n(Object.entries(o.rootDecls))}}`).join("");return `@supports ${c$1}{${s}${a}}`};return t.prediction.variants.map(i=>{let s=r(i);return i.state.minWidth<=0?s:`@media (min-width:${i.state.minWidth}px){${s}}`}).join(`
|
|
4
|
+
`)}var ke=F.createContext(null);function Wn(t){return jsx(ke.Provider,{value:t.value,children:t.children})}function Pn(){return F.useContext(ke)}export{ln as a,un as b,Gt as c,xn as d,en as e,se as f,oe as g,Ct as h,yn as i,bn as j,gn as k,Mn as l,Cn as m,Wn as n,Pn as o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-MJAHN7TG.mjs';import {b as b$1,a as a$2}from'./chunk-Y7NUGXTR.mjs';import {b}from'./chunk-UML6FCOQ.mjs';import {d}from'./chunk-WMG2LTLR.mjs';import {a}from'./chunk-HK2DPKES.mjs';import*as t from'react';import {jsx}from'react/jsx-runtime';var v=t.forwardRef(function(R,I){let{children:M,breakpoints:l,gridItemBaseClass:G,renderMode:y,...m}=R,n=d(),b$2=b(),C=t.useMemo(()=>n?.effectiveBreakpoints??{...a,...l||{}},[n?.effectiveBreakpoints,l]),i=t.useMemo(()=>({...m}),[m]),E=t.useRef(0),O=t.useCallback(()=>`rmg-${++E.current}`,[]),H=t.useMemo(()=>{let e=t.Children.toArray(M),r=[];for(let o of e){let s=b$1(o);s.node!=null&&r.push({id:O(),node:s.node,layoutMeta:s.layoutMeta});}return r},[]),[L]=t.useState(H);function k(e){return {renderIntro:e?.renderIntro,staggerMs:e?.staggerMs??60,durationMs:e?.durationMs??600,easing:e?.easing??"cubic-bezier(.2,.7,.2,1)"}}let T=t.useMemo(()=>k(i.intro),[i.intro]),a$2=n?.expandableImageRefs??t.useRef([]),h=n?.registerExpandableImage??t.useCallback((e,r)=>{if(!r){a$2.current[e]=null;return}if(r.tagName==="IMG"){a$2.current[e]=r;return}let o=r.querySelector("img");a$2.current[e]=o;},[]),x=e=>e?e instanceof HTMLImageElement?e:e.querySelector("img"):null,B=t.useCallback((e,r)=>{if(!n?.requestFullscreenOpen)return;let o=x(r??null)??a$2.current[e]??null;o&&n.requestFullscreenOpen({source:"grid",index:e,image:o,event:void 0});},[n,a$2]);return jsx(a$1,{ref:I,cells:L,grid:i,breakpoints:C,viewportWidth:b$2,intro:T,enableFullscreen:!!n?.fsEnabled,onOpen:B,registerExpandableImage:h,gridItemBaseClass:G,renderMode:y})}),w=Object.assign(v,{Item:a$2}),j=w;export{j as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {o,c as c$1,e,h as h$1,f,g}from'./chunk-
|
|
1
|
+
import {o,c as c$1,e,h as h$1,f,g}from'./chunk-4URHXPTV.mjs';import {a}from'./chunk-A6MPGIEJ.mjs';import {b as b$1}from'./chunk-UML6FCOQ.mjs';import {d}from'./chunk-WMG2LTLR.mjs';import {b,a as a$1,h,c}from'./chunk-HK2DPKES.mjs';import*as t from'react';import {jsx,jsxs}from'react/jsx-runtime';var O={masonryRoot:"ar",masonryCol:"tr",masonryItem:"k",masonryShellFrame:"nr",introContainer:"w",introActive:"L"};function le(e){if(e.preferPreviousHeight&&Number.isFinite(e.previousHeight)&&Number(e.previousHeight)>=0)return Number(e.previousHeight);let n=e.initialHeights?.[e.index];return Number.isFinite(n)&&Number(n)>0?Number(n):e.previousHeight??0}function ae(e){let n=e.previousHeights.slice(0,e.itemCount),f=n.length!==e.previousHeights.length;for(let r=0;r<e.itemCount;r++){if(e.measuredIndices.has(r)&&Number.isFinite(n[r]))continue;let h=le({index:r,previousHeight:n[r],initialHeights:e.initialHeights,preferPreviousHeight:e.preferPreviousHeights});n[r]!==h&&(n[r]=h,f=true);}return f?n:e.previousHeights}var ue=({items:e$1,masonrySpans:n,masonryColumns:f$1,masonryGap:r,masonryPlacement:h$2="balanced",masonryInitialHeights:v,masonryClassNames:S,masonryStyle:A,masonryAs:_="div",masonryRootRef:C,breakpoints:R,masonryPlugins:b,responsiveViewportWidth:x,onVisibleIndex:T,onLayoutMeasured:c$2,measurementKey:m,revealedIndicesRef:a,masonryLayoutSeedScopeId:w})=>{let g$1=b$1(),p=x??g$1,E=t.useRef(new Set),V=t.useRef(false),W=t.useRef(m),H=t.useMemo(()=>({...a$1,...R??{}}),[R]),[I,z]=t.useState(()=>ae({itemCount:e$1.length,previousHeights:[],measuredIndices:new Set,initialHeights:v})),N=t.useRef(I);t.useLayoutEffect(()=>{N.current=I;},[I]),t.useLayoutEffect(()=>{let i=N.current,d=W.current!==m;W.current=m;let s=e$1.length>0&&i.length>=e$1.length&&i.slice(0,e$1.length).every(l=>Number.isFinite(l)&&l>=0);if(!V.current){V.current=true,c$2?.(e$1.length===0);return}d&&E.current.clear(),c$2?.(e$1.length===0||s),z(()=>{let l=ae({itemCount:e$1.length,previousHeights:i,measuredIndices:E.current,initialHeights:v,preferPreviousHeights:d&&s});return N.current=l,l});},[e$1.length,v,m,c$2]);let P=t.useMemo(()=>{let i=h(f$1,4,p,H);return Math.max(1,i|0)},[f$1,p,H]),B=t.useMemo(()=>{let i=h(r,8,p,H);return Math.max(0,c(i,8))},[r,p,H]),F=t.useMemo(()=>e$1.map((i,u)=>c$1({span:n?.[u],columnCount:P,width:p,breakpointMap:H})),[e$1,n,P,p,H]),D=t.useMemo(()=>e({containerWidthCss:"100%"}),[]),L=t.useMemo(()=>{let i=h$1({itemCount:e$1.length,columnCount:P,placement:h$2,heights:I,gapPx:B,spans:F});return {height:i.height,items:i.items.map(u=>({...u,leftCssExpr:g({columnStart:u.columnStart,columnWidthCssExpr:D}),widthCssExpr:f({span:u.span,columnWidthCssExpr:D})}))}},[e$1.length,P,h$2,I,B,F,D]),M=t.useCallback(()=>{if(c$2){if(e$1.length===0){c$2(true);return}for(let i=0;i<e$1.length;i++)if(!E.current.has(i)){c$2(false);return}c$2(true);}},[e$1.length,c$2]),U=t.useCallback((i,u)=>{Number.isFinite(u)&&(u>=0&&E.current.add(i),M(),z(d=>{if(d[i]===u)return d;let l=d.slice();return l[i]=u,N.current=l,l}));},[M]);t.useLayoutEffect(()=>{M();},[I,M]);let j=t.useMemo(()=>e$1.map((i,u)=>{let d=L.items[u];return d?jsx(de,{index:u,onHeight:U,className:S?.item,masonryPlugins:b,onVisibleIndex:T,revealedIndicesRef:a,measurementKey:m,top:d.top,left:d.leftCssExpr,width:d.widthCssExpr,children:i},u):null}),[e$1,L.items,U,b,S?.item,T,m,a]);return jsx(_,{ref:C,className:S?.root,"data-rmg-masonry-layout-seed":w,style:{position:"relative",width:"100%",height:`${L.height}px`,"--rmg-cols":P,"--rmg-gap":`${B}px`,...A||{}},children:j})},de=({index:e,onHeight:n,className:f,top:r,left:h,width:v,masonryPlugins:S,onVisibleIndex:A,revealedIndicesRef:_,measurementKey:C,children:R})=>{let b=t.useRef(null),x=t.useRef(new Set),T=_??x,c=t.useMemo(()=>S?.find(a=>a.renderItem),[S]);t.useLayoutEffect(()=>{let a=b.current;if(!a)return;if(n(e,a.getBoundingClientRect().height),typeof ResizeObserver<"u"){let y=new ResizeObserver(k=>{for(let g of k)n(e,g.contentRect.height);});return y.observe(a),()=>y.disconnect()}},[e,n,C]),t.useEffect(()=>{if(!A)return;let a=b.current;if(!a)return;let w=false,y=()=>{w||(w=true,A(e));};if(typeof IntersectionObserver>"u"){y();return}let k=a.closest('[data-rmg-viewport="true"]'),g=new IntersectionObserver(p=>{for(let E of p)if(E.isIntersecting){y(),g.disconnect();break}},{root:k,rootMargin:"200px",threshold:.15});return g.observe(a),()=>g.disconnect()},[R,e,A]);let m={className:f,"data-rmg-idx":e,style:{position:"absolute",top:`${r}px`,left:h,width:v,"--rmg-intro-index":e}};return c?.renderItem?c.renderItem({index:e,itemRef:b,itemProps:m,children:R,revealedIndicesRef:T},c.options):jsx("div",{ref:b,...m,children:R})};function me(e,n){e&&(typeof e=="function"?e(n):e.current=n);}function pe(e){return e?Array.from(e.children).filter(n=>n instanceof HTMLElement&&n.hasAttribute("data-rmg-idx")):[]}function fe(e){return typeof e=="object"&&e!=null&&e.__rmgMasonryPlugin===true}var Le=t.forwardRef(function({items:n,itemSpans:f,masonry:r,breakpoints:h,intro:v,introReady:S=true},A){let _=d(),C=o(),R=t.useRef(null),b$1=t.useRef(null),x=t.useRef(new Set),T=t.useRef(new Set),c=t.useRef(new Set),m=t.useRef(false),a$1=t.useRef(n.length===0),w=t.useRef(n.length),[y,k]=t.useState(b),[g,p]=t.useState(n.length===0),[E,V]=t.useState(false),[W,H]=t.useState(false),[I,z]=t.useState(true);t.useLayoutEffect(()=>{let s=()=>{let l=window.innerWidth??document.documentElement.clientWidth??window.visualViewport?.width??0;l<=0||k($=>$===l?$:l);};return s(),window.addEventListener("resize",s),window.visualViewport?.addEventListener("resize",s),()=>{window.removeEventListener("resize",s),window.visualViewport?.removeEventListener("resize",s);}},[]),t.useLayoutEffect(()=>{z(false);},[]),t.useEffect(()=>{H(true);},[]),t.useEffect(()=>{x.current.clear(),T.current.clear();},[n.length]);let N=t.useMemo(()=>(r.plugins??[]).filter(fe),[r.plugins]),P=t.useMemo(()=>N.some(s=>s.blocksReady),[N]);a(!P,R,V);let F=y>0,L=(P?W&&F:F&&E)&&g,M=t.useCallback(()=>pe(R.current),[]);t.useImperativeHandle(A,()=>({getRootNode:()=>R.current,getItemNodes:M,isReady:()=>m.current,onReady:s=>(c.current.add(s),()=>{c.current.delete(s);})}),[M]),t.useEffect(()=>{if(m.current=L,!L)return;let s=M();c.current.forEach(l=>l(s));},[L,M]);let U=t.useCallback(s=>{x.current.has(s)||(x.current.add(s),_?.notifyBaseVisibleIndex(s));},[_]),j=t.useMemo(()=>JSON.stringify({itemCount:n.length,viewportWidth:y,columns:r.columns??null,gap:r.gap??null,placement:r.placement??"balanced",spans:f??[]}),[n.length,y,r.columns,r.gap,r.placement,f]);t.useEffect(()=>{g&&(a$1.current=true);},[g]),t.useLayoutEffect(()=>{let s=w.current!==n.length;if(w.current=n.length,n.length===0){a$1.current=true,p(true);return}(s||!a$1.current)&&(a$1.current=false,p(false));},[n.length,j]);let i=W&&S,u=[O.masonryRoot,O.introContainer,i?O.introActive:"",r.classNames?.root||""].filter(Boolean).join(" "),d$1=t.useCallback(s=>{R.current=s,me(r.rootRef,s);},[r.rootRef]);return jsx("div",{ref:b$1,className:O.masonryShellFrame,children:jsxs("div",{"data-rmg-masonry-content-ready":L?"true":"false",style:{containerType:"inline-size"},children:[C?.responsiveCss&&I?jsx("style",{dangerouslySetInnerHTML:{__html:C.responsiveCss}}):null,jsx(ue,{items:n,masonrySpans:f,masonryColumns:r.columns,masonryGap:r.gap,masonryPlacement:r.placement??"balanced",masonryClassNames:{root:u,column:[O.masonryCol,r.classNames?.column].filter(Boolean).join(" "),item:[O.masonryItem,r.classNames?.item].filter(Boolean).join(" ")},masonryStyle:{"--rmg-intro-stagger":`${v.staggerMs}ms`,"--rmg-intro-duration":`${v.durationMs}ms`,"--rmg-intro-easing":v.easing},masonryAs:r.as??"div",masonryRootRef:d$1,breakpoints:h,masonryPlugins:N,masonryInitialHeights:C?.initialHeights,responsiveViewportWidth:y,onVisibleIndex:U,onLayoutMeasured:p,measurementKey:j,revealedIndicesRef:T,masonryLayoutSeedScopeId:C?.scopeId})]})})});export{Le as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as t from'react';import {jsx}from'react/jsx-runtime';var a=t.createContext(null);function u({children:n,options:o,snapshot:e,snapshots:l}){let r=t.useMemo(()=>{let s={...l??{}};return e?.key&&(s[e.key]=e),{options:o,snapshots:s}},[o,e,l]);return jsx(a.Provider,{value:r,children:n})}function c(){return t.useContext(a)}function C(n,o){let e=n?.key??o?.options?.key;return e?{...o?.options??{},...n??{key:e},key:e,snapshot:n?.snapshot??o?.snapshots?.[e]??o?.options?.snapshot??null,cookie:{...o?.options?.cookie??{},...n?.cookie??{}}}:null}export{u as a,c as b,C as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var N=1,T=6e5,I=250,K="rmg_skel_cache",p=/^(?:0|[1-9]\d{0,4})(?:\.\d{1,3})?(?:px|%)$/;function g(n){return !!n&&typeof n=="object"&&!Array.isArray(n)}function l(n,e){let t=Number(n);return !Number.isFinite(t)||e?.min!=null&&t<e.min||e?.max!=null&&t>e.max?null:e?.integer?Math.trunc(t):t}function f(n){return typeof n=="string"&&n.trim()?n.trim():null}function P(n){let e=f(n);return !e||!p.test(e)?null:e}function b(n,e){if(!Array.isArray(n)||e?.maxLength!=null&&n.length>e.maxLength)return;let t=[];for(let r of n){let i=l(r,{min:e?.min,max:e?.max});if(i==null)return;t.push(Math.round(i*1e3)/1e3);}return t}function W(n){if(Array.isArray(n)){let[s,h,o,c,a,m]=n,w=l(s,{min:1,max:64,integer:true});if(w==null)return null;let y=b(h,{maxLength:64,min:0,max:1e4}),k=o==null?void 0:l(o,{min:0,max:1e3}),S=c==null?void 0:l(c,{min:0,max:10}),C=a==null?void 0:l(a,{min:0,max:1e5}),x=Array.isArray(m)?m.map(P):void 0;return h!=null&&!y||o!=null&&k==null||c!=null&&S==null||a!=null&&C==null||x&&x.some(H=>!H)?null:{lines:w,...y?.length?{lineWidthsPx:y}:null,...k!=null?{barHeight:k}:null,...S!=null?{lineHeight:S}:null,...C!=null?{containerWidthPx:C}:null,...x?.length?{barWidths:x}:null}}if(!g(n))return null;let e=l(n.lines,{min:1,max:64,integer:true});if(e==null)return null;let t=Array.isArray(n.barWidths)?n.barWidths.map(P):void 0;if(t&&t.some(s=>!s))return null;let r=b(n.lineWidthsPx,{maxLength:64,min:0,max:1e4}),i=n.barHeight==null?void 0:l(n.barHeight,{min:0,max:1e3}),u=n.lineHeight==null?void 0:l(n.lineHeight,{min:0,max:10}),d=n.containerWidthPx==null?void 0:l(n.containerWidthPx,{min:0,max:1e5});return n.barHeight!=null&&i==null||n.lineHeight!=null&&u==null||n.containerWidthPx!=null&&d==null?null:{lines:e,...t?.length?{barWidths:t}:null,...r?.length?{lineWidthsPx:r}:null,...i!=null?{barHeight:i}:null,...u!=null?{lineHeight:u}:null,...d!=null?{containerWidthPx:d}:null}}function E(n){if(!g(n))return null;let e={};for(let[t,r]of Object.entries(n)){let i=f(t);if(!i)return null;let u=W(r);if(!u)return null;e[i]=u;}return e}function _(n){if(n==null)return;if(!g(n))return null;let e=f(n.variantKey??n.v);if(!e)return null;let t=(n.shellHeightPx??n.h)==null?void 0:l(n.shellHeightPx??n.h,{min:0,max:1e5}),r=b(n.itemHeightsPx??n.i,{maxLength:500,min:0,max:1e5});return (n.shellHeightPx??n.h)!=null&&t==null||(n.itemHeightsPx??n.i)!=null&&!r?null:{variantKey:e,...t!=null?{shellHeightPx:t}:null,...r?.length?{itemHeightsPx:r}:null}}function A(n){try{return decodeURIComponent(n)}catch{return n}}function M(n){let e=5381;for(let t=0;t<n.length;t++)e=(e<<5)+e^n.charCodeAt(t);return (e>>>0).toString(36)}function O(n){return n.trim().replace(/[^a-zA-Z0-9_-]+/g,"_").replace(/^_+|_+$/g,"").slice(0,48)||"default"}function L(n){if(!g(n)||(n.version??n.v)!==1)return null;let e=f(n.key??n.k),t=f(n.scopeId??n.s),r=n.kind??n.d,i=r==="s"||r==="skeleton"?"skeleton":r==="m"||r==="masonry"?"masonry":null,u=l(n.createdAt??n.t,{min:1}),d=l(n.widthBucketMin??n.b,{min:0,max:1e5}),s=l(n.viewportWidth??n.w,{min:1,max:1e5}),h=n.layoutWidthPx??n.l,o=h==null?void 0:l(h,{min:0,max:1e5}),c=(n.routeKey??n.r)==null?void 0:f(n.routeKey??n.r),a=E(n.text??n.x),m=_(n.masonry??n.m);return !e||!t||!i||u==null||d==null||s==null||h!=null&&o==null||(n.routeKey??n.r)!=null&&!c||!a||m===null?null:{version:1,key:e,scopeId:t,kind:i,...c?{routeKey:c}:null,createdAt:u,widthBucketMin:d,viewportWidth:s,...o!=null?{layoutWidthPx:o}:null,...m?{masonry:m}:null,text:a}}function z(n){let e=typeof n=="string"&&n.trim()?n.trim():"default";return `${K}_${O(e)}_${M(e)}`}function B(n){let e={};for(let[t,r]of Object.entries(n.text)){let i=[r.lines,r.lineWidthsPx?.length?r.lineWidthsPx:void 0,r.barHeight,r.lineHeight,r.containerWidthPx,r.barWidths?.length?r.barWidths:void 0];for(;i.length>1&&i[i.length-1]==null;)i.pop();e[t]=i;}return JSON.stringify({v:1,k:n.key,s:n.scopeId,d:n.kind==="masonry"?"m":"s",...n.routeKey?{r:n.routeKey}:null,t:n.createdAt,b:n.widthBucketMin,w:n.viewportWidth,...n.layoutWidthPx!=null?{l:n.layoutWidthPx}:null,...n.masonry?{m:{v:n.masonry.variantKey,...n.masonry.shellHeightPx!=null?{h:n.masonry.shellHeightPx}:null,...n.masonry.itemHeightsPx?.length?{i:n.masonry.itemHeightsPx}:null}}:null,x:e})}function R(n,e={}){if(!n)return null;let t=typeof e.ttlMs=="number"&&Number.isFinite(e.ttlMs)?Math.max(0,e.ttlMs):6e5,i=(typeof e.now=="number"&&Number.isFinite(e.now)?e.now:Date.now())-n.createdAt;if(t>0&&(i<0||i>t)||e.key!=null&&n.key!==e.key||e.scopeId!=null&&n.scopeId!==e.scopeId||e.kind!=null&&n.kind!==e.kind||e.routeKey!=null&&n.routeKey!==e.routeKey||e.widthBucketMin!=null&&n.widthBucketMin!==e.widthBucketMin)return null;if(e.textIds?.length){for(let u of e.textIds)if(!n.text[u])return null}return e.variantKeys?.length&&n.masonry?.variantKey&&!e.variantKeys.includes(n.masonry.variantKey)||e.itemCount!=null&&n.masonry?.itemHeightsPx&&n.masonry.itemHeightsPx.length!==e.itemCount?null:n}function F(n,e={}){if(!n)return null;let t;try{t=JSON.parse(A(n));}catch{return null}return R(L(t),e)}function $(n=typeof window<"u"?window.location:void 0){return n?`${n.pathname}${n.search}`:""}export{N as a,T as b,I as c,z as d,B as e,R as f,F as g,$ as h};
|