react-motion-gallery 2.0.25 → 2.0.27
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 +13 -11
- package/dist/FullscreenRuntime-MUWPY5LW.css +1 -0
- package/dist/FullscreenRuntime-PBPRYMKP.mjs +4 -0
- package/dist/{chunk-CKXN2H7S.mjs → chunk-3RVITFUD.mjs} +1 -1
- package/dist/{chunk-ZFDPVAPM.mjs → chunk-3WAORSPA.mjs} +1 -1
- package/dist/chunk-4BTS6IIA.mjs +2 -0
- package/dist/{chunk-GNGOOOVY.mjs → chunk-4ZOW533S.mjs} +1 -1
- package/dist/chunk-63CVVCOL.mjs +2 -0
- package/dist/chunk-7AEUL74Y.mjs +3 -0
- package/dist/{chunk-YIUXD3CO.mjs → chunk-7PF7OJT2.mjs} +1 -1
- package/dist/{chunk-6PUPWNGD.mjs → chunk-7YGT5VBX.mjs} +1 -1
- package/dist/{chunk-5ZLGEQ55.mjs → chunk-A5VUIE75.mjs} +1 -1
- package/dist/{chunk-6XG7U4FJ.mjs → chunk-EJ7I3UYI.mjs} +1 -1
- package/dist/chunk-J3UHEYNG.mjs +4 -0
- package/dist/chunk-KJZTKXTM.mjs +1 -0
- package/dist/chunk-LCMXCWY3.mjs +1 -0
- package/dist/chunk-LSHR3FZM.mjs +4 -0
- package/dist/chunk-MFTASEWB.mjs +1 -0
- package/dist/{chunk-VGXO2IAF.mjs → chunk-MJD4OUYN.mjs} +1 -1
- package/dist/{chunk-OZSG45IP.mjs → chunk-PA3ECBCE.mjs} +1 -1
- package/dist/{chunk-ONCDUVQT.mjs → chunk-RFWZVERZ.mjs} +1 -1
- package/dist/{chunk-ZXW3RIAC.mjs → chunk-UFX2HJMQ.mjs} +1 -1
- package/dist/chunk-ULUKLQXS.mjs +1 -0
- package/dist/chunk-X3W6JPNH.mjs +4 -0
- package/dist/entries.css +1 -1
- package/dist/entries.mjs +1 -1
- package/dist/fullscreen-captions.css +1 -1
- package/dist/fullscreen-captions.mjs +1 -1
- package/dist/fullscreen-lazy-load.css +1 -1
- package/dist/fullscreen-lazy-load.mjs +1 -1
- package/dist/fullscreen-slider.css +1 -1
- package/dist/fullscreen-slider.mjs +1 -1
- package/dist/fullscreen-video.css +1 -1
- package/dist/fullscreen-video.mjs +1 -1
- package/dist/fullscreen.css +1 -1
- package/dist/fullscreen.mjs +1 -1
- package/dist/fullscreenThumbnails.css +1 -1
- package/dist/fullscreenThumbnails.mjs +1 -1
- package/dist/grid-lazy-load.css +1 -1
- package/dist/grid-lazy-load.mjs +1 -1
- package/dist/grid.css +1 -1
- package/dist/grid.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.mjs +1 -1
- package/dist/masonry-lazy-load.css +1 -1
- package/dist/masonry-lazy-load.mjs +1 -1
- package/dist/masonry.css +1 -1
- package/dist/masonry.mjs +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/skeleton-base.css +1 -1
- package/dist/skeleton-base.mjs +1 -1
- package/dist/skeleton-grid.css +1 -1
- package/dist/skeleton-grid.mjs +1 -1
- package/dist/skeleton-masonry.css +1 -1
- package/dist/skeleton-masonry.mjs +1 -1
- package/dist/skeleton-slider.css +1 -1
- package/dist/skeleton-slider.mjs +4 -4
- package/dist/slider-dots.css +1 -1
- package/dist/slider-dots.mjs +1 -1
- package/dist/slider-lazy-load.css +1 -1
- package/dist/slider-lazy-load.mjs +1 -1
- package/dist/slider-loading.css +1 -1
- package/dist/slider-loading.mjs +1 -1
- package/dist/slider-scrollbar.css +1 -1
- package/dist/slider-scrollbar.mjs +1 -1
- package/dist/slider.css +1 -1
- package/dist/slider.mjs +1 -1
- package/dist/styles.css +4 -2
- package/dist/thumbnails.css +1 -1
- package/dist/thumbnails.mjs +1 -1
- package/dist/video.css +1 -1
- package/dist/video.mjs +1 -1
- package/package.json +1 -1
- package/dist/FullscreenRuntime-DVRVGK5F.mjs +0 -4
- package/dist/FullscreenRuntime-QX6YELBN.css +0 -1
- package/dist/chunk-AX2FSVFD.mjs +0 -2
- package/dist/chunk-BJBHSWMF.mjs +0 -1
- package/dist/chunk-DCUCXQHE.mjs +0 -3
- package/dist/chunk-G5G54AZD.mjs +0 -4
- package/dist/chunk-GTS3HDGY.mjs +0 -1
- package/dist/chunk-HMT6GZUO.mjs +0 -4
- package/dist/chunk-MKCNUQFD.mjs +0 -1
- package/dist/chunk-NQI246HG.mjs +0 -1
- package/dist/chunk-PPFUWP7C.mjs +0 -3
- package/dist/chunk-RNLUNA5L.mjs +0 -2
package/README.md
CHANGED
|
@@ -6,12 +6,12 @@ The package stays close to React composition. `Slider`, `Grid`, and `Masonry` re
|
|
|
6
6
|
|
|
7
7
|
## Runtime Gzip Sizes
|
|
8
8
|
|
|
9
|
-
This table reports local gzip measurements for selected runtime surfaces. Type-only imports are erased and add no JS;
|
|
9
|
+
This table reports local gzip measurements for selected runtime surfaces. Type-only imports are erased and add no JS; feature subpath rows measure only that feature entry point. The script rebundles one export at a time from its published ESM entry point, excludes peer and runtime externals, and gzips the resulting JS bundle. Run `npm run build && npm run size:readme` in `packages/react-motion-gallery` to refresh it.
|
|
10
10
|
|
|
11
11
|
<!-- bundle-size:start -->
|
|
12
12
|
| Surface | JS gzip |
|
|
13
13
|
| --- | --- |
|
|
14
|
-
| `Entries` | 13.
|
|
14
|
+
| `Entries` | 13.4kB |
|
|
15
15
|
| `FullscreenThumbnailSlider` | 20.3kB |
|
|
16
16
|
| `GalleryCore` | 2.6kB |
|
|
17
17
|
| `Grid` | 6.3kB |
|
|
@@ -20,14 +20,14 @@ 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` | 8.
|
|
24
|
-
| `skeleton/slider` |
|
|
25
|
-
| `skeleton/grid` | 10.
|
|
26
|
-
| `skeleton/masonry` |
|
|
23
|
+
| `Skeleton base` | 8.3kB |
|
|
24
|
+
| `skeleton/slider` | 17.0kB |
|
|
25
|
+
| `skeleton/grid` | 10.6kB |
|
|
26
|
+
| `skeleton/masonry` | 18.7kB |
|
|
27
27
|
| `Slider core` | 18.7kB |
|
|
28
28
|
| `slider/ready` | 894.0B |
|
|
29
29
|
| `slider/arrows` | 1.2kB |
|
|
30
|
-
| `slider/dots` |
|
|
30
|
+
| `slider/dots` | 933.0B |
|
|
31
31
|
| `slider/progress` | 892.0B |
|
|
32
32
|
| `slider/scrollbar` | 1.2kB |
|
|
33
33
|
| `slider/auto-height` | 1.3kB |
|
|
@@ -39,12 +39,12 @@ This table reports local gzip measurements for selected runtime surfaces. Type-o
|
|
|
39
39
|
| `slider/fullscreen` | 959.0B |
|
|
40
40
|
| `ThumbnailSlider` | 18.9kB |
|
|
41
41
|
| `useFullscreenController` | 4.9kB |
|
|
42
|
-
| `fullscreen/slider` |
|
|
42
|
+
| `fullscreen/slider` | 36.7kB |
|
|
43
43
|
| `fullscreen/controls` | 173.0B |
|
|
44
44
|
| `fullscreen/captions` | 13.1kB |
|
|
45
45
|
| `fullscreen/zoom-pan` | 9.9kB |
|
|
46
|
-
| `fullscreen/video` | 16.
|
|
47
|
-
| `fullscreen/lazy-load` | 13.
|
|
46
|
+
| `fullscreen/video` | 16.4kB |
|
|
47
|
+
| `fullscreen/lazy-load` | 13.2kB |
|
|
48
48
|
| `fullscreen/crossfade` | 181.0B |
|
|
49
49
|
| `fullscreen/thumbnails` | 160.0B |
|
|
50
50
|
| `Video` | 12.7kB |
|
|
@@ -53,7 +53,7 @@ This table reports local gzip measurements for selected runtime surfaces. Type-o
|
|
|
53
53
|
| `responsive / BREAKPOINT_MAP` | 85.0B |
|
|
54
54
|
<!-- bundle-size:end -->
|
|
55
55
|
|
|
56
|
-
##
|
|
56
|
+
## Installation
|
|
57
57
|
|
|
58
58
|
Install the package, then add the optional video peers only if you use `Video`.
|
|
59
59
|
|
|
@@ -68,6 +68,8 @@ Import the stylesheet. The package uses CSS Modules internally, but consumers on
|
|
|
68
68
|
import "react-motion-gallery/styles.css";
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
+
## Overview
|
|
72
|
+
|
|
71
73
|
Mental model:
|
|
72
74
|
|
|
73
75
|
- `Slider`, `Grid`, and `Masonry` render React children directly.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.Q{position:relative;left:0}.P .Q{left:auto;right:0}.hr{position:fixed;inset:0;opacity:0;pointer-events:none;background-color:#000c;transition:opacity .3s cubic-bezier(.4,0,.22,1);will-change:opacity;z-index:calc(var(--rmg-fs-z, 9999) - 1);transform:translateZ(0);backface-visibility:hidden;contain:paint}.r{opacity:1;pointer-events:auto}[data-rmg-fs-root=true][data-rmg-fs-closing=true],[data-rmg-fs-root=true][data-rmg-fs-closing=true] *{pointer-events:none!important}[data-rmg-fs-root=true],[data-rmg-fs-root=true] *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}[data-rmg-fs-root=true] img{-webkit-user-drag:none}.fr{position:fixed;display:none;transform-origin:top left;transition:transform .3s cubic-bezier(.4,0,.22,1);z-index:calc(var(--rmg-fs-z, 9999) + 1);will-change:transform}.X,.m,.g,._{position:fixed;opacity:0;pointer-events:none;transition:opacity .36s cubic-bezier(.4,0,.22,1);z-index:calc(var(--rmg-fs-z, 9999) + 2)}.X.r,.m.r,.g.r,._.r{opacity:1;pointer-events:auto}.X{top:12px;right:12px;background:transparent;border:none;padding:0;width:35px;height:35px;cursor:pointer}.m,.g{top:45.5%;width:50px;height:50px;cursor:pointer;background-color:transparent;border:none}.m{left:0;transform:rotate(180deg)}.g{right:0}._{top:15px;left:16px;color:#fff;font-size:14px;line-height:32px;user-select:none;text-shadow:1px 1px 3px #4f4f4f}.R{position:fixed;padding:1rem 1.5rem;color:#fff;font-size:.875rem;pointer-events:none;opacity:0;transform:translateY(8px);transition:opacity .3s cubic-bezier(.4,0,.22,1),transform .3s cubic-bezier(.4,0,.22,1);z-index:calc(var(--rmg-fs-z, 9999) + 1);will-change:opacity,transform}.R.r{opacity:1;transform:translateY(0)}.fullscreen_slider[data-rmg-fs-hide-track-captions=true] [data-rmg-fs-caption=true]{opacity:0;visibility:hidden;pointer-events:none}.br{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:44px;height:44px;border-radius:50%;pointer-events:none;opacity:0;visibility:hidden;transition:opacity .18s ease;will-change:opacity;z-index:3;animation:S 1s linear infinite;background:conic-gradient(from 0deg,#fff,#cfe6ff,#8ec5ff,#4ea1ff,#2f7fff,#1d4ed8);-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 4px),#000 0);mask:radial-gradient(farthest-side,transparent calc(100% - 4px),#000 0)}@keyframes S{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.vr{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;opacity:0;visibility:hidden;transition:opacity .18s ease;will-change:opacity;z-index:3}.rmg__player .plyr__poster{pointer-events:none}
|
|
@@ -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 C from'react';import C__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 ti({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 ni({index:e,count:n}){return jsxs("span",{children:[e+1," / ",n]})}function es(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 Pr(e){if(typeof window>"u")return;let n=document.querySelector(`[data-rmg-entry-owner="${e}"]`);if(!n||es(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 qn(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 kr(e,n=1200){return typeof window>"u"?false:qn(e)?true:new Promise(t=>{let r=typeof performance<"u"?performance.now():Date.now(),o=()=>{if(qn(e)){t(true);return}if((typeof performance<"u"?performance.now():Date.now())-r>=n){t(false);return}requestAnimationFrame(o);};requestAnimationFrame(o);})}var ns=80;function rs(e){return e.introFade||e.isVideoSlide||e.introMethod==="fade"&&e.isLatchedIntroIndex?true:e.hasTransformTarget?false:e.introMethod==="fade"}function os(e){let n=Number.isFinite(e)?Math.max(0,e):0;return Math.min(n,ns)}function is(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 Ar=e=>`${Math.round(e)}px`;function ss(e){return e?e.parentElement??e:null}function as(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 ri(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=>no(a,n,false))??o.find(a=>no(a,n,true))??o[0]??null}function no(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 Nr(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 ai(){return Nr(4)}function ls(e){let n=Number.parseFloat(e?.trim()??"");return Number.isFinite(n)&&n>0?n:null}function cs(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 us(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 Rr(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=ls(getComputedStyle(t).getPropertyValue("--rmg-scale"));if(!r||Math.abs(r-1)<1e-4)return n;let o=t.getBoundingClientRect(),a=us(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 cs(n,c,u,l)}function Dr(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 oi(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 ii(e,n){return Math.min(e.right,n.right)>Math.max(e.left,n.left)}function ds(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(!oi(c))continue;let u=c.getBoundingClientRect();n&&!ii(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(!oi(c))continue;let u=c.getBoundingClientRect();n&&!ii(u,n)||u.bottom>l&&(l=u.bottom,a=c);}return a}function fs(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 ms(e){return e?[e.overflow,e.overflowX,e.overflowY].some(n=>{let t=n?.trim().toLowerCase()??"";return t==="hidden"||t==="clip"}):false}function ps(e,n=2){let t=[],r=e?.parentElement??null;for(;r&&r!==document.body&&r!==document.documentElement&&t.length<n;){if(ms(getComputedStyle(r))){let o=Rr(r)??r.getBoundingClientRect();o.width>0&&o.height>0&&t.push(o);}r=r.parentElement;}return t}function ys({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 si(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(${Ar(r)} ${Ar(a)} ${Ar(l)} ${Ar(o)})`}async function gs(e,n,t,r,o){let a=n.current;if(!a||!t.current?.length)return null;let l=ss(a);if(!l)return null;let c=ri(a,l,e);if(!c)return null;no(c,l,false)||ro(e,t,r,o)&&(await ai(),c=ri(a,l,e)??c);let p=Rr(c)??c.getBoundingClientRect(),x=c.querySelector("img"),j=x?getComputedStyle(x):null,R=a$9(j?.objectPosition??null)??{x:.5,y:.5},D=Rr(x)??x?.getBoundingClientRect()??null,A=D?D.width:0,P=D?D.height:0;return {cropRect:p,imgEl:x,objPos:R,renderedW:A,renderedH:P,renderedRect:D}}function ro(e,n,t,r){let o=n.current,a=as(e,o);return a<0?false:(r(a,"instant"),t?.(),true)}async function bs(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 hs(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 vs(e,n){let t=await bs(e);if(t)return t;let r=hs(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 Rs(e){if(!e)return {x:.5,y:.5};let n=getComputedStyle(e);return a$9(n?.objectPosition??null)}function Ss(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 Es(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 oo(){return window.scrollY||document.documentElement.scrollTop||0}function Ms(){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 ws(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 xs(e){let n=oo(),t=0;for(let r=0;r<8;r+=1){await Nr(1);let o=oo(),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 Nr(1);}async function Ts(e){if(!e)return;let n=e.getBoundingClientRect(),t=oo(),r=window.visualViewport,o=r?.height||window.innerHeight||document.documentElement.clientHeight||n.height,a=r?.offsetTop??0,l=Ms(),c=Es({rectTop:n.top,rectHeight:n.height,scrollY:t,viewportHeight:o,viewportOffsetTop:a,maxScrollY:l});if(Math.abs(c-t)>1){ws(c),await xs(c);return}await Nr(1);}async function Cs({fsSliderEl:e,nodeIdx:n,thumbCropRect:t,endClipRect:r,endObjPos:o,captionClone:a,trackStyleMutation:l,trackMutedMutation:c,safeTeardown:u,onCaptionCloneGone:p,DURATION_MS:x,EASING:j}){let R=e.querySelector(`.rmg__player[data-index="${n}"]`)||e.querySelector(".rmg__player")||null,D=R?.querySelector("video"),A=R?.getBoundingClientRect?.()||D?.getBoundingClientRect?.();if(!A){u();return}if(R){is(R,l),l(R,"visibility","hidden"),l(R,"opacity","0");let $=R.querySelector(".plyr__poster");l($,"opacity","0");let U=R.querySelector(".plyr__controls");l(U,"opacity","0");}if(D){try{D.pause();}catch{}c(D,true);}let P=D||R?.querySelector("video");if(!P){u();return}let S=await vs(P,R);Ss(S,o);let w=S.naturalWidth||1,M=S.naturalHeight||1,K=Rs(D),H=b$3(w,M,A,K),W=b$3(w,M,t,o),I=S;Object.assign(I.style,{position:"fixed",left:"0",top:"0",width:`${w}px`,height:`${M}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, ${-M/2}px, 0) scale(${H.scale})`;let f=ys({DURATION_MS:x,EASING:j});f.style.clipPath=si(A),f.appendChild(I),I.offsetWidth,f.offsetWidth;let V=()=>{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),V());};requestAnimationFrame(()=>{f.style.clipPath=si(r??t),I.style.transition=`transform ${x}ms ${j}`,I.style.transform=`translate3d(${W.cx}px, ${W.cy}px, 0) translate3d(${-w/2}px, ${-M/2}px, 0) scale(${W.scale})`,I.addEventListener("transitionend",z,{once:true}),window.setTimeout(()=>{I.removeEventListener("transitionend",z),V();},x+120);});}var li=({children:e,fsSub:n,open:t,onClose:r,isClick:o,isAnimating:a,overlayDivRef:l,closeButtonRef:c,counterRef:u,leftChevronRef:p,rightChevronRef:x,cells:j,setShowFullscreenSlider:R,cellCount:D,setClosingModal:A,slides:P,slider:S,wrappedItems:w,centerSlider:M,setSliderIndex:K,onForceResetZoom:H,layout:W,expandableImageRefs:I,resolveLayoutlessTarget:f,entryMapRef:V,entryMediaLayout:z,introFade:$,introDuration:U=300,introEasing:re="cubic-bezier(.4,0,.22,1)",requestFsCloseRef:ge,cancelFsCloseRef:le,fs:F,styles:_,syncFullscreenSourceFromIndex:ce,baseZ:ee,rootRef:je,introMethod:Wt,setLatchedIntroMethod:q,latchedIntroIndex:Ne})=>{let ae=U,fe=re,be=C__default.useRef(null),Ht=C__default.useRef(0),Vt=C__default.useRef(0),oe=ee??9999,Ze=C__default.useCallback(d=>{be.current=d,je&&(je.current=d);},[je]),Ce=C__default.useRef(null),Fe=C__default.useRef([]),he=C__default.useRef(new WeakMap),qt=C__default.useCallback(()=>{for(let d=Fe.current.length-1;d>=0;d-=1){let g=Fe.current[d];if(g.kind==="style"){g.el.style[g.prop]=g.prevValue;continue}g.el.muted=g.prevValue;}Fe.current=[],he.current=new WeakMap;},[]);function ut(){if(Ce.current)return;let d=document.createElement("div");d.setAttribute("data-rmg-fs-shield","true"),Object.assign(d.style,{position:"fixed",inset:"0",zIndex:String(oe+5),background:"transparent",pointerEvents:"auto",touchAction:"none",cursor:"default"});let g=B=>{B.preventDefault?.(),B.stopPropagation?.();};d.addEventListener("pointerdown",g,{capture:true}),d.addEventListener("pointerup",g,{capture:true}),d.addEventListener("pointermove",g,{capture:true}),d.addEventListener("click",g,{capture:true}),d.addEventListener("dblclick",g,{capture:true}),d.addEventListener("contextmenu",g,{capture:true}),d.addEventListener("touchstart",g,{capture:true,passive:false}),d.addEventListener("touchmove",g,{capture:true,passive:false}),d.addEventListener("touchend",g,{capture:true,passive:false}),d.addEventListener("wheel",g,{capture:true,passive:false}),d.addEventListener("keydown",g,{capture:true}),document.body.appendChild(d),Ce.current=d;}function te(){let d=Ce.current;if(d){try{d.remove();}catch{}Ce.current=null;}}function dt(d){let g=be.current;if(g){if(d){g.setAttribute("data-rmg-fs-closing","true");return}g.removeAttribute("data-rmg-fs-closing");}}useEffect(()=>()=>{le.current&&(le.current=null),te();},[le]);function Ie(d){let g=be.current;return g?g.querySelector(d):null}function v(d,g,B){if(!d)return;let de=he.current.get(d);de||(de=new Set,he.current.set(d,de));let me=`style:${g}`;de.has(me)||(de.add(me),Fe.current.push({kind:"style",el:d,prop:g,prevValue:d.style[g]??""})),(d.style[g]??"")!==B&&(d.style[g]=B);}function Yn(d,g){if(!d)return;let B=he.current.get(d);B||(B=new Set,he.current.set(d,B));let de="media:muted";B.has(de)||(B.add(de),Fe.current.push({kind:"muted",el:d,prevValue:d.muted})),d.muted!==g&&(d.muted=g);}let Dn=C__default.useCallback(()=>{let d=be.current;d&&(d.style.transition="",d.style.willChange="");let g=d?.querySelector(".fullscreen_slider")??null;g&&(g.style.willChange="");},[]);function Re(d,g){let B=Math.max(1,g);return (d%B+B)%B}useEffect(()=>{if(!t)return;let d=g=>{g.key==="Escape"&&(g.preventDefault(),g.stopPropagation(),Pt());};return window.addEventListener("keydown",d,{capture:true}),()=>window.removeEventListener("keydown",d,{capture:true})},[t]),useLayoutEffect(()=>{qt(),t||Dn();},[t,qt,Dn]);function jn(d,g){if(g<=1)return 0;let B=Re(d,g),de=B+1,me=Ie(".fullscreen_slider");if(!me)return de;let Ye=Array.from(me.querySelectorAll(`[data-rmg-fs-slide="true"][data-rmg-canonical-idx="${B}"]`));if(!Ye.length)return de;let mt=(be.current??me).getBoundingClientRect(),Ct=(mt.left+mt.right)/2,ve=(mt.top+mt.bottom)/2,Je=null,ke=Number.POSITIVE_INFINITY;for(let nn of Ye){let kt=nn.getBoundingClientRect(),Me=(kt.left+kt.right)/2,rn=(kt.top+kt.bottom)/2,Ft=Math.abs(Me-Ct)+Math.abs(rn-ve);Ft<ke&&(Je=nn,ke=Ft);}let wt=Je?.getAttribute("data-index"),Ve=wt!=null?parseInt(wt,10):NaN;return Number.isFinite(Ve)?Ve:de}function rt(d,g){if(!d)return null;let B=d.querySelector(`[data-index="${g}"]`)??null,me=(B?B.closest('[data-rmg-fs-slide="true"]'):null)?.querySelector('[data-rmg-fs-caption="true"]')??null;if(!me)return null;let Ye=me.getBoundingClientRect(),ft=me.cloneNode(true);return Object.assign(ft.style,{position:"fixed",left:`${Math.round(Ye.left)}px`,top:`${Math.round(Ye.top)}px`,width:`${Math.round(Ye.width)}px`,height:`${Math.round(Ye.height)}px`,margin:"0",transform:"none",zIndex:"2147483602",pointerEvents:"none"}),document.body.appendChild(ft),v(me,"visibility","hidden"),ft}function fn(){[p.current,x.current,u.current,c.current].forEach(g=>{g&&g.classList.remove(_.open);});}function Un(d,g,B,de){if(de){d.querySelectorAll("[data-index]").forEach(me=>{me.dataset.index!==String(g)&&(v(me,"transition","opacity 0.3s cubic-bezier(.4,0,.22,1)"),v(me,"opacity","0"));});return}d.querySelectorAll('[data-rmg-fs-slide="true"]').forEach(me=>{B&&me.contains(B)||(v(me,"transition","opacity 0.3s cubic-bezier(.4,0,.22,1)"),v(me,"opacity","0"));});}function Et(){let d=l.current;if(!d)return;let g=Number.parseFloat(getComputedStyle(d).opacity),B=Number.isFinite(g)?g:1;d.style.transition="none",d.style.opacity=String(B),d.offsetWidth,d.style.transition=`opacity ${ae}ms ${fe}`,requestAnimationFrame(()=>{d.style.opacity="0",d.style.pointerEvents="none";});}function xn(d,g,B={}){if(!d)return;let de=Number.parseFloat(getComputedStyle(d).opacity),me=Number.isFinite(de)?de:1;d.style.transition="none",d.style.opacity=String(me),d.offsetWidth,d.style.transition=`opacity ${ae}ms ${fe}`,d.style.willChange="opacity",requestAnimationFrame(()=>{d.style.opacity=String(g),B.pointerEvents!=null&&(d.style.pointerEvents=B.pointerEvents);});}function Xn(d){return d?d.kind==="video"||/\.(mp4|webm|ogg)$/i.test(d.src||""):false}function Gn(){fn(),Et();let d=be.current,g=false,B,de,me=()=>{g||(g=true,d?.removeEventListener("transitionend",Ye),B!==void 0&&window.clearTimeout(B),de!==void 0&&window.clearTimeout(de),le.current===ft&&(le.current=null),Pe());},Ye=Ct=>{Ct.target!==d||Ct.propertyName!=="opacity"||me();},ft=()=>{g||(g=true,d?.removeEventListener("transitionend",Ye),B!==void 0&&window.clearTimeout(B),de!==void 0&&window.clearTimeout(de),le.current===ft&&(le.current=null),Pe());};le.current=ft;let mt=Ie(".fullscreen_slider");mt&&xn(mt,0),d&&(d.addEventListener("transitionend",Ye,{once:true}),xn(d,0,{pointerEvents:"none"})),B=window.setTimeout(()=>{te();},os(ae)),de=window.setTimeout(()=>{me();},ae+40);}async function Pt(){if(!t)return;ut(),dt(true),a.current=false,o.current=false,j.current=[],A(true);let d=w.slice(1,-1);if(!d.length){Pe();return}let g=n.get(),B=Re(g,d.length),de=!W||W==="grid"||W==="masonry"||z==="grid"||z==="masonry",me=h=>h?h instanceof HTMLImageElement?{host:h.closest("[data-rmg-idx], .rmg__grid-item, .rmg__masonry-item, .rmg__slide")??h.parentElement,image:h}:h instanceof HTMLElement?{host:h,image:h.querySelector("img")??null}:{host:null,image:null}:{host:null,image:null},Ye=h=>{let Z=I.current?.[h]??null,J=Z&&typeof Z=="object"&&"current"in Z?Z.current:Z;return me(J)},ft=h=>j.current?.find(Z=>Z.index===h)?.element??null,mt=h=>{let Z=Ye(h),J=f(h),pe=Z.image??J.image;return pe||(pe=(ft(h)??document.querySelector(`[data-rmg-idx="${h}"]`))?.querySelector("img")??null),pe},Ct=h=>{let Z=Rr(h)??h.getBoundingClientRect(),J=getComputedStyle(h),pe=a$9(J?.objectPosition??null)??{x:.5,y:.5};if((J?.objectFit??"cover")!=="contain")return {cropRect:Z,objPos:pe};let Qe=Math.max(1,h.naturalWidth||0),Bt=Math.max(1,h.naturalHeight||0);return {cropRect:d$4(Qe,Bt,Z,"contain",pe),objPos:pe}},ve=h=>{let Z=h.destImg?Rr(h.destImg)??h.destImg.getBoundingClientRect():h.thumbCropRect,pe=ds(F.effects?.introStickyNavSelector,Z)?.getBoundingClientRect();return pe?fs(h.thumbCropRect,pe.bottom)??h.thumbCropRect:h.thumbCropRect},Je=async h=>{let Z=Ie(".fullscreen_slider");if(!Z){Pe();return}let J=jn(B,D),pe=h.isVideoSlide?null:Z.querySelector(`[data-rmg-fs-slide="true"][data-index="${J}"]`)??null,st=h.isVideoSlide?null:pe?.querySelector('[data-rmg-fs-media="true"]')??null,Qe=h.isVideoSlide?null:a$5(st);if(!Qe&&!h.isVideoSlide){Pe();return}let Bt=ve({thumbCropRect:h.thumbCropRect,destImg:h.destImg});Un(Z,J,Qe,h.isVideoSlide);let Ot=rt(Z,J);if(Ot&&(Ot.style.transition=`opacity ${ae}ms ${fe}`,Ot.offsetWidth,Ot.style.opacity="0"),h.isVideoSlide){await Cs({fsSliderEl:Z,nodeIdx:J,thumbCropRect:h.thumbCropRect,endClipRect:Bt,endObjPos:h.endObjPos??{x:.5,y:.5},captionClone:Ot,trackStyleMutation:v,trackMutedMutation:Yn,safeTeardown:Pe,DURATION_MS:ae,EASING:fe});return}let ue=Qe,pn=ue.parentNode||null,Yt=ue.nextSibling||null,Ut=getComputedStyle(ue),pt=a$9(Ut?.objectPosition??null)??{x:.5,y:.5},Qn=Ut?.objectFit||"contain",X=ue.getBoundingClientRect(),It=Math.max(1,ue.naturalWidth||Math.round(X.width)||1),et=Math.max(1,ue.naturalHeight||Math.round(X.height)||1),yt=Qn==="contain"?c$3(It,et,X,pt):b$3(It,et,X,pt),gt=b$3(It,et,h.thumbCropRect,h.endObjPos),_t=ps(h.destImg??null,2),Xt=_t[0]??null,Gt=_t[1]??null,Kt=Math.max(0,oe-1),at=document.documentElement.clientWidth,sn=window.innerHeight,tt=to(Dr(X,at,sn),Kt),Ue=Xt?to("inset(0px 0px 0px 0px)",Kt):null,qe=Gt?to("inset(0px 0px 0px 0px)",Kt):null,an={position:ue.style.position,left:ue.style.left,top:ue.style.top,width:ue.style.width,height:ue.style.height,maxWidth:ue.style.maxWidth,maxHeight:ue.style.maxHeight,transformOrigin:ue.style.transformOrigin,transform:ue.style.transform,transition:ue.style.transition,willChange:ue.style.willChange,zIndex:ue.style.zIndex,pointerEvents:ue.style.pointerEvents};Object.assign(ue.style,{position:"fixed",left:"0",top:"0",width:`${It}px`,height:`${et}px`,maxWidth:"none",maxHeight:"none",transformOrigin:"50% 50%",willChange:"transform",transition:"none",zIndex:"1",pointerEvents:"none"}),tt.appendChild(ue),Ue?(Ue.appendChild(tt),qe&&qe.appendChild(Ue)):qe&&qe.appendChild(tt);let Ae=qe??Ue??tt;document.body.appendChild(Ae),ue.style.transform=`translate3d(${yt.cx}px, ${yt.cy}px, 0) translate3d(${-It/2}px, ${-et/2}px, 0) scale(${yt.scale})`,ue.offsetWidth,tt.offsetWidth,Ue?.offsetWidth,qe?.offsetWidth,tt.style.transition=`clip-path ${ae}ms ${fe}`,Ue&&(Ue.style.transition=`clip-path ${ae}ms ${fe}`),qe&&(qe.style.transition=`clip-path ${ae}ms ${fe}`),ue.style.transition=`transform ${ae}ms ${fe}`,requestAnimationFrame(()=>{tt.style.clipPath=Dr(Bt,at,sn),Ue&&Xt&&(Ue.style.clipPath=Dr(Xt,at,sn)),qe&&Gt&&(qe.style.clipPath=Dr(Gt,at,sn)),ue.style.transform=`translate3d(${gt.cx}px, ${gt.cy}px, 0) translate3d(${-It/2}px, ${-et/2}px, 0) scale(${gt.scale})`;});let bt=false,yn=()=>{if(!bt){bt=true,ue.removeEventListener("transitionend",gn);try{pn&&(Yt?pn.insertBefore(ue,Yt):pn.appendChild(ue));}catch{}Object.assign(ue.style,an);try{Ae.remove();}catch{}Pe();}},gn=Nn=>{Nn.propertyName==="transform"&&yn();};ue.addEventListener("transitionend",gn,{once:true}),window.setTimeout(()=>yn(),ae+80);},ke=B,wt=B,Ve=null;async function nn(){!S.current||!P.current?.length||ro(wt,P,M,K)&&S.current.offsetWidth;}let kt=async()=>{if(W!=="entries"||!V?.current)return;let h=V.current[ke];if(!h)return;wt=h.mediaIndex,await Pr(h.entryIndex),await kr(h.entryIndex);let Z=document.querySelector(`[data-rmg-entry-owner="${h.entryIndex}"]`);if(Z){for(let J of Array.from(Z.children)){let pe=J;pe.hasAttribute("data-rmg-entry-skeleton")?(pe.style.setProperty("transition","none"),pe.style.setProperty("opacity","0")):(pe.style.setProperty("transition","none"),pe.style.setProperty("opacity","1"));}await new Promise(J=>requestAnimationFrame(()=>J()));}ce(ke);},Me=null;if(!de&&W==="entries"&&V?.current){let h=V.current[ke];if(h){let Z=document.querySelector(`[data-rmg-entry-owner="${h.entryIndex}"]`);if(Z?.style.setProperty("--rmg-entry-intro-duration","0ms"),Z?.style.setProperty("--rmg-entry-intro-delay","0ms"),Z?.style.setProperty("--rmg-entry-skeleton-exit-duration","0ms"),!qn(h.entryIndex)){let J=document.createElement("div");J.className=_.spinner,J.style.position="fixed",J.style.zIndex=String(oe+10),J.style.setProperty("opacity","1","important"),J.style.setProperty("visibility","visible","important"),document.body.appendChild(J),Me=J;}}}if(de){let h=f(ke),Z=Ye(ke),J=h.host??h.media??Z.host??ft(ke)??document.querySelector(`[data-rmg-idx="${ke}"]`)??null;await Ts(J),await kt(),Ve=mt(ke);}else {if(await kt(),Me){Me.style.setProperty("opacity","0","important");let h=Me;setTimeout(()=>{try{h.remove();}catch{}},200),Me=null;}if(!S.current||!P.current?.length){Pe();return}}let rn=d[ke],Ft=Xn(rn),$e=Re(Ne,d.length)===ke;if(rs({introFade:$,isVideoSlide:Ft,introMethod:Wt,isLatchedIntroIndex:$e,hasTransformTarget:!Ft&&(!de||!!Ve)})){await nn(),Gn();return}if(fn(),Et(),!de){if(!S.current||!P.current?.length){Pe();return}let h=async()=>{let Z=await gs(wt,S,P,M,K);if(!Z){Pe();return}let J=Z.cropRect,pe=Z.objPos??{x:.5,y:.5};if(Z.imgEl){let{cropRect:st,objPos:Qe}=Ct(Z.imgEl);J=st,pe=Qe;}await Je({thumbCropRect:J,endObjPos:pe,isVideoSlide:false,destImg:Z.imgEl});};if(!ro(wt,P,M,K)){Pe();return}await ai(),await h();return}if(!I?.current){Pe();return}let it=Ve??mt(ke);if(!it){Pe();return}let{cropRect:At,objPos:on}=Ct(it);await Je({thumbCropRect:At,endObjPos:on,isVideoSlide:false,destImg:it});}useEffect(()=>(ge.current=()=>{Pt();},()=>{ge.current&&(ge.current=null);}),[ge,Pt]);function Pe(){le.current&&(le.current=null),te(),dt(false);let d=Ie(".fullscreen_slider");d&&d.style.removeProperty("transition");let g=be.current;g&&g.style.removeProperty("transition"),$||(d&&(d.style.opacity="0"),g&&(g.style.opacity="0",g.style.pointerEvents="none")),l.current?.remove(),l.current=null,H(),r(),R(false),A(false),q(null);}let ot=F?.controls?.close?.enabled!==false,$t=()=>{Pt();},en=typeof F?.controls?.close?.render=="function"?F?.controls?.close.render():null;function tn(d,g){return Re(d,g)}let Mt=Math.max(0,w.length-2),Zt=tn(n.get(),Math.max(1,Mt)),Jn=F?.controls?.counter?.enabled!==false&&D>1,Tn=typeof F?.controls?.counter?.render=="function"?F.controls.counter.render({index:Zt,count:D}):null;return jsxs("div",{ref:Ze,"data-rmg-fs-root":"true",onPointerDown:d=>{Ht.current=d.clientX,Vt.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:oe,"--rmg-fs-z":oe,display:"block",touchAction:"none",userSelect:"none",WebkitUserSelect:"none",contain:"layout style size",overflow:"hidden"},children:[ot&&jsx("button",{ref:c,type:"button","aria-label":"Close",onClick:()=>$t(),className:[_?.closeBtn,F?.controls?.close?.className??"",t?_.open:""].filter(Boolean).join(" "),style:{...F?.controls?.close?.style},children:en??jsx(ti,{})}),Jn&&jsx("div",{ref:u,className:[_?.counter,F?.controls?.counter?.className??"",t?_.open:""].filter(Boolean).join(" "),style:{...F?.controls?.counter?.style??{}},children:Tn??jsx(ni,{index:Zt,count:D})}),e]})};function ui({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 ks=e=>1-Math.pow(1-e,3);function fi(e,n){return a$3({ownerWindow:n,axis:e})}function As(e){let{trigger:n,isZoomed:t}=e;return (e.controls??e.controlsFade??false)&&n!=="drag"&&t}function Ds(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 js(e){return a$6(e)}var so=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:j$1,isTouchPinching:R,showFullscreenSlider:D,isZooming:A,plyrRefs:P,closingModal:S,counterRef:w,leftChevronRef:M,rightChevronRef:K,overlayDivRef:H,direction:W,sliderGap:I=0,sliderDuration:f$3,sliderFriction:V,skipSnaps:z,strictSnaps:$,suppressLoopRef:U,fadeOpening:re,introFade:ge,controlsFade:le=false,dragFade:F=false,slideFadeDuration:_=120,slideFadeEasing:ce="cubic-bezier(.4,0,.22,1)",normalizedItems:ee,crossfadeSlides:je,introDuration:Wt=300,introEasing:q="cubic-bezier(.4,0,.22,1)",resetAllZoomDom:Ne,requestFsCloseRef:ae,introMethod:fe,fs:be,chromeStyles:Ht},Vt)=>{let oe=W==="rtl",Ze=oe?a.rtl:"",Ce=oe?-1:1,Fe=useRef(null),he=useRef(null),qt=useRef(null),ut=useRef(null),te=useRef(null),dt=useRef(null),We=useRef(null),ze=useRef(null),dn=useRef(null),Oe=useRef(null),An=useRef(false),Ie=useRef(false),v=useRef(0),Yn=5,Dn=300,Re=useRef(0),jn=useRef(false),rt=useRef(0),fn=useRef(0),Un=useRef(null),Et=useRef(null),xn=useRef([]),Xn=useRef(0),Gn=useRef(null),Pt=useRef(null),Pe=useRef(null),ot=useRef([]),$t=useRef(null),en=useRef(null),tn=useRef(false),Mt=useRef(false),Zt=useRef(false),Kn=useRef(false),Jn=useRef(false),Tn=useRef(0),d$2=useRef(0),g$2=useRef(0),B=useRef(0),de=useRef(0),me=useRef(0),Ye=useRef(0),ft=useRef(null),mt=useRef(0),Ct=useRef(0),ve=useRef(0),Je=useRef(0),ke=useRef(false),wt=useRef(0),Ve=useRef(1),nn=a$1(I),kt=useRef(e$3.get()),Me=useRef("none"),rn=useRef(null),Ft=useRef(null),mn=useRef(null),$e=useRef(null),[Le,it]=useState(null),[At,on]=useState(null),h$1=useRef(null),Z=useRef(0),J=useRef(null),pe=useRef(null),st=useRef(null),Qe=useRef(D);Qe.current=D;let Bt=useRef(F);Bt.current=F;let Ot=useRef(je);Ot.current=je;let ue=useRef(false);function pn(...i){return i.filter(Boolean).join(" ")}function Yt(i){return i?.style??void 0}function Ut(i){return i?.className??""}function pt(i,s){return i==="left"?s?"next":"prev":s?"prev":"next"}let Qn=be?.controls?.arrows?.enabled!==false&&t>1,X=be?.controls?.arrows,It=(i,s)=>{let m=i==="prev"?typeof X?.renderPrev=="function"?X.renderPrev():null:typeof X?.renderNext=="function"?X.renderNext():null;if(m!=null)return m;if(typeof X?.render=="function"){let b=X.render({dir:i});if(b!=null)return b}return jsx(ui,{side:s})};function et(i){let s=useRef(i);return useEffect(()=>{s.current=i;},[i]),s}let yt=et(a$3);useEffect(()=>{h$1.current=Le;},[Le]);let{wheelLockMs:gt,lockWheelFor:_t,unlockWheelNow:Xt,markWheelSeen:Gt,isWheelLocked:Kt}=j();function at(i){return (i?.clientWidth||1)+nn}function sn(i,s){let m=s||1,b=i*m;rt.current=i,fn.current=b,Xn.current=b;let L=d(-b,0);Un.current=L,Gn.current=g$1(-b,0);let G=Array.from({length:m},(Te,vt)=>-i*vt);xn.current=G;let Y=ut.current,k=te.current,ne=dt.current,Se=We.current;if(!Y||!k||!ne||!Se){Pt.current=null,Et.current=null;return}Pt.current=c$1(true,G,b,L,Se),Et.current=b$2(b,L,Y,[Y,k,ne,Se]);}let tt=useCallback(()=>{let i=he.current;if(!i||!ut.current||!te.current||!dt.current||!We.current)return;let s=at(i),m=ot.current.length||1;sn(s,m);let b=$t.current?.get()??Re.current??0,L=-s*b;Lt(L),ie(L,0),Oe.current?.resetBlend();},[]);useEffect(()=>{let i=he.current;if(!i)return;let s=()=>{tt();};s();let m=new ResizeObserver(s);return m.observe(i),()=>m.disconnect()},[c$2,tt]),useEffect(()=>{let i=Children.toArray(n);if(ot.current=[],t>1)for(let s=1;s<i.length-1;s++)ot.current.push({cells:[x.current[s]]});else for(let s=0;s<i.length;s++)ot.current.push({cells:[x.current[s]]});},[n]);function Ue(i){kt.current!==i&&(kt.current=i,e$3.setLocalIndex(i));}function qe(i,s={}){let{publishVisible:m=true,resetZoom:b=true}=s;Re.current=i,$t.current?.set(i),m&&Ue(i),dr(i),b&&Ne();}let an="data-rmg-global-drag",Ae="rmg-global-drag-style";function bt(){if(document.getElementById(Ae))return;let i=document.createElement("style");i.id=Ae,i.textContent=`
|
|
2
|
+
html[${an}] * { cursor: grabbing !important; }
|
|
3
|
+
html[${an}] { cursor: grabbing !important; }
|
|
4
|
+
`,document.head.appendChild(i);}function yn(i){let s=document.documentElement;s&&(i?s.setAttribute(an,""):s.removeAttribute(an));}function gn(){let i=useRef(null),s=()=>{i.current||(bt(),yn(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,yn(false);};return useEffect(()=>m,[]),{start:s,stop:m}}let{start:Nn,stop:$r}=gn(),Dt=useRef(false),Cn=_,Mr=ce;function er(){J.current!=null&&(cancelAnimationFrame(J.current),J.current=null),pe.current!=null&&(cancelAnimationFrame(pe.current),pe.current=null),st.current!=null&&(window.clearTimeout(st.current),st.current=null);}function xt(i,s={}){er(),Dt.current=false;let m=()=>{typeof i!="number"&&(h$1.current=null),on(null),it(b=>b?typeof i=="number"&&b.id!==i?(h$1.current=b,b):(h$1.current=null,null):null);};if(s.sync&&h$1.current){flushSync(m);return}m();}function Wn(i){let m=-jt()*i;Oe.current?.stop(),ze.current?.useDuration(0).useFriction(1),Lt(m),ie(m,0),Oe.current?.resetBlend();}function tr(){let i=dt.current?.get()??ut.current?.get()??g$2.current;Oe.current?.stop(),An.current=false,ze.current?.useDuration(0).useFriction(1),Lt(i),Tt(),Oe.current?.resetBlend();}function nr(i,s){h$1.current&&xt(void 0,{sync:true}),A.current=true,u(i,s);}function Br(){let i=he.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 rr(i=ht()){return (Ot.current?.length??0)>=i}function or(i,s,m="animated",b){let L=ht(),G=Jt(Re.current,L),Y=Jt(i,L),k=rr(L),ne=b?.enabled??le,Se=b?.durationMs??Cn,Te=b?.easing??Mr,vt=s==="arrow"||s==="requestSet"&&m!=="instant";if(ne&&Qe.current&&k&&vt&&Dt.current&&(er(),Dt.current=false),!Ds({controlsFade:ne,dragFade:F,showFullscreenSlider:Qe.current,busy:Dt.current,trigger:s,mode:m,hasCrossfadeSlides:k,fromIndex:G,toIndex:Y}))return false;tr();let se=As({controlsFade:ne,trigger:s,isZoomed:yt.current})?Br():null,De=!!se;er();let Be=++Z.current;Dt.current=true,en.current?.set(G);let Xe={id:Be,fromIndex:G,toIndex:Y,progress:0,delta:0,animate:false,durationMs:Se,easing:Te};return h$1.current=Xe,on(se),it(Xe),qe(Y,{resetZoom:!De}),J.current=requestAnimationFrame(()=>{J.current=null,Z.current===Be&&(Wn(Y),De&&Ne(),pe.current=requestAnimationFrame(()=>{pe.current=null,Z.current===Be&&(it(ln=>{if(!ln||ln.id!==Be)return ln;let Rn={...ln,progress:1,delta:0,animate:true};return h$1.current=Rn,Rn}),st.current=window.setTimeout(()=>{xt(Be);},Se+48));}));}),true}function ir(){return !!Bt.current&&Qe.current&&ht()>1&&rr()}function Vn(i){let s=ht(),m=rr(s);if(!m)return false;let b=Jt(Re.current,s),L=e$2({currentIndex:b,delta:i,slideCount:s,wrap:s>1});if(L===b)return xt(),false;let G=a$2(Math.abs(i)/Math.max(1,jt()));return it(Y=>{let k=Y&&Y.fromIndex===b&&Y.toIndex===L?Y.id:++Z.current;Dt.current=true,en.current?.set(b);let ne={id:k,fromIndex:b,toIndex:L,progress:G,delta:i,animate:false};return h$1.current=ne,ne}),true}function _r(i){let s=h$1.current;if(!s)return xt(),false;let m=f$2({progress:s.progress,force:i,delta:s.delta});if(Dt.current=true,!m){let L=s.id;return it(G=>G?.id===L?(()=>{let Y={...G,progress:0,animate:true};return h$1.current=Y,Y})():G),st.current=window.setTimeout(()=>{xt(L);},Cn+48),false}let b=s.id;return en.current?.set(s.fromIndex),qe(s.toIndex),it(L=>L?.id===b?(()=>{let G={...L,progress:1,animate:true};return h$1.current=G,G})():L),st.current=window.setTimeout(()=>{Z.current===b&&(Wn(s.toIndex),xt(b));},Cn+48),true}function jt(){return rt.current||at(he.current)}function ht(){return ot.current.length||1}function Jt(i,s){let m=Math.max(1,s);return (i%m+m)%m}function sr(i,s){let m=Math.round(i)*Ce;dn.current?.to(m,s);}function ar(i){return 1-a$2(Math.abs(i*.36)/Dn)}function lr(i){let s=a$2(i);Math.abs(Ve.current-s)<.001||(Ve.current=s,H.current&&(H.current.style.opacity=String(s)));}useEffect(()=>{S&&(Oe.current?.stop(),Ie.current=false,xt());},[S]),useEffect(()=>{c$2||xt();},[c$2]),useEffect(()=>()=>{xt();},[]),useEffect(()=>{if(!he.current||jn.current)return;let i=Math.max(1,ot.current.length||t||1),s=Jt(r,i);Re.current=s,Ue(s),dr(s),setTimeout(()=>{if(!he.current)return;let b=-(rt.current||at(he.current))*s;if(g$2.current=b,B.current=0,ut.current&&te.current&&dt.current&&We.current)ut.current.set(b),te.current.set(b),dt.current.set(b),We.current.set(b),ie(b,0);else {let L=Math.round(b)*Ce;he.current.style.transform=`translate3d(${L}px, 0, 0)`;}},100),jn.current=true;},[c$2,ot.current]);let cr={current:0};function ur(i=300){let s=++cr.current,m=v.current||0,b=performance.now(),L=G=>{if(s!==cr.current||tn.current)return;let Y=Math.min(1,(G-b)/i),k=ks(Y);v.current=m+(0-m)*k;let ne=dt.current.get();if(B.current=v.current,sr(ne,B.current),lr(ar(B.current*2)),Y>=1){B.current=0,v.current=0,wt.current=0,lr(1),wr();return}Y<1&&requestAnimationFrame(L);};requestAnimationFrame(L);}function zr(){H.current&&(H.current.style.transition="opacity 0s");}function wr(){H.current&&(H.current.style.transition="");}useEffect(()=>{if(!c$2){Ve.current=1;return}!D||S||(Ve.current=1,H.current&&(H.current.style.opacity="1"));},[c$2,D,S]);function bn(i,s={}){let{jump:m=false,direction:b}=s,L=$t.current,G=Pe.current,Y=ze.current;if(!G||!Y||!L)return;let k=ht(),ne=((Re.current||0)%k+k)%k,Se=((i||0)%k+k)%k;if(k>1&&(ne===0&&Se===k-1||ne===k-1&&Se===0)&&yt.current&&t>1&&Re.current===0){let De=p,Be=De[1]?.current?.querySelector("img"),Xe=De[t+1]?.current?.querySelector("img");if(Be&&Xe){let ln=Rt=>{if(!Rt)return 1;let zn=(Rt.style.transform||"").match(/scale\(([^)]+)\)/);if(!zn)return 1;let Sn=parseFloat(zn[1]);return Number.isFinite(Sn)?Sn:1},Rn=Rt=>{let Qt=Rt.style.transform;if(!Qt){let zn=window.getComputedStyle(Rt);Qt=zn.transform!=="none"?zn.transform:"";}return Qt||""},Fn=ln(Be),pr=ln(Xe);if(Fn>1.01&&pr<=1.01){let Rt=Rn(Be);Xe.style.transition="none",Xe.style.transform=Rt,Xe.offsetWidth;}if(pr>1.01&&Fn<=1.01){let Rt=Rn(Xe);Be.style.transition="none",Be.style.transform=Rt,Be.offsetWidth;}}}let vt=L.clone().set(i).get();m?Y.useDuration(0):Y.useBaseDuration().useBaseFriction();let se=typeof b=="number"?b:0;G.index(vt,se);}function hn(){if(Mt.current=false,Zt.current=false,j$1.current=false,R.current=false,U.current=false,yt.current&&t>1&&Re.current===0){let Y=p,k=Y[1]?.current?.querySelector("img"),ne=Y[t+1]?.current?.querySelector("img");if(k&&ne){let Se=se=>{if(!se)return 1;let Be=(se.style.transform||"").match(/scale\(([^)]+)\)/);if(!Be)return 1;let Xe=parseFloat(Be[1]);return Number.isFinite(Xe)?Xe:1},Te=Se(k),vt=Se(ne);if(Te>1.01&&vt<=1.01){let se=k.style.transform;if(!se){let De=window.getComputedStyle(k);se=De.transform!=="none"?De.transform:"";}ne.style.transition="none",ne.style.transform=se,ne.offsetWidth;}if(vt>1.01&&Te<=1.01){let se=ne.style.transform;if(!se){let De=window.getComputedStyle(ne);se=De.transform!=="none"?De.transform:"";}k.style.transition="none",k.style.transform=se,k.offsetWidth;}}}let i=ht(),m=(((Re.current||0)-1)%i+i)%i;if(or(m,"arrow")){e$3.emitBasePointerDown?.();return}let b=Pe.current,L=ze.current;if(!b||!L)return;let G=jt();L.useBaseDuration().useBaseFriction(),b.distance(G,true),e$3.emitBasePointerDown?.();}function $n(){if(Mt.current=false,Zt.current=false,j$1.current=false,R.current=false,U.current=false,yt.current&&t>1&&Re.current===0){let Y=p,k=Y[1]?.current?.querySelector("img"),ne=Y[t+1]?.current?.querySelector("img");if(k&&ne){let Se=se=>{if(!se)return 1;let Be=(se.style.transform||"").match(/scale\(([^)]+)\)/);if(!Be)return 1;let Xe=parseFloat(Be[1]);return Number.isFinite(Xe)?Xe:1},Te=Se(k),vt=Se(ne);if(Te>1.01&&vt<=1.01){let se=k.style.transform;if(!se){let De=window.getComputedStyle(k);se=De.transform!=="none"?De.transform:"";}ne.style.transition="none",ne.style.transform=se,ne.offsetWidth;}if(vt>1.01&&Te<=1.01){let se=ne.style.transform;if(!se){let De=window.getComputedStyle(ne);se=De.transform!=="none"?De.transform:"";}k.style.transition="none",k.style.transform=se,k.offsetWidth;}}}let i=ht(),m=(((Re.current||0)+1)%i+i)%i;if(or(m,"arrow")){e$3.emitBasePointerDown?.();return}let b=Pe.current,L=ze.current;if(!b||!L)return;let G=jt();L.useBaseDuration().useBaseFriction(),b.distance(-G,true),e$3.emitBasePointerDown?.();}function dr(i){let s=ot.current.length||1,m=i+1;m=(m%s+s)%s,m===0&&(m=t),w.current&&(w.current.textContent=`${m} / ${t}`);}function Bn(i){let s=he.current;return s?s.querySelector(`[data-rmg-fs-slide="true"][data-rmg-canonical-idx="${i}"][data-rmg-clone="false"]`):null}function xr(i){let s=Bn(i);if(!s)return null;let m=s.getAttribute("data-index"),b=m!=null?parseInt(m,10):NaN;return Number.isFinite(b)?b:null}function vn(i){let s=xr(i);if(s==null)return false;let b=(P.current[s]||null)?.plyr??null;if(!b)return false;if(typeof b.playing=="boolean"?b.playing:!b.paused)return b.pause(),true;let G=b.play();return G&&typeof G.catch=="function"&&G.catch(()=>{}),true}function _n(){let i=$e.current;i&&(i.observer?.disconnect(),i.rafId!=null&&cancelAnimationFrame(i.rafId),$e.current=null);}function Tr(i){let s=$e.current;if(!s||s.canonicalIndex!==i)return;s.deadlineTs=performance.now()+1200;let m=()=>{if($e.current===s){if(vn(i)){_n();return}if(performance.now()>=s.deadlineTs){_n();return}s.rafId=requestAnimationFrame(m);}};s.rafId=requestAnimationFrame(m);}function fr(i){_n(),bn(i);let s=Bn(i),m=Fe.current;if(!s||!m)return;let b={canonicalIndex:i,observer:null,rafId:null,deadlineTs:0},L=new IntersectionObserver(G=>{if($e.current===b){for(let k of G)if(!(!k.isIntersecting||(k.intersectionRatio??0)<.1)){b.observer?.disconnect(),b.observer=null,Tr(i);return}}},{root:m,rootMargin:"0px",threshold:[0,.1]});b.observer=L,$e.current=b,L.observe(s);}function qr(i){return !!i?.closest?.([".plyr__controls",".plyr__control--overlaid",".plyr__menu__container",".plyr__tooltip",".plyr__captions"].join(","))}function Cr(i){let s=i.changedTouches?.[0]??i.touches?.[0];return s?{x:s.clientX,y:s.clientY}:{x:i.clientX,y:i.clientY}}function Fr(i){let{x:s,y:m}=Cr(i),b=document.elementFromPoint(s,m);if(!b)return null;let L=b.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(b.closest(".plyr__controls")||!ne)return null;let Se=L.getAttribute("data-index"),Te=L.getAttribute("data-rmg-canonical-idx"),vt=Se!=null?parseInt(Se,10):NaN,se=Te!=null?parseInt(Te,10):NaN;return !Number.isFinite(vt)||!Number.isFinite(se)?null:{renderedIndex:vt,canonicalIndex:se,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"]'),b=d$1(i),L=b?a$5(b):null;if(!L)return {clickedImg:null,renderedIndex:null};let{x:G,y:Y}=Cr(s),k=L.getBoundingClientRect();if(!(G>=k.left&&G<=k.right&&Y>=k.top&&Y<=k.bottom))return {clickedImg:null,renderedIndex:null};let Se=m?.getAttribute("data-index")??L?.dataset.index??null,Te=Se!=null?parseInt(Se,10):NaN;return {clickedImg:L,renderedIndex:Number.isFinite(Te)?Te:null}}useEffect(()=>{let i$1=Fe.current,s=he.current;if(!i$1||!s)return;let m=b();qt.current=m;let b$2=rt.current||at(s),L=ot.current.length||1,G=L-1,Y=Jt(r,L),k=b$1(0),ne=b$1(0),Se=b$1(0),Te=b$1(0);ut.current=k,te.current=ne,dt.current=Se,We.current=Te,sn(b$2,L);let se=xn.current[Y]??0;k.set(se),ne.set(se),Se.set(se),Te.set(se),g$2.current=se,dn.current=i(s),ie(se,0);let De=f(G,Y,true),Be=f(G,Y,true);$t.current=De,en.current=Be,Re.current=Y,Ue(Y),dr(Y);function Xe(T){let Ge=$t.current,_e=en.current;if(!Ge||!_e)return;let ye=T.distance,we=T.index!==Ge.get();if(We.current.add(ye),ye&&(ze.current.duration()?Oe.current.start():(ze.current.seek(),Tt())),we){_e.set(Ge.get()),Ge.set(T.index);let Ke=Ge.get();qe(Ke,{publishVisible:!ze.current.duration()});}}let ln={distance(T,Ge){let _e=Pt.current;if(!_e)return;let ye=_e.byDistance(T,Ge);Xe(ye);},index(T,Ge){let _e=Pt.current,ye=$t.current;if(!_e||!ye)return;let we=ye.clone().set(T).get(),Ke=_e.byIndex(we,Ge);Xe(Ke);}};Pe.current=ln;let Rn=c(k,Se,ne,Te,f$3,V);if(ze.current=Rn,t===1){let T=s.clientWidth,Ge=at(s);rt.current=Ge;let _e=ot.current.length||1,ye=Ge*_e,we=-Math.max(0,ye-T),Ke=0;rn.current=d(isNaN(we)?0:we,Ke),Ft.current=f$1(T),mn.current=e(rn.current,ut.current,We.current,ze.current,Ft.current,f$3);}else rn.current=null,mn.current=null,Ft.current=null;let Fn=h(document,window,()=>{t===1&&mn.current?.constrain(Ie.current),ze.current?.seek();let T=Rn.direction()||Math.sign(Te.get()-k.get())||0;!U.current&&t>1&&fn.current>0&&Et.current?.loop(T),g$2.current=k.get();},T=>{let Ge=k.get(),_e=ne.get(),ye=Ge*T+_e*(1-T);Se.set(ye),g$2.current=ye,B.current=Mt.current?v.current:B.current,Tt();let we=t===1&&(mn.current?.reached()??false);ze.current?.settled()&&!we&&!Ie.current&&(Oe.current?.stop(),An.current=false),!yt.current&&!An.current&&He(ye);});Oe.current=Fn,Fn.init();let pr=g(),Rt=g(),Qt=fi(m,window),Sn=fi({scroll:"y",cross:"x",direction(T){return T},measureSize:T=>T.height},window),Xr=false,yr=false,Gr=0,Mo=0,wo=Yn;function zi(){let T=Xr?document:i$1;Rt.add(T,"touchmove",To,{passive:false}).add(T,"touchend",Kr).add(T,"mousemove",To,{passive:false}).add(T,"mouseup",Kr);}function xo(T){let Ge=T.target;if(qr(Ge))return;let _e=T.target;if(M.current?.contains(_e)||K.current?.contains(_e)||yt.current||S)return;let ye=a$4(T,window);if(ye&&T.button!==0)return;ye&&T.cancelable&&T.preventDefault(),Dt.current&&xt(void 0,{sync:true}),e$3.emitBasePointerDown?.(),Xr=ye,Nn(),_t(gt),ke.current=false,R.current=false,Je.current=ye?0:T.touches?.length??1,Ie.current=true,tn.current=true,Zt.current=false,j$1.current=false,R.current=false,o.current=true,Me.current="none",v.current=0,Tn.current=0,d$2.current=0,mt.current=Re.current||0,Ct.current=We.current?.get()??ut.current?.get()??0,ve.current=0,Qt.pointerDown(T),Sn.pointerDown(T),Gr=Qt.readPoint(T,"x"),Mo=Sn.readPoint(T,"y"),ue.current=false;let we=ir();we?(xt(void 0,{sync:true}),Wn(Re.current)):(ze.current.useFriction(0).useDuration(0),We.current.set(ut.current.get())),zi(),we||Oe.current?.start();}function To(T){if(yt.current)return;if(!a$4(T,window)){let lt=T;if(Je.current=lt.touches?.length??1,Je.current>=2){ke.current=true,R.current=true,o.current=false,Me.current="none",Oe.current?.stop(),lt.cancelable&<.preventDefault();return}}let _e=Qt.readPoint(T,"x"),ye=Sn.readPoint(T,"y"),we=Math.abs(_e-Gr),Ke=Math.abs(ye-Mo);Me.current==="none"&&(we>wo||Ke>wo)&&(Me.current=we>=Ke?"x":"y",o.current=false,Me.current==="y"&&(xt(void 0,{sync:true}),Mt.current=true,Tn.current=ye,v.current=0)),zr();let On=Qt.pointerMove(T).dx*Ce;Sn.pointerMove(T),Ye.current=me.current,me.current=_e*Ce,de.current=On,ft.current=new Date;let Nt=(_e-Gr)*Ce;if(ve.current=Nt,!yr&&!Xr&&Me.current==="x"&&(!("cancelable"in T)||!T.cancelable||(yr=we>Ke,!yr)))return;if(Me.current==="y"){let lt=ye-Tn.current;d$2.current=lt,v.current=lt*.5,B.current=v.current;let Or=dt.current.get();sr(Or,B.current),lr(ar(lt)),T.preventDefault?.();return}if(ir()){Zt.current=Math.abs(Nt)>.5,Vn(Nt),T.cancelable&&T.preventDefault?.();return}ze.current.useFriction(.3).useDuration(.75);let cn=qt.current.direction(On);We.current.add(cn),Oe.current?.start(),T.cancelable&&T.preventDefault();}function Kr(T){if(!a$4(T,window)&&(R.current||ke.current)){let ye=T;if(Je.current=ye.touches?.length??0,Je.current>0)return;$r(),R.current=false,ke.current=false,Ie.current=false,tn.current=false,o.current=false,Me.current="none",Mt.current=false,v.current=0,Rt.clear(),yr=false,Xt(),_t(300);return}if(tn.current=false,Ie.current=false,Rt.clear(),yr=false,Xt(),_t(300),o.current){let ye=T.target,we=Fr(T);if(we!=null){Me.current="none",we.isClone?fr(we.canonicalIndex):bn(Re.current);return}if(ye.closest("[class*='plyr__']"))return;let Ke=T,{clickedImg:On,renderedIndex:Nt}=y(ye,Ke);if(!On){wr(),Jn.current=true,Oe.current?.stop(),ae.current?.(),Ke.cancelable&&Ke.preventDefault();return}if(Nt==null)return;let cn=p[Nt];if(!cn)return;let lt=Re.current;if(lt===t-1&&Nt===t+1){U.current=true,E(0);return}lt!==Nt&&Nt!==lt+2&&nr(T,cn),lt===t-1&&Nt===t+1&&nr(T,cn),he.current&&he.current.children.length===1&&nr(T,cn),U.current=true,E(lt);return}if(Me.current==="y"){let ye=Sn.pointerUp(T).fy;if(Math.abs(ye)>.15){Fn?.stop(),dn.current?.lockY(v.current),Kn.current=true,ae.current?.(),v.current=0,Mt.current=false;return}let Ke=d$2.current,On=l.height*.3;if(Math.abs(Ke)>On){Fn?.stop(),dn.current?.lockY(v.current),Kn.current=true,ae.current?.(),v.current=0,Mt.current=false;return}ur(300),Me.current="none",Mt.current=false;}else {let Fo=function(Ki){let Ji=We.current?.get()??ut.current?.get()??Ct.current;return js({force:Ki,fallbackDirection:ve.current||Ji-Ct.current,slideCount:ot.current.length||1,currentIndex:Re.current||0,dragStartIndex:mt.current,wrap:t>1,skipSnaps:z,strictSnaps:$,scrollTarget:qi})};let we=Qt.pointerUp(T).fx;if(oe&&(we=-we),ir()){Zt.current=false,_r(we),Me.current="none";return}let Ke=a$4(T,window),Nt={mouse:300,touch:400}[Ke?"mouse":"touch"],cn=we*Nt,lt=Pt.current,Or=Pe.current,Co=ze.current;if(!lt||!Or||!Co){Me.current="none";return}let qi=lt,Zi=mn.current?.passed(),Oo=cn;Zi&&(Oo*=.6);let Io=Fo(Oo),Yi=V,Ui=e$1(cn,Io),Xi=f$3,Gi=Yi+Ui/50;Co.useDuration(Xi).useFriction(Gi),Or.distance(Io,true);}Me.current="none";}return pr.add(i$1,"dragstart",T=>T.preventDefault(),{passive:false}).add(i$1,"selectstart",T=>T.preventDefault(),{passive:false}).add(i$1,"touchstart",xo).add(i$1,"mousedown",xo,{passive:false}).add(i$1,"touchcancel",()=>{R.current=false,ke.current=false,Ie.current=false,tn.current=false,Me.current="none",Mt.current=false,v.current=0,Rt.clear(),Xt(),_t(gt);}).add(i$1,"contextmenu",Kr),()=>{pr.clear(),Rt.clear(),Oe.current?.destroy(),Oe.current=null;}},[c$2,t]);function E(i,s="animated"){bn(i,{jump:s==="instant"});}useEffect(()=>{let i=Fe.current;if(!i)return;function s(m){let b=Gt();if(Dt.current){m.cancelable&&m.preventDefault?.();return}if(Ie.current){_t(gt),m.cancelable&&m.preventDefault?.();return}if(Kt(b)){_t(40),m.cancelable&&m.preventDefault?.();return}if(e$3.emitBasePointerDown?.(),a$3)return;let L=he.current;if(!L)return;let G=L.clientWidth,k=(ot.current.length||1)*(rt.current||at(L))>G;if(!(Math.abs(m.deltaX)>Math.abs(m.deltaY))||!k)return;m.preventDefault();let Te=(dt.current?.get()??0)-m.deltaX*Ce;We.current?.set(Te),ze.current?.useDuration(0).useFriction(1),Oe.current?.start(),g$2.current=Te,Tt(),He(Te);}return i.addEventListener("wheel",s,{passive:false}),()=>i.removeEventListener("wheel",s)},[a$3]);function N(i){let s=jt(),m=ht(),b=Math.round(Math.abs(i)/s);return b=(b%m+m)%m,b}function He(i){let s=N(i);if(Re.current!==s){Re.current=s,$t.current?.set(s);let m=((s+1)%t+t)%t;m===0&&(m=t),w.current&&(w.current.textContent=`${m} / ${t}`);}Ue(s);}function ie(i,s){if(!he.current)return;let m;if(Mt.current)m=Math.round(s);else {let b=wt.current,L=b+(0-b)*.2;m=Math.round(L),wt.current=m;}sr(i,m);}function Tt(){ie(g$2.current,B.current);}function Lt(i){ut.current?.set(i),te.current?.set(i),dt.current?.set(i),We.current?.set(i),g$2.current=i;}useEffect(()=>{let i=0;function s(){cancelAnimationFrame(i),i=requestAnimationFrame(()=>{Oe.current?.stop(),tt();});}s();let m=new ResizeObserver(s);return Fe.current&&m.observe(Fe.current),window.addEventListener("orientationchange",s,{passive:true}),()=>{cancelAnimationFrame(i),window.removeEventListener("orientationchange",s),m.disconnect();}},[l,tt]),useEffect(()=>{let i=e$3.onRequest(s=>{switch(s.type){case "requestSet":{let m=s.mode??"animated";if(m==="instant"){let Y=-jt()*s.index;Lt(Y),ie(Y,0),Oe.current?.stop();let k=(s.index%ht()+ht())%ht();qe(k);break}let L=s.meta?.source==="thumbnail"?s.meta?.transition??"scroll":null;if(L==="scroll"){bn(s.index,{jump:false});break}or(s.index,"requestSet",m,{enabled:L==="crossfade"?true:void 0,durationMs:s.meta?.crossfade?.durationMs,easing:s.meta?.crossfade?.easing})||bn(s.index,{jump:false});break}case "requestPrev":hn();break;case "requestNext":$n();break;case "center":tt();break}});return ()=>{i();}},[e$3]),useEffect(()=>()=>{let i=$e.current;i?.observer?.disconnect(),i?.rafId!=null&&cancelAnimationFrame(i.rafId),$e.current=null;},[]);function mr(){bn(Re.current,{jump:false});}useImperativeHandle(Vt,()=>({centerSlider:mr}),[mr]);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=ee?.length||t||1,Vi=((r??0)%Yr+Yr)%Yr,$i=Zr(ee?.[Vi]),bo=fe==="fade"||ge||$i,ho=Le!=null?je?.[Le.fromIndex]??null:null,vo=Le!=null?je?.[Le.toIndex]??null:null,Ro=!!Le&&(!!ho||!!At)&&!!vo,So=a$2(Le?.progress??0),Bi=Le?.durationMs??Cn,_i=Le?.easing??Mr,Eo=Le?.animate?`opacity ${Bi}ms ${_i}`:"none";function Ur(i){let s=Ht?.open;s&&(M.current?.classList.toggle(s,i),K.current?.classList.toggle(s,i));}return useEffect(()=>{let i=0,s=0;if(!c$2||S){Ur(false);return}return Ur(false),i=requestAnimationFrame(()=>{s=requestAnimationFrame(()=>{Ur(true);});}),()=>{cancelAnimationFrame(i),cancelAnimationFrame(s);}},[c$2,S,Ht]),jsxs("div",{ref:Fe,"data-rmg-fs-viewport":"true",className:`fs_viewport ${Ze}`,dir:oe?"rtl":void 0,style:{position:"absolute",inset:0,overflow:"hidden"},children:[Qn&&jsxs(Fragment,{children:[jsx("button",{ref:M,type:"button","aria-label":pt("left",oe)==="prev"?"Previous":"Next",onClick:()=>{pt("left",oe)==="prev"?hn():$n();},className:pn(Ht?.leftChevron,Ut(X?.arrow),Ut(X?.prev)),style:{position:"absolute",top:"50%",left:"16px",transform:"translateY(-50%) rotate(180deg)",...Yt(X?.arrow)??{},...Yt(X?.prev)??{}},children:It(pt("left",oe),"left")}),jsx("button",{ref:K,type:"button","aria-label":pt("right",oe)==="prev"?"Previous":"Next",onClick:()=>{pt("right",oe)==="prev"?hn():$n();},className:pn(Ht?.rightChevron,Ut(X?.arrow),Ut(X?.next)),style:{position:"absolute",top:"50%",right:"16px",transform:"translateY(-50%)",...Yt(X?.arrow)??{},...Yt(X?.next)??{}},children:It(pt("right",oe),"right")})]}),Ro&&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-So,transition:Eo,willChange:"opacity"},children:At?jsx("div",{"aria-hidden":"true",style:{position:"absolute",inset:0},dangerouslySetInnerHTML:{__html:At}}):ho}),jsx("div",{"data-rmg-fs-crossfade-slide":"target",style:{position:"absolute",inset:0,opacity:So,transition:Eo,willChange:"opacity"},children:vo})]},Le.id),jsx("div",{ref:he,"data-rmg-fs-track":"true","data-rmg-fs-hide-track-captions":Ro?"true":void 0,className:`fullscreen_slider ${Ze}`,style:{position:"absolute",inset:0,overflow:"visible",cursor:"grab",userSelect:"none",WebkitUserSelect:"none",willChange:"opacity, transform",backfaceVisibility:"hidden",transition:bo?`opacity ${Wt}ms ${q}`:void 0,opacity:D?bo&&re?0:1:0},children:n})]})});so.displayName="FullscreenSlider";var Ws='[data-rmg-overlay-height-active="true"]',mi="data-rmg-overlay-height-frozen",Vs=.5,pi=1e3;function $s(e){return Math.round((e+Number.EPSILON)*pi)/pi}function Bs(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function _s(){let[e,n]=C.useState(Bs);return C.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 Sr({children:e,activeKey:n,activeReady:t,durationMs:r,easing:o}){let a=C.useRef(null),l=C.useRef(null),c=C.useRef(t),[u,p]=C.useState(null),j=!_s()&&r>0;c.current=t;let R=C.useCallback(()=>{let S=a.current;return S?S.querySelector(Ws)??(S.lastElementChild instanceof HTMLElement?S.lastElementChild:null):null},[]),D=C.useCallback(()=>{let S=a.current,w=R();if(!S||!w)return null;let M=Array.from(S.children).filter(f=>f instanceof HTMLElement),K=M.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=S.style.height,W=S.style.overflow,I=S.style.transition;S.style.transition="none",S.style.height="auto",S.style.overflow="visible";for(let f of M){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 $s(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;S.style.height=H,S.style.overflow=W,S.style.transition=I;}},[R]),A=C.useCallback(()=>{if(!c.current)return;let S=a.current,w=D();if(!S||w==null)return;let M=l.current;M!=null&&Math.abs(M-w)<=Vs||(M!=null&&(S.style.height=`${M}px`,S.offsetHeight),l.current=w,p(w));},[D]);C.useLayoutEffect(()=>{let S=a.current;if(!S)return;let w=Array.from(S.children).filter(M=>M instanceof HTMLElement);for(let M of w)M.getAttribute(mi)==="true"&&(M.removeAttribute(mi),M.style.inset="",M.style.bottom="",M.style.left="",M.style.right="",M.style.top="",M.style.transform="",M.style.width="",M.style.height="");}),C.useLayoutEffect(()=>{t&&A();},[n,t,A]),C.useEffect(()=>{if(!t)return;let S=R();if(!S||typeof ResizeObserver>"u")return;let w=0,M=()=>{w&&cancelAnimationFrame(w),w=requestAnimationFrame(()=>{w=0,A();});},K=new ResizeObserver(M);return K.observe(S),()=>{w&&cancelAnimationFrame(w),K.disconnect();}},[n,t,R,A]);let P=j&&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 yi="--rmg-entry-overlay-opacity",qs=300,Zs="cubic-bezier(.4,0,.22,1)",Ys="linear";function ao(e,n){return n?(e%n+n)%n:e}function Us(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 Xs(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 gi(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",...Xs({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 Gs(e){let{entriesObject:n,placement:t,overlayZoomMotion:r}=e;return {boxSizing:"border-box",width:"100%",height:"100%",padding:"1.25rem 1.5rem",background:Us(t),color:"#fff",fontSize:"0.9rem",...n.overlay?.style??{},...r.contentStyle}}function Ks(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 ${Ys}`:void 0,willChange:t>0?"opacity":void 0,pointerEvents:"none"}}function bi(e){return e?.overlay?.overlayCrossfadeTarget??"overlay"}function Js(e,n=qs){let t=e?.overlay?.overlayCrossfadeDurationMs;return typeof t=="number"&&Number.isFinite(t)?Math.max(0,t):n}function Qs(e){let n=e?.overlay?.overlayCrossfadeEasing;return typeof n=="string"&&n.trim()?n:Zs}function ea(e){let{prevEntryIndex:n,nextEntryIndex:t,crossfadeTarget:r}=e;return n!==t||r==="content"}function ta(e){let{layers:n,entriesObject:t,entryMap:r,wrapperBaseStyle:o,overlayZoomMotion:a,viewportWidth:l,viewportHeight:c,fadeOutMs:u,fadeOutEasing:p,resolveFsCaptionPlacement:x}=e,j=e.overlayOpacity,R=j==null?`var(${yi}, 1)`:String(j),D=t.render?.overlay,A=t.items;if(typeof D!="function"||!A?.length||!r?.length||!n.length)return null;let P=x(t.overlay?.placement,t.overlay?.breakpoint,l),S=Gs({entriesObject:t,placement:P,overlayZoomMotion:a}),w=n.flatMap(V=>{let z=r[V.index];if(!z)return [];let $=A[z.entryIndex];if(!$)return [];let U=Array.isArray($.media)?$.media[z.mediaIndex]??null:null;return [{layer:V,node:D({entry:$,entryIndex:z.entryIndex,media:U,mediaIndex:z.mediaIndex,link:z,opacity:V.opacity,fsIndex:V.index,style:S,containerProps:{className:t.overlay?.className,style:S}})}]});if(!w.length)return null;let K=bi(t)==="content",H=w.length-1,W=w[H]?.layer,I=W?.key??"active",f=(W?.opacity??1)>0;return K?jsx("div",{"data-rmg-fs-entry-overlay":"true",className:t.overlay?.className,style:gi({entriesObject:t,wrapperBaseStyle:o,viewportWidth:l,viewportHeight:c,placement:P,fadeOutMs:u,fadeOutEasing:p,opacity:R}),children:jsx("div",{"data-rmg-fs-entry-overlay-surface":"true",style:S,children:jsx(Sr,{activeKey:I,activeReady:f,durationMs:u,easing:p,children:w.map(({layer:V,node:z},$)=>jsx("div",{"data-rmg-fs-entry-overlay-content":"true","data-rmg-overlay-height-layer-key":String(V.key),"data-rmg-overlay-height-active":$===H?"true":void 0,style:Ks({opacity:V.opacity,fadeOutMs:u,active:$===H}),"aria-hidden":$===H?void 0:true,children:z},V.key))})})}):jsx(Fragment,{children:w.map(({layer:V,node:z},$)=>jsx("div",{"data-rmg-fs-entry-overlay":"true",className:t.overlay?.className,style:gi({entriesObject:t,wrapperBaseStyle:o,viewportWidth:l,viewportHeight:c,placement:P,fadeOutMs:u,fadeOutEasing:p,opacity:j==null?`calc(var(${yi}, 1) * ${V.opacity})`:String(j*V.opacity)}),"aria-hidden":$===H?void 0:true,children:jsx("div",{"data-rmg-fs-entry-overlay-surface":"true",style:S,children:z})},V.key))})}function hi(e){let{enabled:n,fsSub:t,entriesObject:r,entryMapRef:o,syncFullscreenSourceFromIndex:a,resetAllZoomDom:l,wrapperBaseStyle:c,fadeOutMs:u,closing:p,overlayZoomMotion:x,viewportWidth:j,viewportHeight:R,resolveFsCaptionPlacement:D}=e,A=bi(r),P=Js(r,u),S=Qs(r),[w,M]=C.useState(()=>[{key:1,index:ao(t.get(),o.current?.length??0),opacity:1}]),[K,H]=C.useState(0),W=C.useRef(w),I=C.useRef(ao(t.get(),o.current?.length??0)),f=C.useRef(1),V=C.useRef(a),z=C.useRef(l),$=C.useRef({raf1:0,raf2:0,timeout:null}),U=C.useRef({raf1:0,raf2:0,timeout:null}),re=C.useCallback(()=>{let q=$.current;q.raf1&&cancelAnimationFrame(q.raf1),q.raf2&&cancelAnimationFrame(q.raf2),q.timeout!=null&&window.clearTimeout(q.timeout),$.current={raf1:0,raf2:0,timeout:null};},[]),ge=C.useCallback(()=>{let q=U.current;q.raf1&&cancelAnimationFrame(q.raf1),q.raf2&&cancelAnimationFrame(q.raf2),q.timeout!=null&&window.clearTimeout(q.timeout),U.current={raf1:0,raf2:0,timeout:null};},[]),le=C.useCallback(q=>{W.current=q,M(q);},[]),F=C.useCallback(q=>ao(q,o.current?.length??0),[o]);C.useEffect(()=>{V.current=a,z.current=l;},[l,a]);let _=C.useCallback((q,Ne=1)=>({key:++f.current,index:q,opacity:Ne}),[]),ce=C.useCallback(q=>W.current.reduce((fe,be)=>!fe||be.opacity>fe.opacity?be:fe,null)??_(q),[_]),ee=C.useCallback(q=>o.current?.[q]?.entryIndex??-1,[o]),je=C.useCallback(q=>{let Ne=W.current[W.current.length-1];le([Ne?{...Ne,index:q,opacity:1}:_(q)]);},[_,le]),Wt=C.useCallback(q=>{if(p)return;re();let Ne=ce(I.current),ae=_(q,0);if(le([{...Ne,opacity:1},ae]),V.current(q),z.current(),P<=0){le([{...ae,opacity:1}]);return}$.current.raf1=requestAnimationFrame(()=>{$.current.raf1=0,$.current.raf2=requestAnimationFrame(()=>{$.current.raf2=0,le([{...Ne,opacity:0},{...ae,opacity:1}]),$.current.timeout=window.setTimeout(()=>{le([{...ae,opacity:1}]),$.current={raf1:0,raf2:0,timeout:null};},P);});});},[_,re,p,le,P,ce]);return C.useEffect(()=>{if(!n){re(),ge(),H(0),le([]);return}if(p){re(),ge(),H(0),P<=0?le([]):U.current.timeout=window.setTimeout(()=>{le([]),U.current={raf1:0,raf2:0,timeout:null};},P);return}ge();let q=F(t.get());I.current=q,je(q),V.current(q),H(0),U.current.raf1=requestAnimationFrame(()=>{U.current.raf1=0,U.current.raf2=requestAnimationFrame(()=>{U.current.raf2=0,H(1);});});let Ne=t.onEvent(ae=>{if(ae.type!=="internalIndex")return;let fe=F(ae.index);if(fe===I.current&&W.current.length)return;let be=I.current,Ht=ee(be),Vt=ee(fe);I.current=fe,ea({prevEntryIndex:Ht,nextEntryIndex:Vt,crossfadeTarget:A})?Wt(fe):(re(),je(fe),V.current(fe),z.current());});return ()=>{re(),ge(),Ne();}},[re,ge,p,le,A,n,Wt,P,t,ee,F,je]),C.useEffect(()=>()=>{re(),ge();},[re,ge]),w.length?jsx(Fragment,{children:ta({layers:w,entriesObject:r,entryMap:o.current,wrapperBaseStyle:c,overlayZoomMotion:x,viewportWidth:j,viewportHeight:R,fadeOutMs:P,fadeOutEasing:S,overlayOpacity:K,resolveFsCaptionPlacement:D})}):null}function ra(e,n){return e?.type==="video"||e?.kind==="video"||e?.mediaType==="video"||!!e?.videoSrc||!!e?.sources?.video||!!e?.plyrSource||!!n?.dataset?.rmgVideo}function oa(e){e.isConnected||document.body.appendChild(e);}function ia(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 sa(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 Wr(e,n){return (e??document).querySelector(n)}function Ri(e){let n=Wr(e,".fullscreen_slider");n&&n.style.removeProperty("transition");}function aa(e,n,t){let r=Wr(t,".fullscreen_slider");r&&(r.style.transition="none",r.style.opacity="0",r.offsetWidth,r.style.transition=`opacity ${e}ms ${n}`);}function la(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),j=280,R=200,D=a$8(r.caption?.width,j,u,u),A=a$8(r.caption?.height,R,u,p),P=r.caption?.width==null?void 0:a$8(r.caption.width,j,u,u),S=r.caption?.height==null?void 0:a$8(r.caption.height,R,u,p),w=c(o?.placement,o?.breakpoint,u),M=o?.width==null?void 0:a$8(o.width,j,u,u),K=o?.height==null?void 0:a$8(o.height,R,u,p),H=0,W=u,I=0,f=p;r.caption?.layout!=="overlay"?x==="right"?W=Math.max(0,u-D):x==="left"?H=Math.min(u,D):x==="top"?I=Math.min(p,A):x==="bottom"&&(f=Math.max(0,p-A)):(P!=null||S!=null)&&(P!=null&&(x==="right"?W=Math.max(0,u-P):x==="left"&&(H=Math.min(u,P))),S!=null&&(x==="top"?I=Math.min(p,S):x==="bottom"&&(f=Math.max(0,p-S)))),M!=null&&(w==="right"?W=Math.max(0,W-M):w==="left"&&(H=Math.min(W,H+M))),K!=null&&(w==="top"?I=Math.min(f,I+K):w==="bottom"&&(f=Math.max(I,f-K)));let V=l??null;if(a?.current&&V){let $=a.current.offsetHeight,U=a.current.offsetWidth;V==="top"?I+=$:V==="bottom"?f-=$:V==="left"?H+=U:V==="right"&&(W-=U);}return {rect:new DOMRect(H,I,Math.max(1,W-H),Math.max(1,f-I)),effectivePlacement:x,thumbPos:V,sideWidth:D,topBottomHeight:A}}function ca(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(R=>R.trim()).filter(Boolean).forEach(R=>p.classList.add(R)),r.caption?.style&&Object.assign(p.style,r.caption.style),n.appendChild(p);let x=createRoot(p);a.current=x;let j=l[c];x.render(jsx("div",{"data-rmg-fs-caption-content":"true",style:{width:"100%"},children:r.caption.render({item:j,index:c,isZoomed:!1})}));}catch(p){console.error("[RMG] Failed to render overlay caption",p);}}function ua(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 Ti(e,n){e.current&&(e.current.unmount(),e.current=null),n.current&&(n.current.remove(),n.current=null);}function Ci(e,n){return e==="contain"?"contain":e==="cover"?"cover":n}function Si(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 da(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 fa=1024;function ma(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),R=Math.max(1,Math.min(x,fa))/u;return {proxyRasterW:Math.max(1,Math.round(l*R)),proxyRasterH:Math.max(1,Math.round(c*R))}}function pa(e,n){let t=Fi(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=Ci(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 Fi(e,n){let r=Wr(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 Ei(e,n){let t=Wr(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 ya(e,n,t){let r=Ei(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=Ei(e,t);if(x){u(x);return}if(performance.now()-a>=n){u(null);return}l=requestAnimationFrame(p);};l=requestAnimationFrame(p);})}function Oi(){return new Promise(e=>requestAnimationFrame(()=>e()))}async function fo(e){let n=Math.max(1,Math.round(e));for(let t=0;t<n;t+=1)await Oi();}function ga(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 ba(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=Fi(n,t);if(u&&ga(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(j=>window.setTimeout(()=>j("timeout"),p)),l])==="timeout")break;c=u;}}await fo(2);return}await Oi();}await fo(2);}function lo(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 Mi(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 wi(e,n){return Math.min(e.right,n.right)>Math.max(e.left,n.left)}function ha(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(!Mi(c))continue;let u=c.getBoundingClientRect();n&&!wi(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(!Mi(c))continue;let u=c.getBoundingClientRect();n&&!wi(u,n)||u.bottom>l&&(l=u.bottom,a=c);}return a}function va(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 co(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 Ra(e){return e?[e.overflow,e.overflowX,e.overflowY].some(n=>{let t=n?.trim().toLowerCase()??"";return t==="hidden"||t==="clip"}):false}function Sa(e,n=2){let t=[],r=e.parentElement;for(;r&&r!==document.body&&r!==document.documentElement&&t.length<n;){if(Ra(getComputedStyle(r))){let o=r.getBoundingClientRect();o.width>0&&o.height>0&&t.push(o);}r=r.parentElement;}return t}function xi(e){let{overlay:n,fullscreenRoot:t,styles:r,overlayCaptionRef:o,overlayCaptionRootRef:a,setShowFullscreenSlider:l,setFsFadeOpening:c,durationMs:u,easing:p}=e;oa(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);}),aa(u,p,t),requestAnimationFrame(()=>{flushSync(()=>c(false));});}),window.setTimeout(()=>{Ti(a,o);},u+30);}function Ea(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 Ma(e){let{originalImage:n,index:t,overlay:r,fullscreenRoot:o,styles:a,fs:l,contentRect:c,vw:u,vh:p,introZ:x,durationMs:j,easing:R,duplicateImgRef:D,overlayCaptionRef:A,overlayCaptionRootRef:P,setShowFullscreenSlider:S}=e;Ri(o);let w=n.getBoundingClientRect(),M=Math.max(1,n.naturalWidth||0),K=Math.max(1,n.naturalHeight||0),H=Ci(getComputedStyle(n).objectFit||"cover","cover"),W=getComputedStyle(n),I=a$9(W?.objectPosition??null),f=H==="contain"?d$4(M,K,w,"contain",I):w,z=ha(l.effects?.introStickyNavSelector,w)?.getBoundingClientRect(),U=(z!=null?va(f,z.bottom):null)??f,re=co(lo(U,u,p),x),ge=Sa(n,2),le=ge[0]??null,F=ge[1]??null,_=le?co(lo(le,u,p),x):null,ce=F?co(lo(F,u,p),x):null,ee=document.createElement("img");ee.src=n.currentSrc||n.src,ee.decoding="sync",ee.loading="eager",Object.assign(ee.style,{position:"fixed",left:"0",top:"0",width:`${M}px`,height:`${K}px`,maxWidth:"none",maxHeight:"none",transformOrigin:"50% 50%",willChange:"transform",transition:"none",opacity:"0",display:"block",zIndex:String(x),backfaceVisibility:"hidden"}),D.current=ee,re.appendChild(ee),_?(_.appendChild(re),ce&&ce.appendChild(_)):ce&&ce.appendChild(re);let je=ce??_??re,Wt=document.createDocumentFragment();Wt.append(r,je),document.body.appendChild(Wt);let q=(oe,Ze,Ce)=>{ee.style.transform=`translate3d(${oe.cx}px, ${oe.cy}px, 0) translate3d(${-Ze/2}px, ${-Ce/2}px, 0) scale(${oe.scale})`;},Ne=oe=>{let Ze=H==="contain"?f:w,{proxyRasterW:Ce,proxyRasterH:Fe}=ma({sourceNatW:M,sourceNatH:K,startRect:Ze,contentRect:c,targetImageState:oe});ee.style.width=`${Ce}px`,ee.style.height=`${Fe}px`;let he=Si({fit:H,natW:Ce,natH:Fe,rect:Ze,objPos:I??{x:.5,y:.5}}),qt=oe?Si({fit:oe.fit,natW:Ce,natH:Fe,rect:oe.rect,objPos:oe.objPos}):da(Ce,Fe,c);return {startT:he,endT:qt,proxyRasterW:Ce,proxyRasterH:Fe}};function ae(oe){let{startT:Ze,endT:Ce,proxyRasterW:Fe,proxyRasterH:he}=Ne(oe);q(Ze,Fe,he),ee.style.opacity="1",r.style.opacity="0",r.style.pointerEvents="none",ee.offsetWidth,re.offsetWidth,_?.offsetWidth,ce?.offsetWidth,r.offsetWidth,requestAnimationFrame(()=>{re.style.transition=`clip-path ${j}ms ${R}`,_&&(_.style.transition=`clip-path ${j}ms ${R}`),ce&&(ce.style.transition=`clip-path ${j}ms ${R}`),ee.style.transition=`transform ${j}ms ${R}`,r.style.transition=`opacity ${j}ms ${R}`,requestAnimationFrame(()=>{re.style.clipPath="inset(0px 0px 0px 0px)",_&&(_.style.clipPath="inset(0px 0px 0px 0px)"),ce&&(ce.style.clipPath="inset(0px 0px 0px 0px)"),q(Ce,Fe,he),r.style.opacity="1",r.style.pointerEvents="none";});});}let fe=false,be=oe=>{fe||(fe=true,ae(oe));},Ht=ya(t,120,o);be(pa(t,o)),Ht.then(oe=>{requestAnimationFrame(()=>{let Ze=A.current;Ze&&(oe?ua({overlayCaption:Ze,captionState:oe}):Ea({overlayCaption:Ze,fs:l,contentRect:c,vw:u,vh:p}),Ze.classList.add(a.open));});});let Vt=async oe=>{oe.propertyName==="transform"&&(ee.removeEventListener("transitionend",Vt),await fo(2),Ri(o),flushSync(()=>S(true)),await ba({index:t,fullscreenRoot:o,maxWaitMs:Math.max(300,Math.min(1e3,j+500))}),requestAnimationFrame(()=>{Ti(P,A),je.remove(),ee.remove(),D.current=null;}));};ee.addEventListener("transitionend",Vt,{once:true});}function Ii(e){let{originalImage:n,method:t,index:r,normalizedItems:o,styles:a,fs:l,overlayDivRef:c,duplicateImgRef:u,overlayCaptionRef:p,overlayCaptionRootRef:x,fsThumbContainerRef:j,fullscreenThumbnailPosition:R,setShowFullscreenSlider:D,setFsFadeOpening:A,addShield:P,resolveFsCaptionPlacement:S,viewportOverlay:w,closestSelector:M,baseZ:K,fullscreenRootRef:H}=e,W=o[r],f=(K??9999)-1,V=H?.current??null,z=l.effects?.introDuration??300,$=l.effects?.introEasing??"cubic-bezier(.4,0,.22,1)";P?.(400);let U=a$7(),re=window.innerHeight,ge=false;if(n){let ce=n.closest(M??(M===void 0?".rmg__grid-item, .rmg__masonry-item, .rmg__slide":""))||n.parentElement||n;ge=ra(W,ce);}else ge=W?.type==="video"||W?.kind==="video"||W?.mediaType==="video";let le=ia({requested:t,item:W,fs:l,isVideoSlide:ge}),F=sa(a,c,z,$),{rect:_}=la({vw:U,vh:re,fs:l,viewportOverlay:w,fsThumbContainerRef:j,fullscreenThumbnailPosition:R,resolveFsCaptionPlacement:S});if(ca({overlay:F,styles:a,fs:l,overlayCaptionRef:p,overlayCaptionRootRef:x,normalizedItems:o,index:r,introZ:f}),le==="fade"){xi({overlay:F,fullscreenRoot:V,styles:a,overlayCaptionRef:p,overlayCaptionRootRef:x,setShowFullscreenSlider:D,setFsFadeOpening:A,durationMs:z,easing:$});return}if(!n){xi({overlay:F,fullscreenRoot:V,styles:a,overlayCaptionRef:p,overlayCaptionRootRef:x,setShowFullscreenSlider:D,setFsFadeOpening:A,durationMs:z,easing:$});return}Ma({originalImage:n,index:r,overlay:F,fullscreenRoot:V,styles:a,fs:l,contentRect:_,vw:U,vh:re,introZ:f,durationMs:z,easing:$,duplicateImgRef:u,overlayCaptionRef:p,overlayCaptionRootRef:x,setShowFullscreenSlider:D});}function Li(e,n){return n>1&&e===n+2}function xa(e,n,t){if(!Li(n,t)){let r=t||n||1;return (e%r+r)%r}return e===0?t-1:e===n-1?0:e-1}function Ta(e,n,t){return Li(n,t)&&(e===0||e===n-1)}function Ca(e){let n=e,t=n.poster??n.thumb??n.thumbSrc??"";return typeof t=="string"?t:""}function Fa(e){let{item:n,index:t,canonicalIndex:r,isClone:o,imageRef:a,cells:l,isZoomed:c,showFullscreenSlider:u,getTransform:p,onPanPointerDown:x,onSuppressNextClickCapture:j,styles:R,renderImage:D,renderMode:A="track",interactive:P=u,registerCell:S=true}=e,w=n.kind==="node",M={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=Ca(n);return H?jsx("img",{alt:n.alt??`cell-${r}`,"data-index":t,className:R.fullscreenImages,draggable:"false",decoding:"async",loading:"lazy",src:H,style:{...M,display:"block",pointerEvents:"none"}}):jsx("div",{"data-rmg-fs-video-fallback":"true",style:{width:"100%",height:"100%",background:"#000"}})})():D?D({item:n,index:r,isZoomed:c,className:R.fullscreenImages,baseStyle:M}):jsx("img",{alt:n.alt??`cell-${t}`,"data-index":t,className:R.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:{...M,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=>{S&&H&&!l.current.some(W=>W.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:R.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:j,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 mo(e){let{items:n,getTransform:t,imageRefs:r,cells:o,isZoomed:a,showFullscreenSlider:l,onPanPointerDown:c,onSuppressNextClickCapture:u,styles:p,renderImage:x,canonicalLength:j,renderMode:R="track"}=e,D=j??n.length;return n.map((A,P)=>{let S=xa(P,n.length,D),w=Ta(P,n.length,D);return jsx(Fa,{item:A,index:P,canonicalIndex:S,isClone:w,imageRef:r.current[P],cells:o,isZoomed:a,showFullscreenSlider:l,getTransform:t,onPanPointerDown:c,onSuppressNextClickCapture:u,styles:p,renderImage:x,renderMode:R,interactive:R==="track"&&l,registerCell:R==="track"},`${A.src??"slide"}-${P}`)})}function Hi(e){return mo({...e,renderMode:"crossfade",showFullscreenSlider:true})}function Pi(e){let{normalizedItems:n,wrappedItems:t,setWrappedItems:r,imageRefs:o}=e;C.useEffect(()=>{if(!n.length)return;let a=n[0],l=n[n.length-1];r([l,...n,a]);},[n,r]),C.useEffect(()=>{t.length&&(o.current=t.map(()=>C.createRef()));},[t,o]);}var ki="--rmg-fs-caption-overlay-opacity",Oa=300,Ia="cubic-bezier(.4,0,.22,1)",La="linear";function po(e,n){return n?(e%n+n)%n:e}function Ha(e){return e?.overlayCrossfadeTarget??"content"}function Pa(e,n=Oa){let t=e?.overlayCrossfadeDurationMs;return typeof t=="number"&&Number.isFinite(t)?Math.max(0,t):n}function ka(e){let n=e?.overlayCrossfadeEasing;return typeof n=="string"&&n.trim()?n:Ia}function Ai(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)",...Va({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 Aa(e){let{caption:n,placement:t,captionZoomMotion:r}=e;return {padding:"1.25rem 1.5rem",background:Wa(t),color:"#fff",fontSize:"0.9rem",...n?.style??{},...r.contentStyle,pointerEvents:"none"}}function yo(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?La:r}`:void 0,willChange:t>0?"opacity":void 0,pointerEvents:"none"}}function Da(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 j of p)if(c[j]!==u[j])return false;continue}if(a!==l)return false}return true}function Vr(e){return C.isValidElement(e)&&e.type!==C.Fragment}function ja(e){if(!e.length)return false;let[n]=e;if(!n||!Vr(n.node))return false;let t=n.node;return e.every(({node:r})=>Vr(r)?r.type===t.type&&Da(t.props,r.props):false)}function Na(e){let{layers:n,items:t,caption:r,isZoomed:o,captionZoomMotion:a,viewportWidth:l,viewportHeight:c,fadeOutMs:u,fadeOutEasing:p,resolveFsCaptionPlacement:x}=e,j=e.overlayOpacity,R=j==null?`var(${ki}, 1)`:String(j),D=r?.render;if(typeof D!="function"||!n.length)return null;let A=n.flatMap(I=>{let f=t[I.index];return f?[{layer:I,node:D({item:f,index:I.index,isZoomed:o})}]:[]});if(!A.length)return null;let P=x(r?.placement,r?.breakpoint,l),w=Ha(r)==="content",M=A.length-1,K=r?.className,H=Aa({caption:r,placement:P,captionZoomMotion:a}),W=ja(A);if(w){let I=W?A[M]?.node??null:null,f=A[M]?.layer,V=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:Ai({caption:r,viewportWidth:l,viewportHeight:c,placement:P,fadeOutMs:u,fadeOutEasing:p,opacity:R}),"aria-hidden":a.interactive?void 0:true,children:jsx("div",{"data-rmg-fs-caption-surface":"true",style:H,children:I&&Vr(I)?C.cloneElement(I,I.props,jsx(Sr,{activeKey:V,activeReady:z,durationMs:u,easing:p,children:A.map(({layer:$,node:U},re)=>{let ge=Vr(U)?U.props.children:U;return jsx("div",{"data-rmg-fs-caption-content":"true","data-rmg-overlay-height-layer-key":String($.key),"data-rmg-overlay-height-active":re===M?"true":void 0,style:yo({opacity:$.opacity,fadeOutMs:u,fadeOutEasing:p,stacked:true,active:re===M}),"aria-hidden":re===M&&a.interactive?void 0:true,children:ge},$.key)})})):jsx(Sr,{activeKey:V,activeReady:z,durationMs:u,easing:p,children:A.map(({layer:$,node:U},re)=>jsx("div",{"data-rmg-fs-caption-content":"true","data-rmg-overlay-height-layer-key":String($.key),"data-rmg-overlay-height-active":re===M?"true":void 0,style:yo({opacity:$.opacity,fadeOutMs:u,fadeOutEasing:p,stacked:true,active:re===M}),"aria-hidden":re===M&&a.interactive?void 0:true,children:U},$.key))})})})}return jsx(Fragment,{children:A.map(({layer:I,node:f},V)=>jsx("div",{"data-rmg-fs-caption":"true","data-rmg-fs-caption-overlay":"true",className:K,style:Ai({caption:r,viewportWidth:l,viewportHeight:c,placement:P,fadeOutMs:u,fadeOutEasing:p,opacity:j==null?`calc(var(${ki}, 1) * ${I.opacity})`:String(j*I.opacity)}),"aria-hidden":V===M&&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:yo({opacity:1,fadeOutMs:0,fadeOutEasing:p,stacked:false,active:true}),children:f})})},I.key))})}function Di(e){let{enabled:n,fsSub:t,items:r,caption:o,isZoomed:a,captionZoomMotion:l,viewportWidth:c,viewportHeight:u,closing:p,fadeOutMs:x,resolveFsCaptionPlacement:j}=e,R=Pa(o,x),D=ka(o),[A,P]=C.useState(()=>[{key:1,index:po(t.get(),r.length),opacity:1}]),[S,w]=C.useState(0),M=C.useRef(A),K=C.useRef(po(t.get(),r.length)),H=C.useRef(1),W=C.useRef({raf1:0,raf2:0,timeout:null}),I=C.useRef({raf1:0,raf2:0,timeout:null}),f=C.useCallback(()=>{let F=W.current;F.raf1&&cancelAnimationFrame(F.raf1),F.raf2&&cancelAnimationFrame(F.raf2),F.timeout!=null&&window.clearTimeout(F.timeout),W.current={raf1:0,raf2:0,timeout:null};},[]),V=C.useCallback(()=>{let F=I.current;F.raf1&&cancelAnimationFrame(F.raf1),F.raf2&&cancelAnimationFrame(F.raf2),F.timeout!=null&&window.clearTimeout(F.timeout),I.current={raf1:0,raf2:0,timeout:null};},[]),z=C.useCallback(F=>{M.current=F,P(F);},[]),$=C.useCallback(F=>po(F,r.length),[r.length]),U=C.useCallback((F,_=1)=>({key:++H.current,index:F,opacity:_}),[]),re=C.useCallback(F=>M.current.reduce((ee,je)=>!ee||je.opacity>ee.opacity?je:ee,null)??U(F),[U]),ge=C.useCallback(F=>{let _=M.current[M.current.length-1];z([_?{..._,index:F,opacity:1}:U(F)]);},[U,z]),le=C.useCallback(F=>{if(p)return;f();let _=re(K.current),ce=U(F,0);if(z([{..._,opacity:1},ce]),R<=0){z([{...ce,opacity:1}]);return}W.current.raf1=requestAnimationFrame(()=>{W.current.raf1=0,W.current.raf2=requestAnimationFrame(()=>{W.current.raf2=0,z([{..._,opacity:0},{...ce,opacity:1}]),W.current.timeout=window.setTimeout(()=>{z([{...ce,opacity:1}]),W.current={raf1:0,raf2:0,timeout:null};},R);});});},[U,f,p,z,R,re]);return C.useEffect(()=>{if(!n){f(),V(),w(0),z([]);return}if(p){f(),V(),w(0),R<=0?z([]):I.current.timeout=window.setTimeout(()=>{z([]),I.current={raf1:0,raf2:0,timeout:null};},R);return}V();let F=$(t.get());K.current=F,ge(F),w(0),I.current.raf1=requestAnimationFrame(()=>{I.current.raf1=0,I.current.raf2=requestAnimationFrame(()=>{I.current.raf2=0,w(1);});});let _=t.onEvent(ce=>{if(ce.type!=="internalIndex")return;let ee=$(ce.index);ee!==K.current&&(K.current=ee,le(ee));});return ()=>{f(),V(),_();}},[f,V,p,le,n,R,t,$,ge]),C.useEffect(()=>()=>{f(),V();},[f,V]),A.length?jsx(Fragment,{children:Na({layers:A,items:r,caption:o,isZoomed:a,captionZoomMotion:l,viewportWidth:c,viewportHeight:u,fadeOutMs:R,fadeOutEasing:D,overlayOpacity:S,resolveFsCaptionPlacement:j})}):null}function Wa(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 Va(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 $a=[],Ba={};function _a(e){return C.useMemo(()=>[],[])}function za(){let e=C.useRef(false),n=C.useRef(false),t=C.useCallback(()=>{},[]);return C.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 qa(e){return e.reduce((n,t)=>t.runtime?{...n,...t.runtime}:n,{})}function wn(e,n){return (e%n+n)%n}function Za(e){return e.map(n=>{let t=n;return `${n.kind}|${t.src??""}|${t.srcSet??""}|${t.sizes??""}|${t.poster??""}`}).join("||")}function Ni(e){if(!e)return;try{e?.pause?.();}catch{}let n=e?.plyr??null;try{n?.pause?.();}catch{}try{n?.media?.pause?.();}catch{}}function Ya(e){let{canonicalIndex:n,canonicalLength:t}=e;if(!Number.isFinite(n)||!Number.isFinite(t)||t<=0)return null;let r=wn(n,t);return t>1?r+1:r}function Ua(e){return !!e.enabled&&e.showFullscreenModal&&e.showFullscreenSlider&&!e.closingModal&&e.item?.kind==="video"}function Xa(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 Ga(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:j,margin:R,marginTop:D,marginRight:A,marginBottom:P,marginLeft:S,marginBlock:w,marginBlockStart:M,marginBlockEnd:K,marginInline:H,marginInlineStart:W,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:j,margin:R,marginTop:D,marginRight:A,marginBottom:P,marginLeft:S,marginBlock:w,marginBlockStart:M,marginBlockEnd:K,marginInline:H,marginInlineStart:W,marginInlineEnd:I}}function Ka(e){let{fsEnabled:n,fsSub:t,showFullscreenModal:r,setShowFullscreenModal:o,isClick:a,isAnimatingRef:l,overlayDivRef:c,cells:u,setShowFullscreenSlider:p,slidesForFullscreen:x,sliderForFullscreen:j,isWrappingForFullscreen:R,setClosingModal:D,closeButtonRef:A,counterRef:P,leftChevronRef:S,rightChevronRef:w,centerSliderForFullscreen:M,setSliderIndexForFullscreen:K,layout:H,expandableImageRefs:W,resolveLayoutlessTarget:I,entryMapRef:f,entryMediaLayout:V,introFade:z,introDuration:$,introEasing:U,fullscreenSliderApi:re,slideIndex:ge,isZoomClick:le,isZoomed:F,windowSize:_,imageRefs:ce,wrappedItems:ee,setWrappedItems:je,scale:Wt,showFullscreenSlider:q,isZooming:Ne,singleModePlyrRefs:ae,wrappedModePlyrRefs:fe,closingModal:be,duplicateImgRef:Ht,direction:Vt,sliderGap:oe,sliderDuration:Ze,sliderFriction:Ce,sliderSkipSnaps:Fe,sliderStrictSnaps:he,suppressLoopRef:qt,fsFadeOpening:ut,normalizedItems:te,fsThumbContainerRef:dt,fullscreenThumbnailSlot:We,setFullscreenThumbnailMountEl:ze,showFsEntryOverlayMount:dn,fsIntroReq:Oe,clearFsIntroReq:An,styles:Ie,fs:v,overlayCaptionRef:Yn,overlayCaptionRootRef:Dn,setFsFadeOpening:Re,addShield:jn,resolveFsCaptionPlacement:rt,requestFsCloseRef:fn,cancelFsCloseRef:Un,suppressNextClickRef:Et,currentImage:xn,scaleRef:Xn,pointerDownRef:Gn,interactionModeRef:Pt,boundsX:Pe,boundsY:ot,bodyX:$t,bodyY:en,locX:tn,locY:Mt,prevX:Zt,prevY:Kn,offX:Jn,offY:Tn,tgtX:d,tgtY:g,axisRef:B,animRef:de,setScale:me,previousZoom:Ye,panRef:ft,changingSlides:mt,fsIndexRef:Ct,entriesObject:ve,syncFullscreenSourceFromIndex:Je,setFullscreenOpen:ke,runtimePlugins:wt=$a}=e,Ve=C.useMemo(()=>qa(wt),[wt]),nn=Ve.renderSlides??mo,kt=Ve.renderCrossfadeSlides??Hi,Me=Ve.usePlyrProps??_a,rn=Ve.useZoomPanRuntime??za,Ft=Ve.defaultPlayerStyle??Ba,mn=!!Ve.usePlyrProps,$e=!!v.lazyLoad?.images?.enabled,Le=mn&&!!v.lazyLoad?.videos?.enabled,it=C.useRef(new Set),At=C.useRef(new Set),on=C.useRef(new Set),h=C.useRef(new Set),Z=C.useRef(0),J=C.useRef(new Set),pe=C.useRef(new Set),st=C.useRef(new Map),Qe=C.useRef(new Set),Bt=C.useRef(new Set),Ot=C.useRef(new Set),[ue,pn]=C.useState(0),[Yt,Ut]=C.useState(null),[pt,Qn]=C.useState(0),X=te.length||0,It=C.useRef(0),et=C.useMemo(()=>Za(te),[te]),yt=C.useRef(null);!yt.current&&Ve.createVideoSnapshotStore&&(yt.current=Ve.createVideoSnapshotStore());let gt=yt.current;function _t(){on.current.forEach(y=>y());}function Xt(){h.current.forEach(y=>y());}let Gt=C.useCallback(y=>{if(!X)return;let E=wn(y,X);if(Le){let N=Ot.current;At.current=new Set([E,...N]),Xt();}$e&&(it.current=new Set([E]),_t());},[X,$e,Le]),Kt=C.useCallback(()=>{Ot.current.clear(),At.current=new Set,it.current=new Set;},[]),at=C.useCallback(()=>{let y=t.get?.(),E=typeof y=="number"&&Number.isFinite(y)?y:Z.current;typeof E!="number"||!Number.isFinite(E)||(Z.current=E,Gt(E));},[t,Gt]);C.useEffect(()=>{if(!$e&&!Le||!t)return;let y=E=>{typeof E=="number"&&(Z.current=E,Gt(E));};if(r){let E=t.get?.();typeof E=="number"&&y(E);}if(typeof t.subscribe=="function"){let E=t.subscribe(N=>y(N));return ()=>E?.()}if(typeof t.onEvent=="function"){let E=t.onEvent(N=>{if(typeof N=="number")y(N);else if(typeof N?.index=="number")y(N.index);else {let Q=t.get?.();typeof Q=="number"&&y(Q);}});return ()=>E?.()}},[$e,Le,t,r,Gt]),C.useEffect(()=>{if(!t)return;let y=E=>{typeof E!="number"||!Number.isFinite(E)||pn(E);};if(r){let E=t.get?.();typeof E=="number"&&y(E);}if(typeof t.subscribe=="function"){let E=t.subscribe(N=>y(N));return ()=>E?.()}if(typeof t.onEvent=="function"){let E=t.onEvent(N=>{if(typeof N=="number")y(N);else if(typeof N?.index=="number")y(N.index);else {let Q=t.get?.();typeof Q=="number"&&y(Q);}});return ()=>E?.()}},[t,r]);function sn(){let y=window;return y.__rmgZ||(y.__rmgZ=9999),y.__rmgZ+=1,y.__rmgZ}let tt=C.useRef(9999),Ue=C.useRef(null);C.useEffect(()=>{r&&(tt.current=sn());},[r]);let qe=C.useRef(r);C.useEffect(()=>{let y=qe.current;qe.current=r,!(!r||y)&&(Kt(),at());},[r,Kt,at]);let an=C.useRef(et);C.useEffect(()=>{an.current!==et&&(an.current=et,Qe.current.clear(),Bt.current.clear(),Kt(),gt?.reset?.(),r&&at());},[et,Kt,r,at,gt]);let Ae=H==="entries"&&typeof ve.render?.overlay=="function";C.useEffect(()=>{if(!Oe)return;let{originalImage:y,index:E,closestSelector:N,method:Q}=Oe;Ut(Q??null),Qn(E);let He=We?.position??null;Ii({originalImage:y,method:Q,index:E,normalizedItems:te,styles:Ie,fs:v,overlayDivRef:c,duplicateImgRef:Ht,overlayCaptionRef:Yn,overlayCaptionRootRef:Dn,fsThumbContainerRef:dt,fullscreenThumbnailPosition:He,setShowFullscreenSlider:p,setFsFadeOpening:Re,addShield:jn,resolveFsCaptionPlacement:rt,viewportOverlay:Ae?{placement:ve.overlay?.placement,width:ve.overlay?.width,height:ve.overlay?.height,breakpoint:ve.overlay?.breakpoint}:void 0,closestSelector:N,baseZ:tt.current,fullscreenRootRef:Ue}),An();},[ve.overlay,Oe,We,Ae]),Pi({normalizedItems:te,wrappedItems:ee,setWrappedItems:je,imageRefs:ce}),C.useEffect(()=>{u.current=[];},[u,et,ee.length]);let bt=rn({fs:v,entriesObject:ve,hasEntriesViewportOverlay:Ae,layout:H,resolveFsCaptionPlacement:rt,windowSize:_,currentImage:xn,scaleRef:Xn,setScale:me,previousZoom:Ye,suppressLoopRef:qt,locX:tn,prevX:Zt,offX:Jn,tgtX:d,locY:Mt,prevY:Kn,offY:Tn,tgtY:g,bodyX:$t,bodyY:en,boundsX:Pe,boundsY:ot,animRef:de,panRef:ft,imageRefs:ce,changingSlides:mt,fullscreenSliderApi:re,isZoomed:F,pointerDownRef:Gn,interactionModeRef:Pt,axisRef:B,suppressNextClickRef:Et,closingModal:be});C.useEffect(()=>{if(!r)return;let y=t.get();Ct.current=y,Je(y);},[r,t]),C.useEffect(()=>{if(!r||H!=="entries"||be||!t||!X||!f.current?.length)return;let y=false,E=async Q=>{if(typeof Q!="number")return;let He=wn(Q,X),ie=f.current?.[He];if(!ie)return;let Tt=++It.current;qn(ie.entryIndex)||await Pr(ie.entryIndex),await kr(ie.entryIndex),!y&&Tt===It.current&&Je(He);},N=t.get?.();return typeof N=="number"&&E(N),()=>{y=true,It.current+=1;}},[r,H,be,t,X,f,Je]);let yn=!!r&&v.caption?.layout==="overlay"&&typeof v.caption?.render=="function",gn=te.length>1?oe??0:0,Nn=Me({items:te,source:v.video?.source,options:v.video?.options}),$r=Me({items:ee,source:v.video?.source,options:v.video?.options}),Dt=C.useMemo(()=>d$2(),[]),Cn=Vt==="rtl"?-1:1,Mr=C.useMemo(()=>c$2({length:ee.length,sign:Cn,gap:gn}),[gn,ee.length,Cn]),er=C.useMemo(()=>te.map(()=>C.createRef()),[et]),xt=C.useRef([]),Wn=C.useRef([]),tr=bt.handlePanPointerStart,go=bt.handleZoomToggle,nr=bt.resetForSlideNavigation,Br=bt.resetAllZoomDom,rr=bt.forceResetZoom??bt.resetAllZoomDom,or=bt.isPinching,ir=bt.isTouchPinching,Vn=bt.captionZoomMotion,_r=bt.entryOverlayZoomMotion;function jt(y){let E=y;return `${y.kind}|${E.src??""}|${E.srcSet??""}|${E.sizes??""}|${E.poster??""}`}C.useEffect(()=>()=>{gt?.destroy?.();},[gt]);let ht=r&&!q,Jt=X?wn(pt,X):null,sr=(()=>{let y=t.get?.();return typeof y=="number"&&Number.isFinite(y)?y:ue})(),ar=X?wn(sr,X):null,lr=Jt!=null?te[Jt]?.kind??null:null,cr=Le&&!!ht&&lr!=="video",ur=C.useRef(null);C.useEffect(()=>{r||(ur.current=null);},[r]),C.useEffect(()=>{if(!X)return;let y=wn(pt,X),E=te[y]??null;if(!Ua({enabled:v.video?.playOnOpen,showFullscreenModal:r,showFullscreenSlider:q,closingModal:be,item:E}))return;let N=Ya({canonicalIndex:y,canonicalLength:X});if(N==null)return;let Q=X>1?fe:ae,He=`${et}|${y}|${pt}`;if(ur.current===He)return;ur.current=He;let ie=false,Tt=null,Lt=performance.now()+1600,mr=()=>{if(ie)return;let Zr=Q.current[N]??null;Xa(Zr)||performance.now()>=Lt||(Tt=window.requestAnimationFrame(mr));};return Tt=window.requestAnimationFrame(mr),()=>{ie=true,Tt!=null&&window.cancelAnimationFrame(Tt);}},[X,be,v.video?.playOnOpen,pt,et,te,r,q,ae,fe]);let zr=nn({items:te,plyrList:Nn,getTransform:Dt,imageRefs:ce,playerRefs:ae,cells:u,isZoomed:F,showFullscreenSlider:q,defaultPlayerStyle:Ft,fsVideoStyle:v.video?.style,fsVideoClassName:v.video?.className,onPanPointerDown:(y,E)=>tr(y,E),onSuppressNextClickCapture:y=>{Et.current&&(Et.current=false,y.preventDefault(),y.stopPropagation());},renderCaption:v.caption?.render,captionClassName:v.caption?.className,captionStyle:v.caption?.style,captionZoomMotion:Vn,fsCaptionPlacement:v.caption?.placement,fsCaptionWidth:v.caption?.width,fsCaptionHeight:v.caption?.height,fsCaptionBreakpoint:v.caption?.breakpoint,fsCaptionLayout:v.caption?.layout,fsViewportOverlayPlacement:Ae?ve.overlay?.placement:void 0,fsViewportOverlayWidth:Ae?ve.overlay?.width:void 0,fsViewportOverlayHeight:Ae?ve.overlay?.height:void 0,fsViewportOverlayBreakpoint:Ae?ve.overlay?.breakpoint:void 0,viewportWidth:_.width,viewportHeight:_.height,resolveFsCaptionPlacement:rt,styles:{imgMargin:Ie.imgMargin,fullscreenImages:Ie.fullscreenImages},renderImage:v.renderImage,fsLazy:v.lazyLoad,fsLazyAllowedImagesRef:it,fsLazyListenersImagesRef:on,fsLazyAllowedVideosRef:At,fsLazyListenersVideosRef:h,fsDecodedImagesRef:J,fsCustomDecodedImagesRef:pe,fsCustomResolvedSrcByKeyRef:st,fsPreparedVideosRef:Qe,videoSnapshotStore:gt,canonicalLength:X,activeCanonicalIndex:ar,openingCanonicalIndex:Jt,openingInProgress:ht,deferLiveVideoUntilVisible:cr,getMediaKey:jt}),wr=nn({items:ee,plyrList:$r,getTransform:Mr,imageRefs:ce,playerRefs:fe,cells:u,isZoomed:F,showFullscreenSlider:q,defaultPlayerStyle:Ft,fsVideoStyle:v.video?.style,fsVideoClassName:v.video?.className,onPanPointerDown:(y,E)=>tr(y,E),onSuppressNextClickCapture:y=>{Et.current&&(Et.current=false,y.preventDefault(),y.stopPropagation());},renderCaption:v.caption?.render,captionClassName:v.caption?.className,captionStyle:v.caption?.style,captionZoomMotion:Vn,fsCaptionPlacement:v.caption?.placement,fsCaptionWidth:v.caption?.width,fsCaptionHeight:v.caption?.height,fsCaptionBreakpoint:v.caption?.breakpoint,fsCaptionLayout:v.caption?.layout,fsViewportOverlayPlacement:Ae?ve.overlay?.placement:void 0,fsViewportOverlayWidth:Ae?ve.overlay?.width:void 0,fsViewportOverlayHeight:Ae?ve.overlay?.height:void 0,fsViewportOverlayBreakpoint:Ae?ve.overlay?.breakpoint:void 0,viewportWidth:_.width,viewportHeight:_.height,resolveFsCaptionPlacement:rt,styles:{imgMargin:Ie.imgMargin,fullscreenImages:Ie.fullscreenImages},renderImage:v.renderImage,fsLazy:v.lazyLoad,fsLazyAllowedImagesRef:it,fsLazyListenersImagesRef:on,fsLazyAllowedVideosRef:At,fsLazyListenersVideosRef:h,fsDecodedImagesRef:J,fsCustomDecodedImagesRef:pe,fsCustomResolvedSrcByKeyRef:st,fsPreparedVideosRef:Qe,videoSnapshotStore:gt,canonicalLength:X,activeCanonicalIndex:ar,openingCanonicalIndex:Jt,openingInProgress:ht,deferLiveVideoUntilVisible:cr,getMediaKey:jt}),bn=kt({items:te,plyrList:Nn,getTransform:Dt,imageRefs:{current:er},playerRefs:xt,cells:Wn,isZoomed:F,showFullscreenSlider:true,defaultPlayerStyle:Ft,fsVideoStyle:v.video?.style,fsVideoClassName:v.video?.className,onPanPointerDown:(y,E)=>tr(y,E),onSuppressNextClickCapture:y=>{Et.current&&(Et.current=false,y.preventDefault(),y.stopPropagation());},renderCaption:v.caption?.render,captionClassName:v.caption?.className,captionStyle:v.caption?.style,captionZoomMotion:Vn,fsCaptionPlacement:v.caption?.placement,fsCaptionWidth:v.caption?.width,fsCaptionHeight:v.caption?.height,fsCaptionBreakpoint:v.caption?.breakpoint,fsCaptionLayout:v.caption?.layout,fsViewportOverlayPlacement:Ae?ve.overlay?.placement:void 0,fsViewportOverlayWidth:Ae?ve.overlay?.width:void 0,fsViewportOverlayHeight:Ae?ve.overlay?.height:void 0,fsViewportOverlayBreakpoint:Ae?ve.overlay?.breakpoint:void 0,viewportWidth:_.width,viewportHeight:_.height,resolveFsCaptionPlacement:rt,styles:{imgMargin:Ie.imgMargin,fullscreenImages:Ie.fullscreenImages},renderImage:v.renderImage,fsLazy:v.lazyLoad,fsLazyAllowedImagesRef:it,fsLazyListenersImagesRef:on,fsLazyAllowedVideosRef:At,fsLazyListenersVideosRef:h,fsDecodedImagesRef:J,fsCustomDecodedImagesRef:pe,fsCustomResolvedSrcByKeyRef:st,fsPreparedVideosRef:Qe,videoSnapshotStore:gt,canonicalLength:te.length,openingCanonicalIndex:null,openingInProgress:false,deferLiveVideoUntilVisible:false,getMediaKey:jt}),hn=C.useCallback(()=>{let y=new Set;for(let N of ae.current)!N||y.has(N)||(y.add(N),Ni(N));for(let N of fe.current)!N||y.has(N)||(y.add(N),Ni(N));if(typeof document>"u")return;document.querySelectorAll('[data-rmg-fs-slide="true"] video, [data-rmg-fs-slide="true"] audio').forEach(N=>{try{N.pause();}catch{}});},[ae,fe]);C.useEffect(()=>{be&&hn();},[be,hn]),C.useEffect(()=>{r||hn();},[r,hn]);let $n=C.useRef(new Set);function dr(y,E=3){let N=y.filter(ie=>ie.kind==="image"),Q=0,He=async()=>{for(;Q<N.length;){let ie=N[Q++],Tt=`${ie.src??""}|${ie.srcSet??""}|${ie.sizes??""}`;if($n.current.has(Tt))continue;$n.current.add(Tt);let Lt=new Image;Lt.decoding="async",Lt.fetchPriority="low",Lt.src=ie.src,Lt.srcset=ie.srcSet??"",Lt.sizes=ie.sizes??"";try{await Lt.decode();}catch{}}};return Promise.all(Array.from({length:E},()=>He()))}let Bn=C.useMemo(()=>te.map(y=>y.kind==="image"?y.src??"":"").join("|"),[te]),xr=C.useRef(null);C.useEffect(()=>{if($e||r||xr.current===Bn)return;xr.current=Bn;let y=()=>{dr(te,3);};"requestIdleCallback"in window?window.requestIdleCallback(y,{timeout:2e3}):setTimeout(y,250);},[$e,r,Bn,te]);let vn=d$3();C.useEffect(()=>{if(!vn||!r||!t||!X)return;let y=N=>{if(typeof N!="number")return;let Q=wn(N,X);vn.notifyFsVisibleIndex(Q);},E=t.get?.();if(typeof E=="number"&&y(E),typeof t.subscribe=="function"){let N=t.subscribe(Q=>y(Q));return ()=>N?.()}if(typeof t.onEvent=="function"){let N=t.onEvent(Q=>{if(typeof Q=="number")y(Q);else if(typeof Q?.index=="number")y(Q.index);else {let He=t.get?.();typeof He=="number"&&y(He);}});return ()=>N?.()}},[vn,r,t,X]);let _n=C.useCallback(async y=>{let E=te[y];if(!E||E.kind!=="image")return;let N=jt(E);if(J.current.has(N))return;let Q=new Image;Q.decoding="async",Q.fetchPriority="high",Q.src=E.src,Q.srcset=E.srcSet??"",Q.sizes=E.sizes??"";try{await Q.decode(),J.current.add(N);}catch{}},[te]),Tr=C.useCallback(async y=>{let E=te[y];if(!E||E.kind!=="video")return;let N=jt(E);if(Bt.current.has(N))return;Bt.current.add(N);let Q=E.poster??E.thumbSrc??null;if(Q)try{let ie=new Image;ie.decoding="async",ie.fetchPriority="high",ie.src=Q,await ie.decode().catch(()=>{});}catch{}let He=E.src||E.videoSrc||E.sources?.[0]?.src||null;if(typeof He=="string"&&He)try{let ie=document.createElement("video");ie.preload="auto",ie.muted=!0,ie.playsInline=!0,Q&&(ie.poster=Q),ie.src=He,ie.load(),setTimeout(()=>{try{ie.removeAttribute("src"),ie.load();}catch{}},1500);}catch{}Ot.current.add(y),At.current.add(y),Xt();},[te]);C.useEffect(()=>{if(!vn||!($e||Le))return;let E=vn.baseVisibleSub.subscribe(N=>{let Q=N?.index;if(typeof Q!="number"||!X)return;let He=wn(Q,X);$e&&_n(He),Le&&Tr(He);});return ()=>E?.()},[vn,$e,Le,_n,Tr]);let fr=We?.position??null,qr=fr==="left"?"row-reverse":fr==="right"?"row":fr==="top"?"column-reverse":"column",Cr=Ga(We?.style),Fr=te.length;return jsx(Fragment,{children:n&&jsxs(li,{fsSub:t,open:r,onClose:()=>o(false),isClick:a,isAnimating:l,overlayDivRef:c,cells:u,setShowFullscreenSlider:p,cellCount:Fr,slides:x,slider:j,wrappedItems:ee,setClosingModal:D,closeButtonRef:A,counterRef:P,leftChevronRef:S,rightChevronRef:w,centerSlider:M,setSliderIndex:K,onForceResetZoom:()=>rr(),layout:H,expandableImageRefs:W,resolveLayoutlessTarget:I,entryMapRef:f,entryMediaLayout:V,introFade:z,introDuration:$,introEasing:U,requestFsCloseRef:fn,cancelFsCloseRef:Un,fs:v,styles:Ie,syncFullscreenSourceFromIndex:Je,baseZ:tt.current,rootRef:Ue,introMethod:Yt,setLatchedIntroMethod:Ut,latchedIntroIndex:pt,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(so,{sub:t,ref:re,cellCount:Fr,slideIndex:ge,isClick:le,isZoomed:F,windowSize:_,show:r,handleZoomToggle:go,imageRefs:ce.current,cells:u,isPinching:or,scale:Wt,isTouchPinching:ir,showFullscreenSlider:q,isZooming:Ne,plyrRefs:te.length>1?fe:ae,plyrRef:te.length>1?fe:ae,closingModal:be,counterRef:P,leftChevronRef:S,rightChevronRef:w,overlayDivRef:c,direction:Vt,isWrapping:R,sliderGap:gn,sliderDuration:Ze,sliderFriction:Ce,skipSnaps:Fe,strictSnaps:he,suppressLoopRef:qt,fadeOpening:ut,introFade:z,controlsFade:!!v.effects?.crossfade?.controls,dragFade:!!v.effects?.crossfade?.drag,slideFadeDuration:v.effects?.crossfade?.durationMs,slideFadeEasing:v.effects?.crossfade?.easing,normalizedItems:te,crossfadeSlides:bn,introDuration:$,introEasing:U,resetAllZoomDom:()=>nr(),requestFsCloseRef:fn,introMethod:Yt,fs:v,chromeStyles:Ie,children:te.length>1?wr:zr})}),We&&jsx("div",{ref:ze,style:{flex:"0 0 auto",position:"relative",zIndex:1,display:"flex",alignItems:"center",justifyContent:"center",overflow:"visible",backgroundColor:"transparent",...Cr||{}}})]}),yn?jsx(Di,{enabled:yn,fsSub:t,items:te,caption:v.caption,isZoomed:F,captionZoomMotion:Vn,viewportWidth:_.width,viewportHeight:_.height,interactive:!!q,closing:!!be,resolveFsCaptionPlacement:rt}):null,dn?jsx(hi,{enabled:dn,fsSub:t,entriesObject:ve,entryMapRef:f,syncFullscreenSourceFromIndex:Je,resetAllZoomDom:Br,closing:!!be,overlayZoomMotion:_r,viewportWidth:_.width,viewportHeight:_.height,resolveFsCaptionPlacement:rt}):null]})})}var Bc=Ka;export{Ka as FullscreenRuntime,Bc as default,Ya as getFullscreenVideoOpenRefIndex,Ua as shouldPlayFullscreenVideoOnOpen};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-MFTASEWB.mjs';import {b,a as a$3}from'./chunk-LSHR3FZM.mjs';import {a as a$1}from'./chunk-D3T6HIS2.mjs';import {a as a$4}from'./chunk-AKY343WN.mjs';import {d}from'./chunk-WMG2LTLR.mjs';import {a}from'./chunk-HK2DPKES.mjs';import*as e from'react';import {jsx}from'react/jsx-runtime';var u={placement:"balanced",fullscreenTrigger:"media"};function Y(t){return t instanceof HTMLImageElement}function G(t){if(!(t instanceof HTMLElement))return null;let i=t.closest("img");return Y(i)?i:null}function U(t){let{cells:i,fsEnabled:y,fullscreenTrigger:p,openFullscreenAt:g,registerExpandableImage:C,itemBaseClass:a,itemBaseStyleClass:L,itemClassName:o,itemWrapClassName:k,itemWrapStyle:v,slideStoreBag:N}=t;return i.map((c,l)=>{let E=c.node,d={"--rmg-intro-index":l},S=[a,L,o||"",k||"",c.layoutMeta?.className||""].filter(Boolean).join(" "),I={...v||{},...c.layoutMeta?.style||{},...d},f=jsx(a$4,{value:{normIdx:l,isClone:false,storeBag:N},children:E}),b=r=>{if(r.defaultPrevented||!y)return;let M=p==="media"?G(r.target):r.currentTarget;M&&g(l,M);},O=r=>{r.key!=="Enter"&&r.key!==" "||(r.preventDefault(),y&&p==="item"&&g(l,r.currentTarget));};return {id:c.id,span:c.layoutMeta?.span,node:jsx("div",{"data-rmg-idx":l,className:S,style:I,onClick:b,onKeyDown:O,ref:r=>{C(l,r);},role:y&&p==="item"?"button":void 0,tabIndex:y&&p==="item"?0:void 0,children:f})}})}function x(t){return t instanceof HTMLImageElement}function h(t){if(!t)return null;if(x(t))return t;let i=t.querySelector("img");return x(i)?i:null}function V(t){return {renderIntro:t?.renderIntro,staggerMs:t?.staggerMs??160,durationMs:t?.durationMs??600,easing:t?.easing??"cubic-bezier(.2,.7,.2,1)"}}var $=e.forwardRef(function(i,y){let{children:p,breakpoints:g,...C}=i,a$3=d(),L=e.useMemo(()=>a$3?.effectiveBreakpoints??{...a,...g||{}},[a$3?.effectiveBreakpoints,g]),o=e.useMemo(()=>{let n=C??{};return {...u,...n,placement:n?.placement??u.placement,classNames:{...u.classNames,...n?.classNames??{}},layout:{...u.layout,...n?.layout??{}},transitions:{...u.transitions,...n?.transitions??{}}}},[C]),k=e.useRef(0),v=e.useCallback(()=>`rmg-${++k.current}`,[]),N=e.useMemo(()=>{let n=e.Children.toArray(p),s=[];for(let B of n){let m=b(B);m.node!=null&&s.push({id:v(),node:m.node,layoutMeta:m.layoutMeta});}return s},[]),[c]=e.useState(N),l=a$3?.cellsState??void 0,E=l&&l.length>0?l:c,d$1=a$3?.expandableImageRefs??e.useRef([]),S=a$3?.registerExpandableImage??e.useCallback((n,s)=>{let B=h(s);d$1.current[n]=B;},[d$1]),I=a$3?.normalizedItems??[],f=!!a$3?.fsEnabled,b$1=e.useCallback((n,s)=>{if(!f||!I.length)return;let m=null;if(s&&(m=h(s)),!m){let R=d$1.current[n]??null,H=R&&typeof R=="object"&&"current"in R?R.current:R;x(H)?m=H:H instanceof HTMLElement&&(m=h(H));}a$3.requestFullscreenOpen({source:"masonry",index:n,image:m??null});},[a$3,f,I.length,d$1]),O=e.useMemo(()=>V(o.intro??o.transitions?.intro),[o]),r=o.classNames?.item??"",M=o.itemWrapClassName??"",A=o.itemWrapStyle,F=o.fullscreenTrigger??u.fullscreenTrigger,T=e.useMemo(()=>a$1(),[]);e.useEffect(()=>()=>{T.destroyAll();},[T]);let P=e.useMemo(()=>U({cells:E,fsEnabled:f,fullscreenTrigger:F,openFullscreenAt:(n,s)=>b$1(n,s),registerExpandableImage:(n,s)=>S(n,s??null),itemBaseClass:"rmg__masonry-item",itemBaseStyleClass:"",itemClassName:r,itemWrapClassName:M,itemWrapStyle:A,slideStoreBag:T}),[E,f,F,b$1,S,r,M,A,T]);return jsx(a$2,{ref:y,items:P.map(n=>n.node),itemSpans:P.map(n=>n.span),masonry:o,breakpoints:L,intro:O})}),J=Object.assign($,{Item:a$3}),me=J;export{me as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$6}from'./chunk-R6EGYRTJ.mjs';import {a as a$4}from'./chunk-P2GQPFSL.mjs';import {c as c$1,d as d$1,m,h as h$2,e as e$3}from'./chunk-VPFAU2TE.mjs';import {j,f as f$1,h,g,c as c$2,b as b$4,a as a$8,e as e$2,d as d$3}from'./chunk-4NT4UVB5.mjs';import {d,e,c,a as a$3,b as b$2}from'./chunk-Z34PSRMG.mjs';import {b as b$3,d as d$2,c as c$3,f as f$2,e as e$1,h as h$1,g as g$1,a as a$7}from'./chunk-HGY3QLCE.mjs';import {a as a$5}from'./chunk-X4HEGEZV.mjs';import {a as a$1}from'./chunk-UUAWLGWO.mjs';import {f}from'./chunk-NHIKOJLU.mjs';import {a as a$2}from'./chunk-LVYED5ZM.mjs';import {b}from'./chunk-UML6FCOQ.mjs';import {b as b$1}from'./chunk-B4CC5AGE.mjs';import {a,i}from'./chunk-HK2DPKES.mjs';import*as S from'react';import {useRef,useMemo,useState,Children,isValidElement,useEffect,cloneElement,useCallback}from'react';import {jsxs,Fragment,jsx}from'react/jsx-runtime';function mn(n){return n==="instant"?"instant":"animated"}function zt(n){return typeof n!="number"||!Number.isFinite(n)?null:n|0}function zn(n,o){if(!o)return n;let u=o(n);return zt(u)}function Hn(n){let{localChannel:o,externalChannel:u=null,clampIndex:f}=n,y=false,I=null,T=(P,k)=>{let p=o.get();p.index===P&&mn(p.mode)===k||o.set(P,k);},B=()=>{if(!u)return;let P=u.get?.(),k=zt(P?.index);if(k==null)return;let p=zn(k,f);p!=null&&T(p,mn(P?.mode));},$=()=>{I&&(I(),I=null),y=false;};return {start:()=>{if(y||(y=true,!u))return $;B();let P=[];return typeof u.onBasePointerDown=="function"&&typeof o.emitBasePointerDown=="function"&&P.push(u.onBasePointerDown(()=>{o.emitBasePointerDown?.();})),typeof u.onEvent=="function"?P.push(u.onEvent(k=>{if(!k||typeof k!="object")return;let p=mn(k.mode);if(k.type==="set"){let O=zt(k.index);if(O==null)return;let ee=zn(O,f);if(ee==null)return;T(ee,p);return}if(k.type==="bump"){let O=zt(k.delta);if(O==null||O===0)return;o.bump(O,p);}})):typeof u.subscribe=="function"&&P.push(u.subscribe(()=>{B();})),I=()=>{P.forEach(k=>k());},$},stop:$,publishThumbnailClick:(P,k="animated",p={source:"thumbnail",transition:"scroll"})=>{if(!u)return;let O=zt(P);if(O==null)return;let ee=zn(O,f);ee!=null&&u.set(ee,mn(k),{meta:p});}}}var Ne={thumbShell:"ur",thumbContentLayer:"yr",thumbContentBlocked:"xr",thumbLoadingLayer:"S",thumbLoadingLayerCompare:"kr",thumbLoadingLayerExit:"wr",thumbSkeletonOverlay:"j",thumbSkeletonRow:"zr",thumbSkeleton:"a"};var vt={thumb:"Y",fadeInStart:"Xr",fadeInActive:"Z",fade_container:"U",ripple:"q"};function ls({axisMain:n,direction:o,size:u=32}){let f=jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6z"}),y=jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6z"});return n==="y"?jsx("svg",{viewBox:"0 0 24 24",width:u,height:u,fill:"#000",xmlns:"http://www.w3.org/2000/svg","aria-hidden":true,style:{transform:"rotate(90deg)",transformOrigin:"50% 50%"},children:o==="prev"?f:y}):jsx("svg",{viewBox:"0 0 24 24",width:u,height:u,fill:"#000",xmlns:"http://www.w3.org/2000/svg","aria-hidden":true,children:o==="prev"?f:y})}var us={position:"absolute",overflow:"hidden",backgroundColor:"rgba(255, 255, 255, 0.75)",boxShadow:"0 0 5px rgba(0, 0, 0, 0.5)",borderRadius:"100%",zIndex:2,width:36,height:36,display:"flex",justifyContent:"center",alignItems:"center",transition:"opacity 120ms"};function ms(n){return n==="y"?{left:"50%",top:10,transform:"translateX(-50%)"}:{left:10,top:"50%",transform:"translateY(-50%)"}}function ds(n){return n==="y"?{left:"50%",bottom:10,transform:"translateX(-50%)"}:{right:10,top:"50%",transform:"translateY(-50%)"}}function Qr(n){let{axisMain:o,clientKey:u,wrap:f,isRtl:y,showArrows:I,selectedIndex:T,slideCount:B,measureRef:$,viewportMainSizeRef:a,previous:U,next:P,prevButtonRef:k,nextButtonRef:p,createRipple:O,arrowStyles:ee,prevArrowStyles:me,nextArrowStyles:Xe,arrowClassName:Be,prevArrowClassName:Pe,nextArrowClassName:qe,renderPrevArrow:xe,renderNextArrow:Te,renderArrows:De}=n,it=!f&&T<=0,$e=!f&&T>=Math.max(0,B-1),Wt=$.current?$.current[u]:0,ct=!(B>1&&$.current&&a.current>Wt),z=!I||ct,lt=z||!f&&(y?$e:it),Ge=z||!f&&(y?it:$e),Ce={...ee??{},...me??{}},Tt={...ee??{},...Xe??{}},Ct=[Be,Pe].filter(Boolean).join(" "),kt=[Be,qe].filter(Boolean).join(" ");function de(H,Se){return ()=>{Se||requestAnimationFrame(()=>{H==="prev"?U():P();});}}let At=({dir:H,ref:Se,onClick:Je,hidden:Fe,disabled:m,className:V})=>{let ke=m?.35:1,fe=H==="prev"?ms(o):ds(o),Q=H==="prev"?Ce:Tt;return jsx("div",{ref:Se,className:`rmgArrow rmgArrow--${H} ${V??""}`,onClick:te=>{Fe||(O(te.currentTarget),requestAnimationFrame(()=>Je()));},style:{...us,...fe,...Q,cursor:m?"default":"pointer",opacity:Fe?0:ke,pointerEvents:Fe?"none":"auto",visibility:Fe?"hidden":"visible"},"aria-label":H==="prev"?"Previous slide":"Next slide",role:"button",title:m?H==="prev"?"At first slide":"At last slide":H==="prev"?"Previous":"Next",children:jsx(ls,{axisMain:o,direction:H,size:32})})},Oe=(H,Se)=>H==="prev"&&xe?xe(Se):H==="next"&&Te?Te(Se):De?De({...Se,dir:H}):At({...Se,dir:H}),Ye=Oe("prev",{ref:k,hidden:z,disabled:lt,onClick:de("prev",z),createRipple:O,className:Ct}),We=Oe("next",{ref:p,hidden:z,disabled:Ge,onClick:de("next",z),createRipple:O,className:kt});return jsxs(Fragment,{children:[Ye,We]})}var hs=5;function Kn(n){if(typeof n=="string")return n;if(typeof n=="function"){let o=n;return o.displayName||o.name||"anonymous"}if(typeof n=="symbol")return String(n);if(n&&typeof n=="object"){let o=n;if(typeof o.displayName=="string"&&o.displayName.length>0)return o.displayName;if(o.render)return Kn(o.render);if(o.type)return Kn(o.type);if(o.$$typeof)return o.$$typeof.toString()}return "unknown"}function ys(n){if(!n||typeof n!="object")return false;let o=Object.getPrototypeOf(n);return o===Object.prototype||o===null}function Ht(n,o=0){if(o>hs)return "[depth]";if(n==null)return String(n);switch(typeof n){case "string":return JSON.stringify(n);case "number":case "bigint":case "boolean":return String(n);case "undefined":return "undefined";case "function":return `[fn:${n.name||"anonymous"}]`;case "symbol":return n.toString();}if(Array.isArray(n))return `[${n.map(f=>Ht(f,o+1)).join(",")}]`;if(isValidElement(n)){let f=n.props??{},y=Kn(n.type),I=Object.entries(f).filter(([B])=>B!=="children").sort(([B],[$])=>B.localeCompare($)).map(([B,$])=>`${B}:${Ht($,o+1)}`).join(","),T=Ht(f.children,o+1);return `<${y} key=${String(n.key??"")} props={${I}} children=${T}>`}return ys(n)?`{${Object.entries(n).sort(([f],[y])=>f.localeCompare(y)).map(([f,y])=>`${f}:${Ht(y,o+1)}`).join(",")}}`:`[obj:${n.constructor?.name??"object"}]`}function Zr(n){return Children.toArray(n).map(o=>Ht(o)).join("|")}var Mt=(n,o,u)=>Math.max(o,Math.min(u,n));function vs(n,o){return a$7({ownerWindow:o,axis:n})}function ws(n){return n.readyState>=2||n.error?Promise.resolve():new Promise(o=>{let u=()=>{n.removeEventListener("loadeddata",u),n.removeEventListener("error",u),o();};n.addEventListener("loadeddata",u),n.addEventListener("error",u);})}function Wn({children:n,position:o,thumbSize:u,className:f$3,style:y,thumbnailWidth:I,thumbnailHeight:T,indexChannel:B,onSelectThumb:$,thumbnailsCenter:a,thumbnailsContainerWidth:U,thumbnailsContainerHeight:P,thumbnailsContainerClassName:k,thumbnailsContainerStyle:p,thumbnailItemClassName:O,thumbnailItemStyle:ee,gap:me=8,freeScroll:Xe=true,groupCells:Be=false,loop:Pe=false,direction:qe="ltr",skipSnaps:xe=false,centerActiveThumb:Te=false,selectDuration:De=25,freeScrollDuration:it=43,sliderFriction:$e=.68,loadingOptions:Wt,introOptions:ct,introUnlocked:z,breakpointMap:lt={xs:0,sm:640,md:768,lg:1024,xl:1280},rippleEnabled:Ge,rippleClassName:Ce,showArrows:Tt=false,arrowStyles:Ct,arrowClassName:kt,prevArrowStyles:de,prevArrowClassName:At,nextArrowStyles:Oe,nextArrowClassName:Ye,renderArrows:We,renderPrevArrow:H,renderNextArrow:Se,onReadyChange:Je,crossfade:Fe}){let m$1=o==="top"||o==="bottom",V=a$4(m$1),ke=qe==="rtl",fe=m$1&&ke?-1:1,Q=useRef(null),te=useRef(null),Vt=useMemo(()=>a$1("rmg-thumb-core-",{direction:qe,position:o,thumbSize:u,thumbnailHeight:T,thumbnailWidth:I}),[qe,o,u,T,I]),Lt=useRef(B??d$1()),[ut,so]=useState(u??0),[ao,io]=useState(0),[K,co]=useState(0),[X,lo]=useState(0),ze=useRef(null),_t=useRef(null),mt=useRef(null),pe=useRef(null),_=useRef(null),Ut=useRef(null),ve=useRef(null),Qe=useRef(null),Et=useRef(null),fn=useRef(null),pn=useRef(false),Xt=useRef(null),qt=useRef(null),bn=useRef([]),Ze=useRef("base"),Ae=useRef(false),Vn=useRef(false),gn=useRef(true),et=useRef(0),_n=useRef(0),uo=useRef(0),mo=useRef(null),fo=useRef(0),Le=useRef(0),hn=useRef(Lt.current.get().index??0),Gt=useRef(false),Un=Children.toArray(n).filter(isValidElement),He=Un.length,dt=useRef(0),po=useRef(null),[Xn,bo]=useState(false),[tt,yn]=useState(false),[qn,Yt]=useState(false),be=useRef(null),Jt=useRef(false),go=useRef(0),xn=useRef(null),ho=useRef([]),yo=useRef(0),xo=useRef(null),Qt=useRef(null),ft=useRef(null),Ke=useRef(null),Gn=useRef(null),[It,So]=useState(0),Yn=useRef(null),[Zt,vo]=useState(0),Jn=useRef(""),[h$3,wo]=useState(false),Qn=useRef(false),en=useRef(0),Sn=useRef(1),Ve=useRef(null),tn=useRef([]),[nt,Zn]=useState([]),er=useRef(""),Z=useRef([]),[pt,Ro]=useState(false),tr=useRef([]),re=useRef(0),[bt,nr]=useState(false),nn=useRef(false),Mo=useRef(-1),rn="data-rmg-drag",vn=useRef(null),rr=useRef(null),wn=useRef(false),or=useRef(Je),A=useMemo(()=>({main:m$1?"x":"y",cross:m$1?"y":"x",sizeKey:m$1?"width":"height",clientKey:m$1?"clientWidth":"clientHeight",startKey:m$1?"left":"top",endKey:m$1?"right":"bottom",translate:x=>m$1?`translate3d(${x}px,0,0)`:`translate3d(0,${x}px,0)`,place:x=>m$1?`translateX(${x}px) scale(var(--rmg-scale, 1))`:`translateY(${x}px) scale(var(--rmg-scale, 1))`,wheelDelta:x=>m$1?x.deltaX:x.deltaY}),[o]),{wheelLockMs:sr,lockWheelFor:Nt,unlockWheelNow:ar,markWheelSeen:To,isWheelLocked:Co}=j();useEffect(()=>{or.current=Je;},[Je]),useEffect(()=>{or.current?.(tt);},[tt]);let ko=300;function Rn(){ar(),Nt(ko);}a$5(true,Q,()=>bo(true),{root:null,rootMargin:"200px 0px 200px 0px",threshold:.01});function Mn(e){Yn.current!==e&&(Yn.current=e,wo(e),Qn.current=e,nn.current&&(nn.current=false,nr(false)),yn(false),Yt(false),Jt.current=false,So(t=>t+1));}function Ao(e,t){return (e%t+t)%t}function Tn(e){let t=Ve.current;if(!t?.originals?.length)return 0;let r=t.originals[e];if(!r)return 0;let s=t.cw||X||0,c=r.size,d=r.start-(s-c)/2;if(!h$3){let g=Math.max(0,K-s);return Mt(d,0,g)}let b=K||re.current||0;return b?Ao(d,b):0}function Cn(e){let t=pe.current;if(!t)return;let r=-e;if(!h$3){t.set(r);return}let s=K||re.current||0;if(!s){t.set(r);return}let c=t.get(),d=r,b=r+s,g=r-s,C=Math.abs(d-c)<=Math.abs(b-c)&&Math.abs(d-c)<=Math.abs(g-c)?d:Math.abs(b-c)<=Math.abs(g-c)?b:g;t.set(C);}function on(e,t,r,s){return jsx("div",{"data-rmg-thumb-index":String(r),ref:c=>{c&&(tn.current.some(d=>d.element===c)||tn.current.push({element:c,index:s}));},style:{position:"absolute",top:0,left:0,width:I,height:T,cursor:"pointer",userSelect:"none",...ee||{}},className:[vt.thumb,O].filter(Boolean).join(" "),draggable:false,children:e},t)}function Lo(e,t){return `${e}|per=${t}|wrap=${h$3?1:0}`}useEffect(()=>{let e=te.current;if(!e)return;let t=new ResizeObserver(()=>{let r=Children.toArray(n).filter(isValidElement),s=r.length;if(s<1){en.current=0,tn.current=[],Zn([]),re.current=0,Ve.current=null,bn.current=[],Mn(false),Z.current=[],tr.current=[];return}let c=Array.from(e.children),d=en.current,b=d,g=c.slice(d,c.length-b),C=e[A.clientKey],x=0,q=0;for(let F of g){let w=F.getBoundingClientRect()[A.sizeKey];if(w===0){requestAnimationFrame(()=>t.observe(e));return}if(x+w<=C)x+=w,q++;else {q++;break}}let ne=Math.max(2,Math.min(s,q)),ge=h$3;en.current=ge?ne:0,Sn.current!==ne&&(Sn.current=ne);let Ee=Lo(s,ne);if(Ee===er.current)return;er.current=Ee;let ie=[];tn.current=[],ge&&ie.push(...r.slice(-ne).map((F,w)=>{let v=s-ne+w,j=-ne+w;return on(F,`before-${w}`,v,j)})),ie.push(...r.map((F,w)=>{let v=w,j=w;return on(F,`original-${w}`,v,j)})),ge&&ie.push(...r.slice(0,ne).map((F,w)=>{let v=w,j=w;return on(F,`after-${w}`,v,j)})),Zn(ie);});return t.observe(e),()=>t.disconnect()},[n,It,h$3,me,u,ut,I,T,O,ee,o]);function Eo(e){let t=te.current;if(!t)return -1;let r=e;if(!r)return -1;let s=r.closest?.("[data-rmg-thumb-index]");if(!s||!t.contains(s))return -1;let c=s.getAttribute("data-rmg-thumb-index"),d=c!=null?parseInt(c,10):-1;return Number.isFinite(d)?d:-1}function Io(e){if(e<0||e>=He)return;Rn();let t=lr(e);Ze.current="thumb",wn.current=true,hn.current=e,Le.current=t,Ke.current?.set(t),Bt(e);let r=Te?Tn(e):Z.current[t]?.target??0;Dt(r);let s=!!Fe?.enabled;$?.(e,{transition:s?"crossfade":"scroll",crossfade:Fe});}useEffect(()=>{if(!a){dt.current=0;return}!K||!X||(K<=X?dt.current=(X-K)/2:dt.current=0);},[a,K,X]),useEffect(()=>{let e=te.current,t=Q.current;if(!e||!t)return;let r=()=>{s();};function s(){let b=te.current,g=Q.current;if(!b||!g)return;let C=Array.from(b.children);if(C.length===0)return;let x=C.map(D=>D.getBoundingClientRect()[A.sizeKey]);if(x.some(D=>D===0)){setTimeout(s,0);return}let q=en.current,ge=-(x.slice(0,q).reduce((D,oe)=>D+oe,0)+me*q);C.forEach((D,oe)=>{D.style.transformOrigin="center",D.style.transform=A.place(ge*fe),ge+=x[oe]+me;});let Ee=x.slice(q,x.length-q),ie=0,F=C.slice(q,C.length-q).map((D,oe)=>{let he=Ee[oe],R=ie,M=ie+he;return ie+=he+me,{el:D,start:R,end:M,size:he}});Ve.current={originals:F,cw:b[A.clientKey]};let w=b[A.clientKey],v=Ve.current?.originals?.length??0,j=F[v-1]?.end??0,we=m({loop:Pe,itemCount:v,span:j,viewport:w});re.current=h$2({baseSpan:j,gap:me,shouldLoop:we}),co(re.current),lo(w);let gt=F[0]?.el;if(gt){let D=gt.getBoundingClientRect(),oe=D[A.sizeKey],he=A.main==="x"?D.height:D.width;so(oe||u||0),io(he||0);}let rt=`${F.map(D=>`${e$3(D.start)}:${e$3(D.size)}`).join(",")}|gap=${me}|cw=${e$3(w)}|W=${e$3(j)}|wrap=${we?1:0}`;rt!==Jn.current&&(Jn.current=rt,vo(D=>D+1)),Mn(we),Ro(true);}let c=new ResizeObserver(r);c.observe(e),c.observe(t);let d=typeof window<"u"?window.visualViewport:null;return d?.addEventListener("resize",r),window.addEventListener("resize",r,{passive:true}),r(),()=>{c.disconnect(),d?.removeEventListener("resize",r),window.removeEventListener("resize",r);}},[nt,me,h$3,Pe,A,fe,o]);let ir=useMemo(()=>Zr(n),[n]),sn=useMemo(()=>`${ir}|build=${It}|wrap=${h$3?1:0}|clones=${nt.length}`,[It,nt.length,ir,h$3]),cr=useRef("");useEffect(()=>{cr.current!==sn&&(cr.current=sn,Jt.current=false,yn(false),Yt(false),be.current!=null&&(cancelAnimationFrame(be.current),be.current=null));},[sn]),useEffect(()=>{let e=te.current;if(!e)return;let t=false,r=Array.from(e.querySelectorAll("img,video"));return r.length===0?(Yt(true),()=>{t=true;}):(Promise.all(r.map(s=>s instanceof HTMLImageElement?f(s):ws(s))).then(()=>{t||Yt(true);}),()=>{t=true;})},[sn]),useEffect(()=>{be.current!=null&&(cancelAnimationFrame(be.current),be.current=null);let e=Q.current,t=te.current;if(e&&t&&pt&&bt&&qn&&re.current>0&&Z.current.length>0&&(u||ut)&&!(tt&&Jt.current))return be.current=requestAnimationFrame(()=>{be.current=requestAnimationFrame(()=>{Jt.current=true,yn(true),be.current=null;});}),()=>{be.current!=null&&(cancelAnimationFrame(be.current),be.current=null);}},[pt,bt,Zt,It,h$3,He,K,X,qn,ut,u,o,tt]);let No=()=>(Z.current||[]).map(e=>e.target),Bo=()=>re.current||0;useEffect(()=>{let e=te.current;if(!e)return;let t=false,r=null,s=0,c=5;function d(){t||s++>=c||(r!=null&&window.clearTimeout(r),r=window.setTimeout(()=>{ne();},0));}let g=Children.toArray(n).filter(isValidElement).length,C=h$3?Sn.current:0,x=C,q=e[A.clientKey];function ne(){if(t||!e)return;let ge=Array.from(e.children),Ee=ge.slice(C,ge.length-x),ie=new Map(Ee.map((R,M)=>[R,M])),F=e.getBoundingClientRect()[A.startKey],w=Ee.map(R=>{let M=R.getBoundingClientRect();return {el:R,start:M[A.startKey]-F,end:M[A.endKey]-F}}),v=[],j=0;if(Be)for(;j<g;){let R=w[j]?.start??0,M=R+q,E=j;for(;E<g&&(w[E]?.end??0)<=M;)E++;E===j&&E++;let G=Ee.slice(j,E),ye=E>=g,Re=R;ye&&!h$3&&(Re=Math.max(0,(re.current||0)-q)),j===0&&(Re=0),v.push({els:G,target:Re}),j=E;}else {let R=Ve.current;if(!R||!R.originals?.length){d();return}let M=R.originals,E=R.cw,G=Math.max(0,(re.current||0)-E),ye=.5;if(h$3)M.forEach((Re,_e)=>{let ot=_e===0?0:Re.start;v.push({els:[Re.el],target:ot});});else {for(let Y=0;Y<M.length;Y++){let je=M[Y],se=Y===0?0:je.start;if(se=Math.min(se,G),(!v.length||Math.abs(se-v[v.length-1].target)>ye)&&v.push({els:[je.el],target:se}),Math.abs(se-G)<=ye)break}let Re=G-ye,_e=G+E+ye,ot=M.filter(Y=>Y.start<_e&&Y.end>Re).map(Y=>Y.el);if(ot.length){let Y=v[v.length-1]?.target??-1;if(Math.abs(Y-G)>ye)v.push({els:ot,target:G});else {let je=new Set(v[v.length-1].els.concat(ot));v[v.length-1].els=Array.from(je);}}else {let Y=-1;for(let se=M.length-1;se>=0;se--)if(M[se].start<=G+ye){Y=se;break}let je=M[Math.max(0,Y)];if(je){let se=v[v.length-1]?.target??-1;Math.abs(se-G)>ye&&v.push({els:[je.el],target:G});}}}}let we=v.map(R=>({target:R.target,cells:R.els.map(M=>({element:M,index:ie.get(M)}))}));if(bn.current=v.map(R=>{let M=R.els.map(E=>ie.get(E)).filter(E=>typeof E=="number");return M.length?{startIndex:Math.min(...M),endIndex:Math.max(...M)+1,targetScroll:R.target}:null}).filter(R=>R!==null),we.some(R=>Number.isNaN(R.target))||h$3&&we.length===1){d();return}let rt=Ve.current?.originals??[],D=rt[rt.length-1]?.end??0,oe=m({loop:Pe,itemCount:we.length,span:D,viewport:q});if(oe!==h$3){Mn(oe);return}Qn.current=oe,Z.current=we,nn.current||(nn.current=true,nr(true));let he=[];we.forEach((R,M)=>{R.cells.forEach(E=>{he[E.index]=M;});}),tr.current=he;}return ne(),()=>{t=true,r!=null&&window.clearTimeout(r);}},[nt,Zt,o]);function Po(e){let t=bn.current;if(!t.length)return null;for(let r=0;r<t.length;r++){let s=t[r];if(e>=s.startIndex&&e<s.endIndex)return s}return t[t.length-1]??null}function kn(e){if(Te)return Tn(e);if(Be&&!Xe&&Ze.current==="thumb"){let t=Po(e);if(t)return t.targetScroll}return Ze.current==="thumb"?Fo(e):Oo(e)}function Bt(e){let t=te.current;if(!t)return;let r=Array.from(t.children);for(let d of r)d.removeAttribute("data-active");let s=String(e);t.querySelectorAll(`[data-rmg-thumb-index="${CSS.escape(s)}"]`).forEach(d=>d.setAttribute("data-active","true")),Mo.current=e;}function Do(e){let t="rmg-drag-style-"+e;if(document.getElementById(t))return;let r=document.createElement("style");r.id=t,r.textContent=`
|
|
1
|
+
import {a as a$6}from'./chunk-R6EGYRTJ.mjs';import {a as a$4}from'./chunk-P2GQPFSL.mjs';import {c as c$1,d as d$1,m,h as h$2,e as e$3}from'./chunk-VPFAU2TE.mjs';import {j,f as f$1,h,g,c as c$2,b as b$4,a as a$8,e as e$2,d as d$3}from'./chunk-4NT4UVB5.mjs';import {d,e,c,a as a$3,b as b$2}from'./chunk-Z34PSRMG.mjs';import {b as b$3,d as d$2,c as c$3,f as f$2,e as e$1,h as h$1,g as g$1,a as a$7}from'./chunk-HGY3QLCE.mjs';import {a as a$5}from'./chunk-X4HEGEZV.mjs';import {a as a$1}from'./chunk-UUAWLGWO.mjs';import {f}from'./chunk-NHIKOJLU.mjs';import {a as a$2}from'./chunk-LVYED5ZM.mjs';import {b}from'./chunk-UML6FCOQ.mjs';import {b as b$1}from'./chunk-B4CC5AGE.mjs';import {a,i}from'./chunk-HK2DPKES.mjs';import*as S from'react';import {useRef,useMemo,useState,Children,isValidElement,useEffect,cloneElement,useCallback}from'react';import {jsxs,Fragment,jsx}from'react/jsx-runtime';function mn(n){return n==="instant"?"instant":"animated"}function zt(n){return typeof n!="number"||!Number.isFinite(n)?null:n|0}function zn(n,o){if(!o)return n;let u=o(n);return zt(u)}function Hn(n){let{localChannel:o,externalChannel:u=null,clampIndex:f}=n,y=false,I=null,T=(P,k)=>{let p=o.get();p.index===P&&mn(p.mode)===k||o.set(P,k);},B=()=>{if(!u)return;let P=u.get?.(),k=zt(P?.index);if(k==null)return;let p=zn(k,f);p!=null&&T(p,mn(P?.mode));},$=()=>{I&&(I(),I=null),y=false;};return {start:()=>{if(y||(y=true,!u))return $;B();let P=[];return typeof u.onBasePointerDown=="function"&&typeof o.emitBasePointerDown=="function"&&P.push(u.onBasePointerDown(()=>{o.emitBasePointerDown?.();})),typeof u.onEvent=="function"?P.push(u.onEvent(k=>{if(!k||typeof k!="object")return;let p=mn(k.mode);if(k.type==="set"){let O=zt(k.index);if(O==null)return;let ee=zn(O,f);if(ee==null)return;T(ee,p);return}if(k.type==="bump"){let O=zt(k.delta);if(O==null||O===0)return;o.bump(O,p);}})):typeof u.subscribe=="function"&&P.push(u.subscribe(()=>{B();})),I=()=>{P.forEach(k=>k());},$},stop:$,publishThumbnailClick:(P,k="animated",p={source:"thumbnail",transition:"scroll"})=>{if(!u)return;let O=zt(P);if(O==null)return;let ee=zn(O,f);ee!=null&&u.set(ee,mn(k),{meta:p});}}}var Ne={thumbShell:"ur",thumbContentLayer:"yr",thumbContentBlocked:"xr",thumbLoadingLayer:"T",thumbLoadingLayerCompare:"kr",thumbLoadingLayerExit:"wr",thumbSkeletonOverlay:"j",thumbSkeletonRow:"zr",thumbSkeleton:"a"};var vt={thumb:"Y",fadeInStart:"Xr",fadeInActive:"Z",fade_container:"V",ripple:"q"};function ls({axisMain:n,direction:o,size:u=32}){let f=jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6z"}),y=jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6z"});return n==="y"?jsx("svg",{viewBox:"0 0 24 24",width:u,height:u,fill:"#000",xmlns:"http://www.w3.org/2000/svg","aria-hidden":true,style:{transform:"rotate(90deg)",transformOrigin:"50% 50%"},children:o==="prev"?f:y}):jsx("svg",{viewBox:"0 0 24 24",width:u,height:u,fill:"#000",xmlns:"http://www.w3.org/2000/svg","aria-hidden":true,children:o==="prev"?f:y})}var us={position:"absolute",overflow:"hidden",backgroundColor:"rgba(255, 255, 255, 0.75)",boxShadow:"0 0 5px rgba(0, 0, 0, 0.5)",borderRadius:"100%",zIndex:2,width:36,height:36,display:"flex",justifyContent:"center",alignItems:"center",transition:"opacity 120ms"};function ms(n){return n==="y"?{left:"50%",top:10,transform:"translateX(-50%)"}:{left:10,top:"50%",transform:"translateY(-50%)"}}function ds(n){return n==="y"?{left:"50%",bottom:10,transform:"translateX(-50%)"}:{right:10,top:"50%",transform:"translateY(-50%)"}}function Qr(n){let{axisMain:o,clientKey:u,wrap:f,isRtl:y,showArrows:I,selectedIndex:T,slideCount:B,measureRef:$,viewportMainSizeRef:a,previous:U,next:P,prevButtonRef:k,nextButtonRef:p,createRipple:O,arrowStyles:ee,prevArrowStyles:me,nextArrowStyles:Xe,arrowClassName:Be,prevArrowClassName:Pe,nextArrowClassName:qe,renderPrevArrow:xe,renderNextArrow:Te,renderArrows:De}=n,it=!f&&T<=0,$e=!f&&T>=Math.max(0,B-1),Wt=$.current?$.current[u]:0,ct=!(B>1&&$.current&&a.current>Wt),z=!I||ct,lt=z||!f&&(y?$e:it),Ge=z||!f&&(y?it:$e),Ce={...ee??{},...me??{}},Tt={...ee??{},...Xe??{}},Ct=[Be,Pe].filter(Boolean).join(" "),kt=[Be,qe].filter(Boolean).join(" ");function de(H,Se){return ()=>{Se||requestAnimationFrame(()=>{H==="prev"?U():P();});}}let At=({dir:H,ref:Se,onClick:Je,hidden:Fe,disabled:m,className:V})=>{let ke=m?.35:1,fe=H==="prev"?ms(o):ds(o),Q=H==="prev"?Ce:Tt;return jsx("div",{ref:Se,className:`rmgArrow rmgArrow--${H} ${V??""}`,onClick:te=>{Fe||(O(te.currentTarget),requestAnimationFrame(()=>Je()));},style:{...us,...fe,...Q,cursor:m?"default":"pointer",opacity:Fe?0:ke,pointerEvents:Fe?"none":"auto",visibility:Fe?"hidden":"visible"},"aria-label":H==="prev"?"Previous slide":"Next slide",role:"button",title:m?H==="prev"?"At first slide":"At last slide":H==="prev"?"Previous":"Next",children:jsx(ls,{axisMain:o,direction:H,size:32})})},Oe=(H,Se)=>H==="prev"&&xe?xe(Se):H==="next"&&Te?Te(Se):De?De({...Se,dir:H}):At({...Se,dir:H}),Ye=Oe("prev",{ref:k,hidden:z,disabled:lt,onClick:de("prev",z),createRipple:O,className:Ct}),We=Oe("next",{ref:p,hidden:z,disabled:Ge,onClick:de("next",z),createRipple:O,className:kt});return jsxs(Fragment,{children:[Ye,We]})}var hs=5;function Kn(n){if(typeof n=="string")return n;if(typeof n=="function"){let o=n;return o.displayName||o.name||"anonymous"}if(typeof n=="symbol")return String(n);if(n&&typeof n=="object"){let o=n;if(typeof o.displayName=="string"&&o.displayName.length>0)return o.displayName;if(o.render)return Kn(o.render);if(o.type)return Kn(o.type);if(o.$$typeof)return o.$$typeof.toString()}return "unknown"}function ys(n){if(!n||typeof n!="object")return false;let o=Object.getPrototypeOf(n);return o===Object.prototype||o===null}function Ht(n,o=0){if(o>hs)return "[depth]";if(n==null)return String(n);switch(typeof n){case "string":return JSON.stringify(n);case "number":case "bigint":case "boolean":return String(n);case "undefined":return "undefined";case "function":return `[fn:${n.name||"anonymous"}]`;case "symbol":return n.toString();}if(Array.isArray(n))return `[${n.map(f=>Ht(f,o+1)).join(",")}]`;if(isValidElement(n)){let f=n.props??{},y=Kn(n.type),I=Object.entries(f).filter(([B])=>B!=="children").sort(([B],[$])=>B.localeCompare($)).map(([B,$])=>`${B}:${Ht($,o+1)}`).join(","),T=Ht(f.children,o+1);return `<${y} key=${String(n.key??"")} props={${I}} children=${T}>`}return ys(n)?`{${Object.entries(n).sort(([f],[y])=>f.localeCompare(y)).map(([f,y])=>`${f}:${Ht(y,o+1)}`).join(",")}}`:`[obj:${n.constructor?.name??"object"}]`}function Zr(n){return Children.toArray(n).map(o=>Ht(o)).join("|")}var Mt=(n,o,u)=>Math.max(o,Math.min(u,n));function vs(n,o){return a$7({ownerWindow:o,axis:n})}function ws(n){return n.readyState>=2||n.error?Promise.resolve():new Promise(o=>{let u=()=>{n.removeEventListener("loadeddata",u),n.removeEventListener("error",u),o();};n.addEventListener("loadeddata",u),n.addEventListener("error",u);})}function Wn({children:n,position:o,thumbSize:u,className:f$3,style:y,thumbnailWidth:I,thumbnailHeight:T,indexChannel:B,onSelectThumb:$,thumbnailsCenter:a,thumbnailsContainerWidth:U,thumbnailsContainerHeight:P,thumbnailsContainerClassName:k,thumbnailsContainerStyle:p,thumbnailItemClassName:O,thumbnailItemStyle:ee,gap:me=8,freeScroll:Xe=true,groupCells:Be=false,loop:Pe=false,direction:qe="ltr",skipSnaps:xe=false,centerActiveThumb:Te=false,selectDuration:De=25,freeScrollDuration:it=43,sliderFriction:$e=.68,loadingOptions:Wt,introOptions:ct,introUnlocked:z,breakpointMap:lt={xs:0,sm:640,md:768,lg:1024,xl:1280},rippleEnabled:Ge,rippleClassName:Ce,showArrows:Tt=false,arrowStyles:Ct,arrowClassName:kt,prevArrowStyles:de,prevArrowClassName:At,nextArrowStyles:Oe,nextArrowClassName:Ye,renderArrows:We,renderPrevArrow:H,renderNextArrow:Se,onReadyChange:Je,crossfade:Fe}){let m$1=o==="top"||o==="bottom",V=a$4(m$1),ke=qe==="rtl",fe=m$1&&ke?-1:1,Q=useRef(null),te=useRef(null),Vt=useMemo(()=>a$1("rmg-thumb-core-",{direction:qe,position:o,thumbSize:u,thumbnailHeight:T,thumbnailWidth:I}),[qe,o,u,T,I]),Lt=useRef(B??d$1()),[ut,so]=useState(u??0),[ao,io]=useState(0),[K,co]=useState(0),[X,lo]=useState(0),ze=useRef(null),_t=useRef(null),mt=useRef(null),pe=useRef(null),_=useRef(null),Ut=useRef(null),ve=useRef(null),Qe=useRef(null),Et=useRef(null),fn=useRef(null),pn=useRef(false),Xt=useRef(null),qt=useRef(null),bn=useRef([]),Ze=useRef("base"),Ae=useRef(false),Vn=useRef(false),gn=useRef(true),et=useRef(0),_n=useRef(0),uo=useRef(0),mo=useRef(null),fo=useRef(0),Le=useRef(0),hn=useRef(Lt.current.get().index??0),Gt=useRef(false),Un=Children.toArray(n).filter(isValidElement),He=Un.length,dt=useRef(0),po=useRef(null),[Xn,bo]=useState(false),[tt,yn]=useState(false),[qn,Yt]=useState(false),be=useRef(null),Jt=useRef(false),go=useRef(0),xn=useRef(null),ho=useRef([]),yo=useRef(0),xo=useRef(null),Qt=useRef(null),ft=useRef(null),Ke=useRef(null),Gn=useRef(null),[It,So]=useState(0),Yn=useRef(null),[Zt,vo]=useState(0),Jn=useRef(""),[h$3,wo]=useState(false),Qn=useRef(false),en=useRef(0),Sn=useRef(1),Ve=useRef(null),tn=useRef([]),[nt,Zn]=useState([]),er=useRef(""),Z=useRef([]),[pt,Ro]=useState(false),tr=useRef([]),re=useRef(0),[bt,nr]=useState(false),nn=useRef(false),Mo=useRef(-1),rn="data-rmg-drag",vn=useRef(null),rr=useRef(null),wn=useRef(false),or=useRef(Je),A=useMemo(()=>({main:m$1?"x":"y",cross:m$1?"y":"x",sizeKey:m$1?"width":"height",clientKey:m$1?"clientWidth":"clientHeight",startKey:m$1?"left":"top",endKey:m$1?"right":"bottom",translate:x=>m$1?`translate3d(${x}px,0,0)`:`translate3d(0,${x}px,0)`,place:x=>m$1?`translateX(${x}px) scale(var(--rmg-scale, 1))`:`translateY(${x}px) scale(var(--rmg-scale, 1))`,wheelDelta:x=>m$1?x.deltaX:x.deltaY}),[o]),{wheelLockMs:sr,lockWheelFor:Nt,unlockWheelNow:ar,markWheelSeen:To,isWheelLocked:Co}=j();useEffect(()=>{or.current=Je;},[Je]),useEffect(()=>{or.current?.(tt);},[tt]);let ko=300;function Rn(){ar(),Nt(ko);}a$5(true,Q,()=>bo(true),{root:null,rootMargin:"200px 0px 200px 0px",threshold:.01});function Mn(e){Yn.current!==e&&(Yn.current=e,wo(e),Qn.current=e,nn.current&&(nn.current=false,nr(false)),yn(false),Yt(false),Jt.current=false,So(t=>t+1));}function Ao(e,t){return (e%t+t)%t}function Tn(e){let t=Ve.current;if(!t?.originals?.length)return 0;let r=t.originals[e];if(!r)return 0;let s=t.cw||X||0,c=r.size,d=r.start-(s-c)/2;if(!h$3){let g=Math.max(0,K-s);return Mt(d,0,g)}let b=K||re.current||0;return b?Ao(d,b):0}function Cn(e){let t=pe.current;if(!t)return;let r=-e;if(!h$3){t.set(r);return}let s=K||re.current||0;if(!s){t.set(r);return}let c=t.get(),d=r,b=r+s,g=r-s,C=Math.abs(d-c)<=Math.abs(b-c)&&Math.abs(d-c)<=Math.abs(g-c)?d:Math.abs(b-c)<=Math.abs(g-c)?b:g;t.set(C);}function on(e,t,r,s){return jsx("div",{"data-rmg-thumb-index":String(r),ref:c=>{c&&(tn.current.some(d=>d.element===c)||tn.current.push({element:c,index:s}));},style:{position:"absolute",top:0,left:0,width:I,height:T,cursor:"pointer",userSelect:"none",...ee||{}},className:[vt.thumb,O].filter(Boolean).join(" "),draggable:false,children:e},t)}function Lo(e,t){return `${e}|per=${t}|wrap=${h$3?1:0}`}useEffect(()=>{let e=te.current;if(!e)return;let t=new ResizeObserver(()=>{let r=Children.toArray(n).filter(isValidElement),s=r.length;if(s<1){en.current=0,tn.current=[],Zn([]),re.current=0,Ve.current=null,bn.current=[],Mn(false),Z.current=[],tr.current=[];return}let c=Array.from(e.children),d=en.current,b=d,g=c.slice(d,c.length-b),C=e[A.clientKey],x=0,q=0;for(let F of g){let w=F.getBoundingClientRect()[A.sizeKey];if(w===0){requestAnimationFrame(()=>t.observe(e));return}if(x+w<=C)x+=w,q++;else {q++;break}}let ne=Math.max(2,Math.min(s,q)),ge=h$3;en.current=ge?ne:0,Sn.current!==ne&&(Sn.current=ne);let Ee=Lo(s,ne);if(Ee===er.current)return;er.current=Ee;let ie=[];tn.current=[],ge&&ie.push(...r.slice(-ne).map((F,w)=>{let v=s-ne+w,j=-ne+w;return on(F,`before-${w}`,v,j)})),ie.push(...r.map((F,w)=>{let v=w,j=w;return on(F,`original-${w}`,v,j)})),ge&&ie.push(...r.slice(0,ne).map((F,w)=>{let v=w,j=w;return on(F,`after-${w}`,v,j)})),Zn(ie);});return t.observe(e),()=>t.disconnect()},[n,It,h$3,me,u,ut,I,T,O,ee,o]);function Eo(e){let t=te.current;if(!t)return -1;let r=e;if(!r)return -1;let s=r.closest?.("[data-rmg-thumb-index]");if(!s||!t.contains(s))return -1;let c=s.getAttribute("data-rmg-thumb-index"),d=c!=null?parseInt(c,10):-1;return Number.isFinite(d)?d:-1}function Io(e){if(e<0||e>=He)return;Rn();let t=lr(e);Ze.current="thumb",wn.current=true,hn.current=e,Le.current=t,Ke.current?.set(t),Bt(e);let r=Te?Tn(e):Z.current[t]?.target??0;Dt(r);let s=!!Fe?.enabled;$?.(e,{transition:s?"crossfade":"scroll",crossfade:Fe});}useEffect(()=>{if(!a){dt.current=0;return}!K||!X||(K<=X?dt.current=(X-K)/2:dt.current=0);},[a,K,X]),useEffect(()=>{let e=te.current,t=Q.current;if(!e||!t)return;let r=()=>{s();};function s(){let b=te.current,g=Q.current;if(!b||!g)return;let C=Array.from(b.children);if(C.length===0)return;let x=C.map(D=>D.getBoundingClientRect()[A.sizeKey]);if(x.some(D=>D===0)){setTimeout(s,0);return}let q=en.current,ge=-(x.slice(0,q).reduce((D,oe)=>D+oe,0)+me*q);C.forEach((D,oe)=>{D.style.transformOrigin="center",D.style.transform=A.place(ge*fe),ge+=x[oe]+me;});let Ee=x.slice(q,x.length-q),ie=0,F=C.slice(q,C.length-q).map((D,oe)=>{let he=Ee[oe],R=ie,M=ie+he;return ie+=he+me,{el:D,start:R,end:M,size:he}});Ve.current={originals:F,cw:b[A.clientKey]};let w=b[A.clientKey],v=Ve.current?.originals?.length??0,j=F[v-1]?.end??0,we=m({loop:Pe,itemCount:v,span:j,viewport:w});re.current=h$2({baseSpan:j,gap:me,shouldLoop:we}),co(re.current),lo(w);let gt=F[0]?.el;if(gt){let D=gt.getBoundingClientRect(),oe=D[A.sizeKey],he=A.main==="x"?D.height:D.width;so(oe||u||0),io(he||0);}let rt=`${F.map(D=>`${e$3(D.start)}:${e$3(D.size)}`).join(",")}|gap=${me}|cw=${e$3(w)}|W=${e$3(j)}|wrap=${we?1:0}`;rt!==Jn.current&&(Jn.current=rt,vo(D=>D+1)),Mn(we),Ro(true);}let c=new ResizeObserver(r);c.observe(e),c.observe(t);let d=typeof window<"u"?window.visualViewport:null;return d?.addEventListener("resize",r),window.addEventListener("resize",r,{passive:true}),r(),()=>{c.disconnect(),d?.removeEventListener("resize",r),window.removeEventListener("resize",r);}},[nt,me,h$3,Pe,A,fe,o]);let ir=useMemo(()=>Zr(n),[n]),sn=useMemo(()=>`${ir}|build=${It}|wrap=${h$3?1:0}|clones=${nt.length}`,[It,nt.length,ir,h$3]),cr=useRef("");useEffect(()=>{cr.current!==sn&&(cr.current=sn,Jt.current=false,yn(false),Yt(false),be.current!=null&&(cancelAnimationFrame(be.current),be.current=null));},[sn]),useEffect(()=>{let e=te.current;if(!e)return;let t=false,r=Array.from(e.querySelectorAll("img,video"));return r.length===0?(Yt(true),()=>{t=true;}):(Promise.all(r.map(s=>s instanceof HTMLImageElement?f(s):ws(s))).then(()=>{t||Yt(true);}),()=>{t=true;})},[sn]),useEffect(()=>{be.current!=null&&(cancelAnimationFrame(be.current),be.current=null);let e=Q.current,t=te.current;if(e&&t&&pt&&bt&&qn&&re.current>0&&Z.current.length>0&&(u||ut)&&!(tt&&Jt.current))return be.current=requestAnimationFrame(()=>{be.current=requestAnimationFrame(()=>{Jt.current=true,yn(true),be.current=null;});}),()=>{be.current!=null&&(cancelAnimationFrame(be.current),be.current=null);}},[pt,bt,Zt,It,h$3,He,K,X,qn,ut,u,o,tt]);let No=()=>(Z.current||[]).map(e=>e.target),Bo=()=>re.current||0;useEffect(()=>{let e=te.current;if(!e)return;let t=false,r=null,s=0,c=5;function d(){t||s++>=c||(r!=null&&window.clearTimeout(r),r=window.setTimeout(()=>{ne();},0));}let g=Children.toArray(n).filter(isValidElement).length,C=h$3?Sn.current:0,x=C,q=e[A.clientKey];function ne(){if(t||!e)return;let ge=Array.from(e.children),Ee=ge.slice(C,ge.length-x),ie=new Map(Ee.map((R,M)=>[R,M])),F=e.getBoundingClientRect()[A.startKey],w=Ee.map(R=>{let M=R.getBoundingClientRect();return {el:R,start:M[A.startKey]-F,end:M[A.endKey]-F}}),v=[],j=0;if(Be)for(;j<g;){let R=w[j]?.start??0,M=R+q,E=j;for(;E<g&&(w[E]?.end??0)<=M;)E++;E===j&&E++;let G=Ee.slice(j,E),ye=E>=g,Re=R;ye&&!h$3&&(Re=Math.max(0,(re.current||0)-q)),j===0&&(Re=0),v.push({els:G,target:Re}),j=E;}else {let R=Ve.current;if(!R||!R.originals?.length){d();return}let M=R.originals,E=R.cw,G=Math.max(0,(re.current||0)-E),ye=.5;if(h$3)M.forEach((Re,_e)=>{let ot=_e===0?0:Re.start;v.push({els:[Re.el],target:ot});});else {for(let Y=0;Y<M.length;Y++){let je=M[Y],se=Y===0?0:je.start;if(se=Math.min(se,G),(!v.length||Math.abs(se-v[v.length-1].target)>ye)&&v.push({els:[je.el],target:se}),Math.abs(se-G)<=ye)break}let Re=G-ye,_e=G+E+ye,ot=M.filter(Y=>Y.start<_e&&Y.end>Re).map(Y=>Y.el);if(ot.length){let Y=v[v.length-1]?.target??-1;if(Math.abs(Y-G)>ye)v.push({els:ot,target:G});else {let je=new Set(v[v.length-1].els.concat(ot));v[v.length-1].els=Array.from(je);}}else {let Y=-1;for(let se=M.length-1;se>=0;se--)if(M[se].start<=G+ye){Y=se;break}let je=M[Math.max(0,Y)];if(je){let se=v[v.length-1]?.target??-1;Math.abs(se-G)>ye&&v.push({els:[je.el],target:G});}}}}let we=v.map(R=>({target:R.target,cells:R.els.map(M=>({element:M,index:ie.get(M)}))}));if(bn.current=v.map(R=>{let M=R.els.map(E=>ie.get(E)).filter(E=>typeof E=="number");return M.length?{startIndex:Math.min(...M),endIndex:Math.max(...M)+1,targetScroll:R.target}:null}).filter(R=>R!==null),we.some(R=>Number.isNaN(R.target))||h$3&&we.length===1){d();return}let rt=Ve.current?.originals??[],D=rt[rt.length-1]?.end??0,oe=m({loop:Pe,itemCount:we.length,span:D,viewport:q});if(oe!==h$3){Mn(oe);return}Qn.current=oe,Z.current=we,nn.current||(nn.current=true,nr(true));let he=[];we.forEach((R,M)=>{R.cells.forEach(E=>{he[E.index]=M;});}),tr.current=he;}return ne(),()=>{t=true,r!=null&&window.clearTimeout(r);}},[nt,Zt,o]);function Po(e){let t=bn.current;if(!t.length)return null;for(let r=0;r<t.length;r++){let s=t[r];if(e>=s.startIndex&&e<s.endIndex)return s}return t[t.length-1]??null}function kn(e){if(Te)return Tn(e);if(Be&&!Xe&&Ze.current==="thumb"){let t=Po(e);if(t)return t.targetScroll}return Ze.current==="thumb"?Fo(e):Oo(e)}function Bt(e){let t=te.current;if(!t)return;let r=Array.from(t.children);for(let d of r)d.removeAttribute("data-active");let s=String(e);t.querySelectorAll(`[data-rmg-thumb-index="${CSS.escape(s)}"]`).forEach(d=>d.setAttribute("data-active","true")),Mo.current=e;}function Do(e){let t="rmg-drag-style-"+e;if(document.getElementById(t))return;let r=document.createElement("style");r.id=t,r.textContent=`
|
|
2
2
|
/* Only while data-rmg-drag is present on this slider root */
|
|
3
3
|
[data-rmg-thumb-core-scope="${e}"][data-rmg-drag] { cursor: grabbing !important; }
|
|
4
4
|
[data-rmg-thumb-core-scope="${e}"][data-rmg-drag] * { cursor: grabbing !important; }
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-HK2DPKES.mjs';import {jsx}from'react/jsx-runtime';var h={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__",se="(font: -apple-system-body) and (-webkit-hyphens: none)";function ae(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),r=Math.max(t-o,0);return {lines:n,lineBoxHeight:t,barHeight:o,leading:r,paddingBlock:r/2,rowGap:r,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 v(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 le(e){let{barWidths:n,lineCount:t,finalBarWidthFallback:o}=e;return t<=0?[o]:n.length>=t?n.slice(0,t):Array.from({length:t},(r,i)=>i<n.length?n[i]:i===t-1?o:"100%")}function z(e){let n=ce(e.lines,1,e.minWidth,e.breakpointMap),t=ge(e.barHeight,typeof e.barHeight=="number"?e.barHeight:0,e.minWidth,e.breakpointMap),o=Se(e.lineHeight,typeof e.lineHeight=="number"?e.lineHeight:1,e.minWidth,e.breakpointMap),r=ke(e.lastBarWidth,R,e.minWidth,e.breakpointMap),i=xe(e.barWidth,"100%",e.minWidth,e.breakpointMap),s=e.barWidth==null?Array.from({length:n},(l,u)=>u===n-1?r:"100%"):Array.isArray(i)?i:Array.from({length:n},()=>i);return {lineCount:n,barWidths:le({barWidths:s,lineCount:n,finalBarWidthFallback:e.barWidth==null?r:"100%"}),metrics:ae({barHeight:t,lineHeight:o,lines:n})}}function ue(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 de(e,n=a$1){return v(e,n)}function pe(e,n=a$1){return v(e,n)}function he(e,n=a$1){return v(e,n)}function me(e,n=a$1){return v(e,n)}function fe(e,n=a$1){return v(e,n)}function A(e,n=1,t=a$1){if(!de(e,t))return [{minWidth:0,lines:k(typeof e=="number"?e:void 0,n)}];let o=Object.entries(e).map(([r,i])=>{let s=S(r,t);return s==null?null:{minWidth:s,lines:k(typeof i=="number"?i:Number(i),n)}}).filter(r=>!!r).sort((r,i)=>r.minWidth-i.minWidth).reduce((r,i)=>{let s=r[r.length-1];return s&&s.minWidth===i.minWidth?s.lines=i.lines:r.push(i),r},[]);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 E(e,n=0,t=a$1){if(!pe(e,t))return [{minWidth:0,barHeight:C(typeof e=="number"?e:void 0,n)}];let o=Object.entries(e).map(([r,i])=>{let s=S(r,t);return s==null?null:{minWidth:s,barHeight:C(typeof i=="number"?i:Number(i),n)}}).filter(r=>!!r).sort((r,i)=>r.minWidth-i.minWidth).reduce((r,i)=>{let s=r[r.length-1];return s&&s.minWidth===i.minWidth?s.barHeight=i.barHeight:r.push(i),r},[]);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 G(e,n=1,t=a$1){if(!he(e,t))return [{minWidth:0,lineHeight:w(typeof e=="number"?e:void 0,n)}];let o=Object.entries(e).map(([r,i])=>{let s=S(r,t);return s==null?null:{minWidth:s,lineHeight:w(typeof i=="number"?i:Number(i),n)}}).filter(r=>!!r).sort((r,i)=>r.minWidth-i.minWidth).reduce((r,i)=>{let s=r[r.length-1];return s&&s.minWidth===i.minWidth?s.lineHeight=i.lineHeight:r.push(i),r},[]);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 ce(e,n=1,t=0,o=a$1){let r=A(e,n,o),i=r[0]?.lines??k(void 0,n);for(let s of r)t>=s.minWidth&&(i=s.lines);return i}function ge(e,n=0,t=0,o=a$1){let r=E(e,n,o),i=r[0]?.barHeight??C(void 0,n);for(let s of r)t>=s.minWidth&&(i=s.barHeight);return i}function Se(e,n=1,t=0,o=a$1){let r=G(e,n,o),i=r[0]?.lineHeight??w(void 0,n);for(let s of r)t>=s.minWidth&&(i=s.lineHeight);return i}function xe(e,n="100%",t=0,o=a$1){let r=O(e,n,o),i=r[0]?.barWidth??b(n);for(let s of r)t>=s.minWidth&&(i=s.barWidth);return i}function O(e,n="100%",t=a$1){if(!me(e,t))return [{minWidth:0,barWidth:b(e??n)}];let o=Object.entries(e).map(([r,i])=>{let s=S(r,t);return s==null||i==null?null:{minWidth:s,barWidth:b(i)}}).filter(r=>!!r).sort((r,i)=>r.minWidth-i.minWidth).reduce((r,i)=>{let s=r[r.length-1];return s&&s.minWidth===i.minWidth?s.barWidth=i.barWidth:r.push(i),r},[]);return o.length===0?[{minWidth:0,barWidth:b(n)}]:(o[0].minWidth>0&&o.unshift({minWidth:0,barWidth:b(n)}),o)}function D(e,n=R,t=a$1){if(!fe(e,t))return [{minWidth:0,lastBarWidth:c(e??n)}];let o=Object.entries(e).map(([r,i])=>{let s=S(r,t);return s==null||i==null?null:{minWidth:s,lastBarWidth:c(i)}}).filter(r=>!!r).sort((r,i)=>r.minWidth-i.minWidth).reduce((r,i)=>{let s=r[r.length-1];return s&&s.minWidth===i.minWidth?s.lastBarWidth=i.lastBarWidth:r.push(i),r},[]);return o.length===0?[{minWidth:0,lastBarWidth:c(n)}]:(o[0].minWidth>0&&o.unshift({minWidth:0,lastBarWidth:c(n)}),o)}function ke(e,n=R,t=0,o=a$1){let r=D(e,n,o),i=r[0]?.lastBarWidth??c(n);for(let s of r)t>=s.minWidth&&(i=s.lastBarWidth);return i}function be(e){let n=new Set,t=e.breakpointMap??a$1;for(let r of E(e.barHeight,typeof e.barHeight=="number"?e.barHeight:0,t))n.add(r.minWidth);for(let r of A(e.lines,1,t))n.add(r.minWidth);for(let r of G(e.lineHeight,typeof e.lineHeight=="number"?e.lineHeight:1,t))n.add(r.minWidth);let o=e.barWidth!=null?O(e.barWidth,"100%",t):D(e.lastBarWidth,R,t);for(let r of o)n.add(r.minWidth);return Array.from(n).sort((r,i)=>r-i)}function H(e){let n=e.breakpointMap??a$1,t=e.responsiveBy??"viewport",r=be({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,breakpointMap:n}).reduce((l,u)=>{let p=z({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,minWidth:u,breakpointMap:n}),m=l[l.length-1];return m&&ue(m.state,p)||l.push({minWidth:u,state:p}),l},[]),i=r[0]?.state??z({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,minWidth:0,breakpointMap:n}),s=r.reduce((l,u)=>Math.max(l,u.state.lineCount),i.lineCount);return {baseState:i,states:r.length?r:[{minWidth:0,state:i}],maxLines:s,usesResponsiveBarCss:r.length>1,baseLines:i.lineCount,baseLastBarWidth:i.barWidths[i.lineCount-1]??R,metrics:i.metrics,responsiveBy:t}}function F(e){let n="renderState"in e?e.renderState:H({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:r,state:i})=>{let s=`${t} [data-rmg-skel-text-line="true"]`,l=`${s}:nth-child(-n+${i.lineCount})`,u=i.lineCount<n.maxLines?`${s}:nth-child(n+${i.lineCount+1})`:null,p=i.barWidths.map((g,y)=>o?`${s}:nth-child(${y+1}){width:${g} !important;max-width:${g} !important;}`:`${s}:nth-child(${y+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(i.metrics);return {minWidth:r,query:n.responsiveBy,css:[`${t}{height:${i.metrics.totalHeight}px !important;padding-block:${i.metrics.paddingBlock}px !important;row-gap:${i.metrics.rowGap}px !important;}`,`@supports ${se}{${t}{height:${x.totalHeight}px !important;padding-block:${x.paddingBlock}px !important;row-gap:${x.rowGap}px !important;}}`,`${s}{display:none !important;height:${i.metrics.barHeight}px !important;}`,m,...u?[`${u}{display:none !important;}`]:[],...p].join("")}})}function V(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}function Re(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 B(e,n=a$1){if(!V(e))return {baseStyle:e,rules:[]};let t={},o=new Map;for(let[r,i]of Object.entries(e)){let s=Re(r,n);if(s!=null&&V(i)){o.set(s,{...o.get(s)??{},...i});continue}t[r]=i;}return {baseStyle:Object.keys(t).length?t:void 0,rules:Array.from(o.entries()).sort((r,i)=>r[0]-i[0]).map(([r,i])=>({minWidth:r,style:i}))}}function P(e,n,t=a$1){let{baseStyle:o,rules:r}=B(e,t),i={...o??{}};for(let s of r){if(s.minWidth>n)break;Object.assign(i,s.style);}return Object.keys(i).length?i:void 0}function J(e,n=a$1){let{baseStyle:t,rules:o}=B(e,n);if(!t)return;if(!o.length)return t;let r=new Set;for(let s of o)for(let l of Object.keys(s.style))r.add(l);let i={};for(let[s,l]of Object.entries(t))r.has(s)||(i[s]=l);return Object.keys(i).length?i:void 0}function Y(e,n,t=a$1){let{rules:o}=B(e,t);for(let r of o)r.minWidth>0&&n.add(r.minWidth);}function ee(e){let n=e.breakpointMap??a$1,t=e.selector??W,o=[],{rules:r}=B(e.value,n);if(!r.length)return [];let i=new Set([0]);for(let s of r)i.add(s.minWidth);for(let s of Array.from(i).sort((l,u)=>l-u)){let l=P(e.value,s,n),u=l?e.serialize(l):"";u&&o.push({minWidth:s,css:`${t}{${u}}`,raw:true});}return o}function a(e){if(e!=null)return typeof e=="number"?`${e}px`:e}function ne(e){if(!e)return {};let n=a(e.margin),t=a(e.marginTop),o=a(e.marginRight),r=a(e.marginBottom),i=a(e.marginLeft),s={};return n!=null&&(s.margin=n),t!=null&&(s.marginTop=t),o!=null&&(s.marginRight=o),r!=null&&(s.marginBottom=r),i!=null&&(s.marginLeft=i),s}function _(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 j(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 te(e,n){let t={};e?.aspectRatio!=null&&(t.aspectRatio=e.aspectRatio);let o=a(e?.width),r=a(e?.minWidth),i=a(e?.maxWidth),s=a(e?.height),l=a(e?.minHeight),u=a(e?.maxHeight);return o!=null&&(t.inlineSize=o,t.width=o),r!=null&&(t.minInlineSize=r,t.minWidth=r),i!=null&&(t.maxInlineSize=i,t.maxWidth=i),s!=null&&(t.height=s),l!=null&&(t.minHeight=l),u!=null&&(t.maxHeight=u),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),_(t,e),e?.scale!=null&&(t.transform=`scale(${e.scale})`),Object.assign(t,Te(n)),t}function I(e,n){let t=a(n?.margin),o=a(n?.marginTop),r=a(n?.marginRight),i=a(n?.marginBottom),s=a(n?.marginLeft);t!=null&&e.push(`margin:${t};`),o!=null&&e.push(`margin-top:${o};`),r!=null&&e.push(`margin-right:${r};`),i!=null&&e.push(`margin-bottom:${i};`),s!=null&&e.push(`margin-left:${s};`);}function We(e){if(!e)return "";let n=[],t=a(e.width),o=a(e.minWidth),r=a(e.maxWidth),i=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};`)),r!=null&&(n.push(`max-inline-size:${r};`),n.push(`max-width:${r};`)),i!=null&&n.push(`height:${i};`),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};`),j(n,e),e.scale!=null&&n.push(`transform:scale(${e.scale});`),I(n,e),n.join("")}function ve(e){if(!e)return "";let n=[],t=a(e.width),o=a(e.minWidth),r=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};`)),r!=null&&(n.push(`max-inline-size:${r};`),n.push(`max-width:${r};`)),j(n,e),e.scale!=null&&n.push(`transform:scale(${e.scale});`),I(n,e),n.join("")}function Be(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 Te(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),r=a(e?.minWidth),i=a(e?.maxWidth);return o!=null&&(t.inlineSize=o,t.width=o),r!=null&&(t.minInlineSize=r,t.minWidth=r),i!=null&&(t.maxInlineSize=i,t.maxWidth=i),_(t,e),e?.scale!=null&&(t.transform=`scale(${e.scale})`),t}function N(e){return typeof e=="string"&&e.trim()==="max-content"}function Ce(e){return !e||typeof e!="object"?false:N(e.width)?true:Object.values(e).some(t=>!!t&&typeof t=="object"&&N(t.width))}function Ae(e){let n=te(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 K(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)),_(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 we(e,n=a$1){return B(e,n).rules.length>0}function He(e,n=0,t=a$1){return P(e,n,t)}function Ee(e,n=0,t=a$1){return P(e,n,t)}function ie(e,n=a$1){return J(e,n)}function X(e,n=a$1){return J(e,n)}function Ge(e,n,t=a$1){Y(e,n,t);}function U(e){return e.replace(/"/g,'\\"')}function ye(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};`),I(n,e),j(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 $(e){return ee({value:e.style,breakpointMap:e.breakpointMap,selector:e.selector,serialize:ye})}function Q(e){return ee({value:e.style,breakpointMap:e.breakpointMap,selector:e.selector,serialize:We})}function Le(e){let n=e.breakpointMap??a$1;if(!we(e.style,n))return [];let t=e.selector??W,o=[],r=new Set([0]);Y(e.style,r,n);for(let i of Array.from(r).sort((s,l)=>s-l)){let s=He(e.style,i,n),l=ve(s),u=Be(s),p=[l?`${t}{${l}}`:"",u?`${t} [data-rmg-skel-text-line="true"]{${u}}`:""].filter(Boolean).join("");p&&o.push({minWidth:i,css:p,raw:true});}return o}function M(e,n,t,o,r=a$1){if(e.kind===o){let i=e,s=$({style:i.style,breakpointMap:r}),l=s.length?n():void 0;l&&s.length&&t.push({nodeId:l,rules:s});let u=M(i.item,n,t,o,r),p=Array.isArray(i.slots)?i.slots.map(m=>({...m,item:m?.item?M(m.item,n,t,o,r):m?.item})):void 0;return {...i,...l?{__rmgNodeId:l}:null,item:u,...p?{slots:p}:null}}switch(e.kind){case "rect":case "square":case "circle":{let i=e,s=Q({style:i.style,breakpointMap:r});if(!s.length)return e;let l=n();return t.push({nodeId:l,rules:s}),{...i,__rmgNodeId:l}}case "text":{let i=e,s=i.__rmgTextRenderState??H({barHeight:i.barHeight,barWidth:i.barWidth,lineHeight:i.lineHeight,lines:i.lines,lastBarWidth:i.lastBarWidth,responsiveBy:i.responsiveBy,breakpointMap:r}),l=[...F({renderState:s,fitContent:Ce(i.style)}).map(p=>({...p,raw:true})),...Le({style:i.style,breakpointMap:r})];if(!l.length&&!i.__rmgTextRenderState)return e;let u=l.length?n():void 0;return u&&l.length&&t.push({nodeId:u,rules:l}),{...i,...u?{__rmgNodeId:u}:null,__rmgTextRenderState:s}}case "media":{let i=e,s=[...$({style:i.style,breakpointMap:r}),...Q({style:i.tile?.style,breakpointMap:r,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 i=e,s=$({style:i.style,breakpointMap:r}),l=s.length?n():void 0;l&&s.length&&t.push({nodeId:l,rules:s});let u=i.children.map(p=>M(p,n,t,o,r));return {...i,...l?{__rmgNodeId:l}:null,children:u}}default:return e}}function Oe(e){if(!e.rules.length)return "";let n=`[${e.scopeAttr}="${U(e.scopeId)}"]`,t=[];for(let o of e.rules){let r=`${n} [data-rmg-skel-node="${U(o.nodeId)}"]`;for(let i of o.rules){let s=i.raw?i.css.split("__NODE_SEL__").join(r):`${r}{${i.css}}`;i.minWidth<=0?t.push(s):i.query==="container"?t.push(`@container (min-width:${i.minWidth}px){${s}}`):t.push(`@media (min-width:${i.minWidth}px){${s}}`);}}return t.join(`
|
|
2
|
+
`)}function re(e,n,t){return te(e,t?void 0:n)}function Z(e){let{kind:n,style:t,shimmer:o,disableShimmer:r,breakpointMap:i,mediaTile:s}=e,l=n==="circle"?h.skelCircle:n==="square"?h.skelSquare:h.skelRect,u=ie(t,i),p=e.__rmgNodeId;return jsx("div",{"data-rmg-skel-node":p,"data-rmg-skel-media-tile":s?"true":void 0,className:[h.skelTile,l,r?null:h.skelShimmer].filter(Boolean).join(" "),style:{...re(u,o,r),...ne(u)}})}function $e({node:e,disableShimmer:n,breakpointMap:t}){let o=e.__rmgTextRenderState??H({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,responsiveBy:e.responsiveBy,breakpointMap:t}),r=ie(e.style,t),i=e.__rmgNodeId,s=o.responsiveBy==="container"&&o.usesResponsiveBarCss,l=L(o.baseState.metrics),u=q(s?void 0:r,o.baseState.metrics.totalHeight),p=ne(r),m={height:o.baseState.metrics.barHeight,backgroundColor:r?.backgroundColor,borderRadius:r?.borderRadius},x=N(r?.width),g=jsx("div",{"data-rmg-skel-node":i,"data-rmg-skel-text":"true",className:h.skelText,style:{...u,...s?null:p,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((y,T)=>jsx("div",{"data-rmg-skel-text-line":"true",className:[h.skelTile,n?null:h.skelShimmer,h.skelTextLine].filter(Boolean).join(" "),style:{...re(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(r),...p,containerType:"inline-size"},children:g}):g}function Me({node:e,disableShimmer:n,breakpointMap:t}){let o=t??a$1;switch(e.kind){case "rect":case "square":case "circle":return jsx(Z,{...e,disableShimmer:n,breakpointMap:o});case "media":{let r=Math.max(0,e.count|0),i=e.direction??"row",s=e.tile?.shape??"rect",l=e.__rmgNodeId,u=K(X(e.style,o));return jsx("div",{"data-rmg-skel-node":l,className:[h.skelGroup,i==="row"?h.skelRow:h.skelCol].join(" "),style:u,children:Array.from({length:r}).map((p,m)=>jsx(Z,{kind:s,style:e.tile?.style,shimmer:e.tile?.shimmer,disableShimmer:n,breakpointMap:o,mediaTile:true},m))})}case "stack":case "row":case "col":{let r=e.kind==="row"?h.skelRow:e.kind==="col"?h.skelCol:h.skelStack,i=e.__rmgNodeId,s=K(X(e.style,o));return jsx("div",{"data-rmg-skel-node":i,className:[h.skelGroup,r].join(" "),style:s,children:e.children.map((l,u)=>jsx(Me,{node:l,disableShimmer:n,breakpointMap:o},u))})}case "text":return jsx($e,{node:e,disableShimmer:n,breakpointMap:o});default:return null}}export{Oe as A,Me as B,h as a,W as b,se as c,ae as d,L as e,ce as f,ge as g,Se as h,be as i,H as j,F as k,a as l,ne as m,Te as n,Ae as o,K as p,He as q,Ee as r,ie as s,X as t,Ge as u,U as v,$ as w,Q as x,Le as y,M as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {A,z,n,l,B}from'./chunk-4BTS6IIA.mjs';import {a as a$1,d as d$1,e,b,c}from'./chunk-Z34PSRMG.mjs';import {a as a$3}from'./chunk-UUAWLGWO.mjs';import {a}from'./chunk-LVYED5ZM.mjs';import {a as a$2}from'./chunk-HK2DPKES.mjs';import*as d from'react';import {jsx,Fragment,jsxs}from'react/jsx-runtime';var o={shell:"Ue",contentLayer:"y",loadingLayer:"x",contentLayerVisible:"Ve",contentLayerBlocked:"We",loadingLayerOverlay:"er",loadingLayerCompare:"rr",loadingLayerExit:"ir"};function O(...e){return e.filter(Boolean).join(" ")}function Q({skeletonNode:e$1,children:S,ready:v,enabled:c$1=true,force:u,timing:R,shellClassName:M,shellStyle:N,loadingShellStyle:b$1,contentClassName:p,contentStyle:y,contentOwnsWrapperLayout:a$2,loadingLayerFirst:s,contentWrapper:i,shellDataAttributes:w}){let f=S!==void 0,x=a(),m=v===true,r=a$1(u),n=f&&c$1&&(r.enabled||!m),l=d.useMemo(()=>d$1({prefersReducedMotion:x,timing:R}),[x,R]),{showLoadingLayer:C,loadingExiting:k}=e({loadingActive:n,exitMs:l.exitMs,minVisibleMs:l.minVisibleMs}),t=d.useMemo(()=>b({loadingActive:n,loadingForced:u,contentReady:m}),[m,u,n]),P=d.useMemo(()=>c({exitMs:l.exitMs,compareMode:t.compareMode,loadingLayerOpacity:t.loadingLayerOpacity,opacityVarName:"--rmg-standalone-skeleton-opacity"}),[l.exitMs,t.compareMode,t.loadingLayerOpacity]);if(!f)return jsx(Fragment,{children:e$1});let L=c$1&&C,h=!c$1||t.compareMode||k||!L,T=c$1&&t.contentBlocked&&!k&&!a$2,G=i?i(S):S,B=L?jsx("div",{className:O(o.loadingLayer,a$2&&o.loadingLayerOverlay,t.compareMode&&o.loadingLayerCompare,k&&o.loadingLayerExit),style:P,"data-rmg-skeleton-loading-layer":"true",children:e$1}):null;return jsxs("div",{className:O(o.shell,M),style:{...L?b$1:null,...N},"aria-busy":n?true:void 0,"data-rmg-skeleton-wrapper":"true","data-rmg-skeleton-ready":m?"true":"false","data-rmg-skeleton-compare":t.compareMode?"true":"false","data-rmg-skeleton-layout-owner":a$2?"content":"skeleton",...w,children:[s?B:null,jsx("div",{className:O(o.contentLayer,h&&o.contentLayerVisible,T&&o.contentLayerBlocked,p),style:{"--rmg-loading-fade-duration":`${l.exitMs}ms`,...y},"aria-hidden":h?void 0:true,"data-rmg-skeleton-content-layer":"true",children:G}),s?null:B]})}function ie({layout:e,children:S,breakpoints:v,className:c,style:u,shellClassName:R,shellStyle:M,contentClassName:N,contentStyle:b,backgroundColor:p,radius:y,shimmer:a,disableShimmer:s,ariaLabel:i,ready:w,enabled:f,force:x,timing:m}){let r=d.useMemo(()=>({...a$2,...v??{}}),[v]),n$1=d.useMemo(()=>a$3("skel_",{layout:e,breakpoints:r,backgroundColor:p,radius:y,shimmer:a,disableShimmer:s}),[e,r,p,y,a,s]),{layout:l$1,responsiveCss:C}=d.useMemo(()=>{let P=0,L=()=>`n${++P}`,h=[];return {layout:z(e,L,h,"__standalone__",r),responsiveCss:A({scopeAttr:"data-rmg-skeleton-scope",scopeId:n$1,rules:h})}},[e,n$1,r]),k={...u,...p?{"--rmg-skel-bg":p}:null,...y!=null?{"--rmg-skel-radius":l(y)}:null,...s?null:n(a)};return jsx(Q,{skeletonNode:jsxs("div",{"data-rmg-skeleton-scope":n$1,className:c,style:k,"aria-hidden":i?void 0:true,"aria-label":i,role:i?"status":void 0,"aria-live":i?"polite":void 0,children:[C?jsx("style",{dangerouslySetInnerHTML:{__html:C}}):null,jsx(B,{node:l$1,disableShimmer:s,breakpointMap:r})]}),ready:w,enabled:f,force:x,timing:m,shellClassName:R,shellStyle:M,contentClassName:N,contentStyle:b,children:S})}export{Q as a,ie as b};
|