react-motion-gallery 2.0.38 → 2.0.39
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 +161 -5
- package/dist/chunk-AOQIL2HW.mjs +1 -0
- package/dist/{chunk-P6NLW2QN.mjs → chunk-CXH7XALE.mjs} +1 -1
- package/dist/{chunk-YNQPSE2N.mjs → chunk-CXV4KHLX.mjs} +1 -1
- package/dist/chunk-QJ2YFMAT.mjs +2 -0
- package/dist/chunk-S356JN3V.mjs +4 -0
- package/dist/core.d.mts +2 -1
- package/dist/entries.d.mts +4 -4
- package/dist/entries.mjs +1 -1
- package/dist/fullscreen-captions.d.mts +2 -1
- package/dist/fullscreen-controls.d.mts +2 -1
- package/dist/fullscreen-crossfade.d.mts +2 -1
- package/dist/fullscreen-lazy-load.d.mts +2 -1
- package/dist/fullscreen-slider.d.mts +2 -1
- package/dist/fullscreen-thumbnails.d.mts +2 -1
- package/dist/fullscreen-video.d.mts +2 -1
- package/dist/fullscreen-zoom-pan.d.mts +2 -1
- package/dist/fullscreen.d.mts +3 -2
- package/dist/{index-QEgABhod.d.mts → index-C9XZ3Lr3.d.mts} +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/{responsive-BnHorKhC.d.mts → responsive-Cwty6be5.d.mts} +3 -0
- package/dist/responsive.d.mts +2 -1
- package/dist/skeleton-base.d.mts +1 -1
- package/dist/skeleton-base.mjs +1 -1
- package/dist/skeleton-cache.d.mts +1 -1
- package/dist/skeleton-cache.mjs +1 -1
- package/dist/skeleton-grid.d.mts +3 -2
- package/dist/skeleton-grid.mjs +1 -1
- package/dist/skeleton-masonry.d.mts +1 -1
- package/dist/skeleton-masonry.mjs +1 -1
- package/dist/skeleton-slider.d.mts +4 -2
- package/dist/skeleton-slider.mjs +7 -7
- package/package.json +1 -1
- package/dist/chunk-4RPAI2F7.mjs +0 -4
- package/dist/chunk-EWWWD475.mjs +0 -1
- package/dist/chunk-MLE7BKAD.mjs +0 -2
|
@@ -6,6 +6,7 @@ import { P as PlyrSourceBuilder, a as PlyrOptionsBuilder } from './plyrTypes-Dhz
|
|
|
6
6
|
import { a as ZoomPanOptions } from './types-Dhh8xfHo.mjs';
|
|
7
7
|
import { L as LoadingForceOptions } from './force-C5m1QpdF.mjs';
|
|
8
8
|
import { R as ResponsiveTextBarHeight, a as ResponsiveTextBarWidth, b as ResponsiveTextLineHeight, c as ResponsiveTextLineCount, d as ResponsiveTextLastBarWidth, T as TextSkeletonResponsiveBy } from './text-BBcRGVzn.mjs';
|
|
9
|
+
import { SkeletonCacheOptions } from './skeleton-cache.mjs';
|
|
9
10
|
import { APITypes } from 'plyr-react';
|
|
10
11
|
import { c as FullscreenThumbnailSlotLayout } from './types-DNd5jSkS.mjs';
|
|
11
12
|
import { Root } from 'react-dom/client';
|
|
@@ -71,6 +72,7 @@ type SkeletonNode = {
|
|
|
71
72
|
};
|
|
72
73
|
} | {
|
|
73
74
|
kind: "text";
|
|
75
|
+
textId?: string;
|
|
74
76
|
barHeight: ResponsiveTextBarHeight;
|
|
75
77
|
barWidth?: ResponsiveTextBarWidth;
|
|
76
78
|
lineHeight: ResponsiveTextLineHeight;
|
|
@@ -152,6 +154,7 @@ type EntriesLoadingOptions = {
|
|
|
152
154
|
waitForDecode?: boolean;
|
|
153
155
|
decodeTimeoutMs?: number;
|
|
154
156
|
skeletonWrap?: ElementStyle;
|
|
157
|
+
cache?: SkeletonCacheOptions;
|
|
155
158
|
};
|
|
156
159
|
type IntroOptions = {
|
|
157
160
|
renderIntro?: (args: {
|
package/dist/responsive.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { R as ResponsiveCaptionPlacement, q as ResponsiveLength, r as ResponsiveLengthValue, J as ResponsivePosition } from './responsive-
|
|
1
|
+
export { R as ResponsiveCaptionPlacement, q as ResponsiveLength, r as ResponsiveLengthValue, J as ResponsivePosition } from './responsive-Cwty6be5.mjs';
|
|
2
2
|
export { a as BREAKPOINT_MAP, B as BreakpointMap, R as ResponsiveNumber } from './responsiveNumber-CouEMJ9O.mjs';
|
|
3
3
|
import './types-DXFoG8LC.mjs';
|
|
4
4
|
import 'react';
|
|
@@ -10,6 +10,7 @@ import './plyrTypes-DhzgHNfX.mjs';
|
|
|
10
10
|
import 'plyr';
|
|
11
11
|
import './types-Dhh8xfHo.mjs';
|
|
12
12
|
import './text-BBcRGVzn.mjs';
|
|
13
|
+
import './skeleton-cache.mjs';
|
|
13
14
|
import 'plyr-react';
|
|
14
15
|
import './types-DNd5jSkS.mjs';
|
|
15
16
|
import 'react-dom/client';
|
package/dist/skeleton-base.d.mts
CHANGED
|
@@ -3,9 +3,9 @@ import * as React from 'react';
|
|
|
3
3
|
import { B as BreakpointMap } from './responsiveNumber-CouEMJ9O.mjs';
|
|
4
4
|
import { L as LoadingForceOptions } from './force-C5m1QpdF.mjs';
|
|
5
5
|
import { L as LoadingTimingOptions } from './transitions-DU3ftmIq.mjs';
|
|
6
|
+
import { SkeletonCacheOptions } from './skeleton-cache.mjs';
|
|
6
7
|
import { S as SkeletonNode, a as SkeletonLength, b as SkeletonShimmer } from './layout-BOy4geKv.mjs';
|
|
7
8
|
export { e as SkeletonBaseStyle, f as SkeletonBaseStyleResponsive, g as SkeletonContainerStyle, h as SkeletonContainerStyleResponsive } from './layout-BOy4geKv.mjs';
|
|
8
|
-
import { SkeletonCacheOptions } from './skeleton-cache.mjs';
|
|
9
9
|
export { R as ResponsiveTextBarHeight, a as ResponsiveTextBarWidth, d as ResponsiveTextLastBarWidth, c as ResponsiveTextLineCount, b as ResponsiveTextLineHeight, T as TextSkeletonResponsiveBy } from './text-BBcRGVzn.mjs';
|
|
10
10
|
|
|
11
11
|
type SkeletonForceOptions = LoadingForceOptions;
|
package/dist/skeleton-base.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as Skeleton,b as SkeletonFrame,c as default}from'./chunk-
|
|
1
|
+
export{c as Skeleton,b as SkeletonFrame,c as default}from'./chunk-CXH7XALE.mjs';import'./chunk-45TZO7MN.mjs';import'./chunk-AU4O4KU4.mjs';import'./chunk-AOQIL2HW.mjs';import'./chunk-Z34PSRMG.mjs';import'./chunk-UUAWLGWO.mjs';import'./chunk-LVYED5ZM.mjs';import'./chunk-B4CC5AGE.mjs';import'./chunk-HK2DPKES.mjs';
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
declare const SKELETON_CACHE_VERSION = 1;
|
|
4
4
|
declare const DEFAULT_SKELETON_CACHE_TTL_MS: number;
|
|
5
5
|
declare const DEFAULT_SKELETON_CACHE_DEBOUNCE_MS = 250;
|
|
6
|
-
type SkeletonCacheKind = "skeleton" | "masonry";
|
|
6
|
+
type SkeletonCacheKind = "skeleton" | "slider" | "grid" | "masonry" | "entries";
|
|
7
7
|
type SkeletonCacheTextRecord = {
|
|
8
8
|
lines: number;
|
|
9
9
|
barWidths?: string[];
|
package/dist/skeleton-cache.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as DEFAULT_SKELETON_CACHE_DEBOUNCE_MS,b as DEFAULT_SKELETON_CACHE_TTL_MS,a as SKELETON_CACHE_VERSION,d as getSkeletonCacheCookieName,h as getSkeletonCacheRouteKey,g as parseSkeletonCacheCookie,e as serializeSkeletonCacheSnapshot,f as validateSkeletonCacheSnapshot}from'./chunk-
|
|
1
|
+
export{c as DEFAULT_SKELETON_CACHE_DEBOUNCE_MS,b as DEFAULT_SKELETON_CACHE_TTL_MS,a as SKELETON_CACHE_VERSION,d as getSkeletonCacheCookieName,h as getSkeletonCacheRouteKey,g as parseSkeletonCacheCookie,e as serializeSkeletonCacheSnapshot,f as validateSkeletonCacheSnapshot}from'./chunk-AOQIL2HW.mjs';
|
package/dist/skeleton-grid.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { R as ResponsiveNumber, B as BreakpointMap } from './responsiveNumber-CouEMJ9O.mjs';
|
|
4
|
+
import { SkeletonCacheOptions } from './skeleton-cache.mjs';
|
|
4
5
|
import { a as SkeletonLength, b as SkeletonShimmer } from './layout-BOy4geKv.mjs';
|
|
5
6
|
export { S as SkeletonNode } from './layout-BOy4geKv.mjs';
|
|
6
7
|
import { f as ResponsiveGridTemplate, R as ResponsiveGridSpan } from './types-Do4Pq-Td.mjs';
|
|
@@ -10,7 +11,6 @@ import { SkeletonForceOptions, SkeletonTimingOptions } from './skeleton-base.mjs
|
|
|
10
11
|
import './text-BBcRGVzn.mjs';
|
|
11
12
|
import './force-C5m1QpdF.mjs';
|
|
12
13
|
import './transitions-DU3ftmIq.mjs';
|
|
13
|
-
import './skeleton-cache.mjs';
|
|
14
14
|
|
|
15
15
|
type SkeletonGridOptions = {
|
|
16
16
|
count?: number;
|
|
@@ -58,7 +58,8 @@ type GridSkeletonProps = {
|
|
|
58
58
|
force?: SkeletonForceOptions;
|
|
59
59
|
timing?: SkeletonTimingOptions;
|
|
60
60
|
grid?: SkeletonGridOptions;
|
|
61
|
+
cache?: SkeletonCacheOptions;
|
|
61
62
|
};
|
|
62
|
-
declare function GridSkeleton({ layout, children, breakpoints, className, style, shellClassName, shellStyle, contentClassName, contentStyle, backgroundColor, radius, shimmer, disableShimmer, ariaLabel, ready, enabled, force, timing, grid, }: GridSkeletonProps): react_jsx_runtime.JSX.Element | null;
|
|
63
|
+
declare function GridSkeleton({ layout, children, breakpoints, className, style, shellClassName, shellStyle, contentClassName, contentStyle, backgroundColor, radius, shimmer, disableShimmer, ariaLabel, ready, enabled, force, timing, grid, cache, }: GridSkeletonProps): react_jsx_runtime.JSX.Element | null;
|
|
63
64
|
|
|
64
65
|
export { GridSkeleton, type GridSkeletonProps, GridSkeletonSpec, GridSkeleton as Skeleton, SkeletonForceOptions, type SkeletonGridLayout, type SkeletonGridOptions, SkeletonTimingOptions, GridSkeleton as default };
|
package/dist/skeleton-grid.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as GridSkeleton,a as Skeleton,a as default}from'./chunk-
|
|
1
|
+
export{a as GridSkeleton,a as Skeleton,a as default}from'./chunk-S356JN3V.mjs';import'./chunk-CXH7XALE.mjs';import'./chunk-45TZO7MN.mjs';import'./chunk-AU4O4KU4.mjs';import'./chunk-AOQIL2HW.mjs';import'./chunk-Z34PSRMG.mjs';import'./chunk-Y7NUGXTR.mjs';import'./chunk-UUAWLGWO.mjs';import'./chunk-LVYED5ZM.mjs';import'./chunk-B4CC5AGE.mjs';import'./chunk-HK2DPKES.mjs';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { R as ResponsiveNumber, B as BreakpointMap } from './responsiveNumber-CouEMJ9O.mjs';
|
|
4
|
+
import { SkeletonCacheOptions } from './skeleton-cache.mjs';
|
|
4
5
|
import { a as SkeletonLength, b as SkeletonShimmer } from './layout-BOy4geKv.mjs';
|
|
5
6
|
export { S as SkeletonNode } from './layout-BOy4geKv.mjs';
|
|
6
7
|
import { R as ResponsiveMasonrySpan } from './types-Br27DWP7.mjs';
|
|
7
8
|
import { M as MasonrySkeletonLayoutNode, a as MasonryPlacement, b as MasonrySkeletonSpec } from './MasonrySkeleton-Cs0x-4yL.mjs';
|
|
8
9
|
export { c as MasonrySkeletonNode, d as MasonrySkeletonSlot } from './MasonrySkeleton-Cs0x-4yL.mjs';
|
|
9
10
|
import { SkeletonForceOptions, SkeletonTimingOptions } from './skeleton-base.mjs';
|
|
10
|
-
import { SkeletonCacheOptions } from './skeleton-cache.mjs';
|
|
11
11
|
import './text-BBcRGVzn.mjs';
|
|
12
12
|
import './force-C5m1QpdF.mjs';
|
|
13
13
|
import './transitions-DU3ftmIq.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as MasonrySkeleton,a as Skeleton,a as default}from'./chunk-
|
|
1
|
+
export{a as MasonrySkeleton,a as Skeleton,a as default}from'./chunk-CXV4KHLX.mjs';import'./chunk-4URHXPTV.mjs';import'./chunk-CXH7XALE.mjs';import'./chunk-45TZO7MN.mjs';import'./chunk-AU4O4KU4.mjs';import'./chunk-AOQIL2HW.mjs';import'./chunk-Z34PSRMG.mjs';import'./chunk-UUAWLGWO.mjs';import'./chunk-LVYED5ZM.mjs';import'./chunk-B4CC5AGE.mjs';import'./chunk-HK2DPKES.mjs';
|
|
@@ -2,13 +2,13 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { R as ResponsiveNumber, B as BreakpointMap } from './responsiveNumber-CouEMJ9O.mjs';
|
|
4
4
|
import { j as SliderHandle } from './types-BiXSaEk7.mjs';
|
|
5
|
+
import { SkeletonCacheOptions } from './skeleton-cache.mjs';
|
|
5
6
|
import { a as SkeletonLength$1, b as SkeletonShimmer$1 } from './layout-BOy4geKv.mjs';
|
|
6
7
|
import { R as ResponsiveTextBarHeight, a as ResponsiveTextBarWidth, b as ResponsiveTextLineHeight, c as ResponsiveTextLineCount, d as ResponsiveTextLastBarWidth } from './text-BBcRGVzn.mjs';
|
|
7
8
|
import { SkeletonForceOptions, SkeletonTimingOptions } from './skeleton-base.mjs';
|
|
8
9
|
import './force-C5m1QpdF.mjs';
|
|
9
10
|
import './media.mjs';
|
|
10
11
|
import './transitions-DU3ftmIq.mjs';
|
|
11
|
-
import './skeleton-cache.mjs';
|
|
12
12
|
|
|
13
13
|
type SkeletonLength = number | string;
|
|
14
14
|
type SkeletonShimmer = {
|
|
@@ -132,6 +132,7 @@ type SkeletonNode = {
|
|
|
132
132
|
shimmer?: SkeletonShimmer;
|
|
133
133
|
} | {
|
|
134
134
|
kind: "text";
|
|
135
|
+
textId?: string;
|
|
135
136
|
barHeight: ResponsiveTextBarHeight;
|
|
136
137
|
barWidth?: ResponsiveTextBarWidth;
|
|
137
138
|
lineHeight: ResponsiveTextLineHeight;
|
|
@@ -195,6 +196,7 @@ type SliderSkeletonProps = {
|
|
|
195
196
|
force?: SkeletonForceOptions;
|
|
196
197
|
timing?: SkeletonTimingOptions;
|
|
197
198
|
restore?: SkeletonSliderRestoreOptions;
|
|
199
|
+
cache?: SkeletonCacheOptions;
|
|
198
200
|
};
|
|
199
201
|
declare function buildScopedInitialHeightCss(args: {
|
|
200
202
|
scopeId: string;
|
|
@@ -204,6 +206,6 @@ declare function buildScopedInitialHeightCss(args: {
|
|
|
204
206
|
breakpointMap: BreakpointMap;
|
|
205
207
|
centerFirstSpacer?: boolean;
|
|
206
208
|
}): string;
|
|
207
|
-
declare function SliderSkeleton({ layout, children, breakpoints, className, style, shellClassName, shellStyle, contentClassName, contentStyle, backgroundColor, radius, shimmer, disableShimmer, ariaLabel, ready, enabled, force, timing, restore, }: SliderSkeletonProps): react_jsx_runtime.JSX.Element | null;
|
|
209
|
+
declare function SliderSkeleton({ layout, children, breakpoints, className, style, shellClassName, shellStyle, contentClassName, contentStyle, backgroundColor, radius, shimmer, disableShimmer, ariaLabel, ready, enabled, force, timing, restore, cache, }: SliderSkeletonProps): react_jsx_runtime.JSX.Element | null;
|
|
208
210
|
|
|
209
211
|
export { SliderSkeleton as Skeleton, SkeletonForceOptions, type SkeletonNode, type SkeletonSliderLayout, type SkeletonSliderReadyHandle, type SkeletonSliderRestoreOptions, SkeletonTimingOptions, SliderSkeleton, type SliderSkeletonNode, type SliderSkeletonProps, type SliderSkeletonSlot, type SliderSkeletonSpec, buildScopedInitialHeightCss, SliderSkeleton as default };
|
package/dist/skeleton-slider.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {a as a$
|
|
2
|
-
var cfg=${
|
|
1
|
+
import {a as a$3}from'./chunk-R6EGYRTJ.mjs';import {a as a$4}from'./chunk-KJZTKXTM.mjs';import {a as a$2,b as b$1}from'./chunk-CXH7XALE.mjs';import {n,l,g,h,t,i as i$1,u,w,x as x$1,b as b$2,k,y as y$1,s,q,d as d$1,f as f$2,r,j}from'./chunk-45TZO7MN.mjs';import {b,c}from'./chunk-AU4O4KU4.mjs';import {f as f$1}from'./chunk-AOQIL2HW.mjs';import'./chunk-Z34PSRMG.mjs';import {a as a$1}from'./chunk-UUAWLGWO.mjs';import'./chunk-LVYED5ZM.mjs';import'./chunk-B4CC5AGE.mjs';import {i,a,d,e}from'./chunk-HK2DPKES.mjs';import*as x from'react';import {jsxs,jsx}from'react/jsx-runtime';var bt=300*1e3,Rt=2,Ct="rmg:slider-restore",un=new Set(["reload","back_forward"]);function cn(e,t){return (e%t+t)%t}function dn(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}function wt(){return Date.now()}function Nt(e,t=typeof window<"u"?window.location:void 0){let n=t?`${t.pathname}${t.search}`:"";return `${Ct}:${e}:${n}`}function Sn(e=window){let n=(e.performance?.getEntriesByType?.("navigation")??[])[0];if(n?.type)return n.type;let r=e.performance?.navigation;return r?r.type===r.TYPE_RELOAD?"reload":r.type===r.TYPE_BACK_FORWARD?"back_forward":null:null}function mn(e=window){let t=Sn(e);return !!t&&un.has(t)}function fn(e){if(!e)return null;let t;try{t=JSON.parse(e);}catch{return null}if(!dn(t)||t.version!==1)return null;let n=Number(t.index),r=Number(t.viewportWidth),i=Number(t.slideCount),o=Number(t.skeletonSlotCount),l=Number(t.timestamp),a=Number(t.scrollY),c=Number(t.scrollMax),u=t.heightPx==null?void 0:Number(t.heightPx);return !Number.isInteger(n)||n<0||!Number.isFinite(r)||r<=0||!Number.isInteger(i)||i<=0||!Number.isInteger(o)||o<=0||!Number.isFinite(l)||l<=0||u!=null&&(!Number.isFinite(u)||u<=0)?null:{version:1,index:n,heightPx:u,viewportWidth:r,slideCount:i,skeletonSlotCount:o,timestamp:l,scrollY:Number.isFinite(a)?Math.max(0,a):0,scrollMax:Number.isFinite(c)?Math.max(0,c):0,wasAtBottom:t.wasAtBottom===true}}function pn(e,t){if(!e)return null;let n=Math.max(0,t.ttlMs),r=(t.now??wt())-e.timestamp;if(n>0&&(r<0||r>n)||e.slideCount!==t.slideCount||e.skeletonSlotCount!==t.skeletonSlotCount||e.index<0||e.index>=t.slideCount)return null;let i=t.viewportTolerancePx??Rt;return Math.abs(e.viewportWidth-t.viewportWidth)>i?null:e}function Bt(e,t=window,n={}){if(!e?.enabled||e.controlled||n.requireNavigationRestore!==false&&!mn(t))return null;try{let r=t.sessionStorage.getItem(Nt(e.storageKeyId,t.location));return pn(fn(r),{ttlMs:e.ttlMs,viewportWidth:t.innerWidth||t.document.documentElement.clientWidth||0,slideCount:e.slideCount,skeletonSlotCount:e.skeletonSlotCount})}catch{return null}}function Ht(e,t,n=window){if(!(!e?.enabled||e.controlled))try{let r=n.document.documentElement,i=n.document.body,o=Math.max(r?.scrollHeight??0,i?.scrollHeight??0),l=n.innerHeight||r?.clientHeight||0,a=Math.max(0,o-l),c=Math.max(0,n.scrollY||n.pageYOffset||0),u=a>0&&a-c<=4,s={version:1,index:Math.max(0,Math.floor(t.index)),heightPx:t.heightPx,viewportWidth:n.innerWidth||r?.clientWidth||0,slideCount:t.slideCount,skeletonSlotCount:t.skeletonSlotCount,timestamp:wt(),scrollY:c,scrollMax:a,wasAtBottom:u};n.sessionStorage.setItem(Nt(e.storageKeyId,n.location),JSON.stringify(s));}catch{}}function Et(e){let t=Math.max(0,Math.floor(e.slotCount)),n=Math.min(t,Math.max(0,Math.floor(e.visibleCount)));if(t<=0||n<=0)return [];let r=Math.min(Math.max(0,Math.floor(e.activeIndex)),Math.max(0,t-1)),i=Math.min(Math.max(0,Math.floor(e.activeSlotOffset)),Math.max(0,n-1)),o=e.loop?r:Math.min(Math.max(0,r-i),Math.max(0,t-n)),l=[],a=new Set;for(let c=0;c<n;c+=1){let u=o+c,s=e.loop?cn(u,t):u;s<0||s>=t||a.has(s)||(a.add(s),l.push({slot:s+1,order:c}));}return l}function hn(e){return JSON.stringify(e).replace(/</g,"\\u003c")}function gn(e){return `(function(){try{
|
|
2
|
+
var cfg=${hn(e)};
|
|
3
3
|
var nav=(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||{}).type;
|
|
4
4
|
if(!nav&&performance.navigation){nav=performance.navigation.type===performance.navigation.TYPE_RELOAD?"reload":performance.navigation.type===performance.navigation.TYPE_BACK_FORWARD?"back_forward":"";}
|
|
5
5
|
if(nav!=="reload"&&nav!=="back_forward")return;
|
|
6
|
-
var key="${
|
|
6
|
+
var key="${Ct}:"+cfg.storageKeyId+":"+location.pathname+location.search;
|
|
7
7
|
var raw=sessionStorage.getItem(key);
|
|
8
8
|
if(!raw)return;
|
|
9
9
|
var state=JSON.parse(raw);
|
|
@@ -34,7 +34,7 @@ style.setAttribute("data-rmg-slider-restore-style",cfg.scopeId);
|
|
|
34
34
|
style.textContent=css;
|
|
35
35
|
document.head.appendChild(style);
|
|
36
36
|
if(state.wasAtBottom){var keep=function(){var doc=document.documentElement;var body=document.body;var max=Math.max(0,Math.max(doc.scrollHeight,body?body.scrollHeight:0)-(innerHeight||doc.clientHeight||0));scrollTo(scrollX||0,max);};requestAnimationFrame(keep);setTimeout(keep,50);addEventListener("load",function(){requestAnimationFrame(keep);setTimeout(keep,120);},{once:true});}
|
|
37
|
-
}catch(e){}})();`}function
|
|
38
|
-
`)}function kt(e){let{kind:t,style:n,shimmer:r,breakpointMap:i,mediaTile:o}=e,l={},a=s(n,i),c=e.__rmgNodeId;return t==="circle"&&(l.borderRadius="9999px"),t==="square"&&a?.aspectRatio==null&&(l.aspectRatio="1"),a?.aspectRatio!=null&&a?.height==null&&(l.height="auto"),jsx("div",{"data-rmg-skel-node":c,"data-rmg-skel-media-tile":o?"true":void 0,className:a$3.sliderSkeleton,style:{...We(a,r),...He(a),...l}})}function cn({node:e,breakpointMap:t}){let n=j({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,breakpointMap:t}),r=s(e.style,t),i=n.states.some(({state:s})=>s.lineCount!==n.baseState.lineCount||s.metrics.totalHeight!==n.baseState.metrics.totalHeight||s.metrics.barHeight!==n.baseState.metrics.barHeight||s.metrics.paddingBlock!==n.baseState.metrics.paddingBlock||s.metrics.rowGap!==n.baseState.metrics.rowGap),o=n.states.some(({state:s})=>s.lineCount!==n.baseState.lineCount||s.barWidths.length!==n.baseState.barWidths.length||s.barWidths.some((p,S)=>p!==n.baseState.barWidths[S])),l=e.__rmgNodeId,a=on(r,i?void 0:n.metrics.totalHeight),c={height:n.metrics.barHeight,backgroundColor:r?.backgroundColor,borderRadius:r?.borderRadius},u=$e(r?.width);return jsx("div",{"data-rmg-skel-node":l,"data-rmg-skel-text":"true",className:a$3.sliderSkeletonText,style:{...a,...He(r),...i?null:{paddingBlock:`${n.metrics.paddingBlock}px`,rowGap:`${n.metrics.rowGap}px`}},children:Array.from({length:n.maxLines}).map((s,p)=>jsx("div",{"data-rmg-skel-text-line":"true",className:[a$3.sliderSkeleton,a$3.sliderSkeletonTextLine].join(" "),style:{...We(c,e.shimmer),...o?null:{display:p>=n.baseLines?"none":void 0,width:u?n.baseState.barWidths[p]??"100%":"100%",maxWidth:n.baseState.barWidths[p]??"100%"}}},p))})}function Le({node:e,breakpointMap:t$1,activeDotIndex:n$1}){switch(e.kind){case "rect":case "square":case "circle":return jsx(kt,{...e,breakpointMap:t$1});case "media":{let r=Math.max(0,e.count|0),i=e.direction??"row",o=e.tile?.shape??"rect",l=e.__rmgNodeId,a=Be(t(e.style,t$1));return jsx("div",{"data-rmg-skel-node":l,className:a$3.sliderSkeletonGroup,style:{display:"flex",flexDirection:i==="row"?"row":"column",...a||{}},children:Array.from({length:r}).map((c,u)=>jsx(kt,{kind:o,style:e.tile?.style,shimmer:e.tile?.shimmer,breakpointMap:t$1,mediaTile:true},u))})}case "sliderDots":{let r=Math.max(0,e.count|0),i=e.__rmgNodeId,o=Be(t(e.style,t$1)),l=Ae(s(e.dotStyle,t$1)),a=Ae(s(e.activeStyle,t$1)),c=Ae(s(e.inactiveStyle,t$1)),u=typeof n$1=="number"&&Number.isFinite(n$1)?Math.max(0,Math.min(r-1,Math.floor(n$1))):0;return jsx("div",{"data-rmg-skel-node":i,"data-rmg-skel-slider-dots":"true","data-rmg-skel-dot-active-style":JSON.stringify(a),"data-rmg-skel-dot-inactive-style":JSON.stringify(c),className:a$3.sliderSkeletonGroup,style:{display:"flex",flexDirection:"row",...o||{}},children:Array.from({length:r}).map((s,p)=>{let S=p===u;return jsx("div",{"data-rmg-skel-slider-dot":p,"data-rmg-skel-dot-active":S?"true":"false",className:a$3.sliderSkeleton,style:{...n(e.shimmer),...l,...S?a:c}},p)})})}case "stack":case "row":case "col":{let r=e.kind==="row"?"row":"column",i=e.__rmgNodeId,o=Be(t(e.style,t$1));return jsx("div",{"data-rmg-skel-node":i,className:a$3.sliderSkeletonGroup,style:{display:"flex",flexDirection:r,...o||{}},children:e.children.map((l,a)=>jsx(Le,{node:l,breakpointMap:t$1,activeDotIndex:n$1},a))})}case "text":return jsx(cn,{node:e,breakpointMap:t$1});default:return null}}function yt(){return {layout:{kind:"slider",direction:"row",item:{kind:"rect",style:{width:"100%",height:"100%",borderRadius:2}},itemWrapStyle:void 0},radius:12}}function Ee(e){return /%$/.test(e.trim())}function Rt(e){let t=e.trim();if(!t.length)return null;if(t==="0")return {value:0,unit:"px"};let n=t.match(/^(\d+(?:\.\d+)?|\.\d+)([a-zA-Z]+)$/);if(!n)return null;let r=Number(n[1]);return !Number.isFinite(r)||r<0?null:{value:r,unit:n[2]}}function Ct(e){let t=[],n="",r=0;for(let i of e.trim()){if(/\s/.test(i)&&r===0){n&&(t.push(n),n="");continue}n+=i,i==="("?r+=1:i===")"&&(r=Math.max(0,r-1));}return n&&t.push(n),t}function dn(e){let t=e.trim();return t.length?t==="0"?"0px":/^(?:var|calc|min|max|clamp)\(.+\)$/i.test(t)||Rt(t)?t:null:null}function Sn(e){if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)&&e>=0?e===0?"0px":`${e}px`:null;for(let t of Ct(String(e))){let n=dn(t);if(n)return n}return null}function _(e){return e==null?null:typeof e=="number"?`${e}px`:String(e)}function Me(e,t){if(!e)return null;if(t===0)return "0px";if(e==="0px")return e;let n=Rt(e);return n?`${n.value*t}${n.unit}`:`calc(${e} * ${t})`}function wt(e){if(e==null)return null;if(typeof e=="number")return e>0?e:null;let t=String(e).trim(),n=t.match(/^(\d+(?:\.\d+)?)\s*\/\s*(\d+(?:\.\d+)?)$/);if(n){let i=Number(n[1]),o=Number(n[2]);return i>0&&o>0?i/o:null}let r=Number(t);return Number.isFinite(r)&&r>0?r:null}function k(e){let t=e.filter(r=>!!r&&r.trim().length>0);if(!t.length)return null;let n=t.filter(r=>{let i=r.trim();return i!=="0"&&i!=="0px"});return n.length?n.length===1?n[0]:`calc(${n.join(" + ")})`:"0px"}function ve(e){let t=e.filter(n=>!!n&&n.trim().length>0);return t.length?t.length===1?t[0]:`max(${t.join(", ")})`:null}function mn(e){let t=e.filter(n=>!!n&&n.trim().length>0);return t.length?t.length===1?t[0]:`min(${t.join(", ")})`:null}function ae(e,t){if(e.trim()==="0"||e.trim()==="0px"||t.trim()==="0"||t.trim()==="0px")return "0px";if(t.trim()==="1")return e;let n=Number(t);return Number.isFinite(n)?Me(e,n)??`calc(${e} * ${t})`:`calc(${e} * ${t})`}function Fe(e,t){return t.trim()==="1"?e:`calc(${e} / ${t})`}function Nt(e,t){return t.trim()==="0"||t.trim()==="0px"?e:`calc(${e} - ${t})`}function Bt(e,t){let n=_(t);return !e||!n?e:mn([e,n])}function re(e){let t=_(e?.margin),n=_(e?.marginTop),r=_(e?.marginBottom);return t&&!n&&!r?Me(t,2):!t&&!n&&!r?null:k([n??t??"0px",r??t??"0px"])}function Lt(e){if(e==null)return null;let t=typeof e=="number"?`${e}px`:String(e).trim();if(!t.length)return null;let n=Ct(t);if(!n.length||n.length>4)return null;let[r,i,o,l]=n;return n.length===1?{top:r,right:r,bottom:r,left:r}:n.length===2?{top:r,right:i,bottom:r,left:i}:n.length===3?{top:r,right:i,bottom:o,left:i}:{top:r,right:i,bottom:o,left:l}}function Et(e){return Sn(e?.border)}function fn(e){return Me(Et(e),2)}function pn(e){return Me(Et(e),2)}function V(e){let t=Lt(e?.padding);return t?k([t.top,t.bottom]):null}function Ht(e){let t=Lt(e?.padding);return t?k([t.left,t.right]):null}function be(e){return _(e?.gap)}function xt(e,t){let n=Ht(t);return !n||n==="0px"?e:Nt(e,n)}function ue(e,t=0,n=a){return r(e,t,n)}function De(e,t,n,r,i=0,o=a){let l=ue(e.style,i,o),a=be(l)??"0px",c=Ht(l)??"0px",u=Math.max(1,t|0),s=u>1?ae(a,String(u-1)):"0px",p=`calc(100cqw - ${c} - ${s})`,{itemWrapStyle:S}=Ie(e,n),g=S?.width?_(S.width):null,v;return r==="peek"&&g&&!Ee(g)?v=g:v=Fe(p,String(u)),Bt(v,S?.maxWidth)??v}function gn(e,t,n,r,i=0,o=a){let l=De(e,t,n,r,i,o),{itemWrapStyle:a}=Ie(e,n),c=fn(a);return !c||c==="0px"?l:Nt(l,c)}function hn(e$1,t=0,n=a){let r=e(d(e$1.rowHeightCompensation,n),t);return r==null||!Number.isFinite(r)||r<=0?null:`${r}px`}function It(e,t,n,r=0,i=a){let o=ue(e.style,r,i),l=be(o)??"0px",a=V(o)??"0px",c=hn(e,r,i),u=Math.max(1,t|0),s=e.direction??"row",p=Array.from({length:u},(g,v)=>{let{item:M,itemWrapStyle:W}=Ie(e,v),O=De(e,u,v,n,r,i),N=gn(e,u,v,n,r,i),b=ce(M,N,r,i),y=pn(W),B=re(W),f=k([y,B]),d=null,H=null;if(b&&!Ee(b)&&(H=k([b,y,B])),W){let q=_(W.height);if(q)d=k([q,B]);else {let P=wt(W.aspectRatio);P?d=k([Fe(O,String(P)),B]):d=f;}}return b?d?Ee(b)?d:ve([d,H??b]):b:d}),S=s==="row"?(()=>{let g=e.initialHeightSlot;if(g==null)return ve(p);let v=Math.min(Math.max(0,Math.trunc(g)),Math.max(0,u-1));return p[v]??ve(p)})():k([k(p),u>1?ae(l,String(u-1)):"0px"]);return k([S,a,c])}function Wt(e,t=0,n=a){return k((e.children??[]).map(r=>ce(r,"100cqw",t,n)))}function ce(e,t,n=0,r=a){if(e.kind==="rect"||e.kind==="square"||e.kind==="circle"){let i=q(e.style,n,r),o=_(i?.height),l=wt(i?.aspectRatio);if(o)return k([o,re(i)]);if(l){let a=_(i?.width),c=a&&!Ee(a)?a:t,u=Bt(c,i?.maxWidth)??c,s=String(l),p=Fe(u,s);return k([p,re(i)])}return re(i)??null}if(e.kind==="media"){let i=e.direction??"row",o=ue(e.style,n,r),l=be(o)??"0px",a=Math.max(0,e.count|0),c=xt(t,o),u=e.tile?{kind:e.tile.shape??"rect",style:e.tile.style,shimmer:e.tile.shimmer}:{kind:"rect",style:{width:"100%",height:"100%"}},s=ce(u,c,n,r);return s?i==="row"?k([s,V(o)]):a<=1?k([s,V(o)]):k([ae(s,String(a)),ae(l,String(a-1)),V(o)]):null}if(e.kind==="sliderDots"){let i=ue(e.style,n,r),o=q(e.dotStyle,n,r),l=q(e.activeStyle,n,r),a=q(e.inactiveStyle,n,r),c=[o,l,a].map(s=>k([_(s?.height),re(s)])).filter(s=>!!s),u=ve(c);return u?k([u,V(i)]):V(i)}if(e.kind==="row"||e.kind==="col"||e.kind==="stack"){let i=e.kind==="row"?"row":"col",o=ue(e.style,n,r),l=be(o)??"0px",a=V(o)??"0px",c=xt(t,o),u=e.children.map(s=>ce(s,c,n,r));if(i==="row"){let s=ve(u);return s?k([s,a]):null}else {let s=u.filter(S=>!!S);if(!s.length)return a;let p=s.length>1?ae(l,String(s.length-1)):"0px";return k([k(s)??null,p,a])}}if(e.kind==="text"){let i=q(e.style,n,r),o=d$1({barHeight:g(e.barHeight,typeof e.barHeight=="number"?e.barHeight:0,n,r),lineHeight:h(e.lineHeight,typeof e.lineHeight=="number"?e.lineHeight:1,n,r),lines:f(e.lines,1,n,r)});return k([`${o.totalHeight}px`,re(i)])}return null}function Mt(e,t,n,r=0,i=a){let o=e.kind==="slider"?e:null;if(!o)return ce(e,"100cqw",r,i);let l=It(o,t,n,r,i),a=Wt(o,r,i);return k([l,a])}function Pt(e,t=0,n=a){let r=e.kind==="slider"?e:null;return r?Wt(r,t,n):null}function Tt(e,t,n,r=0,i=a){let o=e.kind==="slider"?e:null;if(!o||n!=="peek")return null;let l=Math.max(1,t|0);if(l<=1)return null;let a=ue(o.style,r,i),c=be(a)??"0px",u=Array.from({length:l-1},(p,S)=>De(o,l,S+1,n,r,i)),s=l>2?ae(c,String(l-2)):null;return k([...u,s])}function _t(e,t,n,r=0,i=a){let o=e.kind==="slider"?e:null;return o?It(o,t,n,r,i):ce(e,"100cqw",r,i)}function ie(e,t,n=a){switch(e.kind){case "rect":case "square":case "circle":case "media":case "sliderDots":return;case "text":for(let r of i$1({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,breakpointMap:n}))t.add(r);return;case "stack":case "row":case "col":for(let r of e.children)ie(r,t,n);return;case "slider":ie(e.item,t,n);for(let r of e.children??[])ie(r,t,n);for(let r of e.overlays??[])ie(r,t,n);for(let r of e.slots??[])r.item&&ie(r.item,t,n);return;default:return e}}function oe(e,t,n=a){switch(e.kind){case "rect":case "square":case "circle":u(e.style,t,n);return;case "media":u(e.tile?.style,t,n);return;case "sliderDots":u(e.dotStyle,t,n),u(e.activeStyle,t,n),u(e.inactiveStyle,t,n);return;case "text":u(e.style,t,n);return;case "stack":case "row":case "col":for(let r of e.children)oe(r,t,n);return;case "slider":oe(e.item,t,n);for(let r of e.children??[])oe(r,t,n);for(let r of e.overlays??[])oe(r,t,n);for(let r of e.slots??[])r.item&&oe(r.item,t,n);return;default:return e}}function Ne(e,t,n=a){u(e,t,n);}function le(e,t,n=a){switch(e.kind){case "rect":case "square":case "circle":case "text":return;case "media":Ne(e.style,t,n);return;case "sliderDots":Ne(e.style,t,n);return;case "stack":case "row":case "col":Ne(e.style,t,n);for(let r of e.children)le(r,t,n);return;case "slider":Ne(e.style,t,n),le(e.item,t,n);for(let r of e.children??[])le(r,t,n);for(let r of e.overlays??[])le(r,t,n);for(let r of e.slots??[])r.item&&le(r.item,t,n);return;default:return e}}function se(e,t,n=a){switch(e.kind){case "rect":case "square":case "circle":case "media":case "sliderDots":case "text":return;case "stack":case "row":case "col":for(let r of e.children)se(r,t,n);return;case "slider":for(let r of d(e.rowHeightCompensation,n))t.add(r.minWidth);se(e.item,t,n);for(let r of e.children??[])se(r,t,n);for(let r of e.overlays??[])se(r,t,n);for(let r of e.slots??[])r.item&&se(r.item,t,n);return;default:return e}}function Ot(e,t=a){let n=new Set;return ie(e,n,t),Array.from(n).filter(r=>r>0).sort((r,i)=>r-i)}function At(e,t=a){let n=new Set;return le(e,n,t),Array.from(n).filter(r=>r>0).sort((r,i)=>r-i)}function $t(e,t=a){let n=new Set;return oe(e,n,t),Array.from(n).filter(r=>r>0).sort((r,i)=>r-i)}function Ft(e,t=a){let n=new Set;return se(e,n,t),Array.from(n).filter(r=>r>0).sort((r,i)=>r-i)}function Dt({count:e,maxSlots:t$1,activeDotIndex:n$1,rowStyle:r,spec:i,breakpoints:o,centerFirst:l=false,hasLeadingSpacer:a$2=false,responsiveCssScopeSelector:c}){let u=i??yt(),s=C.useMemo(()=>({...a,...o??{}}),[o]),p=u.layout??yt().layout,S=C.useMemo(()=>a$1("ssk_",{breakpoints:s,centerFirst:l,count:e,hasLeadingSpacer:a$2,maxSlots:t$1,rowStyle:r,spec:u}),[l,e,s,a$2,t$1,r,u]),g=C.useMemo(()=>`[data-rmg-slider-skel-scope="${bt(S)}"]`,[S]),v=c??g,M={...r||{},...n(u.shimmer)};u.backgroundColor&&(M["--rmg-skel-bg"]=u.backgroundColor),u.radius!=null&&(M["--rmg-skel-radius"]=m(u.radius));let{layout:W,responsiveCss:O}=C.useMemo(()=>{let T=0,I=()=>`n${++T}`,A=[],Se=ne(p,I,A,s),z=un(v,A);return {layout:Se,responsiveCss:z}},[p,v,s]),N=W,b=N.__rmgNodeId,y=Be(t(N.style,s)),B=N.count!=null?Math.max(0,N.count|0):Math.max(0,e|0),f=N.direction??"row",d=N.children??[],H=N.overlays??[],q=l&&f==="row",P=a$2&&f==="row",Re=N.itemStretch??true,J=Math.max(0,t$1|0),U=u.mode??"fit";return jsxs("div",{"data-rmg-slider-skel-scope":c?void 0:S,"data-rmg-skel-mode":U,"data-rmg-skel-has-extras":d.length?"true":void 0,className:[a$3.sliderSkeletonOverlay,u.className].filter(Boolean).join(" "),style:u.style,"data-rmg-skel-part":"overlay",children:[O?jsx("style",{dangerouslySetInnerHTML:{__html:O}}):null,jsxs("div",{className:a$3.sliderSkeletonLayout,"data-rmg-skel-part":"layout","data-rmg-skel-has-extras":d.length?"true":void 0,children:[jsx("div",{"data-rmg-skel-node":b,className:a$3.sliderSkeletonRow,"data-rmg-skel-part":"row",style:{...M,...y||{},display:"flex",flexDirection:f==="row"?"row":"column",...q?{justifyContent:"center"}:null},children:Array.from({length:J}).map((T,I)=>{let A=P&&I===0,Se=P?I-1:I,z=A?{item:{kind:"rect",style:{width:"100%",height:"100%",backgroundColor:"transparent"},shimmer:{enabled:false}},itemWrapStyle:{width:"var(--rmg-slider-center-first-spacer-width, 0px)",height:0}}:Ie(N,Se),E=z.itemWrapStyle,{outerStyle:$,innerStyle:Ce}=an(E);return jsx("div",{className:a$3.sliderSkeletonItem,"data-rmg-skel-slot":I+1,"data-rmg-skel-visible-count":B,"data-rmg-skel-center-first-spacer":A?"true":void 0,style:{boxSizing:"border-box",...E?He(E):null,...$??null,...f==="col"?{flex:"0 0 auto",height:"auto"}:Re?{height:"100%"}:{alignSelf:"flex-start",height:"auto"},minWidth:0,minHeight:0},children:jsx("div",{className:a$3.sliderSkeletonItemInner,style:{...Ce??null,...f==="row"&&!Re?{height:"auto"}:null},children:jsx(Le,{node:z.item,breakpointMap:s,activeDotIndex:n$1})})},`rmg-slider-skel-${I}`)})}),d.length?jsx("div",{className:a$3.sliderSkeletonExtras,"data-rmg-skel-part":"extras",children:d.map((T,I)=>jsx(Le,{node:T,breakpointMap:s,activeDotIndex:n$1},`rmg-slider-skel-extra-${I}`))}):null]}),H.length?jsx("div",{className:a$3.sliderSkeletonOverlays,"data-rmg-skel-part":"overlays",children:H.map((T,I)=>jsx(Le,{node:T,breakpointMap:s,activeDotIndex:n$1},`rmg-slider-skel-overlay-${I}`))}):null]})}function ze(e){return !!e&&typeof e=="object"&&!("kind"in e)&&"layout"in e&&e.layout?.kind==="slider"}function jt(e){return !!e&&typeof e=="object"&&"kind"in e&&e.kind==="slider"}function kn(e){if(ze(e))return e;let{mode:t,centering:n,className:r,visibleCount:i,backgroundColor:o,radius:l,shimmer:a,...c}=e;return {mode:t,centering:n,className:r,visibleCount:i,backgroundColor:o,radius:l,shimmer:a,layout:c}}function qt(e){if(!e||typeof e!="object"||Array.isArray(e))return {};let t={};for(let[n,r]of Object.entries(e))r!=null&&(typeof r=="string"||typeof r=="number"||typeof r=="boolean")&&(t[n]=r);return t}function de(e,t=[]){return !e||typeof e!="object"?t:e.kind==="sliderDots"?(t.push({activeStyle:qt(e.activeStyle),inactiveStyle:qt(e.inactiveStyle)}),t):e.kind==="slider"?(de(e.item,t),e.children?.forEach?.(n=>de(n,t)),e.overlays?.forEach?.(n=>de(n,t)),e.slots?.forEach?.(n=>de(n.item,t)),t):(e.children?.forEach?.(n=>de(n,t)),t)}function je(e,t,n){return i(e,t,n).reduce((r,i)=>Math.max(r,i.count),0)}function yn(e,t){let n=Math.max(0,Math.floor(e));return n<=0?[]:n===1?t>=2?[2]:[]:Array.from({length:Math.min(t,n+1)},(r,i)=>i+1)}function zt(e){return `[data-rmg-scope="${e}"] > [data-rmg-scope-shell="true"]`}function qe(e){typeof document>"u"||document.querySelectorAll("style[data-rmg-slider-restore-style]").forEach(t=>{t.getAttribute("data-rmg-slider-restore-style")===e&&t.remove();});}function xn(e,t){if(t==null||!Number.isFinite(t)||t<=0)return "";let n=Math.round((t+Number.EPSILON)*1e3)/1e3;return `${zt(e)}{--rmg-slider-initial-height:${n}px!important;--rmg-slider-row-height:${n}px!important;}`}function Kt(e){let t=e.skeletonSpec.layout;if(!t)return "";let n=e.skeletonSpec.mode??"fit",r=zt(e.scopeId),i$1=i(e.responsiveCount,e.fallbackCount,e.breakpointMap),o=Ot(t,e.breakpointMap),l=At(t,e.breakpointMap),a=$t(t,e.breakpointMap),c=Ft(t,e.breakpointMap),u=S=>{let g=e.fallbackCount;for(let v of i$1)S>=v.minWidth&&(g=v.count);return Math.max(1,g|0)},s=(S,g)=>{let v=Mt(t,S,n,g,e.breakpointMap),M=_t(t,S,n,g,e.breakpointMap),W=Pt(t,g,e.breakpointMap),O=e.centerFirstSpacer?Tt(t,S,n,g,e.breakpointMap):null;if(!v&&!M&&!W&&!O)return "";let N=[v?`--rmg-slider-initial-height:${v};`:"",M?`--rmg-slider-row-height:${M};`:"",W?`--rmg-slider-extras-height:${W};`:"",e.centerFirstSpacer?`--rmg-slider-center-first-spacer-width:${O??"0px"};`:""].join("");return `${r}{${N}}`};return Array.from(new Set([...i$1.map(S=>S.minWidth),...a,...l,...o,...c])).sort((S,g)=>S-g).map(S=>{let g=s(u(S),S);return g?S<=0?g:`@media (min-width:${S}px){${g}}`:""}).filter(Boolean).join(`
|
|
39
|
-
`)}function
|
|
40
|
-
`)}}):null,jsx(
|
|
37
|
+
}catch(e){}})();`}function Lt(e){if(e.slideCount<=0||e.skeletonSlotCount<=0)return "";let t=i(e.responsiveCount,e.fallbackCount,e.breakpointMap),n={scopeId:e.scopeId,storageKeyId:e.storageKeyId,ttlMs:e.ttlMs,slideCount:e.slideCount,skeletonSlotCount:e.skeletonSlotCount,maxSlots:e.maxSlots,loop:e.loop,activeSlotOffset:e.activeSlotOffset,countRules:t,dotStyles:e.dotStyles??[],viewportTolerancePx:Rt};return gn(n)}function f(e){if(e!=null)return typeof e=="number"?`${e}px`:e}function Pe(e){if(!e)return {};let t=f(e.margin),n=f(e.marginTop),r=f(e.marginRight),i=f(e.marginBottom),o=f(e.marginLeft),l={};return t!=null&&(l.margin=t),n!=null&&(l.marginTop=n),r!=null&&(l.marginRight=r),i!=null&&(l.marginBottom=i),o!=null&&(l.marginLeft=o),l}function kn(e,t){if(!(!e&&!t))return {...e||{},...t||{}}}function _e(e,t){let n=e.slots?.[t];return {item:n?.item??e.item,itemWrapStyle:kn(e.itemWrapStyle,n?.itemWrapStyle)}}function Oe(e,t){let n$1={};e?.aspectRatio!=null&&(n$1.aspectRatio=e.aspectRatio);let r=f(e?.width),i=f(e?.maxWidth),o=f(e?.height),l=f(e?.maxHeight);return r!=null&&(n$1.inlineSize=r,n$1.width=r),i!=null&&(n$1.maxInlineSize=i,n$1.maxWidth=i),o!=null&&(n$1.height=o),l!=null&&(n$1.maxHeight=l),e?.aspectRatio!=null&&e?.height==null&&(n$1.height="auto"),e?.aspectRatio!=null&&e?.width==null&&e?.height==null&&(n$1.inlineSize="100%",n$1.width="100%",n$1.height="auto"),e?.backgroundColor&&(n$1["--rmg-skel-bg"]=e.backgroundColor),e?.borderRadius!=null&&(n$1["--rmg-skel-radius"]=f(e.borderRadius)),e?.overflow!=null&&(n$1.overflow=e.overflow),e?.alignSelf&&(n$1.alignSelf=e.alignSelf),e?.scale!=null&&(n$1.transform=`scale(${e.scale})`),Object.assign(n$1,n(t)),n$1}function yn(e,t){let n={};t!=null&&(n.height=`${t}px`);let r=f(e?.width),i=f(e?.maxWidth);return r!=null&&(n.inlineSize=r,n.width=r),i!=null&&(n.maxInlineSize=i,n.maxWidth=i),e?.alignSelf&&(n.alignSelf=e.alignSelf),e?.scale!=null&&(n.transform=`scale(${e.scale})`),n}function Ye(e){return typeof e=="string"&&e.trim()==="max-content"}function xn(e){return !e||typeof e!="object"?false:Ye(e.width)?true:Object.values(e).some(n=>!!n&&typeof n=="object"&&Ye(n.width))}function vn(e){let t=Oe(e,void 0);return delete t["--rmg-skel-bg"],e?.backgroundColor!=null&&(t.backgroundColor=e.backgroundColor),e?.border!=null&&(t.border=e.border),e?.boxShadow!=null&&(t.boxShadow=e.boxShadow),e?.borderRadius!=null?(t.borderRadius=f(e.borderRadius),t.overflow=e?.overflow??"hidden"):e?.overflow!=null&&(t.overflow=e.overflow),t.boxSizing="border-box",t}function bn(e){if(!e)return {outerStyle:void 0,innerStyle:void 0};let t=vn(e),n={};return t.boxShadow!=null&&(n["--rmg-slider-skel-wrap-shadow"]=t.boxShadow,delete t.boxShadow),t.borderRadius!=null&&(n["--rmg-slider-skel-wrap-shadow-radius"]=t.borderRadius),{outerStyle:Object.keys(n).length?n:void 0,innerStyle:t}}function We(e){let t={};return e&&(e.position!=null&&(t.position=e.position),e.inset!=null&&(t.inset=f(e.inset)),e.insetBlock!=null&&(t.insetBlock=f(e.insetBlock)),e.insetInline!=null&&(t.insetInline=f(e.insetInline)),e.top!=null&&(t.top=f(e.top)),e.right!=null&&(t.right=f(e.right)),e.bottom!=null&&(t.bottom=f(e.bottom)),e.left!=null&&(t.left=f(e.left)),e.zIndex!=null&&(t.zIndex=e.zIndex),e.gap!=null&&(t.gap=f(e.gap)),e.padding!=null&&(t.padding=f(e.padding)),e.align&&(t.alignItems=e.align),e.justify&&(t.justifyContent=e.justify),e.wrap&&(t.flexWrap="wrap"),e.width!=null&&(t.width=f(e.width)),e.maxWidth!=null&&(t.maxWidth=f(e.maxWidth)),e.height!=null&&(t.height=f(e.height)),e.minHeight!=null&&(t.minHeight=f(e.minHeight)),e.maxHeight!=null&&(t.maxHeight=f(e.maxHeight)),e.backgroundColor!=null&&(t.backgroundColor=e.backgroundColor),e.borderRadius!=null&&(t.borderRadius=f(e.borderRadius)),e.border!=null&&(t.border=e.border),e.boxShadow!=null&&(t.boxShadow=e.boxShadow),e.margin!=null&&(t.margin=f(e.margin)),e.marginTop!=null&&(t.marginTop=f(e.marginTop)),e.marginRight!=null&&(t.marginRight=f(e.marginRight)),e.marginBottom!=null&&(t.marginBottom=f(e.marginBottom)),e.marginLeft!=null&&(t.marginLeft=f(e.marginLeft)),e.flex!=null&&(t.flex=e.flex),e.flexGrow!=null&&(t.flexGrow=e.flexGrow),e.flexShrink!=null&&(t.flexShrink=e.flexShrink),e.flexBasis!=null&&(t.flexBasis=f(e.flexBasis)),e.order!=null&&(t.order=e.order),e.alignSelf!=null&&(t.alignSelf=e.alignSelf),e.overflow!=null&&(t.overflow=e.overflow),e.transform!=null&&(t.transform=e.transform),e.pointerEvents!=null&&(t.pointerEvents=e.pointerEvents),e.opacity!=null&&(t.opacity=e.opacity)),t}function Ge(e){let t=Oe(e,void 0);return delete t["--rmg-skel-bg"],e?.backgroundColor!=null&&(t.backgroundColor=e.backgroundColor),e?.borderRadius!=null&&(t.borderRadius=f(e.borderRadius)),e?.overflow!=null&&(t.overflow=e.overflow),{...t,...Pe(e)}}function Pt(e){return e.replace(/"/g,'\\"')}function ae(e,t,n,r=a){switch(e.kind){case "rect":case "square":case "circle":{let i=x$1({style:e.style,breakpointMap:r});if(!i.length)return e;let o=t();return n.push({nodeId:o,rules:i}),{...e,__rmgNodeId:o}}case "text":{let i=[...k({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,fitContent:xn(e.style),breakpointMap:r}).map(l=>({...l,raw:true})),...y$1({style:e.style,breakpointMap:r})];if(!i.length)return e;let o=t();return n.push({nodeId:o,rules:i}),{...e,__rmgNodeId:o}}case "media":{let i=[...w({style:e.style,breakpointMap:r}),...x$1({style:e.tile?.style,breakpointMap:r,selector:`${b$2} [data-rmg-skel-media-tile="true"]`})];if(!i.length)return e;let o=t();return n.push({nodeId:o,rules:i}),{...e,__rmgNodeId:o}}case "sliderDots":{let i=[...w({style:e.style,breakpointMap:r}),...x$1({style:e.dotStyle,breakpointMap:r,selector:`${b$2} [data-rmg-skel-slider-dot]`}),...x$1({style:e.activeStyle,breakpointMap:r,selector:`${b$2} [data-rmg-skel-dot-active="true"]`}),...x$1({style:e.inactiveStyle,breakpointMap:r,selector:`${b$2} [data-rmg-skel-dot-active="false"]`})];if(!i.length)return e;let o=t();return n.push({nodeId:o,rules:i}),{...e,__rmgNodeId:o}}case "stack":case "row":case "col":{let i=w({style:e.style,breakpointMap:r}),o=i.length?t():void 0;o&&i.length&&n.push({nodeId:o,rules:i});let l=e.children.map(a=>ae(a,t,n,r));return {...e,...o?{__rmgNodeId:o}:null,children:l}}case "slider":{let i=w({style:e.style,breakpointMap:r}),o=i.length?t():void 0;o&&i.length&&n.push({nodeId:o,rules:i});let l=ae(e.item,t,n,r),a=e.children?.map(s=>ae(s,t,n,r)),c=e.overlays?.map(s=>ae(s,t,n,r)),u=e.slots?.map(s=>({...s,item:s.item?ae(s.item,t,n,r):void 0}));return {...e,...o?{__rmgNodeId:o}:null,item:l,children:a,overlays:c,slots:u}}default:return e}}function Rn(e,t){if(!t.length)return "";let n=[];for(let r of t){let i=`${e} [data-rmg-skel-node="${Pt(r.nodeId)}"]`;for(let o of r.rules){let l=o.raw?o.css.split("__NODE_SEL__").join(i):`${i}{${o.css}}`;o.minWidth<=0?n.push(l):n.push(`@media (min-width:${o.minWidth}px){${l}}`);}}return n.join(`
|
|
38
|
+
`)}function Cn(e){if(e.barWidths?.length)return e.barWidths;if(e.lineWidthsPx?.length)return e.lineWidthsPx.map(t=>`${Math.max(0,t)}px`)}function wn(e){return Math.max(1,Math.min(64,Math.trunc(e)))}function Y(e,t,n=a){if(!t)return e;if(e.kind==="text"){let r=e.textId?t[e.textId]:void 0;if(!r)return e;let i=wn(r.lines),o=Cn(r),l=typeof r.barHeight=="number"&&Number.isFinite(r.barHeight)?r.barHeight:typeof e.barHeight=="number"?e.barHeight:g(e.barHeight,0,0,n),a=typeof r.lineHeight=="number"&&Number.isFinite(r.lineHeight)?r.lineHeight:typeof e.lineHeight=="number"?e.lineHeight:h(e.lineHeight,1,0,n);return {...e,barHeight:l,lineHeight:a,lines:i,...o?.length?{barWidth:o}:null,lastBarWidth:o?.[Math.min(i,o.length)-1]??e.lastBarWidth}}return e.kind==="media"||e.kind==="sliderDots"?e:e.kind==="slider"?{...e,item:Y(e.item,t,n),children:e.children?.map(r=>Y(r,t,n)),overlays:e.overlays?.map(r=>Y(r,t,n)),slots:e.slots?.map(r=>({...r,item:r.item?Y(r.item,t,n):r.item}))}:e.kind==="stack"||e.kind==="row"||e.kind==="col"?{...e,children:e.children.map(r=>Y(r,t,n))}:e}function Q(e,t=new Set){return e?e.kind==="text"?(e.textId&&t.add(e.textId),t):e.kind==="media"||e.kind==="sliderDots"?t:e.kind==="slider"?(Q(e.item,t),e.children?.forEach(n=>Q(n,t)),e.overlays?.forEach(n=>Q(n,t)),e.slots?.forEach(n=>Q(n.item,t)),t):((e.kind==="stack"||e.kind==="row"||e.kind==="col")&&e.children.forEach(n=>Q(n,t)),t):t}function It(e){let{kind:t,style:n,shimmer:r,breakpointMap:i,mediaTile:o}=e,l={},a=s(n,i),c=e.__rmgNodeId;return t==="circle"&&(l.borderRadius="9999px"),t==="square"&&a?.aspectRatio==null&&(l.aspectRatio="1"),a?.aspectRatio!=null&&a?.height==null&&(l.height="auto"),jsx("div",{"data-rmg-skel-node":c,"data-rmg-skel-media-tile":o?"true":void 0,className:a$4.sliderSkeleton,style:{...Oe(a,r),...Pe(a),...l}})}function Nn({node:e,breakpointMap:t}){let n=j({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,breakpointMap:t}),r=s(e.style,t),i=n.states.some(({state:s})=>s.lineCount!==n.baseState.lineCount||s.metrics.totalHeight!==n.baseState.metrics.totalHeight||s.metrics.barHeight!==n.baseState.metrics.barHeight||s.metrics.paddingBlock!==n.baseState.metrics.paddingBlock||s.metrics.rowGap!==n.baseState.metrics.rowGap),o=n.states.some(({state:s})=>s.lineCount!==n.baseState.lineCount||s.barWidths.length!==n.baseState.barWidths.length||s.barWidths.some((S,m)=>S!==n.baseState.barWidths[m])),l=e.__rmgNodeId,a=yn(r,i?void 0:n.metrics.totalHeight),c={height:n.metrics.barHeight,backgroundColor:r?.backgroundColor,borderRadius:r?.borderRadius},u=Ye(r?.width);return jsx("div",{"data-rmg-skel-node":l,"data-rmg-skel-text":"true","data-rmg-skel-text-id":e.textId,className:a$4.sliderSkeletonText,style:{...a,...Pe(r),...i?null:{paddingBlock:`${n.metrics.paddingBlock}px`,rowGap:`${n.metrics.rowGap}px`}},children:Array.from({length:n.maxLines}).map((s,S)=>jsx("div",{"data-rmg-skel-text-line":"true",className:[a$4.sliderSkeleton,a$4.sliderSkeletonTextLine].join(" "),style:{...Oe(c,e.shimmer),...o?null:{display:S>=n.baseLines?"none":void 0,width:u?n.baseState.barWidths[S]??"100%":"100%",maxWidth:n.baseState.barWidths[S]??"100%"}}},S))})}function Me({node:e,breakpointMap:t$1,activeDotIndex:n$1}){switch(e.kind){case "rect":case "square":case "circle":return jsx(It,{...e,breakpointMap:t$1});case "media":{let r=Math.max(0,e.count|0),i=e.direction??"row",o=e.tile?.shape??"rect",l=e.__rmgNodeId,a=We(t(e.style,t$1));return jsx("div",{"data-rmg-skel-node":l,className:a$4.sliderSkeletonGroup,style:{display:"flex",flexDirection:i==="row"?"row":"column",...a||{}},children:Array.from({length:r}).map((c,u)=>jsx(It,{kind:o,style:e.tile?.style,shimmer:e.tile?.shimmer,breakpointMap:t$1,mediaTile:true},u))})}case "sliderDots":{let r=Math.max(0,e.count|0),i=e.__rmgNodeId,o=We(t(e.style,t$1)),l=Ge(s(e.dotStyle,t$1)),a=Ge(s(e.activeStyle,t$1)),c=Ge(s(e.inactiveStyle,t$1)),u=typeof n$1=="number"&&Number.isFinite(n$1)?Math.max(0,Math.min(r-1,Math.floor(n$1))):0;return jsx("div",{"data-rmg-skel-node":i,"data-rmg-skel-slider-dots":"true","data-rmg-skel-dot-active-style":JSON.stringify(a),"data-rmg-skel-dot-inactive-style":JSON.stringify(c),className:a$4.sliderSkeletonGroup,style:{display:"flex",flexDirection:"row",...o||{}},children:Array.from({length:r}).map((s,S)=>{let m=S===u;return jsx("div",{"data-rmg-skel-slider-dot":S,"data-rmg-skel-dot-active":m?"true":"false",className:a$4.sliderSkeleton,style:{...n(e.shimmer),...l,...m?a:c}},S)})})}case "stack":case "row":case "col":{let r=e.kind==="row"?"row":"column",i=e.__rmgNodeId,o=We(t(e.style,t$1));return jsx("div",{"data-rmg-skel-node":i,className:a$4.sliderSkeletonGroup,style:{display:"flex",flexDirection:r,...o||{}},children:e.children.map((l,a)=>jsx(Me,{node:l,breakpointMap:t$1,activeDotIndex:n$1},a))})}case "text":return jsx(Nn,{node:e,breakpointMap:t$1});default:return null}}function Wt(){return {layout:{kind:"slider",direction:"row",item:{kind:"rect",style:{width:"100%",height:"100%",borderRadius:2}},itemWrapStyle:void 0},radius:12}}function Te(e){return /%$/.test(e.trim())}function _t(e){let t=e.trim();if(!t.length)return null;if(t==="0")return {value:0,unit:"px"};let n=t.match(/^(\d+(?:\.\d+)?|\.\d+)([a-zA-Z]+)$/);if(!n)return null;let r=Number(n[1]);return !Number.isFinite(r)||r<0?null:{value:r,unit:n[2]}}function Ot(e){let t=[],n="",r=0;for(let i of e.trim()){if(/\s/.test(i)&&r===0){n&&(t.push(n),n="");continue}n+=i,i==="("?r+=1:i===")"&&(r=Math.max(0,r-1));}return n&&t.push(n),t}function Bn(e){let t=e.trim();return t.length?t==="0"?"0px":/^(?:var|calc|min|max|clamp)\(.+\)$/i.test(t)||_t(t)?t:null:null}function Hn(e){if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)&&e>=0?e===0?"0px":`${e}px`:null;for(let t of Ot(String(e))){let n=Bn(t);if(n)return n}return null}function _(e){return e==null?null:typeof e=="number"?`${e}px`:String(e)}function Ae(e,t){if(!e)return null;if(t===0)return "0px";if(e==="0px")return e;let n=_t(e);return n?`${n.value*t}${n.unit}`:`calc(${e} * ${t})`}function At(e){if(e==null)return null;if(typeof e=="number")return e>0?e:null;let t=String(e).trim(),n=t.match(/^(\d+(?:\.\d+)?)\s*\/\s*(\d+(?:\.\d+)?)$/);if(n){let i=Number(n[1]),o=Number(n[2]);return i>0&&o>0?i/o:null}let r=Number(t);return Number.isFinite(r)&&r>0?r:null}function y(e){let t=e.filter(r=>!!r&&r.trim().length>0);if(!t.length)return null;let n=t.filter(r=>{let i=r.trim();return i!=="0"&&i!=="0px"});return n.length?n.length===1?n[0]:`calc(${n.join(" + ")})`:"0px"}function Ne(e){let t=e.filter(n=>!!n&&n.trim().length>0);return t.length?t.length===1?t[0]:`max(${t.join(", ")})`:null}function En(e){let t=e.filter(n=>!!n&&n.trim().length>0);return t.length?t.length===1?t[0]:`min(${t.join(", ")})`:null}function fe(e,t){if(e.trim()==="0"||e.trim()==="0px"||t.trim()==="0"||t.trim()==="0px")return "0px";if(t.trim()==="1")return e;let n=Number(t);return Number.isFinite(n)?Ae(e,n)??`calc(${e} * ${t})`:`calc(${e} * ${t})`}function Ve(e,t){return t.trim()==="1"?e:`calc(${e} / ${t})`}function $t(e,t){return t.trim()==="0"||t.trim()==="0px"?e:`calc(${e} - ${t})`}function Ft(e,t){let n=_(t);return !e||!n?e:En([e,n])}function ue(e){let t=_(e?.margin),n=_(e?.marginTop),r=_(e?.marginBottom);return t&&!n&&!r?Ae(t,2):!t&&!n&&!r?null:y([n??t??"0px",r??t??"0px"])}function Dt(e){if(e==null)return null;let t=typeof e=="number"?`${e}px`:String(e).trim();if(!t.length)return null;let n=Ot(t);if(!n.length||n.length>4)return null;let[r,i,o,l]=n;return n.length===1?{top:r,right:r,bottom:r,left:r}:n.length===2?{top:r,right:i,bottom:r,left:i}:n.length===3?{top:r,right:i,bottom:o,left:i}:{top:r,right:i,bottom:o,left:l}}function jt(e){return Hn(e?.border)}function Ln(e){return Ae(jt(e),2)}function In(e){return Ae(jt(e),2)}function Z(e){let t=Dt(e?.padding);return t?y([t.top,t.bottom]):null}function qt(e){let t=Dt(e?.padding);return t?y([t.left,t.right]):null}function Be(e){return _(e?.gap)}function Mt(e,t){let n=qt(t);return !n||n==="0px"?e:$t(e,n)}function pe(e,t=0,n=a){return r(e,t,n)}function Xe(e,t,n,r,i=0,o=a){let l=pe(e.style,i,o),a=Be(l)??"0px",c=qt(l)??"0px",u=Math.max(1,t|0),s=u>1?fe(a,String(u-1)):"0px",S=`calc(100cqw - ${c} - ${s})`,{itemWrapStyle:m}=_e(e,n),p=m?.width?_(m.width):null,b;return r==="peek"&&p&&!Te(p)?b=p:b=Ve(S,String(u)),Ft(b,m?.maxWidth)??b}function Wn(e,t,n,r,i=0,o=a){let l=Xe(e,t,n,r,i,o),{itemWrapStyle:a}=_e(e,n),c=Ln(a);return !c||c==="0px"?l:$t(l,c)}function Mn(e$1,t=0,n=a){let r=e(d(e$1.rowHeightCompensation,n),t);return r==null||!Number.isFinite(r)||r<=0?null:`${r}px`}function Kt(e,t,n,r=0,i=a){let o=pe(e.style,r,i),l=Be(o)??"0px",a=Z(o)??"0px",c=Mn(e,r,i),u=Math.max(1,t|0),s=e.direction??"row",S=Array.from({length:u},(p,b)=>{let{item:P,itemWrapStyle:E}=_e(e,b),F=Xe(e,u,b,n,r,i),O=Wn(e,u,b,n,r,i),w=he(P,O,r,i),N=In(E),g=ue(E),M=y([N,g]),L=null,I=null;if(w&&!Te(w)&&(I=y([w,N,g])),E){let D=_(E.height);if(D)L=y([D,g]);else {let A=At(E.aspectRatio);A?L=y([Ve(F,String(A)),g]):L=M;}}return w?L?Te(w)?L:Ne([L,I??w]):w:L}),m=s==="row"?(()=>{let p=e.initialHeightSlot;if(p==null)return Ne(S);let b=Math.min(Math.max(0,Math.trunc(p)),Math.max(0,u-1));return S[b]??Ne(S)})():y([y(S),u>1?fe(l,String(u-1)):"0px"]);return y([m,a,c])}function zt(e,t=0,n=a){return y((e.children??[]).map(r=>he(r,"100cqw",t,n)))}function he(e,t,n=0,r=a){if(e.kind==="rect"||e.kind==="square"||e.kind==="circle"){let i=q(e.style,n,r),o=_(i?.height),l=At(i?.aspectRatio);if(o)return y([o,ue(i)]);if(l){let a=_(i?.width),c=a&&!Te(a)?a:t,u=Ft(c,i?.maxWidth)??c,s=String(l),S=Ve(u,s);return y([S,ue(i)])}return ue(i)??null}if(e.kind==="media"){let i=e.direction??"row",o=pe(e.style,n,r),l=Be(o)??"0px",a=Math.max(0,e.count|0),c=Mt(t,o),u=e.tile?{kind:e.tile.shape??"rect",style:e.tile.style,shimmer:e.tile.shimmer}:{kind:"rect",style:{width:"100%",height:"100%"}},s=he(u,c,n,r);return s?i==="row"?y([s,Z(o)]):a<=1?y([s,Z(o)]):y([fe(s,String(a)),fe(l,String(a-1)),Z(o)]):null}if(e.kind==="sliderDots"){let i=pe(e.style,n,r),o=q(e.dotStyle,n,r),l=q(e.activeStyle,n,r),a=q(e.inactiveStyle,n,r),c=[o,l,a].map(s=>y([_(s?.height),ue(s)])).filter(s=>!!s),u=Ne(c);return u?y([u,Z(i)]):Z(i)}if(e.kind==="row"||e.kind==="col"||e.kind==="stack"){let i=e.kind==="row"?"row":"col",o=pe(e.style,n,r),l=Be(o)??"0px",a=Z(o)??"0px",c=Mt(t,o),u=e.children.map(s=>he(s,c,n,r));if(i==="row"){let s=Ne(u);return s?y([s,a]):null}else {let s=u.filter(m=>!!m);if(!s.length)return a;let S=s.length>1?fe(l,String(s.length-1)):"0px";return y([y(s)??null,S,a])}}if(e.kind==="text"){let i=q(e.style,n,r),o=d$1({barHeight:g(e.barHeight,typeof e.barHeight=="number"?e.barHeight:0,n,r),lineHeight:h(e.lineHeight,typeof e.lineHeight=="number"?e.lineHeight:1,n,r),lines:f$2(e.lines,1,n,r)});return y([`${o.totalHeight}px`,ue(i)])}return null}function Gt(e,t,n,r=0,i=a){let o=e.kind==="slider"?e:null;if(!o)return he(e,"100cqw",r,i);let l=Kt(o,t,n,r,i),a=zt(o,r,i);return y([l,a])}function Yt(e,t=0,n=a){let r=e.kind==="slider"?e:null;return r?zt(r,t,n):null}function Vt(e,t,n,r=0,i=a){let o=e.kind==="slider"?e:null;if(!o||n!=="peek")return null;let l=Math.max(1,t|0);if(l<=1)return null;let a=pe(o.style,r,i),c=Be(a)??"0px",u=Array.from({length:l-1},(S,m)=>Xe(o,l,m+1,n,r,i)),s=l>2?fe(c,String(l-2)):null;return y([...u,s])}function Xt(e,t,n,r=0,i=a){let o=e.kind==="slider"?e:null;return o?Kt(o,t,n,r,i):he(e,"100cqw",r,i)}function ce(e,t,n=a){switch(e.kind){case "rect":case "square":case "circle":case "media":case "sliderDots":return;case "text":for(let r of i$1({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,breakpointMap:n}))t.add(r);return;case "stack":case "row":case "col":for(let r of e.children)ce(r,t,n);return;case "slider":ce(e.item,t,n);for(let r of e.children??[])ce(r,t,n);for(let r of e.overlays??[])ce(r,t,n);for(let r of e.slots??[])r.item&&ce(r.item,t,n);return;default:return e}}function de(e,t,n=a){switch(e.kind){case "rect":case "square":case "circle":u(e.style,t,n);return;case "media":u(e.tile?.style,t,n);return;case "sliderDots":u(e.dotStyle,t,n),u(e.activeStyle,t,n),u(e.inactiveStyle,t,n);return;case "text":u(e.style,t,n);return;case "stack":case "row":case "col":for(let r of e.children)de(r,t,n);return;case "slider":de(e.item,t,n);for(let r of e.children??[])de(r,t,n);for(let r of e.overlays??[])de(r,t,n);for(let r of e.slots??[])r.item&&de(r.item,t,n);return;default:return e}}function Ie(e,t,n=a){u(e,t,n);}function Se(e,t,n=a){switch(e.kind){case "rect":case "square":case "circle":case "text":return;case "media":Ie(e.style,t,n);return;case "sliderDots":Ie(e.style,t,n);return;case "stack":case "row":case "col":Ie(e.style,t,n);for(let r of e.children)Se(r,t,n);return;case "slider":Ie(e.style,t,n),Se(e.item,t,n);for(let r of e.children??[])Se(r,t,n);for(let r of e.overlays??[])Se(r,t,n);for(let r of e.slots??[])r.item&&Se(r.item,t,n);return;default:return e}}function me(e,t,n=a){switch(e.kind){case "rect":case "square":case "circle":case "media":case "sliderDots":case "text":return;case "stack":case "row":case "col":for(let r of e.children)me(r,t,n);return;case "slider":for(let r of d(e.rowHeightCompensation,n))t.add(r.minWidth);me(e.item,t,n);for(let r of e.children??[])me(r,t,n);for(let r of e.overlays??[])me(r,t,n);for(let r of e.slots??[])r.item&&me(r.item,t,n);return;default:return e}}function Jt(e,t=a){let n=new Set;return ce(e,n,t),Array.from(n).filter(r=>r>0).sort((r,i)=>r-i)}function Ut(e,t=a){let n=new Set;return Se(e,n,t),Array.from(n).filter(r=>r>0).sort((r,i)=>r-i)}function Zt(e,t=a){let n=new Set;return de(e,n,t),Array.from(n).filter(r=>r>0).sort((r,i)=>r-i)}function Qt(e,t=a){let n=new Set;return me(e,n,t),Array.from(n).filter(r=>r>0).sort((r,i)=>r-i)}function en({count:e,maxSlots:t$1,activeDotIndex:n$1,rowStyle:r,spec:i,breakpoints:o,centerFirst:l=false,hasLeadingSpacer:a$2=false,responsiveCssScopeSelector:c,cacheSnapshot:u}){let s=i??Wt(),S=x.useMemo(()=>({...a,...o??{}}),[o]),m=x.useMemo(()=>{let d=s.layout??Wt().layout;return u?.text?Y(d,u.text,S):d},[u,S,s.layout]),p=x.useMemo(()=>a$1("ssk_",{breakpoints:S,centerFirst:l,count:e,hasLeadingSpacer:a$2,maxSlots:t$1,rowStyle:r,spec:s}),[l,e,S,a$2,t$1,r,s]),b=x.useMemo(()=>`[data-rmg-slider-skel-scope="${Pt(p)}"]`,[p]),P=c??b,E={...r||{},...n(s.shimmer)};s.backgroundColor&&(E["--rmg-skel-bg"]=s.backgroundColor),s.radius!=null&&(E["--rmg-skel-radius"]=f(s.radius));let{layout:F,responsiveCss:O}=x.useMemo(()=>{let d=0,R=()=>`n${++d}`,j=[],q=ae(m,R,j,S),te=Rn(P,j);return {layout:q,responsiveCss:te}},[m,P,S]),w=F,N=w.__rmgNodeId,g=We(t(w.style,S)),M=w.count!=null?Math.max(0,w.count|0):Math.max(0,e|0),L=w.direction??"row",I=w.children??[],D=w.overlays??[],A=l&&L==="row",W=a$2&&L==="row",h=w.itemStretch??true,He=Math.max(0,t$1|0),Ee=s.mode??"fit";return jsxs("div",{"data-rmg-slider-skel-scope":c?void 0:p,"data-rmg-skel-mode":Ee,"data-rmg-skel-has-extras":I.length?"true":void 0,className:[a$4.sliderSkeletonOverlay,s.className].filter(Boolean).join(" "),style:s.style,"data-rmg-skel-part":"overlay",children:[O?jsx("style",{dangerouslySetInnerHTML:{__html:O}}):null,jsxs("div",{className:a$4.sliderSkeletonLayout,"data-rmg-skel-part":"layout","data-rmg-skel-has-extras":I.length?"true":void 0,children:[jsx("div",{"data-rmg-skel-node":N,className:a$4.sliderSkeletonRow,"data-rmg-skel-part":"row",style:{...E,...g||{},display:"flex",flexDirection:L==="row"?"row":"column",...A?{justifyContent:"center"}:null},children:Array.from({length:He}).map((d,R)=>{let j=W&&R===0,q=W?R-1:R,te=j?{item:{kind:"rect",style:{width:"100%",height:"100%",backgroundColor:"transparent"},shimmer:{enabled:false}},itemWrapStyle:{width:"var(--rmg-slider-center-first-spacer-width, 0px)",height:0}}:_e(w,q),K=te.itemWrapStyle,{outerStyle:ne,innerStyle:ke}=bn(K);return jsx("div",{className:a$4.sliderSkeletonItem,"data-rmg-skel-slot":R+1,"data-rmg-skel-visible-count":M,"data-rmg-skel-center-first-spacer":j?"true":void 0,style:{boxSizing:"border-box",...K?Pe(K):null,...ne??null,...L==="col"?{flex:"0 0 auto",height:"auto"}:h?{height:"100%"}:{alignSelf:"flex-start",height:"auto"},minWidth:0,minHeight:0},children:jsx("div",{className:a$4.sliderSkeletonItemInner,style:{...ke??null,...L==="row"&&!h?{height:"auto"}:null},children:jsx(Me,{node:te.item,breakpointMap:S,activeDotIndex:n$1})})},`rmg-slider-skel-${R}`)})}),I.length?jsx("div",{className:a$4.sliderSkeletonExtras,"data-rmg-skel-part":"extras",children:I.map((d,R)=>jsx(Me,{node:d,breakpointMap:S,activeDotIndex:n$1},`rmg-slider-skel-extra-${R}`))}):null]}),D.length?jsx("div",{className:a$4.sliderSkeletonOverlays,"data-rmg-skel-part":"overlays",children:D.map((d,R)=>jsx(Me,{node:d,breakpointMap:S,activeDotIndex:n$1},`rmg-slider-skel-overlay-${R}`))}):null]})}function Ze(e){return !!e&&typeof e=="object"&&!("kind"in e)&&"layout"in e&&e.layout?.kind==="slider"}function tn(e){return !!e&&typeof e=="object"&&"kind"in e&&e.kind==="slider"}function Tn(e){if(Ze(e))return e;let{mode:t,centering:n,className:r,visibleCount:i,backgroundColor:o,radius:l,shimmer:a,...c}=e;return {mode:t,centering:n,className:r,visibleCount:i,backgroundColor:o,radius:l,shimmer:a,layout:c}}function nn(e){if(!e||typeof e!="object"||Array.isArray(e))return {};let t={};for(let[n,r]of Object.entries(e))r!=null&&(typeof r=="string"||typeof r=="number"||typeof r=="boolean")&&(t[n]=r);return t}function ge(e,t=[]){return !e||typeof e!="object"?t:e.kind==="sliderDots"?(t.push({activeStyle:nn(e.activeStyle),inactiveStyle:nn(e.inactiveStyle)}),t):e.kind==="slider"?(ge(e.item,t),e.children?.forEach?.(n=>ge(n,t)),e.overlays?.forEach?.(n=>ge(n,t)),e.slots?.forEach?.(n=>ge(n.item,t)),t):(e.children?.forEach?.(n=>ge(n,t)),t)}function Je(e,t,n){return i(e,t,n).reduce((r,i)=>Math.max(r,i.count),0)}function Pn(e,t){let n=Math.max(0,Math.floor(e));return n<=0?[]:n===1?t>=2?[2]:[]:Array.from({length:Math.min(t,n+1)},(r,i)=>i+1)}function rn(e){return `[data-rmg-scope="${e}"] > [data-rmg-scope-shell="true"]`}function Ue(e){typeof document>"u"||document.querySelectorAll("style[data-rmg-slider-restore-style]").forEach(t=>{t.getAttribute("data-rmg-slider-restore-style")===e&&t.remove();});}function _n(e,t){if(t==null||!Number.isFinite(t)||t<=0)return "";let n=Math.round((t+Number.EPSILON)*1e3)/1e3;return `${rn(e)}{--rmg-slider-initial-height:${n}px!important;--rmg-slider-row-height:${n}px!important;}`}function on(e){let t=e.skeletonSpec.layout;if(!t)return "";let n=e.skeletonSpec.mode??"fit",r=rn(e.scopeId),i$1=i(e.responsiveCount,e.fallbackCount,e.breakpointMap),o=Jt(t,e.breakpointMap),l=Ut(t,e.breakpointMap),a=Zt(t,e.breakpointMap),c=Qt(t,e.breakpointMap),u=m=>{let p=e.fallbackCount;for(let b of i$1)m>=b.minWidth&&(p=b.count);return Math.max(1,p|0)},s=(m,p)=>{let b=Gt(t,m,n,p,e.breakpointMap),P=Xt(t,m,n,p,e.breakpointMap),E=Yt(t,p,e.breakpointMap),F=e.centerFirstSpacer?Vt(t,m,n,p,e.breakpointMap):null;if(!b&&!P&&!E&&!F)return "";let O=[b?`--rmg-slider-initial-height:${b};`:"",P?`--rmg-slider-row-height:${P};`:"",E?`--rmg-slider-extras-height:${E};`:"",e.centerFirstSpacer?`--rmg-slider-center-first-spacer-width:${F??"0px"};`:""].join("");return `${r}{${O}}`};return Array.from(new Set([...i$1.map(m=>m.minWidth),...a,...l,...o,...c])).sort((m,p)=>m-p).map(m=>{let p=s(u(m),m);return p?m<=0?p:`@media (min-width:${m}px){${p}}`:""}).filter(Boolean).join(`
|
|
39
|
+
`)}function Qe({layout:e,children:t,breakpoints:n$1,className:r,style:i,shellClassName:o,shellStyle:l$1,contentClassName:a$4,contentStyle:c$1,backgroundColor:u,radius:s,shimmer:S,disableShimmer:m,ariaLabel:p,ready:b$2,enabled:P,force:E,timing:F,restore:O,cache:w}){let N=x.useMemo(()=>({...a,...n$1??{}}),[n$1]),g=x.useMemo(()=>a$1("skel_",{layout:e,breakpoints:N,backgroundColor:u,radius:s,shimmer:S,disableShimmer:m}),[e,N,u,s,S,m]),M=x.useMemo(()=>tn(e)||Ze(e)?Tn(e):null,[e]),L=b(),I=c(w,L),D=x.useMemo(()=>Array.from(Q(M?.layout)),[M]),A=f$1(I?.snapshot,{key:I?.key,scopeId:g,kind:"slider",routeKey:I?.routeKey,ttlMs:I?.ttlMs,textIds:D}),W=x.useMemo(()=>!A?.text||!M?.layout?M:{...M,layout:Y(M.layout,A.text,N)},[N,M,A]),h=W?.layout?.kind==="slider"?W.layout:null,He=x.useRef(null),Ee=x.useRef(null);a$2({cache:I,kind:"slider",scopeId:g,textIds:D,skeletonRootRef:He,shellRef:Ee});let d=O?.kind==="slider"?O:null,R=d?.slider?.handleRef??null,j=d&&d.enabled!==false&&d.slider?.handleRef?[d.key??"",d.itemCount,JSON.stringify(d.visibleCount??null),d.loop===true?"loop":"no-loop",d.activeSlotOffset??""].join(":"):"",q=j!=="",[te,K]=x.useState(()=>!q),[ne,ke]=x.useState(null),[et,$e]=x.useState(null),ln=b$2===true&&(!q||te),tt=!!h,T=d?.visibleCount??(tn(e)?e.visibleCount:void 0)??(Ze(e)?e.visibleCount:void 0)??(typeof h?.count=="number"?h.count:void 0),V=typeof T=="number"?Math.max(1,T|0):typeof h?.count=="number"?Math.max(1,h.count|0):1,nt=!!h&&W?.centering==="first"&&(W?.mode??"fit")==="peek",X=nt&&Je(T,V,N)>1,ye=Array.isArray(h?.slots)&&h.slots.length>0?h.slots.length:Math.max(d?.itemCount??0,typeof h?.count=="number"?h.count:0,V),xe=h?Math.max(12,X?ye+1:ye,X?Je(T,V,N)+1:Je(T,V,N)):0,B=x.useMemo(()=>{if(!d||d.enabled===false||!tt)return null;let v=Math.max(0,Math.floor(d.itemCount));return v<=0||ye<=0?null:{enabled:true,storageKeyId:typeof d.key=="string"&&d.key.trim()?d.key.trim():g,ttlMs:typeof d.ttlMs=="number"&&Number.isFinite(d.ttlMs)?Math.max(0,d.ttlMs):bt,slideCount:v,skeletonSlotCount:Math.max(v,ye)}},[tt,g,d?.enabled,d?.itemCount,d?.key,d?.ttlMs,ye]),J=x.useMemo(()=>h?a$3({scopeId:g,responsiveCount:T,fallbackCount:V,breakpointMap:N,maxSlots:xe,visibleSlotsForCount:X?Pn:void 0,slotOrderForCount:ne==null||!B?.enabled||!d?void 0:v=>Et({activeIndex:ne,visibleCount:v,slotCount:B.skeletonSlotCount,loop:d.loop===true,activeSlotOffset:d.activeSlotOffset??(typeof h.initialHeightSlot=="number"?h.initialHeightSlot:0)})}):{cssText:"",ssrBaseCount:V},[N,g,X,V,h,xe,d,ne,B,T]),rt=x.useMemo(()=>!h||!W?"":on({scopeId:g,skeletonSpec:W,responsiveCount:T,fallbackCount:J.ssrBaseCount,breakpointMap:N,centerFirstSpacer:X}),[N,g,X,J.ssrBaseCount,h,W,T]),it=x.useMemo(()=>!B?.enabled||!d||!h?"":Lt({scopeId:g,storageKeyId:B.storageKeyId,ttlMs:B.ttlMs,slideCount:B.slideCount,skeletonSlotCount:B.skeletonSlotCount,maxSlots:xe,loop:d.loop===true,activeSlotOffset:d.activeSlotOffset??(typeof h.initialHeightSlot=="number"?h.initialHeightSlot:0),responsiveCount:T,fallbackCount:J.ssrBaseCount,breakpointMap:N,dotStyles:ge(h)}),[N,g,J.ssrBaseCount,h,xe,d?.activeSlotOffset,d?.enabled,d?.loop,B,T]),ot=x.useMemo(()=>_n(g,et),[g,et]),Fe=x.useRef(null);x.useLayoutEffect(()=>{K(!q),ke(null),$e(null);},[q,j]),x.useLayoutEffect(()=>{if(!B?.enabled||!R||typeof window>"u")return;let v=null,$=false,ve=()=>{if($)return;let U=R.current;if(!U){v=window.requestAnimationFrame(ve);return}let z=Bt(B,window,{requireNavigationRestore:false});if(!z){Ue(g),ke(null),$e(null),K(true);return}ke(z.index),$e(z.heightPx??null),Ue(g);let je=[B.storageKeyId,z.timestamp,z.index,z.heightPx??""].join(":");if(Fe.current!==je&&U.setIndex(z.index,"instant"),Fe.current===je){K(true);return}if(!U.isReady()){v=window.requestAnimationFrame(ve);return}if(!R.current?.isReady()){v=window.requestAnimationFrame(ve);return}Fe.current=je,v=window.requestAnimationFrame(()=>{v=null,!$&&(R.current?.setIndex(z.index,"instant"),v=window.requestAnimationFrame(()=>{v=null,!$&&(v=window.requestAnimationFrame(()=>{v=null,$||K(true);}));}));});};return ve(),()=>{$=true,v!=null&&window.cancelAnimationFrame(v),Ue(g);}},[g,R,B]),x.useEffect(()=>{if(!B?.enabled||!R||typeof window>"u")return;let v=()=>{let $=R.current;if(!$)return;let U=$.getViewportNode()?.getBoundingClientRect().height;Ht(B,{index:$.getIndex(),slideCount:B.slideCount,skeletonSlotCount:B.skeletonSlotCount,heightPx:U&&U>0?U:void 0});};return window.addEventListener("pagehide",v),window.addEventListener("beforeunload",v),()=>{v(),window.removeEventListener("pagehide",v),window.removeEventListener("beforeunload",v);}},[R,B]);let sn={position:"relative",width:"100%",minWidth:0,minHeight:"var(--rmg-slider-initial-height, var(--rmg-slider-height, 320px))",overflow:"hidden",...i,...u?{"--rmg-skel-bg":u}:null,...s!=null?{"--rmg-skel-radius":l(s)}:null,...m?null:n(S)},De=h&&W?jsxs("div",{"data-rmg-skeleton-scope":g,ref:He,className:r,style:sn,"aria-hidden":p?void 0:true,"aria-label":p,role:p?"status":void 0,"aria-live":p?"polite":void 0,children:[J.cssText||rt||ot?jsx("style",{dangerouslySetInnerHTML:{__html:[J.cssText,rt,ot].filter(Boolean).join(`
|
|
40
|
+
`)}}):null,jsx(en,{count:J.ssrBaseCount,maxSlots:xe,activeDotIndex:ne??void 0,spec:W,breakpoints:N,centerFirst:nt,hasLeadingSpacer:X,responsiveCssScopeSelector:`[data-rmg-scope="${g}"]`,cacheSnapshot:A}),it?jsx("script",{dangerouslySetInnerHTML:{__html:it}}):null]}):null,lt={containerType:"inline-size",width:"100%"},an=h?{minHeight:"var(--rmg-slider-initial-height, var(--rmg-slider-height, 320px))"}:null;return De?t===void 0?jsx("div",{"data-rmg-scope":g,style:lt,children:jsx("div",{"data-rmg-scope-shell":"true",style:{minHeight:"var(--rmg-slider-initial-height, var(--rmg-slider-height, 320px))"},children:De})}):jsx("div",{"data-rmg-scope":g,style:lt,children:jsx(b$1,{skeletonNode:De,ready:ln,enabled:P,force:E,timing:F,shellClassName:o,shellStyle:l$1,loadingShellStyle:an,contentClassName:a$4,contentStyle:c$1,contentOwnsWrapperLayout:true,shellDataAttributes:{"data-rmg-scope-shell":"true"},shellRef:Ee,children:t})}):null}export{Qe as Skeleton,Qe as SliderSkeleton,on as buildScopedInitialHeightCss,Qe as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-motion-gallery",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.39",
|
|
4
4
|
"description": "Composable React media gallery primitives for sliders, grids, masonry, fullscreen, video, zoom/pan, and stable skeleton loading",
|
|
5
5
|
"license": "PolyForm-Noncommercial-1.0.0",
|
|
6
6
|
"author": "React Motion Gallery",
|
package/dist/chunk-4RPAI2F7.mjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import {b}from'./chunk-P6NLW2QN.mjs';import {n,l,B as B$1,C,p,t,m,a as a$2,D,v,o}from'./chunk-45TZO7MN.mjs';import {f,c,d,e}from'./chunk-Y7NUGXTR.mjs';import {a as a$1}from'./chunk-UUAWLGWO.mjs';import {a,i}from'./chunk-HK2DPKES.mjs';import*as $ from'react';import {jsx,jsxs}from'react/jsx-runtime';var R={gridSkeletonOverlay:"Re",gridSkeletonGrid:"Se",gridSkeletonItem:"K",gridSkeletonItemInner:"Te"};function B(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}function re(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}function ue(e,t){let o=t[e];if(typeof o=="number"&&Number.isFinite(o))return o;let r=parseFloat(e);return Number.isNaN(r)?0:r}function Se(e){let{templateColumns:t,breakpointMap:o}=e;if(!re(t))return [];let r=Object.entries(t).map(([s,i])=>({minWidth:ue(s,o),template:typeof i=="string"?i.trim():""})).filter(s=>s.template.length>0).sort((s,i)=>s.minWidth-i.minWidth);return r.length===0?[]:(r[0].minWidth>0?r.unshift({minWidth:0,template:r[0].template}):r[0].minWidth<0&&(r[0]={...r[0],minWidth:0}),r)}function ce(e){let{scopeId:t,columns:o,templateColumns:r,gap:s,breakpointMap:i$1,fallbackGap:c}=e,u=`${`[data-rmg-grid-skel-scope="${v(t)}"]`} .${R.gridSkeletonGrid}`,p=[],d=(n,l)=>{if(!l.length)return;let y=`${u}{${l.join("")}}`;if(n<=0){p.push(y);return}p.push(`@media (min-width:${n}px){${y}}`);},a=Se({templateColumns:r,breakpointMap:i$1});if(a.length>0)for(let n of a)d(n.minWidth,[`grid-template-columns:${n.template};`]);else if(B(o)){let n=i(o,1,i$1);for(let l of n)d(l.minWidth,[`grid-template-columns:repeat(${Math.max(1,l.count|0)}, minmax(0, 1fr));`]);}if(B(s)){let n=i(s,c,i$1);for(let l of n)d(l.minWidth,[`--rmg-grid-gap:${Math.max(0,l.count|0)}px;`]);}return p.join(`
|
|
2
|
-
`)}function ye(e$1){let{scopeId:t,items:o,breakpointMap:r,allowSpan:s}=e$1;if(!s)return "";let i=[],c$1=`[data-rmg-grid-skel-scope="${v(t)}"]`;for(let m of o){let u=m.span;if(!c(u))continue;let p=`${c$1} [data-rmg-grid-item-key="${v(m.id)}"]`,d$1=d(u,r);for(let a of d$1){let n=e(a.span);if(!n)continue;let l=`${p}{grid-column:${n};}`;if(a.minWidth<=0){i.push(l);continue}i.push(`@media (min-width:${a.minWidth}px){${l}}`);}}return i.join(`
|
|
3
|
-
`)}function ke(e){let t={...e.gridStyle||{}};return e.minColumnWidth!=null&&t["--rmg-grid-min"]==null&&(t["--rmg-grid-min"]=typeof e.minColumnWidth=="number"?`${e.minColumnWidth}px`:e.minColumnWidth),!B(e.gap)&&e.gap!=null&&t["--rmg-grid-gap"]==null&&(t["--rmg-grid-gap"]=typeof e.gap=="number"?`${Math.max(0,e.gap|0)}px`:String(e.gap)),!re(e.templateColumns)&&typeof e.templateColumns=="string"&&e.templateColumns.trim().length>0&&t.gridTemplateColumns==null?t.gridTemplateColumns=e.templateColumns.trim():e.templateColumns==null&&!B(e.columns)&&typeof e.columns=="number"&&Number.isFinite(e.columns)&&t.gridTemplateColumns==null&&(t.gridTemplateColumns=`repeat(${Math.max(1,e.columns|0)}, minmax(0, 1fr))`),t}function oe(){return {layout:{kind:"grid",item:{kind:"rect",style:{width:"100%",aspectRatio:1,borderRadius:12}},itemWrapStyle:void 0},radius:12}}function ge(e,t){if(!(!e&&!t))return {...e||{},...t||{}}}function fe(e,t){let o=e.slots?.[t];return {item:o?.item??e.item,itemWrapStyle:ge(e.itemWrapStyle,o?.itemWrapStyle)}}function he(e){if(!e)return {outerStyle:void 0,innerStyle:void 0};let t=o(e),o$1={};return t.boxShadow!=null&&(o$1["--rmg-grid-skel-wrap-shadow"]=t.boxShadow,delete t.boxShadow),t.borderRadius!=null&&(o$1["--rmg-grid-skel-wrap-shadow-radius"]=t.borderRadius),{outerStyle:Object.keys(o$1).length?o$1:void 0,innerStyle:t}}function ie({count:e,gridStyle:t$1,spec:o,breakpoints:r,columns:s,templateColumns:i,minColumnWidth:c,gap:m$1,items:u,allowItemSpans:p$1,disableShimmer:d}){let a$3=o??oe(),n$1=$.useMemo(()=>({...a,...r??{}}),[r]),l$1=a$3.layout??oe().layout,y=$.useMemo(()=>a$1("gskel_",{count:e,breakpoints:n$1,gridStyle:t$1,spec:o,columns:s,templateColumns:i,minColumnWidth:c,gap:m$1,items:u,allowItemSpans:p$1,disableShimmer:d}),[e,n$1,t$1,o,s,i,c,m$1,u,p$1,d]),C$1={...ke({gridStyle:t$1,columns:s,templateColumns:i,minColumnWidth:c,gap:m$1}),...d?null:n(a$3.shimmer,{enabledVarName:"--rmg-skel-card-shimmer-enabled"})};a$3.backgroundColor&&(C$1["--rmg-skel-bg"]=a$3.backgroundColor),a$3.radius!=null&&(C$1["--rmg-skel-radius"]=l(a$3.radius));let{layout:A,responsiveCss:x,itemLayouts:S}=$.useMemo(()=>{let k=0,f=()=>`n${++k}`,G=[],b=B$1(l$1,f,G,"grid",n$1),v=C({scopeAttr:"data-rmg-grid-skel-scope",scopeId:y,rules:G}),N=l$1,j=Array.from({length:Math.max(0,typeof N.count=="number"?N.count|0:e|0)},(Re,E)=>({id:`slot-${E}`,span:N.slots?.[E]?.span})),z=u??j,ae=ce({scopeId:y,columns:s,templateColumns:i,gap:m$1,breakpointMap:n$1,fallbackGap:typeof m$1=="number"&&Number.isFinite(m$1)?m$1:8}),pe=ye({scopeId:y,items:z,breakpointMap:n$1,allowSpan:!!p$1}),de=[v,ae,pe].filter(Boolean).join(`
|
|
4
|
-
`);return {layout:b,responsiveCss:de,itemLayouts:z}},[l$1,y,n$1,s,i,m$1,u,p$1]),g=A,O=g.__rmgNodeId,h=p(t(g.style,n$1)),M=g.count!=null?Math.max(0,g.count|0):Math.max(0,e|0);return jsxs("div",{"data-rmg-grid-skel-scope":y,className:[R.gridSkeletonOverlay,a$3.className].filter(Boolean).join(" "),children:[x?jsx("style",{dangerouslySetInnerHTML:{__html:x}}):null,jsx("div",{"data-rmg-skel-node":O,className:R.gridSkeletonGrid,style:{...C$1,...h||{},display:"grid"},children:Array.from({length:M}).map((k,f$1)=>{let G=S[f$1],{item:b,itemWrapStyle:v}=fe(g,f$1),{outerStyle:N,innerStyle:j}=he(v);return jsx("div",{"data-rmg-grid-item-key":G?.id,className:R.gridSkeletonItem,style:{...f({span:G?.span,allowSpan:!!p$1})||{},...v?m(v):null,...N||null},children:jsx("div",{className:[R.gridSkeletonItemInner,d?null:a$2.skelCardShimmer].filter(Boolean).join(" "),style:j,children:jsx(D,{node:b,disableShimmer:true,breakpointMap:n$1})})},`rmg-grid-skel-${f$1}`)})})]})}function le(e){return !!e&&typeof e=="object"&&!("kind"in e)&&"layout"in e&&e.layout?.kind==="grid"}function se(e){return !!e&&typeof e=="object"&&"kind"in e&&e.kind==="grid"}function be(e){if(le(e))return e;let{className:t,backgroundColor:o,radius:r,shimmer:s,gridStyle:i,columns:c,templateColumns:m,minColumnWidth:u,gap:p,items:d,allowItemSpans:a,...n}=e;return {className:t,backgroundColor:o,radius:r,shimmer:s,layout:n}}function Ae({layout:e,children:t,breakpoints:o,className:r,style:s,shellClassName:i,shellStyle:c,contentClassName:m,contentStyle:u,backgroundColor:p,radius:d,shimmer:a$2,disableShimmer:n$1,ariaLabel:l$1,ready:y,enabled:C,force:A,timing:x,grid:S}){let g=$.useMemo(()=>({...a,...o??{}}),[o]),O=$.useMemo(()=>a$1("skel_",{layout:e,breakpoints:g,backgroundColor:p,radius:d,shimmer:a$2,disableShimmer:n$1,grid:S}),[e,g,p,d,a$2,n$1,S]),h=$.useMemo(()=>se(e)||le(e)?be(e):null,[e]),M=h?.layout?.kind==="grid"?h.layout:null,k=se(e)?e:null,f=h?{count:S?.count??(typeof M?.count=="number"?Math.max(0,M.count|0):1),gridStyle:S?.style??k?.gridStyle,columns:S?.columns??k?.columns,templateColumns:S?.templateColumns??k?.templateColumns,minColumnWidth:S?.minColumnWidth??k?.minColumnWidth,gap:S?.gap??k?.gap,items:S?.items??k?.items,allowItemSpans:S?.allowItemSpans??k?.allowItemSpans,disableShimmer:n$1}:null,G={...s,...p?{"--rmg-skel-bg":p}:null,...d!=null?{"--rmg-skel-radius":l(d)}:null,...n$1?null:n(a$2)},b$1=h&&f?jsx("div",{"data-rmg-skeleton-scope":O,className:r,style:G,"aria-hidden":l$1?void 0:true,"aria-label":l$1,role:l$1?"status":void 0,"aria-live":l$1?"polite":void 0,children:jsx(ie,{...f,spec:h,breakpoints:g})}):null;return b$1?jsx(b,{skeletonNode:b$1,ready:y,enabled:C,force:A,timing:x,shellClassName:i,shellStyle:c,contentClassName:m,contentStyle:u,contentOwnsWrapperLayout:t!==void 0,children:t}):null}export{Ae as a};
|
package/dist/chunk-EWWWD475.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var N=1,T=6e5,I=250,K="rmg_skel_cache",p=/^(?:0|[1-9]\d{0,4})(?:\.\d{1,3})?(?:px|%)$/;function g(n){return !!n&&typeof n=="object"&&!Array.isArray(n)}function l(n,e){let t=Number(n);return !Number.isFinite(t)||e?.min!=null&&t<e.min||e?.max!=null&&t>e.max?null:e?.integer?Math.trunc(t):t}function f(n){return typeof n=="string"&&n.trim()?n.trim():null}function P(n){let e=f(n);return !e||!p.test(e)?null:e}function b(n,e){if(!Array.isArray(n)||e?.maxLength!=null&&n.length>e.maxLength)return;let t=[];for(let r of n){let i=l(r,{min:e?.min,max:e?.max});if(i==null)return;t.push(Math.round(i*1e3)/1e3);}return t}function W(n){if(Array.isArray(n)){let[s,h,o,c,a,m]=n,w=l(s,{min:1,max:64,integer:true});if(w==null)return null;let y=b(h,{maxLength:64,min:0,max:1e4}),k=o==null?void 0:l(o,{min:0,max:1e3}),S=c==null?void 0:l(c,{min:0,max:10}),C=a==null?void 0:l(a,{min:0,max:1e5}),x=Array.isArray(m)?m.map(P):void 0;return h!=null&&!y||o!=null&&k==null||c!=null&&S==null||a!=null&&C==null||x&&x.some(H=>!H)?null:{lines:w,...y?.length?{lineWidthsPx:y}:null,...k!=null?{barHeight:k}:null,...S!=null?{lineHeight:S}:null,...C!=null?{containerWidthPx:C}:null,...x?.length?{barWidths:x}:null}}if(!g(n))return null;let e=l(n.lines,{min:1,max:64,integer:true});if(e==null)return null;let t=Array.isArray(n.barWidths)?n.barWidths.map(P):void 0;if(t&&t.some(s=>!s))return null;let r=b(n.lineWidthsPx,{maxLength:64,min:0,max:1e4}),i=n.barHeight==null?void 0:l(n.barHeight,{min:0,max:1e3}),u=n.lineHeight==null?void 0:l(n.lineHeight,{min:0,max:10}),d=n.containerWidthPx==null?void 0:l(n.containerWidthPx,{min:0,max:1e5});return n.barHeight!=null&&i==null||n.lineHeight!=null&&u==null||n.containerWidthPx!=null&&d==null?null:{lines:e,...t?.length?{barWidths:t}:null,...r?.length?{lineWidthsPx:r}:null,...i!=null?{barHeight:i}:null,...u!=null?{lineHeight:u}:null,...d!=null?{containerWidthPx:d}:null}}function E(n){if(!g(n))return null;let e={};for(let[t,r]of Object.entries(n)){let i=f(t);if(!i)return null;let u=W(r);if(!u)return null;e[i]=u;}return e}function _(n){if(n==null)return;if(!g(n))return null;let e=f(n.variantKey??n.v);if(!e)return null;let t=(n.shellHeightPx??n.h)==null?void 0:l(n.shellHeightPx??n.h,{min:0,max:1e5}),r=b(n.itemHeightsPx??n.i,{maxLength:500,min:0,max:1e5});return (n.shellHeightPx??n.h)!=null&&t==null||(n.itemHeightsPx??n.i)!=null&&!r?null:{variantKey:e,...t!=null?{shellHeightPx:t}:null,...r?.length?{itemHeightsPx:r}:null}}function A(n){try{return decodeURIComponent(n)}catch{return n}}function M(n){let e=5381;for(let t=0;t<n.length;t++)e=(e<<5)+e^n.charCodeAt(t);return (e>>>0).toString(36)}function O(n){return n.trim().replace(/[^a-zA-Z0-9_-]+/g,"_").replace(/^_+|_+$/g,"").slice(0,48)||"default"}function L(n){if(!g(n)||(n.version??n.v)!==1)return null;let e=f(n.key??n.k),t=f(n.scopeId??n.s),r=n.kind??n.d,i=r==="s"||r==="skeleton"?"skeleton":r==="m"||r==="masonry"?"masonry":null,u=l(n.createdAt??n.t,{min:1}),d=l(n.widthBucketMin??n.b,{min:0,max:1e5}),s=l(n.viewportWidth??n.w,{min:1,max:1e5}),h=n.layoutWidthPx??n.l,o=h==null?void 0:l(h,{min:0,max:1e5}),c=(n.routeKey??n.r)==null?void 0:f(n.routeKey??n.r),a=E(n.text??n.x),m=_(n.masonry??n.m);return !e||!t||!i||u==null||d==null||s==null||h!=null&&o==null||(n.routeKey??n.r)!=null&&!c||!a||m===null?null:{version:1,key:e,scopeId:t,kind:i,...c?{routeKey:c}:null,createdAt:u,widthBucketMin:d,viewportWidth:s,...o!=null?{layoutWidthPx:o}:null,...m?{masonry:m}:null,text:a}}function z(n){let e=typeof n=="string"&&n.trim()?n.trim():"default";return `${K}_${O(e)}_${M(e)}`}function B(n){let e={};for(let[t,r]of Object.entries(n.text)){let i=[r.lines,r.lineWidthsPx?.length?r.lineWidthsPx:void 0,r.barHeight,r.lineHeight,r.containerWidthPx,r.barWidths?.length?r.barWidths:void 0];for(;i.length>1&&i[i.length-1]==null;)i.pop();e[t]=i;}return JSON.stringify({v:1,k:n.key,s:n.scopeId,d:n.kind==="masonry"?"m":"s",...n.routeKey?{r:n.routeKey}:null,t:n.createdAt,b:n.widthBucketMin,w:n.viewportWidth,...n.layoutWidthPx!=null?{l:n.layoutWidthPx}:null,...n.masonry?{m:{v:n.masonry.variantKey,...n.masonry.shellHeightPx!=null?{h:n.masonry.shellHeightPx}:null,...n.masonry.itemHeightsPx?.length?{i:n.masonry.itemHeightsPx}:null}}:null,x:e})}function R(n,e={}){if(!n)return null;let t=typeof e.ttlMs=="number"&&Number.isFinite(e.ttlMs)?Math.max(0,e.ttlMs):6e5,i=(typeof e.now=="number"&&Number.isFinite(e.now)?e.now:Date.now())-n.createdAt;if(t>0&&(i<0||i>t)||e.key!=null&&n.key!==e.key||e.scopeId!=null&&n.scopeId!==e.scopeId||e.kind!=null&&n.kind!==e.kind||e.routeKey!=null&&n.routeKey!==e.routeKey||e.widthBucketMin!=null&&n.widthBucketMin!==e.widthBucketMin)return null;if(e.textIds?.length){for(let u of e.textIds)if(!n.text[u])return null}return e.variantKeys?.length&&n.masonry?.variantKey&&!e.variantKeys.includes(n.masonry.variantKey)||e.itemCount!=null&&n.masonry?.itemHeightsPx&&n.masonry.itemHeightsPx.length!==e.itemCount?null:n}function F(n,e={}){if(!n)return null;let t;try{t=JSON.parse(A(n));}catch{return null}return R(L(t),e)}function $(n=typeof window<"u"?window.location:void 0){return n?`${n.pathname}${n.search}`:""}export{N as a,T as b,I as c,z as d,B as e,R as f,F as g,$ as h};
|
package/dist/chunk-MLE7BKAD.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {n,w,x,b as b$2,k,y,t,j,s}from'./chunk-45TZO7MN.mjs';import {b as b$1,a}from'./chunk-Z34PSRMG.mjs';import {a as a$4}from'./chunk-UUAWLGWO.mjs';import {a as a$1}from'./chunk-LVYED5ZM.mjs';import {d}from'./chunk-WMG2LTLR.mjs';import {a as a$3}from'./chunk-L2HRIINV.mjs';import {a as a$2}from'./chunk-HK2DPKES.mjs';import*as b from'react';import {jsx,jsxs}from'react/jsx-runtime';function Ht(){let e=window.innerWidth||document.documentElement.clientWidth||0,t=window.innerHeight||document.documentElement.clientHeight||0;return {top:0,left:0,right:e,bottom:t,width:e,height:t}}function le(e,t){return e?e.endsWith("%")?t*parseFloat(e)/100:parseFloat(e)||0:0}function Nt(e,t){let n=e.trim().split(/\s+/).filter(Boolean),[r,i=r,o=r,a=i]=[n[0]??"0px",n[1],n[2],n[3]];return {top:le(r,t.height),right:le(i,t.width),bottom:le(o,t.height),left:le(a,t.width)}}function Xe(e,t,n){let r=e.getBoundingClientRect();if(r.width<=0||r.height<=0)return 0;let i=t instanceof Element?t.getBoundingClientRect():Ht(),o=Nt(n,i),a={top:i.top-o.top,left:i.left-o.left,right:i.right+o.right,bottom:i.bottom+o.bottom},l=Math.max(0,Math.min(r.right,a.right)-Math.max(r.left,a.left)),p=Math.max(0,Math.min(r.bottom,a.bottom)-Math.max(r.top,a.top)),v=l*p,R=r.width*r.height;return R>0?v/R:0}function Ye(e,t){return t<=0?e>0:e>=t}function Bt(e,t){if(Array.isArray(e)){let n=e[0];return typeof n=="number"?n:t}return typeof e=="number"?e:t}function Qe(e,t){let n=t?.nearMargin??"700px 0px",r=t?.viewMargin??"0px 0px",i=Bt(t?.threshold,.01),o=0,a=t?.root??null,[l,p]=b.useState(()=>Array.from({length:e},()=>false)),[v,R]=b.useState(()=>Array.from({length:e},()=>false)),y=b.useRef(null),u=b.useRef(null),s=b.useRef(new Map),M=b.useRef([]),x=b.useCallback((g,c)=>{if(typeof window>"u"||!g)return;let d=Xe(g,a,n);Ye(d,i)&&p(w=>{if(w[c])return w;let E=w.slice();return E[c]=true,E});let k=Xe(g,a,r);Ye(k,o)&&R(w=>{if(w[c])return w;let E=w.slice();return E[c]=true,E});},[o,n,i,a,r]);b.useEffect(()=>{M.current=Array.from({length:e},()=>null),p(Array.from({length:e},()=>false)),R(Array.from({length:e},()=>false)),s.current.clear(),y.current?.disconnect(),u.current?.disconnect(),y.current=null,u.current=null;},[e]),b.useEffect(()=>{if(!(typeof window>"u")){if(y.current?.disconnect(),u.current?.disconnect(),typeof IntersectionObserver>"u"){for(let[g,c]of s.current.entries())x(g,c);return}y.current=new IntersectionObserver(g=>{p(c=>{let d=c,k=false;for(let w of g){let E=s.current.get(w.target);if(E==null||E<0||E>=e)continue;let h=!!w.isIntersecting;h!==c[E]&&(k||(d=c.slice(),k=true),d[E]=h);}return k?d:c});},{root:a,rootMargin:n,threshold:i}),u.current=new IntersectionObserver(g=>{R(c=>{let d=c,k=false;for(let w of g){let E=s.current.get(w.target);E==null||E<0||E>=e||w.isIntersecting&&!c[E]&&(k||(d=c.slice(),k=true),d[E]=true);}return k?d:c});},{root:a,rootMargin:r,threshold:o});for(let[g]of s.current)y.current.observe(g),u.current.observe(g);for(let[g,c]of s.current.entries())x(g,c);return ()=>{y.current?.disconnect(),u.current?.disconnect(),y.current=null,u.current=null;}}},[o,e,n,i,a,x,r]);let P=b.useCallback(g=>c=>{let d=M.current[g]??null;d&&d!==c&&(s.current.delete(d),y.current?.unobserve(d),u.current?.unobserve(d)),M.current[g]=c,c&&(s.current.set(c,g),x(c,g),y.current?.observe(c),u.current?.observe(c));},[x]);return {nearView:l,everInView:v,setEntryRef:P}}function Ot(e){let t=e??[],n=`${t.length}|`;for(let r=0;r<t.length;r++){let i=t[r];n+=(i?.key??i?.id??`i${r}`)+"|";}return n}function At(e,t){return new Promise(n=>{let r=new Image;r.decoding="async",r.src=e;let i=()=>n();if(t?.aborted)return i();if(t?.addEventListener("abort",i,{once:true}),typeof r.decode=="function"){r.decode().catch(()=>{}).finally(i);return}if(r.complete)return i();r.onload=i,r.onerror=i;})}function Je(e,t,n,r){let i=r?.timeoutMs??8e3,o=b.useMemo(()=>Ot(t),[t]),a=b.useMemo(()=>(t??[]).map(s=>(s.media??[]).filter(M=>M?.kind==="image"&&typeof M?.src=="string").map(M=>M.src)),[t]),[l,p]=b.useState([]),v=b.useRef([]),R=b.useRef(new Map),y=b.useRef("");return b.useEffect(()=>{if(!e)return;let u=t?.length??0;if(y.current!==o){y.current=o,p(Array.from({length:u},(s,M)=>(a[M]?.length??0)===0)),v.current=Array.from({length:u},()=>false);for(let[,s]of R.current)s.abort();R.current.clear();}},[e,o,t,a]),b.useEffect(()=>{if(!e)return;let u=t?.length??0;if(u)for(let s=0;s<u;s++){let M=!!n[s],x=l[s]??false,P=v.current[s]??false;if(!M||x||P)continue;v.current[s]=true;let g=a[s]??[];if(!g.length){p(d=>{if(d[s])return d;let k=d.slice();return k[s]=true,k});continue}let c=new AbortController;R.current.set(s,c),(async()=>{for(let d of g){if(c.signal.aborted)return;await Promise.race([At(d,c.signal),new Promise(k=>{let w=window.setTimeout(k,i);c.signal.addEventListener("abort",()=>{window.clearTimeout(w),k();},{once:true});})]);}c.signal.aborted||p(d=>{if(!d||s<0||s>=d.length||d[s])return d;let k=d.slice();return k[s]=true,k});})();}},[e,t,a,n,l,i]),b.useEffect(()=>()=>{for(let[,u]of R.current)u.abort();R.current.clear();},[]),{decodedReady:l,entriesKey:o}}function Wt(e){if(e!=null)return typeof e=="number"?`${e}px`:e}function Ze(e){return b.useMemo(()=>{let t=e.loading??{},n=typeof t.nearMargin=="string"?t.nearMargin:"700px 0px",r=typeof t.viewMargin=="string"?t.viewMargin:"0px 0px",i=typeof t.threshold=="number"&&!Number.isNaN(t.threshold)?t.threshold:.01,o=t.waitForDecode!==false,a=typeof t.decodeTimeoutMs=="number"&&t.decodeTimeoutMs>0?t.decodeTimeoutMs:8e3,l=Wt(t.minHeight)??"260px";return {enabled:t.enabled,force:t.force,skeleton:t.skeleton,minHeight:l,nearMargin:n,viewMargin:r,threshold:i,waitForDecode:o,decodeTimeoutMs:a,skeletonWrap:t.skeletonWrap}},[e.loading])}function et(e){return b.useMemo(()=>{let t=e.intro??{};return {renderIntro:t.renderIntro,staggerMs:t.staggerMs??200,durationMs:t.durationMs??700,easing:t.easing??"cubic-bezier(.2,.7,.2,1)",staggerLimit:Math.max(0,(t.staggerLimit??6)|0)}},[e.intro])}var S={entryRow:"t",entrySkeletonWrap:"e",entrySkeletonBody:"W",entryInner:"c",entrySkelTile:"n",entryList:"ee",entrySkelRoot:"re",entrySkelGroup:"ie",entrySkelStack:"ae",entrySkelRow:"te",entrySkelCol:"ne",entrySkelText:"oe",entrySkelTextLine:"se",entrySkelRect:"le",entrySkelSquare:"de",entrySkelCircle:"me"};function Ft(){return {variant:"solid",minHeight:260}}function L(e){if(e!=null)return typeof e=="number"?`${e}px`:e}function Ee(e){if(!e)return {};let t=L(e.marginTop),n=L(e.marginRight),r=L(e.marginBottom),i=L(e.marginLeft),o={};return t!=null&&(o.marginTop=t),n!=null&&(o.marginRight=n),r!=null&&(o.marginBottom=r),i!=null&&(o.marginLeft=i),o}function ot(e,t){let n$1={};return e?.aspectRatio!=null&&(n$1.aspectRatio=e.aspectRatio),e?.width!=null&&(n$1.width=L(e.width)),e?.maxWidth!=null&&(n$1.maxWidth=L(e.maxWidth)),e?.height!=null&&(n$1.height=L(e.height)),e?.maxHeight!=null&&(n$1.maxHeight=L(e.maxHeight)),e?.aspectRatio!=null&&e?.height==null&&(n$1.height="auto"),e?.aspectRatio!=null&&e?.width==null&&e?.height==null&&(n$1.width="100%"),e?.backgroundColor&&(n$1["--rmg-skel-bg"]=e.backgroundColor),e?.borderRadius!=null&&(n$1["--rmg-skel-radius"]=L(e.borderRadius)),e?.overflow!=null&&(n$1.overflow=e.overflow),e?.alignSelf&&(n$1.alignSelf=e.alignSelf),Object.assign(n$1,n(t)),n$1}function tt(e,t){let n={};t!=null&&(n.height=`${t}px`);let r=L(e?.width),i=L(e?.maxWidth);return r!=null&&(n.width=r),i!=null&&(n.maxWidth=i),e?.alignSelf&&(n.alignSelf=e.alignSelf),n}function nt(e){let t={};return e&&(e.display!=null&&(t.display=e.display),e.gap!=null&&(t.gap=L(e.gap)),e.padding!=null&&(t.padding=L(e.padding)),e.align&&(t.alignItems=e.align),e.justify&&(t.justifyContent=e.justify),e.wrap&&(t.flexWrap="wrap"),e.width!=null&&(t.width=L(e.width)),e.maxWidth!=null&&(t.maxWidth=L(e.maxWidth)),e.overflow!=null&&(t.overflow=e.overflow)),t}function rt(e){return e.replace(/"/g,'\\"')}function at(e,t,n,r=a$2){switch(e.kind){case "rect":case "square":case "circle":{let i=x({style:e.style,breakpointMap:r});if(!i.length)return e;let o=t();return n.push({nodeId:o,rules:i}),{...e,__rmgNodeId:o}}case "text":{let i=[...k({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,responsiveBy:e.responsiveBy,breakpointMap:r}).map(a=>({...a,raw:true})),...y({style:e.style,breakpointMap:r})];if(!i.length)return e;let o=t();return n.push({nodeId:o,rules:i}),{...e,__rmgNodeId:o}}case "media":{let i=[...w({style:e.style,breakpointMap:r}),...x({style:e.tile?.style,breakpointMap:r,selector:`${b$2} [data-rmg-skel-media-tile="true"]`})];if(!i.length)return e;let o=t();return n.push({nodeId:o,rules:i}),{...e,__rmgNodeId:o}}case "stack":case "row":case "col":{let i=w({style:e.style,breakpointMap:r}),o=i.length?t():void 0;o&&i.length&&n.push({nodeId:o,rules:i});let a=e.children.map(l=>at(l,t,n,r));return {...e,...o?{__rmgNodeId:o}:null,children:a}}default:return e}}function _t(e,t){if(!t.length)return "";let n=`[data-rmg-entry-skel-scope="${rt(e)}"]`,r=[];for(let i of t){let o=`${n} [data-rmg-skel-node="${rt(i.nodeId)}"]`;for(let a of i.rules){let l=a.raw?a.css.split("__NODE_SEL__").join(o):`${o}{${a.css}}`;a.minWidth<=0?r.push(l):a.query==="container"?r.push(`@container (min-width:${a.minWidth}px){${l}}`):r.push(`@media (min-width:${a.minWidth}px){${l}}`);}}return r.join(`
|
|
2
|
-
`)}function it(e){let{kind:t,style:n,shimmer:r,breakpointMap:i,mediaTile:o}=e,a=t==="circle"?S.entrySkelCircle:t==="square"?S.entrySkelSquare:S.entrySkelRect,l=s(n,i),p=e.__rmgNodeId;return jsx("div",{"data-rmg-skel-node":p,"data-rmg-skel-media-tile":o?"true":void 0,className:[S.entrySkelTile,a].join(" "),style:{...ot(l,r),...Ee(l)}})}function Dt({node:e,breakpointMap:t}){let n=j({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,responsiveBy:e.responsiveBy,breakpointMap:t}),r=s(e.style,t),i=n.responsiveBy==="container"&&n.usesResponsiveBarCss,o=n.states.some(({state:y})=>y.lineCount!==n.baseState.lineCount||y.metrics.totalHeight!==n.baseState.metrics.totalHeight||y.metrics.barHeight!==n.baseState.metrics.barHeight||y.metrics.paddingBlock!==n.baseState.metrics.paddingBlock||y.metrics.rowGap!==n.baseState.metrics.rowGap),a=n.states.some(({state:y})=>y.lineCount!==n.baseState.lineCount||y.barWidths.length!==n.baseState.barWidths.length||y.barWidths.some((u,s)=>u!==n.baseState.barWidths[s])),l=e.__rmgNodeId,p=tt(i?void 0:r,o?void 0:n.metrics.totalHeight),v={height:n.metrics.barHeight,backgroundColor:r?.backgroundColor,borderRadius:r?.borderRadius},R=jsx("div",{"data-rmg-skel-node":l,"data-rmg-skel-text":"true",className:S.entrySkelText,style:{...p,...i?null:Ee(r),...o?null:{paddingBlock:`${n.metrics.paddingBlock}px`,rowGap:`${n.metrics.rowGap}px`}},children:Array.from({length:n.maxLines}).map((y,u)=>jsx("div",{"data-rmg-skel-text-line":"true",className:[S.entrySkelTile,S.entrySkelTextLine].join(" "),style:{...ot(v,e.shimmer),...a?null:{display:u>=n.baseLines?"none":void 0,width:"100%",maxWidth:n.baseState.barWidths[u]??"100%"}}},u))});return i?jsx("div",{"data-rmg-skel-text-container":"true",style:{...tt(r),...Ee(r),containerType:"inline-size"},children:R}):R}function st({node:e,breakpointMap:t$1}){switch(e.kind){case "rect":case "square":case "circle":return jsx(it,{...e,breakpointMap:t$1});case "media":{let n=Math.max(0,e.count|0),r=e.direction??"row",i=e.tile?.shape??"rect",o=e.__rmgNodeId,a=nt(t(e.style,t$1));return jsx("div",{"data-rmg-skel-node":o,className:[S.entrySkelGroup,r==="row"?S.entrySkelRow:S.entrySkelCol].join(" "),style:a,children:Array.from({length:n}).map((l,p)=>jsx(it,{kind:i,style:e.tile?.style,shimmer:e.tile?.shimmer,breakpointMap:t$1,mediaTile:true},p))})}case "stack":case "row":case "col":{let n=e.kind==="row"?S.entrySkelRow:e.kind==="col"?S.entrySkelCol:S.entrySkelStack,r=e.__rmgNodeId,i=nt(t(e.style,t$1));return jsx("div",{"data-rmg-skel-node":r,className:[S.entrySkelGroup,n].join(" "),style:i,children:e.children.map((o,a)=>jsx(st,{node:o,breakpointMap:t$1},a))})}case "text":return jsx(Dt,{node:e,breakpointMap:t$1});default:{return null}}}function lt({spec:e,className:t,breakpoints:n$1}){let r=e??Ft(),i=b.useMemo(()=>({...a$2,...n$1??{}}),[n$1]),o={...r.minHeight!=null?{minHeight:L(r.minHeight)}:null,...n(r.defaults?.shimmer)};if(r.defaults?.backgroundColor&&(o["--rmg-skel-bg"]=r.defaults.backgroundColor),r.defaults?.radius!=null&&(o["--rmg-skel-radius"]=L(r.defaults.radius)),r.variant==="solid"&&!r.layout)return jsx("div",{className:[S.entrySkelTile,t].filter(Boolean).join(" "),style:o});let a=b.useMemo(()=>({kind:"stack",style:{gap:12},children:[{kind:"rect",style:{height:18,width:"60%"}},{kind:"rect",style:{height:14,width:"90%"}},{kind:"media",count:2,direction:"row",style:{gap:10,wrap:true}}]}),[]),l=r.layout??a,p=b.useMemo(()=>a$4("skel_",{breakpoints:i,className:t,layout:l,minHeight:r.minHeight,variant:r.variant}),[t,i,l,r.minHeight,r.variant]),{layout:v,responsiveCss:R}=b.useMemo(()=>{let y=0,u=()=>`n${++y}`,s=[],M=at(l,u,s,i),x=_t(p,s);return {layout:M,responsiveCss:x}},[l,p,i]);return jsxs("div",{"data-rmg-entry-skel-scope":p,className:[S.entrySkelRoot,t].filter(Boolean).join(" "),style:o,children:[R?jsx("style",{dangerouslySetInnerHTML:{__html:R}}):null,jsx(st,{node:v,breakpointMap:i})]})}var Vt=220,$t=220;function Kt(e){let t=b$1({loadingActive:e.loadingActive&&e.shouldMountContent,loadingForced:e.loadingForced,contentReady:e.contentReady}),n=a(e.loadingForced),r=e.loadingActive&&n.enabled;return {compareMode:t.compareMode,revealContent:t.compareMode?true:r?false:e.defaultReveal,loadingLayerOpacity:t.loadingLayerOpacity}}function qt(e){if(!e)return;let t={...e};return t.boxShadow!=null&&(t["--rmg-entry-skel-wrap-shadow"]=t.boxShadow,delete t.boxShadow),t.borderRadius!=null&&(t["--rmg-entry-skel-wrap-shadow-radius"]=t.borderRadius),t}function ct(e,t){return String(e.key??e.id??t)}function dt(e){return e?e.split("\0"):[]}function ce(e,t){if(e.size===0)return e;let n=new Set(dt(t)),r=false,i=new Set;return e.forEach(o=>{n.has(o)?i.add(o):r=true;}),r?i:e}function zt(e,t){let n=false,r=new Set(e);return t.forEach(i=>{r.has(i)||(r.add(i),n=true);}),n?r:e}function ut({enabled:e,entries:t,fsEnabled:n,openFullscreenAt:r,entryFlatIndexRef:i,nodeFromMedia:o,renderMediaContainer:a$2,breakpoints:l,registerExpandableImage:p,entrySliderRefs:v}){let y=b.useRef(null),u=b.useRef(false),s=f=>{f.button!=null&&f.button!==0||(u.current=false,y.current={x:f.clientX,y:f.clientY});},M=f=>{let m=y.current;if(!m)return;let C=f.clientX-m.x,O=f.clientY-m.y;!u.current&&C*C+O*O>=36&&(u.current=true);},x=()=>{y.current=null,window.setTimeout(()=>{u.current=false;},0);},P=()=>u.current;function g(f,m){let C=t?.loading?.skeleton;if(typeof C=="function"){let O=C({entry:f,entryIndex:m});if(O&&typeof O=="object")return O}else if(C&&typeof C=="object")return C;return {variant:"solid",minHeight:260}}let c=t.items??[],d=c.length,k=b.useMemo(()=>c.map((f,m)=>ct(f,m)),[c]),w=k.join("\0"),[E,h]=b.useState(()=>new Set),[B,$]=b.useState(()=>new Set);b.useEffect(()=>{h(f=>ce(f,w)),$(f=>ce(f,w));},[w]);let G=b.useRef(0),U=b.useRef([]);U.current.length!==d&&(U.current=Array.from({length:d},()=>-1),G.current=0);let D=Ze(t),F=et(t),de=t?.loading,ft=de?.enabled??true,re=a(de?.force),ie=a$1(),A=e&&ft,ue=A&&!ie&&(F.durationMs>0||F.staggerMs>0),{nearView:Me,everInView:yt,setEntryRef:gt}=Qe(d,{root:null,nearMargin:D.nearMargin,viewMargin:D.viewMargin,threshold:D.threshold}),pt=A&&(!re.enabled||re.showContent),{decodedReady:ht}=Je(pt,c,Me,{timeoutMs:D.decodeTimeoutMs}),me=Math.max(0,(ie?0:Vt)-$t),[Rt,fe]=b.useState(()=>!(A&&(re.enabled||d===0))),St=b.useCallback(f=>{h(m=>{if(m.has(f))return m;let C=new Set(m);return C.add(f),C});},[]),X=false,xe=false,Ce=[],kt=d?c.map((f,m)=>{let C=Me[m]??false,O=yt[m]??false,Y=ht[m]??false,j=O||C,bt=j&&(D.waitForDecode?Y:true),wt=A?O&&(D.waitForDecode?Y:true):j,V=Kt({loadingActive:A,loadingForced:de?.force,shouldMountContent:j,contentReady:bt,defaultReveal:wt}),Q=k[m]??ct(f,m),ae=V.revealContent,se=ae&&(!ue||V.compareMode||B.has(Q));V.compareMode&&(xe=true),ae&&(X=true);let Et=se&&!V.compareMode&&E.has(Q);ae&&!V.compareMode&&Ce.push(Q);let Te=null;if(j){let J=f.media??[],It=i.current,Tt=J.map((Ae,Z)=>{let We=It?.[m]?.[Z]??0,ye=typeof t.render?.media=="function"?t.render.media({entry:f,entryIndex:m,media:Ae,mediaIndex:Z}):o(Ae),ge=W=>{p?.(We,W);},Pe=W=>{W.preventDefault(),n&&r(We,W.currentTarget);};if(b.isValidElement(ye)){let W=ye,Fe=W.props?.onClick,ee=W.ref,_e=_=>{typeof Fe=="function"&&Fe(_),!_.defaultPrevented&&Pe(_);};if(typeof W.type=="string"){let _=K=>{typeof ee=="function"?ee(K):ee&&typeof ee=="object"&&(ee.current=K),ge(K);};return b.cloneElement(W,{key:`${m}-${Z}`,onClick:K=>{if(P()){K.preventDefault(),K.stopPropagation();return}_e(K);},onPointerDownCapture:s,onPointerMoveCapture:M,onPointerUpCapture:x,ref:_})}return jsx("span",{ref:ge,style:{display:"contents"},onPointerDownCapture:s,onPointerMoveCapture:M,onPointerUpCapture:x,children:b.cloneElement(W,{onClick:_=>{if(P()){_.preventDefault(),_.stopPropagation();return}_e(_);}})},`${m}-${Z}`)}return jsx("div",{className:S.entryMediaButton,onClick:Pe,ref:ge,children:ye},`${m}-${Z}`)}),Oe=a$2({entryIndex:m,entryInView:se,mediaNodes:Tt,entrySliderRefs:v});Te=typeof t.render?.card=="function"?t.render.card({entry:f,entryIndex:m,media:Oe}):Oe;}let He=F.staggerLimit,vt=He>0&&m<He?m:0,Mt=typeof t.render?.skeleton=="function"?t.render.skeleton({entry:f,entryIndex:m}):null,xt=g(f,m),Ne=D.skeletonWrap,Ct=qt(Ne?.style);ae&&U.current[m]===-1&&(U.current[m]=G.current++);let Be=U.current[m],Lt=Be>=0?Be*F.staggerMs:0;return jsxs("div",{ref:gt(m),"data-rmg-entry-ready":se?"1":"0","data-rmg-entry-compare":V.compareMode?"1":"0","data-rmg-entry-mounted":j?"1":"0",className:[S.entryRow,t.entryRow?.className].filter(Boolean).join(" "),"data-rmg-entry-owner":m,style:{"--rmg-entry-min-height":D.minHeight,"--rmg-entry-intro-index":vt,"--rmg-entry-intro-delay":`${Lt}ms`,...t.entryRow?.style},children:[A?jsx("div",{className:[S.entrySkeletonWrap,Ne?.className].filter(Boolean).join(" "),style:{"--rmg-entry-skeleton-opacity":V.loadingLayerOpacity,...Ct??{}},"aria-hidden":"true","data-rmg-entry-skeleton":true,"data-rmg-entry-shimmer":Et?"off":void 0,onTransitionEnd:J=>{J.currentTarget!==J.target||J.propertyName!=="opacity"||!se||V.compareMode||St(Q);},children:jsx("div",{className:S.entrySkeletonBody,children:Mt??jsx(lt,{spec:xt,breakpoints:l})})}):null,j?jsx("div",{className:S.entryInner,children:Te}):null]},Q)}):null,z=Ce.join("\0");b.useEffect(()=>{h(f=>ce(f,z)),$(f=>ce(f,z));},[z]),b.useEffect(()=>{if(!z)return;let f=dt(z),m=false,C=()=>{m||$(j=>zt(j,f));};if(!ue){C();return}if(typeof window>"u"||typeof window.requestAnimationFrame!="function"){C();return}let O=0,Y=0;return O=window.requestAnimationFrame(()=>{Y=window.requestAnimationFrame(C);}),()=>{m=true,window.cancelAnimationFrame(O),window.cancelAnimationFrame(Y);}},[z,ue]);let oe=A&&(d===0||re.enabled&&!xe&&!X);b.useEffect(()=>{if(oe){fe(false);return}if(!A||ie||me===0){fe(A?X:true);return}let f=window.setTimeout(()=>{fe(X);},me);return ()=>{window.clearTimeout(f);}},[X,me,A,ie,oe]);let Le={className:[S.entryList,t.entryList?.className].filter(Boolean).join(" "),style:{"--rmg-entry-intro-stagger":`${F.staggerMs}ms`,"--rmg-entry-intro-duration":`${F.durationMs}ms`,"--rmg-entry-intro-easing":F.easing,...t.entryList?.style},"aria-busy":oe?true:void 0},Ie=jsx("div",{...Le,children:kt});return F.renderIntro?F.renderIntro({active:!oe&&Rt,containerProps:Le},Ie):Ie}var mt={mediaLayout:"slider"};var Ut=e=>Array.isArray(e)&&e.every(t=>typeof t=="string"),Xt=e=>!e||!e.length?[]:Ut(e)?a$3(e):e,Yt=e=>e?e.kind==="image":false;function Qt(e){return e.kind==="image"?jsx("img",{src:e.src,alt:e.alt??""}):e.kind==="video"?jsx("video",{src:e.src,controls:true,preload:"metadata"}):null}function Jt(e){let t=[],n=[],r=[],i=[];return e?.length?(e.forEach((o,a)=>{r[a]=[],(o.media??[]).forEach((l,p)=>{let v=t.length;t.push(l),n.push({entryIndex:a,mediaIndex:p}),i.push({entryIndex:a}),r[a][p]=v;});}),{flattenedMedia:t,flattenedMap:n,entryFlatIndex:r,owners:i}):{flattenedMedia:[],flattenedMap:[],entryFlatIndex:null,owners:[]}}function In(e){let{enabled:t=true,entries:n,fullscreen:r,renderMediaContainer:i,nodeFromMedia:o=Qt}=e,a=b.useMemo(()=>({...n,mediaLayout:n?.mediaLayout??mt.mediaLayout}),[n]),l=d(),p=b.useMemo(()=>l?.effectiveBreakpoints??{...a$2},[l?.effectiveBreakpoints]),v=e.entryFlatIndexRef??b.useRef(null),R=e.entryMapRef??b.useRef(null),y=e.fsOwnersRef??b.useRef([]),u=e.entrySliderRefs??b.useRef([]),s=l?.expandableImageRefs??b.useRef([]),M=l?.registerExpandableImage??b.useCallback((h,B)=>{if(!B){s.current[h]=null;return}if(B.tagName==="IMG"){s.current[h]=B;return}let $=B.querySelector("img");s.current[h]=$;},[]),{flattenedMedia:x,flattenedMap:P,entryFlatIndex:g,owners:c}=b.useMemo(()=>Jt(a.items),[a.items]);b.useEffect(()=>{v.current=g,y.current=c,R.current=P;},[g,c,P,v,y,R]);let d$1=b.useMemo(()=>{let h=Xt(r?.items);return h.length?h:x},[r?.items,x]);b.useEffect(()=>{l&&l.registerFullscreenAdapter("entries",{closestSelector:a.mediaLayout==="slider"?".rmg__slide":".rmg__grid-item",getOwnerSliderHandle:h=>{let B=R.current?.[h];return B?u.current?.[B.entryIndex]??null:null},getEntryContext:()=>({entryMapRef:R,entryMediaLayout:a.mediaLayout,entriesObject:a,entrySliderRefs:u,expandableImageRefs:l?.expandableImageRefs??s})});},[l,a]);let k=h=>h?h instanceof HTMLImageElement?h:h.querySelector("img"):null,w=b.useCallback((h,B)=>{if(!l?.requestFullscreenOpen)return;let $=d$1[h]??x[h];if(!Yt($))return;let G=k(B??null)??s.current[h]??null;G&&l.requestFullscreenOpen({source:"entries",index:h,image:G,event:void 0});},[l,s,d$1,x]),E=(r?.enabled??true)&&d$1.length>0;return jsx(ut,{enabled:!!t,entries:a,fsEnabled:!!E,openFullscreenAt:w,entryFlatIndexRef:v,nodeFromMedia:o,registerExpandableImage:M,renderMediaContainer:i,entrySliderRefs:u,breakpoints:p})}export{Qe as a,Je as b,Ze as c,et as d,Kt as e,ut as f,Qt as g,Jt as h,In as i};
|