svg-scroll-draw 2.15.3 → 2.16.1

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.
Files changed (128) hide show
  1. package/README.md +22 -17
  2. package/dist/angular/index.cjs +2 -2
  3. package/dist/angular/index.d.mts +7 -240
  4. package/dist/angular/index.d.ts +7 -240
  5. package/dist/angular/index.mjs +1 -3
  6. package/dist/aos/index.cjs +2 -2
  7. package/dist/aos/index.mjs +1 -2
  8. package/dist/aos/react/index.cjs +2 -2
  9. package/dist/aos/react/index.d.mts +1 -33
  10. package/dist/aos/react/index.d.ts +1 -33
  11. package/dist/aos/react/index.mjs +1 -2
  12. package/dist/astro/index.cjs +2 -2
  13. package/dist/astro/index.d.mts +4 -148
  14. package/dist/astro/index.d.ts +4 -148
  15. package/dist/astro/index.mjs +1 -3
  16. package/dist/cdn/aos.global.js +2 -2
  17. package/dist/cdn/scrollreveal.global.js +2 -2
  18. package/dist/cdn/svg-scroll-draw.dev.global.js +51 -39
  19. package/dist/cdn/svg-scroll-draw.global.js +2 -2
  20. package/dist/cdn/vivus.global.js +1 -1
  21. package/dist/chunk-4DOJSIEQ.mjs +1 -0
  22. package/dist/chunk-4MH5SQTH.mjs +1 -0
  23. package/dist/chunk-4T5R3ZTL.mjs +2 -0
  24. package/dist/chunk-5PJEKEEP.mjs +1 -0
  25. package/dist/chunk-AJ22VSHC.mjs +1 -0
  26. package/dist/chunk-BCV4RAIX.mjs +1 -0
  27. package/dist/chunk-DM6EDKWH.mjs +1 -0
  28. package/dist/chunk-E4M2PB7B.mjs +1 -0
  29. package/dist/chunk-JC5BD4RB.mjs +1 -0
  30. package/dist/chunk-KBFWDHF4.mjs +1 -0
  31. package/dist/chunk-KGAJQP2N.mjs +2 -0
  32. package/dist/chunk-LFSU6LR3.mjs +1 -0
  33. package/dist/chunk-OJFWQ6CU.mjs +1 -0
  34. package/dist/chunk-OMI46IXL.mjs +2 -0
  35. package/dist/chunk-OWMO2S3V.mjs +1 -0
  36. package/dist/chunk-PEFR3ZB7.mjs +1 -0
  37. package/dist/chunk-QJ4H2HW3.mjs +1 -0
  38. package/dist/chunk-SNCRC6BA.mjs +1 -0
  39. package/dist/chunk-WDIHLRZZ.mjs +3 -0
  40. package/dist/chunk-WQZKXAXK.mjs +2 -0
  41. package/dist/chunk-YWKPTYSG.mjs +1 -0
  42. package/dist/chunk-YZV4Z3EQ.mjs +1 -0
  43. package/dist/cinematic/index.cjs +1 -1
  44. package/dist/cinematic/index.mjs +1 -2
  45. package/dist/devtools/index.mjs +1 -1
  46. package/dist/engine-6AXEX8CL.d.ts +57 -0
  47. package/dist/engine-Ci08nM91.d.mts +57 -0
  48. package/dist/group/index.cjs +2 -2
  49. package/dist/group/index.d.mts +4 -207
  50. package/dist/group/index.d.ts +4 -207
  51. package/dist/group/index.mjs +1 -3
  52. package/dist/horizontal/index.cjs +1 -1
  53. package/dist/horizontal/index.d.mts +1 -33
  54. package/dist/horizontal/index.d.ts +1 -33
  55. package/dist/horizontal/index.mjs +1 -1
  56. package/dist/index-BDGQEK6X.d.mts +15 -0
  57. package/dist/index-BVuNgQSd.d.ts +14 -0
  58. package/dist/index-CGR7pSOR.d.mts +14 -0
  59. package/dist/index-DxjUOIbK.d.ts +15 -0
  60. package/dist/index.cjs +3 -3
  61. package/dist/index.d.mts +8 -294
  62. package/dist/index.d.ts +8 -294
  63. package/dist/index.mjs +1 -4
  64. package/dist/nuxt/index.cjs +2 -2
  65. package/dist/nuxt/index.d.mts +7 -507
  66. package/dist/nuxt/index.d.ts +7 -507
  67. package/dist/nuxt/index.mjs +1 -3
  68. package/dist/pin/index.cjs +1 -1
  69. package/dist/pin/index.mjs +1 -1
  70. package/dist/progress/index.cjs +1 -1
  71. package/dist/progress/index.d.mts +1 -33
  72. package/dist/progress/index.d.ts +1 -33
  73. package/dist/progress/index.mjs +1 -1
  74. package/dist/react/index.cjs +3 -2
  75. package/dist/react/index.d.mts +5 -212
  76. package/dist/react/index.d.ts +5 -212
  77. package/dist/react/index.mjs +2 -3
  78. package/dist/reveal/index.cjs +1 -1
  79. package/dist/reveal/index.d.mts +1 -5
  80. package/dist/reveal/index.d.ts +1 -5
  81. package/dist/reveal/index.mjs +1 -1
  82. package/dist/scroll-draw-BlJfbTDv.d.ts +5 -0
  83. package/dist/scroll-draw-CNlq4Z_L.d.mts +5 -0
  84. package/dist/scrollreveal/index.cjs +2 -2
  85. package/dist/scrollreveal/index.mjs +1 -2
  86. package/dist/scrollreveal/react/index.cjs +2 -2
  87. package/dist/scrollreveal/react/index.d.mts +1 -36
  88. package/dist/scrollreveal/react/index.d.ts +1 -36
  89. package/dist/scrollreveal/react/index.mjs +1 -2
  90. package/dist/snap/index.cjs +1 -1
  91. package/dist/snap/index.d.mts +1 -1
  92. package/dist/snap/index.d.ts +1 -1
  93. package/dist/snap/index.mjs +1 -1
  94. package/dist/solid/index.cjs +2 -2
  95. package/dist/solid/index.d.mts +6 -240
  96. package/dist/solid/index.d.ts +6 -240
  97. package/dist/solid/index.mjs +1 -3
  98. package/dist/svelte/index.cjs +2 -2
  99. package/dist/svelte/index.d.mts +6 -240
  100. package/dist/svelte/index.d.ts +6 -240
  101. package/dist/svelte/index.mjs +1 -3
  102. package/dist/text/index.cjs +1 -1
  103. package/dist/text/index.d.mts +1 -33
  104. package/dist/text/index.d.ts +1 -33
  105. package/dist/text/index.mjs +1 -1
  106. package/dist/timeline/index.cjs +7 -7
  107. package/dist/timeline/index.d.mts +1 -29
  108. package/dist/timeline/index.d.ts +1 -29
  109. package/dist/timeline/index.mjs +11 -11
  110. package/dist/types-DHU1zNEw.d.mts +147 -0
  111. package/dist/types-DHU1zNEw.d.ts +147 -0
  112. package/dist/video/index.cjs +1 -1
  113. package/dist/video/index.d.mts +1 -33
  114. package/dist/video/index.d.ts +1 -33
  115. package/dist/video/index.mjs +1 -1
  116. package/dist/vivus/index.cjs +2 -2
  117. package/dist/vivus/index.mjs +1 -2
  118. package/dist/vivus/react/index.cjs +2 -1
  119. package/dist/vivus/react/index.d.mts +1 -99
  120. package/dist/vivus/react/index.d.ts +1 -99
  121. package/dist/vivus/react/index.mjs +1 -1
  122. package/dist/vue/index.cjs +2 -2
  123. package/dist/vue/index.d.mts +6 -213
  124. package/dist/vue/index.d.ts +6 -213
  125. package/dist/vue/index.mjs +1 -3
  126. package/dist/web-component/index.cjs +2 -2
  127. package/dist/web-component/index.mjs +1 -3
  128. package/package.json +1 -1
@@ -1,216 +1,9 @@
1
1
  import * as vue from 'vue';
2
-
3
- type EasingName = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'spring' | 'bounce' | 'elastic';
4
- type PresetName = 'sketch' | 'reveal' | 'typewriter' | 'cinematic' | 'spring';
5
- interface TriggerConfig {
6
- start?: string;
7
- end?: string;
8
- }
9
- interface ScrollDrawOptions {
10
- /**
11
- * Apply a named preset as the base configuration. User-supplied options
12
- * always override the preset. Available presets:
13
- * - `'sketch'` — staggered ease-in draw, pencil feel
14
- * - `'reveal'` — fade + ease-out, draws once on viewport entry
15
- * - `'typewriter'` — fast linear draw with stagger
16
- * - `'cinematic'` — slow ease-in-out with fade, dramatic entrance
17
- * - `'spring'` — spring easing, bouncy organic feel
18
- */
19
- preset?: PresetName;
20
- selector?: string;
21
- speed?: number;
22
- fade?: boolean;
23
- easing?: EasingName | ((t: number) => number);
24
- trigger?: TriggerConfig;
25
- stagger?: number;
26
- direction?: 'forward' | 'reverse';
27
- once?: boolean;
28
- debug?: boolean;
29
- /** Scroll axis to track. 'y' (default) for vertical, 'x' for horizontal. */
30
- axis?: 'x' | 'y';
31
- /** CSS selector or Element for a custom scroll container (default: window). */
32
- scrollContainer?: string | Element;
33
- /** Automatically reverse the animation when the user scrolls back up. */
34
- autoReverse?: boolean;
35
- /** Delay in milliseconds before the engine starts observing. */
36
- delay?: number;
37
- /** Animate stroke color. Single string = static override. Tuple = interpolate from → to. */
38
- strokeColor?: string | [string, string];
39
- /** Animate stroke width. Single number = static override. Tuple = interpolate from → to. */
40
- strokeWidth?: number | [number, number];
41
- /** Animate fill opacity. Single number = static override. Tuple [from, to] = interpolate as the path draws. Use [0, 1] to flood fill in sync with the stroke draw. */
42
- fillOpacity?: number | [number, number];
43
- /**
44
- * Reveal the container using CSS clip-path instead of stroke-dashoffset.
45
- * Works on any content — SVG, images, text, divs.
46
- *
47
- * Pass a direction string to control which edge the reveal starts from,
48
- * or `true` as shorthand for `'left'`.
49
- *
50
- * Values: `'left' | 'right' | 'top' | 'bottom' | 'center'`
51
- */
52
- clip?: boolean | 'left' | 'right' | 'top' | 'bottom' | 'center';
53
- /** Fire callbacks at specific progress thresholds (0–1). Resets on replay(). */
54
- waypoints?: Record<number, () => void>;
55
- /** Scale animation speed by scroll velocity — faster scrolling = faster draw. Pass a number to control sensitivity (default 1). */
56
- velocityScale?: boolean | number;
57
- /** IntersectionObserver threshold (0–1). Default 0. */
58
- threshold?: number;
59
- /** IntersectionObserver rootMargin. Default "0px". */
60
- rootMargin?: string;
61
- /** Repeat the animation N times after completion. Use 'infinite' to loop forever. */
62
- repeat?: number | 'infinite';
63
- /** Milliseconds to wait between repeats. Default 0. */
64
- repeatDelay?: number;
65
- /**
66
- * Target path `d` attribute to morph toward as the animation progresses.
67
- * Paths must have compatible command structures (same number of numeric tokens).
68
- *
69
- * Only applies to `<path>` elements — silently no-ops on `<rect>`, `<circle>`,
70
- * `<line>`, and other SVG shape elements.
71
- */
72
- morphTo?: string;
73
- onProgress?: (alpha: number) => void;
74
- onStart?: () => void;
75
- onComplete?: () => void;
76
- /** Fires when scroll position enters the trigger zone (scrolling forward). */
77
- onEnter?: () => void;
78
- /** Fires when scroll position exits the trigger zone at the end (scrolling forward). */
79
- onLeave?: () => void;
80
- /** Fires when scroll position re-enters the trigger zone from the end (scrolling back). */
81
- onEnterBack?: () => void;
82
- /** Fires when scroll position exits the trigger zone at the start (scrolling back). */
83
- onLeaveBack?: () => void;
84
- /**
85
- * Trigger the animation when the element enters the viewport instead of
86
- * tying it to scroll position. The draw runs over `duration` milliseconds,
87
- * replaying each time the element re-enters the viewport (use `once: true`
88
- * to play only the first time).
89
- *
90
- * All visual options work in autoplay mode — `easing`, `stagger`, `fade`,
91
- * `strokeColor`, `strokeWidth`, `fillOpacity`, `clip`, `morphTo`, `waypoints`,
92
- * `repeat`, `repeatDelay`, `onStart`, `onComplete`, `onProgress`, etc.
93
- *
94
- * The full instance API (`pause`, `resume`, `seek`, `replay`, `getProgress`)
95
- * also works — `seek(0.5)` pauses at 50% of the duration.
96
- */
97
- autoplay?: boolean;
98
- /**
99
- * Duration of the autoplay animation in milliseconds. Only used when
100
- * `autoplay: true`. Default `1000`.
101
- */
102
- duration?: number;
103
- /**
104
- * Use the browser's native CSS scroll-driven animation
105
- * (`animation-timeline: view()`) when the configuration is simple enough and
106
- * the browser supports it. The browser drives the draw from the scroll
107
- * position — zero per-frame JavaScript, zero scroll/resize listeners. (It
108
- * still repaints on the main thread: browsers don't composite
109
- * `stroke-dashoffset`.)
110
- *
111
- * Falls back to the JS engine automatically when unsupported or when the
112
- * config uses a feature native CSS can't express (callbacks, stagger, morph,
113
- * velocity scaling, custom triggers, `once`, custom easing functions, etc.).
114
- *
115
- * - `undefined` / `true` (default): use native when eligible.
116
- * - `false`: always use the JS engine.
117
- */
118
- native?: boolean;
119
- }
120
-
121
- interface ScrollAnimateOptions {
122
- props: Record<string, string | number | [string | number, string | number]>;
123
- trigger?: TriggerConfig;
124
- easing?: EasingName | ((t: number) => number);
125
- speed?: number;
126
- once?: boolean;
127
- axis?: 'x' | 'y';
128
- scrollContainer?: string | Element;
129
- native?: boolean;
130
- /**
131
- * Scale animation speed by scroll velocity — faster scrolling = faster animation.
132
- * Pass `true` for default sensitivity (1) or a number to control it.
133
- * Higher values = more dramatic speed-up. Default sensitivity: 1.
134
- */
135
- velocityScale?: boolean | number;
136
- /**
137
- * Honour `prefers-reduced-motion: reduce` by applying the final state and not
138
- * animating. Default: `true`.
139
- *
140
- * Set to `false` only when the movement is *scroll-linked scrubbing* rather
141
- * than autonomous motion — it advances solely as the user scrolls, 1:1 with
142
- * their input, so it is direct manipulation rather than something that plays at
143
- * them. `scrollHorizontal` sets this, because jumping to the final state there
144
- * would leave every panel but the last unreachable inside the sticky
145
- * `overflow: hidden` container.
146
- */
147
- respectReducedMotion?: boolean;
148
- /**
149
- * Element whose geometry defines the trigger window, when that is not the
150
- * element being animated. Defaults to the animated element.
151
- *
152
- * Needed whenever the animated element cannot supply the scroll length itself —
153
- * the case that matters is a `position: sticky` stage, where the pinned element
154
- * is exactly one viewport tall and all of the scroll room belongs to its
155
- * container. Resolving `top top` → `bottom bottom` against the pinned element
156
- * there yields tStart === tEnd, a zero-length window, and no movement at all.
157
- *
158
- * Setting this disables the native CSS fast path: `animation-timeline: view()`
159
- * always measures the element the animation is attached to, so it cannot express
160
- * a separate subject.
161
- */
162
- triggerElement?: Element;
163
- onProgress?: (alpha: number) => void;
164
- onComplete?: () => void;
165
- /** Fires when scroll enters the trigger zone (scrolling forward). */
166
- onEnter?: () => void;
167
- /** Fires when scroll exits the trigger zone at the end (scrolling forward). */
168
- onLeave?: () => void;
169
- /** Fires when scroll re-enters the trigger zone from the end (scrolling back). */
170
- onEnterBack?: () => void;
171
- /** Fires when scroll exits the trigger zone at the start (scrolling back). */
172
- onLeaveBack?: () => void;
173
- }
174
-
175
- interface ScrollCounterOptions {
176
- from?: number;
177
- to: number;
178
- format?: (value: number) => string;
179
- easing?: EasingName | ((t: number) => number);
180
- trigger?: TriggerConfig;
181
- once?: boolean;
182
- decimals?: number;
183
- onComplete?: () => void;
184
- }
185
-
186
- interface ScrollVideoOptions {
187
- trigger?: TriggerConfig;
188
- from?: number;
189
- to?: number;
190
- easing?: EasingName | ((t: number) => number);
191
- once?: boolean;
192
- axis?: 'x' | 'y';
193
- preload?: 'auto' | 'metadata';
194
- onReady?: () => void;
195
- onComplete?: () => void;
196
- onProgress?: (alpha: number) => void;
197
- }
198
-
199
- interface ScrollTextOptions {
200
- split?: 'chars' | 'words' | 'lines';
201
- stagger?: number;
202
- easing?: EasingName | ((t: number) => number);
203
- from?: {
204
- opacity?: number;
205
- y?: number;
206
- x?: number;
207
- rotate?: number;
208
- scale?: number;
209
- };
210
- trigger?: TriggerConfig;
211
- once?: boolean;
212
- onComplete?: () => void;
213
- }
2
+ import { a as ScrollDrawOptions } from '../types-DHU1zNEw.mjs';
3
+ import { S as ScrollAnimateOptions } from '../engine-Ci08nM91.mjs';
4
+ import { S as ScrollCounterOptions } from '../index-BDGQEK6X.mjs';
5
+ import { ScrollVideoOptions } from '../video/index.mjs';
6
+ import { ScrollTextOptions } from '../text/index.mjs';
214
7
 
215
8
  /** Composable — attach to any container ref. */
216
9
  declare function useScrollDraw(options?: ScrollDrawOptions): vue.Ref<HTMLElement | null, HTMLElement | null>;
@@ -505,4 +298,4 @@ declare const ScrollText: vue.DefineComponent<vue.ExtractPropTypes<{
505
298
  tag: string;
506
299
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
507
300
 
508
- export { ScrollAnimate, type ScrollAnimateOptions, ScrollCounter, type ScrollCounterOptions, ScrollDraw, type ScrollDrawOptions, ScrollText, type ScrollTextOptions, ScrollVideo, type ScrollVideoOptions, useScrollAnimate, useScrollCounter, useScrollDraw, useScrollText, useScrollVideo };
301
+ export { ScrollAnimate, ScrollAnimateOptions, ScrollCounter, ScrollCounterOptions, ScrollDraw, ScrollDrawOptions, ScrollText, ScrollTextOptions, ScrollVideo, ScrollVideoOptions, useScrollAnimate, useScrollCounter, useScrollDraw, useScrollText, useScrollVideo };
@@ -1,216 +1,9 @@
1
1
  import * as vue from 'vue';
2
-
3
- type EasingName = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'spring' | 'bounce' | 'elastic';
4
- type PresetName = 'sketch' | 'reveal' | 'typewriter' | 'cinematic' | 'spring';
5
- interface TriggerConfig {
6
- start?: string;
7
- end?: string;
8
- }
9
- interface ScrollDrawOptions {
10
- /**
11
- * Apply a named preset as the base configuration. User-supplied options
12
- * always override the preset. Available presets:
13
- * - `'sketch'` — staggered ease-in draw, pencil feel
14
- * - `'reveal'` — fade + ease-out, draws once on viewport entry
15
- * - `'typewriter'` — fast linear draw with stagger
16
- * - `'cinematic'` — slow ease-in-out with fade, dramatic entrance
17
- * - `'spring'` — spring easing, bouncy organic feel
18
- */
19
- preset?: PresetName;
20
- selector?: string;
21
- speed?: number;
22
- fade?: boolean;
23
- easing?: EasingName | ((t: number) => number);
24
- trigger?: TriggerConfig;
25
- stagger?: number;
26
- direction?: 'forward' | 'reverse';
27
- once?: boolean;
28
- debug?: boolean;
29
- /** Scroll axis to track. 'y' (default) for vertical, 'x' for horizontal. */
30
- axis?: 'x' | 'y';
31
- /** CSS selector or Element for a custom scroll container (default: window). */
32
- scrollContainer?: string | Element;
33
- /** Automatically reverse the animation when the user scrolls back up. */
34
- autoReverse?: boolean;
35
- /** Delay in milliseconds before the engine starts observing. */
36
- delay?: number;
37
- /** Animate stroke color. Single string = static override. Tuple = interpolate from → to. */
38
- strokeColor?: string | [string, string];
39
- /** Animate stroke width. Single number = static override. Tuple = interpolate from → to. */
40
- strokeWidth?: number | [number, number];
41
- /** Animate fill opacity. Single number = static override. Tuple [from, to] = interpolate as the path draws. Use [0, 1] to flood fill in sync with the stroke draw. */
42
- fillOpacity?: number | [number, number];
43
- /**
44
- * Reveal the container using CSS clip-path instead of stroke-dashoffset.
45
- * Works on any content — SVG, images, text, divs.
46
- *
47
- * Pass a direction string to control which edge the reveal starts from,
48
- * or `true` as shorthand for `'left'`.
49
- *
50
- * Values: `'left' | 'right' | 'top' | 'bottom' | 'center'`
51
- */
52
- clip?: boolean | 'left' | 'right' | 'top' | 'bottom' | 'center';
53
- /** Fire callbacks at specific progress thresholds (0–1). Resets on replay(). */
54
- waypoints?: Record<number, () => void>;
55
- /** Scale animation speed by scroll velocity — faster scrolling = faster draw. Pass a number to control sensitivity (default 1). */
56
- velocityScale?: boolean | number;
57
- /** IntersectionObserver threshold (0–1). Default 0. */
58
- threshold?: number;
59
- /** IntersectionObserver rootMargin. Default "0px". */
60
- rootMargin?: string;
61
- /** Repeat the animation N times after completion. Use 'infinite' to loop forever. */
62
- repeat?: number | 'infinite';
63
- /** Milliseconds to wait between repeats. Default 0. */
64
- repeatDelay?: number;
65
- /**
66
- * Target path `d` attribute to morph toward as the animation progresses.
67
- * Paths must have compatible command structures (same number of numeric tokens).
68
- *
69
- * Only applies to `<path>` elements — silently no-ops on `<rect>`, `<circle>`,
70
- * `<line>`, and other SVG shape elements.
71
- */
72
- morphTo?: string;
73
- onProgress?: (alpha: number) => void;
74
- onStart?: () => void;
75
- onComplete?: () => void;
76
- /** Fires when scroll position enters the trigger zone (scrolling forward). */
77
- onEnter?: () => void;
78
- /** Fires when scroll position exits the trigger zone at the end (scrolling forward). */
79
- onLeave?: () => void;
80
- /** Fires when scroll position re-enters the trigger zone from the end (scrolling back). */
81
- onEnterBack?: () => void;
82
- /** Fires when scroll position exits the trigger zone at the start (scrolling back). */
83
- onLeaveBack?: () => void;
84
- /**
85
- * Trigger the animation when the element enters the viewport instead of
86
- * tying it to scroll position. The draw runs over `duration` milliseconds,
87
- * replaying each time the element re-enters the viewport (use `once: true`
88
- * to play only the first time).
89
- *
90
- * All visual options work in autoplay mode — `easing`, `stagger`, `fade`,
91
- * `strokeColor`, `strokeWidth`, `fillOpacity`, `clip`, `morphTo`, `waypoints`,
92
- * `repeat`, `repeatDelay`, `onStart`, `onComplete`, `onProgress`, etc.
93
- *
94
- * The full instance API (`pause`, `resume`, `seek`, `replay`, `getProgress`)
95
- * also works — `seek(0.5)` pauses at 50% of the duration.
96
- */
97
- autoplay?: boolean;
98
- /**
99
- * Duration of the autoplay animation in milliseconds. Only used when
100
- * `autoplay: true`. Default `1000`.
101
- */
102
- duration?: number;
103
- /**
104
- * Use the browser's native CSS scroll-driven animation
105
- * (`animation-timeline: view()`) when the configuration is simple enough and
106
- * the browser supports it. The browser drives the draw from the scroll
107
- * position — zero per-frame JavaScript, zero scroll/resize listeners. (It
108
- * still repaints on the main thread: browsers don't composite
109
- * `stroke-dashoffset`.)
110
- *
111
- * Falls back to the JS engine automatically when unsupported or when the
112
- * config uses a feature native CSS can't express (callbacks, stagger, morph,
113
- * velocity scaling, custom triggers, `once`, custom easing functions, etc.).
114
- *
115
- * - `undefined` / `true` (default): use native when eligible.
116
- * - `false`: always use the JS engine.
117
- */
118
- native?: boolean;
119
- }
120
-
121
- interface ScrollAnimateOptions {
122
- props: Record<string, string | number | [string | number, string | number]>;
123
- trigger?: TriggerConfig;
124
- easing?: EasingName | ((t: number) => number);
125
- speed?: number;
126
- once?: boolean;
127
- axis?: 'x' | 'y';
128
- scrollContainer?: string | Element;
129
- native?: boolean;
130
- /**
131
- * Scale animation speed by scroll velocity — faster scrolling = faster animation.
132
- * Pass `true` for default sensitivity (1) or a number to control it.
133
- * Higher values = more dramatic speed-up. Default sensitivity: 1.
134
- */
135
- velocityScale?: boolean | number;
136
- /**
137
- * Honour `prefers-reduced-motion: reduce` by applying the final state and not
138
- * animating. Default: `true`.
139
- *
140
- * Set to `false` only when the movement is *scroll-linked scrubbing* rather
141
- * than autonomous motion — it advances solely as the user scrolls, 1:1 with
142
- * their input, so it is direct manipulation rather than something that plays at
143
- * them. `scrollHorizontal` sets this, because jumping to the final state there
144
- * would leave every panel but the last unreachable inside the sticky
145
- * `overflow: hidden` container.
146
- */
147
- respectReducedMotion?: boolean;
148
- /**
149
- * Element whose geometry defines the trigger window, when that is not the
150
- * element being animated. Defaults to the animated element.
151
- *
152
- * Needed whenever the animated element cannot supply the scroll length itself —
153
- * the case that matters is a `position: sticky` stage, where the pinned element
154
- * is exactly one viewport tall and all of the scroll room belongs to its
155
- * container. Resolving `top top` → `bottom bottom` against the pinned element
156
- * there yields tStart === tEnd, a zero-length window, and no movement at all.
157
- *
158
- * Setting this disables the native CSS fast path: `animation-timeline: view()`
159
- * always measures the element the animation is attached to, so it cannot express
160
- * a separate subject.
161
- */
162
- triggerElement?: Element;
163
- onProgress?: (alpha: number) => void;
164
- onComplete?: () => void;
165
- /** Fires when scroll enters the trigger zone (scrolling forward). */
166
- onEnter?: () => void;
167
- /** Fires when scroll exits the trigger zone at the end (scrolling forward). */
168
- onLeave?: () => void;
169
- /** Fires when scroll re-enters the trigger zone from the end (scrolling back). */
170
- onEnterBack?: () => void;
171
- /** Fires when scroll exits the trigger zone at the start (scrolling back). */
172
- onLeaveBack?: () => void;
173
- }
174
-
175
- interface ScrollCounterOptions {
176
- from?: number;
177
- to: number;
178
- format?: (value: number) => string;
179
- easing?: EasingName | ((t: number) => number);
180
- trigger?: TriggerConfig;
181
- once?: boolean;
182
- decimals?: number;
183
- onComplete?: () => void;
184
- }
185
-
186
- interface ScrollVideoOptions {
187
- trigger?: TriggerConfig;
188
- from?: number;
189
- to?: number;
190
- easing?: EasingName | ((t: number) => number);
191
- once?: boolean;
192
- axis?: 'x' | 'y';
193
- preload?: 'auto' | 'metadata';
194
- onReady?: () => void;
195
- onComplete?: () => void;
196
- onProgress?: (alpha: number) => void;
197
- }
198
-
199
- interface ScrollTextOptions {
200
- split?: 'chars' | 'words' | 'lines';
201
- stagger?: number;
202
- easing?: EasingName | ((t: number) => number);
203
- from?: {
204
- opacity?: number;
205
- y?: number;
206
- x?: number;
207
- rotate?: number;
208
- scale?: number;
209
- };
210
- trigger?: TriggerConfig;
211
- once?: boolean;
212
- onComplete?: () => void;
213
- }
2
+ import { a as ScrollDrawOptions } from '../types-DHU1zNEw.js';
3
+ import { S as ScrollAnimateOptions } from '../engine-6AXEX8CL.js';
4
+ import { S as ScrollCounterOptions } from '../index-DxjUOIbK.js';
5
+ import { ScrollVideoOptions } from '../video/index.js';
6
+ import { ScrollTextOptions } from '../text/index.js';
214
7
 
215
8
  /** Composable — attach to any container ref. */
216
9
  declare function useScrollDraw(options?: ScrollDrawOptions): vue.Ref<HTMLElement | null, HTMLElement | null>;
@@ -505,4 +298,4 @@ declare const ScrollText: vue.DefineComponent<vue.ExtractPropTypes<{
505
298
  tag: string;
506
299
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
507
300
 
508
- export { ScrollAnimate, type ScrollAnimateOptions, ScrollCounter, type ScrollCounterOptions, ScrollDraw, type ScrollDrawOptions, ScrollText, type ScrollTextOptions, ScrollVideo, type ScrollVideoOptions, useScrollAnimate, useScrollCounter, useScrollDraw, useScrollText, useScrollVideo };
301
+ export { ScrollAnimate, ScrollAnimateOptions, ScrollCounter, ScrollCounterOptions, ScrollDraw, ScrollDrawOptions, ScrollText, ScrollTextOptions, ScrollVideo, ScrollVideoOptions, useScrollAnimate, useScrollCounter, useScrollDraw, useScrollText, useScrollVideo };
@@ -1,3 +1 @@
1
- import {defineComponent,ref,onMounted,onUnmounted,h}from'vue';function jt({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,r)),l=Math.sqrt(t),s=0,c=[];for(let p=0;p<n;p++){let T=Math.pow(l,p);c.push(T),s+=T;}let u=[0],m=0;for(let p=0;p<n;p++)m+=c[p]/s,u.push(m);return p=>{if(p<=0)return 0;if(p>=1)return 1;for(let T=0;T<n;T++)if(p<=u[T+1]){let V=(p-u[T])/(u[T+1]-u[T]);if(T===0)return V*(2-V);let A=1-Math.pow(t,T);return A+(1-A)*(2*V-1)*(2*V-1)}return 1}}function Ut({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),t=Math.max(.1,r),l=n<=1?t/4:t/(2*Math.PI)*Math.asin(1/n);return s=>s<=0?0:s>=1?1:n*Math.pow(2,-10*s)*Math.sin((s-l)*(2*Math.PI)/t)+1}var ne={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:jt(),elastic:Ut()};function de(e="top bottom"){let r=e.trim();if(/^\d+(\.\d+)?%$/.test(r))return {element:"top",viewport:r};let[n="top",t="bottom"]=r.split(/\s+/).filter(Boolean);return {element:n,viewport:t}}function xt(e,r,n,t){switch(t){case "top":return e+n;case "center":return e+n+r/2;case "bottom":return e+n+r;default:return e+n}}function At(e,r){if(/^\d+(\.\d+)?%$/.test(e))return r*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return r/2;case "bottom":return r;default:return r}}function Be(e){let r=e.tagName.toLowerCase();if(r==="rect"){let n=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(n+t)}if(r==="circle"){let n=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*n}return e.getTotalLength()}function Yt(e,r,n){return Math.min(n,Math.max(r,e))}function K(e,r,n,t){return n===r?0:Yt((e-r)/(n-r)*t,0,1)}function nt(e,r,n){let t=e.getBoundingClientRect(),l=n==="x"?t.width:t.height;return r?{top:n==="x"?t.left-r.getBoundingClientRect().left+r.scrollLeft:t.top-r.getBoundingClientRect().top+r.scrollTop,height:l,scroll:0}:{top:n==="x"?t.left:t.top,height:l,scroll:n==="x"?window.scrollX:window.scrollY}}function xe(e,r,n,t,l){let s=xt(e.top,e.height,r,t.element)-At(t.viewport,n),c=xt(e.top,e.height,r,l.element)-At(l.viewport,n);return {tStart:s,tEnd:c}}function Mt(e){let r=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(r)return [parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)];let n=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n)return [parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function We(e,r,n){let t=Mt(e),l=Mt(r);return !t||!l?e:`rgb(${Math.round(t[0]+(l[0]-t[0])*n)},${Math.round(t[1]+(l[1]-t[1])*n)},${Math.round(t[2]+(l[2]-t[2])*n)})`}var Lt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var Ue=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function we(e,...r){Ue&&console.warn(`[svg-scroll-draw] ${e}`,...r);}var Xt="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Qt="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Ct=33;function Zt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Kt(e){let r=[];for(let n=0;n<Ct;n++){let t=n/(Ct-1);r.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${r.join(",")})`}function rt(e){switch(e){case "linear":return "linear";case "ease-in":return Xt;case "ease-out":return Qt;case "ease-in-out":return Zt()?Kt(ne["ease-in-out"]):null;default:return null}}var $t=Symbol.for("svg-scroll-draw.registry");function Pt(){let e=globalThis;return e[$t]||(e[$t]=new Map)}function Le(e,r){Pt().set(e,r);}function Ce(e){Pt().delete(e);}var Jt=0;function en(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Ot(e,r){let n="";try{n=getComputedStyle(e).getPropertyValue(r).trim();}catch{}return n||(e.getAttribute(r)??"").trim()}var kt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function tn(e){if(!Ue)return;let r=Ot(e,"stroke");if(!r||r==="none"){we("Element has no stroke \u2014 path will not be visible.",e);return}let n=(e.getAttribute("fill")??"").trim();n&&!kt.has(n)&&!kt.has(Ot(e,"fill"))&&we("Element has a fill \u2014 it may obscure the stroke animation.",e);}function nn(e,r,n){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function l(){let s=n==="x"?window.scrollX:window.scrollY,c=e-s,u=r-s,m=n==="x";t.innerHTML=`
2
- <div style="position:absolute;${m?`left:${c}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${c}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
- <div style="position:absolute;${m?`left:${u}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${u}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",l,{passive:true}),l(),{el:t,destroy(){window.removeEventListener("scroll",l),t.remove();}}}var Ft=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,It=/[MmLlHhVvCcSsQqTtAaZz]/g;function rn(e,r,n){if(!Ue)return;let t=(e.match(It)??[]).join("").toUpperCase(),l=(r.match(It)??[]).join("").toUpperCase(),s=(e.match(Ft)??[]).length,c=(r.match(Ft)??[]).length;if(t!==l){we(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${l||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,n);return}s!==c&&we(`morphTo: coordinate count differs (${s} \u2192 ${c}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,n);}function ct(e,r,n){let t=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),l=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let c=parseFloat(s),u=t[l++]??c;return String(+(c+(u-c)*n).toFixed(4))})}function ut(e,r={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:n,...t}=r,l=n?{...Lt[n],...t}:t,s=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:c="path, polyline, line, polygon, rect, circle",speed:u=1,fade:m=false,easing:p="linear",trigger:T={},stagger:V=0,direction:A="forward",once:re=false,debug:$e=false,axis:W="y",scrollContainer:J,autoReverse:X=false,delay:G=0,strokeColor:M,strokeWidth:$,fillOpacity:L,waypoints:w,velocityScale:k=false,threshold:F=0,rootMargin:P="0px",repeat:S=0,repeatDelay:oe=0,morphTo:I,clip:se,autoplay:ie=false,duration:ee=1e3,native:ae=true,onProgress:d,onStart:x,onComplete:g,onEnter:C,onLeave:E,onEnterBack:D,onLeaveBack:fe}=l,Q=se===true?"left":typeof se=="string"?se:false,Ee=typeof p=="function"?p:ne[p]??ne.linear,Pe=de(T.start??"top bottom"),_e=de(T.end??"bottom top"),ve=typeof J=="string"?document.querySelector(J):J??null,Se=Array.isArray(M)?M[0]:null,le=Array.isArray(M)?M[1]:typeof M=="string"?M:null,ce=Array.isArray($)?$[0]:null,j=Array.isArray($)?$[1]:typeof $=="number"?$:null,pe=Array.isArray(L)?L[0]:null,Z=Array.isArray(L)?L[1]:typeof L=="number"?L:null;function Oe(o){let a=o*100;switch(Q){case "right":return `inset(0 0 0 ${100-a}%)`;case "top":return `inset(0 0 ${100-a}% 0)`;case "bottom":return `inset(${100-a}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-a}% 0 0)`}}let z=Q?[]:Array.from(e.querySelectorAll(c)),O=[],i=[],f=0,ge=0,N=false,_=false,q=0,Ae=false,ye=-1,te=-1,U=false,he=0,De=0,He,ot=null;function yt(){ot?.destroy(),ot=null;}let Ve=new Set,ht=NaN,ze=true,Qe=-1,bt=performance.now(),qe=NaN;function st(){return ve?W==="x"?ve.scrollLeft:ve.scrollTop:W==="x"?window.scrollX:window.scrollY}function wt(){return ve?W==="x"?ve.clientWidth:ve.clientHeight:W==="x"?window.innerWidth:window.innerHeight}function vt(){let o=nt(e,ve,W);return xe(o,o.scroll,wt(),Pe,_e)}function St(){(({tStart:f,tEnd:ge}=vt())),$e&&Ue&&(yt(),ot=nn(f,ge,W));}function it(o,a=vt){Le(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:a});let b=o.destroy;return o.destroy=()=>{b.call(o),Ce(e);},o}function qt(o,a){if(e.style.setProperty("--scroll-draw-progress",String(o)),Q){let b=a==="reverse"?1-o:o;e.style.clipPath=Oe(b);return}z.forEach((b,ue)=>{b.style.strokeDashoffset=a==="reverse"?`${O[ue]*o}`:`${O[ue]*(1-o)}`,m&&(b.style.opacity=a==="reverse"?`${1-o}`:`${o}`),Se&&le?b.style.stroke=We(Se,le,o):le&&(b.style.stroke=le),ce!==null&&j!==null?b.style.strokeWidth=`${ce+(j-ce)*o}`:j!==null&&(b.style.strokeWidth=`${j}`),pe!==null&&Z!==null?b.style.fillOpacity=`${pe+(Z-pe)*o}`:Z!==null&&(b.style.fillOpacity=`${Z}`),I&&b.tagName.toLowerCase()==="path"&&i[ue]&&b.setAttribute("d",ct(i[ue],I,o));});}function Ze(){if(e.style.setProperty("--scroll-draw-progress","0"),Q){e.style.clipPath=Oe(0);return}z.forEach((o,a)=>{o.style.strokeDasharray=`${O[a]}`,o.style.strokeDashoffset=A==="reverse"?"0":`${O[a]}`,m?o.style.opacity=A==="reverse"?"1":"0":o.style.opacity="",Se&&(o.style.stroke=Se),ce!==null&&(o.style.strokeWidth=`${ce}`),pe!==null&&(o.style.fillOpacity=`${pe}`),I&&o.tagName.toLowerCase()==="path"&&i[a]&&o.setAttribute("d",i[a]);});}if(z.forEach(o=>{tn(o);let a=Be(o);O.push(a);let b=o.tagName.toLowerCase()==="path";b?i.push(o.getAttribute("d")??""):i.push(""),I&&(b?rn(i[i.length-1],I,o):we(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),s?(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=A==="reverse"?`${a}`:"0",m&&(o.style.opacity="1"),le&&(o.style.stroke=le),j!==null&&(o.style.strokeWidth=`${j}`),Z!==null&&(o.style.fillOpacity=`${Z}`),I&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",I)):(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=A==="reverse"?"0":`${a}`,m?o.style.opacity=A==="reverse"?"1":"0":o.style.opacity="",Se&&(o.style.stroke=Se),ce!==null&&(o.style.strokeWidth=`${ce}`),pe!==null&&(o.style.fillOpacity=`${pe}`));}),Q){if(s)return e.style.clipPath=Oe(1),g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Oe(0);}else if(s)return g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Et=typeof p=="string"?rt(p):null;function Bt(){return !(ae===false||!en()||!z.length||!Et||Q||W!=="y"||ve||u!==1||V!==0||re||X||k!==false||I||w||S||G>0||d||x||g||C||E||D||fe||M!=null||$!=null||L!=null||(T.start??"top bottom").trim()!=="top bottom"||(T.end??"bottom top").trim()!=="bottom top")}function Wt(){let o=++Jt,a=`svg-scroll-draw-${o}`,b=`svg-scroll-draw-host-${o}`,ue=`--svg-scroll-draw-${o}`,Ne=A==="reverse"?"0":"var(--ssd-len)",ke=A==="reverse"?"var(--ssd-len)":"0",Me=`stroke-dashoffset:${Ne};`,v=`stroke-dashoffset:${ke};`;m&&(Me+=`opacity:${A==="reverse"?1:0};`,v+=`opacity:${A==="reverse"?0:1};`);let R=document.createElement("style");R.setAttribute("data-svg-scroll-draw",""),R.textContent=`@keyframes ${a}{from{${Me}}to{${v}}}.${b}{view-timeline-name:${ue};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${Et};animation-fill-mode:both;animation-timeline:${ue};animation-range:cover 0% cover 100%;}`,document.head.appendChild(R),e.classList.add(b);function me(y,Y){y.style.setProperty("--ssd-len",String(O[Y])),y.style.strokeDasharray=`${O[Y]}`,y.style.strokeDashoffset="",y.style.opacity="",y.style.animationPlayState="",y.classList.add(a);}z.forEach(me);let h=false,H=-1;function B(){if(H>=0)return H;let y=e.getBoundingClientRect(),{tStart:Y,tEnd:Te}=xe({top:y.top,height:y.height},st(),wt(),Pe,_e);return Ee(K(st(),Y,Te,u))}return {destroy(){e.classList.remove(b),z.forEach(y=>{y.classList.remove(a),y.style.removeProperty("--ssd-len"),y.style.animationPlayState="";}),R.remove();},replay(){h=false,H=-1,z.forEach(me);},pause(){h=true,z.forEach(y=>{y.style.animationPlayState="paused";});},resume(){h&&(h=false,z.forEach(y=>{y.style.animationPlayState="running";}));},seek(y){let Y=Math.min(1,Math.max(0,y));H=Y,h=true,z.forEach((Te,be)=>{Te.classList.remove(a),Te.style.strokeDashoffset=A==="reverse"?`${O[be]*Y}`:`${O[be]*(1-Y)}`,m&&(Te.style.opacity=A==="reverse"?`${1-Y}`:`${Y}`);});},getProgress(){return B()},refresh(){z.forEach((y,Y)=>{O[Y]=Be(y),y.style.setProperty("--ssd-len",String(O[Y])),y.style.strokeDasharray=`${O[Y]}`;});}}}if(Bt())return it(Wt());function Gt(){let o=Math.max(1,ee),a=0,b=0,ue=false;function Ne(h){let H=true;if(Q){let B=Math.min(1,Math.max(0,h/o)),y=Ee(B);he=y,e.style.setProperty("--scroll-draw-progress",String(y)),e.style.clipPath=Oe(A==="reverse"?1-y:y),d?.(y),B<1&&(H=false);}else z.forEach((B,y)=>{let Y=y*V*o,Te=Math.min(1,Math.max(0,(h-Y)/o)),be=Ee(Te);B.style.strokeDashoffset=A==="reverse"?`${O[y]*be}`:`${O[y]*(1-be)}`,m&&(B.style.opacity=A==="reverse"?`${1-be}`:`${be}`),Se&&le?B.style.stroke=We(Se,le,be):le&&(B.style.stroke=le),ce!==null&&j!==null?B.style.strokeWidth=`${ce+(j-ce)*be}`:j!==null&&(B.style.strokeWidth=`${j}`),pe!==null&&Z!==null?B.style.fillOpacity=`${pe+(Z-pe)*be}`:Z!==null&&(B.style.fillOpacity=`${Z}`),I&&B.tagName.toLowerCase()==="path"&&i[y]&&B.setAttribute("d",ct(i[y],I,be)),y===0&&(he=be,d?.(be),e.style.setProperty("--scroll-draw-progress",String(be))),Te<1&&(H=false);});if(w){let B=Math.min(1,Math.max(0,h/o)),y=Ee(B);for(let Y in w){let Te=parseFloat(Y);y>=Te&&!Ve.has(Te)&&(Ve.add(Te),w[Y]?.());}}return H}function ke(h){if(U)return;let H=h-a;_||(_=true,x?.());let B=Ne(H);if(B&&!N){N=true,Ne(o*(1+Math.max(0,z.length-1)*V)),g?.(),De<(S==="infinite"?1/0:S??0)&&(De++,He=setTimeout(()=>{a=performance.now(),_=false,N=false,Ve.clear(),Ze(),q=requestAnimationFrame(ke);},oe));return}B||(q=requestAnimationFrame(ke));}function Me(){cancelAnimationFrame(q),clearTimeout(He),a=performance.now(),b=0,U=false,_=false,N=false,De=0,ue=true,he=0,Ve.clear(),Ze(),q=requestAnimationFrame(ke);}let v=new IntersectionObserver(h=>{h.forEach(H=>{H.isIntersecting&&!(re&&N)?Me():!H.isIntersecting&&!re&&!N&&(cancelAnimationFrame(q),clearTimeout(He),ue=false);});},{root:ve??null,threshold:F,rootMargin:P}),R;function me(){clearTimeout(R),R=setTimeout(()=>{z.forEach((h,H)=>{O[H]=Be(h),h.style.strokeDasharray=`${O[H]}`;});},150);}return window.addEventListener("resize",me),window.addEventListener("orientationchange",me),G>0?setTimeout(()=>v.observe(e),G):v.observe(e),{destroy(){cancelAnimationFrame(q),clearTimeout(He),v.disconnect(),window.removeEventListener("resize",me),window.removeEventListener("orientationchange",me),clearTimeout(R);},replay(){De=0,Me();},pause(){U||!ue||(U=true,b=performance.now()-a,cancelAnimationFrame(q));},resume(){U&&(U=false,ue=true,a=performance.now()-b,q=requestAnimationFrame(ke));},seek(h){let H=Math.min(1,Math.max(0,h));he=H,U=true,b=H*o,a=performance.now()-b,cancelAnimationFrame(q),Ne(b);},getProgress(){return he},refresh(){clearTimeout(R),z.forEach((h,H)=>{O[H]=Be(h),h.style.strokeDasharray=`${O[H]}`;});}}}if(ie)return it(Gt());St();function Ke(){if(!Ae||U)return;let o=performance.now(),a=st();if(!ze&&k===false&&a===ht){q=requestAnimationFrame(Ke);return}ze=false,ht=a;let b=u;if(k!==false){let v=o-bt,R=v>0?Math.abs(a-(Qe<0?a:Qe))/v:0;b=u*Math.max(.2,1+R*(typeof k=="number"?k:1)*.04);}Qe=a,bt=o;let ue=X?te===-1||a>=te?"forward":"reverse":A;te=a;let Ne=ge-f,ke=true,Me=Ne===0?0:(a-f)/Ne;if(isNaN(qe)||(qe<=0&&Me>0?C?.():qe>0&&Me<=0&&fe?.(),qe<1&&Me>=1?E?.():qe>=1&&Me<1&&D?.()),qe=Me,Q){let v=Ee(K(a,f,ge,b));re&&!X&&(ye=Math.max(ye,v),v=ye),he=v,e.style.setProperty("--scroll-draw-progress",String(v));let R=ue==="reverse"?1-v:v;e.style.clipPath=Oe(R),d?.(v),!_&&K(a,f,ge,b)>0&&(_=true,x?.()),v>=1&&!N?(N=true,g?.(),De<(S==="infinite"?1/0:S??0)&&(De++,He=setTimeout(()=>{ye=-1,_=false,N=false,e.style.clipPath=Oe(0);},oe))):v<1&&!re&&(N=false),q=requestAnimationFrame(Ke);return}if(z.forEach((v,R)=>{let me=R*V*Ne,h=Ee(K(a,f+me,ge+me,b));re&&!X&&(ye=Math.max(ye,h),h=ye),he=h,v.style.strokeDashoffset=ue==="reverse"?`${O[R]*h}`:`${O[R]*(1-h)}`,m&&(v.style.opacity=ue==="reverse"?`${1-h}`:`${h}`),Se&&le?v.style.stroke=We(Se,le,h):le&&(v.style.stroke=le),ce!==null&&j!==null?v.style.strokeWidth=`${ce+(j-ce)*h}`:j!==null&&(v.style.strokeWidth=`${j}`),pe!==null&&Z!==null?v.style.fillOpacity=`${pe+(Z-pe)*h}`:Z!==null&&(v.style.fillOpacity=`${Z}`),I&&v.tagName.toLowerCase()==="path"&&i[R]&&v.setAttribute("d",ct(i[R],I,h)),R===0&&(d?.(h),e.style.setProperty("--scroll-draw-progress",String(h))),h<1&&(ke=false);}),w){let v=Ee(K(a,f,ge,b));for(let R in w){let me=parseFloat(R);v>=me&&!Ve.has(me)&&(Ve.add(me),w[R]?.());}}!_&&K(a,f,ge,b)>0&&(_=true,x?.()),ke&&!N?(N=true,g?.(),De<(S==="infinite"?1/0:S??0)&&(De++,He=setTimeout(()=>{ye=-1,_=false,N=false,Ve.clear(),Ze(),ze=true;},oe))):!ke&&!re&&(N=false),q=requestAnimationFrame(Ke);}let at=false;function Je(){at||(at=true,q=requestAnimationFrame(function(){Ke();}));}function et(){at=false,cancelAnimationFrame(q);}let lt=new IntersectionObserver(o=>{o.forEach(a=>{Ae=a.isIntersecting,Ae&&!U?(ze=true,Je()):et();});},{root:ve??null,threshold:F,rootMargin:P});function Tt(){z.forEach((o,a)=>{O[a]=Be(o),o.style.strokeDasharray=`${O[a]}`;}),St(),ze=true;}let tt;function Ge(){clearTimeout(tt),tt=setTimeout(Tt,150);}window.addEventListener("resize",Ge),window.addEventListener("orientationchange",Ge);let je;return typeof ResizeObserver<"u"&&(je=new ResizeObserver(()=>Ge()),je.observe(document.body),je.observe(document.documentElement),je.observe(e)),G>0?setTimeout(()=>lt.observe(e),G):lt.observe(e),it({destroy(){cancelAnimationFrame(q),clearTimeout(He),et(),lt.disconnect(),je?.disconnect(),window.removeEventListener("resize",Ge),window.removeEventListener("orientationchange",Ge),clearTimeout(tt),yt();},replay(){ye=-1,te=-1,Qe=-1,_=false,N=false,De=0,U=false,he=0,Ve.clear(),clearTimeout(He),Ze(),ze=true,Ae&&Je();},pause(){U=true,et();},resume(){U&&(U=false,ze=true,Ae&&Je());},seek(o){let a=Math.min(1,Math.max(0,o));he=a,ye=a,U=true,et(),qt(a,A),ze=true;},getProgress(){return he},refresh(){clearTimeout(tt),Tt(),Ae&&!U&&Je();}},()=>({tStart:f,tEnd:ge}))}function on(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Rt(e){let r=[],n=/([\w]+)\(([^)]*)\)/g,t;for(;(t=n.exec(e))!==null;){let l=[],s=[],c=t[2].trim();if(c)for(let u of c.split(/[\s,]+/)){let m=u.match(/^([-+]?[\d.eE]+)(.*)$/);l.push(m?parseFloat(m[1]):0),s.push(m?m[2]:"");}r.push({fn:t[1],nums:l,units:s});}return r}function sn(e,r,n){let t=Rt(e),l=Rt(r);return t.length===0||t.length!==l.length?n<1?e:r:t.map((s,c)=>{let u=l[c];return s.fn!==u.fn||s.nums.length!==u.nums.length?n<1?`${s.fn}(${s.nums.map((m,p)=>`${m}${s.units[p]}`).join(", ")})`:`${u.fn}(${u.nums.map((m,p)=>`${m}${u.units[p]}`).join(", ")})`:`${s.fn}(${s.nums.map((m,p)=>`${m+(u.nums[p]-m)*n}${s.units[p]}`).join(", ")})`}).join(" ")}function Dt(e,r,n){if(typeof e=="number"&&typeof r=="number")return String(e+(r-e)*n);let t=String(e),l=String(r);if(on(t))return We(t,l,n);if(t.includes("("))return sn(t,l,n);let s=t.match(/^([-+]?[\d.]+)(.*)$/),c=l.match(/^([-+]?[\d.]+)(.*)$/);if(s&&c){let u=parseFloat(s[1]),m=parseFloat(c[1]);return `${u+(m-u)*n}${s[2]||c[2]}`}return n<1?t:l}function an(e){return e.replace(/([A-Z])/g,r=>`-${r.toLowerCase()}`)}var ln=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),cn=0,Nt="--scroll-draw-progress";function un(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function mt(e,r){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let{props:t,trigger:l={},easing:s="ease-out",speed:c=1,once:u=false,axis:m="y",scrollContainer:p,native:T=true,velocityScale:V=false,respectReducedMotion:A=true,triggerElement:re,onProgress:$e,onComplete:W,onEnter:J,onLeave:X,onEnterBack:G,onLeaveBack:M}=r,$=A&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,L=typeof s=="function"?s:ne[s]??ne["ease-out"],w=de(l.start??"top bottom"),k=de(l.end??"bottom top"),F=re??e,P=typeof p=="string"?document.querySelector(p):p??null,S=Object.entries(t).map(([i,f])=>({prop:an(i),from:Array.isArray(f)?f[0]:"",to:Array.isArray(f)?f[1]:f}));function oe(){let i=window.getComputedStyle(e);for(let f of S)f.from===""&&(f.from=i.getPropertyValue(f.prop).trim()||"0");}function I(){for(let i of S)e.style.setProperty(i.prop,String(i.to));}let se=new Map;for(let i of [...S.map(f=>f.prop),Nt])se.set(i,e.style.getPropertyValue(i));function ie(){for(let[i,f]of se)f?e.style.setProperty(i,f):e.style.removeProperty(i);}if($)return I(),W?.(),{...n,destroy:ie,getProgress:()=>1};oe();let ee=typeof s=="string"?rt(s):null;function ae(){if(!T||!un()||!ee||m!=="y"||P||F!==e||u||c!==1||$e||W||J||X||G||M||V!==false||(l.start??"top bottom").trim()!=="top bottom"||(l.end??"bottom top").trim()!=="bottom top")return false;for(let i of S)if(!ln.has(i.prop))return false;return true}function d(){let i=`ssd-a-${++cn}`,f=S.map(te=>`${te.prop}:${te.from}`).join(";"),ge=S.map(te=>`${te.prop}:${te.to}`).join(";"),N=document.createElement("style");N.setAttribute("data-ssd-animate",""),N.textContent=`@keyframes ${i}{from{${f}}to{${ge}}}.${i}{animation-name:${i};animation-duration:auto;animation-timing-function:${ee};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(N),e.classList.add(i);let _=()=>m==="x"?window.scrollX:window.scrollY,q=()=>m==="x"?window.innerWidth:window.innerHeight,Ae=()=>{let te=e.getBoundingClientRect();return xe({top:te.top,height:te.height},_(),q(),w,k)};Le(e,{type:"animate",getProgress:()=>ye.getProgress(),getTrigger:Ae});let ye={destroy(){e.classList.remove(i),N.remove(),e.style.animationPlayState="",ie(),Ce(e);},replay(){e.classList.remove(i),e.offsetWidth,e.classList.add(i);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(te){let U=Math.min(1,Math.max(0,te));e.classList.remove(i);for(let he of S)e.style.setProperty(he.prop,Dt(he.from,he.to,U));},getProgress(){let{tStart:te,tEnd:U}=Ae();return L(K(_(),te,U,c))}};return ye}if(ae())return d();let x=0,g=0,C=0,E=false,D=false,fe=-1,Q=0,Ee=false,Pe=NaN,_e=-1,ve=0,Se=()=>P?m==="x"?P.scrollLeft:P.scrollTop:m==="x"?window.scrollX:window.scrollY,le=()=>P?m==="x"?P.clientWidth:P.clientHeight:m==="x"?window.innerWidth:window.innerHeight;function ce(){let i=nt(F,P,m),f=xe(i,i.scroll,le(),w,k);x=f.tStart,g=f.tEnd;}function j(i){e.style.setProperty(Nt,String(i));for(let f of S)e.style.setProperty(f.prop,Dt(f.from,f.to,i));$e?.(i);}function pe(i){if(isNaN(Pe)){Pe=i;return}Pe<=0&&i>0?J?.():Pe>0&&i<=0&&M?.(),Pe<1&&i>=1?X?.():Pe>=1&&i<1&&G?.(),Pe=i;}function Z(){if(!E||D)return;let i=performance.now(),f=Se(),ge=c;if(V!==false){let q=i-ve,Ae=q>0?Math.abs(f-(_e<0?f:_e))/q:0;ge=c*Math.max(.2,1+Ae*(typeof V=="number"?V:1)*.04);}_e=f,ve=i;let N=g===x?0:(f-x)/(g-x);pe(N);let _=L(K(f,x,g,ge));u&&(fe=Math.max(fe,_),_=fe),Q=_,j(_),_>=1&&!Ee?(Ee=true,W?.()):_<1&&!u&&(Ee=false),C=requestAnimationFrame(Z);}ce(),g===x&&we("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let i=L(K(Se(),x,g,c));u&&i>0&&(fe=i),Q=i,j(i);}let Oe=new IntersectionObserver(i=>{i.forEach(f=>{E=f.isIntersecting,E&&!D?C=requestAnimationFrame(Z):cancelAnimationFrame(C);});},{root:P??null}),z;function O(){clearTimeout(z),z=setTimeout(ce,150);}return window.addEventListener("resize",O),window.addEventListener("orientationchange",O),Oe.observe(e),Le(e,{type:"animate",getProgress:()=>Q,getTrigger:()=>({tStart:x,tEnd:g})}),{destroy(){cancelAnimationFrame(C),Oe.disconnect(),window.removeEventListener("resize",O),window.removeEventListener("orientationchange",O),clearTimeout(z),ie(),Ce(e);},replay(){fe=-1,Ee=false,Q=0,D=false,j(0);},pause(){D=true,cancelAnimationFrame(C);},resume(){D&&(D=false,E&&(C=requestAnimationFrame(Z)));},seek(i){let f=Math.min(1,Math.max(0,i));Q=f,fe=f,D=true,cancelAnimationFrame(C),j(f);},getProgress(){return Q}}}var ft={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function pt(e,r){if(typeof window>"u")return ft;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return we("scrollCounter: element not found:",e),ft;let t=n,{from:l=0,to:s,format:c,easing:u="ease-out",trigger:m={},once:p=true,decimals:T,onComplete:V}=r,A=T!==void 0?d=>d.toFixed(T):c??(d=>String(Math.round(d))),re=typeof u=="function"?u:ne[u]??ne["ease-out"],$e=de(m.start??"top 80%"),W=de(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=A(s),V?.(),ft;let X=0,G=0,M=0,$=false,L=false,w=-1,k=0,F=false,P=()=>window.scrollY,S=()=>window.innerHeight;function oe(){let d=t.getBoundingClientRect(),x=xe({top:d.top,height:d.height},P(),S(),$e,W);X=x.tStart,G=x.tEnd;}function I(d){t.textContent=A(l+(s-l)*d),t.style.setProperty("--scroll-draw-progress",String(d));}function se(){if(!$||L)return;let d=re(K(P(),X,G,1));p&&(w=Math.max(w,d),d=w),k=d,I(d),d>=1&&!F?(F=true,V?.()):d<1&&!p&&(F=false),M=requestAnimationFrame(se);}oe();{let d=re(K(P(),X,G,1));p&&d>0&&(w=d),k=d,I(d);}let ie=new IntersectionObserver(d=>{d.forEach(x=>{$=x.isIntersecting,$&&!L?M=requestAnimationFrame(se):cancelAnimationFrame(M);});}),ee;function ae(){clearTimeout(ee),ee=setTimeout(oe,150);}return window.addEventListener("resize",ae),window.addEventListener("orientationchange",ae),ie.observe(t),Le(t,{type:"counter",getProgress:()=>k,getTrigger:()=>({tStart:X,tEnd:G})}),{destroy(){cancelAnimationFrame(M),ie.disconnect(),window.removeEventListener("resize",ae),window.removeEventListener("orientationchange",ae),clearTimeout(ee),Ce(t);},replay(){w=-1,F=false,k=0,L=false,I(0);},pause(){L=true,cancelAnimationFrame(M);},resume(){L&&(L=false,$&&(M=requestAnimationFrame(se)));},seek(d){let x=Math.min(1,Math.max(0,d));k=x,w=x,L=true,cancelAnimationFrame(M),I(x);},getProgress(){return k}}}var Ht={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function dt(e,r={}){if(typeof window>"u")return Ht;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return we("scrollVideo: <video> element not found:",e),Ht;let t=n,{trigger:l={},easing:s="linear",once:c=false,axis:u="y",preload:m="auto",onReady:p,onComplete:T,onProgress:V}=r,A=window.matchMedia("(prefers-reduced-motion: reduce)").matches,re=typeof s=="function"?s:ne[s]??ne.linear,$e=de(l.start??"top top"),W=de(l.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let J=r.from??0,X=r.to,G=0,M=0,$=0,L=false,w=false,k=-1,F=0,P=false,S=false,oe=()=>u==="x"?window.scrollX:window.scrollY,I=()=>u==="x"?window.innerWidth:window.innerHeight;function se(){let E=t.getBoundingClientRect(),D=u==="x"?E.left:E.top,fe=u==="x"?E.width:E.height,Q=xe({top:D,height:fe},oe(),I(),$e,W);G=Q.tStart,M=Q.tEnd;}let ie=NaN;function ee(E){if(!S)return;let D=X??t.duration??0,fe=J+(D-J)*E;fe!==ie&&(ie=fe,t.currentTime=fe),t.style.setProperty("--scroll-draw-progress",String(E)),V?.(E);}function ae(){if(!L||w||!S||A)return;let E=re(K(oe(),G,M,1));c&&(k=Math.max(k,E),E=k),F=E,ee(E),E>=1&&!P?(P=true,T?.()):E<1&&!c&&(P=false),$=requestAnimationFrame(ae);}function d(){if(S=true,X===void 0&&(X=t.duration),A){ee(1),p?.();return}se(),p?.(),L&&!w&&($=requestAnimationFrame(ae));}t.readyState>=1?d():t.addEventListener("loadedmetadata",d,{once:true}),S||se();let x=new IntersectionObserver(E=>{E.forEach(D=>{L=D.isIntersecting,L&&!w&&S?$=requestAnimationFrame(ae):cancelAnimationFrame($);});}),g;function C(){clearTimeout(g),g=setTimeout(se,150);}return window.addEventListener("resize",C),window.addEventListener("orientationchange",C),x.observe(t),Le(t,{type:"video",getProgress:()=>F,getTrigger:()=>({tStart:G,tEnd:M})}),{destroy(){cancelAnimationFrame($),x.disconnect(),t.removeEventListener("loadedmetadata",d),window.removeEventListener("resize",C),window.removeEventListener("orientationchange",C),clearTimeout(g),Ce(t);},replay(){k=-1,P=false,F=0,w=false,ie=NaN,ee(0);},pause(){w=true,cancelAnimationFrame($);},resume(){w&&(w=false,L&&S&&($=requestAnimationFrame(ae)));},seek(E){let D=Math.min(1,Math.max(0,E));F=D,k=D,w=true,cancelAnimationFrame($),ie=NaN,ee(D);},getProgress(){return F}}}function _t(e){let r=e.textContent??"";return e.textContent="",r.split(/(\s+)/).filter(Boolean).map(n=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(n)?(t.textContent=n,t.style.whiteSpace="pre"):(t.textContent=n,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(n)?null:t}).filter(n=>n!==null)}function mn(e){let r=e.textContent??"";return e.textContent="",r.split("").map(n=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=n,n===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),n===" "?null:t}).filter(n=>n!==null)}function Vt(e){let r=_t(e),n=new Map;for(let s of r){let c=s.offsetTop;n.has(c)||n.set(c,[]),n.get(c).push(s);}let t=[],l=Array.from(n.keys()).sort((s,c)=>s-c);for(let s of l){let c=n.get(s),u=document.createElement("span");u.setAttribute("aria-hidden","true"),u.style.display="inline-block",c.forEach((m,p)=>{let T=m.nextElementSibling;u.appendChild(m),p<c.length-1&&T&&T.style.whiteSpace==="pre"&&u.appendChild(T);}),t.push(u);}return e.textContent="",t.forEach((s,c)=>{e.appendChild(s),c<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function fn(e,r,n,t){if(n<=1||t===0)return e;let l=(n-1)*t,s=r*t,c=s+(1-l);return c<=s?e>=s?1:0:Math.min(1,Math.max(0,(e-s)/(c-s)))}function pn(e,r){let n=[];if(r?.y!==void 0&&n.push(`translateY(${r.y*(1-e)}px)`),r?.x!==void 0&&n.push(`translateX(${r.x*(1-e)}px)`),r?.rotate!==void 0&&n.push(`rotate(${r.rotate*(1-e)}deg)`),r?.scale!==void 0){let t=r.scale+(1-r.scale)*e;n.push(`scale(${t})`);}return n.join(" ")||""}var zt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function gt(e,r={}){if(typeof window>"u")return zt;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return we("scrollText: element not found:",e),zt;let t=n,{split:l="words",stagger:s=.04,easing:c="ease-out",from:u={opacity:0,y:24},trigger:m={},once:p=true,onComplete:T}=r,V=window.matchMedia("(prefers-reduced-motion: reduce)").matches,A=typeof c=="function"?c:ne[c]??ne["ease-out"],re=de(m.start??"top 85%"),$e=de(m.end??"top 40%"),W=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let J;l==="chars"?J=mn(t):l==="lines"?J=Vt(t):J=_t(t);let X=J.length;function G(g,C){u?.opacity!==void 0&&(g.style.opacity=String(u.opacity+(1-u.opacity)*C));let E=pn(C,u);E&&(g.style.transform=E);}function M(g){t.style.setProperty("--scroll-draw-progress",String(g)),J.forEach((C,E)=>{let D=A(fn(g,E,X,s));G(C,D);});}if(V)return M(1),T?.(),{destroy(){t.innerHTML=W,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};M(0);let $=0,L=0,w=0,k=false,F=false,P=-1,S=0,oe=false,I=()=>window.scrollY,se=()=>window.innerHeight;function ie(){let g=t.getBoundingClientRect(),C=xe({top:g.top,height:g.height},I(),se(),re,$e);$=C.tStart,L=C.tEnd;}function ee(){if(!k||F)return;let g=K(I(),$,L,1);p&&(P=Math.max(P,g),g=P),S=g,M(g),g>=1&&!oe?(oe=true,T?.()):g<1&&!p&&(oe=false),w=requestAnimationFrame(ee);}ie();let ae=new IntersectionObserver(g=>{g.forEach(C=>{k=C.isIntersecting,k&&!F?w=requestAnimationFrame(ee):cancelAnimationFrame(w);});}),d;function x(){clearTimeout(d),d=setTimeout(()=>{if(l==="lines"){let g=S;t.innerHTML=W,t.setAttribute("aria-label",t.textContent??""),J=Vt(t),M(g);}ie();},150);}return window.addEventListener("resize",x),window.addEventListener("orientationchange",x),ae.observe(t),Le(t,{type:"text",getProgress:()=>S,getTrigger:()=>({tStart:$,tEnd:L})}),{destroy(){cancelAnimationFrame(w),ae.disconnect(),window.removeEventListener("resize",x),window.removeEventListener("orientationchange",x),clearTimeout(d),t.innerHTML=W,t.removeAttribute("aria-label"),Ce(t);},replay(){P=-1,oe=false,S=0,F=false,M(0);},pause(){F=true,cancelAnimationFrame(w);},resume(){F&&(F=false,k&&(w=requestAnimationFrame(ee)));},seek(g){let C=Math.min(1,Math.max(0,g));S=C,P=C,F=true,cancelAnimationFrame(w),M(C);},getProgress(){return S}}}function Xn(e={}){let r=ref(null);return onMounted(()=>{if(!r.value)return;let n=ut(r.value,e);onUnmounted(()=>n.destroy());}),r}var Qn=defineComponent({name:"ScrollDraw",props:{selector:{type:String},speed:{type:Number},fade:{type:Boolean},stagger:{type:Number},easing:{type:[String,Function]},direction:{type:String},trigger:{type:Object},onProgress:{type:Function},onStart:{type:Function},onComplete:{type:Function},once:{type:Boolean},debug:{type:Boolean}},setup(e,{slots:r}){let n=ref(null);return onMounted(()=>{if(!n.value)return;let t={};e.selector!=null&&(t.selector=e.selector),e.speed!=null&&(t.speed=e.speed),e.fade!=null&&(t.fade=e.fade),e.stagger!=null&&(t.stagger=e.stagger),e.easing!=null&&(t.easing=e.easing),e.direction!=null&&(t.direction=e.direction),e.trigger!=null&&(t.trigger=e.trigger),e.once!=null&&(t.once=e.once),e.debug!=null&&(t.debug=e.debug),e.onProgress!=null&&(t.onProgress=e.onProgress),e.onStart!=null&&(t.onStart=e.onStart),e.onComplete!=null&&(t.onComplete=e.onComplete);let l=ut(n.value,t);onUnmounted(()=>l.destroy());}),()=>h("div",{ref:n},r.default?.())}});function Zn(e){let r=ref(null);return onMounted(()=>{if(!r.value)return;let n=mt(r.value,e);onUnmounted(()=>n.destroy());}),r}var Kn=defineComponent({name:"ScrollAnimate",props:{options:{type:Object,required:true}},setup(e,{slots:r}){let n=ref(null);return onMounted(()=>{if(!n.value)return;let t=mt(n.value,e.options);onUnmounted(()=>t.destroy());}),()=>h("div",{ref:n},r.default?.())}});function Jn(e){let r=ref(null);return onMounted(()=>{if(!r.value)return;let n=pt(r.value,e);onUnmounted(()=>n.destroy());}),r}var er=defineComponent({name:"ScrollCounter",props:{to:{type:Number,required:true},from:{type:Number},format:{type:Function},easing:{type:[String,Function]},trigger:{type:Object},once:{type:Boolean},decimals:{type:Number},onComplete:{type:Function}},setup(e){let r=ref(null);return onMounted(()=>{if(!r.value)return;let n={to:e.to};e.from!=null&&(n.from=e.from),e.format!=null&&(n.format=e.format),e.easing!=null&&(n.easing=e.easing),e.trigger!=null&&(n.trigger=e.trigger),e.once!=null&&(n.once=e.once),e.decimals!=null&&(n.decimals=e.decimals),e.onComplete!=null&&(n.onComplete=e.onComplete);let t=pt(r.value,n);onUnmounted(()=>t.destroy());}),()=>h("span",{ref:r})}});function tr(e={}){let r=ref(null);return onMounted(()=>{if(!r.value)return;let n=dt(r.value,e);onUnmounted(()=>n.destroy());}),r}var nr=defineComponent({name:"ScrollVideo",props:{src:{type:String,required:true},options:{type:Object},muted:{type:Boolean,default:true},playsInline:{type:Boolean,default:true},class:{type:String}},setup(e){let r=ref(null);return onMounted(()=>{if(!r.value)return;let n=dt(r.value,e.options??{});onUnmounted(()=>n.destroy());}),()=>h("video",{ref:r,src:e.src,muted:e.muted,playsinline:e.playsInline,preload:"auto",class:e.class})}});function rr(e={}){let r=ref(null);return onMounted(()=>{if(!r.value)return;let n=gt(r.value,e);onUnmounted(()=>n.destroy());}),r}var or=defineComponent({name:"ScrollText",props:{options:{type:Object},tag:{type:String,default:"p"}},setup(e,{slots:r}){let n=ref(null);return onMounted(()=>{if(!n.value)return;let t=gt(n.value,e.options??{});onUnmounted(()=>t.destroy());}),()=>h(e.tag,{ref:n},r.default?.())}});export{Kn as ScrollAnimate,er as ScrollCounter,Qn as ScrollDraw,or as ScrollText,nr as ScrollVideo,Zn as useScrollAnimate,Jn as useScrollCounter,Xn as useScrollDraw,rr as useScrollText,tr as useScrollVideo};
1
+ export{d as ScrollAnimate,f as ScrollCounter,b as ScrollDraw,j as ScrollText,h as ScrollVideo,c as useScrollAnimate,e as useScrollCounter,a as useScrollDraw,i as useScrollText,g as useScrollVideo}from'../chunk-E4M2PB7B.mjs';import'../chunk-JC5BD4RB.mjs';import'../chunk-SNCRC6BA.mjs';import'../chunk-4MH5SQTH.mjs';import'../chunk-QJ4H2HW3.mjs';import'../chunk-WDIHLRZZ.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-PEFR3ZB7.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';