svg-scroll-draw 2.21.0 → 2.22.0

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 (74) hide show
  1. package/README.md +11 -9
  2. package/dist/angular/index.cjs +3 -3
  3. package/dist/angular/index.d.mts +1 -1
  4. package/dist/angular/index.d.ts +1 -1
  5. package/dist/angular/index.mjs +1 -1
  6. package/dist/astro/index.cjs +3 -3
  7. package/dist/astro/index.mjs +1 -1
  8. package/dist/cdn/svg-scroll-draw.dev.global.js +83 -29
  9. package/dist/cdn/svg-scroll-draw.global.js +3 -3
  10. package/dist/chunk-2PYLM3E7.mjs +1 -0
  11. package/dist/chunk-DY5JCXVR.mjs +1 -0
  12. package/dist/{chunk-MTEGM4RR.mjs → chunk-GVBO5GRD.mjs} +1 -1
  13. package/dist/chunk-HX4SP5WN.mjs +3 -0
  14. package/dist/chunk-LTCJVVSC.mjs +1 -0
  15. package/dist/chunk-N6PDF6O6.mjs +2 -0
  16. package/dist/{chunk-SMRTRZSD.mjs → chunk-OTDD2ROH.mjs} +1 -1
  17. package/dist/{chunk-MENZ5DS4.mjs → chunk-PKY27MO4.mjs} +1 -1
  18. package/dist/chunk-VDTAYUAR.mjs +1 -0
  19. package/dist/chunk-WXUOF4NM.mjs +1 -0
  20. package/dist/cinematic/index.cjs +2 -2
  21. package/dist/cinematic/index.mjs +1 -1
  22. package/dist/{engine-DQyBzZDl.d.ts → engine-B7UpB4fT.d.ts} +2 -1
  23. package/dist/{engine-P8u6OK4m.d.mts → engine-o1VSQ1lX.d.mts} +2 -1
  24. package/dist/group/index.cjs +3 -3
  25. package/dist/group/index.d.mts +2 -2
  26. package/dist/group/index.d.ts +2 -2
  27. package/dist/group/index.mjs +1 -1
  28. package/dist/horizontal/index.cjs +1 -1
  29. package/dist/horizontal/index.d.mts +2 -1
  30. package/dist/horizontal/index.d.ts +2 -1
  31. package/dist/horizontal/index.mjs +1 -1
  32. package/dist/{index-CMqK0GCT.d.mts → index-BY-CNE8c.d.mts} +1 -1
  33. package/dist/{index-DPqPEnO-.d.ts → index-DqXXiDIk.d.ts} +1 -1
  34. package/dist/index.cjs +4 -4
  35. package/dist/index.d.mts +2 -2
  36. package/dist/index.d.ts +2 -2
  37. package/dist/index.mjs +1 -1
  38. package/dist/nuxt/index.cjs +3 -3
  39. package/dist/nuxt/index.d.mts +1 -1
  40. package/dist/nuxt/index.d.ts +1 -1
  41. package/dist/nuxt/index.mjs +1 -1
  42. package/dist/react/index.cjs +3 -3
  43. package/dist/react/index.d.mts +1 -1
  44. package/dist/react/index.d.ts +1 -1
  45. package/dist/react/index.mjs +1 -1
  46. package/dist/reveal/index.cjs +1 -1
  47. package/dist/reveal/index.mjs +1 -1
  48. package/dist/snap/index.mjs +1 -1
  49. package/dist/solid/index.cjs +2 -2
  50. package/dist/solid/index.d.mts +1 -1
  51. package/dist/solid/index.d.ts +1 -1
  52. package/dist/solid/index.mjs +1 -1
  53. package/dist/svelte/index.cjs +3 -3
  54. package/dist/svelte/index.d.mts +1 -1
  55. package/dist/svelte/index.d.ts +1 -1
  56. package/dist/svelte/index.mjs +1 -1
  57. package/dist/text/index.cjs +1 -1
  58. package/dist/text/index.mjs +1 -1
  59. package/dist/timeline/index.mjs +1 -1
  60. package/dist/video/index.cjs +1 -1
  61. package/dist/video/index.mjs +1 -1
  62. package/dist/vue/index.cjs +3 -3
  63. package/dist/vue/index.d.mts +1 -1
  64. package/dist/vue/index.d.ts +1 -1
  65. package/dist/vue/index.mjs +1 -1
  66. package/dist/web-component/index.cjs +3 -3
  67. package/dist/web-component/index.mjs +1 -1
  68. package/package.json +1 -1
  69. package/dist/chunk-426RAN5I.mjs +0 -1
  70. package/dist/chunk-7SBTYJGH.mjs +0 -1
  71. package/dist/chunk-BFX2CSQ3.mjs +0 -1
  72. package/dist/chunk-ENACACPZ.mjs +0 -3
  73. package/dist/chunk-KGAJQP2N.mjs +0 -2
  74. package/dist/chunk-KHQ7OGQK.mjs +0 -1
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  [![license](https://img.shields.io/npm/l/svg-scroll-draw)](./LICENSE)
8
8
  [![GitHub stars](https://img.shields.io/github/stars/DhruvilChauahan0210/ink-scroll?style=flat)](https://github.com/DhruvilChauahan0210/ink-scroll/stargazers)
9
9
 
10
- > Draw SVG paths on scroll — plus reveal, pin, snap, parallax, counters, video scrub and text splitting. **11.4 KB gzipped for every API, from 1.4 KB if you import one.** Zero dependencies, MIT, and a native CSS fast path that runs with no per-frame JavaScript. Works in React, Next.js, Vue, Svelte, Solid, Angular, Astro, Nuxt and vanilla JS.
10
+ > Draw SVG paths on scroll — plus reveal, pin, snap, parallax, counters, video scrub and text splitting. **11.7 KB gzipped for every API, from 1.6 KB if you import one.** Zero dependencies, MIT, and a native CSS fast path that runs with no per-frame JavaScript. Works in React, Next.js, Vue, Svelte, Solid, Angular, Astro, Nuxt and vanilla JS.
11
11
 
12
12
  **[Live Demo](https://svg-scroll-draw.vercel.app)** · [npm](https://www.npmjs.com/package/svg-scroll-draw) · [Docs](https://svg-scroll-draw.vercel.app/docs) · [Examples](https://svg-scroll-draw.vercel.app/examples) · [Report a bug](https://github.com/DhruvilChauahan0210/ink-scroll/issues)
13
13
 
@@ -28,7 +28,7 @@
28
28
  | `scrollParallax` | `svg-scroll-draw` | Move any element at a different rate than scroll. Speed multiplier, reverse direction. |
29
29
  | `scrollDraw` | `svg-scroll-draw` | The original — scroll-driven SVG path drawing via `stroke-dashoffset`. |
30
30
  | `scrollVideo` | `svg-scroll-draw/video` | Tie `<video>.currentTime` to scroll. The Apple/Stripe product-page pattern. |
31
- | `scrollText` | `svg-scroll-draw/text` | Split text into chars/words/lines and stagger-animate each on scroll. 3.2 KB, nothing else to load. |
31
+ | `scrollText` | `svg-scroll-draw/text` | Split text into chars/words/lines and stagger-animate each on scroll. 3.4 KB, nothing else to load. |
32
32
  | `devtools` | `svg-scroll-draw/devtools` | Visual overlay showing every active animation's triggers and progress. Dev-only. |
33
33
  | `AOS` | `svg-scroll-draw/aos` | Drop-in replacement for AOS: same `AOS.init()`, same `data-aos` markup, no `aos.css`. |
34
34
  | `ScrollReveal` | `svg-scroll-draw/scrollreveal` | Drop-in replacement for ScrollReveal.js 4, MIT instead of GPL-3.0. |
@@ -36,6 +36,8 @@
36
36
 
37
37
  All APIs return the same instance object: `{ destroy, replay, pause, resume, seek, getProgress }`.
38
38
 
39
+ Under `prefers-reduced-motion: reduce` each one shows its finished state instead of animating. If the reader turns the setting on while the page is open, everything still moving finishes at once, as if the page had loaded that way; turning it off again leaves it finished until the next load.
40
+
39
41
  ---
40
42
 
41
43
  ## Install
@@ -273,7 +275,7 @@ import { ScrollText } from 'svg-scroll-draw/react';
273
275
  | `once` | `boolean` | `true` | — |
274
276
  | `onComplete` | `() => void` | — | — |
275
277
 
276
- > **Accessibility:** `scrollText` preserves the original text in `aria-label` on the container and adds `aria-hidden="true"` to all split spans. `destroy()` fully restores the original HTML.
278
+ > **Accessibility:** `scrollText` adds `aria-hidden="true"` to every split piece and keeps the whole text once in a visually hidden span, which a screen reader reads as part of the element (ARIA does not allow an `aria-label` on a `<p>`, `<span>` or `<div>`). `destroy()` fully restores the original HTML.
277
279
 
278
280
  ---
279
281
 
@@ -629,12 +631,12 @@ devtools.highlight('#my-element'); // outline for 2 seconds
629
631
  <!-- size-table:start -->
630
632
  | Entry | Gzipped |
631
633
  |---|---|
632
- | `svg-scroll-draw` (main, every core API) | 11.4 KB |
633
- | `svg-scroll-draw/react` (includes the engine) | 12.9 KB |
634
- | `svg-scroll-draw` + `svg-scroll-draw/react` (together; the engine ships once) | 14.4 KB |
635
- | `svg-scroll-draw/reveal` | 5.5 KB |
636
- | `svg-scroll-draw/text` | 3.2 KB |
637
- | `svg-scroll-draw/video` | 2.7 KB |
634
+ | `svg-scroll-draw` (main, every core API) | 11.7 KB |
635
+ | `svg-scroll-draw/react` (includes the engine) | 13.2 KB |
636
+ | `svg-scroll-draw` + `svg-scroll-draw/react` (together; the engine ships once) | 14.8 KB |
637
+ | `svg-scroll-draw/reveal` | 5.8 KB |
638
+ | `svg-scroll-draw/text` | 3.4 KB |
639
+ | `svg-scroll-draw/video` | 2.8 KB |
638
640
  | `svg-scroll-draw/scrollreveal` | 4.5 KB |
639
641
  | `svg-scroll-draw/vivus` | 4.0 KB |
640
642
  | `svg-scroll-draw/aos` (styles included) | 3.1 KB |
@@ -1,3 +1,3 @@
1
- 'use strict';function mr({bounces:e=3,decay:n=.5}={}){let r=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,n)),s=Math.sqrt(t),i=0,l=[];for(let p=0;p<r;p++){let S=Math.pow(s,p);l.push(S),i+=S;}let u=[0],f=0;for(let p=0;p<r;p++)f+=l[p]/i,u.push(f);return p=>{if(p<=0)return 0;if(p>=1)return 1;for(let S=0;S<r;S++)if(p<=u[S+1]){let N=(p-u[S])/(u[S+1]-u[S]);if(S===0)return N*(2-N);let P=1-Math.pow(t,S);return P+(1-P)*(2*N-1)*(2*N-1)}return 1}}function fr({amplitude:e=1,period:n=.4}={}){let r=Math.max(1,e),t=Math.max(.1,n),s=r<=1?t/4:t/(2*Math.PI)*Math.asin(1/r);return i=>i<=0?0:i>=1?1:r*Math.pow(2,-10*i)*Math.sin((i-s)*(2*Math.PI)/t)+1}var le={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:mr(),elastic:fr()};function Lt(e,n,r){return Math.min(r,Math.max(n,e))}function he(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[r="top",t="bottom"]=n.split(/\s+/).filter(Boolean);return {element:r,viewport:t}}function At(e,n,r,t){switch(t){case "top":return e+r;case "center":return e+r+n/2;case "bottom":return e+r+n;default:return e+r}}function $t(e,n){if(/^\d+(\.\d+)?%$/.test(e))return n*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return n/2;case "bottom":return n;default:return n}}function ne(e,n,r,t){return r===n?0:Lt((e-n)/(r-n)*t,0,1)}function Pe(e,n,r,t,s){let i=At(e.top,e.height,n,t.element)-$t(t.viewport,r),l=At(e.top,e.height,n,s.element)-$t(s.viewport,r);return {tStart:i,tEnd:l}}function ot(e,n,r){let t=e.getBoundingClientRect(),s=r==="x"?t.width:t.height;return n?{top:r==="x"?t.left-n.getBoundingClientRect().left+n.scrollLeft:t.top-n.getBoundingClientRect().top+n.scrollTop,height:s,scroll:0}:{top:r==="x"?t.left:t.top,height:s,scroll:r==="x"?window.scrollX:window.scrollY}}function je(e){let n=e.tagName.toLowerCase();if(n==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(r+t)}if(n==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function Pt(e){let n=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(n)return [parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)];let r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(r)return [parseInt(r[1],16),parseInt(r[2],16),parseInt(r[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 Ue(e,n,r){let t=Pt(e),s=Pt(n);return !t||!s?e:`rgb(${Math.round(t[0]+(s[0]-t[0])*r)},${Math.round(t[1]+(s[1]-t[1])*r)},${Math.round(t[2]+(s[2]-t[2])*r)})`}var Ct={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 Ke=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function be(e,...n){Ke&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var pr="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",dr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",kt=33;function gr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function yr(e){let n=[];for(let r=0;r<kt;r++){let t=r/(kt-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function st(e){switch(e){case "linear":return "linear";case "ease-in":return pr;case "ease-out":return dr;case "ease-in-out":return gr()?yr(le["ease-in-out"]):null;default:return null}}var Ot=Symbol.for("svg-scroll-draw.registry");function It(){let e=globalThis;return e[Ot]||(e[Ot]=new Map)}function Oe(e,n){It().set(e,n);}function Ie(e){It().delete(e);}var Qe,it=new Set,at=new WeakMap,Ze=new Map,Ft=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function hr(e){let n=new Set;for(let r of e)for(;r&&r!==document.body;r=r.parentElement)for(let t=r;t;t=t.previousElementSibling)n.add(t);return n}function De(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>n();Qe??(Qe=new ResizeObserver(s=>{let i=false;for(let{target:l}of s)at.get(l)!==Ft(l)&&(i=true),at.set(l,"");i&&it.forEach(l=>l());})),it.add(r);let t=hr(e);return [document.body,document.documentElement].forEach(s=>s&&t.add(s)),t.forEach(s=>{at.has(s)||at.set(s,Ft(s)),Ze.set(s,(Ze.get(s)??0)+1),Qe.observe(s);}),()=>{it.delete(r)&&(t.forEach(s=>{let i=(Ze.get(s)??1)-1;if(i)return void Ze.set(s,i);Ze.delete(s),Qe?.unobserve(s);}),it.size||(Qe?.disconnect(),Qe=void 0));}}var br=0;function wr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Dt(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var Ht=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function vr(e){if(!Ke)return;let n=Dt(e,"stroke");if(!n||n==="none"){be("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!Ht.has(r)&&!Ht.has(Dt(e,"fill"))&&be("Element has a fill \u2014 it may obscure the stroke animation.",e);}function Er(e,n,r){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 s(){let i=r==="x"?window.scrollX:window.scrollY,l=e-i,u=n-i,f=r==="x";t.innerHTML=`
2
- <div style="position:absolute;${f?`left:${l}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${l}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;${f?`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",s,{passive:true}),s(),{el:t,destroy(){window.removeEventListener("scroll",s),t.remove();}}}var Nt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Rt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Sr(e,n,r){if(!Ke)return;let t=(e.match(Rt)??[]).join("").toUpperCase(),s=(n.match(Rt)??[]).join("").toUpperCase(),i=(e.match(Nt)??[]).length,l=(n.match(Nt)??[]).length;if(t!==s){be(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${s||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,r);return}i!==l&&be(`morphTo: coordinate count differs (${i} \u2192 ${l}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function dt(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),s=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,i=>{let l=parseFloat(i),u=t[s++]??l;return String(+(l+(u-l)*r).toFixed(4))})}function zt(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,s=r?{...Ct[r],...t}:t,i=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:l="path, polyline, line, polygon, rect, circle",speed:u=1,fade:f=false,easing:p="linear",trigger:S={},stagger:N=0,direction:P="forward",once:oe=false,debug:Ce=false,axis:G="y",scrollContainer:Le,autoReverse:R=false,delay:Y=0,strokeColor:X,strokeWidth:A,fillOpacity:I,waypoints:T,velocityScale:$=false,threshold:C=0,rootMargin:x="0px",repeat:w=0,repeatDelay:K=0,morphTo:M,clip:te,autoplay:xe=false,duration:we=1e3,native:ce=true,onProgress:q,onStart:F,onComplete:m,onEnter:O,onLeave:v,onEnterBack:L,onLeaveBack:ue}=s,y=te===true?"left":typeof te=="string"?te:false,z=typeof p=="function"?p:le[p]??le.linear,me=he(S.start??"top bottom"),He=he(S.end??"bottom top"),ve=typeof Le=="string"?document.querySelector(Le):Le??null,Me=Array.isArray(X)?X[0]:null,fe=Array.isArray(X)?X[1]:typeof X=="string"?X:null,Q=Array.isArray(A)?A[0]:null,se=Array.isArray(A)?A[1]:typeof A=="number"?A:null,ie=Array.isArray(I)?I[0]:null,Z=Array.isArray(I)?I[1]:typeof I=="number"?I:null;function Ne(o){let a=o*100;switch(y){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 V=y?[]:Array.from(e.querySelectorAll(l)),D=[],pe=[],re=0,Ee=0,c=N,h=0,_=false,B=false,k=0,de=false,ye=-1,Re=[],ae=-1,j=false,Se=0,ze=0,Ve,lt=null;function ht(){lt?.destroy(),lt=null;}let _e=new Set,bt=NaN,We=true,Je=-1,wt=performance.now(),Be=NaN;function Ye(){return ve?G==="x"?ve.scrollLeft:ve.scrollTop:G==="x"?window.scrollX:window.scrollY}function vt(){return ve?G==="x"?ve.clientWidth:ve.clientHeight:G==="x"?window.innerWidth:window.innerHeight}function Et(){let o=ot(e,ve,G);return Pe(o,o.scroll,vt(),me,He)}function sr(){let o=Ee-re,a=V.length-1,g=ve??document.documentElement,J=G==="x"?"Width":"Height";if(c=N,N>0&&a>0&&o>0){let Ae=g[`scroll${J}`]-g[`client${J}`]-1-re-o/u;Ae>=0&&(c=Math.min(N,Ae/(a*o)));}h=Ee+a*c*o;}function St(){(({tStart:re,tEnd:Ee}=Et())),sr(),Ce&&Ke&&(ht(),lt=Er(re,Ee,G));}function ct(o,a=Et){Oe(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:a});let g=o.destroy;return o.destroy=()=>{g.call(o),Ie(e);},o}function ir(o,a){if(e.style.setProperty("--scroll-draw-progress",String(o)),y){let g=a==="reverse"?1-o:o;e.style.clipPath=Ne(g);return}V.forEach((g,J)=>{g.style.strokeDashoffset=a==="reverse"?`${D[J]*o}`:`${D[J]*(1-o)}`,f&&(g.style.opacity=a==="reverse"?`${1-o}`:`${o}`),Me&&fe?g.style.stroke=Ue(Me,fe,o):fe&&(g.style.stroke=fe),Q!==null&&se!==null?g.style.strokeWidth=`${Q+(se-Q)*o}`:se!==null&&(g.style.strokeWidth=`${se}`),ie!==null&&Z!==null?g.style.fillOpacity=`${ie+(Z-ie)*o}`:Z!==null&&(g.style.fillOpacity=`${Z}`),M&&g.tagName.toLowerCase()==="path"&&pe[J]&&g.setAttribute("d",dt(pe[J],M,o));});}function et(){if(e.style.setProperty("--scroll-draw-progress","0"),y){e.style.clipPath=Ne(0);return}V.forEach((o,a)=>{o.style.strokeDasharray=`${D[a]}`,o.style.strokeDashoffset=P==="reverse"?"0":`${D[a]}`,f?o.style.opacity=P==="reverse"?"1":"0":o.style.opacity="",Me&&(o.style.stroke=Me),Q!==null&&(o.style.strokeWidth=`${Q}`),ie!==null&&(o.style.fillOpacity=`${ie}`),M&&o.tagName.toLowerCase()==="path"&&pe[a]&&o.setAttribute("d",pe[a]);});}if(V.forEach(o=>{vr(o);let a=je(o);D.push(a);let g=o.tagName.toLowerCase()==="path";g?pe.push(o.getAttribute("d")??""):pe.push(""),M&&(g?Sr(pe[pe.length-1],M,o):be(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),i?(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=P==="reverse"?`${a}`:"0",f&&(o.style.opacity="1"),fe&&(o.style.stroke=fe),se!==null&&(o.style.strokeWidth=`${se}`),Z!==null&&(o.style.fillOpacity=`${Z}`),M&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",M)):(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=P==="reverse"?"0":`${a}`,f?o.style.opacity=P==="reverse"?"1":"0":o.style.opacity="",Me&&(o.style.stroke=Me),Q!==null&&(o.style.strokeWidth=`${Q}`),ie!==null&&(o.style.fillOpacity=`${ie}`));}),y){if(i)return e.style.clipPath=Ne(1),m?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Ne(0);}else if(i)return m?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Tt=typeof p=="string"?st(p):null;function ar(){return !(ce===false||!wr()||!V.length||!Tt||y||G!=="y"||ve||u!==1||N!==0||oe||R||$!==false||M||T||w||Y>0||q||F||m||O||v||L||ue||X!=null||A!=null||I!=null||(S.start??"top bottom").trim()!=="top bottom"||(S.end??"bottom top").trim()!=="bottom top")}function lr(){let o=++br,a=`svg-scroll-draw-${o}`,g=`svg-scroll-draw-host-${o}`,J=`--svg-scroll-draw-${o}`,Ae=P==="reverse"?"0":"var(--ssd-len)",Fe=P==="reverse"?"var(--ssd-len)":"0",ke=`stroke-dashoffset:${Ae};`,E=`stroke-dashoffset:${Fe};`;f&&(ke+=`opacity:${P==="reverse"?1:0};`,E+=`opacity:${P==="reverse"?0:1};`);let H=document.createElement("style");H.setAttribute("data-svg-scroll-draw",""),H.textContent=`@keyframes ${a}{from{${ke}}to{${E}}}.${g}{view-timeline-name:${J};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${Tt};animation-fill-mode:both;animation-timeline:${J};animation-range:cover 0% cover 100%;}`,document.head.appendChild(H),e.classList.add(g);function ge(d,ee){d.style.setProperty("--ssd-len",String(D[ee])),d.style.strokeDasharray=`${D[ee]}`,d.style.strokeDashoffset="",d.style.opacity="",d.style.animationPlayState="",d.classList.add(a);}V.forEach(ge);let b=false,W=-1;function U(){if(W>=0)return W;let d=e.getBoundingClientRect(),{tStart:ee,tEnd:$e}=Pe({top:d.top,height:d.height},Ye(),vt(),me,He);return z(ne(Ye(),ee,$e,u))}return {destroy(){e.classList.remove(g),V.forEach(d=>{d.classList.remove(a),d.style.removeProperty("--ssd-len"),d.style.animationPlayState="";}),H.remove();},replay(){b=false,W=-1,V.forEach(ge);},pause(){b=true,V.forEach(d=>{d.style.animationPlayState="paused";});},resume(){b&&(b=false,V.forEach(d=>{d.style.animationPlayState="running";}));},seek(d){let ee=Math.min(1,Math.max(0,d));W=ee,b=true,V.forEach(($e,Te)=>{$e.classList.remove(a),$e.style.strokeDashoffset=P==="reverse"?`${D[Te]*ee}`:`${D[Te]*(1-ee)}`,f&&($e.style.opacity=P==="reverse"?`${1-ee}`:`${ee}`);});},getProgress(){return U()},refresh(){V.forEach((d,ee)=>{D[ee]=je(d),d.style.setProperty("--ssd-len",String(D[ee])),d.style.strokeDasharray=`${D[ee]}`;});}}}if(ar())return ct(lr());function cr(){let o=Math.max(1,we),a=0,g=0,J=false;function Ae(b){let W=true;if(y){let U=Math.min(1,Math.max(0,b/o)),d=z(U);Se=d,e.style.setProperty("--scroll-draw-progress",String(d)),e.style.clipPath=Ne(P==="reverse"?1-d:d),q?.(d),U<1&&(W=false);}else V.forEach((U,d)=>{let ee=d*N*o,$e=Math.min(1,Math.max(0,(b-ee)/o)),Te=z($e);U.style.strokeDashoffset=P==="reverse"?`${D[d]*Te}`:`${D[d]*(1-Te)}`,f&&(U.style.opacity=P==="reverse"?`${1-Te}`:`${Te}`),Me&&fe?U.style.stroke=Ue(Me,fe,Te):fe&&(U.style.stroke=fe),Q!==null&&se!==null?U.style.strokeWidth=`${Q+(se-Q)*Te}`:se!==null&&(U.style.strokeWidth=`${se}`),ie!==null&&Z!==null?U.style.fillOpacity=`${ie+(Z-ie)*Te}`:Z!==null&&(U.style.fillOpacity=`${Z}`),M&&U.tagName.toLowerCase()==="path"&&pe[d]&&U.setAttribute("d",dt(pe[d],M,Te)),d===0&&(Se=Te,q?.(Te),e.style.setProperty("--scroll-draw-progress",String(Te))),$e<1&&(W=false);});if(T){let U=Math.min(1,Math.max(0,b/o)),d=z(U);for(let ee in T){let $e=parseFloat(ee);d>=$e&&!_e.has($e)&&(_e.add($e),T[ee]?.());}}return W}function Fe(b){if(j)return;let W=b-a;B||(B=true,F?.());let U=Ae(W);if(U&&!_){_=true,Ae(o*(1+Math.max(0,V.length-1)*N)),m?.(),ze<(w==="infinite"?1/0:w??0)&&(ze++,Ve=setTimeout(()=>{a=performance.now(),B=false,_=false,_e.clear(),et(),k=requestAnimationFrame(Fe);},K));return}U||(k=requestAnimationFrame(Fe));}function ke(){cancelAnimationFrame(k),clearTimeout(Ve),a=performance.now(),g=0,j=false,B=false,_=false,ze=0,J=true,Se=0,_e.clear(),et(),k=requestAnimationFrame(Fe);}let E=new IntersectionObserver(b=>{b.forEach(W=>{W.isIntersecting&&!(oe&&_)?ke():!W.isIntersecting&&!oe&&!_&&(cancelAnimationFrame(k),clearTimeout(Ve),J=false);});},{root:ve??null,threshold:C,rootMargin:x}),H;function ge(){clearTimeout(H),H=setTimeout(()=>{V.forEach((b,W)=>{D[W]=je(b),b.style.strokeDasharray=`${D[W]}`;});},150);}return window.addEventListener("resize",ge),window.addEventListener("orientationchange",ge),Y>0?setTimeout(()=>E.observe(e),Y):E.observe(e),{destroy(){cancelAnimationFrame(k),clearTimeout(Ve),E.disconnect(),window.removeEventListener("resize",ge),window.removeEventListener("orientationchange",ge),clearTimeout(H);},replay(){ze=0,ke();},pause(){j||!J||(j=true,g=performance.now()-a,cancelAnimationFrame(k));},resume(){j&&(j=false,J=true,a=performance.now()-g,k=requestAnimationFrame(Fe));},seek(b){let W=Math.min(1,Math.max(0,b));Se=W,j=true,g=W*o,a=performance.now()-g,cancelAnimationFrame(k),Ae(g);},getProgress(){return Se},refresh(){clearTimeout(H),V.forEach((b,W)=>{D[W]=je(b),b.style.strokeDasharray=`${D[W]}`;});}}}if(xe)return ct(cr());St();function xt(){if(j||!Ge)return;let o=performance.now(),a=Ye();if(!We&&$===false&&a===bt){mt(a);return}We=false,bt=a;let g=u;if($!==false){let E=o-wt,H=E>0?Math.abs(a-(Je<0?a:Je))/E:0;g=u*Math.max(.2,1+H*(typeof $=="number"?$:1)*.04);}Je=a,wt=o;let J=R?ae===-1||a>=ae?"forward":"reverse":P;ae=a;let Ae=Ee-re,Fe=true,ke=Ae===0?0:(a-re)/Ae;if(isNaN(Be)||(Be<=0&&ke>0?O?.():Be>0&&ke<=0&&ue?.(),Be<1&&ke>=1?v?.():Be>=1&&ke<1&&L?.()),Be=ke,y){let E=z(ne(a,re,Ee,g));oe&&!R&&(ye=Math.max(ye,E),E=ye),Se=E,e.style.setProperty("--scroll-draw-progress",String(E));let H=J==="reverse"?1-E:E;e.style.clipPath=Ne(H),q?.(E),!B&&ne(a,re,Ee,g)>0&&(B=true,F?.()),E>=1&&!_?(_=true,m?.(),ze<(w==="infinite"?1/0:w??0)&&(ze++,Ve=setTimeout(()=>{ye=-1,B=false,_=false,e.style.clipPath=Ne(0);},K))):E<1&&!oe&&(_=false),mt(a);return}if(V.forEach((E,H)=>{let ge=H*c*Ae,b=z(ne(a,re+ge,Ee+ge,g));oe&&!R&&(b=Re[H]=Math.max(Re[H]??ye,b)),E.style.strokeDashoffset=J==="reverse"?`${D[H]*b}`:`${D[H]*(1-b)}`,f&&(E.style.opacity=J==="reverse"?`${1-b}`:`${b}`),Me&&fe?E.style.stroke=Ue(Me,fe,b):fe&&(E.style.stroke=fe),Q!==null&&se!==null?E.style.strokeWidth=`${Q+(se-Q)*b}`:se!==null&&(E.style.strokeWidth=`${se}`),ie!==null&&Z!==null?E.style.fillOpacity=`${ie+(Z-ie)*b}`:Z!==null&&(E.style.fillOpacity=`${Z}`),M&&E.tagName.toLowerCase()==="path"&&pe[H]&&E.setAttribute("d",dt(pe[H],M,b)),H===0&&(Se=b,q?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(Fe=false);}),T){let E=z(ne(a,re,Ee,g));for(let H in T){let ge=parseFloat(H);E>=ge&&!_e.has(ge)&&(_e.add(ge),T[H]?.());}}!B&&ne(a,re,Ee,g)>0&&(B=true,F?.()),Fe&&!_?(_=true,m?.(),ze<(w==="infinite"?1/0:w??0)&&(ze++,Ve=setTimeout(()=>{ye=-1,Re=[],B=false,_=false,_e.clear(),et(),We=true;},K))):!Fe&&!oe&&(_=false),mt(a);}function ut(o){return o>=Ee&&o<h}function mt(o){de||ut(o)?k=requestAnimationFrame(xt):Ge=false;}function ft(){return de||ut(Ye())}let Ge=false;function tt(){Ge||(Ge=true,k=requestAnimationFrame(function(){xt();}));}function rt(){Ge=false,cancelAnimationFrame(k);}let pt=new IntersectionObserver(o=>{o.forEach(a=>{de=a.isIntersecting,de&&!j?(We=true,tt()):Ge&&!j&&ut(Ye())||rt();});},{root:ve??null,threshold:C,rootMargin:x});function Mt(){V.forEach((o,a)=>{D[a]=je(o),o.style.strokeDasharray=`${D[a]}`;}),St(),We=true;}let nt;function Xe(){clearTimeout(nt),nt=setTimeout(Mt,150);}window.addEventListener("resize",Xe),window.addEventListener("orientationchange",Xe);let ur=De([e],Xe);return Y>0?setTimeout(()=>pt.observe(e),Y):pt.observe(e),ct({destroy(){cancelAnimationFrame(k),clearTimeout(Ve),rt(),pt.disconnect(),ur(),window.removeEventListener("resize",Xe),window.removeEventListener("orientationchange",Xe),clearTimeout(nt),ht();},replay(){ye=-1,Re=[],ae=-1,Je=-1,B=false,_=false,ze=0,j=false,Se=0,_e.clear(),clearTimeout(Ve),et(),We=true,ft()&&tt();},pause(){j=true,rt();},resume(){j&&(j=false,We=true,ft()&&tt());},seek(o){let a=Math.min(1,Math.max(0,o));Se=a,ye=a,Re=[],j=true,rt(),ir(a,P),We=true;},getProgress(){return Se},refresh(){clearTimeout(nt),Mt(),ft()&&!j&&tt();}},()=>({tStart:re,tEnd:Ee}))}var Vt=new WeakMap,Tr=0;function gt(e){return JSON.stringify(e,(n,r)=>{if(typeof r=="function")return "\u0192";if(typeof Element<"u"&&r instanceof Element){let t=Vt.get(r);return t===void 0&&Vt.set(r,t=++Tr),`el#${t}`}return r})}function _t(e,n){let r={...e};for(let t of Object.keys(r))typeof r[t]=="function"&&(r[t]=(...s)=>n()[t]?.(...s));return r}function xr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Wt(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let s=[],i=[],l=t[2].trim();if(l)for(let u of l.split(/[\s,]+/)){let f=u.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(f?parseFloat(f[1]):0),i.push(f?f[2]:"");}n.push({fn:t[1],nums:s,units:i});}return n}function Mr(e,n,r){let t=Wt(e),s=Wt(n);return t.length===0||t.length!==s.length?r<1?e:n:t.map((i,l)=>{let u=s[l];return i.fn!==u.fn||i.nums.length!==u.nums.length?r<1?`${i.fn}(${i.nums.map((f,p)=>`${f}${i.units[p]}`).join(", ")})`:`${u.fn}(${u.nums.map((f,p)=>`${f}${u.units[p]}`).join(", ")})`:`${i.fn}(${i.nums.map((f,p)=>`${f+(u.nums[p]-f)*r}${i.units[p]}`).join(", ")})`}).join(" ")}function qt(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),s=String(n);if(xr(t))return Ue(t,s,r);if(t.includes("("))return Mr(t,s,r);let i=t.match(/^([-+]?[\d.]+)(.*)$/),l=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&l){let u=parseFloat(i[1]),f=parseFloat(l[1]);return `${u+(f-u)*r}${i[2]||l[2]}`}return r<1?t:s}function Lr(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Ar=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),$r=0,Bt="--scroll-draw-progress";function Pr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Gt(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:t,trigger:s={},easing:i="ease-out",speed:l=1,once:u=false,axis:f="y",scrollContainer:p,native:S=true,velocityScale:N=false,respectReducedMotion:P=true,triggerElement:oe,onProgress:Ce,onComplete:G,onEnter:Le,onLeave:R,onEnterBack:Y,onLeaveBack:X}=n,A=P&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,I=typeof i=="function"?i:le[i]??le["ease-out"],T=he(s.start??"top bottom"),$=he(s.end??"bottom top"),C=oe??e,x=typeof p=="string"?document.querySelector(p):p??null,w=Object.entries(t).map(([c,h])=>({prop:Lr(c),from:Array.isArray(h)?h[0]:"",to:Array.isArray(h)?h[1]:h}));function K(){let c=window.getComputedStyle(e);for(let h of w)h.from===""&&(h.from=c.getPropertyValue(h.prop).trim()||"0");}function M(){for(let c of w)e.style.setProperty(c.prop,String(c.to));}let te=new Map;for(let c of [...w.map(h=>h.prop),Bt])te.set(c,e.style.getPropertyValue(c));function xe(){for(let[c,h]of te)h?e.style.setProperty(c,h):e.style.removeProperty(c);}if(A)return M(),G?.(),{...r,destroy:xe,getProgress:()=>1};K();let we=typeof i=="string"?st(i):null;function ce(){if(!S||!Pr()||!we||f!=="y"||x||C!==e||u||l!==1||Ce||G||Le||R||Y||X||N!==false||(s.start??"top bottom").trim()!=="top bottom"||(s.end??"bottom top").trim()!=="bottom top")return false;for(let c of w)if(!Ar.has(c.prop))return false;return true}function q(){let c=`ssd-a-${++$r}`,h=w.map(ae=>`${ae.prop}:${ae.from}`).join(";"),_=w.map(ae=>`${ae.prop}:${ae.to}`).join(";"),B=document.createElement("style");B.setAttribute("data-ssd-animate",""),B.textContent=`@keyframes ${c}{from{${h}}to{${_}}}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${we};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(B),e.classList.add(c);let k=()=>f==="x"?window.scrollX:window.scrollY,de=()=>f==="x"?window.innerWidth:window.innerHeight,ye=()=>{let ae=e.getBoundingClientRect();return Pe({top:ae.top,height:ae.height},k(),de(),T,$)};Oe(e,{type:"animate",getProgress:()=>Re.getProgress(),getTrigger:ye});let Re={refresh(){},destroy(){e.classList.remove(c),B.remove(),e.style.animationPlayState="",xe(),Ie(e);},replay(){e.classList.remove(c),e.offsetWidth,e.classList.add(c);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(ae){let j=Math.min(1,Math.max(0,ae));e.classList.remove(c);for(let Se of w)e.style.setProperty(Se.prop,qt(Se.from,Se.to,j));},getProgress(){let{tStart:ae,tEnd:j}=ye();return I(ne(k(),ae,j,l))}};return Re}if(ce())return q();let F=0,m=0,O=0,v=false,L=false,ue=-1,y=0,z=false,me=NaN,He=-1,ve=0,Me=()=>x?f==="x"?x.scrollLeft:x.scrollTop:f==="x"?window.scrollX:window.scrollY,fe=()=>x?f==="x"?x.clientWidth:x.clientHeight:f==="x"?window.innerWidth:window.innerHeight,Q=C===e?w:[],se=false;function ie(){let c=e.style,h=Q.map(de=>c.getPropertyValue(de.prop)),_=c.transition;Q.length&&(c.transition="none"),Q.forEach(de=>c.setProperty(de.prop,te.get(de.prop)??""));let B=ot(C,x,f);Q.forEach((de,ye)=>c.setProperty(de.prop,h[ye])),Q.length&&(e.offsetWidth,c.transition=_);let k=Pe(B,B.scroll,fe(),T,$);se&&Math.abs(k.tStart-F)<1&&Math.abs(k.tEnd-m)<1||(se=true,F=k.tStart,m=k.tEnd);}function Z(c){e.style.setProperty(Bt,String(c));for(let h of w)e.style.setProperty(h.prop,qt(h.from,h.to,c));Ce?.(c);}function Ne(c){if(isNaN(me)){me=c;return}me<=0&&c>0?Le?.():me>0&&c<=0&&X?.(),me<1&&c>=1?R?.():me>=1&&c<1&&Y?.(),me=c;}function V(){if(!v||L)return;let c=performance.now(),h=Me(),_=l;if(N!==false){let de=c-ve,ye=de>0?Math.abs(h-(He<0?h:He))/de:0;_=l*Math.max(.2,1+ye*(typeof N=="number"?N:1)*.04);}He=h,ve=c;let B=m===F?0:(h-F)/(m-F);Ne(B);let k=I(ne(h,F,m,_));u&&(ue=Math.max(ue,k),k=ue),y=k,Z(k),k>=1&&!z?(z=true,G?.()):k<1&&!u&&(z=false),O=requestAnimationFrame(V);}ie(),m===F&&be("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 c=I(ne(Me(),F,m,l));u&&c>0&&(ue=c),y=c,Z(c);}let D=new IntersectionObserver(c=>{c.forEach(h=>{v=h.isIntersecting,v&&!L?O=requestAnimationFrame(V):cancelAnimationFrame(O);});},{root:x??null}),pe;function re(){clearTimeout(pe),pe=setTimeout(ie,150);}window.addEventListener("resize",re),window.addEventListener("orientationchange",re);let Ee=De([C],re);return D.observe(e),Oe(e,{type:"animate",getProgress:()=>y,getTrigger:()=>({tStart:F,tEnd:m})}),{destroy(){cancelAnimationFrame(O),D.disconnect(),window.removeEventListener("resize",re),window.removeEventListener("orientationchange",re),Ee(),clearTimeout(pe),xe(),Ie(e);},replay(){ue=-1,z=false,y=0,L=false,Z(0);},pause(){L=true,cancelAnimationFrame(O);},resume(){L&&(L=false,v&&(O=requestAnimationFrame(V)));},seek(c){let h=Math.min(1,Math.max(0,c));y=h,ue=h,L=true,cancelAnimationFrame(O),Z(h);},getProgress(){return y},refresh(){ie();}}}var yt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function jt(e,n){if(typeof window>"u")return yt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return be("scrollCounter: element not found:",e),yt;let t=r,{from:s=0,to:i,format:l,easing:u="ease-out",trigger:f={},once:p=true,decimals:S,onComplete:N}=n,P=S!==void 0?m=>m.toFixed(S):l??(m=>String(Math.round(m))),oe=typeof u=="function"?u:le[u]??le["ease-out"],Ce=he(f.start??"top 80%"),G=he(f.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=P(i),N?.(),yt;let R=0,Y=0,X=false,A=0,I=false,T=false,$=-1,C=0,x=false,w=()=>window.scrollY,K=()=>window.innerHeight;function M(){let m=t.getBoundingClientRect(),O=Pe({top:m.top,height:m.height},w(),K(),Ce,G);X&&Math.abs(O.tStart-R)<1&&Math.abs(O.tEnd-Y)<1||(X=true,R=O.tStart,Y=O.tEnd);}function te(m){t.textContent=P(s+(i-s)*m),t.style.setProperty("--scroll-draw-progress",String(m));}function xe(){if(!I||T)return;let m=oe(ne(w(),R,Y,1));p&&($=Math.max($,m),m=$),C=m,te(m),m>=1&&!x?(x=true,N?.()):m<1&&!p&&(x=false),A=requestAnimationFrame(xe);}M();{let m=oe(ne(w(),R,Y,1));p&&m>0&&($=m),C=m,te(m);}let we=new IntersectionObserver(m=>{m.forEach(O=>{I=O.isIntersecting,I&&!T?A=requestAnimationFrame(xe):cancelAnimationFrame(A);});}),ce;function q(){clearTimeout(ce),ce=setTimeout(M,150);}window.addEventListener("resize",q),window.addEventListener("orientationchange",q);let F=De([t],q);return we.observe(t),Oe(t,{type:"counter",getProgress:()=>C,getTrigger:()=>({tStart:R,tEnd:Y})}),{destroy(){cancelAnimationFrame(A),we.disconnect(),window.removeEventListener("resize",q),window.removeEventListener("orientationchange",q),F(),clearTimeout(ce),Ie(t);},replay(){$=-1,x=false,C=0,T=false,te(0);},pause(){T=true,cancelAnimationFrame(A);},resume(){T&&(T=false,I&&(A=requestAnimationFrame(xe)));},seek(m){let O=Math.min(1,Math.max(0,m));C=O,$=O,T=true,cancelAnimationFrame(A),te(O);},getProgress(){return C}}}var Ut={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Yt(e,n={}){if(typeof window>"u")return Ut;let r=typeof e=="string"?document.querySelector(e):e;if(!r||r.tagName.toLowerCase()!=="video")return be("scrollVideo: <video> element not found:",e),Ut;let t=r,{trigger:s={},easing:i="linear",once:l=false,axis:u="y",preload:f="auto",triggerElement:p,onReady:S,onComplete:N,onProgress:P}=n,oe=p??t,Ce=window.matchMedia("(prefers-reduced-motion: reduce)").matches,G=typeof i=="function"?i:le[i]??le.linear,Le=he(s.start??"top top"),R=he(s.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=f);let Y=n.from??0,X=n.to,A=0,I=0,T=0,$=false,C=false,x=-1,w=0,K=false,M=false,te=()=>u==="x"?window.scrollX:window.scrollY,xe=()=>u==="x"?window.innerWidth:window.innerHeight;function we(){let y=oe.getBoundingClientRect(),z=u==="x"?y.left:y.top,me=u==="x"?y.width:y.height,He=Pe({top:z,height:me},te(),xe(),Le,R);A=He.tStart,I=He.tEnd,M&&I===A&&be("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t);}let ce=NaN;function q(y){if(!M)return;let z=X??t.duration??0,me=Y+(z-Y)*y;me!==ce&&(ce=me,t.currentTime=me),t.style.setProperty("--scroll-draw-progress",String(y)),P?.(y);}function F(){if(!$||C||!M||Ce)return;let y=G(ne(te(),A,I,1));l&&(x=Math.max(x,y),y=x),w=y,q(y),y>=1&&!K?(K=true,N?.()):y<1&&!l&&(K=false),T=requestAnimationFrame(F);}function m(){if(M=true,X===void 0&&(X=t.duration),Ce){q(1),S?.();return}we(),S?.(),$&&!C&&(T=requestAnimationFrame(F));}t.readyState>=1?m():t.addEventListener("loadedmetadata",m,{once:true}),M||we();let O=new IntersectionObserver(y=>{y.forEach(z=>{$=z.isIntersecting,$&&!C&&M?T=requestAnimationFrame(F):cancelAnimationFrame(T);});}),v;function L(){clearTimeout(v),v=setTimeout(we,150);}window.addEventListener("resize",L),window.addEventListener("orientationchange",L);let ue=De([oe],L);return O.observe(t),Oe(t,{type:"video",getProgress:()=>w,getTrigger:()=>({tStart:A,tEnd:I})}),{destroy(){cancelAnimationFrame(T),O.disconnect(),t.removeEventListener("loadedmetadata",m),window.removeEventListener("resize",L),window.removeEventListener("orientationchange",L),ue(),clearTimeout(v),Ie(t);},replay(){x=-1,K=false,w=0,C=false,ce=NaN,q(0);},pause(){C=true,cancelAnimationFrame(T);},resume(){C&&(C=false,$&&M&&(T=requestAnimationFrame(F)));},seek(y){let z=Math.min(1,Math.max(0,y));w=z,x=z,C=true,cancelAnimationFrame(T),ce=NaN,q(z);},getProgress(){return w}}}function Xt(e,n){let r=document.createElement("span");r.textContent=n,r.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;user-select:none",e.appendChild(r);}function Zt(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(r)?(t.textContent=r,t.style.whiteSpace="pre"):(t.textContent=r,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(r)?null:t}).filter(r=>r!==null)}function Cr(e){let n=e.textContent??"";return e.textContent="",n.split("").map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=r,r===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),r===" "?null:t}).filter(r=>r!==null)}function Kt(e){let n=Zt(e),r=new Map;for(let i of n){let l=i.offsetTop;r.has(l)||r.set(l,[]),r.get(l).push(i);}let t=[],s=Array.from(r.keys()).sort((i,l)=>i-l);for(let i of s){let l=r.get(i),u=document.createElement("span");u.setAttribute("aria-hidden","true"),u.style.display="inline-block",l.forEach((f,p)=>{let S=f.nextElementSibling;u.appendChild(f),p<l.length-1&&S&&S.style.whiteSpace==="pre"&&u.appendChild(S);}),t.push(u);}return e.textContent="",t.forEach((i,l)=>{e.appendChild(i),l<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function kr(e,n,r,t){if(r<=1||t===0)return e;let s=(r-1)*t,i=n*t,l=i+(1-s);return l<=i?e>=i?1:0:Math.min(1,Math.max(0,(e-i)/(l-i)))}function Or(e,n){let r=[];if(n?.y!==void 0&&r.push(`translateY(${n.y*(1-e)}px)`),n?.x!==void 0&&r.push(`translateX(${n.x*(1-e)}px)`),n?.rotate!==void 0&&r.push(`rotate(${n.rotate*(1-e)}deg)`),n?.scale!==void 0){let t=n.scale+(1-n.scale)*e;r.push(`scale(${t})`);}return r.join(" ")||""}var Qt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Jt(e,n={}){if(typeof window>"u")return Qt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return be("scrollText: element not found:",e),Qt;let t=r,{split:s="words",stagger:i=.04,easing:l="ease-out",from:u={opacity:0,y:24},trigger:f={},once:p=true,onComplete:S}=n,N=window.matchMedia("(prefers-reduced-motion: reduce)").matches,P=typeof l=="function"?l:le[l]??le["ease-out"],oe=he(f.start??"top 85%"),Ce=he(f.end??"top 40%"),G=t.innerHTML,Le=t.textContent??"",R;s==="chars"?R=Cr(t):s==="lines"?R=Kt(t):R=Zt(t),Xt(t,Le);let Y=R.length;function X(v,L){u?.opacity!==void 0&&(v.style.opacity=String(u.opacity+(1-u.opacity)*L));let ue=Or(L,u);ue&&(v.style.transform=ue);}function A(v){t.style.setProperty("--scroll-draw-progress",String(v)),R.forEach((L,ue)=>{let y=P(kr(v,ue,Y,i));X(L,y);});}if(N)return A(1),S?.(),{destroy(){t.innerHTML=G;},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};A(0);let I=0,T=0,$=0,C=false,x=false,w=-1,K=0,M=false,te=()=>window.scrollY,xe=()=>window.innerHeight;function we(){let v=t.getBoundingClientRect(),L=Pe({top:v.top,height:v.height},te(),xe(),oe,Ce);I=L.tStart,T=L.tEnd;}function ce(){if(!C||x)return;let v=ne(te(),I,T,1);p&&(w=Math.max(w,v),v=w),K=v,A(v),v>=1&&!M?(M=true,S?.()):v<1&&!p&&(M=false),$=requestAnimationFrame(ce);}we();let q=new IntersectionObserver(v=>{v.forEach(L=>{C=L.isIntersecting,C&&!x?$=requestAnimationFrame(ce):cancelAnimationFrame($);});}),F;function m(){clearTimeout(F),F=setTimeout(()=>{if(s==="lines"){let v=K;t.innerHTML=G,R=Kt(t),Xt(t,Le),A(v);}we();},150);}window.addEventListener("resize",m),window.addEventListener("orientationchange",m);let O=De([t],m);return q.observe(t),Oe(t,{type:"text",getProgress:()=>K,getTrigger:()=>({tStart:I,tEnd:T})}),{destroy(){cancelAnimationFrame($),q.disconnect(),window.removeEventListener("resize",m),window.removeEventListener("orientationchange",m),O(),clearTimeout(F),t.innerHTML=G,Ie(t);},replay(){w=-1,M=false,K=0,x=false,A(0);},pause(){x=true,cancelAnimationFrame($);},resume(){x&&(x=false,C&&($=requestAnimationFrame(ce)));},seek(v){let L=Math.min(1,Math.max(0,v));K=L,w=L,x=true,cancelAnimationFrame($),A(L);},getProgress(){return K}}}var qe=class{constructor(n){this.create=n;this.instance=null;this.el=null;this.key="";}init(n,r){return this.destroy(),this.el=n,this.latest=r,this.key=gt(r),this.instance=this.create(n,_t(r,()=>this.latest)),this}update(n){return this.el?gt(n)!==this.key?this.init(this.el,n):(this.latest=n,this):this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(n){return this.instance?.seek(n),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=this.el=null,this}},er=class extends qe{constructor(){super(zt);}init(n,r={}){return super.init(n,r)}},tr=class extends qe{constructor(){super(Gt);}},rr=class extends qe{constructor(){super(jt);}},nr=class extends qe{constructor(){super(Yt);}init(n,r={}){return super.init(n,r)}},or=class extends qe{constructor(){super(Jt);}init(n,r={}){return super.init(n,r)}};exports.EngineRef=qe;exports.ScrollAnimateRef=tr;exports.ScrollCounterRef=rr;exports.ScrollDrawRef=er;exports.ScrollTextRef=or;exports.ScrollVideoRef=nr;
1
+ 'use strict';function yn({bounces:e=3,decay:n=.5}={}){let t=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,n)),s=Math.sqrt(r),i=0,a=[];for(let d=0;d<t;d++){let x=Math.pow(s,d);a.push(x),i+=x;}let m=[0],f=0;for(let d=0;d<t;d++)f+=a[d]/i,m.push(f);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let x=0;x<t;x++)if(d<=m[x+1]){let H=(d-m[x])/(m[x+1]-m[x]);if(x===0)return H*(2-H);let P=1-Math.pow(r,x);return P+(1-P)*(2*H-1)*(2*H-1)}return 1}}function hn({amplitude:e=1,period:n=.4}={}){let t=Math.max(1,e),r=Math.max(.1,n),s=t<=1?r/4:r/(2*Math.PI)*Math.asin(1/t);return i=>i<=0?0:i>=1?1:t*Math.pow(2,-10*i)*Math.sin((i-s)*(2*Math.PI)/r)+1}var oe={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:yn(),elastic:hn()};function $t(e,n,t){return Math.min(t,Math.max(n,e))}function ye(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[t="top",r="bottom"]=n.split(/\s+/).filter(Boolean);return {element:t,viewport:r}}function Pt(e,n,t,r){switch(r){case "top":return e+t;case "center":return e+t+n/2;case "bottom":return e+t+n;default:return e+t}}function Ct(e,n){if(/^\d+(\.\d+)?%$/.test(e))return n*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return n/2;case "bottom":return n;default:return n}}function ee(e,n,t,r){return t===n?0:$t((e-n)/(t-n)*r,0,1)}function Le(e,n,t,r,s){let i=Pt(e.top,e.height,n,r.element)-Ct(r.viewport,t),a=Pt(e.top,e.height,n,s.element)-Ct(s.viewport,t);return {tStart:i,tEnd:a}}function st(e,n,t){let r=e.getBoundingClientRect(),s=t==="x"?r.width:r.height;return n?{top:t==="x"?r.left-n.getBoundingClientRect().left+n.scrollLeft:r.top-n.getBoundingClientRect().top+n.scrollTop,height:s,scroll:0}:{top:t==="x"?r.left:r.top,height:s,scroll:t==="x"?window.scrollX:window.scrollY}}function Qe(e){let n=e.tagName.toLowerCase();if(n==="rect"){let t=parseFloat(e.getAttribute("width")??"0"),r=parseFloat(e.getAttribute("height")??"0");return 2*(t+r)}if(n==="circle"){let t=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*t}return e.getTotalLength()}function kt(e){let n=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(n)return [parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)];let t=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(t)return [parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)];let r=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return r?[parseInt(r[1]),parseInt(r[2]),parseInt(r[3])]:null}function Ue(e,n,t){let r=kt(e),s=kt(n);return !r||!s?e:`rgb(${Math.round(r[0]+(s[0]-r[0])*t)},${Math.round(r[1]+(s[1]-r[1])*t)},${Math.round(r[2]+(s[2]-r[2])*t)})`}var Ot={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 Ke=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function he(e,...n){Ke&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var bn="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",wn="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",It=33;function vn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function En(e){let n=[];for(let t=0;t<It;t++){let r=t/(It-1);n.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${n.join(",")})`}function it(e){switch(e){case "linear":return "linear";case "ease-in":return bn;case "ease-out":return wn;case "ease-in-out":return vn()?En(oe["ease-in-out"]):null;default:return null}}var Ft=Symbol.for("svg-scroll-draw.registry");function Dt(){let e=globalThis;return e[Ft]||(e[Ft]=new Map)}function Ce(e,n){Dt().set(e,n);}function ke(e){Dt().delete(e);}var Ze,at=new Set,lt=new WeakMap,Je=new Map,Ht=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function Sn(e){let n=new Set;for(let t of e)for(;t&&t!==document.body;t=t.parentElement)for(let r=t;r;r=r.previousElementSibling)n.add(r);return n}function De(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let t=()=>n();Ze??(Ze=new ResizeObserver(s=>{let i=false;for(let{target:a}of s)lt.get(a)!==Ht(a)&&(i=true),lt.set(a,"");i&&at.forEach(a=>a());})),at.add(t);let r=Sn(e);return [document.body,document.documentElement].forEach(s=>s&&r.add(s)),r.forEach(s=>{lt.has(s)||lt.set(s,Ht(s)),Je.set(s,(Je.get(s)??0)+1),Ze.observe(s);}),()=>{at.delete(t)&&(r.forEach(s=>{let i=(Je.get(s)??1)-1;if(i)return void Je.set(s,i);Je.delete(s),Ze?.unobserve(s);}),at.size||(Ze?.disconnect(),Ze=void 0));}}function ct(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let n=window.matchMedia("(prefers-reduced-motion: reduce)"),t=s=>e(!!s.matches);if(typeof n.addEventListener=="function")return n.addEventListener("change",t),()=>n.removeEventListener("change",t);let r=n;return r.addListener?.(t),()=>r.removeListener?.(t)}function qe(e,n){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return n(e,true);let t=n(e,false),r=ct(i=>{if(!i)return;r();let a=(t.getProgress?.()??0)>=1;t.destroy(),t=n(a?{...e,onComplete:void 0}:e,true);}),s={};for(let i of Object.keys(t))s[i]=(...a)=>t[i]?.(...a);return s.destroy=()=>{r(),t.destroy();},s}var Tn=0;function xn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Rt(e,n){let t="";try{t=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return t||(e.getAttribute(n)??"").trim()}var Nt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function Mn(e){if(!Ke)return;let n=Rt(e,"stroke");if(!n||n==="none"){he("Element has no stroke \u2014 path will not be visible.",e);return}let t=(e.getAttribute("fill")??"").trim();t&&!Nt.has(t)&&!Nt.has(Rt(e,"fill"))&&he("Element has a fill \u2014 it may obscure the stroke animation.",e);}function Ln(e,n,t){let r=document.createElement("div");r.setAttribute("data-svg-scroll-draw-debug",""),r.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 s(){let i=t==="x"?window.scrollX:window.scrollY,a=e-i,m=n-i,f=t==="x";r.innerHTML=`
2
+ <div style="position:absolute;${f?`left:${a}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${a}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;${f?`left:${m}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${m}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(r),window.addEventListener("scroll",s,{passive:true}),s(),{el:r,destroy(){window.removeEventListener("scroll",s),r.remove();}}}var zt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Vt=/[MmLlHhVvCcSsQqTtAaZz]/g;function An(e,n,t){if(!Ke)return;let r=(e.match(Vt)??[]).join("").toUpperCase(),s=(n.match(Vt)??[]).join("").toUpperCase(),i=(e.match(zt)??[]).length,a=(n.match(zt)??[]).length;if(r!==s){he(`morphTo: command sequence differs (${r||"\u2205"} \u2192 ${s||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,t);return}i!==a&&he(`morphTo: coordinate count differs (${i} \u2192 ${a}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,t);}function yt(e,n,t){let r=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),s=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,i=>{let a=parseFloat(i),m=r[s++]??a;return String(+(a+(m-a)*t).toFixed(4))})}function _t(e,n={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:qe(n,(t,r)=>$n(e,t,r))}function $n(e,n,t){let{preset:r,...s}=n,i=r?{...Ot[r],...s}:s,{selector:a="path, polyline, line, polygon, rect, circle",speed:m=1,fade:f=false,easing:d="linear",trigger:x={},stagger:H=0,direction:P="forward",once:Q=false,debug:me=false,axis:I="y",scrollContainer:se,autoReverse:be=false,delay:F=0,strokeColor:R,strokeWidth:k,fillOpacity:M,waypoints:w,velocityScale:v=false,threshold:T=0,rootMargin:U="0px",repeat:N=0,repeatDelay:B=0,morphTo:L,clip:fe,autoplay:Ee=false,duration:ie=1e3,native:V=true,onProgress:u,onStart:A,onComplete:h,onEnter:O,onLeave:te,onEnterBack:pe,onLeaveBack:Se}=i,Z=fe===true?"left":typeof fe=="string"?fe:false,E=typeof d=="function"?d:oe[d]??oe.linear,de=ye(x.start??"top bottom"),Ae=ye(x.end??"bottom top"),ae=typeof se=="string"?document.querySelector(se):se??null,le=Array.isArray(R)?R[0]:null,ne=Array.isArray(R)?R[1]:typeof R=="string"?R:null,re=Array.isArray(k)?k[0]:null,Y=Array.isArray(k)?k[1]:typeof k=="number"?k:null,ge=Array.isArray(M)?M[0]:null,J=Array.isArray(M)?M[1]:typeof M=="number"?M:null;function Oe(o){let c=o*100;switch(Z){case "right":return `inset(0 0 0 ${100-c}%)`;case "top":return `inset(0 0 ${100-c}% 0)`;case "bottom":return `inset(${100-c}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-c}% 0 0)`}}let _=Z?[]:Array.from(e.querySelectorAll(a)),C=[],we=[],l=0,p=0,$e=H,Te=0,$=false,z=false,G=0,Ne=false,q=-1,He=[],ze=-1,ce=false,Ie=0,Re=0,Ve,ut=null;function wt(){ut?.destroy(),ut=null;}let _e=new Set,vt=NaN,We=true,et=-1,Et=performance.now(),Ge=NaN;function Ye(){return ae?I==="x"?ae.scrollLeft:ae.scrollTop:I==="x"?window.scrollX:window.scrollY}function St(){return ae?I==="x"?ae.clientWidth:ae.clientHeight:I==="x"?window.innerWidth:window.innerHeight}function Tt(){let o=st(e,ae,I);return Le(o,o.scroll,St(),de,Ae)}function un(){let o=p-l,c=_.length-1,y=ae??document.documentElement,X=I==="x"?"Width":"Height";if($e=H,H>0&&c>0&&o>0){let xe=y[`scroll${X}`]-y[`client${X}`]-1-l-o/m;xe>=0&&($e=Math.min(H,xe/(c*o)));}Te=p+c*$e*o;}function xt(){(({tStart:l,tEnd:p}=Tt())),un(),me&&Ke&&(wt(),ut=Ln(l,p,I));}function mt(o,c=Tt){Ce(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:c});let y=o.destroy;return o.destroy=()=>{y.call(o),ke(e);},o}function mn(o,c){if(e.style.setProperty("--scroll-draw-progress",String(o)),Z){let y=c==="reverse"?1-o:o;e.style.clipPath=Oe(y);return}_.forEach((y,X)=>{y.style.strokeDashoffset=c==="reverse"?`${C[X]*o}`:`${C[X]*(1-o)}`,f&&(y.style.opacity=c==="reverse"?`${1-o}`:`${o}`),le&&ne?y.style.stroke=Ue(le,ne,o):ne&&(y.style.stroke=ne),re!==null&&Y!==null?y.style.strokeWidth=`${re+(Y-re)*o}`:Y!==null&&(y.style.strokeWidth=`${Y}`),ge!==null&&J!==null?y.style.fillOpacity=`${ge+(J-ge)*o}`:J!==null&&(y.style.fillOpacity=`${J}`),L&&y.tagName.toLowerCase()==="path"&&we[X]&&y.setAttribute("d",yt(we[X],L,o));});}function tt(){if(e.style.setProperty("--scroll-draw-progress","0"),Z){e.style.clipPath=Oe(0);return}_.forEach((o,c)=>{o.style.strokeDasharray=`${C[c]}`,o.style.strokeDashoffset=P==="reverse"?"0":`${C[c]}`,f?o.style.opacity=P==="reverse"?"1":"0":o.style.opacity="",le&&(o.style.stroke=le),re!==null&&(o.style.strokeWidth=`${re}`),ge!==null&&(o.style.fillOpacity=`${ge}`),L&&o.tagName.toLowerCase()==="path"&&we[c]&&o.setAttribute("d",we[c]);});}if(_.forEach(o=>{Mn(o);let c=Qe(o);C.push(c);let y=o.tagName.toLowerCase()==="path";y?we.push(o.getAttribute("d")??""):we.push(""),L&&(y?An(we[we.length-1],L,o):he(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),t?(o.style.strokeDasharray=`${c}`,o.style.strokeDashoffset=P==="reverse"?`${c}`:"0",f&&(o.style.opacity="1"),ne&&(o.style.stroke=ne),Y!==null&&(o.style.strokeWidth=`${Y}`),J!==null&&(o.style.fillOpacity=`${J}`),L&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",L)):(o.style.strokeDasharray=`${c}`,o.style.strokeDashoffset=P==="reverse"?"0":`${c}`,f?o.style.opacity=P==="reverse"?"1":"0":o.style.opacity="",le&&(o.style.stroke=le),re!==null&&(o.style.strokeWidth=`${re}`),ge!==null&&(o.style.fillOpacity=`${ge}`));}),Z){if(t)return e.style.clipPath=Oe(1),h?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Oe(0);}else if(t)return h?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Mt=typeof d=="string"?it(d):null;function fn(){return !(V===false||!xn()||!_.length||!Mt||Z||I!=="y"||ae||m!==1||H!==0||Q||be||v!==false||L||w||N||F>0||u||A||h||O||te||pe||Se||R!=null||k!=null||M!=null||(x.start??"top bottom").trim()!=="top bottom"||(x.end??"bottom top").trim()!=="bottom top")}function pn(){let o=++Tn,c=`svg-scroll-draw-${o}`,y=`svg-scroll-draw-host-${o}`,X=`--svg-scroll-draw-${o}`,xe=P==="reverse"?"0":"var(--ssd-len)",Fe=P==="reverse"?"var(--ssd-len)":"0",Pe=`stroke-dashoffset:${xe};`,S=`stroke-dashoffset:${Fe};`;f&&(Pe+=`opacity:${P==="reverse"?1:0};`,S+=`opacity:${P==="reverse"?0:1};`);let D=document.createElement("style");D.setAttribute("data-svg-scroll-draw",""),D.textContent=`@keyframes ${c}{from{${Pe}}to{${S}}}.${y}{view-timeline-name:${X};view-timeline-axis:block;}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${Mt};animation-fill-mode:both;animation-timeline:${X};animation-range:cover 0% cover 100%;}`,document.head.appendChild(D),e.classList.add(y);function ue(g,K){g.style.setProperty("--ssd-len",String(C[K])),g.style.strokeDasharray=`${C[K]}`,g.style.strokeDashoffset="",g.style.opacity="",g.style.animationPlayState="",g.classList.add(c);}_.forEach(ue);let b=false,W=-1;function j(){if(W>=0)return W;let g=e.getBoundingClientRect(),{tStart:K,tEnd:Me}=Le({top:g.top,height:g.height},Ye(),St(),de,Ae);return E(ee(Ye(),K,Me,m))}return {destroy(){e.classList.remove(y),_.forEach(g=>{g.classList.remove(c),g.style.removeProperty("--ssd-len"),g.style.animationPlayState="";}),D.remove();},replay(){b=false,W=-1,_.forEach(ue);},pause(){b=true,_.forEach(g=>{g.style.animationPlayState="paused";});},resume(){b&&(b=false,_.forEach(g=>{g.style.animationPlayState="running";}));},seek(g){let K=Math.min(1,Math.max(0,g));W=K,b=true,_.forEach((Me,ve)=>{Me.classList.remove(c),Me.style.strokeDashoffset=P==="reverse"?`${C[ve]*K}`:`${C[ve]*(1-K)}`,f&&(Me.style.opacity=P==="reverse"?`${1-K}`:`${K}`);});},getProgress(){return j()},refresh(){_.forEach((g,K)=>{C[K]=Qe(g),g.style.setProperty("--ssd-len",String(C[K])),g.style.strokeDasharray=`${C[K]}`;});}}}if(fn())return mt(pn());function dn(){let o=Math.max(1,ie),c=0,y=0,X=false;function xe(b){let W=true;if(Z){let j=Math.min(1,Math.max(0,b/o)),g=E(j);Ie=g,e.style.setProperty("--scroll-draw-progress",String(g)),e.style.clipPath=Oe(P==="reverse"?1-g:g),u?.(g),j<1&&(W=false);}else _.forEach((j,g)=>{let K=g*H*o,Me=Math.min(1,Math.max(0,(b-K)/o)),ve=E(Me);j.style.strokeDashoffset=P==="reverse"?`${C[g]*ve}`:`${C[g]*(1-ve)}`,f&&(j.style.opacity=P==="reverse"?`${1-ve}`:`${ve}`),le&&ne?j.style.stroke=Ue(le,ne,ve):ne&&(j.style.stroke=ne),re!==null&&Y!==null?j.style.strokeWidth=`${re+(Y-re)*ve}`:Y!==null&&(j.style.strokeWidth=`${Y}`),ge!==null&&J!==null?j.style.fillOpacity=`${ge+(J-ge)*ve}`:J!==null&&(j.style.fillOpacity=`${J}`),L&&j.tagName.toLowerCase()==="path"&&we[g]&&j.setAttribute("d",yt(we[g],L,ve)),g===0&&(Ie=ve,u?.(ve),e.style.setProperty("--scroll-draw-progress",String(ve))),Me<1&&(W=false);});if(w){let j=Math.min(1,Math.max(0,b/o)),g=E(j);for(let K in w){let Me=parseFloat(K);g>=Me&&!_e.has(Me)&&(_e.add(Me),w[K]?.());}}return W}function Fe(b){if(ce)return;let W=b-c;z||(z=true,A?.());let j=xe(W);if(j&&!$){$=true,xe(o*(1+Math.max(0,_.length-1)*H)),h?.(),Re<(N==="infinite"?1/0:N??0)&&(Re++,Ve=setTimeout(()=>{c=performance.now(),z=false,$=false,_e.clear(),tt(),G=requestAnimationFrame(Fe);},B));return}j||(G=requestAnimationFrame(Fe));}function Pe(){cancelAnimationFrame(G),clearTimeout(Ve),c=performance.now(),y=0,ce=false,z=false,$=false,Re=0,X=true,Ie=0,_e.clear(),tt(),G=requestAnimationFrame(Fe);}let S=new IntersectionObserver(b=>{b.forEach(W=>{W.isIntersecting&&!(Q&&$)?Pe():!W.isIntersecting&&!Q&&!$&&(cancelAnimationFrame(G),clearTimeout(Ve),X=false);});},{root:ae??null,threshold:T,rootMargin:U}),D;function ue(){clearTimeout(D),D=setTimeout(()=>{_.forEach((b,W)=>{C[W]=Qe(b),b.style.strokeDasharray=`${C[W]}`;});},150);}return window.addEventListener("resize",ue),window.addEventListener("orientationchange",ue),F>0?setTimeout(()=>S.observe(e),F):S.observe(e),{destroy(){cancelAnimationFrame(G),clearTimeout(Ve),S.disconnect(),window.removeEventListener("resize",ue),window.removeEventListener("orientationchange",ue),clearTimeout(D);},replay(){Re=0,Pe();},pause(){ce||!X||(ce=true,y=performance.now()-c,cancelAnimationFrame(G));},resume(){ce&&(ce=false,X=true,c=performance.now()-y,G=requestAnimationFrame(Fe));},seek(b){let W=Math.min(1,Math.max(0,b));Ie=W,ce=true,y=W*o,c=performance.now()-y,cancelAnimationFrame(G),xe(y);},getProgress(){return Ie},refresh(){clearTimeout(D),_.forEach((b,W)=>{C[W]=Qe(b),b.style.strokeDasharray=`${C[W]}`;});}}}if(Ee)return mt(dn());xt();function Lt(){if(ce||!je)return;let o=performance.now(),c=Ye();if(!We&&v===false&&c===vt){pt(c);return}We=false,vt=c;let y=m;if(v!==false){let S=o-Et,D=S>0?Math.abs(c-(et<0?c:et))/S:0;y=m*Math.max(.2,1+D*(typeof v=="number"?v:1)*.04);}et=c,Et=o;let X=be?ze===-1||c>=ze?"forward":"reverse":P;ze=c;let xe=p-l,Fe=true,Pe=xe===0?0:(c-l)/xe;if(isNaN(Ge)||(Ge<=0&&Pe>0?O?.():Ge>0&&Pe<=0&&Se?.(),Ge<1&&Pe>=1?te?.():Ge>=1&&Pe<1&&pe?.()),Ge=Pe,Z){let S=E(ee(c,l,p,y));Q&&!be&&(q=Math.max(q,S),S=q),Ie=S,e.style.setProperty("--scroll-draw-progress",String(S));let D=X==="reverse"?1-S:S;e.style.clipPath=Oe(D),u?.(S),!z&&ee(c,l,p,y)>0&&(z=true,A?.()),S>=1&&!$?($=true,h?.(),Re<(N==="infinite"?1/0:N??0)&&(Re++,Ve=setTimeout(()=>{q=-1,z=false,$=false,e.style.clipPath=Oe(0);},B))):S<1&&!Q&&($=false),pt(c);return}if(_.forEach((S,D)=>{let ue=D*$e*xe,b=E(ee(c,l+ue,p+ue,y));Q&&!be&&(b=He[D]=Math.max(He[D]??q,b)),S.style.strokeDashoffset=X==="reverse"?`${C[D]*b}`:`${C[D]*(1-b)}`,f&&(S.style.opacity=X==="reverse"?`${1-b}`:`${b}`),le&&ne?S.style.stroke=Ue(le,ne,b):ne&&(S.style.stroke=ne),re!==null&&Y!==null?S.style.strokeWidth=`${re+(Y-re)*b}`:Y!==null&&(S.style.strokeWidth=`${Y}`),ge!==null&&J!==null?S.style.fillOpacity=`${ge+(J-ge)*b}`:J!==null&&(S.style.fillOpacity=`${J}`),L&&S.tagName.toLowerCase()==="path"&&we[D]&&S.setAttribute("d",yt(we[D],L,b)),D===0&&(Ie=b,u?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(Fe=false);}),w){let S=E(ee(c,l,p,y));for(let D in w){let ue=parseFloat(D);S>=ue&&!_e.has(ue)&&(_e.add(ue),w[D]?.());}}!z&&ee(c,l,p,y)>0&&(z=true,A?.()),Fe&&!$?($=true,h?.(),Re<(N==="infinite"?1/0:N??0)&&(Re++,Ve=setTimeout(()=>{q=-1,He=[],z=false,$=false,_e.clear(),tt(),We=true;},B))):!Fe&&!Q&&($=false),pt(c);}function ft(o){return o>=p&&o<Te}function pt(o){Ne||ft(o)?G=requestAnimationFrame(Lt):je=false;}function dt(){return Ne||ft(Ye())}let je=false;function nt(){je||(je=true,G=requestAnimationFrame(function(){Lt();}));}function rt(){je=false,cancelAnimationFrame(G);}let gt=new IntersectionObserver(o=>{o.forEach(c=>{Ne=c.isIntersecting,Ne&&!ce?(We=true,nt()):je&&!ce&&ft(Ye())||rt();});},{root:ae??null,threshold:T,rootMargin:U});function At(){_.forEach((o,c)=>{C[c]=Qe(o),o.style.strokeDasharray=`${C[c]}`;}),xt(),We=true;}let ot;function Xe(){clearTimeout(ot),ot=setTimeout(At,150);}window.addEventListener("resize",Xe),window.addEventListener("orientationchange",Xe);let gn=De([e],Xe);return F>0?setTimeout(()=>gt.observe(e),F):gt.observe(e),mt({destroy(){cancelAnimationFrame(G),clearTimeout(Ve),rt(),gt.disconnect(),gn(),window.removeEventListener("resize",Xe),window.removeEventListener("orientationchange",Xe),clearTimeout(ot),wt();},replay(){q=-1,He=[],ze=-1,et=-1,z=false,$=false,Re=0,ce=false,Ie=0,_e.clear(),clearTimeout(Ve),tt(),We=true,dt()&&nt();},pause(){ce=true,rt();},resume(){ce&&(ce=false,We=true,dt()&&nt());},seek(o){let c=Math.min(1,Math.max(0,o));Ie=c,q=c,He=[],ce=true,rt(),mn(c,P),We=true;},getProgress(){return Ie},refresh(){clearTimeout(ot),At(),dt()&&!ce&&nt();}},()=>({tStart:l,tEnd:p}))}var Wt=new WeakMap,Pn=0;function ht(e){return JSON.stringify(e,(n,t)=>{if(typeof t=="function")return "\u0192";if(typeof Element<"u"&&t instanceof Element){let r=Wt.get(t);return r===void 0&&Wt.set(t,r=++Pn),`el#${r}`}return t})}function qt(e,n){let t={...e};for(let r of Object.keys(t))typeof t[r]=="function"&&(t[r]=(...s)=>n()[r]?.(...s));return t}function Cn(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Bt(e){let n=[],t=/([\w]+)\(([^)]*)\)/g,r;for(;(r=t.exec(e))!==null;){let s=[],i=[],a=r[2].trim();if(a)for(let m of a.split(/[\s,]+/)){let f=m.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(f?parseFloat(f[1]):0),i.push(f?f[2]:"");}n.push({fn:r[1],nums:s,units:i});}return n}function kn(e,n,t){let r=Bt(e),s=Bt(n);return r.length===0||r.length!==s.length?t<1?e:n:r.map((i,a)=>{let m=s[a];return i.fn!==m.fn||i.nums.length!==m.nums.length?t<1?`${i.fn}(${i.nums.map((f,d)=>`${f}${i.units[d]}`).join(", ")})`:`${m.fn}(${m.nums.map((f,d)=>`${f}${m.units[d]}`).join(", ")})`:`${i.fn}(${i.nums.map((f,d)=>`${f+(m.nums[d]-f)*t}${i.units[d]}`).join(", ")})`}).join(" ")}function Gt(e,n,t){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*t);let r=String(e),s=String(n);if(Cn(r))return Ue(r,s,t);if(r.includes("("))return kn(r,s,t);let i=r.match(/^([-+]?[\d.]+)(.*)$/),a=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&a){let m=parseFloat(i[1]),f=parseFloat(a[1]);return `${m+(f-m)*t}${i[2]||a[2]}`}return t<1?r:s}function On(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var In=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Fn=0,jt="--scroll-draw-progress";function Dn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var Ut={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Yt(e,n){return typeof window>"u"?Ut:n.respectReducedMotion===false?Qt(e,n,false):qe(n,(t,r)=>Qt(e,t,r))}function Qt(e,n,t){let{props:r,trigger:s={},easing:i="ease-out",speed:a=1,once:m=false,axis:f="y",scrollContainer:d,native:x=true,velocityScale:H=false,triggerElement:P,onProgress:Q,onComplete:me,onEnter:I,onLeave:se,onEnterBack:be,onLeaveBack:F}=n,R=typeof i=="function"?i:oe[i]??oe["ease-out"],k=ye(s.start??"top bottom"),M=ye(s.end??"bottom top"),w=P??e,v=typeof d=="string"?document.querySelector(d):d??null,T=Object.entries(r).map(([l,p])=>({prop:On(l),from:Array.isArray(p)?p[0]:"",to:Array.isArray(p)?p[1]:p}));function U(){let l=window.getComputedStyle(e);for(let p of T)p.from===""&&(p.from=l.getPropertyValue(p.prop).trim()||"0");}function N(){for(let l of T)e.style.setProperty(l.prop,String(l.to));}let B=new Map;for(let l of [...T.map(p=>p.prop),jt])B.set(l,e.style.getPropertyValue(l));function L(){for(let[l,p]of B)p?e.style.setProperty(l,p):e.style.removeProperty(l);}if(t)return N(),me?.(),{...Ut,destroy:L,getProgress:()=>1};U();let fe=typeof i=="string"?it(i):null;function Ee(){if(!x||!Dn()||!fe||f!=="y"||v||w!==e||m||a!==1||Q||me||I||se||be||F||H!==false||(s.start??"top bottom").trim()!=="top bottom"||(s.end??"bottom top").trim()!=="bottom top")return false;for(let l of T)if(!In.has(l.prop))return false;return true}function ie(){let l=`ssd-a-${++Fn}`,p=T.map(q=>`${q.prop}:${q.from}`).join(";"),$e=T.map(q=>`${q.prop}:${q.to}`).join(";"),Te=document.createElement("style");Te.setAttribute("data-ssd-animate",""),Te.textContent=`@keyframes ${l}{from{${p}}to{${$e}}}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${fe};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(Te),e.classList.add(l);let $=()=>f==="x"?window.scrollX:window.scrollY,z=()=>f==="x"?window.innerWidth:window.innerHeight,G=()=>{let q=e.getBoundingClientRect();return Le({top:q.top,height:q.height},$(),z(),k,M)};Ce(e,{type:"animate",getProgress:()=>Ne.getProgress(),getTrigger:G});let Ne={refresh(){},destroy(){e.classList.remove(l),Te.remove(),e.style.animationPlayState="",L(),ke(e);},replay(){e.classList.remove(l),e.offsetWidth,e.classList.add(l);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(q){let He=Math.min(1,Math.max(0,q));e.classList.remove(l);for(let ze of T)e.style.setProperty(ze.prop,Gt(ze.from,ze.to,He));},getProgress(){let{tStart:q,tEnd:He}=G();return R(ee($(),q,He,a))}};return Ne}if(Ee())return ie();let V=0,u=0,A=0,h=false,O=false,te=-1,pe=0,Se=false,Z=NaN,E=-1,de=0,Ae=()=>v?f==="x"?v.scrollLeft:v.scrollTop:f==="x"?window.scrollX:window.scrollY,ae=()=>v?f==="x"?v.clientWidth:v.clientHeight:f==="x"?window.innerWidth:window.innerHeight,le=w===e?T:[],ne=false;function re(){let l=e.style,p=le.map(z=>l.getPropertyValue(z.prop)),$e=l.transition;le.length&&(l.transition="none"),le.forEach(z=>l.setProperty(z.prop,B.get(z.prop)??""));let Te=st(w,v,f);le.forEach((z,G)=>l.setProperty(z.prop,p[G])),le.length&&(e.offsetWidth,l.transition=$e);let $=Le(Te,Te.scroll,ae(),k,M);ne&&Math.abs($.tStart-V)<1&&Math.abs($.tEnd-u)<1||(ne=true,V=$.tStart,u=$.tEnd);}function Y(l){e.style.setProperty(jt,String(l));for(let p of T)e.style.setProperty(p.prop,Gt(p.from,p.to,l));Q?.(l);}function ge(l){if(isNaN(Z)){Z=l;return}Z<=0&&l>0?I?.():Z>0&&l<=0&&F?.(),Z<1&&l>=1?se?.():Z>=1&&l<1&&be?.(),Z=l;}function J(){if(!h||O)return;let l=performance.now(),p=Ae(),$e=a;if(H!==false){let z=l-de,G=z>0?Math.abs(p-(E<0?p:E))/z:0;$e=a*Math.max(.2,1+G*(typeof H=="number"?H:1)*.04);}E=p,de=l;let Te=u===V?0:(p-V)/(u-V);ge(Te);let $=R(ee(p,V,u,$e));m&&(te=Math.max(te,$),$=te),pe=$,Y($),$>=1&&!Se?(Se=true,me?.()):$<1&&!m&&(Se=false),A=requestAnimationFrame(J);}re(),u===V&&he("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 l=R(ee(Ae(),V,u,a));m&&l>0&&(te=l),pe=l,Y(l);}let Oe=new IntersectionObserver(l=>{l.forEach(p=>{h=p.isIntersecting,h&&!O?A=requestAnimationFrame(J):cancelAnimationFrame(A);});},{root:v??null}),_;function C(){clearTimeout(_),_=setTimeout(re,150);}window.addEventListener("resize",C),window.addEventListener("orientationchange",C);let we=De([w],C);return Oe.observe(e),Ce(e,{type:"animate",getProgress:()=>pe,getTrigger:()=>({tStart:V,tEnd:u})}),{destroy(){cancelAnimationFrame(A),Oe.disconnect(),window.removeEventListener("resize",C),window.removeEventListener("orientationchange",C),we(),clearTimeout(_),L(),ke(e);},replay(){te=-1,Se=false,pe=0,O=false,Y(0);},pause(){O=true,cancelAnimationFrame(A);},resume(){O&&(O=false,h&&(A=requestAnimationFrame(J)));},seek(l){let p=Math.min(1,Math.max(0,l));pe=p,te=p,O=true,cancelAnimationFrame(A),Y(p);},getProgress(){return pe},refresh(){re();}}}var bt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Xt(e,n){if(typeof window>"u")return bt;let t=typeof e=="string"?document.querySelector(e):e;return t?qe(n,(r,s)=>Hn(t,r,s)):(he("scrollCounter: element not found:",e),bt)}function Hn(e,n,t){let{from:r=0,to:s,format:i,easing:a="ease-out",trigger:m={},once:f=true,decimals:d,onComplete:x}=n,H=d!==void 0?u=>u.toFixed(d):i??(u=>String(Math.round(u))),P=typeof a=="function"?a:oe[a]??oe["ease-out"],Q=ye(m.start??"top 80%"),me=ye(m.end??"top 20%");if(t)return e.textContent=H(s),x?.(),{...bt,getProgress:()=>1};let I=0,se=0,be=false,F=0,R=false,k=false,M=-1,w=0,v=false,T=()=>window.scrollY,U=()=>window.innerHeight;function N(){let u=e.getBoundingClientRect(),A=Le({top:u.top,height:u.height},T(),U(),Q,me);be&&Math.abs(A.tStart-I)<1&&Math.abs(A.tEnd-se)<1||(be=true,I=A.tStart,se=A.tEnd);}function B(u){e.textContent=H(r+(s-r)*u),e.style.setProperty("--scroll-draw-progress",String(u));}function L(){if(!R||k)return;let u=P(ee(T(),I,se,1));f&&(M=Math.max(M,u),u=M),w=u,B(u),u>=1&&!v?(v=true,x?.()):u<1&&!f&&(v=false),F=requestAnimationFrame(L);}N();{let u=P(ee(T(),I,se,1));f&&u>0&&(M=u),w=u,B(u);}let fe=new IntersectionObserver(u=>{u.forEach(A=>{R=A.isIntersecting,R&&!k?F=requestAnimationFrame(L):cancelAnimationFrame(F);});}),Ee;function ie(){clearTimeout(Ee),Ee=setTimeout(N,150);}window.addEventListener("resize",ie),window.addEventListener("orientationchange",ie);let V=De([e],ie);return fe.observe(e),Ce(e,{type:"counter",getProgress:()=>w,getTrigger:()=>({tStart:I,tEnd:se})}),{destroy(){cancelAnimationFrame(F),fe.disconnect(),window.removeEventListener("resize",ie),window.removeEventListener("orientationchange",ie),V(),clearTimeout(Ee),ke(e);},replay(){M=-1,v=false,w=0,k=false,B(0);},pause(){k=true,cancelAnimationFrame(F);},resume(){k&&(k=false,R&&(F=requestAnimationFrame(L)));},seek(u){let A=Math.min(1,Math.max(0,u));w=A,M=A,k=true,cancelAnimationFrame(F),B(A);},getProgress(){return w}}}var Kt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Zt(e,n={}){if(typeof window>"u")return Kt;let t=typeof e=="string"?document.querySelector(e):e;if(!t||t.tagName.toLowerCase()!=="video")return he("scrollVideo: <video> element not found:",e),Kt;let r=t,{trigger:s={},easing:i="linear",once:a=false,axis:m="y",preload:f="auto",triggerElement:d,onReady:x,onComplete:H,onProgress:P}=n,Q=d??r,me=window.matchMedia("(prefers-reduced-motion: reduce)").matches,I=typeof i=="function"?i:oe[i]??oe.linear,se=ye(s.start??"top top"),be=ye(s.end??"bottom top");r.pause(),r.hasAttribute("preload")||(r.preload=f);let F=n.from??0,R=n.to,k=0,M=0,w=0,v=false,T=false,U=-1,N=0,B=false,L=false,fe=()=>m==="x"?window.scrollX:window.scrollY,Ee=()=>m==="x"?window.innerWidth:window.innerHeight;function ie(){let E=Q.getBoundingClientRect(),de=m==="x"?E.left:E.top,Ae=m==="x"?E.width:E.height,ae=Le({top:de,height:Ae},fe(),Ee(),se,be);k=ae.tStart,M=ae.tEnd,L&&M===k&&he("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",r);}let V=NaN;function u(E){if(!L)return;let de=R??r.duration??0,Ae=F+(de-F)*E;Ae!==V&&(V=Ae,r.currentTime=Ae),r.style.setProperty("--scroll-draw-progress",String(E)),P?.(E);}function A(){if(!v||T||!L||me)return;let E=I(ee(fe(),k,M,1));a&&(U=Math.max(U,E),E=U),N=E,u(E),E>=1&&!B?(B=true,H?.()):E<1&&!a&&(B=false),w=requestAnimationFrame(A);}function h(){if(L=true,R===void 0&&(R=r.duration),me){u(1),x?.();return}ie(),x?.(),v&&!T&&(w=requestAnimationFrame(A));}r.readyState>=1?h():r.addEventListener("loadedmetadata",h,{once:true}),L||ie();let O=me?()=>{}:ct(E=>{E&&(O(),me=true,cancelAnimationFrame(w),u(1));}),te=new IntersectionObserver(E=>{E.forEach(de=>{v=de.isIntersecting,v&&!T&&L?w=requestAnimationFrame(A):cancelAnimationFrame(w);});}),pe;function Se(){clearTimeout(pe),pe=setTimeout(ie,150);}window.addEventListener("resize",Se),window.addEventListener("orientationchange",Se);let Z=De([Q],Se);return te.observe(r),Ce(r,{type:"video",getProgress:()=>N,getTrigger:()=>({tStart:k,tEnd:M})}),{destroy(){cancelAnimationFrame(w),te.disconnect(),r.removeEventListener("loadedmetadata",h),window.removeEventListener("resize",Se),window.removeEventListener("orientationchange",Se),Z(),O(),clearTimeout(pe),ke(r);},replay(){U=-1,B=false,N=0,T=false,V=NaN,u(0);},pause(){T=true,cancelAnimationFrame(w);},resume(){T&&(T=false,v&&L&&(w=requestAnimationFrame(A)));},seek(E){let de=Math.min(1,Math.max(0,E));N=de,U=de,T=true,cancelAnimationFrame(w),V=NaN,u(de);},getProgress(){return N}}}function Jt(e,n){let t=document.createElement("span");t.textContent=n,t.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;user-select:none",e.appendChild(t);}function nn(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(t=>{let r=document.createElement("span");return r.setAttribute("aria-hidden","true"),/^\s+$/.test(t)?(r.textContent=t,r.style.whiteSpace="pre"):(r.textContent=t,r.style.display="inline-block"),e.appendChild(r),/^\s+$/.test(t)?null:r}).filter(t=>t!==null)}function Rn(e){let n=e.textContent??"";return e.textContent="",n.split("").map(t=>{let r=document.createElement("span");return r.setAttribute("aria-hidden","true"),r.textContent=t,t===" "?r.style.whiteSpace="pre":r.style.display="inline-block",e.appendChild(r),t===" "?null:r}).filter(t=>t!==null)}function en(e){let n=nn(e),t=new Map;for(let i of n){let a=i.offsetTop;t.has(a)||t.set(a,[]),t.get(a).push(i);}let r=[],s=Array.from(t.keys()).sort((i,a)=>i-a);for(let i of s){let a=t.get(i),m=document.createElement("span");m.setAttribute("aria-hidden","true"),m.style.display="inline-block",a.forEach((f,d)=>{let x=f.nextElementSibling;m.appendChild(f),d<a.length-1&&x&&x.style.whiteSpace==="pre"&&m.appendChild(x);}),r.push(m);}return e.textContent="",r.forEach((i,a)=>{e.appendChild(i),a<r.length-1&&e.appendChild(document.createTextNode(" "));}),r}function Nn(e,n,t,r){if(t<=1||r===0)return e;let s=(t-1)*r,i=n*r,a=i+(1-s);return a<=i?e>=i?1:0:Math.min(1,Math.max(0,(e-i)/(a-i)))}function zn(e,n){let t=[];if(n?.y!==void 0&&t.push(`translateY(${n.y*(1-e)}px)`),n?.x!==void 0&&t.push(`translateX(${n.x*(1-e)}px)`),n?.rotate!==void 0&&t.push(`rotate(${n.rotate*(1-e)}deg)`),n?.scale!==void 0){let r=n.scale+(1-n.scale)*e;t.push(`scale(${r})`);}return t.join(" ")||""}var tn={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function rn(e,n={}){if(typeof window>"u")return tn;let t=typeof e=="string"?document.querySelector(e):e;if(!t)return he("scrollText: element not found:",e),tn;let r=t;return qe(n,(s,i)=>Vn(r,s,i))}function Vn(e,n,t){let{split:r="words",stagger:s=.04,easing:i="ease-out",from:a={opacity:0,y:24},trigger:m={},once:f=true,onComplete:d}=n,x=typeof i=="function"?i:oe[i]??oe["ease-out"],H=ye(m.start??"top 85%"),P=ye(m.end??"top 40%"),Q=e.innerHTML,me=e.textContent??"",I;r==="chars"?I=Rn(e):r==="lines"?I=en(e):I=nn(e),Jt(e,me);let se=I.length;function be(h,O){a?.opacity!==void 0&&(h.style.opacity=String(a.opacity+(1-a.opacity)*O));let te=zn(O,a);te&&(h.style.transform=te);}function F(h){e.style.setProperty("--scroll-draw-progress",String(h)),I.forEach((O,te)=>{let pe=x(Nn(h,te,se,s));be(O,pe);});}if(t)return F(1),d?.(),{destroy(){e.innerHTML=Q;},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};F(0);let R=0,k=0,M=0,w=false,v=false,T=-1,U=0,N=false,B=()=>window.scrollY,L=()=>window.innerHeight;function fe(){let h=e.getBoundingClientRect(),O=Le({top:h.top,height:h.height},B(),L(),H,P);R=O.tStart,k=O.tEnd;}function Ee(){if(!w||v)return;let h=ee(B(),R,k,1);f&&(T=Math.max(T,h),h=T),U=h,F(h),h>=1&&!N?(N=true,d?.()):h<1&&!f&&(N=false),M=requestAnimationFrame(Ee);}fe();let ie=new IntersectionObserver(h=>{h.forEach(O=>{w=O.isIntersecting,w&&!v?M=requestAnimationFrame(Ee):cancelAnimationFrame(M);});}),V;function u(){clearTimeout(V),V=setTimeout(()=>{if(r==="lines"){let h=U;e.innerHTML=Q,I=en(e),Jt(e,me),F(h);}fe();},150);}window.addEventListener("resize",u),window.addEventListener("orientationchange",u);let A=De([e],u);return ie.observe(e),Ce(e,{type:"text",getProgress:()=>U,getTrigger:()=>({tStart:R,tEnd:k})}),{destroy(){cancelAnimationFrame(M),ie.disconnect(),window.removeEventListener("resize",u),window.removeEventListener("orientationchange",u),A(),clearTimeout(V),e.innerHTML=Q,ke(e);},replay(){T=-1,N=false,U=0,v=false,F(0);},pause(){v=true,cancelAnimationFrame(M);},resume(){v&&(v=false,w&&(M=requestAnimationFrame(Ee)));},seek(h){let O=Math.min(1,Math.max(0,h));U=O,T=O,v=true,cancelAnimationFrame(M),F(O);},getProgress(){return U}}}var Be=class{constructor(n){this.create=n;this.instance=null;this.el=null;this.key="";}init(n,t){return this.destroy(),this.el=n,this.latest=t,this.key=ht(t),this.instance=this.create(n,qt(t,()=>this.latest)),this}update(n){return this.el?ht(n)!==this.key?this.init(this.el,n):(this.latest=n,this):this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(n){return this.instance?.seek(n),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=this.el=null,this}},on=class extends Be{constructor(){super(_t);}init(n,t={}){return super.init(n,t)}},sn=class extends Be{constructor(){super(Yt);}},an=class extends Be{constructor(){super(Xt);}},ln=class extends Be{constructor(){super(Zt);}init(n,t={}){return super.init(n,t)}},cn=class extends Be{constructor(){super(rn);}init(n,t={}){return super.init(n,t)}};exports.EngineRef=Be;exports.ScrollAnimateRef=sn;exports.ScrollCounterRef=an;exports.ScrollDrawRef=on;exports.ScrollTextRef=cn;exports.ScrollVideoRef=ln;
@@ -1,5 +1,5 @@
1
1
  import { S as ScrollDrawInstance, a as ScrollDrawOptions } from '../types-MswK0erX.mjs';
2
- import { S as ScrollAnimateOptions } from '../engine-P8u6OK4m.mjs';
2
+ import { S as ScrollAnimateOptions } from '../engine-o1VSQ1lX.mjs';
3
3
  import { S as ScrollCounterOptions } from '../index-CdaBYn3A.mjs';
4
4
  import { ScrollVideoOptions } from '../video/index.mjs';
5
5
  import { ScrollTextOptions } from '../text/index.mjs';
@@ -1,5 +1,5 @@
1
1
  import { S as ScrollDrawInstance, a as ScrollDrawOptions } from '../types-MswK0erX.js';
2
- import { S as ScrollAnimateOptions } from '../engine-DQyBzZDl.js';
2
+ import { S as ScrollAnimateOptions } from '../engine-B7UpB4fT.js';
3
3
  import { S as ScrollCounterOptions } from '../index-D3o4vT3e.js';
4
4
  import { ScrollVideoOptions } from '../video/index.js';
5
5
  import { ScrollTextOptions } from '../text/index.js';
@@ -1 +1 @@
1
- import {a,b}from'../chunk-XSVTHCLO.mjs';import {a as a$3}from'../chunk-7SBTYJGH.mjs';import {a as a$4}from'../chunk-426RAN5I.mjs';import {a as a$2}from'../chunk-KHQ7OGQK.mjs';import {a as a$1}from'../chunk-BFX2CSQ3.mjs';import {b as b$1}from'../chunk-ENACACPZ.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';var r=class{constructor(t){this.create=t;this.instance=null;this.el=null;this.key="";}init(t,e){return this.destroy(),this.el=t,this.latest=e,this.key=a(e),this.instance=this.create(t,b(e,()=>this.latest)),this}update(t){return this.el?a(t)!==this.key?this.init(this.el,t):(this.latest=t,this):this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(t){return this.instance?.seek(t),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=this.el=null,this}},u=class extends r{constructor(){super(b$1);}init(t,e={}){return super.init(t,e)}},h=class extends r{constructor(){super(a$1);}},m=class extends r{constructor(){super(a$2);}},O=class extends r{constructor(){super(a$3);}init(t,e={}){return super.init(t,e)}},d=class extends r{constructor(){super(a$4);}init(t,e={}){return super.init(t,e)}};export{r as EngineRef,h as ScrollAnimateRef,m as ScrollCounterRef,u as ScrollDrawRef,d as ScrollTextRef,O as ScrollVideoRef};
1
+ import {a,b}from'../chunk-XSVTHCLO.mjs';import {a as a$3}from'../chunk-VDTAYUAR.mjs';import {a as a$4}from'../chunk-DY5JCXVR.mjs';import {a as a$2}from'../chunk-WXUOF4NM.mjs';import {a as a$1}from'../chunk-LTCJVVSC.mjs';import {b as b$1}from'../chunk-HX4SP5WN.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';var r=class{constructor(t){this.create=t;this.instance=null;this.el=null;this.key="";}init(t,e){return this.destroy(),this.el=t,this.latest=e,this.key=a(e),this.instance=this.create(t,b(e,()=>this.latest)),this}update(t){return this.el?a(t)!==this.key?this.init(this.el,t):(this.latest=t,this):this}replay(){return this.instance?.replay(),this}pause(){return this.instance?.pause(),this}resume(){return this.instance?.resume(),this}seek(t){return this.instance?.seek(t),this}getProgress(){return this.instance?.getProgress()??0}destroy(){return this.instance?.destroy(),this.instance=this.el=null,this}},u=class extends r{constructor(){super(b$1);}init(t,e={}){return super.init(t,e)}},h=class extends r{constructor(){super(a$1);}},m=class extends r{constructor(){super(a$2);}},O=class extends r{constructor(){super(a$3);}init(t,e={}){return super.init(t,e)}},d=class extends r{constructor(){super(a$4);}init(t,e={}){return super.init(t,e)}};export{r as EngineRef,h as ScrollAnimateRef,m as ScrollCounterRef,u as ScrollDrawRef,d as ScrollTextRef,O as ScrollVideoRef};
@@ -1,3 +1,3 @@
1
- 'use strict';function sr({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,r)),s=Math.sqrt(t),i=0,l=[];for(let p=0;p<n;p++){let w=Math.pow(s,p);l.push(w),i+=w;}let m=[0],c=0;for(let p=0;p<n;p++)c+=l[p]/i,m.push(c);return p=>{if(p<=0)return 0;if(p>=1)return 1;for(let w=0;w<n;w++)if(p<=m[w+1]){let D=(p-m[w])/(m[w+1]-m[w]);if(w===0)return D*(2-D);let T=1-Math.pow(t,w);return T+(1-T)*(2*D-1)*(2*D-1)}return 1}}function ir({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),t=Math.max(.1,r),s=n<=1?t/4:t/(2*Math.PI)*Math.asin(1/n);return i=>i<=0?0:i>=1?1:n*Math.pow(2,-10*i)*Math.sin((i-s)*(2*Math.PI)/t)+1}var be={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:sr(),elastic:ir()};function Ct(e,r,n){return Math.min(n,Math.max(r,e))}function Te(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 Pt(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 Dt(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 ae(e,r,n,t){return n===r?0:Ct((e-r)/(n-r)*t,0,1)}function De(e,r,n,t,s){let i=Pt(e.top,e.height,r,t.element)-Dt(t.viewport,n),l=Pt(e.top,e.height,r,s.element)-Dt(s.viewport,n);return {tStart:i,tEnd:l}}function ot(e,r,n){let t=e.getBoundingClientRect(),s=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:s,scroll:0}:{top:n==="x"?t.left:t.top,height:s,scroll:n==="x"?window.scrollX:window.scrollY}}function Ge(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 kt(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 je(e,r,n){let t=kt(e),s=kt(r);return !t||!s?e:`rgb(${Math.round(t[0]+(s[0]-t[0])*n)},${Math.round(t[1]+(s[1]-t[1])*n)},${Math.round(t[2]+(s[2]-t[2])*n)})`}var It={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 Xe=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function ee(e,...r){Xe&&console.warn(`[svg-scroll-draw] ${e}`,...r);}var ar="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",lr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Ot=33;function cr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function ur(e){let r=[];for(let n=0;n<Ot;n++){let t=n/(Ot-1);r.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${r.join(",")})`}function st(e){switch(e){case "linear":return "linear";case "ease-in":return ar;case "ease-out":return lr;case "ease-in-out":return cr()?ur(be["ease-in-out"]):null;default:return null}}var Rt=Symbol.for("svg-scroll-draw.registry");function Ft(){let e=globalThis;return e[Rt]||(e[Rt]=new Map)}function Re(e,r){Ft().set(e,r);}function Fe(e){Ft().delete(e);}var Je,it=new Set,at=new WeakMap,Qe=new Map,Ht=e=>{let r=e.getBoundingClientRect();return r.width+" "+r.height};function mr(e){let r=new Set;for(let n of e)for(;n&&n!==document.body;n=n.parentElement)for(let t=n;t;t=t.previousElementSibling)r.add(t);return r}function Ve(e,r){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>r();Je??(Je=new ResizeObserver(s=>{let i=false;for(let{target:l}of s)at.get(l)!==Ht(l)&&(i=true),at.set(l,"");i&&it.forEach(l=>l());})),it.add(n);let t=mr(e);return [document.body,document.documentElement].forEach(s=>s&&t.add(s)),t.forEach(s=>{at.has(s)||at.set(s,Ht(s)),Qe.set(s,(Qe.get(s)??0)+1),Je.observe(s);}),()=>{it.delete(n)&&(t.forEach(s=>{let i=(Qe.get(s)??1)-1;if(i)return void Qe.set(s,i);Qe.delete(s),Je?.unobserve(s);}),it.size||(Je?.disconnect(),Je=void 0));}}var fr=0;function pr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Nt(e,r){let n="";try{n=getComputedStyle(e).getPropertyValue(r).trim();}catch{}return n||(e.getAttribute(r)??"").trim()}var _t=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function dr(e){if(!Xe)return;let r=Nt(e,"stroke");if(!r||r==="none"){ee("Element has no stroke \u2014 path will not be visible.",e);return}let n=(e.getAttribute("fill")??"").trim();n&&!_t.has(n)&&!_t.has(Nt(e,"fill"))&&ee("Element has a fill \u2014 it may obscure the stroke animation.",e);}function gr(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 s(){let i=n==="x"?window.scrollX:window.scrollY,l=e-i,m=r-i,c=n==="x";t.innerHTML=`
2
- <div style="position:absolute;${c?`left:${l}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${l}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;${c?`left:${m}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${m}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",s,{passive:true}),s(),{el:t,destroy(){window.removeEventListener("scroll",s),t.remove();}}}var zt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Vt=/[MmLlHhVvCcSsQqTtAaZz]/g;function yr(e,r,n){if(!Xe)return;let t=(e.match(Vt)??[]).join("").toUpperCase(),s=(r.match(Vt)??[]).join("").toUpperCase(),i=(e.match(zt)??[]).length,l=(r.match(zt)??[]).length;if(t!==s){ee(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${s||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,n);return}i!==l&&ee(`morphTo: coordinate count differs (${i} \u2192 ${l}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,n);}function ht(e,r,n){let t=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),s=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,i=>{let l=parseFloat(i),m=t[s++]??l;return String(+(l+(m-l)*n).toFixed(4))})}function lt(e,r={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:n,...t}=r,s=n?{...It[n],...t}:t,i=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:l="path, polyline, line, polygon, rect, circle",speed:m=1,fade:c=false,easing:p="linear",trigger:w={},stagger:D=0,direction:T="forward",once:me=false,debug:He=false,axis:Y="y",scrollContainer:Le,autoReverse:N=false,delay:te=0,strokeColor:le,strokeWidth:L,fillOpacity:_,waypoints:k,velocityScale:C=false,threshold:q=0,rootMargin:x="0px",repeat:S=0,repeatDelay:fe=0,morphTo:I,clip:ce,autoplay:xe=false,duration:$e=1e3,native:Me=true,onProgress:re,onStart:z,onComplete:f,onEnter:P,onLeave:v,onEnterBack:$,onLeaveBack:pe}=s,J=ce===true?"left":typeof ce=="string"?ce:false,ve=typeof p=="function"?p:be[p]??be.linear,Ce=Te(w.start??"top bottom"),We=Te(w.end??"bottom top"),de=typeof Le=="string"?document.querySelector(Le):Le??null,we=Array.isArray(le)?le[0]:null,ne=Array.isArray(le)?le[1]:typeof le=="string"?le:null,B=Array.isArray(L)?L[0]:null,Q=Array.isArray(L)?L[1]:typeof L=="number"?L:null,Z=Array.isArray(_)?_[0]:null,G=Array.isArray(_)?_[1]:typeof _=="number"?_:null;function ke(o){let a=o*100;switch(J){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 O=J?[]:Array.from(e.querySelectorAll(l)),M=[],oe=[],X=0,ge=0,u=D,y=0,R=false,H=false,E=0,se=false,ue=-1,Ie=[],K=-1,V=false,ye=0,Oe=0,Ne,mt=null;function vt(){mt?.destroy(),mt=null;}let _e=new Set,Et=NaN,ze=true,Ke=-1,St=performance.now(),qe=NaN;function Ue(){return de?Y==="x"?de.scrollLeft:de.scrollTop:Y==="x"?window.scrollX:window.scrollY}function Tt(){return de?Y==="x"?de.clientWidth:de.clientHeight:Y==="x"?window.innerWidth:window.innerHeight}function xt(){let o=ot(e,de,Y);return De(o,o.scroll,Tt(),Ce,We)}function Kt(){let o=ge-X,a=O.length-1,g=de??document.documentElement,j=Y==="x"?"Width":"Height";if(u=D,D>0&&a>0&&o>0){let Ee=g[`scroll${j}`]-g[`client${j}`]-1-X-o/m;Ee>=0&&(u=Math.min(D,Ee/(a*o)));}y=ge+a*u*o;}function Mt(){(({tStart:X,tEnd:ge}=xt())),Kt(),He&&Xe&&(vt(),mt=gr(X,ge,Y));}function ft(o,a=xt){Re(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:a});let g=o.destroy;return o.destroy=()=>{g.call(o),Fe(e);},o}function er(o,a){if(e.style.setProperty("--scroll-draw-progress",String(o)),J){let g=a==="reverse"?1-o:o;e.style.clipPath=ke(g);return}O.forEach((g,j)=>{g.style.strokeDashoffset=a==="reverse"?`${M[j]*o}`:`${M[j]*(1-o)}`,c&&(g.style.opacity=a==="reverse"?`${1-o}`:`${o}`),we&&ne?g.style.stroke=je(we,ne,o):ne&&(g.style.stroke=ne),B!==null&&Q!==null?g.style.strokeWidth=`${B+(Q-B)*o}`:Q!==null&&(g.style.strokeWidth=`${Q}`),Z!==null&&G!==null?g.style.fillOpacity=`${Z+(G-Z)*o}`:G!==null&&(g.style.fillOpacity=`${G}`),I&&g.tagName.toLowerCase()==="path"&&oe[j]&&g.setAttribute("d",ht(oe[j],I,o));});}function et(){if(e.style.setProperty("--scroll-draw-progress","0"),J){e.style.clipPath=ke(0);return}O.forEach((o,a)=>{o.style.strokeDasharray=`${M[a]}`,o.style.strokeDashoffset=T==="reverse"?"0":`${M[a]}`,c?o.style.opacity=T==="reverse"?"1":"0":o.style.opacity="",we&&(o.style.stroke=we),B!==null&&(o.style.strokeWidth=`${B}`),Z!==null&&(o.style.fillOpacity=`${Z}`),I&&o.tagName.toLowerCase()==="path"&&oe[a]&&o.setAttribute("d",oe[a]);});}if(O.forEach(o=>{dr(o);let a=Ge(o);M.push(a);let g=o.tagName.toLowerCase()==="path";g?oe.push(o.getAttribute("d")??""):oe.push(""),I&&(g?yr(oe[oe.length-1],I,o):ee(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),i?(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=T==="reverse"?`${a}`:"0",c&&(o.style.opacity="1"),ne&&(o.style.stroke=ne),Q!==null&&(o.style.strokeWidth=`${Q}`),G!==null&&(o.style.fillOpacity=`${G}`),I&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",I)):(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=T==="reverse"?"0":`${a}`,c?o.style.opacity=T==="reverse"?"1":"0":o.style.opacity="",we&&(o.style.stroke=we),B!==null&&(o.style.strokeWidth=`${B}`),Z!==null&&(o.style.fillOpacity=`${Z}`));}),J){if(i)return e.style.clipPath=ke(1),f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=ke(0);}else if(i)return f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let At=typeof p=="string"?st(p):null;function tr(){return !(Me===false||!pr()||!O.length||!At||J||Y!=="y"||de||m!==1||D!==0||me||N||C!==false||I||k||S||te>0||re||z||f||P||v||$||pe||le!=null||L!=null||_!=null||(w.start??"top bottom").trim()!=="top bottom"||(w.end??"bottom top").trim()!=="bottom top")}function rr(){let o=++fr,a=`svg-scroll-draw-${o}`,g=`svg-scroll-draw-host-${o}`,j=`--svg-scroll-draw-${o}`,Ee=T==="reverse"?"0":"var(--ssd-len)",Pe=T==="reverse"?"var(--ssd-len)":"0",Ae=`stroke-dashoffset:${Ee};`,b=`stroke-dashoffset:${Pe};`;c&&(Ae+=`opacity:${T==="reverse"?1:0};`,b+=`opacity:${T==="reverse"?0:1};`);let A=document.createElement("style");A.setAttribute("data-svg-scroll-draw",""),A.textContent=`@keyframes ${a}{from{${Ae}}to{${b}}}.${g}{view-timeline-name:${j};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${At};animation-fill-mode:both;animation-timeline:${j};animation-range:cover 0% cover 100%;}`,document.head.appendChild(A),e.classList.add(g);function ie(d,U){d.style.setProperty("--ssd-len",String(M[U])),d.style.strokeDasharray=`${M[U]}`,d.style.strokeDashoffset="",d.style.opacity="",d.style.animationPlayState="",d.classList.add(a);}O.forEach(ie);let h=false,F=-1;function W(){if(F>=0)return F;let d=e.getBoundingClientRect(),{tStart:U,tEnd:Se}=De({top:d.top,height:d.height},Ue(),Tt(),Ce,We);return ve(ae(Ue(),U,Se,m))}return {destroy(){e.classList.remove(g),O.forEach(d=>{d.classList.remove(a),d.style.removeProperty("--ssd-len"),d.style.animationPlayState="";}),A.remove();},replay(){h=false,F=-1,O.forEach(ie);},pause(){h=true,O.forEach(d=>{d.style.animationPlayState="paused";});},resume(){h&&(h=false,O.forEach(d=>{d.style.animationPlayState="running";}));},seek(d){let U=Math.min(1,Math.max(0,d));F=U,h=true,O.forEach((Se,he)=>{Se.classList.remove(a),Se.style.strokeDashoffset=T==="reverse"?`${M[he]*U}`:`${M[he]*(1-U)}`,c&&(Se.style.opacity=T==="reverse"?`${1-U}`:`${U}`);});},getProgress(){return W()},refresh(){O.forEach((d,U)=>{M[U]=Ge(d),d.style.setProperty("--ssd-len",String(M[U])),d.style.strokeDasharray=`${M[U]}`;});}}}if(tr())return ft(rr());function nr(){let o=Math.max(1,$e),a=0,g=0,j=false;function Ee(h){let F=true;if(J){let W=Math.min(1,Math.max(0,h/o)),d=ve(W);ye=d,e.style.setProperty("--scroll-draw-progress",String(d)),e.style.clipPath=ke(T==="reverse"?1-d:d),re?.(d),W<1&&(F=false);}else O.forEach((W,d)=>{let U=d*D*o,Se=Math.min(1,Math.max(0,(h-U)/o)),he=ve(Se);W.style.strokeDashoffset=T==="reverse"?`${M[d]*he}`:`${M[d]*(1-he)}`,c&&(W.style.opacity=T==="reverse"?`${1-he}`:`${he}`),we&&ne?W.style.stroke=je(we,ne,he):ne&&(W.style.stroke=ne),B!==null&&Q!==null?W.style.strokeWidth=`${B+(Q-B)*he}`:Q!==null&&(W.style.strokeWidth=`${Q}`),Z!==null&&G!==null?W.style.fillOpacity=`${Z+(G-Z)*he}`:G!==null&&(W.style.fillOpacity=`${G}`),I&&W.tagName.toLowerCase()==="path"&&oe[d]&&W.setAttribute("d",ht(oe[d],I,he)),d===0&&(ye=he,re?.(he),e.style.setProperty("--scroll-draw-progress",String(he))),Se<1&&(F=false);});if(k){let W=Math.min(1,Math.max(0,h/o)),d=ve(W);for(let U in k){let Se=parseFloat(U);d>=Se&&!_e.has(Se)&&(_e.add(Se),k[U]?.());}}return F}function Pe(h){if(V)return;let F=h-a;H||(H=true,z?.());let W=Ee(F);if(W&&!R){R=true,Ee(o*(1+Math.max(0,O.length-1)*D)),f?.(),Oe<(S==="infinite"?1/0:S??0)&&(Oe++,Ne=setTimeout(()=>{a=performance.now(),H=false,R=false,_e.clear(),et(),E=requestAnimationFrame(Pe);},fe));return}W||(E=requestAnimationFrame(Pe));}function Ae(){cancelAnimationFrame(E),clearTimeout(Ne),a=performance.now(),g=0,V=false,H=false,R=false,Oe=0,j=true,ye=0,_e.clear(),et(),E=requestAnimationFrame(Pe);}let b=new IntersectionObserver(h=>{h.forEach(F=>{F.isIntersecting&&!(me&&R)?Ae():!F.isIntersecting&&!me&&!R&&(cancelAnimationFrame(E),clearTimeout(Ne),j=false);});},{root:de??null,threshold:q,rootMargin:x}),A;function ie(){clearTimeout(A),A=setTimeout(()=>{O.forEach((h,F)=>{M[F]=Ge(h),h.style.strokeDasharray=`${M[F]}`;});},150);}return window.addEventListener("resize",ie),window.addEventListener("orientationchange",ie),te>0?setTimeout(()=>b.observe(e),te):b.observe(e),{destroy(){cancelAnimationFrame(E),clearTimeout(Ne),b.disconnect(),window.removeEventListener("resize",ie),window.removeEventListener("orientationchange",ie),clearTimeout(A);},replay(){Oe=0,Ae();},pause(){V||!j||(V=true,g=performance.now()-a,cancelAnimationFrame(E));},resume(){V&&(V=false,j=true,a=performance.now()-g,E=requestAnimationFrame(Pe));},seek(h){let F=Math.min(1,Math.max(0,h));ye=F,V=true,g=F*o,a=performance.now()-g,cancelAnimationFrame(E),Ee(g);},getProgress(){return ye},refresh(){clearTimeout(A),O.forEach((h,F)=>{M[F]=Ge(h),h.style.strokeDasharray=`${M[F]}`;});}}}if(xe)return ft(nr());Mt();function Lt(){if(V||!Be)return;let o=performance.now(),a=Ue();if(!ze&&C===false&&a===Et){dt(a);return}ze=false,Et=a;let g=m;if(C!==false){let b=o-St,A=b>0?Math.abs(a-(Ke<0?a:Ke))/b:0;g=m*Math.max(.2,1+A*(typeof C=="number"?C:1)*.04);}Ke=a,St=o;let j=N?K===-1||a>=K?"forward":"reverse":T;K=a;let Ee=ge-X,Pe=true,Ae=Ee===0?0:(a-X)/Ee;if(isNaN(qe)||(qe<=0&&Ae>0?P?.():qe>0&&Ae<=0&&pe?.(),qe<1&&Ae>=1?v?.():qe>=1&&Ae<1&&$?.()),qe=Ae,J){let b=ve(ae(a,X,ge,g));me&&!N&&(ue=Math.max(ue,b),b=ue),ye=b,e.style.setProperty("--scroll-draw-progress",String(b));let A=j==="reverse"?1-b:b;e.style.clipPath=ke(A),re?.(b),!H&&ae(a,X,ge,g)>0&&(H=true,z?.()),b>=1&&!R?(R=true,f?.(),Oe<(S==="infinite"?1/0:S??0)&&(Oe++,Ne=setTimeout(()=>{ue=-1,H=false,R=false,e.style.clipPath=ke(0);},fe))):b<1&&!me&&(R=false),dt(a);return}if(O.forEach((b,A)=>{let ie=A*u*Ee,h=ve(ae(a,X+ie,ge+ie,g));me&&!N&&(h=Ie[A]=Math.max(Ie[A]??ue,h)),b.style.strokeDashoffset=j==="reverse"?`${M[A]*h}`:`${M[A]*(1-h)}`,c&&(b.style.opacity=j==="reverse"?`${1-h}`:`${h}`),we&&ne?b.style.stroke=je(we,ne,h):ne&&(b.style.stroke=ne),B!==null&&Q!==null?b.style.strokeWidth=`${B+(Q-B)*h}`:Q!==null&&(b.style.strokeWidth=`${Q}`),Z!==null&&G!==null?b.style.fillOpacity=`${Z+(G-Z)*h}`:G!==null&&(b.style.fillOpacity=`${G}`),I&&b.tagName.toLowerCase()==="path"&&oe[A]&&b.setAttribute("d",ht(oe[A],I,h)),A===0&&(ye=h,re?.(h),e.style.setProperty("--scroll-draw-progress",String(h))),h<1&&(Pe=false);}),k){let b=ve(ae(a,X,ge,g));for(let A in k){let ie=parseFloat(A);b>=ie&&!_e.has(ie)&&(_e.add(ie),k[A]?.());}}!H&&ae(a,X,ge,g)>0&&(H=true,z?.()),Pe&&!R?(R=true,f?.(),Oe<(S==="infinite"?1/0:S??0)&&(Oe++,Ne=setTimeout(()=>{ue=-1,Ie=[],H=false,R=false,_e.clear(),et(),ze=true;},fe))):!Pe&&!me&&(R=false),dt(a);}function pt(o){return o>=ge&&o<y}function dt(o){se||pt(o)?E=requestAnimationFrame(Lt):Be=false;}function gt(){return se||pt(Ue())}let Be=false;function tt(){Be||(Be=true,E=requestAnimationFrame(function(){Lt();}));}function rt(){Be=false,cancelAnimationFrame(E);}let yt=new IntersectionObserver(o=>{o.forEach(a=>{se=a.isIntersecting,se&&!V?(ze=true,tt()):Be&&!V&&pt(Ue())||rt();});},{root:de??null,threshold:q,rootMargin:x});function $t(){O.forEach((o,a)=>{M[a]=Ge(o),o.style.strokeDasharray=`${M[a]}`;}),Mt(),ze=true;}let nt;function Ye(){clearTimeout(nt),nt=setTimeout($t,150);}window.addEventListener("resize",Ye),window.addEventListener("orientationchange",Ye);let or=Ve([e],Ye);return te>0?setTimeout(()=>yt.observe(e),te):yt.observe(e),ft({destroy(){cancelAnimationFrame(E),clearTimeout(Ne),rt(),yt.disconnect(),or(),window.removeEventListener("resize",Ye),window.removeEventListener("orientationchange",Ye),clearTimeout(nt),vt();},replay(){ue=-1,Ie=[],K=-1,Ke=-1,H=false,R=false,Oe=0,V=false,ye=0,_e.clear(),clearTimeout(Ne),et(),ze=true,gt()&&tt();},pause(){V=true,rt();},resume(){V&&(V=false,ze=true,gt()&&tt());},seek(o){let a=Math.min(1,Math.max(0,o));ye=a,ue=a,Ie=[],V=true,rt(),er(a,T),ze=true;},getProgress(){return ye},refresh(){clearTimeout(nt),$t(),gt()&&!V&&tt();}},()=>({tStart:X,tEnd:ge}))}function hr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Wt(e){let r=[],n=/([\w]+)\(([^)]*)\)/g,t;for(;(t=n.exec(e))!==null;){let s=[],i=[],l=t[2].trim();if(l)for(let m of l.split(/[\s,]+/)){let c=m.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(c?parseFloat(c[1]):0),i.push(c?c[2]:"");}r.push({fn:t[1],nums:s,units:i});}return r}function br(e,r,n){let t=Wt(e),s=Wt(r);return t.length===0||t.length!==s.length?n<1?e:r:t.map((i,l)=>{let m=s[l];return i.fn!==m.fn||i.nums.length!==m.nums.length?n<1?`${i.fn}(${i.nums.map((c,p)=>`${c}${i.units[p]}`).join(", ")})`:`${m.fn}(${m.nums.map((c,p)=>`${c}${m.units[p]}`).join(", ")})`:`${i.fn}(${i.nums.map((c,p)=>`${c+(m.nums[p]-c)*n}${i.units[p]}`).join(", ")})`}).join(" ")}function qt(e,r,n){if(typeof e=="number"&&typeof r=="number")return String(e+(r-e)*n);let t=String(e),s=String(r);if(hr(t))return je(t,s,n);if(t.includes("("))return br(t,s,n);let i=t.match(/^([-+]?[\d.]+)(.*)$/),l=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&l){let m=parseFloat(i[1]),c=parseFloat(l[1]);return `${m+(c-m)*n}${i[2]||l[2]}`}return n<1?t:s}function wr(e){return e.replace(/([A-Z])/g,r=>`-${r.toLowerCase()}`)}var vr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Er=0,Bt="--scroll-draw-progress";function Sr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Gt(e,r){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let{props:t,trigger:s={},easing:i="ease-out",speed:l=1,once:m=false,axis:c="y",scrollContainer:p,native:w=true,velocityScale:D=false,respectReducedMotion:T=true,triggerElement:me,onProgress:He,onComplete:Y,onEnter:Le,onLeave:N,onEnterBack:te,onLeaveBack:le}=r,L=T&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,_=typeof i=="function"?i:be[i]??be["ease-out"],k=Te(s.start??"top bottom"),C=Te(s.end??"bottom top"),q=me??e,x=typeof p=="string"?document.querySelector(p):p??null,S=Object.entries(t).map(([u,y])=>({prop:wr(u),from:Array.isArray(y)?y[0]:"",to:Array.isArray(y)?y[1]:y}));function fe(){let u=window.getComputedStyle(e);for(let y of S)y.from===""&&(y.from=u.getPropertyValue(y.prop).trim()||"0");}function I(){for(let u of S)e.style.setProperty(u.prop,String(u.to));}let ce=new Map;for(let u of [...S.map(y=>y.prop),Bt])ce.set(u,e.style.getPropertyValue(u));function xe(){for(let[u,y]of ce)y?e.style.setProperty(u,y):e.style.removeProperty(u);}if(L)return I(),Y?.(),{...n,destroy:xe,getProgress:()=>1};fe();let $e=typeof i=="string"?st(i):null;function Me(){if(!w||!Sr()||!$e||c!=="y"||x||q!==e||m||l!==1||He||Y||Le||N||te||le||D!==false||(s.start??"top bottom").trim()!=="top bottom"||(s.end??"bottom top").trim()!=="bottom top")return false;for(let u of S)if(!vr.has(u.prop))return false;return true}function re(){let u=`ssd-a-${++Er}`,y=S.map(K=>`${K.prop}:${K.from}`).join(";"),R=S.map(K=>`${K.prop}:${K.to}`).join(";"),H=document.createElement("style");H.setAttribute("data-ssd-animate",""),H.textContent=`@keyframes ${u}{from{${y}}to{${R}}}.${u}{animation-name:${u};animation-duration:auto;animation-timing-function:${$e};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(H),e.classList.add(u);let E=()=>c==="x"?window.scrollX:window.scrollY,se=()=>c==="x"?window.innerWidth:window.innerHeight,ue=()=>{let K=e.getBoundingClientRect();return De({top:K.top,height:K.height},E(),se(),k,C)};Re(e,{type:"animate",getProgress:()=>Ie.getProgress(),getTrigger:ue});let Ie={refresh(){},destroy(){e.classList.remove(u),H.remove(),e.style.animationPlayState="",xe(),Fe(e);},replay(){e.classList.remove(u),e.offsetWidth,e.classList.add(u);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(K){let V=Math.min(1,Math.max(0,K));e.classList.remove(u);for(let ye of S)e.style.setProperty(ye.prop,qt(ye.from,ye.to,V));},getProgress(){let{tStart:K,tEnd:V}=ue();return _(ae(E(),K,V,l))}};return Ie}if(Me())return re();let z=0,f=0,P=0,v=false,$=false,pe=-1,J=0,ve=false,Ce=NaN,We=-1,de=0,we=()=>x?c==="x"?x.scrollLeft:x.scrollTop:c==="x"?window.scrollX:window.scrollY,ne=()=>x?c==="x"?x.clientWidth:x.clientHeight:c==="x"?window.innerWidth:window.innerHeight,B=q===e?S:[],Q=false;function Z(){let u=e.style,y=B.map(se=>u.getPropertyValue(se.prop)),R=u.transition;B.length&&(u.transition="none"),B.forEach(se=>u.setProperty(se.prop,ce.get(se.prop)??""));let H=ot(q,x,c);B.forEach((se,ue)=>u.setProperty(se.prop,y[ue])),B.length&&(e.offsetWidth,u.transition=R);let E=De(H,H.scroll,ne(),k,C);Q&&Math.abs(E.tStart-z)<1&&Math.abs(E.tEnd-f)<1||(Q=true,z=E.tStart,f=E.tEnd);}function G(u){e.style.setProperty(Bt,String(u));for(let y of S)e.style.setProperty(y.prop,qt(y.from,y.to,u));He?.(u);}function ke(u){if(isNaN(Ce)){Ce=u;return}Ce<=0&&u>0?Le?.():Ce>0&&u<=0&&le?.(),Ce<1&&u>=1?N?.():Ce>=1&&u<1&&te?.(),Ce=u;}function O(){if(!v||$)return;let u=performance.now(),y=we(),R=l;if(D!==false){let se=u-de,ue=se>0?Math.abs(y-(We<0?y:We))/se:0;R=l*Math.max(.2,1+ue*(typeof D=="number"?D:1)*.04);}We=y,de=u;let H=f===z?0:(y-z)/(f-z);ke(H);let E=_(ae(y,z,f,R));m&&(pe=Math.max(pe,E),E=pe),J=E,G(E),E>=1&&!ve?(ve=true,Y?.()):E<1&&!m&&(ve=false),P=requestAnimationFrame(O);}Z(),f===z&&ee("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 u=_(ae(we(),z,f,l));m&&u>0&&(pe=u),J=u,G(u);}let M=new IntersectionObserver(u=>{u.forEach(y=>{v=y.isIntersecting,v&&!$?P=requestAnimationFrame(O):cancelAnimationFrame(P);});},{root:x??null}),oe;function X(){clearTimeout(oe),oe=setTimeout(Z,150);}window.addEventListener("resize",X),window.addEventListener("orientationchange",X);let ge=Ve([q],X);return M.observe(e),Re(e,{type:"animate",getProgress:()=>J,getTrigger:()=>({tStart:z,tEnd:f})}),{destroy(){cancelAnimationFrame(P),M.disconnect(),window.removeEventListener("resize",X),window.removeEventListener("orientationchange",X),ge(),clearTimeout(oe),xe(),Fe(e);},replay(){pe=-1,ve=false,J=0,$=false,G(0);},pause(){$=true,cancelAnimationFrame(P);},resume(){$&&($=false,v&&(P=requestAnimationFrame(O)));},seek(u){let y=Math.min(1,Math.max(0,u));J=y,pe=y,$=true,cancelAnimationFrame(P),G(y);},getProgress(){return J},refresh(){Z();}}}var bt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function jt(e,r){if(typeof window>"u")return bt;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return ee("scrollCounter: element not found:",e),bt;let t=n,{from:s=0,to:i,format:l,easing:m="ease-out",trigger:c={},once:p=true,decimals:w,onComplete:D}=r,T=w!==void 0?f=>f.toFixed(w):l??(f=>String(Math.round(f))),me=typeof m=="function"?m:be[m]??be["ease-out"],He=Te(c.start??"top 80%"),Y=Te(c.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=T(i),D?.(),bt;let N=0,te=0,le=false,L=0,_=false,k=false,C=-1,q=0,x=false,S=()=>window.scrollY,fe=()=>window.innerHeight;function I(){let f=t.getBoundingClientRect(),P=De({top:f.top,height:f.height},S(),fe(),He,Y);le&&Math.abs(P.tStart-N)<1&&Math.abs(P.tEnd-te)<1||(le=true,N=P.tStart,te=P.tEnd);}function ce(f){t.textContent=T(s+(i-s)*f),t.style.setProperty("--scroll-draw-progress",String(f));}function xe(){if(!_||k)return;let f=me(ae(S(),N,te,1));p&&(C=Math.max(C,f),f=C),q=f,ce(f),f>=1&&!x?(x=true,D?.()):f<1&&!p&&(x=false),L=requestAnimationFrame(xe);}I();{let f=me(ae(S(),N,te,1));p&&f>0&&(C=f),q=f,ce(f);}let $e=new IntersectionObserver(f=>{f.forEach(P=>{_=P.isIntersecting,_&&!k?L=requestAnimationFrame(xe):cancelAnimationFrame(L);});}),Me;function re(){clearTimeout(Me),Me=setTimeout(I,150);}window.addEventListener("resize",re),window.addEventListener("orientationchange",re);let z=Ve([t],re);return $e.observe(t),Re(t,{type:"counter",getProgress:()=>q,getTrigger:()=>({tStart:N,tEnd:te})}),{destroy(){cancelAnimationFrame(L),$e.disconnect(),window.removeEventListener("resize",re),window.removeEventListener("orientationchange",re),z(),clearTimeout(Me),Fe(t);},replay(){C=-1,x=false,q=0,k=false,ce(0);},pause(){k=true,cancelAnimationFrame(L);},resume(){k&&(k=false,_&&(L=requestAnimationFrame(xe)));},seek(f){let P=Math.min(1,Math.max(0,f));q=P,C=P,k=true,cancelAnimationFrame(L),ce(P);},getProgress(){return q}}}function Ut(e,r){let n=document.createElement("span");n.textContent=r,n.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;user-select:none",e.appendChild(n);}function Jt(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 Tr(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 Yt(e){let r=Jt(e),n=new Map;for(let i of r){let l=i.offsetTop;n.has(l)||n.set(l,[]),n.get(l).push(i);}let t=[],s=Array.from(n.keys()).sort((i,l)=>i-l);for(let i of s){let l=n.get(i),m=document.createElement("span");m.setAttribute("aria-hidden","true"),m.style.display="inline-block",l.forEach((c,p)=>{let w=c.nextElementSibling;m.appendChild(c),p<l.length-1&&w&&w.style.whiteSpace==="pre"&&m.appendChild(w);}),t.push(m);}return e.textContent="",t.forEach((i,l)=>{e.appendChild(i),l<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function xr(e,r,n,t){if(n<=1||t===0)return e;let s=(n-1)*t,i=r*t,l=i+(1-s);return l<=i?e>=i?1:0:Math.min(1,Math.max(0,(e-i)/(l-i)))}function Mr(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 Xt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Qt(e,r={}){if(typeof window>"u")return Xt;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return ee("scrollText: element not found:",e),Xt;let t=n,{split:s="words",stagger:i=.04,easing:l="ease-out",from:m={opacity:0,y:24},trigger:c={},once:p=true,onComplete:w}=r,D=window.matchMedia("(prefers-reduced-motion: reduce)").matches,T=typeof l=="function"?l:be[l]??be["ease-out"],me=Te(c.start??"top 85%"),He=Te(c.end??"top 40%"),Y=t.innerHTML,Le=t.textContent??"",N;s==="chars"?N=Tr(t):s==="lines"?N=Yt(t):N=Jt(t),Ut(t,Le);let te=N.length;function le(v,$){m?.opacity!==void 0&&(v.style.opacity=String(m.opacity+(1-m.opacity)*$));let pe=Mr($,m);pe&&(v.style.transform=pe);}function L(v){t.style.setProperty("--scroll-draw-progress",String(v)),N.forEach(($,pe)=>{let J=T(xr(v,pe,te,i));le($,J);});}if(D)return L(1),w?.(),{destroy(){t.innerHTML=Y;},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};L(0);let _=0,k=0,C=0,q=false,x=false,S=-1,fe=0,I=false,ce=()=>window.scrollY,xe=()=>window.innerHeight;function $e(){let v=t.getBoundingClientRect(),$=De({top:v.top,height:v.height},ce(),xe(),me,He);_=$.tStart,k=$.tEnd;}function Me(){if(!q||x)return;let v=ae(ce(),_,k,1);p&&(S=Math.max(S,v),v=S),fe=v,L(v),v>=1&&!I?(I=true,w?.()):v<1&&!p&&(I=false),C=requestAnimationFrame(Me);}$e();let re=new IntersectionObserver(v=>{v.forEach($=>{q=$.isIntersecting,q&&!x?C=requestAnimationFrame(Me):cancelAnimationFrame(C);});}),z;function f(){clearTimeout(z),z=setTimeout(()=>{if(s==="lines"){let v=fe;t.innerHTML=Y,N=Yt(t),Ut(t,Le),L(v);}$e();},150);}window.addEventListener("resize",f),window.addEventListener("orientationchange",f);let P=Ve([t],f);return re.observe(t),Re(t,{type:"text",getProgress:()=>fe,getTrigger:()=>({tStart:_,tEnd:k})}),{destroy(){cancelAnimationFrame(C),re.disconnect(),window.removeEventListener("resize",f),window.removeEventListener("orientationchange",f),P(),clearTimeout(z),t.innerHTML=Y,Fe(t);},replay(){S=-1,I=false,fe=0,x=false,L(0);},pause(){x=true,cancelAnimationFrame(C);},resume(){x&&(x=false,q&&(C=requestAnimationFrame(Me)));},seek(v){let $=Math.min(1,Math.max(0,v));fe=$,S=$,x=true,cancelAnimationFrame(C),L($);},getProgress(){return fe}}}function Ar(e,r){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let t=typeof e=="string"?document.querySelector(e):e;return t?lt(t,r):(ee("Container not found:",e),n)}function Ze(){return typeof document>"u"?null:document}var wt=new WeakMap,Zt;function ct(e,r,n,t){let s=wt.get(e)??new Map;wt.set(e,s);let i=()=>{let c=n(),p=s.get(r);p&&p.key===c||(p?.inst.destroy(),s.set(r,{inst:t(c),key:c,build:i,users:p?.users??0}));};i(),s.get(r).users++;let l=true;typeof MutationObserver<"u"&&(Zt??(Zt=new MutationObserver(c=>c.forEach(p=>wt.get(p.target)?.forEach(w=>w.build())))),Zt.observe(e,{attributes:true,attributeFilter:["draw","animate","counter","text"].map(c=>`data-scroll-${c}-options`).concat("data-scroll-drawoptions")}));let m=()=>s.get(r)?.inst;return {destroy:()=>{let c=s.get(r);!l||!c||(l=false,!(--c.users>0)&&(c.inst.destroy(),s.delete(r)));},replay:()=>m()?.replay(),pause:()=>m()?.pause(),resume:()=>m()?.resume(),seek:c=>m()?.seek(c),getProgress:()=>m()?.getProgress()??0,refresh:()=>m()?.refresh?.()}}function ut(e,r){try{return e?JSON.parse(e):r}catch{return r}}function Lr(e=Ze()){return e?Array.from(e.querySelectorAll("[data-scroll-draw]")).map(r=>ct(r,"draw",()=>r.dataset.scrollDrawOptions??r.dataset.scrollDrawoptions??"",n=>lt(r,ut(n,{})))):[]}function $r(e=Ze()){return e?Array.from(e.querySelectorAll("[data-scroll-animate]")).map(r=>ct(r,"animate",()=>r.dataset.scrollAnimateOptions??"",n=>Gt(r,ut(n,{props:{}})))):[]}function Cr(e=Ze()){return e?Array.from(e.querySelectorAll("[data-scroll-counter]")).map(r=>ct(r,"counter",()=>r.dataset.scrollCounterOptions??"",n=>{let t=ut(n,{});return !t.to&&t.to!==0&&(ee('initScrollCounter: element missing "to" in options JSON:',r),t.to=0),typeof t.format!="function"&&t.format!==void 0&&(ee('initScrollCounter: "format" must be a function, so it cannot come from JSON; use "decimals":',r),delete t.format),jt(r,t)})):[]}function Pr(e=Ze()){return e?Array.from(e.querySelectorAll("[data-scroll-text]")).map(r=>ct(r,"text",()=>r.dataset.scrollTextOptions??"",n=>Qt(r,ut(n,{})))):[]}function Dn(e=Ze()){return {draw:Lr(e),animate:$r(e),counter:Cr(e),text:Pr(e)}}exports.initAll=Dn;exports.initScrollAnimate=$r;exports.initScrollCounter=Cr;exports.initScrollDraw=Lr;exports.initScrollText=Pr;exports.scrollDraw=Ar;
1
+ 'use strict';function cr({bounces:e=3,decay:t=.5}={}){let r=Math.max(1,Math.round(e)),n=Math.max(.01,Math.min(.99,t)),s=Math.sqrt(n),i=0,a=[];for(let d=0;d<r;d++){let E=Math.pow(s,d);a.push(E),i+=E;}let m=[0],u=0;for(let d=0;d<r;d++)u+=a[d]/i,m.push(u);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let E=0;E<r;E++)if(d<=m[E+1]){let O=(d-m[E])/(m[E+1]-m[E]);if(E===0)return O*(2-O);let x=1-Math.pow(n,E);return x+(1-x)*(2*O-1)*(2*O-1)}return 1}}function ur({amplitude:e=1,period:t=.4}={}){let r=Math.max(1,e),n=Math.max(.1,t),s=r<=1?n/4:n/(2*Math.PI)*Math.asin(1/r);return i=>i<=0?0:i>=1?1:r*Math.pow(2,-10*i)*Math.sin((i-s)*(2*Math.PI)/n)+1}var ue={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:cr(),elastic:ur()};function Pt(e,t,r){return Math.min(r,Math.max(t,e))}function we(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return {element:"top",viewport:t};let[r="top",n="bottom"]=t.split(/\s+/).filter(Boolean);return {element:r,viewport:n}}function Dt(e,t,r,n){switch(n){case "top":return e+r;case "center":return e+r+t/2;case "bottom":return e+r+t;default:return e+r}}function kt(e,t){if(/^\d+(\.\d+)?%$/.test(e))return t*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return t/2;case "bottom":return t;default:return t}}function ne(e,t,r,n){return r===t?0:Pt((e-t)/(r-t)*n,0,1)}function Ce(e,t,r,n,s){let i=Dt(e.top,e.height,t,n.element)-kt(n.viewport,r),a=Dt(e.top,e.height,t,s.element)-kt(s.viewport,r);return {tStart:i,tEnd:a}}function st(e,t,r){let n=e.getBoundingClientRect(),s=r==="x"?n.width:n.height;return t?{top:r==="x"?n.left-t.getBoundingClientRect().left+t.scrollLeft:n.top-t.getBoundingClientRect().top+t.scrollTop,height:s,scroll:0}:{top:r==="x"?n.left:n.top,height:s,scroll:r==="x"?window.scrollX:window.scrollY}}function Be(e){let t=e.tagName.toLowerCase();if(t==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),n=parseFloat(e.getAttribute("height")??"0");return 2*(r+n)}if(t==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function Ot(e){let t=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(t)return [parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)];let r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(r)return [parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)];let n=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return n?[parseInt(n[1]),parseInt(n[2]),parseInt(n[3])]:null}function Ge(e,t,r){let n=Ot(e),s=Ot(t);return !n||!s?e:`rgb(${Math.round(n[0]+(s[0]-n[0])*r)},${Math.round(n[1]+(s[1]-n[1])*r)},${Math.round(n[2]+(s[2]-n[2])*r)})`}var It={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 Xe=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function J(e,...t){Xe&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var mr="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",fr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Rt=33;function pr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function dr(e){let t=[];for(let r=0;r<Rt;r++){let n=r/(Rt-1);t.push(String(Math.round(e(n)*1e5)/1e5));}return `linear(${t.join(",")})`}function it(e){switch(e){case "linear":return "linear";case "ease-in":return mr;case "ease-out":return fr;case "ease-in-out":return pr()?dr(ue["ease-in-out"]):null;default:return null}}var Ft=Symbol.for("svg-scroll-draw.registry");function Ht(){let e=globalThis;return e[Ft]||(e[Ft]=new Map)}function ke(e,t){Ht().set(e,t);}function Oe(e){Ht().delete(e);}var Je,at=new Set,lt=new WeakMap,Ze=new Map,Nt=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function gr(e){let t=new Set;for(let r of e)for(;r&&r!==document.body;r=r.parentElement)for(let n=r;n;n=n.previousElementSibling)t.add(n);return t}function _e(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>t();Je??(Je=new ResizeObserver(s=>{let i=false;for(let{target:a}of s)lt.get(a)!==Nt(a)&&(i=true),lt.set(a,"");i&&at.forEach(a=>a());})),at.add(r);let n=gr(e);return [document.body,document.documentElement].forEach(s=>s&&n.add(s)),n.forEach(s=>{lt.has(s)||lt.set(s,Nt(s)),Ze.set(s,(Ze.get(s)??0)+1),Je.observe(s);}),()=>{at.delete(r)&&(n.forEach(s=>{let i=(Ze.get(s)??1)-1;if(i)return void Ze.set(s,i);Ze.delete(s),Je?.unobserve(s);}),at.size||(Je?.disconnect(),Je=void 0));}}function _t(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let t=window.matchMedia("(prefers-reduced-motion: reduce)"),r=s=>e(!!s.matches);if(typeof t.addEventListener=="function")return t.addEventListener("change",r),()=>t.removeEventListener("change",r);let n=t;return n.addListener?.(r),()=>n.removeListener?.(r)}function ze(e,t){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t(e,true);let r=t(e,false),n=_t(i=>{if(!i)return;n();let a=(r.getProgress?.()??0)>=1;r.destroy(),r=t(a?{...e,onComplete:void 0}:e,true);}),s={};for(let i of Object.keys(r))s[i]=(...a)=>r[i]?.(...a);return s.destroy=()=>{n(),r.destroy();},s}var yr=0;function hr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function zt(e,t){let r="";try{r=getComputedStyle(e).getPropertyValue(t).trim();}catch{}return r||(e.getAttribute(t)??"").trim()}var Vt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function br(e){if(!Xe)return;let t=zt(e,"stroke");if(!t||t==="none"){J("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!Vt.has(r)&&!Vt.has(zt(e,"fill"))&&J("Element has a fill \u2014 it may obscure the stroke animation.",e);}function wr(e,t,r){let n=document.createElement("div");n.setAttribute("data-svg-scroll-draw-debug",""),n.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 s(){let i=r==="x"?window.scrollX:window.scrollY,a=e-i,m=t-i,u=r==="x";n.innerHTML=`
2
+ <div style="position:absolute;${u?`left:${a}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${a}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;${u?`left:${m}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${m}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(n),window.addEventListener("scroll",s,{passive:true}),s(),{el:n,destroy(){window.removeEventListener("scroll",s),n.remove();}}}var Wt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,qt=/[MmLlHhVvCcSsQqTtAaZz]/g;function vr(e,t,r){if(!Xe)return;let n=(e.match(qt)??[]).join("").toUpperCase(),s=(t.match(qt)??[]).join("").toUpperCase(),i=(e.match(Wt)??[]).length,a=(t.match(Wt)??[]).length;if(n!==s){J(`morphTo: command sequence differs (${n||"\u2205"} \u2192 ${s||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,r);return}i!==a&&J(`morphTo: coordinate count differs (${i} \u2192 ${a}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function bt(e,t,r){let n=(t.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),s=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,i=>{let a=parseFloat(i),m=n[s++]??a;return String(+(a+(m-a)*r).toFixed(4))})}function ct(e,t={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:ze(t,(r,n)=>Er(e,r,n))}function Er(e,t,r){let{preset:n,...s}=t,i=n?{...It[n],...s}:s,{selector:a="path, polyline, line, polygon, rect, circle",speed:m=1,fade:u=false,easing:d="linear",trigger:E={},stagger:O=0,direction:x="forward",once:Z=false,debug:Me=false,axis:$="y",scrollContainer:ie,autoReverse:pe=false,delay:D=0,strokeColor:z,strokeWidth:I,fillOpacity:M,waypoints:C,velocityScale:S=false,threshold:R=0,rootMargin:me="0px",repeat:j=0,repeatDelay:oe=0,morphTo:F,clip:de,autoplay:ve=false,duration:ge=1e3,native:U=true,onProgress:p,onStart:L,onComplete:b,onEnter:P,onLeave:ae,onEnterBack:Ee,onLeaveBack:Ve}=i,K=de===true?"left":typeof de=="string"?de:false,Se=typeof d=="function"?d:ue[d]??ue.linear,Qe=we(E.start??"top bottom"),je=we(E.end??"bottom top"),fe=typeof ie=="string"?document.querySelector(ie):ie??null,ee=Array.isArray(z)?z[0]:null,Y=Array.isArray(z)?z[1]:typeof z=="string"?z:null,X=Array.isArray(I)?I[0]:null,q=Array.isArray(I)?I[1]:typeof I=="number"?I:null,se=Array.isArray(M)?M[0]:null,Q=Array.isArray(M)?M[1]:typeof M=="number"?M:null;function Le(o){let c=o*100;switch(K){case "right":return `inset(0 0 0 ${100-c}%)`;case "top":return `inset(0 0 ${100-c}% 0)`;case "bottom":return `inset(${100-c}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-c}% 0 0)`}}let H=K?[]:Array.from(e.querySelectorAll(a)),T=[],le=[],l=0,f=0,Te=O,ye=0,v=false,k=false,V=0,Ie=false,_=-1,Pe=[],Re=-1,te=false,Ae=0,De=0,Fe,ft=null;function Et(){ft?.destroy(),ft=null;}let He=new Set,St=NaN,Ne=true,et=-1,Tt=performance.now(),We=NaN;function Ue(){return fe?$==="x"?fe.scrollLeft:fe.scrollTop:$==="x"?window.scrollX:window.scrollY}function xt(){return fe?$==="x"?fe.clientWidth:fe.clientHeight:$==="x"?window.innerWidth:window.innerHeight}function Mt(){let o=st(e,fe,$);return Ce(o,o.scroll,xt(),Qe,je)}function nr(){let o=f-l,c=H.length-1,y=fe??document.documentElement,B=$==="x"?"Width":"Height";if(Te=O,O>0&&c>0&&o>0){let he=y[`scroll${B}`]-y[`client${B}`]-1-l-o/m;he>=0&&(Te=Math.min(O,he/(c*o)));}ye=f+c*Te*o;}function Lt(){(({tStart:l,tEnd:f}=Mt())),nr(),Me&&Xe&&(Et(),ft=wr(l,f,$));}function pt(o,c=Mt){ke(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:c});let y=o.destroy;return o.destroy=()=>{y.call(o),Oe(e);},o}function or(o,c){if(e.style.setProperty("--scroll-draw-progress",String(o)),K){let y=c==="reverse"?1-o:o;e.style.clipPath=Le(y);return}H.forEach((y,B)=>{y.style.strokeDashoffset=c==="reverse"?`${T[B]*o}`:`${T[B]*(1-o)}`,u&&(y.style.opacity=c==="reverse"?`${1-o}`:`${o}`),ee&&Y?y.style.stroke=Ge(ee,Y,o):Y&&(y.style.stroke=Y),X!==null&&q!==null?y.style.strokeWidth=`${X+(q-X)*o}`:q!==null&&(y.style.strokeWidth=`${q}`),se!==null&&Q!==null?y.style.fillOpacity=`${se+(Q-se)*o}`:Q!==null&&(y.style.fillOpacity=`${Q}`),F&&y.tagName.toLowerCase()==="path"&&le[B]&&y.setAttribute("d",bt(le[B],F,o));});}function tt(){if(e.style.setProperty("--scroll-draw-progress","0"),K){e.style.clipPath=Le(0);return}H.forEach((o,c)=>{o.style.strokeDasharray=`${T[c]}`,o.style.strokeDashoffset=x==="reverse"?"0":`${T[c]}`,u?o.style.opacity=x==="reverse"?"1":"0":o.style.opacity="",ee&&(o.style.stroke=ee),X!==null&&(o.style.strokeWidth=`${X}`),se!==null&&(o.style.fillOpacity=`${se}`),F&&o.tagName.toLowerCase()==="path"&&le[c]&&o.setAttribute("d",le[c]);});}if(H.forEach(o=>{br(o);let c=Be(o);T.push(c);let y=o.tagName.toLowerCase()==="path";y?le.push(o.getAttribute("d")??""):le.push(""),F&&(y?vr(le[le.length-1],F,o):J(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),r?(o.style.strokeDasharray=`${c}`,o.style.strokeDashoffset=x==="reverse"?`${c}`:"0",u&&(o.style.opacity="1"),Y&&(o.style.stroke=Y),q!==null&&(o.style.strokeWidth=`${q}`),Q!==null&&(o.style.fillOpacity=`${Q}`),F&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",F)):(o.style.strokeDasharray=`${c}`,o.style.strokeDashoffset=x==="reverse"?"0":`${c}`,u?o.style.opacity=x==="reverse"?"1":"0":o.style.opacity="",ee&&(o.style.stroke=ee),X!==null&&(o.style.strokeWidth=`${X}`),se!==null&&(o.style.fillOpacity=`${se}`));}),K){if(r)return e.style.clipPath=Le(1),b?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Le(0);}else if(r)return b?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let At=typeof d=="string"?it(d):null;function sr(){return !(U===false||!hr()||!H.length||!At||K||$!=="y"||fe||m!==1||O!==0||Z||pe||S!==false||F||C||j||D>0||p||L||b||P||ae||Ee||Ve||z!=null||I!=null||M!=null||(E.start??"top bottom").trim()!=="top bottom"||(E.end??"bottom top").trim()!=="bottom top")}function ir(){let o=++yr,c=`svg-scroll-draw-${o}`,y=`svg-scroll-draw-host-${o}`,B=`--svg-scroll-draw-${o}`,he=x==="reverse"?"0":"var(--ssd-len)",$e=x==="reverse"?"var(--ssd-len)":"0",xe=`stroke-dashoffset:${he};`,w=`stroke-dashoffset:${$e};`;u&&(xe+=`opacity:${x==="reverse"?1:0};`,w+=`opacity:${x==="reverse"?0:1};`);let A=document.createElement("style");A.setAttribute("data-svg-scroll-draw",""),A.textContent=`@keyframes ${c}{from{${xe}}to{${w}}}.${y}{view-timeline-name:${B};view-timeline-axis:block;}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${At};animation-fill-mode:both;animation-timeline:${B};animation-range:cover 0% cover 100%;}`,document.head.appendChild(A),e.classList.add(y);function re(g,G){g.style.setProperty("--ssd-len",String(T[G])),g.style.strokeDasharray=`${T[G]}`,g.style.strokeDashoffset="",g.style.opacity="",g.style.animationPlayState="",g.classList.add(c);}H.forEach(re);let h=false,N=-1;function W(){if(N>=0)return N;let g=e.getBoundingClientRect(),{tStart:G,tEnd:be}=Ce({top:g.top,height:g.height},Ue(),xt(),Qe,je);return Se(ne(Ue(),G,be,m))}return {destroy(){e.classList.remove(y),H.forEach(g=>{g.classList.remove(c),g.style.removeProperty("--ssd-len"),g.style.animationPlayState="";}),A.remove();},replay(){h=false,N=-1,H.forEach(re);},pause(){h=true,H.forEach(g=>{g.style.animationPlayState="paused";});},resume(){h&&(h=false,H.forEach(g=>{g.style.animationPlayState="running";}));},seek(g){let G=Math.min(1,Math.max(0,g));N=G,h=true,H.forEach((be,ce)=>{be.classList.remove(c),be.style.strokeDashoffset=x==="reverse"?`${T[ce]*G}`:`${T[ce]*(1-G)}`,u&&(be.style.opacity=x==="reverse"?`${1-G}`:`${G}`);});},getProgress(){return W()},refresh(){H.forEach((g,G)=>{T[G]=Be(g),g.style.setProperty("--ssd-len",String(T[G])),g.style.strokeDasharray=`${T[G]}`;});}}}if(sr())return pt(ir());function ar(){let o=Math.max(1,ge),c=0,y=0,B=false;function he(h){let N=true;if(K){let W=Math.min(1,Math.max(0,h/o)),g=Se(W);Ae=g,e.style.setProperty("--scroll-draw-progress",String(g)),e.style.clipPath=Le(x==="reverse"?1-g:g),p?.(g),W<1&&(N=false);}else H.forEach((W,g)=>{let G=g*O*o,be=Math.min(1,Math.max(0,(h-G)/o)),ce=Se(be);W.style.strokeDashoffset=x==="reverse"?`${T[g]*ce}`:`${T[g]*(1-ce)}`,u&&(W.style.opacity=x==="reverse"?`${1-ce}`:`${ce}`),ee&&Y?W.style.stroke=Ge(ee,Y,ce):Y&&(W.style.stroke=Y),X!==null&&q!==null?W.style.strokeWidth=`${X+(q-X)*ce}`:q!==null&&(W.style.strokeWidth=`${q}`),se!==null&&Q!==null?W.style.fillOpacity=`${se+(Q-se)*ce}`:Q!==null&&(W.style.fillOpacity=`${Q}`),F&&W.tagName.toLowerCase()==="path"&&le[g]&&W.setAttribute("d",bt(le[g],F,ce)),g===0&&(Ae=ce,p?.(ce),e.style.setProperty("--scroll-draw-progress",String(ce))),be<1&&(N=false);});if(C){let W=Math.min(1,Math.max(0,h/o)),g=Se(W);for(let G in C){let be=parseFloat(G);g>=be&&!He.has(be)&&(He.add(be),C[G]?.());}}return N}function $e(h){if(te)return;let N=h-c;k||(k=true,L?.());let W=he(N);if(W&&!v){v=true,he(o*(1+Math.max(0,H.length-1)*O)),b?.(),De<(j==="infinite"?1/0:j??0)&&(De++,Fe=setTimeout(()=>{c=performance.now(),k=false,v=false,He.clear(),tt(),V=requestAnimationFrame($e);},oe));return}W||(V=requestAnimationFrame($e));}function xe(){cancelAnimationFrame(V),clearTimeout(Fe),c=performance.now(),y=0,te=false,k=false,v=false,De=0,B=true,Ae=0,He.clear(),tt(),V=requestAnimationFrame($e);}let w=new IntersectionObserver(h=>{h.forEach(N=>{N.isIntersecting&&!(Z&&v)?xe():!N.isIntersecting&&!Z&&!v&&(cancelAnimationFrame(V),clearTimeout(Fe),B=false);});},{root:fe??null,threshold:R,rootMargin:me}),A;function re(){clearTimeout(A),A=setTimeout(()=>{H.forEach((h,N)=>{T[N]=Be(h),h.style.strokeDasharray=`${T[N]}`;});},150);}return window.addEventListener("resize",re),window.addEventListener("orientationchange",re),D>0?setTimeout(()=>w.observe(e),D):w.observe(e),{destroy(){cancelAnimationFrame(V),clearTimeout(Fe),w.disconnect(),window.removeEventListener("resize",re),window.removeEventListener("orientationchange",re),clearTimeout(A);},replay(){De=0,xe();},pause(){te||!B||(te=true,y=performance.now()-c,cancelAnimationFrame(V));},resume(){te&&(te=false,B=true,c=performance.now()-y,V=requestAnimationFrame($e));},seek(h){let N=Math.min(1,Math.max(0,h));Ae=N,te=true,y=N*o,c=performance.now()-y,cancelAnimationFrame(V),he(y);},getProgress(){return Ae},refresh(){clearTimeout(A),H.forEach((h,N)=>{T[N]=Be(h),h.style.strokeDasharray=`${T[N]}`;});}}}if(ve)return pt(ar());Lt();function $t(){if(te||!qe)return;let o=performance.now(),c=Ue();if(!Ne&&S===false&&c===St){gt(c);return}Ne=false,St=c;let y=m;if(S!==false){let w=o-Tt,A=w>0?Math.abs(c-(et<0?c:et))/w:0;y=m*Math.max(.2,1+A*(typeof S=="number"?S:1)*.04);}et=c,Tt=o;let B=pe?Re===-1||c>=Re?"forward":"reverse":x;Re=c;let he=f-l,$e=true,xe=he===0?0:(c-l)/he;if(isNaN(We)||(We<=0&&xe>0?P?.():We>0&&xe<=0&&Ve?.(),We<1&&xe>=1?ae?.():We>=1&&xe<1&&Ee?.()),We=xe,K){let w=Se(ne(c,l,f,y));Z&&!pe&&(_=Math.max(_,w),w=_),Ae=w,e.style.setProperty("--scroll-draw-progress",String(w));let A=B==="reverse"?1-w:w;e.style.clipPath=Le(A),p?.(w),!k&&ne(c,l,f,y)>0&&(k=true,L?.()),w>=1&&!v?(v=true,b?.(),De<(j==="infinite"?1/0:j??0)&&(De++,Fe=setTimeout(()=>{_=-1,k=false,v=false,e.style.clipPath=Le(0);},oe))):w<1&&!Z&&(v=false),gt(c);return}if(H.forEach((w,A)=>{let re=A*Te*he,h=Se(ne(c,l+re,f+re,y));Z&&!pe&&(h=Pe[A]=Math.max(Pe[A]??_,h)),w.style.strokeDashoffset=B==="reverse"?`${T[A]*h}`:`${T[A]*(1-h)}`,u&&(w.style.opacity=B==="reverse"?`${1-h}`:`${h}`),ee&&Y?w.style.stroke=Ge(ee,Y,h):Y&&(w.style.stroke=Y),X!==null&&q!==null?w.style.strokeWidth=`${X+(q-X)*h}`:q!==null&&(w.style.strokeWidth=`${q}`),se!==null&&Q!==null?w.style.fillOpacity=`${se+(Q-se)*h}`:Q!==null&&(w.style.fillOpacity=`${Q}`),F&&w.tagName.toLowerCase()==="path"&&le[A]&&w.setAttribute("d",bt(le[A],F,h)),A===0&&(Ae=h,p?.(h),e.style.setProperty("--scroll-draw-progress",String(h))),h<1&&($e=false);}),C){let w=Se(ne(c,l,f,y));for(let A in C){let re=parseFloat(A);w>=re&&!He.has(re)&&(He.add(re),C[A]?.());}}!k&&ne(c,l,f,y)>0&&(k=true,L?.()),$e&&!v?(v=true,b?.(),De<(j==="infinite"?1/0:j??0)&&(De++,Fe=setTimeout(()=>{_=-1,Pe=[],k=false,v=false,He.clear(),tt(),Ne=true;},oe))):!$e&&!Z&&(v=false),gt(c);}function dt(o){return o>=f&&o<ye}function gt(o){Ie||dt(o)?V=requestAnimationFrame($t):qe=false;}function yt(){return Ie||dt(Ue())}let qe=false;function rt(){qe||(qe=true,V=requestAnimationFrame(function(){$t();}));}function nt(){qe=false,cancelAnimationFrame(V);}let ht=new IntersectionObserver(o=>{o.forEach(c=>{Ie=c.isIntersecting,Ie&&!te?(Ne=true,rt()):qe&&!te&&dt(Ue())||nt();});},{root:fe??null,threshold:R,rootMargin:me});function Ct(){H.forEach((o,c)=>{T[c]=Be(o),o.style.strokeDasharray=`${T[c]}`;}),Lt(),Ne=true;}let ot;function Ye(){clearTimeout(ot),ot=setTimeout(Ct,150);}window.addEventListener("resize",Ye),window.addEventListener("orientationchange",Ye);let lr=_e([e],Ye);return D>0?setTimeout(()=>ht.observe(e),D):ht.observe(e),pt({destroy(){cancelAnimationFrame(V),clearTimeout(Fe),nt(),ht.disconnect(),lr(),window.removeEventListener("resize",Ye),window.removeEventListener("orientationchange",Ye),clearTimeout(ot),Et();},replay(){_=-1,Pe=[],Re=-1,et=-1,k=false,v=false,De=0,te=false,Ae=0,He.clear(),clearTimeout(Fe),tt(),Ne=true,yt()&&rt();},pause(){te=true,nt();},resume(){te&&(te=false,Ne=true,yt()&&rt());},seek(o){let c=Math.min(1,Math.max(0,o));Ae=c,_=c,Pe=[],te=true,nt(),or(c,x),Ne=true;},getProgress(){return Ae},refresh(){clearTimeout(ot),Ct(),yt()&&!te&&rt();}},()=>({tStart:l,tEnd:f}))}function Sr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Bt(e){let t=[],r=/([\w]+)\(([^)]*)\)/g,n;for(;(n=r.exec(e))!==null;){let s=[],i=[],a=n[2].trim();if(a)for(let m of a.split(/[\s,]+/)){let u=m.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(u?parseFloat(u[1]):0),i.push(u?u[2]:"");}t.push({fn:n[1],nums:s,units:i});}return t}function Tr(e,t,r){let n=Bt(e),s=Bt(t);return n.length===0||n.length!==s.length?r<1?e:t:n.map((i,a)=>{let m=s[a];return i.fn!==m.fn||i.nums.length!==m.nums.length?r<1?`${i.fn}(${i.nums.map((u,d)=>`${u}${i.units[d]}`).join(", ")})`:`${m.fn}(${m.nums.map((u,d)=>`${u}${m.units[d]}`).join(", ")})`:`${i.fn}(${i.nums.map((u,d)=>`${u+(m.nums[d]-u)*r}${i.units[d]}`).join(", ")})`}).join(" ")}function Gt(e,t,r){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*r);let n=String(e),s=String(t);if(Sr(n))return Ge(n,s,r);if(n.includes("("))return Tr(n,s,r);let i=n.match(/^([-+]?[\d.]+)(.*)$/),a=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&a){let m=parseFloat(i[1]),u=parseFloat(a[1]);return `${m+(u-m)*r}${i[2]||a[2]}`}return r<1?n:s}function xr(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var Mr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Lr=0,Qt="--scroll-draw-progress";function Ar(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var Ut={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Yt(e,t){return typeof window>"u"?Ut:t.respectReducedMotion===false?jt(e,t,false):ze(t,(r,n)=>jt(e,r,n))}function jt(e,t,r){let{props:n,trigger:s={},easing:i="ease-out",speed:a=1,once:m=false,axis:u="y",scrollContainer:d,native:E=true,velocityScale:O=false,triggerElement:x,onProgress:Z,onComplete:Me,onEnter:$,onLeave:ie,onEnterBack:pe,onLeaveBack:D}=t,z=typeof i=="function"?i:ue[i]??ue["ease-out"],I=we(s.start??"top bottom"),M=we(s.end??"bottom top"),C=x??e,S=typeof d=="string"?document.querySelector(d):d??null,R=Object.entries(n).map(([l,f])=>({prop:xr(l),from:Array.isArray(f)?f[0]:"",to:Array.isArray(f)?f[1]:f}));function me(){let l=window.getComputedStyle(e);for(let f of R)f.from===""&&(f.from=l.getPropertyValue(f.prop).trim()||"0");}function j(){for(let l of R)e.style.setProperty(l.prop,String(l.to));}let oe=new Map;for(let l of [...R.map(f=>f.prop),Qt])oe.set(l,e.style.getPropertyValue(l));function F(){for(let[l,f]of oe)f?e.style.setProperty(l,f):e.style.removeProperty(l);}if(r)return j(),Me?.(),{...Ut,destroy:F,getProgress:()=>1};me();let de=typeof i=="string"?it(i):null;function ve(){if(!E||!Ar()||!de||u!=="y"||S||C!==e||m||a!==1||Z||Me||$||ie||pe||D||O!==false||(s.start??"top bottom").trim()!=="top bottom"||(s.end??"bottom top").trim()!=="bottom top")return false;for(let l of R)if(!Mr.has(l.prop))return false;return true}function ge(){let l=`ssd-a-${++Lr}`,f=R.map(_=>`${_.prop}:${_.from}`).join(";"),Te=R.map(_=>`${_.prop}:${_.to}`).join(";"),ye=document.createElement("style");ye.setAttribute("data-ssd-animate",""),ye.textContent=`@keyframes ${l}{from{${f}}to{${Te}}}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${de};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(ye),e.classList.add(l);let v=()=>u==="x"?window.scrollX:window.scrollY,k=()=>u==="x"?window.innerWidth:window.innerHeight,V=()=>{let _=e.getBoundingClientRect();return Ce({top:_.top,height:_.height},v(),k(),I,M)};ke(e,{type:"animate",getProgress:()=>Ie.getProgress(),getTrigger:V});let Ie={refresh(){},destroy(){e.classList.remove(l),ye.remove(),e.style.animationPlayState="",F(),Oe(e);},replay(){e.classList.remove(l),e.offsetWidth,e.classList.add(l);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(_){let Pe=Math.min(1,Math.max(0,_));e.classList.remove(l);for(let Re of R)e.style.setProperty(Re.prop,Gt(Re.from,Re.to,Pe));},getProgress(){let{tStart:_,tEnd:Pe}=V();return z(ne(v(),_,Pe,a))}};return Ie}if(ve())return ge();let U=0,p=0,L=0,b=false,P=false,ae=-1,Ee=0,Ve=false,K=NaN,Se=-1,Qe=0,je=()=>S?u==="x"?S.scrollLeft:S.scrollTop:u==="x"?window.scrollX:window.scrollY,fe=()=>S?u==="x"?S.clientWidth:S.clientHeight:u==="x"?window.innerWidth:window.innerHeight,ee=C===e?R:[],Y=false;function X(){let l=e.style,f=ee.map(k=>l.getPropertyValue(k.prop)),Te=l.transition;ee.length&&(l.transition="none"),ee.forEach(k=>l.setProperty(k.prop,oe.get(k.prop)??""));let ye=st(C,S,u);ee.forEach((k,V)=>l.setProperty(k.prop,f[V])),ee.length&&(e.offsetWidth,l.transition=Te);let v=Ce(ye,ye.scroll,fe(),I,M);Y&&Math.abs(v.tStart-U)<1&&Math.abs(v.tEnd-p)<1||(Y=true,U=v.tStart,p=v.tEnd);}function q(l){e.style.setProperty(Qt,String(l));for(let f of R)e.style.setProperty(f.prop,Gt(f.from,f.to,l));Z?.(l);}function se(l){if(isNaN(K)){K=l;return}K<=0&&l>0?$?.():K>0&&l<=0&&D?.(),K<1&&l>=1?ie?.():K>=1&&l<1&&pe?.(),K=l;}function Q(){if(!b||P)return;let l=performance.now(),f=je(),Te=a;if(O!==false){let k=l-Qe,V=k>0?Math.abs(f-(Se<0?f:Se))/k:0;Te=a*Math.max(.2,1+V*(typeof O=="number"?O:1)*.04);}Se=f,Qe=l;let ye=p===U?0:(f-U)/(p-U);se(ye);let v=z(ne(f,U,p,Te));m&&(ae=Math.max(ae,v),v=ae),Ee=v,q(v),v>=1&&!Ve?(Ve=true,Me?.()):v<1&&!m&&(Ve=false),L=requestAnimationFrame(Q);}X(),p===U&&J("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 l=z(ne(je(),U,p,a));m&&l>0&&(ae=l),Ee=l,q(l);}let Le=new IntersectionObserver(l=>{l.forEach(f=>{b=f.isIntersecting,b&&!P?L=requestAnimationFrame(Q):cancelAnimationFrame(L);});},{root:S??null}),H;function T(){clearTimeout(H),H=setTimeout(X,150);}window.addEventListener("resize",T),window.addEventListener("orientationchange",T);let le=_e([C],T);return Le.observe(e),ke(e,{type:"animate",getProgress:()=>Ee,getTrigger:()=>({tStart:U,tEnd:p})}),{destroy(){cancelAnimationFrame(L),Le.disconnect(),window.removeEventListener("resize",T),window.removeEventListener("orientationchange",T),le(),clearTimeout(H),F(),Oe(e);},replay(){ae=-1,Ve=false,Ee=0,P=false,q(0);},pause(){P=true,cancelAnimationFrame(L);},resume(){P&&(P=false,b&&(L=requestAnimationFrame(Q)));},seek(l){let f=Math.min(1,Math.max(0,l));Ee=f,ae=f,P=true,cancelAnimationFrame(L),q(f);},getProgress(){return Ee},refresh(){X();}}}var wt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Xt(e,t){if(typeof window>"u")return wt;let r=typeof e=="string"?document.querySelector(e):e;return r?ze(t,(n,s)=>$r(r,n,s)):(J("scrollCounter: element not found:",e),wt)}function $r(e,t,r){let{from:n=0,to:s,format:i,easing:a="ease-out",trigger:m={},once:u=true,decimals:d,onComplete:E}=t,O=d!==void 0?p=>p.toFixed(d):i??(p=>String(Math.round(p))),x=typeof a=="function"?a:ue[a]??ue["ease-out"],Z=we(m.start??"top 80%"),Me=we(m.end??"top 20%");if(r)return e.textContent=O(s),E?.(),{...wt,getProgress:()=>1};let $=0,ie=0,pe=false,D=0,z=false,I=false,M=-1,C=0,S=false,R=()=>window.scrollY,me=()=>window.innerHeight;function j(){let p=e.getBoundingClientRect(),L=Ce({top:p.top,height:p.height},R(),me(),Z,Me);pe&&Math.abs(L.tStart-$)<1&&Math.abs(L.tEnd-ie)<1||(pe=true,$=L.tStart,ie=L.tEnd);}function oe(p){e.textContent=O(n+(s-n)*p),e.style.setProperty("--scroll-draw-progress",String(p));}function F(){if(!z||I)return;let p=x(ne(R(),$,ie,1));u&&(M=Math.max(M,p),p=M),C=p,oe(p),p>=1&&!S?(S=true,E?.()):p<1&&!u&&(S=false),D=requestAnimationFrame(F);}j();{let p=x(ne(R(),$,ie,1));u&&p>0&&(M=p),C=p,oe(p);}let de=new IntersectionObserver(p=>{p.forEach(L=>{z=L.isIntersecting,z&&!I?D=requestAnimationFrame(F):cancelAnimationFrame(D);});}),ve;function ge(){clearTimeout(ve),ve=setTimeout(j,150);}window.addEventListener("resize",ge),window.addEventListener("orientationchange",ge);let U=_e([e],ge);return de.observe(e),ke(e,{type:"counter",getProgress:()=>C,getTrigger:()=>({tStart:$,tEnd:ie})}),{destroy(){cancelAnimationFrame(D),de.disconnect(),window.removeEventListener("resize",ge),window.removeEventListener("orientationchange",ge),U(),clearTimeout(ve),Oe(e);},replay(){M=-1,S=false,C=0,I=false,oe(0);},pause(){I=true,cancelAnimationFrame(D);},resume(){I&&(I=false,z&&(D=requestAnimationFrame(F)));},seek(p){let L=Math.min(1,Math.max(0,p));C=L,M=L,I=true,cancelAnimationFrame(D),oe(L);},getProgress(){return C}}}function Jt(e,t){let r=document.createElement("span");r.textContent=t,r.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;user-select:none",e.appendChild(r);}function er(e){let t=e.textContent??"";return e.textContent="",t.split(/(\s+)/).filter(Boolean).map(r=>{let n=document.createElement("span");return n.setAttribute("aria-hidden","true"),/^\s+$/.test(r)?(n.textContent=r,n.style.whiteSpace="pre"):(n.textContent=r,n.style.display="inline-block"),e.appendChild(n),/^\s+$/.test(r)?null:n}).filter(r=>r!==null)}function Cr(e){let t=e.textContent??"";return e.textContent="",t.split("").map(r=>{let n=document.createElement("span");return n.setAttribute("aria-hidden","true"),n.textContent=r,r===" "?n.style.whiteSpace="pre":n.style.display="inline-block",e.appendChild(n),r===" "?null:n}).filter(r=>r!==null)}function Zt(e){let t=er(e),r=new Map;for(let i of t){let a=i.offsetTop;r.has(a)||r.set(a,[]),r.get(a).push(i);}let n=[],s=Array.from(r.keys()).sort((i,a)=>i-a);for(let i of s){let a=r.get(i),m=document.createElement("span");m.setAttribute("aria-hidden","true"),m.style.display="inline-block",a.forEach((u,d)=>{let E=u.nextElementSibling;m.appendChild(u),d<a.length-1&&E&&E.style.whiteSpace==="pre"&&m.appendChild(E);}),n.push(m);}return e.textContent="",n.forEach((i,a)=>{e.appendChild(i),a<n.length-1&&e.appendChild(document.createTextNode(" "));}),n}function Pr(e,t,r,n){if(r<=1||n===0)return e;let s=(r-1)*n,i=t*n,a=i+(1-s);return a<=i?e>=i?1:0:Math.min(1,Math.max(0,(e-i)/(a-i)))}function Dr(e,t){let r=[];if(t?.y!==void 0&&r.push(`translateY(${t.y*(1-e)}px)`),t?.x!==void 0&&r.push(`translateX(${t.x*(1-e)}px)`),t?.rotate!==void 0&&r.push(`rotate(${t.rotate*(1-e)}deg)`),t?.scale!==void 0){let n=t.scale+(1-t.scale)*e;r.push(`scale(${n})`);}return r.join(" ")||""}var Kt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function tr(e,t={}){if(typeof window>"u")return Kt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return J("scrollText: element not found:",e),Kt;let n=r;return ze(t,(s,i)=>kr(n,s,i))}function kr(e,t,r){let{split:n="words",stagger:s=.04,easing:i="ease-out",from:a={opacity:0,y:24},trigger:m={},once:u=true,onComplete:d}=t,E=typeof i=="function"?i:ue[i]??ue["ease-out"],O=we(m.start??"top 85%"),x=we(m.end??"top 40%"),Z=e.innerHTML,Me=e.textContent??"",$;n==="chars"?$=Cr(e):n==="lines"?$=Zt(e):$=er(e),Jt(e,Me);let ie=$.length;function pe(b,P){a?.opacity!==void 0&&(b.style.opacity=String(a.opacity+(1-a.opacity)*P));let ae=Dr(P,a);ae&&(b.style.transform=ae);}function D(b){e.style.setProperty("--scroll-draw-progress",String(b)),$.forEach((P,ae)=>{let Ee=E(Pr(b,ae,ie,s));pe(P,Ee);});}if(r)return D(1),d?.(),{destroy(){e.innerHTML=Z;},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};D(0);let z=0,I=0,M=0,C=false,S=false,R=-1,me=0,j=false,oe=()=>window.scrollY,F=()=>window.innerHeight;function de(){let b=e.getBoundingClientRect(),P=Ce({top:b.top,height:b.height},oe(),F(),O,x);z=P.tStart,I=P.tEnd;}function ve(){if(!C||S)return;let b=ne(oe(),z,I,1);u&&(R=Math.max(R,b),b=R),me=b,D(b),b>=1&&!j?(j=true,d?.()):b<1&&!u&&(j=false),M=requestAnimationFrame(ve);}de();let ge=new IntersectionObserver(b=>{b.forEach(P=>{C=P.isIntersecting,C&&!S?M=requestAnimationFrame(ve):cancelAnimationFrame(M);});}),U;function p(){clearTimeout(U),U=setTimeout(()=>{if(n==="lines"){let b=me;e.innerHTML=Z,$=Zt(e),Jt(e,Me),D(b);}de();},150);}window.addEventListener("resize",p),window.addEventListener("orientationchange",p);let L=_e([e],p);return ge.observe(e),ke(e,{type:"text",getProgress:()=>me,getTrigger:()=>({tStart:z,tEnd:I})}),{destroy(){cancelAnimationFrame(M),ge.disconnect(),window.removeEventListener("resize",p),window.removeEventListener("orientationchange",p),L(),clearTimeout(U),e.innerHTML=Z,Oe(e);},replay(){R=-1,j=false,me=0,S=false,D(0);},pause(){S=true,cancelAnimationFrame(M);},resume(){S&&(S=false,C&&(M=requestAnimationFrame(ve)));},seek(b){let P=Math.min(1,Math.max(0,b));me=P,R=P,S=true,cancelAnimationFrame(M),D(P);},getProgress(){return me}}}function Or(e,t){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let n=typeof e=="string"?document.querySelector(e):e;return n?ct(n,t):(J("Container not found:",e),r)}function Ke(){return typeof document>"u"?null:document}var vt=new WeakMap,rr;function ut(e,t,r,n){let s=vt.get(e)??new Map;vt.set(e,s);let i=()=>{let u=r(),d=s.get(t);d&&d.key===u||(d?.inst.destroy(),s.set(t,{inst:n(u),key:u,build:i,users:d?.users??0}));};i(),s.get(t).users++;let a=true;typeof MutationObserver<"u"&&(rr??(rr=new MutationObserver(u=>u.forEach(d=>vt.get(d.target)?.forEach(E=>E.build())))),rr.observe(e,{attributes:true,attributeFilter:["draw","animate","counter","text"].map(u=>`data-scroll-${u}-options`).concat("data-scroll-drawoptions")}));let m=()=>s.get(t)?.inst;return {destroy:()=>{let u=s.get(t);!a||!u||(a=false,!(--u.users>0)&&(u.inst.destroy(),s.delete(t)));},replay:()=>m()?.replay(),pause:()=>m()?.pause(),resume:()=>m()?.resume(),seek:u=>m()?.seek(u),getProgress:()=>m()?.getProgress()??0,refresh:()=>m()?.refresh?.()}}function mt(e,t){try{return e?JSON.parse(e):t}catch{return t}}function Ir(e=Ke()){return e?Array.from(e.querySelectorAll("[data-scroll-draw]")).map(t=>ut(t,"draw",()=>t.dataset.scrollDrawOptions??t.dataset.scrollDrawoptions??"",r=>ct(t,mt(r,{})))):[]}function Rr(e=Ke()){return e?Array.from(e.querySelectorAll("[data-scroll-animate]")).map(t=>ut(t,"animate",()=>t.dataset.scrollAnimateOptions??"",r=>Yt(t,mt(r,{props:{}})))):[]}function Fr(e=Ke()){return e?Array.from(e.querySelectorAll("[data-scroll-counter]")).map(t=>ut(t,"counter",()=>t.dataset.scrollCounterOptions??"",r=>{let n=mt(r,{});return !n.to&&n.to!==0&&(J('initScrollCounter: element missing "to" in options JSON:',t),n.to=0),typeof n.format!="function"&&n.format!==void 0&&(J('initScrollCounter: "format" must be a function, so it cannot come from JSON; use "decimals":',t),delete n.format),Xt(t,n)})):[]}function Hr(e=Ke()){return e?Array.from(e.querySelectorAll("[data-scroll-text]")).map(t=>ut(t,"text",()=>t.dataset.scrollTextOptions??"",r=>tr(t,mt(r,{})))):[]}function Gn(e=Ke()){return {draw:Ir(e),animate:Rr(e),counter:Fr(e),text:Hr(e)}}exports.initAll=Gn;exports.initScrollAnimate=Rr;exports.initScrollCounter=Fr;exports.initScrollDraw=Ir;exports.initScrollText=Hr;exports.scrollDraw=Or;
@@ -1 +1 @@
1
- export{a as scrollDraw}from'../chunk-SMRTRZSD.mjs';import {a as a$2}from'../chunk-426RAN5I.mjs';import {a as a$1}from'../chunk-KHQ7OGQK.mjs';import {a}from'../chunk-BFX2CSQ3.mjs';import {b}from'../chunk-ENACACPZ.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import {b as b$1}from'../chunk-LFSU6LR3.mjs';function i(){return typeof document>"u"?null:document}var p=new WeakMap,g;function c(r,t,n,o){let l=p.get(r)??new Map;p.set(r,l);let f=()=>{let e=n(),s=l.get(t);s&&s.key===e||(s?.inst.destroy(),l.set(t,{inst:o(e),key:e,build:f,users:s?.users??0}));};f(),l.get(t).users++;let S=true;typeof MutationObserver<"u"&&(g??(g=new MutationObserver(e=>e.forEach(s=>p.get(s.target)?.forEach(O=>O.build())))),g.observe(r,{attributes:true,attributeFilter:["draw","animate","counter","text"].map(e=>`data-scroll-${e}-options`).concat("data-scroll-drawoptions")}));let a=()=>l.get(t)?.inst;return {destroy:()=>{let e=l.get(t);!S||!e||(S=false,!(--e.users>0)&&(e.inst.destroy(),l.delete(t)));},replay:()=>a()?.replay(),pause:()=>a()?.pause(),resume:()=>a()?.resume(),seek:e=>a()?.seek(e),getProgress:()=>a()?.getProgress()??0,refresh:()=>a()?.refresh?.()}}function u(r,t){try{return r?JSON.parse(r):t}catch{return t}}function E(r=i()){return r?Array.from(r.querySelectorAll("[data-scroll-draw]")).map(t=>c(t,"draw",()=>t.dataset.scrollDrawOptions??t.dataset.scrollDrawoptions??"",n=>b(t,u(n,{})))):[]}function A(r=i()){return r?Array.from(r.querySelectorAll("[data-scroll-animate]")).map(t=>c(t,"animate",()=>t.dataset.scrollAnimateOptions??"",n=>a(t,u(n,{props:{}})))):[]}function I(r=i()){return r?Array.from(r.querySelectorAll("[data-scroll-counter]")).map(t=>c(t,"counter",()=>t.dataset.scrollCounterOptions??"",n=>{let o=u(n,{});return !o.to&&o.to!==0&&(b$1('initScrollCounter: element missing "to" in options JSON:',t),o.to=0),typeof o.format!="function"&&o.format!==void 0&&(b$1('initScrollCounter: "format" must be a function, so it cannot come from JSON; use "decimals":',t),delete o.format),a$1(t,o)})):[]}function M(r=i()){return r?Array.from(r.querySelectorAll("[data-scroll-text]")).map(t=>c(t,"text",()=>t.dataset.scrollTextOptions??"",n=>a$2(t,u(n,{})))):[]}function H(r=i()){return {draw:E(r),animate:A(r),counter:I(r),text:M(r)}}export{H as initAll,A as initScrollAnimate,I as initScrollCounter,E as initScrollDraw,M as initScrollText};
1
+ export{a as scrollDraw}from'../chunk-OTDD2ROH.mjs';import {a as a$2}from'../chunk-DY5JCXVR.mjs';import {a as a$1}from'../chunk-WXUOF4NM.mjs';import {a}from'../chunk-LTCJVVSC.mjs';import {b}from'../chunk-HX4SP5WN.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import {b as b$1}from'../chunk-LFSU6LR3.mjs';function i(){return typeof document>"u"?null:document}var p=new WeakMap,g;function c(r,t,n,o){let l=p.get(r)??new Map;p.set(r,l);let f=()=>{let e=n(),s=l.get(t);s&&s.key===e||(s?.inst.destroy(),l.set(t,{inst:o(e),key:e,build:f,users:s?.users??0}));};f(),l.get(t).users++;let S=true;typeof MutationObserver<"u"&&(g??(g=new MutationObserver(e=>e.forEach(s=>p.get(s.target)?.forEach(O=>O.build())))),g.observe(r,{attributes:true,attributeFilter:["draw","animate","counter","text"].map(e=>`data-scroll-${e}-options`).concat("data-scroll-drawoptions")}));let a=()=>l.get(t)?.inst;return {destroy:()=>{let e=l.get(t);!S||!e||(S=false,!(--e.users>0)&&(e.inst.destroy(),l.delete(t)));},replay:()=>a()?.replay(),pause:()=>a()?.pause(),resume:()=>a()?.resume(),seek:e=>a()?.seek(e),getProgress:()=>a()?.getProgress()??0,refresh:()=>a()?.refresh?.()}}function u(r,t){try{return r?JSON.parse(r):t}catch{return t}}function E(r=i()){return r?Array.from(r.querySelectorAll("[data-scroll-draw]")).map(t=>c(t,"draw",()=>t.dataset.scrollDrawOptions??t.dataset.scrollDrawoptions??"",n=>b(t,u(n,{})))):[]}function A(r=i()){return r?Array.from(r.querySelectorAll("[data-scroll-animate]")).map(t=>c(t,"animate",()=>t.dataset.scrollAnimateOptions??"",n=>a(t,u(n,{props:{}})))):[]}function I(r=i()){return r?Array.from(r.querySelectorAll("[data-scroll-counter]")).map(t=>c(t,"counter",()=>t.dataset.scrollCounterOptions??"",n=>{let o=u(n,{});return !o.to&&o.to!==0&&(b$1('initScrollCounter: element missing "to" in options JSON:',t),o.to=0),typeof o.format!="function"&&o.format!==void 0&&(b$1('initScrollCounter: "format" must be a function, so it cannot come from JSON; use "decimals":',t),delete o.format),a$1(t,o)})):[]}function M(r=i()){return r?Array.from(r.querySelectorAll("[data-scroll-text]")).map(t=>c(t,"text",()=>t.dataset.scrollTextOptions??"",n=>a$2(t,u(n,{})))):[]}function H(r=i()){return {draw:E(r),animate:A(r),counter:I(r),text:M(r)}}export{H as initAll,A as initScrollAnimate,I as initScrollCounter,E as initScrollDraw,M as initScrollText};