svg-scroll-draw 2.18.0 → 2.19.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 (97) hide show
  1. package/README.md +10 -10
  2. package/dist/angular/index.cjs +3 -3
  3. package/dist/angular/index.d.mts +3 -3
  4. package/dist/angular/index.d.ts +3 -3
  5. package/dist/angular/index.mjs +1 -1
  6. package/dist/astro/index.cjs +3 -3
  7. package/dist/astro/index.d.mts +6 -5
  8. package/dist/astro/index.d.ts +6 -5
  9. package/dist/astro/index.mjs +1 -1
  10. package/dist/cdn/svg-scroll-draw.dev.global.js +133 -31
  11. package/dist/cdn/svg-scroll-draw.global.js +3 -3
  12. package/dist/chunk-7SBTYJGH.mjs +1 -0
  13. package/dist/chunk-A4JCC3QQ.mjs +1 -0
  14. package/dist/chunk-BFX2CSQ3.mjs +1 -0
  15. package/dist/chunk-I45LCJUP.mjs +1 -0
  16. package/dist/{chunk-DIMNQPW5.mjs → chunk-JPK2NJWO.mjs} +1 -1
  17. package/dist/chunk-KHQ7OGQK.mjs +1 -0
  18. package/dist/chunk-MTEGM4RR.mjs +1 -0
  19. package/dist/chunk-PKHX3HSS.mjs +1 -0
  20. package/dist/chunk-WHFRS7IP.mjs +3 -0
  21. package/dist/{engine-6AXEX8CL.d.ts → engine-C9LKls__.d.ts} +1 -1
  22. package/dist/{engine-Ci08nM91.d.mts → engine-CvzRSkuk.d.mts} +1 -1
  23. package/dist/group/index.cjs +2 -2
  24. package/dist/group/index.d.mts +3 -3
  25. package/dist/group/index.d.ts +3 -3
  26. package/dist/group/index.mjs +1 -1
  27. package/dist/horizontal/index.cjs +1 -1
  28. package/dist/horizontal/index.d.mts +10 -3
  29. package/dist/horizontal/index.d.ts +10 -3
  30. package/dist/horizontal/index.mjs +1 -1
  31. package/dist/{index-BDGQEK6X.d.mts → index-BlIjovDN.d.mts} +1 -1
  32. package/dist/{index-DxjUOIbK.d.ts → index-DZjvLJcU.d.ts} +1 -1
  33. package/dist/{index-BVuNgQSd.d.ts → index-G3VfLIN8.d.ts} +2 -2
  34. package/dist/{index-CGR7pSOR.d.mts → index-Zxa5HIes.d.mts} +2 -2
  35. package/dist/index.cjs +4 -4
  36. package/dist/index.d.mts +6 -6
  37. package/dist/index.d.ts +6 -6
  38. package/dist/index.mjs +1 -1
  39. package/dist/nuxt/index.cjs +3 -3
  40. package/dist/nuxt/index.d.mts +3 -3
  41. package/dist/nuxt/index.d.ts +3 -3
  42. package/dist/nuxt/index.mjs +1 -1
  43. package/dist/pin/index.cjs +1 -1
  44. package/dist/pin/index.mjs +1 -1
  45. package/dist/progress/index.cjs +1 -1
  46. package/dist/progress/index.d.mts +1 -1
  47. package/dist/progress/index.d.ts +1 -1
  48. package/dist/progress/index.mjs +1 -1
  49. package/dist/react/index.cjs +3 -3
  50. package/dist/react/index.d.mts +16 -13
  51. package/dist/react/index.d.ts +16 -13
  52. package/dist/react/index.mjs +1 -1
  53. package/dist/reveal/index.cjs +1 -1
  54. package/dist/reveal/index.d.mts +1 -1
  55. package/dist/reveal/index.d.ts +1 -1
  56. package/dist/reveal/index.mjs +1 -1
  57. package/dist/{scroll-draw-CNlq4Z_L.d.mts → scroll-draw-B4CadBz0.d.mts} +1 -1
  58. package/dist/{scroll-draw-BlJfbTDv.d.ts → scroll-draw-Cs6Z5ype.d.ts} +1 -1
  59. package/dist/snap/index.d.mts +1 -1
  60. package/dist/snap/index.d.ts +1 -1
  61. package/dist/solid/index.cjs +2 -2
  62. package/dist/solid/index.d.mts +3 -3
  63. package/dist/solid/index.d.ts +3 -3
  64. package/dist/solid/index.mjs +1 -1
  65. package/dist/svelte/index.cjs +2 -2
  66. package/dist/svelte/index.d.mts +3 -3
  67. package/dist/svelte/index.d.ts +3 -3
  68. package/dist/svelte/index.mjs +1 -1
  69. package/dist/text/index.cjs +1 -1
  70. package/dist/text/index.d.mts +1 -1
  71. package/dist/text/index.d.ts +1 -1
  72. package/dist/text/index.mjs +1 -1
  73. package/dist/timeline/index.cjs +11 -11
  74. package/dist/timeline/index.d.mts +1 -1
  75. package/dist/timeline/index.d.ts +1 -1
  76. package/dist/timeline/index.mjs +4 -4
  77. package/dist/{types-DHU1zNEw.d.mts → types-B0YM4nQP.d.mts} +6 -1
  78. package/dist/{types-DHU1zNEw.d.ts → types-B0YM4nQP.d.ts} +6 -1
  79. package/dist/video/index.cjs +1 -1
  80. package/dist/video/index.d.mts +1 -1
  81. package/dist/video/index.d.ts +1 -1
  82. package/dist/video/index.mjs +1 -1
  83. package/dist/vue/index.cjs +3 -3
  84. package/dist/vue/index.d.mts +5 -83
  85. package/dist/vue/index.d.ts +5 -83
  86. package/dist/vue/index.mjs +1 -1
  87. package/dist/web-component/index.cjs +3 -3
  88. package/dist/web-component/index.mjs +1 -1
  89. package/package.json +1 -1
  90. package/dist/chunk-4MH5SQTH.mjs +0 -1
  91. package/dist/chunk-CTVQDBD3.mjs +0 -1
  92. package/dist/chunk-KBFWDHF4.mjs +0 -1
  93. package/dist/chunk-LINFV2GK.mjs +0 -3
  94. package/dist/chunk-PEFR3ZB7.mjs +0 -1
  95. package/dist/chunk-QJ4H2HW3.mjs +0 -1
  96. package/dist/chunk-SNCRC6BA.mjs +0 -1
  97. package/dist/chunk-TIRZOSQ4.mjs +0 -1
@@ -1 +1 @@
1
- import {a as a$2}from'../chunk-YWKPTYSG.mjs';import {a,b as b$1,c}from'../chunk-PEFR3ZB7.mjs';import {d}from'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import {a as a$1,b as b$2}from'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var R={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function B(c$1,D={}){if(typeof window>"u")return R;let s=typeof c$1=="string"?document.querySelector(c$1):c$1;if(!s)return b("scrollProgress: element not found:",c$1),R;let i=s,{variable:x="--scroll-progress",easedVariable:m="--scroll-progress-eased",trigger:F={},easing:f="linear",speed:A=1,axis:l="y",scrollContainer:w,onProgress:H}=D,y=typeof f=="function"?f:d[f]??d.linear,M=a(F.start??"top bottom"),V=a(F.end??"bottom top"),t=typeof w=="string"?document.querySelector(w):w??null,u=0,g=0,n=0,d$1=false,o=false,a$3=0,I=()=>t?l==="x"?t.scrollLeft:t.scrollTop:l==="x"?window.scrollX:window.scrollY,k=()=>t?l==="x"?t.clientWidth:t.clientHeight:l==="x"?window.innerWidth:window.innerHeight;function b$3(){let e=a$2(i,t,l),r=c(e,e.scroll,k(),M,V);u=r.tStart,g=r.tEnd;}function v(e,r){i.style.setProperty(x,String(e)),m!=null&&i.style.setProperty(m,String(r)),H?.(e,r);}function E(){if(!d$1||o)return;let e=b$1(I(),u,g,A),r=y(e);a$3=e,v(e,r),n=requestAnimationFrame(E);}b$3();{let e=b$1(I(),u,g,A),r=y(e);a$3=e,v(e,r);}let C=new IntersectionObserver(e=>{e.forEach(r=>{d$1=r.isIntersecting,d$1&&!o?n=requestAnimationFrame(E):cancelAnimationFrame(n);});},{root:t??null}),P;function p(){clearTimeout(P),P=setTimeout(b$3,150);}return window.addEventListener("resize",p),window.addEventListener("orientationchange",p),C.observe(s),a$1(s,{type:"animate",getProgress:()=>a$3,getTrigger:()=>({tStart:u,tEnd:g})}),{destroy(){cancelAnimationFrame(n),C.disconnect(),window.removeEventListener("resize",p),window.removeEventListener("orientationchange",p),clearTimeout(P),i.style.removeProperty(x),m!=null&&i.style.removeProperty(m),b$2(s);},replay(){b$3();},pause(){o=true,cancelAnimationFrame(n);},resume(){o&&(o=false,d$1&&(n=requestAnimationFrame(E)));},seek(e){let r=Math.min(1,Math.max(0,e)),W=y(r);a$3=r,o=true,cancelAnimationFrame(n),v(r,W);},getProgress(){return a$3}}}export{B as scrollProgress};
1
+ import {a as a$2}from'../chunk-YWKPTYSG.mjs';import {a,b as b$1,d as d$1,c}from'../chunk-A4JCC3QQ.mjs';import {d}from'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import {a as a$1,b as b$2}from'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var D={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Q(m,H={}){if(typeof window>"u")return D;let i=typeof m=="string"?document.querySelector(m):m;if(!i)return b("scrollProgress: element not found:",m),D;let o=i,{variable:x="--scroll-progress",easedVariable:u="--scroll-progress-eased",trigger:F={},easing:f="linear",speed:A=1,axis:l="y",scrollContainer:w,onProgress:M}=H,y=typeof f=="function"?f:d[f]??d.linear,V=a(F.start??"top bottom"),k=a(F.end??"bottom top"),t=typeof w=="string"?document.querySelector(w):w??null,g=0,d$2=0,n=0,p=false,s=false,a$3=0,I=()=>t?l==="x"?t.scrollLeft:t.scrollTop:l==="x"?window.scrollX:window.scrollY,W=()=>t?l==="x"?t.clientWidth:t.clientHeight:l==="x"?window.innerWidth:window.innerHeight;function b$3(){let e=a$2(o,t,l),r=c(e,e.scroll,W(),V,k);g=r.tStart,d$2=r.tEnd;}function v(e,r){o.style.setProperty(x,String(e)),u!=null&&o.style.setProperty(u,String(r)),M?.(e,r);}function E(){if(!p||s)return;let e=b$1(I(),g,d$2,A),r=y(e);a$3=e,v(e,r),n=requestAnimationFrame(E);}b$3();{let e=b$1(I(),g,d$2,A),r=y(e);a$3=e,v(e,r);}let L=new IntersectionObserver(e=>{e.forEach(r=>{p=r.isIntersecting,p&&!s?n=requestAnimationFrame(E):cancelAnimationFrame(n);});},{root:t??null}),P;function c$1(){clearTimeout(P),P=setTimeout(b$3,150);}window.addEventListener("resize",c$1),window.addEventListener("orientationchange",c$1);let _=d$1([o],c$1);return L.observe(i),a$1(i,{type:"animate",getProgress:()=>a$3,getTrigger:()=>({tStart:g,tEnd:d$2})}),{destroy(){cancelAnimationFrame(n),L.disconnect(),window.removeEventListener("resize",c$1),window.removeEventListener("orientationchange",c$1),_(),clearTimeout(P),o.style.removeProperty(x),u!=null&&o.style.removeProperty(u),b$2(i);},replay(){b$3();},pause(){s=true,cancelAnimationFrame(n);},resume(){s&&(s=false,p&&(n=requestAnimationFrame(E)));},seek(e){let r=Math.min(1,Math.max(0,e)),G=y(r);a$3=r,s=true,cancelAnimationFrame(n),v(r,G);},getProgress(){return a$3}}}export{Q as scrollProgress};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
- 'use strict';var vr=require('react'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var vr__default=/*#__PURE__*/_interopDefault(vr);function Kt({bounces:e=3,decay:n=.5}={}){let r=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,n)),i=Math.sqrt(t),o=0,l=[];for(let p=0;p<r;p++){let S=Math.pow(i,p);l.push(S),o+=S;}let u=[0],m=0;for(let p=0;p<r;p++)m+=l[p]/o,u.push(m);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 k=(p-u[S])/(u[S+1]-u[S]);if(S===0)return k*(2-k);let C=1-Math.pow(t,S);return C+(1-C)*(2*k-1)*(2*k-1)}return 1}}function Qt({amplitude:e=1,period:n=.4}={}){let r=Math.max(1,e),t=Math.max(.1,n),i=r<=1?t/4:t/(2*Math.PI)*Math.asin(1/r);return o=>o<=0?0:o>=1?1:r*Math.pow(2,-10*o)*Math.sin((o-i)*(2*Math.PI)/t)+1}var K={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:Kt(),elastic:Qt()};function bt(e,n,r){return Math.min(r,Math.max(n,e))}function se(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 wt(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 vt(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 Q(e,n,r,t){return r===n?0:bt((e-n)/(r-n)*t,0,1)}function ve(e,n,r,t,i){let o=wt(e.top,e.height,n,t.element)-vt(t.viewport,r),l=wt(e.top,e.height,n,i.element)-vt(i.viewport,r);return {tStart:o,tEnd:l}}function et(e,n,r){let t=e.getBoundingClientRect(),i=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:i,scroll:0}:{top:r==="x"?t.left:t.top,height:i,scroll:r==="x"?window.scrollX:window.scrollY}}function _e(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 Et(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 qe(e,n,r){let t=Et(e),i=Et(n);return !t||!i?e:`rgb(${Math.round(t[0]+(i[0]-t[0])*r)},${Math.round(t[1]+(i[1]-t[1])*r)},${Math.round(t[2]+(i[2]-t[2])*r)})`}var St={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 je=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function ye(e,...n){je&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var Jt="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Zt="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Tt=33;function er(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function tr(e){let n=[];for(let r=0;r<Tt;r++){let t=r/(Tt-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function tt(e){switch(e){case "linear":return "linear";case "ease-in":return Jt;case "ease-out":return Zt;case "ease-in-out":return er()?tr(K["ease-in-out"]):null;default:return null}}var xt=Symbol.for("svg-scroll-draw.registry");function At(){let e=globalThis;return e[xt]||(e[xt]=new Map)}function Le(e,n){At().set(e,n);}function Ce(e){At().delete(e);}var rr=0;function nr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Mt(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var Pt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function or(e){if(!je)return;let n=Mt(e,"stroke");if(!n||n==="none"){ye("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!Pt.has(r)&&!Pt.has(Mt(e,"fill"))&&ye("Element has a fill \u2014 it may obscure the stroke animation.",e);}function sr(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 i(){let o=r==="x"?window.scrollX:window.scrollY,l=e-o,u=n-o,m=r==="x";t.innerHTML=`
3
- <div style="position:absolute;${m?`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>
4
- <div style="position:absolute;${m?`left:${u}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${u}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",i,{passive:true}),i(),{el:t,destroy(){window.removeEventListener("scroll",i),t.remove();}}}var Lt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Ct=/[MmLlHhVvCcSsQqTtAaZz]/g;function ir(e,n,r){if(!je)return;let t=(e.match(Ct)??[]).join("").toUpperCase(),i=(n.match(Ct)??[]).join("").toUpperCase(),o=(e.match(Lt)??[]).length,l=(n.match(Lt)??[]).length;if(t!==i){ye(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${i||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,r);return}o!==l&&ye(`morphTo: coordinate count differs (${o} \u2192 ${l}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function lt(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),i=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,o=>{let l=parseFloat(o),u=t[i++]??l;return String(+(l+(u-l)*r).toFixed(4))})}function $t(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,i=r?{...St[r],...t}:t,o=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:l="path, polyline, line, polygon, rect, circle",speed:u=1,fade:m=false,easing:p="linear",trigger:S={},stagger:k=0,direction:C="forward",once:te=false,debug:he=false,axis:H="y",scrollContainer:j,autoReverse:q=false,delay:W=0,strokeColor:P,strokeWidth:F,fillOpacity:L,waypoints:b,velocityScale:$=false,threshold:A=0,rootMargin:w="0px",repeat:y=0,repeatDelay:z=0,morphTo:T,clip:U,autoplay:ie=false,duration:le=1e3,native:ce=true,onProgress:d,onStart:M,onComplete:g,onEnter:I,onLeave:ue,onEnterBack:ae,onLeaveBack:R}=i,N=U===true?"left":typeof U=="string"?U:false,re=typeof p=="function"?p:K[p]??K.linear,Ee=se(S.start??"top bottom"),ze=se(S.end??"bottom top"),Se=typeof j=="string"?document.querySelector(j):j??null,Te=Array.isArray(P)?P[0]:null,me=Array.isArray(P)?P[1]:typeof P=="string"?P:null,fe=Array.isArray(F)?F[0]:null,J=Array.isArray(F)?F[1]:typeof F=="number"?F:null,ge=Array.isArray(L)?L[0]:null,ne=Array.isArray(L)?L[1]:typeof L=="number"?L:null;function $e(s){let c=s*100;switch(N){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(${s*150}% at 50% 50%)`;default:return `inset(0 ${100-c}% 0 0)`}}let B=N?[]:Array.from(e.querySelectorAll(l)),O=[],a=[],f=0,be=0,V=false,G=false,X=0,Me=false,xe=-1,oe=[],Fe=-1,Z=false,ke=0,Ie=0,Ne,nt=null;function ut(){nt?.destroy(),nt=null;}let De=new Set,mt=NaN,He=true,Xe=-1,ft=performance.now(),Ve=NaN;function ot(){return Se?H==="x"?Se.scrollLeft:Se.scrollTop:H==="x"?window.scrollX:window.scrollY}function pt(){return Se?H==="x"?Se.clientWidth:Se.clientHeight:H==="x"?window.innerWidth:window.innerHeight}function dt(){let s=et(e,Se,H);return ve(s,s.scroll,pt(),Ee,ze)}function gt(){(({tStart:f,tEnd:be}=dt())),he&&je&&(ut(),nt=sr(f,be,H));}function st(s,c=dt){Le(e,{type:"draw",getProgress:()=>s.getProgress(),getTrigger:c});let E=s.destroy;return s.destroy=()=>{E.call(s),Ce(e);},s}function jt(s,c){if(e.style.setProperty("--scroll-draw-progress",String(s)),N){let E=c==="reverse"?1-s:s;e.style.clipPath=$e(E);return}B.forEach((E,pe)=>{E.style.strokeDashoffset=c==="reverse"?`${O[pe]*s}`:`${O[pe]*(1-s)}`,m&&(E.style.opacity=c==="reverse"?`${1-s}`:`${s}`),Te&&me?E.style.stroke=qe(Te,me,s):me&&(E.style.stroke=me),fe!==null&&J!==null?E.style.strokeWidth=`${fe+(J-fe)*s}`:J!==null&&(E.style.strokeWidth=`${J}`),ge!==null&&ne!==null?E.style.fillOpacity=`${ge+(ne-ge)*s}`:ne!==null&&(E.style.fillOpacity=`${ne}`),T&&E.tagName.toLowerCase()==="path"&&a[pe]&&E.setAttribute("d",lt(a[pe],T,s));});}function Ye(){if(e.style.setProperty("--scroll-draw-progress","0"),N){e.style.clipPath=$e(0);return}B.forEach((s,c)=>{s.style.strokeDasharray=`${O[c]}`,s.style.strokeDashoffset=C==="reverse"?"0":`${O[c]}`,m?s.style.opacity=C==="reverse"?"1":"0":s.style.opacity="",Te&&(s.style.stroke=Te),fe!==null&&(s.style.strokeWidth=`${fe}`),ge!==null&&(s.style.fillOpacity=`${ge}`),T&&s.tagName.toLowerCase()==="path"&&a[c]&&s.setAttribute("d",a[c]);});}if(B.forEach(s=>{or(s);let c=_e(s);O.push(c);let E=s.tagName.toLowerCase()==="path";E?a.push(s.getAttribute("d")??""):a.push(""),T&&(E?ir(a[a.length-1],T,s):ye(`morphTo only applies to <path> elements \u2014 ignored on <${s.tagName}>.`,s)),o?(s.style.strokeDasharray=`${c}`,s.style.strokeDashoffset=C==="reverse"?`${c}`:"0",m&&(s.style.opacity="1"),me&&(s.style.stroke=me),J!==null&&(s.style.strokeWidth=`${J}`),ne!==null&&(s.style.fillOpacity=`${ne}`),T&&s.tagName.toLowerCase()==="path"&&s.setAttribute("d",T)):(s.style.strokeDasharray=`${c}`,s.style.strokeDashoffset=C==="reverse"?"0":`${c}`,m?s.style.opacity=C==="reverse"?"1":"0":s.style.opacity="",Te&&(s.style.stroke=Te),fe!==null&&(s.style.strokeWidth=`${fe}`),ge!==null&&(s.style.fillOpacity=`${ge}`));}),N){if(o)return e.style.clipPath=$e(1),g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=$e(0);}else if(o)return g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let yt=typeof p=="string"?tt(p):null;function Ut(){return !(ce===false||!nr()||!B.length||!yt||N||H!=="y"||Se||u!==1||k!==0||te||q||$!==false||T||b||y||W>0||d||M||g||I||ue||ae||R||P!=null||F!=null||L!=null||(S.start??"top bottom").trim()!=="top bottom"||(S.end??"bottom top").trim()!=="bottom top")}function Xt(){let s=++rr,c=`svg-scroll-draw-${s}`,E=`svg-scroll-draw-host-${s}`,pe=`--svg-scroll-draw-${s}`,Oe=C==="reverse"?"0":"var(--ssd-len)",Re=C==="reverse"?"var(--ssd-len)":"0",Pe=`stroke-dashoffset:${Oe};`,x=`stroke-dashoffset:${Re};`;m&&(Pe+=`opacity:${C==="reverse"?1:0};`,x+=`opacity:${C==="reverse"?0:1};`);let D=document.createElement("style");D.setAttribute("data-svg-scroll-draw",""),D.textContent=`@keyframes ${c}{from{${Pe}}to{${x}}}.${E}{view-timeline-name:${pe};view-timeline-axis:block;}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${yt};animation-fill-mode:both;animation-timeline:${pe};animation-range:cover 0% cover 100%;}`,document.head.appendChild(D),e.classList.add(E);function de(h,ee){h.style.setProperty("--ssd-len",String(O[ee])),h.style.strokeDasharray=`${O[ee]}`,h.style.strokeDashoffset="",h.style.opacity="",h.style.animationPlayState="",h.classList.add(c);}B.forEach(de);let v=false,_=-1;function Y(){if(_>=0)return _;let h=e.getBoundingClientRect(),{tStart:ee,tEnd:Ae}=ve({top:h.top,height:h.height},ot(),pt(),Ee,ze);return re(Q(ot(),ee,Ae,u))}return {destroy(){e.classList.remove(E),B.forEach(h=>{h.classList.remove(c),h.style.removeProperty("--ssd-len"),h.style.animationPlayState="";}),D.remove();},replay(){v=false,_=-1,B.forEach(de);},pause(){v=true,B.forEach(h=>{h.style.animationPlayState="paused";});},resume(){v&&(v=false,B.forEach(h=>{h.style.animationPlayState="running";}));},seek(h){let ee=Math.min(1,Math.max(0,h));_=ee,v=true,B.forEach((Ae,we)=>{Ae.classList.remove(c),Ae.style.strokeDashoffset=C==="reverse"?`${O[we]*ee}`:`${O[we]*(1-ee)}`,m&&(Ae.style.opacity=C==="reverse"?`${1-ee}`:`${ee}`);});},getProgress(){return Y()},refresh(){B.forEach((h,ee)=>{O[ee]=_e(h),h.style.setProperty("--ssd-len",String(O[ee])),h.style.strokeDasharray=`${O[ee]}`;});}}}if(Ut())return st(Xt());function Yt(){let s=Math.max(1,le),c=0,E=0,pe=false;function Oe(v){let _=true;if(N){let Y=Math.min(1,Math.max(0,v/s)),h=re(Y);ke=h,e.style.setProperty("--scroll-draw-progress",String(h)),e.style.clipPath=$e(C==="reverse"?1-h:h),d?.(h),Y<1&&(_=false);}else B.forEach((Y,h)=>{let ee=h*k*s,Ae=Math.min(1,Math.max(0,(v-ee)/s)),we=re(Ae);Y.style.strokeDashoffset=C==="reverse"?`${O[h]*we}`:`${O[h]*(1-we)}`,m&&(Y.style.opacity=C==="reverse"?`${1-we}`:`${we}`),Te&&me?Y.style.stroke=qe(Te,me,we):me&&(Y.style.stroke=me),fe!==null&&J!==null?Y.style.strokeWidth=`${fe+(J-fe)*we}`:J!==null&&(Y.style.strokeWidth=`${J}`),ge!==null&&ne!==null?Y.style.fillOpacity=`${ge+(ne-ge)*we}`:ne!==null&&(Y.style.fillOpacity=`${ne}`),T&&Y.tagName.toLowerCase()==="path"&&a[h]&&Y.setAttribute("d",lt(a[h],T,we)),h===0&&(ke=we,d?.(we),e.style.setProperty("--scroll-draw-progress",String(we))),Ae<1&&(_=false);});if(b){let Y=Math.min(1,Math.max(0,v/s)),h=re(Y);for(let ee in b){let Ae=parseFloat(ee);h>=Ae&&!De.has(Ae)&&(De.add(Ae),b[ee]?.());}}return _}function Re(v){if(Z)return;let _=v-c;G||(G=true,M?.());let Y=Oe(_);if(Y&&!V){V=true,Oe(s*(1+Math.max(0,B.length-1)*k)),g?.(),Ie<(y==="infinite"?1/0:y??0)&&(Ie++,Ne=setTimeout(()=>{c=performance.now(),G=false,V=false,De.clear(),Ye(),X=requestAnimationFrame(Re);},z));return}Y||(X=requestAnimationFrame(Re));}function Pe(){cancelAnimationFrame(X),clearTimeout(Ne),c=performance.now(),E=0,Z=false,G=false,V=false,Ie=0,pe=true,ke=0,De.clear(),Ye(),X=requestAnimationFrame(Re);}let x=new IntersectionObserver(v=>{v.forEach(_=>{_.isIntersecting&&!(te&&V)?Pe():!_.isIntersecting&&!te&&!V&&(cancelAnimationFrame(X),clearTimeout(Ne),pe=false);});},{root:Se??null,threshold:A,rootMargin:w}),D;function de(){clearTimeout(D),D=setTimeout(()=>{B.forEach((v,_)=>{O[_]=_e(v),v.style.strokeDasharray=`${O[_]}`;});},150);}return window.addEventListener("resize",de),window.addEventListener("orientationchange",de),W>0?setTimeout(()=>x.observe(e),W):x.observe(e),{destroy(){cancelAnimationFrame(X),clearTimeout(Ne),x.disconnect(),window.removeEventListener("resize",de),window.removeEventListener("orientationchange",de),clearTimeout(D);},replay(){Ie=0,Pe();},pause(){Z||!pe||(Z=true,E=performance.now()-c,cancelAnimationFrame(X));},resume(){Z&&(Z=false,pe=true,c=performance.now()-E,X=requestAnimationFrame(Re));},seek(v){let _=Math.min(1,Math.max(0,v));ke=_,Z=true,E=_*s,c=performance.now()-E,cancelAnimationFrame(X),Oe(E);},getProgress(){return ke},refresh(){clearTimeout(D),B.forEach((v,_)=>{O[_]=_e(v),v.style.strokeDasharray=`${O[_]}`;});}}}if(ie)return st(Yt());gt();function Ke(){if(!Me||Z)return;let s=performance.now(),c=ot();if(!He&&$===false&&c===mt){X=requestAnimationFrame(Ke);return}He=false,mt=c;let E=u;if($!==false){let x=s-ft,D=x>0?Math.abs(c-(Xe<0?c:Xe))/x:0;E=u*Math.max(.2,1+D*(typeof $=="number"?$:1)*.04);}Xe=c,ft=s;let pe=q?Fe===-1||c>=Fe?"forward":"reverse":C;Fe=c;let Oe=be-f,Re=true,Pe=Oe===0?0:(c-f)/Oe;if(isNaN(Ve)||(Ve<=0&&Pe>0?I?.():Ve>0&&Pe<=0&&R?.(),Ve<1&&Pe>=1?ue?.():Ve>=1&&Pe<1&&ae?.()),Ve=Pe,N){let x=re(Q(c,f,be,E));te&&!q&&(xe=Math.max(xe,x),x=xe),ke=x,e.style.setProperty("--scroll-draw-progress",String(x));let D=pe==="reverse"?1-x:x;e.style.clipPath=$e(D),d?.(x),!G&&Q(c,f,be,E)>0&&(G=true,M?.()),x>=1&&!V?(V=true,g?.(),Ie<(y==="infinite"?1/0:y??0)&&(Ie++,Ne=setTimeout(()=>{xe=-1,G=false,V=false,e.style.clipPath=$e(0);},z))):x<1&&!te&&(V=false),X=requestAnimationFrame(Ke);return}if(B.forEach((x,D)=>{let de=D*k*Oe,v=re(Q(c,f+de,be+de,E));te&&!q&&(v=oe[D]=Math.max(oe[D]??xe,v)),ke=v,x.style.strokeDashoffset=pe==="reverse"?`${O[D]*v}`:`${O[D]*(1-v)}`,m&&(x.style.opacity=pe==="reverse"?`${1-v}`:`${v}`),Te&&me?x.style.stroke=qe(Te,me,v):me&&(x.style.stroke=me),fe!==null&&J!==null?x.style.strokeWidth=`${fe+(J-fe)*v}`:J!==null&&(x.style.strokeWidth=`${J}`),ge!==null&&ne!==null?x.style.fillOpacity=`${ge+(ne-ge)*v}`:ne!==null&&(x.style.fillOpacity=`${ne}`),T&&x.tagName.toLowerCase()==="path"&&a[D]&&x.setAttribute("d",lt(a[D],T,v)),D===0&&(d?.(v),e.style.setProperty("--scroll-draw-progress",String(v))),v<1&&(Re=false);}),b){let x=re(Q(c,f,be,E));for(let D in b){let de=parseFloat(D);x>=de&&!De.has(de)&&(De.add(de),b[D]?.());}}!G&&Q(c,f,be,E)>0&&(G=true,M?.()),Re&&!V?(V=true,g?.(),Ie<(y==="infinite"?1/0:y??0)&&(Ie++,Ne=setTimeout(()=>{xe=-1,oe=[],G=false,V=false,De.clear(),Ye(),He=true;},z))):!Re&&!te&&(V=false),X=requestAnimationFrame(Ke);}let it=false;function Qe(){it||(it=true,X=requestAnimationFrame(function(){Ke();}));}function Je(){it=false,cancelAnimationFrame(X);}let at=new IntersectionObserver(s=>{s.forEach(c=>{Me=c.isIntersecting,Me&&!Z?(He=true,Qe()):Je();});},{root:Se??null,threshold:A,rootMargin:w});function ht(){B.forEach((s,c)=>{O[c]=_e(s),s.style.strokeDasharray=`${O[c]}`;}),gt(),He=true;}let Ze;function Be(){clearTimeout(Ze),Ze=setTimeout(ht,150);}window.addEventListener("resize",Be),window.addEventListener("orientationchange",Be);let Ge;return typeof ResizeObserver<"u"&&(Ge=new ResizeObserver(()=>Be()),Ge.observe(document.body),Ge.observe(document.documentElement),Ge.observe(e)),W>0?setTimeout(()=>at.observe(e),W):at.observe(e),st({destroy(){cancelAnimationFrame(X),clearTimeout(Ne),Je(),at.disconnect(),Ge?.disconnect(),window.removeEventListener("resize",Be),window.removeEventListener("orientationchange",Be),clearTimeout(Ze),ut();},replay(){xe=-1,oe=[],Fe=-1,Xe=-1,G=false,V=false,Ie=0,Z=false,ke=0,De.clear(),clearTimeout(Ne),Ye(),He=true,Me&&Qe();},pause(){Z=true,Je();},resume(){Z&&(Z=false,He=true,Me&&Qe());},seek(s){let c=Math.min(1,Math.max(0,s));ke=c,xe=c,oe=[],Z=true,Je(),jt(c,C),He=true;},getProgress(){return ke},refresh(){clearTimeout(Ze),ht(),Me&&!Z&&Qe();}},()=>({tStart:f,tEnd:be}))}var kt=new WeakMap,ar=0;function Rt(e){return JSON.stringify(e,(n,r)=>{if(typeof r=="function")return "\u0192";if(typeof Element<"u"&&r instanceof Element){let t=kt.get(r);return t===void 0&&kt.set(r,t=++ar),`el#${t}`}return r})}function It(e,n){let r={...e};for(let t of Object.keys(r))typeof r[t]=="function"&&(r[t]=(...i)=>n()[t]?.(...i));return r}function lr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Ot(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let i=[],o=[],l=t[2].trim();if(l)for(let u of l.split(/[\s,]+/)){let m=u.match(/^([-+]?[\d.eE]+)(.*)$/);i.push(m?parseFloat(m[1]):0),o.push(m?m[2]:"");}n.push({fn:t[1],nums:i,units:o});}return n}function cr(e,n,r){let t=Ot(e),i=Ot(n);return t.length===0||t.length!==i.length?r<1?e:n:t.map((o,l)=>{let u=i[l];return o.fn!==u.fn||o.nums.length!==u.nums.length?r<1?`${o.fn}(${o.nums.map((m,p)=>`${m}${o.units[p]}`).join(", ")})`:`${u.fn}(${u.nums.map((m,p)=>`${m}${u.units[p]}`).join(", ")})`:`${o.fn}(${o.nums.map((m,p)=>`${m+(u.nums[p]-m)*r}${o.units[p]}`).join(", ")})`}).join(" ")}function Ft(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),i=String(n);if(lr(t))return qe(t,i,r);if(t.includes("("))return cr(t,i,r);let o=t.match(/^([-+]?[\d.]+)(.*)$/),l=i.match(/^([-+]?[\d.]+)(.*)$/);if(o&&l){let u=parseFloat(o[1]),m=parseFloat(l[1]);return `${u+(m-u)*r}${o[2]||l[2]}`}return r<1?t:i}function ur(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var mr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),fr=0,Nt="--scroll-draw-progress";function pr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Dt(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:t,trigger:i={},easing:o="ease-out",speed:l=1,once:u=false,axis:m="y",scrollContainer:p,native:S=true,velocityScale:k=false,respectReducedMotion:C=true,triggerElement:te,onProgress:he,onComplete:H,onEnter:j,onLeave:q,onEnterBack:W,onLeaveBack:P}=n,F=C&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,L=typeof o=="function"?o:K[o]??K["ease-out"],b=se(i.start??"top bottom"),$=se(i.end??"bottom top"),A=te??e,w=typeof p=="string"?document.querySelector(p):p??null,y=Object.entries(t).map(([a,f])=>({prop:ur(a),from:Array.isArray(f)?f[0]:"",to:Array.isArray(f)?f[1]:f}));function z(){let a=window.getComputedStyle(e);for(let f of y)f.from===""&&(f.from=a.getPropertyValue(f.prop).trim()||"0");}function T(){for(let a of y)e.style.setProperty(a.prop,String(a.to));}let U=new Map;for(let a of [...y.map(f=>f.prop),Nt])U.set(a,e.style.getPropertyValue(a));function ie(){for(let[a,f]of U)f?e.style.setProperty(a,f):e.style.removeProperty(a);}if(F)return T(),H?.(),{...r,destroy:ie,getProgress:()=>1};z();let le=typeof o=="string"?tt(o):null;function ce(){if(!S||!pr()||!le||m!=="y"||w||A!==e||u||l!==1||he||H||j||q||W||P||k!==false||(i.start??"top bottom").trim()!=="top bottom"||(i.end??"bottom top").trim()!=="bottom top")return false;for(let a of y)if(!mr.has(a.prop))return false;return true}function d(){let a=`ssd-a-${++fr}`,f=y.map(oe=>`${oe.prop}:${oe.from}`).join(";"),be=y.map(oe=>`${oe.prop}:${oe.to}`).join(";"),V=document.createElement("style");V.setAttribute("data-ssd-animate",""),V.textContent=`@keyframes ${a}{from{${f}}to{${be}}}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${le};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(V),e.classList.add(a);let G=()=>m==="x"?window.scrollX:window.scrollY,X=()=>m==="x"?window.innerWidth:window.innerHeight,Me=()=>{let oe=e.getBoundingClientRect();return ve({top:oe.top,height:oe.height},G(),X(),b,$)};Le(e,{type:"animate",getProgress:()=>xe.getProgress(),getTrigger:Me});let xe={destroy(){e.classList.remove(a),V.remove(),e.style.animationPlayState="",ie(),Ce(e);},replay(){e.classList.remove(a),e.offsetWidth,e.classList.add(a);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(oe){let Fe=Math.min(1,Math.max(0,oe));e.classList.remove(a);for(let Z of y)e.style.setProperty(Z.prop,Ft(Z.from,Z.to,Fe));},getProgress(){let{tStart:oe,tEnd:Fe}=Me();return L(Q(G(),oe,Fe,l))}};return xe}if(ce())return d();let M=0,g=0,I=0,ue=false,ae=false,R=-1,N=0,re=false,Ee=NaN,ze=-1,Se=0,Te=()=>w?m==="x"?w.scrollLeft:w.scrollTop:m==="x"?window.scrollX:window.scrollY,me=()=>w?m==="x"?w.clientWidth:w.clientHeight:m==="x"?window.innerWidth:window.innerHeight;function fe(){let a=et(A,w,m),f=ve(a,a.scroll,me(),b,$);M=f.tStart,g=f.tEnd;}function J(a){e.style.setProperty(Nt,String(a));for(let f of y)e.style.setProperty(f.prop,Ft(f.from,f.to,a));he?.(a);}function ge(a){if(isNaN(Ee)){Ee=a;return}Ee<=0&&a>0?j?.():Ee>0&&a<=0&&P?.(),Ee<1&&a>=1?q?.():Ee>=1&&a<1&&W?.(),Ee=a;}function ne(){if(!ue||ae)return;let a=performance.now(),f=Te(),be=l;if(k!==false){let X=a-Se,Me=X>0?Math.abs(f-(ze<0?f:ze))/X:0;be=l*Math.max(.2,1+Me*(typeof k=="number"?k:1)*.04);}ze=f,Se=a;let V=g===M?0:(f-M)/(g-M);ge(V);let G=L(Q(f,M,g,be));u&&(R=Math.max(R,G),G=R),N=G,J(G),G>=1&&!re?(re=true,H?.()):G<1&&!u&&(re=false),I=requestAnimationFrame(ne);}fe(),g===M&&ye("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 a=L(Q(Te(),M,g,l));u&&a>0&&(R=a),N=a,J(a);}let $e=new IntersectionObserver(a=>{a.forEach(f=>{ue=f.isIntersecting,ue&&!ae?I=requestAnimationFrame(ne):cancelAnimationFrame(I);});},{root:w??null}),B;function O(){clearTimeout(B),B=setTimeout(fe,150);}return window.addEventListener("resize",O),window.addEventListener("orientationchange",O),$e.observe(e),Le(e,{type:"animate",getProgress:()=>N,getTrigger:()=>({tStart:M,tEnd:g})}),{destroy(){cancelAnimationFrame(I),$e.disconnect(),window.removeEventListener("resize",O),window.removeEventListener("orientationchange",O),clearTimeout(B),ie(),Ce(e);},replay(){R=-1,re=false,N=0,ae=false,J(0);},pause(){ae=true,cancelAnimationFrame(I);},resume(){ae&&(ae=false,ue&&(I=requestAnimationFrame(ne)));},seek(a){let f=Math.min(1,Math.max(0,a));N=f,R=f,ae=true,cancelAnimationFrame(I),J(f);},getProgress(){return N}}}var ct={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Ht(e,n){if(typeof window>"u")return ct;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return ye("scrollCounter: element not found:",e),ct;let t=r,{from:i=0,to:o,format:l,easing:u="ease-out",trigger:m={},once:p=true,decimals:S,onComplete:k}=n,C=S!==void 0?d=>d.toFixed(S):l??(d=>String(Math.round(d))),te=typeof u=="function"?u:K[u]??K["ease-out"],he=se(m.start??"top 80%"),H=se(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=C(o),k?.(),ct;let q=0,W=0,P=0,F=false,L=false,b=-1,$=0,A=false,w=()=>window.scrollY,y=()=>window.innerHeight;function z(){let d=t.getBoundingClientRect(),M=ve({top:d.top,height:d.height},w(),y(),he,H);q=M.tStart,W=M.tEnd;}function T(d){t.textContent=C(i+(o-i)*d),t.style.setProperty("--scroll-draw-progress",String(d));}function U(){if(!F||L)return;let d=te(Q(w(),q,W,1));p&&(b=Math.max(b,d),d=b),$=d,T(d),d>=1&&!A?(A=true,k?.()):d<1&&!p&&(A=false),P=requestAnimationFrame(U);}z();{let d=te(Q(w(),q,W,1));p&&d>0&&(b=d),$=d,T(d);}let ie=new IntersectionObserver(d=>{d.forEach(M=>{F=M.isIntersecting,F&&!L?P=requestAnimationFrame(U):cancelAnimationFrame(P);});}),le;function ce(){clearTimeout(le),le=setTimeout(z,150);}return window.addEventListener("resize",ce),window.addEventListener("orientationchange",ce),ie.observe(t),Le(t,{type:"counter",getProgress:()=>$,getTrigger:()=>({tStart:q,tEnd:W})}),{destroy(){cancelAnimationFrame(P),ie.disconnect(),window.removeEventListener("resize",ce),window.removeEventListener("orientationchange",ce),clearTimeout(le),Ce(t);},replay(){b=-1,A=false,$=0,L=false,T(0);},pause(){L=true,cancelAnimationFrame(P);},resume(){L&&(L=false,F&&(P=requestAnimationFrame(U)));},seek(d){let M=Math.min(1,Math.max(0,d));$=M,b=M,L=true,cancelAnimationFrame(P),T(M);},getProgress(){return $}}}var zt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Vt(e,n={}){if(typeof window>"u")return zt;let r=typeof e=="string"?document.querySelector(e):e;if(!r||r.tagName.toLowerCase()!=="video")return ye("scrollVideo: <video> element not found:",e),zt;let t=r,{trigger:i={},easing:o="linear",once:l=false,axis:u="y",preload:m="auto",triggerElement:p,onReady:S,onComplete:k,onProgress:C}=n,te=p??t,he=window.matchMedia("(prefers-reduced-motion: reduce)").matches,H=typeof o=="function"?o:K[o]??K.linear,j=se(i.start??"top top"),q=se(i.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let W=n.from??0,P=n.to,F=0,L=0,b=0,$=false,A=false,w=-1,y=0,z=false,T=false,U=()=>u==="x"?window.scrollX:window.scrollY,ie=()=>u==="x"?window.innerWidth:window.innerHeight;function le(){let R=te.getBoundingClientRect(),N=u==="x"?R.left:R.top,re=u==="x"?R.width:R.height,Ee=ve({top:N,height:re},U(),ie(),j,q);F=Ee.tStart,L=Ee.tEnd,T&&L===F&&ye("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t);}let ce=NaN;function d(R){if(!T)return;let N=P??t.duration??0,re=W+(N-W)*R;re!==ce&&(ce=re,t.currentTime=re),t.style.setProperty("--scroll-draw-progress",String(R)),C?.(R);}function M(){if(!$||A||!T||he)return;let R=H(Q(U(),F,L,1));l&&(w=Math.max(w,R),R=w),y=R,d(R),R>=1&&!z?(z=true,k?.()):R<1&&!l&&(z=false),b=requestAnimationFrame(M);}function g(){if(T=true,P===void 0&&(P=t.duration),he){d(1),S?.();return}le(),S?.(),$&&!A&&(b=requestAnimationFrame(M));}t.readyState>=1?g():t.addEventListener("loadedmetadata",g,{once:true}),T||le();let I=new IntersectionObserver(R=>{R.forEach(N=>{$=N.isIntersecting,$&&!A&&T?b=requestAnimationFrame(M):cancelAnimationFrame(b);});}),ue;function ae(){clearTimeout(ue),ue=setTimeout(le,150);}return window.addEventListener("resize",ae),window.addEventListener("orientationchange",ae),I.observe(t),Le(t,{type:"video",getProgress:()=>y,getTrigger:()=>({tStart:F,tEnd:L})}),{destroy(){cancelAnimationFrame(b),I.disconnect(),t.removeEventListener("loadedmetadata",g),window.removeEventListener("resize",ae),window.removeEventListener("orientationchange",ae),clearTimeout(ue),Ce(t);},replay(){w=-1,z=false,y=0,A=false,ce=NaN,d(0);},pause(){A=true,cancelAnimationFrame(b);},resume(){A&&(A=false,$&&T&&(b=requestAnimationFrame(M)));},seek(R){let N=Math.min(1,Math.max(0,R));y=N,w=N,A=true,cancelAnimationFrame(b),ce=NaN,d(N);},getProgress(){return y}}}function Wt(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 dr(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 _t(e){let n=Wt(e),r=new Map;for(let o of n){let l=o.offsetTop;r.has(l)||r.set(l,[]),r.get(l).push(o);}let t=[],i=Array.from(r.keys()).sort((o,l)=>o-l);for(let o of i){let l=r.get(o),u=document.createElement("span");u.setAttribute("aria-hidden","true"),u.style.display="inline-block",l.forEach((m,p)=>{let S=m.nextElementSibling;u.appendChild(m),p<l.length-1&&S&&S.style.whiteSpace==="pre"&&u.appendChild(S);}),t.push(u);}return e.textContent="",t.forEach((o,l)=>{e.appendChild(o),l<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function gr(e,n,r,t){if(r<=1||t===0)return e;let i=(r-1)*t,o=n*t,l=o+(1-i);return l<=o?e>=o?1:0:Math.min(1,Math.max(0,(e-o)/(l-o)))}function yr(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 Bt(e,n={}){if(typeof window>"u")return qt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return ye("scrollText: element not found:",e),qt;let t=r,{split:i="words",stagger:o=.04,easing:l="ease-out",from:u={opacity:0,y:24},trigger:m={},once:p=true,onComplete:S}=n,k=window.matchMedia("(prefers-reduced-motion: reduce)").matches,C=typeof l=="function"?l:K[l]??K["ease-out"],te=se(m.start??"top 85%"),he=se(m.end??"top 40%"),H=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let j;i==="chars"?j=dr(t):i==="lines"?j=_t(t):j=Wt(t);let q=j.length;function W(g,I){u?.opacity!==void 0&&(g.style.opacity=String(u.opacity+(1-u.opacity)*I));let ue=yr(I,u);ue&&(g.style.transform=ue);}function P(g){t.style.setProperty("--scroll-draw-progress",String(g)),j.forEach((I,ue)=>{let ae=C(gr(g,ue,q,o));W(I,ae);});}if(k)return P(1),S?.(),{destroy(){t.innerHTML=H,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};P(0);let F=0,L=0,b=0,$=false,A=false,w=-1,y=0,z=false,T=()=>window.scrollY,U=()=>window.innerHeight;function ie(){let g=t.getBoundingClientRect(),I=ve({top:g.top,height:g.height},T(),U(),te,he);F=I.tStart,L=I.tEnd;}function le(){if(!$||A)return;let g=Q(T(),F,L,1);p&&(w=Math.max(w,g),g=w),y=g,P(g),g>=1&&!z?(z=true,S?.()):g<1&&!p&&(z=false),b=requestAnimationFrame(le);}ie();let ce=new IntersectionObserver(g=>{g.forEach(I=>{$=I.isIntersecting,$&&!A?b=requestAnimationFrame(le):cancelAnimationFrame(b);});}),d;function M(){clearTimeout(d),d=setTimeout(()=>{if(i==="lines"){let g=y;t.innerHTML=H,t.setAttribute("aria-label",t.textContent??""),j=_t(t),P(g);}ie();},150);}return window.addEventListener("resize",M),window.addEventListener("orientationchange",M),ce.observe(t),Le(t,{type:"text",getProgress:()=>y,getTrigger:()=>({tStart:F,tEnd:L})}),{destroy(){cancelAnimationFrame(b),ce.disconnect(),window.removeEventListener("resize",M),window.removeEventListener("orientationchange",M),clearTimeout(d),t.innerHTML=H,t.removeAttribute("aria-label"),Ce(t);},replay(){w=-1,z=false,y=0,A=false,P(0);},pause(){A=true,cancelAnimationFrame(b);},resume(){A&&(A=false,$&&(b=requestAnimationFrame(le)));},seek(g){let I=Math.min(1,Math.max(0,g));y=I,w=I,A=true,cancelAnimationFrame(b),P(I);},getProgress(){return y}}}function wr(e,n={}){let[r,t]=vr.useState(0),i=vr.useRef(n);i.current=n;let o=vr.useRef(-1);return vr.useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){t(1);return}let l=typeof e=="string"?document.querySelector(e):e.current;if(!l)return;let u=l,{axis:m="y",scrollContainer:p,trigger:S={}}=i.current,k=typeof p=="string"?document.querySelector(p):p??null,C=se(S.start??"top bottom"),te=se(S.end??"bottom top"),he=0,H=0,j=false,q=0;function W(){return k?m==="x"?k.scrollLeft:k.scrollTop:m==="x"?window.scrollX:window.scrollY}function P(){return k?m==="x"?k.clientWidth:k.clientHeight:m==="x"?window.innerWidth:window.innerHeight}function F(){let w=u.getBoundingClientRect(),y=W(),z=m==="x"?w.left:w.top,T=m==="x"?w.width:w.height,U=ve({top:z,height:T},y,P(),C,te);he=U.tStart,H=U.tEnd;}function L(){if(!j)return;let{speed:w=1,easing:y="linear",once:z=false}=i.current,T=typeof y=="function"?y:K[y]??K.linear,U=Q(W(),he,H,w),ie=T(U);z&&(o.current=Math.max(o.current,ie),ie=o.current),t(ie),q=requestAnimationFrame(L);}let b=new IntersectionObserver(w=>{w.forEach(y=>{j=y.isIntersecting,j?q=requestAnimationFrame(L):cancelAnimationFrame(q);});},{root:k??null,threshold:0});F(),b.observe(u);let $;function A(){clearTimeout($),$=setTimeout(F,150);}return window.addEventListener("resize",A),window.addEventListener("orientationchange",A),()=>{cancelAnimationFrame(q),clearTimeout($),b.disconnect(),window.removeEventListener("resize",A),window.removeEventListener("orientationchange",A);}},[]),r}function Ue(e,n,r){let t=vr.useRef(n);t.current=n;let i=Rt(n);vr.useEffect(()=>{if(!e.current)return;let o=r(e.current,It(t.current,()=>t.current));return ()=>o.destroy()},[i]);}function Mn({children:e,className:n,style:r,...t}){let i=vr.useRef(null);return Ue(i,t,$t),jsxRuntime.jsx("div",{ref:i,className:n,style:r,children:e})}function Pn({children:e,className:n,style:r,...t}){let i=vr.useRef(null);return Ue(i,t,Dt),jsxRuntime.jsx("div",{ref:i,className:n,style:r,children:e})}function Ln({className:e,style:n,...r}){let t=vr.useRef(null);return Ue(t,r,Ht),jsxRuntime.jsx("span",{ref:t,className:e,style:n})}function Cn({src:e,className:n,style:r,muted:t=true,playsInline:i=true,...o}){let l=vr.useRef(null);return Ue(l,o,Vt),jsxRuntime.jsx("video",{ref:l,src:e,className:n,style:r,muted:t,playsInline:i,preload:"auto"})}function $n({children:e,as:n="p",className:r,style:t,...i}){let o=vr.useRef(null);return Ue(o,i,Bt),vr__default.default.createElement(n,{ref:o,className:r,style:t},e)}exports.ScrollAnimate=Pn;exports.ScrollCounter=Ln;exports.ScrollDraw=Mn;exports.ScrollText=$n;exports.ScrollVideo=Cn;exports.useScrollDrawProgress=wr;
2
+ 'use strict';var Pr=require('react'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Pr__default=/*#__PURE__*/_interopDefault(Pr);function nr({bounces:e=3,decay:n=.5}={}){let r=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,n)),o=Math.sqrt(t),s=0,a=[];for(let g=0;g<r;g++){let x=Math.pow(o,g);a.push(x),s+=x;}let c=[0],m=0;for(let g=0;g<r;g++)m+=a[g]/s,c.push(m);return g=>{if(g<=0)return 0;if(g>=1)return 1;for(let x=0;x<r;x++)if(g<=c[x+1]){let C=(g-c[x])/(c[x+1]-c[x]);if(x===0)return C*(2-C);let L=1-Math.pow(t,x);return L+(1-L)*(2*C-1)*(2*C-1)}return 1}}function or({amplitude:e=1,period:n=.4}={}){let r=Math.max(1,e),t=Math.max(.1,n),o=r<=1?t/4:t/(2*Math.PI)*Math.asin(1/r);return s=>s<=0?0:s>=1?1:r*Math.pow(2,-10*s)*Math.sin((s-o)*(2*Math.PI)/t)+1}var J={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:nr(),elastic:or()};function Tt(e,n,r){return Math.min(r,Math.max(n,e))}function ie(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 xt(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 At(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 Z(e,n,r,t){return r===n?0:Tt((e-n)/(r-n)*t,0,1)}function Se(e,n,r,t,o){let s=xt(e.top,e.height,n,t.element)-At(t.viewport,r),a=xt(e.top,e.height,n,o.element)-At(o.viewport,r);return {tStart:s,tEnd:a}}function nt(e,n,r){let t=e.getBoundingClientRect(),o=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:o,scroll:0}:{top:r==="x"?t.left:t.top,height:o,scroll:r==="x"?window.scrollX:window.scrollY}}function qe(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 Mt(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 We(e,n,r){let t=Mt(e),o=Mt(n);return !t||!o?e:`rgb(${Math.round(t[0]+(o[0]-t[0])*r)},${Math.round(t[1]+(o[1]-t[1])*r)},${Math.round(t[2]+(o[2]-t[2])*r)})`}var Lt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var je=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function we(e,...n){je&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var sr="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",ir="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Pt=33;function ar(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function lr(e){let n=[];for(let r=0;r<Pt;r++){let t=r/(Pt-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function ot(e){switch(e){case "linear":return "linear";case "ease-in":return sr;case "ease-out":return ir;case "ease-in-out":return ar()?lr(J["ease-in-out"]):null;default:return null}}var Ct=Symbol.for("svg-scroll-draw.registry");function $t(){let e=globalThis;return e[Ct]||(e[Ct]=new Map)}function Re(e,n){$t().set(e,n);}function Oe(e){$t().delete(e);}var Ue,st=new Set,it=new WeakMap,Xe=new Map,kt=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function cr(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 Fe(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>n();Ue??(Ue=new ResizeObserver(o=>{let s=false;for(let{target:a}of o)it.get(a)!==kt(a)&&(s=true),it.set(a,"");s&&st.forEach(a=>a());})),st.add(r);let t=cr(e);return [document.body,document.documentElement].forEach(o=>o&&t.add(o)),t.forEach(o=>{it.has(o)||it.set(o,kt(o)),Xe.set(o,(Xe.get(o)??0)+1),Ue.observe(o);}),()=>{st.delete(r)&&(t.forEach(o=>{let s=(Xe.get(o)??1)-1;if(s)return void Xe.set(o,s);Xe.delete(o),Ue?.unobserve(o);}),st.size||(Ue?.disconnect(),Ue=void 0));}}var ur=0;function mr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Rt(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var Ot=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function fr(e){if(!je)return;let n=Rt(e,"stroke");if(!n||n==="none"){we("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!Ot.has(r)&&!Ot.has(Rt(e,"fill"))&&we("Element has a fill \u2014 it may obscure the stroke animation.",e);}function pr(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 o(){let s=r==="x"?window.scrollX:window.scrollY,a=e-s,c=n-s,m=r==="x";t.innerHTML=`
3
+ <div style="position:absolute;${m?`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>
4
+ <div style="position:absolute;${m?`left:${c}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${c}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",o,{passive:true}),o(),{el:t,destroy(){window.removeEventListener("scroll",o),t.remove();}}}var It=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Ft=/[MmLlHhVvCcSsQqTtAaZz]/g;function dr(e,n,r){if(!je)return;let t=(e.match(Ft)??[]).join("").toUpperCase(),o=(n.match(Ft)??[]).join("").toUpperCase(),s=(e.match(It)??[]).length,a=(n.match(It)??[]).length;if(t!==o){we(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${o||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,r);return}s!==a&&we(`morphTo: coordinate count differs (${s} \u2192 ${a}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function pt(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let a=parseFloat(s),c=t[o++]??a;return String(+(a+(c-a)*r).toFixed(4))})}function Nt(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,o=r?{...Lt[r],...t}:t,s=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:a="path, polyline, line, polygon, rect, circle",speed:c=1,fade:m=false,easing:g="linear",trigger:x={},stagger:C=0,direction:L="forward",once:ee=false,debug:ve=false,axis:z="y",scrollContainer:K,autoReverse:V=false,delay:_=0,strokeColor:O,strokeWidth:$,fillOpacity:k,waypoints:b,velocityScale:P=false,threshold:v=0,rootMargin:w="0px",repeat:y=0,repeatDelay:U=0,morphTo:M,clip:q,autoplay:se=false,duration:he=1e3,native:be=true,onProgress:W,onStart:R,onComplete:f,onEnter:p,onLeave:I,onEnterBack:X,onLeaveBack:Te}=o,S=q===true?"left":typeof q=="string"?q:false,B=typeof g=="function"?g:J[g]??J.linear,ue=ie(x.start??"top bottom"),Ne=ie(x.end??"bottom top"),xe=typeof K=="string"?document.querySelector(K):K??null,Ae=Array.isArray(O)?O[0]:null,me=Array.isArray(O)?O[1]:typeof O=="string"?O:null,te=Array.isArray($)?$[0]:null,ae=Array.isArray($)?$[1]:typeof $=="number"?$:null,le=Array.isArray(k)?k[0]:null,re=Array.isArray(k)?k[1]:typeof k=="number"?k:null;function De(i){let u=i*100;switch(S){case "right":return `inset(0 0 0 ${100-u}%)`;case "top":return `inset(0 0 ${100-u}% 0)`;case "bottom":return `inset(${100-u}% 0 0 0)`;case "center":return `circle(${i*150}% at 50% 50%)`;default:return `inset(0 ${100-u}% 0 0)`}}let Y=S?[]:Array.from(e.querySelectorAll(a)),F=[],fe=[],pe=0,Ce=0,l=false,d=false,G=0,de=false,D=-1,ce=[],$e=-1,ne=false,H=0,Me=0,Le,lt=null;function gt(){lt?.destroy(),lt=null;}let ze=new Set,yt=NaN,Ve=true,Qe=-1,ht=performance.now(),_e=NaN;function ct(){return xe?z==="x"?xe.scrollLeft:xe.scrollTop:z==="x"?window.scrollX:window.scrollY}function bt(){return xe?z==="x"?xe.clientWidth:xe.clientHeight:z==="x"?window.innerWidth:window.innerHeight}function wt(){let i=nt(e,xe,z);return Se(i,i.scroll,bt(),ue,Ne)}function vt(){(({tStart:pe,tEnd:Ce}=wt())),ve&&je&&(gt(),lt=pr(pe,Ce,z));}function ut(i,u=wt){Re(e,{type:"draw",getProgress:()=>i.getProgress(),getTrigger:u});let T=i.destroy;return i.destroy=()=>{T.call(i),Oe(e);},i}function Jt(i,u){if(e.style.setProperty("--scroll-draw-progress",String(i)),S){let T=u==="reverse"?1-i:i;e.style.clipPath=De(T);return}Y.forEach((T,ge)=>{T.style.strokeDashoffset=u==="reverse"?`${F[ge]*i}`:`${F[ge]*(1-i)}`,m&&(T.style.opacity=u==="reverse"?`${1-i}`:`${i}`),Ae&&me?T.style.stroke=We(Ae,me,i):me&&(T.style.stroke=me),te!==null&&ae!==null?T.style.strokeWidth=`${te+(ae-te)*i}`:ae!==null&&(T.style.strokeWidth=`${ae}`),le!==null&&re!==null?T.style.fillOpacity=`${le+(re-le)*i}`:re!==null&&(T.style.fillOpacity=`${re}`),M&&T.tagName.toLowerCase()==="path"&&fe[ge]&&T.setAttribute("d",pt(fe[ge],M,i));});}function Je(){if(e.style.setProperty("--scroll-draw-progress","0"),S){e.style.clipPath=De(0);return}Y.forEach((i,u)=>{i.style.strokeDasharray=`${F[u]}`,i.style.strokeDashoffset=L==="reverse"?"0":`${F[u]}`,m?i.style.opacity=L==="reverse"?"1":"0":i.style.opacity="",Ae&&(i.style.stroke=Ae),te!==null&&(i.style.strokeWidth=`${te}`),le!==null&&(i.style.fillOpacity=`${le}`),M&&i.tagName.toLowerCase()==="path"&&fe[u]&&i.setAttribute("d",fe[u]);});}if(Y.forEach(i=>{fr(i);let u=qe(i);F.push(u);let T=i.tagName.toLowerCase()==="path";T?fe.push(i.getAttribute("d")??""):fe.push(""),M&&(T?dr(fe[fe.length-1],M,i):we(`morphTo only applies to <path> elements \u2014 ignored on <${i.tagName}>.`,i)),s?(i.style.strokeDasharray=`${u}`,i.style.strokeDashoffset=L==="reverse"?`${u}`:"0",m&&(i.style.opacity="1"),me&&(i.style.stroke=me),ae!==null&&(i.style.strokeWidth=`${ae}`),re!==null&&(i.style.fillOpacity=`${re}`),M&&i.tagName.toLowerCase()==="path"&&i.setAttribute("d",M)):(i.style.strokeDasharray=`${u}`,i.style.strokeDashoffset=L==="reverse"?"0":`${u}`,m?i.style.opacity=L==="reverse"?"1":"0":i.style.opacity="",Ae&&(i.style.stroke=Ae),te!==null&&(i.style.strokeWidth=`${te}`),le!==null&&(i.style.fillOpacity=`${le}`));}),S){if(s)return e.style.clipPath=De(1),f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=De(0);}else if(s)return f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Et=typeof g=="string"?ot(g):null;function Zt(){return !(be===false||!mr()||!Y.length||!Et||S||z!=="y"||xe||c!==1||C!==0||ee||V||P!==false||M||b||y||_>0||W||R||f||p||I||X||Te||O!=null||$!=null||k!=null||(x.start??"top bottom").trim()!=="top bottom"||(x.end??"bottom top").trim()!=="bottom top")}function er(){let i=++ur,u=`svg-scroll-draw-${i}`,T=`svg-scroll-draw-host-${i}`,ge=`--svg-scroll-draw-${i}`,He=L==="reverse"?"0":"var(--ssd-len)",Ie=L==="reverse"?"var(--ssd-len)":"0",ke=`stroke-dashoffset:${He};`,A=`stroke-dashoffset:${Ie};`;m&&(ke+=`opacity:${L==="reverse"?1:0};`,A+=`opacity:${L==="reverse"?0:1};`);let N=document.createElement("style");N.setAttribute("data-svg-scroll-draw",""),N.textContent=`@keyframes ${u}{from{${ke}}to{${A}}}.${T}{view-timeline-name:${ge};view-timeline-axis:block;}.${u}{animation-name:${u};animation-duration:auto;animation-timing-function:${Et};animation-fill-mode:both;animation-timeline:${ge};animation-range:cover 0% cover 100%;}`,document.head.appendChild(N),e.classList.add(T);function ye(h,oe){h.style.setProperty("--ssd-len",String(F[oe])),h.style.strokeDasharray=`${F[oe]}`,h.style.strokeDashoffset="",h.style.opacity="",h.style.animationPlayState="",h.classList.add(u);}Y.forEach(ye);let E=false,j=-1;function Q(){if(j>=0)return j;let h=e.getBoundingClientRect(),{tStart:oe,tEnd:Pe}=Se({top:h.top,height:h.height},ct(),bt(),ue,Ne);return B(Z(ct(),oe,Pe,c))}return {destroy(){e.classList.remove(T),Y.forEach(h=>{h.classList.remove(u),h.style.removeProperty("--ssd-len"),h.style.animationPlayState="";}),N.remove();},replay(){E=false,j=-1,Y.forEach(ye);},pause(){E=true,Y.forEach(h=>{h.style.animationPlayState="paused";});},resume(){E&&(E=false,Y.forEach(h=>{h.style.animationPlayState="running";}));},seek(h){let oe=Math.min(1,Math.max(0,h));j=oe,E=true,Y.forEach((Pe,Ee)=>{Pe.classList.remove(u),Pe.style.strokeDashoffset=L==="reverse"?`${F[Ee]*oe}`:`${F[Ee]*(1-oe)}`,m&&(Pe.style.opacity=L==="reverse"?`${1-oe}`:`${oe}`);});},getProgress(){return Q()},refresh(){Y.forEach((h,oe)=>{F[oe]=qe(h),h.style.setProperty("--ssd-len",String(F[oe])),h.style.strokeDasharray=`${F[oe]}`;});}}}if(Zt())return ut(er());function tr(){let i=Math.max(1,he),u=0,T=0,ge=false;function He(E){let j=true;if(S){let Q=Math.min(1,Math.max(0,E/i)),h=B(Q);H=h,e.style.setProperty("--scroll-draw-progress",String(h)),e.style.clipPath=De(L==="reverse"?1-h:h),W?.(h),Q<1&&(j=false);}else Y.forEach((Q,h)=>{let oe=h*C*i,Pe=Math.min(1,Math.max(0,(E-oe)/i)),Ee=B(Pe);Q.style.strokeDashoffset=L==="reverse"?`${F[h]*Ee}`:`${F[h]*(1-Ee)}`,m&&(Q.style.opacity=L==="reverse"?`${1-Ee}`:`${Ee}`),Ae&&me?Q.style.stroke=We(Ae,me,Ee):me&&(Q.style.stroke=me),te!==null&&ae!==null?Q.style.strokeWidth=`${te+(ae-te)*Ee}`:ae!==null&&(Q.style.strokeWidth=`${ae}`),le!==null&&re!==null?Q.style.fillOpacity=`${le+(re-le)*Ee}`:re!==null&&(Q.style.fillOpacity=`${re}`),M&&Q.tagName.toLowerCase()==="path"&&fe[h]&&Q.setAttribute("d",pt(fe[h],M,Ee)),h===0&&(H=Ee,W?.(Ee),e.style.setProperty("--scroll-draw-progress",String(Ee))),Pe<1&&(j=false);});if(b){let Q=Math.min(1,Math.max(0,E/i)),h=B(Q);for(let oe in b){let Pe=parseFloat(oe);h>=Pe&&!ze.has(Pe)&&(ze.add(Pe),b[oe]?.());}}return j}function Ie(E){if(ne)return;let j=E-u;d||(d=true,R?.());let Q=He(j);if(Q&&!l){l=true,He(i*(1+Math.max(0,Y.length-1)*C)),f?.(),Me<(y==="infinite"?1/0:y??0)&&(Me++,Le=setTimeout(()=>{u=performance.now(),d=false,l=false,ze.clear(),Je(),G=requestAnimationFrame(Ie);},U));return}Q||(G=requestAnimationFrame(Ie));}function ke(){cancelAnimationFrame(G),clearTimeout(Le),u=performance.now(),T=0,ne=false,d=false,l=false,Me=0,ge=true,H=0,ze.clear(),Je(),G=requestAnimationFrame(Ie);}let A=new IntersectionObserver(E=>{E.forEach(j=>{j.isIntersecting&&!(ee&&l)?ke():!j.isIntersecting&&!ee&&!l&&(cancelAnimationFrame(G),clearTimeout(Le),ge=false);});},{root:xe??null,threshold:v,rootMargin:w}),N;function ye(){clearTimeout(N),N=setTimeout(()=>{Y.forEach((E,j)=>{F[j]=qe(E),E.style.strokeDasharray=`${F[j]}`;});},150);}return window.addEventListener("resize",ye),window.addEventListener("orientationchange",ye),_>0?setTimeout(()=>A.observe(e),_):A.observe(e),{destroy(){cancelAnimationFrame(G),clearTimeout(Le),A.disconnect(),window.removeEventListener("resize",ye),window.removeEventListener("orientationchange",ye),clearTimeout(N);},replay(){Me=0,ke();},pause(){ne||!ge||(ne=true,T=performance.now()-u,cancelAnimationFrame(G));},resume(){ne&&(ne=false,ge=true,u=performance.now()-T,G=requestAnimationFrame(Ie));},seek(E){let j=Math.min(1,Math.max(0,E));H=j,ne=true,T=j*i,u=performance.now()-T,cancelAnimationFrame(G),He(T);},getProgress(){return H},refresh(){clearTimeout(N),Y.forEach((E,j)=>{F[j]=qe(E),E.style.strokeDasharray=`${F[j]}`;});}}}if(se)return ut(tr());vt();function Ze(){if(!de||ne)return;let i=performance.now(),u=ct();if(!Ve&&P===false&&u===yt){G=requestAnimationFrame(Ze);return}Ve=false,yt=u;let T=c;if(P!==false){let A=i-ht,N=A>0?Math.abs(u-(Qe<0?u:Qe))/A:0;T=c*Math.max(.2,1+N*(typeof P=="number"?P:1)*.04);}Qe=u,ht=i;let ge=V?$e===-1||u>=$e?"forward":"reverse":L;$e=u;let He=Ce-pe,Ie=true,ke=He===0?0:(u-pe)/He;if(isNaN(_e)||(_e<=0&&ke>0?p?.():_e>0&&ke<=0&&Te?.(),_e<1&&ke>=1?I?.():_e>=1&&ke<1&&X?.()),_e=ke,S){let A=B(Z(u,pe,Ce,T));ee&&!V&&(D=Math.max(D,A),A=D),H=A,e.style.setProperty("--scroll-draw-progress",String(A));let N=ge==="reverse"?1-A:A;e.style.clipPath=De(N),W?.(A),!d&&Z(u,pe,Ce,T)>0&&(d=true,R?.()),A>=1&&!l?(l=true,f?.(),Me<(y==="infinite"?1/0:y??0)&&(Me++,Le=setTimeout(()=>{D=-1,d=false,l=false,e.style.clipPath=De(0);},U))):A<1&&!ee&&(l=false),G=requestAnimationFrame(Ze);return}if(Y.forEach((A,N)=>{let ye=N*C*He,E=B(Z(u,pe+ye,Ce+ye,T));ee&&!V&&(E=ce[N]=Math.max(ce[N]??D,E)),A.style.strokeDashoffset=ge==="reverse"?`${F[N]*E}`:`${F[N]*(1-E)}`,m&&(A.style.opacity=ge==="reverse"?`${1-E}`:`${E}`),Ae&&me?A.style.stroke=We(Ae,me,E):me&&(A.style.stroke=me),te!==null&&ae!==null?A.style.strokeWidth=`${te+(ae-te)*E}`:ae!==null&&(A.style.strokeWidth=`${ae}`),le!==null&&re!==null?A.style.fillOpacity=`${le+(re-le)*E}`:re!==null&&(A.style.fillOpacity=`${re}`),M&&A.tagName.toLowerCase()==="path"&&fe[N]&&A.setAttribute("d",pt(fe[N],M,E)),N===0&&(H=E,W?.(E),e.style.setProperty("--scroll-draw-progress",String(E))),E<1&&(Ie=false);}),b){let A=B(Z(u,pe,Ce,T));for(let N in b){let ye=parseFloat(N);A>=ye&&!ze.has(ye)&&(ze.add(ye),b[N]?.());}}!d&&Z(u,pe,Ce,T)>0&&(d=true,R?.()),Ie&&!l?(l=true,f?.(),Me<(y==="infinite"?1/0:y??0)&&(Me++,Le=setTimeout(()=>{D=-1,ce=[],d=false,l=false,ze.clear(),Je(),Ve=true;},U))):!Ie&&!ee&&(l=false),G=requestAnimationFrame(Ze);}let mt=false;function et(){mt||(mt=true,G=requestAnimationFrame(function(){Ze();}));}function tt(){mt=false,cancelAnimationFrame(G);}let ft=new IntersectionObserver(i=>{i.forEach(u=>{de=u.isIntersecting,de&&!ne?(Ve=true,et()):tt();});},{root:xe??null,threshold:v,rootMargin:w});function St(){Y.forEach((i,u)=>{F[u]=qe(i),i.style.strokeDasharray=`${F[u]}`;}),vt(),Ve=true;}let rt;function Ge(){clearTimeout(rt),rt=setTimeout(St,150);}window.addEventListener("resize",Ge),window.addEventListener("orientationchange",Ge);let rr=Fe([e],Ge);return _>0?setTimeout(()=>ft.observe(e),_):ft.observe(e),ut({destroy(){cancelAnimationFrame(G),clearTimeout(Le),tt(),ft.disconnect(),rr(),window.removeEventListener("resize",Ge),window.removeEventListener("orientationchange",Ge),clearTimeout(rt),gt();},replay(){D=-1,ce=[],$e=-1,Qe=-1,d=false,l=false,Me=0,ne=false,H=0,ze.clear(),clearTimeout(Le),Je(),Ve=true,de&&et();},pause(){ne=true,tt();},resume(){ne&&(ne=false,Ve=true,de&&et());},seek(i){let u=Math.min(1,Math.max(0,i));H=u,D=u,ce=[],ne=true,tt(),Jt(u,L),Ve=true;},getProgress(){return H},refresh(){clearTimeout(rt),St(),de&&!ne&&et();}},()=>({tStart:pe,tEnd:Ce}))}var Dt=new WeakMap,gr=0;function Ht(e){return JSON.stringify(e,(n,r)=>{if(typeof r=="function")return "\u0192";if(typeof Element<"u"&&r instanceof Element){let t=Dt.get(r);return t===void 0&&Dt.set(r,t=++gr),`el#${t}`}return r})}function zt(e,n){let r={...e};for(let t of Object.keys(r))typeof r[t]=="function"&&(r[t]=(...o)=>n()[t]?.(...o));return r}function yr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Vt(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let o=[],s=[],a=t[2].trim();if(a)for(let c of a.split(/[\s,]+/)){let m=c.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(m?parseFloat(m[1]):0),s.push(m?m[2]:"");}n.push({fn:t[1],nums:o,units:s});}return n}function hr(e,n,r){let t=Vt(e),o=Vt(n);return t.length===0||t.length!==o.length?r<1?e:n:t.map((s,a)=>{let c=o[a];return s.fn!==c.fn||s.nums.length!==c.nums.length?r<1?`${s.fn}(${s.nums.map((m,g)=>`${m}${s.units[g]}`).join(", ")})`:`${c.fn}(${c.nums.map((m,g)=>`${m}${c.units[g]}`).join(", ")})`:`${s.fn}(${s.nums.map((m,g)=>`${m+(c.nums[g]-m)*r}${s.units[g]}`).join(", ")})`}).join(" ")}function _t(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),o=String(n);if(yr(t))return We(t,o,r);if(t.includes("("))return hr(t,o,r);let s=t.match(/^([-+]?[\d.]+)(.*)$/),a=o.match(/^([-+]?[\d.]+)(.*)$/);if(s&&a){let c=parseFloat(s[1]),m=parseFloat(a[1]);return `${c+(m-c)*r}${s[2]||a[2]}`}return r<1?t:o}function br(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var wr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),vr=0,qt="--scroll-draw-progress";function Er(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Wt(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:t,trigger:o={},easing:s="ease-out",speed:a=1,once:c=false,axis:m="y",scrollContainer:g,native:x=true,velocityScale:C=false,respectReducedMotion:L=true,triggerElement:ee,onProgress:ve,onComplete:z,onEnter:K,onLeave:V,onEnterBack:_,onLeaveBack:O}=n,$=L&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,k=typeof s=="function"?s:J[s]??J["ease-out"],b=ie(o.start??"top bottom"),P=ie(o.end??"bottom top"),v=ee??e,w=typeof g=="string"?document.querySelector(g):g??null,y=Object.entries(t).map(([l,d])=>({prop:br(l),from:Array.isArray(d)?d[0]:"",to:Array.isArray(d)?d[1]:d}));function U(){let l=window.getComputedStyle(e);for(let d of y)d.from===""&&(d.from=l.getPropertyValue(d.prop).trim()||"0");}function M(){for(let l of y)e.style.setProperty(l.prop,String(l.to));}let q=new Map;for(let l of [...y.map(d=>d.prop),qt])q.set(l,e.style.getPropertyValue(l));function se(){for(let[l,d]of q)d?e.style.setProperty(l,d):e.style.removeProperty(l);}if($)return M(),z?.(),{...r,destroy:se,getProgress:()=>1};U();let he=typeof s=="string"?ot(s):null;function be(){if(!x||!Er()||!he||m!=="y"||w||v!==e||c||a!==1||ve||z||K||V||_||O||C!==false||(o.start??"top bottom").trim()!=="top bottom"||(o.end??"bottom top").trim()!=="bottom top")return false;for(let l of y)if(!wr.has(l.prop))return false;return true}function W(){let l=`ssd-a-${++vr}`,d=y.map(H=>`${H.prop}:${H.from}`).join(";"),G=y.map(H=>`${H.prop}:${H.to}`).join(";"),de=document.createElement("style");de.setAttribute("data-ssd-animate",""),de.textContent=`@keyframes ${l}{from{${d}}to{${G}}}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${he};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(de),e.classList.add(l);let D=()=>m==="x"?window.scrollX:window.scrollY,ce=()=>m==="x"?window.innerWidth:window.innerHeight,$e=()=>{let H=e.getBoundingClientRect();return Se({top:H.top,height:H.height},D(),ce(),b,P)};Re(e,{type:"animate",getProgress:()=>ne.getProgress(),getTrigger:$e});let ne={refresh(){},destroy(){e.classList.remove(l),de.remove(),e.style.animationPlayState="",se(),Oe(e);},replay(){e.classList.remove(l),e.offsetWidth,e.classList.add(l);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(H){let Me=Math.min(1,Math.max(0,H));e.classList.remove(l);for(let Le of y)e.style.setProperty(Le.prop,_t(Le.from,Le.to,Me));},getProgress(){let{tStart:H,tEnd:Me}=$e();return k(Z(D(),H,Me,a))}};return ne}if(be())return W();let R=0,f=0,p=0,I=false,X=false,Te=-1,S=0,B=false,ue=NaN,Ne=-1,xe=0,Ae=()=>w?m==="x"?w.scrollLeft:w.scrollTop:m==="x"?window.scrollX:window.scrollY,me=()=>w?m==="x"?w.clientWidth:w.clientHeight:m==="x"?window.innerWidth:window.innerHeight,te=v===e?y:[],ae=false;function le(){let l=e.style,d=te.map(ce=>l.getPropertyValue(ce.prop)),G=l.transition;te.length&&(l.transition="none"),te.forEach(ce=>l.setProperty(ce.prop,q.get(ce.prop)??""));let de=nt(v,w,m);te.forEach((ce,$e)=>l.setProperty(ce.prop,d[$e])),te.length&&(e.offsetWidth,l.transition=G);let D=Se(de,de.scroll,me(),b,P);ae&&Math.abs(D.tStart-R)<1&&Math.abs(D.tEnd-f)<1||(ae=true,R=D.tStart,f=D.tEnd);}function re(l){e.style.setProperty(qt,String(l));for(let d of y)e.style.setProperty(d.prop,_t(d.from,d.to,l));ve?.(l);}function De(l){if(isNaN(ue)){ue=l;return}ue<=0&&l>0?K?.():ue>0&&l<=0&&O?.(),ue<1&&l>=1?V?.():ue>=1&&l<1&&_?.(),ue=l;}function Y(){if(!I||X)return;let l=performance.now(),d=Ae(),G=a;if(C!==false){let ce=l-xe,$e=ce>0?Math.abs(d-(Ne<0?d:Ne))/ce:0;G=a*Math.max(.2,1+$e*(typeof C=="number"?C:1)*.04);}Ne=d,xe=l;let de=f===R?0:(d-R)/(f-R);De(de);let D=k(Z(d,R,f,G));c&&(Te=Math.max(Te,D),D=Te),S=D,re(D),D>=1&&!B?(B=true,z?.()):D<1&&!c&&(B=false),p=requestAnimationFrame(Y);}le(),f===R&&we("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let l=k(Z(Ae(),R,f,a));c&&l>0&&(Te=l),S=l,re(l);}let F=new IntersectionObserver(l=>{l.forEach(d=>{I=d.isIntersecting,I&&!X?p=requestAnimationFrame(Y):cancelAnimationFrame(p);});},{root:w??null}),fe;function pe(){clearTimeout(fe),fe=setTimeout(le,150);}window.addEventListener("resize",pe),window.addEventListener("orientationchange",pe);let Ce=Fe([v],pe);return F.observe(e),Re(e,{type:"animate",getProgress:()=>S,getTrigger:()=>({tStart:R,tEnd:f})}),{destroy(){cancelAnimationFrame(p),F.disconnect(),window.removeEventListener("resize",pe),window.removeEventListener("orientationchange",pe),Ce(),clearTimeout(fe),se(),Oe(e);},replay(){Te=-1,B=false,S=0,X=false,re(0);},pause(){X=true,cancelAnimationFrame(p);},resume(){X&&(X=false,I&&(p=requestAnimationFrame(Y)));},seek(l){let d=Math.min(1,Math.max(0,l));S=d,Te=d,X=true,cancelAnimationFrame(p),re(d);},getProgress(){return S},refresh(){le();}}}var dt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Bt(e,n){if(typeof window>"u")return dt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return we("scrollCounter: element not found:",e),dt;let t=r,{from:o=0,to:s,format:a,easing:c="ease-out",trigger:m={},once:g=true,decimals:x,onComplete:C}=n,L=x!==void 0?f=>f.toFixed(x):a??(f=>String(Math.round(f))),ee=typeof c=="function"?c:J[c]??J["ease-out"],ve=ie(m.start??"top 80%"),z=ie(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=L(s),C?.(),dt;let V=0,_=0,O=false,$=0,k=false,b=false,P=-1,v=0,w=false,y=()=>window.scrollY,U=()=>window.innerHeight;function M(){let f=t.getBoundingClientRect(),p=Se({top:f.top,height:f.height},y(),U(),ve,z);O&&Math.abs(p.tStart-V)<1&&Math.abs(p.tEnd-_)<1||(O=true,V=p.tStart,_=p.tEnd);}function q(f){t.textContent=L(o+(s-o)*f),t.style.setProperty("--scroll-draw-progress",String(f));}function se(){if(!k||b)return;let f=ee(Z(y(),V,_,1));g&&(P=Math.max(P,f),f=P),v=f,q(f),f>=1&&!w?(w=true,C?.()):f<1&&!g&&(w=false),$=requestAnimationFrame(se);}M();{let f=ee(Z(y(),V,_,1));g&&f>0&&(P=f),v=f,q(f);}let he=new IntersectionObserver(f=>{f.forEach(p=>{k=p.isIntersecting,k&&!b?$=requestAnimationFrame(se):cancelAnimationFrame($);});}),be;function W(){clearTimeout(be),be=setTimeout(M,150);}window.addEventListener("resize",W),window.addEventListener("orientationchange",W);let R=Fe([t],W);return he.observe(t),Re(t,{type:"counter",getProgress:()=>v,getTrigger:()=>({tStart:V,tEnd:_})}),{destroy(){cancelAnimationFrame($),he.disconnect(),window.removeEventListener("resize",W),window.removeEventListener("orientationchange",W),R(),clearTimeout(be),Oe(t);},replay(){P=-1,w=false,v=0,b=false,q(0);},pause(){b=true,cancelAnimationFrame($);},resume(){b&&(b=false,k&&($=requestAnimationFrame(se)));},seek(f){let p=Math.min(1,Math.max(0,f));v=p,P=p,b=true,cancelAnimationFrame($),q(p);},getProgress(){return v}}}var Gt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function jt(e,n={}){if(typeof window>"u")return Gt;let r=typeof e=="string"?document.querySelector(e):e;if(!r||r.tagName.toLowerCase()!=="video")return we("scrollVideo: <video> element not found:",e),Gt;let t=r,{trigger:o={},easing:s="linear",once:a=false,axis:c="y",preload:m="auto",triggerElement:g,onReady:x,onComplete:C,onProgress:L}=n,ee=g??t,ve=window.matchMedia("(prefers-reduced-motion: reduce)").matches,z=typeof s=="function"?s:J[s]??J.linear,K=ie(o.start??"top top"),V=ie(o.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let _=n.from??0,O=n.to,$=0,k=0,b=0,P=false,v=false,w=-1,y=0,U=false,M=false,q=()=>c==="x"?window.scrollX:window.scrollY,se=()=>c==="x"?window.innerWidth:window.innerHeight;function he(){let S=ee.getBoundingClientRect(),B=c==="x"?S.left:S.top,ue=c==="x"?S.width:S.height,Ne=Se({top:B,height:ue},q(),se(),K,V);$=Ne.tStart,k=Ne.tEnd,M&&k===$&&we("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t);}let be=NaN;function W(S){if(!M)return;let B=O??t.duration??0,ue=_+(B-_)*S;ue!==be&&(be=ue,t.currentTime=ue),t.style.setProperty("--scroll-draw-progress",String(S)),L?.(S);}function R(){if(!P||v||!M||ve)return;let S=z(Z(q(),$,k,1));a&&(w=Math.max(w,S),S=w),y=S,W(S),S>=1&&!U?(U=true,C?.()):S<1&&!a&&(U=false),b=requestAnimationFrame(R);}function f(){if(M=true,O===void 0&&(O=t.duration),ve){W(1),x?.();return}he(),x?.(),P&&!v&&(b=requestAnimationFrame(R));}t.readyState>=1?f():t.addEventListener("loadedmetadata",f,{once:true}),M||he();let p=new IntersectionObserver(S=>{S.forEach(B=>{P=B.isIntersecting,P&&!v&&M?b=requestAnimationFrame(R):cancelAnimationFrame(b);});}),I;function X(){clearTimeout(I),I=setTimeout(he,150);}window.addEventListener("resize",X),window.addEventListener("orientationchange",X);let Te=Fe([ee],X);return p.observe(t),Re(t,{type:"video",getProgress:()=>y,getTrigger:()=>({tStart:$,tEnd:k})}),{destroy(){cancelAnimationFrame(b),p.disconnect(),t.removeEventListener("loadedmetadata",f),window.removeEventListener("resize",X),window.removeEventListener("orientationchange",X),Te(),clearTimeout(I),Oe(t);},replay(){w=-1,U=false,y=0,v=false,be=NaN,W(0);},pause(){v=true,cancelAnimationFrame(b);},resume(){v&&(v=false,P&&M&&(b=requestAnimationFrame(R)));},seek(S){let B=Math.min(1,Math.max(0,S));y=B,w=B,v=true,cancelAnimationFrame(b),be=NaN,W(B);},getProgress(){return y}}}function Yt(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 Sr(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 Ut(e){let n=Yt(e),r=new Map;for(let s of n){let a=s.offsetTop;r.has(a)||r.set(a,[]),r.get(a).push(s);}let t=[],o=Array.from(r.keys()).sort((s,a)=>s-a);for(let s of o){let a=r.get(s),c=document.createElement("span");c.setAttribute("aria-hidden","true"),c.style.display="inline-block",a.forEach((m,g)=>{let x=m.nextElementSibling;c.appendChild(m),g<a.length-1&&x&&x.style.whiteSpace==="pre"&&c.appendChild(x);}),t.push(c);}return e.textContent="",t.forEach((s,a)=>{e.appendChild(s),a<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function Tr(e,n,r,t){if(r<=1||t===0)return e;let o=(r-1)*t,s=n*t,a=s+(1-o);return a<=s?e>=s?1:0:Math.min(1,Math.max(0,(e-s)/(a-s)))}function xr(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 Xt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Kt(e,n={}){if(typeof window>"u")return Xt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return we("scrollText: element not found:",e),Xt;let t=r,{split:o="words",stagger:s=.04,easing:a="ease-out",from:c={opacity:0,y:24},trigger:m={},once:g=true,onComplete:x}=n,C=window.matchMedia("(prefers-reduced-motion: reduce)").matches,L=typeof a=="function"?a:J[a]??J["ease-out"],ee=ie(m.start??"top 85%"),ve=ie(m.end??"top 40%"),z=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let K;o==="chars"?K=Sr(t):o==="lines"?K=Ut(t):K=Yt(t);let V=K.length;function _(p,I){c?.opacity!==void 0&&(p.style.opacity=String(c.opacity+(1-c.opacity)*I));let X=xr(I,c);X&&(p.style.transform=X);}function O(p){t.style.setProperty("--scroll-draw-progress",String(p)),K.forEach((I,X)=>{let Te=L(Tr(p,X,V,s));_(I,Te);});}if(C)return O(1),x?.(),{destroy(){t.innerHTML=z,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};O(0);let $=0,k=0,b=0,P=false,v=false,w=-1,y=0,U=false,M=()=>window.scrollY,q=()=>window.innerHeight;function se(){let p=t.getBoundingClientRect(),I=Se({top:p.top,height:p.height},M(),q(),ee,ve);$=I.tStart,k=I.tEnd;}function he(){if(!P||v)return;let p=Z(M(),$,k,1);g&&(w=Math.max(w,p),p=w),y=p,O(p),p>=1&&!U?(U=true,x?.()):p<1&&!g&&(U=false),b=requestAnimationFrame(he);}se();let be=new IntersectionObserver(p=>{p.forEach(I=>{P=I.isIntersecting,P&&!v?b=requestAnimationFrame(he):cancelAnimationFrame(b);});}),W;function R(){clearTimeout(W),W=setTimeout(()=>{if(o==="lines"){let p=y;t.innerHTML=z,t.setAttribute("aria-label",t.textContent??""),K=Ut(t),O(p);}se();},150);}window.addEventListener("resize",R),window.addEventListener("orientationchange",R);let f=Fe([t],R);return be.observe(t),Re(t,{type:"text",getProgress:()=>y,getTrigger:()=>({tStart:$,tEnd:k})}),{destroy(){cancelAnimationFrame(b),be.disconnect(),window.removeEventListener("resize",R),window.removeEventListener("orientationchange",R),f(),clearTimeout(W),t.innerHTML=z,t.removeAttribute("aria-label"),Oe(t);},replay(){w=-1,U=false,y=0,v=false,O(0);},pause(){v=true,cancelAnimationFrame(b);},resume(){v&&(v=false,P&&(b=requestAnimationFrame(he)));},seek(p){let I=Math.min(1,Math.max(0,p));y=I,w=I,v=true,cancelAnimationFrame(b),O(I);},getProgress(){return y}}}function Lr(e,n={}){let[r,t]=Pr.useState(0),o=Pr.useRef(n);o.current=n;let s=Pr.useRef(-1);return Pr.useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){t(1);return}let a=typeof e=="string"?document.querySelector(e):e.current;if(!a)return;let c=a,{axis:m="y",scrollContainer:g,trigger:x={}}=o.current,C=typeof g=="string"?document.querySelector(g):g??null,L=ie(x.start??"top bottom"),ee=ie(x.end??"bottom top"),ve=0,z=0,K=false,V=0;function _(){return C?m==="x"?C.scrollLeft:C.scrollTop:m==="x"?window.scrollX:window.scrollY}function O(){return C?m==="x"?C.clientWidth:C.clientHeight:m==="x"?window.innerWidth:window.innerHeight}function $(){let w=c.getBoundingClientRect(),y=_(),U=m==="x"?w.left:w.top,M=m==="x"?w.width:w.height,q=Se({top:U,height:M},y,O(),L,ee);ve=q.tStart,z=q.tEnd;}function k(){if(!K)return;let{speed:w=1,easing:y="linear",once:U=false}=o.current,M=typeof y=="function"?y:J[y]??J.linear,q=Z(_(),ve,z,w),se=M(q);U&&(s.current=Math.max(s.current,se),se=s.current),t(se),V=requestAnimationFrame(k);}let b=new IntersectionObserver(w=>{w.forEach(y=>{K=y.isIntersecting,K?V=requestAnimationFrame(k):cancelAnimationFrame(V);});},{root:C??null,threshold:0});$(),b.observe(c);let P;function v(){clearTimeout(P),P=setTimeout($,150);}return window.addEventListener("resize",v),window.addEventListener("orientationchange",v),()=>{cancelAnimationFrame(V),clearTimeout(P),b.disconnect(),window.removeEventListener("resize",v),window.removeEventListener("orientationchange",v);}},[]),r}function Ye(e,n,r){let t=Pr.useRef(n);t.current=n;let o=Ht(n);Pr.useEffect(()=>{if(!e.current)return;let s=r(e.current,zt(t.current,()=>t.current));return ()=>s.destroy()},[o]);}var $r=/^(data-|aria-)|^(id|role|title|tabIndex|lang|dir|hidden)$/;function Ke(e){let n={},r={};for(let[t,o]of Object.entries(e))($r.test(t)?r:n)[t]=o;return [n,r]}function _n({children:e,className:n,style:r,...t}){let o=Pr.useRef(null),[s,a]=Ke(t);return Ye(o,s,Nt),jsxRuntime.jsx("div",{ref:o,className:n,style:r,...a,children:e})}function qn({children:e,className:n,style:r,...t}){let o=Pr.useRef(null),[s,a]=Ke(t);return Ye(o,s,Wt),jsxRuntime.jsx("div",{ref:o,className:n,style:r,...a,children:e})}function Wn({className:e,style:n,...r}){let t=Pr.useRef(null),[o,s]=Ke(r);return Ye(t,o,Bt),jsxRuntime.jsx("span",{ref:t,className:e,style:n,...s})}function Bn({src:e,className:n,style:r,muted:t=true,playsInline:o=true,...s}){let a=Pr.useRef(null),[c,m]=Ke(s);return Ye(a,c,jt),jsxRuntime.jsx("video",{...m,ref:a,src:e,className:n,style:r,muted:t,playsInline:o,preload:"auto"})}function Gn({children:e,as:n="p",className:r,style:t,...o}){let s=Pr.useRef(null),[a,c]=Ke(o);return Ye(s,a,Kt),Pr__default.default.createElement(n,{...c,ref:s,className:r,style:t},e)}exports.ScrollAnimate=qn;exports.ScrollCounter=Wn;exports.ScrollDraw=_n;exports.ScrollText=Gn;exports.ScrollVideo=Bn;exports.useScrollDrawProgress=Lr;
@@ -1,8 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React, { RefObject } from 'react';
3
- import { E as EasingName, T as TriggerConfig, a as ScrollDrawOptions } from '../types-DHU1zNEw.mjs';
4
- import { S as ScrollAnimateOptions } from '../engine-Ci08nM91.mjs';
5
- import { S as ScrollCounterOptions } from '../index-BDGQEK6X.mjs';
3
+ import { E as EasingName, T as TriggerConfig, a as ScrollDrawOptions } from '../types-B0YM4nQP.mjs';
4
+ import { S as ScrollAnimateOptions } from '../engine-CvzRSkuk.mjs';
5
+ import { S as ScrollCounterOptions } from '../index-BlIjovDN.mjs';
6
6
  import { ScrollVideoOptions } from '../video/index.mjs';
7
7
  import { ScrollTextOptions } from '../text/index.mjs';
8
8
 
@@ -32,38 +32,41 @@ interface UseScrollDrawProgressOptions {
32
32
  */
33
33
  declare function useScrollDrawProgress(target: RefObject<Element | null> | string, options?: UseScrollDrawProgressOptions): number;
34
34
 
35
- type ScrollDrawProps = ScrollDrawOptions & {
35
+ type ElementAttrs = React.AriaAttributes & Pick<React.HTMLAttributes<HTMLElement>, 'id' | 'role' | 'title' | 'tabIndex' | 'lang' | 'dir' | 'hidden'> & {
36
+ [data: `data-${string}`]: string | number | boolean | undefined;
37
+ };
38
+ type ScrollDrawProps = ScrollDrawOptions & ElementAttrs & {
36
39
  children: React.ReactNode;
37
40
  className?: string;
38
41
  style?: React.CSSProperties;
39
42
  };
40
- declare function ScrollDraw({ children, className, style, ...options }: ScrollDrawProps): react_jsx_runtime.JSX.Element;
41
- type ScrollAnimateProps = ScrollAnimateOptions & {
43
+ declare function ScrollDraw({ children, className, style, ...rest }: ScrollDrawProps): react_jsx_runtime.JSX.Element;
44
+ type ScrollAnimateProps = ScrollAnimateOptions & ElementAttrs & {
42
45
  children: React.ReactNode;
43
46
  className?: string;
44
47
  style?: React.CSSProperties;
45
48
  };
46
- declare function ScrollAnimate({ children, className, style, ...options }: ScrollAnimateProps): react_jsx_runtime.JSX.Element;
47
- type ScrollCounterProps = ScrollCounterOptions & {
49
+ declare function ScrollAnimate({ children, className, style, ...rest }: ScrollAnimateProps): react_jsx_runtime.JSX.Element;
50
+ type ScrollCounterProps = ScrollCounterOptions & ElementAttrs & {
48
51
  className?: string;
49
52
  style?: React.CSSProperties;
50
53
  };
51
- declare function ScrollCounter({ className, style, ...options }: ScrollCounterProps): react_jsx_runtime.JSX.Element;
52
- type ScrollVideoProps = ScrollVideoOptions & {
54
+ declare function ScrollCounter({ className, style, ...rest }: ScrollCounterProps): react_jsx_runtime.JSX.Element;
55
+ type ScrollVideoProps = ScrollVideoOptions & ElementAttrs & {
53
56
  src: string;
54
57
  className?: string;
55
58
  style?: React.CSSProperties;
56
59
  muted?: boolean;
57
60
  playsInline?: boolean;
58
61
  };
59
- declare function ScrollVideo({ src, className, style, muted, playsInline, ...options }: ScrollVideoProps): react_jsx_runtime.JSX.Element;
60
- type ScrollTextProps = ScrollTextOptions & {
62
+ declare function ScrollVideo({ src, className, style, muted, playsInline, ...rest }: ScrollVideoProps): react_jsx_runtime.JSX.Element;
63
+ type ScrollTextProps = ScrollTextOptions & ElementAttrs & {
61
64
  children: string;
62
65
  as?: keyof React.JSX.IntrinsicElements;
63
66
  className?: string;
64
67
  style?: React.CSSProperties;
65
68
  };
66
- declare function ScrollText({ children, as: Tag, className, style, ...options }: ScrollTextProps): React.ReactElement<{
69
+ declare function ScrollText({ children, as: Tag, className, style, ...rest }: ScrollTextProps): React.ReactElement<{
67
70
  ref: React.RefObject<HTMLElement>;
68
71
  className: string | undefined;
69
72
  style: React.CSSProperties | undefined;
@@ -1,8 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React, { RefObject } from 'react';
3
- import { E as EasingName, T as TriggerConfig, a as ScrollDrawOptions } from '../types-DHU1zNEw.js';
4
- import { S as ScrollAnimateOptions } from '../engine-6AXEX8CL.js';
5
- import { S as ScrollCounterOptions } from '../index-DxjUOIbK.js';
3
+ import { E as EasingName, T as TriggerConfig, a as ScrollDrawOptions } from '../types-B0YM4nQP.js';
4
+ import { S as ScrollAnimateOptions } from '../engine-C9LKls__.js';
5
+ import { S as ScrollCounterOptions } from '../index-DZjvLJcU.js';
6
6
  import { ScrollVideoOptions } from '../video/index.js';
7
7
  import { ScrollTextOptions } from '../text/index.js';
8
8
 
@@ -32,38 +32,41 @@ interface UseScrollDrawProgressOptions {
32
32
  */
33
33
  declare function useScrollDrawProgress(target: RefObject<Element | null> | string, options?: UseScrollDrawProgressOptions): number;
34
34
 
35
- type ScrollDrawProps = ScrollDrawOptions & {
35
+ type ElementAttrs = React.AriaAttributes & Pick<React.HTMLAttributes<HTMLElement>, 'id' | 'role' | 'title' | 'tabIndex' | 'lang' | 'dir' | 'hidden'> & {
36
+ [data: `data-${string}`]: string | number | boolean | undefined;
37
+ };
38
+ type ScrollDrawProps = ScrollDrawOptions & ElementAttrs & {
36
39
  children: React.ReactNode;
37
40
  className?: string;
38
41
  style?: React.CSSProperties;
39
42
  };
40
- declare function ScrollDraw({ children, className, style, ...options }: ScrollDrawProps): react_jsx_runtime.JSX.Element;
41
- type ScrollAnimateProps = ScrollAnimateOptions & {
43
+ declare function ScrollDraw({ children, className, style, ...rest }: ScrollDrawProps): react_jsx_runtime.JSX.Element;
44
+ type ScrollAnimateProps = ScrollAnimateOptions & ElementAttrs & {
42
45
  children: React.ReactNode;
43
46
  className?: string;
44
47
  style?: React.CSSProperties;
45
48
  };
46
- declare function ScrollAnimate({ children, className, style, ...options }: ScrollAnimateProps): react_jsx_runtime.JSX.Element;
47
- type ScrollCounterProps = ScrollCounterOptions & {
49
+ declare function ScrollAnimate({ children, className, style, ...rest }: ScrollAnimateProps): react_jsx_runtime.JSX.Element;
50
+ type ScrollCounterProps = ScrollCounterOptions & ElementAttrs & {
48
51
  className?: string;
49
52
  style?: React.CSSProperties;
50
53
  };
51
- declare function ScrollCounter({ className, style, ...options }: ScrollCounterProps): react_jsx_runtime.JSX.Element;
52
- type ScrollVideoProps = ScrollVideoOptions & {
54
+ declare function ScrollCounter({ className, style, ...rest }: ScrollCounterProps): react_jsx_runtime.JSX.Element;
55
+ type ScrollVideoProps = ScrollVideoOptions & ElementAttrs & {
53
56
  src: string;
54
57
  className?: string;
55
58
  style?: React.CSSProperties;
56
59
  muted?: boolean;
57
60
  playsInline?: boolean;
58
61
  };
59
- declare function ScrollVideo({ src, className, style, muted, playsInline, ...options }: ScrollVideoProps): react_jsx_runtime.JSX.Element;
60
- type ScrollTextProps = ScrollTextOptions & {
62
+ declare function ScrollVideo({ src, className, style, muted, playsInline, ...rest }: ScrollVideoProps): react_jsx_runtime.JSX.Element;
63
+ type ScrollTextProps = ScrollTextOptions & ElementAttrs & {
61
64
  children: string;
62
65
  as?: keyof React.JSX.IntrinsicElements;
63
66
  className?: string;
64
67
  style?: React.CSSProperties;
65
68
  };
66
- declare function ScrollText({ children, as: Tag, className, style, ...options }: ScrollTextProps): React.ReactElement<{
69
+ declare function ScrollText({ children, as: Tag, className, style, ...rest }: ScrollTextProps): React.ReactElement<{
67
70
  ref: React.RefObject<HTMLElement>;
68
71
  className: string | undefined;
69
72
  style: React.CSSProperties | undefined;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import {a as a$1,b as b$1}from'../chunk-XSVTHCLO.mjs';import {a as a$4}from'../chunk-TIRZOSQ4.mjs';import {a as a$5}from'../chunk-SNCRC6BA.mjs';import {a as a$3}from'../chunk-4MH5SQTH.mjs';import {a as a$2}from'../chunk-QJ4H2HW3.mjs';import {b as b$2}from'../chunk-LINFV2GK.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import {a,c,b}from'../chunk-PEFR3ZB7.mjs';import {d}from'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';import Y,{useState,useRef,useEffect}from'react';import {jsx}from'react/jsx-runtime';function K(r,t={}){let[n,e]=useState(0),o=useRef(t);o.current=t;let s=useRef(-1);return useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){e(1);return}let u=typeof r=="string"?document.querySelector(r):r.current;if(!u)return;let b$1=u,{axis:a$1="y",scrollContainer:y,trigger:h={}}=o.current,l=typeof y=="string"?document.querySelector(y):y??null,W=a(h.start??"top bottom"),X=a(h.end??"bottom top"),O=0,C=0,w=false,f=0;function N(){return l?a$1==="x"?l.scrollLeft:l.scrollTop:a$1==="x"?window.scrollX:window.scrollY}function B(){return l?a$1==="x"?l.clientWidth:l.clientHeight:a$1==="x"?window.innerWidth:window.innerHeight}function D(){let i=b$1.getBoundingClientRect(),c$1=N(),v=a$1==="x"?i.left:i.top,x=a$1==="x"?i.width:i.height,g=c({top:v,height:x},c$1,B(),W,X);O=g.tStart,C=g.tEnd;}function A(){if(!w)return;let{speed:i=1,easing:c="linear",once:v=false}=o.current,x=typeof c=="function"?c:d[c]??d.linear,g=b(N(),O,C,i),P=x(g);v&&(s.current=Math.max(s.current,P),P=s.current),e(P),f=requestAnimationFrame(A);}let L=new IntersectionObserver(i=>{i.forEach(c=>{w=c.isIntersecting,w?f=requestAnimationFrame(A):cancelAnimationFrame(f);});},{root:l??null,threshold:0});D(),L.observe(b$1);let E;function d$1(){clearTimeout(E),E=setTimeout(D,150);}return window.addEventListener("resize",d$1),window.addEventListener("orientationchange",d$1),()=>{cancelAnimationFrame(f),clearTimeout(E),L.disconnect(),window.removeEventListener("resize",d$1),window.removeEventListener("orientationchange",d$1);}},[]),n}function p(r,t,n){let e=useRef(t);e.current=t;let o=a$1(t);useEffect(()=>{if(!r.current)return;let s=n(r.current,b$1(e.current,()=>e.current));return ()=>s.destroy()},[o]);}function ce({children:r,className:t,style:n,...e}){let o=useRef(null);return p(o,e,b$2),jsx("div",{ref:o,className:t,style:n,children:r})}function ae({children:r,className:t,style:n,...e}){let o=useRef(null);return p(o,e,a$2),jsx("div",{ref:o,className:t,style:n,children:r})}function me({className:r,style:t,...n}){let e=useRef(null);return p(e,n,a$3),jsx("span",{ref:e,className:r,style:t})}function ue({src:r,className:t,style:n,muted:e=true,playsInline:o=true,...s}){let u=useRef(null);return p(u,s,a$4),jsx("video",{ref:u,src:r,className:t,style:n,muted:e,playsInline:o,preload:"auto"})}function pe({children:r,as:t="p",className:n,style:e,...o}){let s=useRef(null);return p(s,o,a$5),Y.createElement(t,{ref:s,className:n,style:e},r)}export{ae as ScrollAnimate,me as ScrollCounter,ce as ScrollDraw,pe as ScrollText,ue as ScrollVideo,K as useScrollDrawProgress};
2
+ import {a as a$1,b as b$1}from'../chunk-XSVTHCLO.mjs';import {a as a$4}from'../chunk-7SBTYJGH.mjs';import {a as a$5}from'../chunk-I45LCJUP.mjs';import {a as a$3}from'../chunk-KHQ7OGQK.mjs';import {a as a$2}from'../chunk-BFX2CSQ3.mjs';import {b as b$2}from'../chunk-WHFRS7IP.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import {a,c,b}from'../chunk-A4JCC3QQ.mjs';import {d as d$1}from'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';import Y,{useState,useRef,useEffect}from'react';import {jsx}from'react/jsx-runtime';function K(n,t={}){let[o,e]=useState(0),r=useRef(t);r.current=t;let s=useRef(-1);return useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){e(1);return}let i=typeof n=="string"?document.querySelector(n):n.current;if(!i)return;let u=i,{axis:l="y",scrollContainer:E,trigger:h={}}=r.current,a$1=typeof E=="string"?document.querySelector(E):E??null,X=a(h.start??"top bottom"),$=a(h.end??"bottom top"),A=0,C=0,O=false,g=0;function D(){return a$1?l==="x"?a$1.scrollLeft:a$1.scrollTop:l==="x"?window.scrollX:window.scrollY}function B(){return a$1?l==="x"?a$1.clientWidth:a$1.clientHeight:l==="x"?window.innerWidth:window.innerHeight}function N(){let c$1=u.getBoundingClientRect(),p=D(),x=l==="x"?c$1.left:c$1.top,R=l==="x"?c$1.width:c$1.height,y=c({top:x,height:R},p,B(),X,$);A=y.tStart,C=y.tEnd;}function L(){if(!O)return;let{speed:c=1,easing:p="linear",once:x=false}=r.current,R=typeof p=="function"?p:d$1[p]??d$1.linear,y=b(D(),A,C,c),T=R(y);x&&(s.current=Math.max(s.current,T),T=s.current),e(T),g=requestAnimationFrame(L);}let H=new IntersectionObserver(c=>{c.forEach(p=>{O=p.isIntersecting,O?g=requestAnimationFrame(L):cancelAnimationFrame(g);});},{root:a$1??null,threshold:0});N(),H.observe(u);let b$1;function S(){clearTimeout(b$1),b$1=setTimeout(N,150);}return window.addEventListener("resize",S),window.addEventListener("orientationchange",S),()=>{cancelAnimationFrame(g),clearTimeout(b$1),H.disconnect(),window.removeEventListener("resize",S),window.removeEventListener("orientationchange",S);}},[]),o}function d(n,t,o){let e=useRef(t);e.current=t;let r=a$1(t);useEffect(()=>{if(!n.current)return;let s=o(n.current,b$1(e.current,()=>e.current));return ()=>s.destroy()},[r]);}var Z=/^(data-|aria-)|^(id|role|title|tabIndex|lang|dir|hidden)$/;function f(n){let t={},o={};for(let[e,r]of Object.entries(n))(Z.test(e)?o:t)[e]=r;return [t,o]}function pe({children:n,className:t,style:o,...e}){let r=useRef(null),[s,i]=f(e);return d(r,s,b$2),jsx("div",{ref:r,className:t,style:o,...i,children:n})}function ue({children:n,className:t,style:o,...e}){let r=useRef(null),[s,i]=f(e);return d(r,s,a$2),jsx("div",{ref:r,className:t,style:o,...i,children:n})}function me({className:n,style:t,...o}){let e=useRef(null),[r,s]=f(o);return d(e,r,a$3),jsx("span",{ref:e,className:n,style:t,...s})}function de({src:n,className:t,style:o,muted:e=true,playsInline:r=true,...s}){let i=useRef(null),[u,l]=f(s);return d(i,u,a$4),jsx("video",{...l,ref:i,src:n,className:t,style:o,muted:e,playsInline:r,preload:"auto"})}function fe({children:n,as:t="p",className:o,style:e,...r}){let s=useRef(null),[i,u]=f(r);return d(s,i,a$5),Y.createElement(t,{...u,ref:s,className:o,style:e},n)}export{ue as ScrollAnimate,me as ScrollCounter,pe as ScrollDraw,fe as ScrollText,de as ScrollVideo,K as useScrollDrawProgress};
@@ -1 +1 @@
1
- 'use strict';function Fe({bounces:e=3,decay:t=.5}={}){let n=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,t)),a=Math.sqrt(r),s=0,m=[];for(let c=0;c<n;c++){let p=Math.pow(a,c);m.push(p),s+=p;}let l=[0],u=0;for(let c=0;c<n;c++)u+=m[c]/s,l.push(u);return c=>{if(c<=0)return 0;if(c>=1)return 1;for(let p=0;p<n;p++)if(c<=l[p+1]){let g=(c-l[p])/(l[p+1]-l[p]);if(p===0)return g*(2-g);let M=1-Math.pow(r,p);return M+(1-M)*(2*g-1)*(2*g-1)}return 1}}function Ve({amplitude:e=1,period:t=.4}={}){let n=Math.max(1,e),r=Math.max(.1,t),a=n<=1?r/4:r/(2*Math.PI)*Math.asin(1/n);return s=>s<=0?0:s>=1?1:n*Math.pow(2,-10*s)*Math.sin((s-a)*(2*Math.PI)/r)+1}var N={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:Fe(),elastic:Ve()};function fe(e,t,n){return Math.min(n,Math.max(t,e))}function J(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return {element:"top",viewport:t};let[n="top",r="bottom"]=t.split(/\s+/).filter(Boolean);return {element:n,viewport:r}}function ge(e,t,n,r){switch(r){case "top":return e+n;case "center":return e+n+t/2;case "bottom":return e+n+t;default:return e+n}}function de(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 z(e,t,n,r){return n===t?0:fe((e-t)/(n-t)*r,0,1)}function ee(e,t,n,r,a){let s=ge(e.top,e.height,t,r.element)-de(r.viewport,n),m=ge(e.top,e.height,t,a.element)-de(a.viewport,n);return {tStart:s,tEnd:m}}function be(e,t,n){let r=e.getBoundingClientRect(),a=n==="x"?r.width:r.height;return t?{top:n==="x"?r.left-t.getBoundingClientRect().left+t.scrollLeft:r.top-t.getBoundingClientRect().top+t.scrollTop,height:a,scroll:0}:{top:n==="x"?r.left:r.top,height:a,scroll:n==="x"?window.scrollX:window.scrollY}}function he(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 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 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 ye(e,t,n){let r=he(e),a=he(t);return !r||!a?e:`rgb(${Math.round(r[0]+(a[0]-r[0])*n)},${Math.round(r[1]+(a[1]-r[1])*n)},${Math.round(r[2]+(a[2]-r[2])*n)})`}var De="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Oe="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",ve=33;function He(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function ke(e){let t=[];for(let n=0;n<ve;n++){let r=n/(ve-1);t.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${t.join(",")})`}function Ee(e){switch(e){case "linear":return "linear";case "ease-in":return De;case "ease-out":return Oe;case "ease-in-out":return He()?ke(N["ease-in-out"]):null;default:return null}}var we=Symbol.for("svg-scroll-draw.registry");function Se(){let e=globalThis;return e[we]||(e[we]=new Map)}function te(e,t){Se().set(e,t);}function ne(e){Se().delete(e);}var Be=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function Y(e,...t){Be&&console.warn(`[svg-scroll-draw] ${e}`,...t);}function Xe(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function xe(e){let t=[],n=/([\w]+)\(([^)]*)\)/g,r;for(;(r=n.exec(e))!==null;){let a=[],s=[],m=r[2].trim();if(m)for(let l of m.split(/[\s,]+/)){let u=l.match(/^([-+]?[\d.eE]+)(.*)$/);a.push(u?parseFloat(u[1]):0),s.push(u?u[2]:"");}t.push({fn:r[1],nums:a,units:s});}return t}function We(e,t,n){let r=xe(e),a=xe(t);return r.length===0||r.length!==a.length?n<1?e:t:r.map((s,m)=>{let l=a[m];return s.fn!==l.fn||s.nums.length!==l.nums.length?n<1?`${s.fn}(${s.nums.map((u,c)=>`${u}${s.units[c]}`).join(", ")})`:`${l.fn}(${l.nums.map((u,c)=>`${u}${l.units[c]}`).join(", ")})`:`${s.fn}(${s.nums.map((u,c)=>`${u+(l.nums[c]-u)*n}${s.units[c]}`).join(", ")})`}).join(" ")}function Me(e,t,n){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*n);let r=String(e),a=String(t);if(Xe(r))return ye(r,a,n);if(r.includes("("))return We(r,a,n);let s=r.match(/^([-+]?[\d.]+)(.*)$/),m=a.match(/^([-+]?[\d.]+)(.*)$/);if(s&&m){let l=parseFloat(s[1]),u=parseFloat(m[1]);return `${l+(u-l)*n}${s[2]||m[2]}`}return n<1?r:a}function ze(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var Ye=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),je=0,Te="--scroll-draw-progress";function qe(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Re(e,t){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let{props:r,trigger:a={},easing:s="ease-out",speed:m=1,once:l=false,axis:u="y",scrollContainer:c,native:p=true,velocityScale:g=false,respectReducedMotion:M=true,triggerElement:I,onProgress:T,onComplete:R,onEnter:_,onLeave:F,onEnterBack:V,onLeaveBack:L}=t,C=M&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,v=typeof s=="function"?s:N[s]??N["ease-out"],oe=J(a.start??"top bottom"),se=J(a.end??"bottom top"),ie=I??e,d=typeof c=="string"?document.querySelector(c):c??null,h=Object.entries(r).map(([o,i])=>({prop:ze(o),from:Array.isArray(i)?i[0]:"",to:Array.isArray(i)?i[1]:i}));function Pe(){let o=window.getComputedStyle(e);for(let i of h)i.from===""&&(i.from=o.getPropertyValue(i.prop).trim()||"0");}function Ae(){for(let o of h)e.style.setProperty(o.prop,String(o.to));}let ae=new Map;for(let o of [...h.map(i=>i.prop),Te])ae.set(o,e.style.getPropertyValue(o));function j(){for(let[o,i]of ae)i?e.style.setProperty(o,i):e.style.removeProperty(o);}if(C)return Ae(),R?.(),{...n,destroy:j,getProgress:()=>1};Pe();let ue=typeof s=="string"?Ee(s):null;function Ie(){if(!p||!qe()||!ue||u!=="y"||d||ie!==e||l||m!==1||T||R||_||F||V||L||g!==false||(a.start??"top bottom").trim()!=="top bottom"||(a.end??"bottom top").trim()!=="bottom top")return false;for(let o of h)if(!Ye.has(o.prop))return false;return true}function _e(){let o=`ssd-a-${++je}`,i=h.map(f=>`${f.prop}:${f.from}`).join(";"),B=h.map(f=>`${f.prop}:${f.to}`).join(";"),A=document.createElement("style");A.setAttribute("data-ssd-animate",""),A.textContent=`@keyframes ${o}{from{${i}}to{${B}}}.${o}{animation-name:${o};animation-duration:auto;animation-timing-function:${ue};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(A),e.classList.add(o);let b=()=>u==="x"?window.scrollX:window.scrollY,X=()=>u==="x"?window.innerWidth:window.innerHeight,W=()=>{let f=e.getBoundingClientRect();return ee({top:f.top,height:f.height},b(),X(),oe,se)};te(e,{type:"animate",getProgress:()=>Q.getProgress(),getTrigger:W});let Q={destroy(){e.classList.remove(o),A.remove(),e.style.animationPlayState="",j(),ne(e);},replay(){e.classList.remove(o),e.offsetWidth,e.classList.add(o);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(f){let K=Math.min(1,Math.max(0,f));e.classList.remove(o);for(let Z of h)e.style.setProperty(Z.prop,Me(Z.from,Z.to,K));},getProgress(){let{tStart:f,tEnd:K}=W();return v(z(b(),f,K,m))}};return Q}if(Ie())return _e();let y=0,E=0,w=0,D=false,S=false,$=-1,P=0,O=false,x=NaN,q=-1,ce=0,le=()=>d?u==="x"?d.scrollLeft:d.scrollTop:u==="x"?window.scrollX:window.scrollY,Ce=()=>d?u==="x"?d.clientWidth:d.clientHeight:u==="x"?window.innerWidth:window.innerHeight;function me(){let o=be(ie,d,u),i=ee(o,o.scroll,Ce(),oe,se);y=i.tStart,E=i.tEnd;}function H(o){e.style.setProperty(Te,String(o));for(let i of h)e.style.setProperty(i.prop,Me(i.from,i.to,o));T?.(o);}function Ne(o){if(isNaN(x)){x=o;return}x<=0&&o>0?_?.():x>0&&o<=0&&L?.(),x<1&&o>=1?F?.():x>=1&&o<1&&V?.(),x=o;}function G(){if(!D||S)return;let o=performance.now(),i=le(),B=m;if(g!==false){let X=o-ce,W=X>0?Math.abs(i-(q<0?i:q))/X:0;B=m*Math.max(.2,1+W*(typeof g=="number"?g:1)*.04);}q=i,ce=o;let A=E===y?0:(i-y)/(E-y);Ne(A);let b=v(z(i,y,E,B));l&&($=Math.max($,b),b=$),P=b,H(b),b>=1&&!O?(O=true,R?.()):b<1&&!l&&(O=false),w=requestAnimationFrame(G);}me(),E===y&&Y("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 o=v(z(le(),y,E,m));l&&o>0&&($=o),P=o,H(o);}let pe=new IntersectionObserver(o=>{o.forEach(i=>{D=i.isIntersecting,D&&!S?w=requestAnimationFrame(G):cancelAnimationFrame(w);});},{root:d??null}),U;function k(){clearTimeout(U),U=setTimeout(me,150);}return window.addEventListener("resize",k),window.addEventListener("orientationchange",k),pe.observe(e),te(e,{type:"animate",getProgress:()=>P,getTrigger:()=>({tStart:y,tEnd:E})}),{destroy(){cancelAnimationFrame(w),pe.disconnect(),window.removeEventListener("resize",k),window.removeEventListener("orientationchange",k),clearTimeout(U),j(),ne(e);},replay(){$=-1,O=false,P=0,S=false,H(0);},pause(){S=true,cancelAnimationFrame(w);},resume(){S&&(S=false,D&&(w=requestAnimationFrame(G)));},seek(o){let i=Math.min(1,Math.max(0,o));P=i,$=i,S=true,cancelAnimationFrame(w),H(i);},getProgress(){return P}}}var Ge={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function Ue(e){let t={};e.opacity!==void 0&&(t.opacity=[e.opacity,1]);let n=[],r=[];return e.x!==void 0&&(n.push(`translateX(${e.x}px)`),r.push("translateX(0px)")),e.y!==void 0&&(n.push(`translateY(${e.y}px)`),r.push("translateY(0px)")),e.scale!==void 0&&(n.push(`scale(${e.scale})`),r.push("scale(1)")),e.rotate!==void 0&&(n.push(`rotate(${e.rotate}deg)`),r.push("rotate(0deg)")),e.rotateX!==void 0&&(n.push(`rotateX(${e.rotateX}deg)`),r.push("rotateX(0deg)")),e.rotateY!==void 0&&(n.push(`rotateY(${e.rotateY}deg)`),r.push("rotateY(0deg)")),n.length>0&&(t.transform=[n.join(" "),r.join(" ")]),t}function Qe(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function re(e){let t=e.trim().split(/\s+/),[n,r]=t.length>1?t:/%$/.test(t[0])?["top",t[0]]:[t[0],"bottom"];return [n,/%$/.test(r)?parseFloat(r):r==="top"?0:r==="center"?50:100]}function Le(e,t){let[n,r]=re(e);return `${n} ${+Math.max(0,r-t).toFixed(3)}%`}function Ke(e){let t=NaN,n=0,r=0;return e.map(a=>{let s=a.getBoundingClientRect();return Math.abs(s.top-t)<=Math.max(8,Math.min(s.height,n||s.height)/2)?r++:(t=s.top,n=s.height,r=0),r})}var $e={destroy:()=>{}};function yt(e,t={}){if(typeof window>"u")return $e;let n=Qe(e);if(!n.length)return Y("scrollReveal: no elements found:",e),$e;let{preset:r="fadeUp",from:a,stagger:s=.15,easing:m="ease-out",once:l=true,trigger:u,onEnter:c,onLeave:p}=t,g={...Ge[r],...a},M=Ue(g),I=u?.start??"top 88%",T=u?.end??"top 53%",R=Math.abs(re(I)[1]-re(T)[1]),_=Math.min(Math.max(s,0),1)*R,F=_>0?Ke(n):n.map(()=>0),V=n.map((L,C)=>{let v=Math.min(F[C]*_,R);return Re(L,{props:M,easing:m,once:l,native:false,trigger:v>0?{start:Le(I,v),end:Le(T,v)}:{start:I,end:T},onEnter:C===0?c:void 0,onLeave:C===n.length-1?p:void 0})});return {destroy(){V.forEach(L=>L.destroy());}}}exports.scrollReveal=yt;
1
+ 'use strict';function Xe({bounces:e=3,decay:t=.5}={}){let n=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,t)),s=Math.sqrt(r),i=0,c=[];for(let l=0;l<n;l++){let p=Math.pow(s,l);c.push(p),i+=p;}let m=[0],u=0;for(let l=0;l<n;l++)u+=c[l]/i,m.push(u);return l=>{if(l<=0)return 0;if(l>=1)return 1;for(let p=0;p<n;p++)if(l<=m[p+1]){let g=(l-m[p])/(m[p+1]-m[p]);if(p===0)return g*(2-g);let T=1-Math.pow(r,p);return T+(1-T)*(2*g-1)*(2*g-1)}return 1}}function Ye({amplitude:e=1,period:t=.4}={}){let n=Math.max(1,e),r=Math.max(.1,t),s=n<=1?r/4:r/(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)/r)+1}var H={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:Xe(),elastic:Ye()};function Ee(e,t,n){return Math.min(n,Math.max(t,e))}function ae(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return {element:"top",viewport:t};let[n="top",r="bottom"]=t.split(/\s+/).filter(Boolean);return {element:n,viewport:r}}function ve(e,t,n,r){switch(r){case "top":return e+n;case "center":return e+n+t/2;case "bottom":return e+n+t;default:return e+n}}function we(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 G(e,t,n,r){return n===t?0:Ee((e-t)/(n-t)*r,0,1)}function ue(e,t,n,r,s){let i=ve(e.top,e.height,t,r.element)-we(r.viewport,n),c=ve(e.top,e.height,t,s.element)-we(s.viewport,n);return {tStart:i,tEnd:c}}function Se(e,t,n){let r=e.getBoundingClientRect(),s=n==="x"?r.width:r.height;return t?{top:n==="x"?r.left-t.getBoundingClientRect().left+t.scrollLeft:r.top-t.getBoundingClientRect().top+t.scrollTop,height:s,scroll:0}:{top:n==="x"?r.left:r.top,height:s,scroll:n==="x"?window.scrollX:window.scrollY}}function xe(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 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 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 Me(e,t,n){let r=xe(e),s=xe(t);return !r||!s?e:`rgb(${Math.round(r[0]+(s[0]-r[0])*n)},${Math.round(r[1]+(s[1]-r[1])*n)},${Math.round(r[2]+(s[2]-r[2])*n)})`}var je="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",qe="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Re=33;function Ge(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Ue(e){let t=[];for(let n=0;n<Re;n++){let r=n/(Re-1);t.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${t.join(",")})`}function Te(e){switch(e){case "linear":return "linear";case "ease-in":return je;case "ease-out":return qe;case "ease-in-out":return Ge()?Ue(H["ease-in-out"]):null;default:return null}}var Le=Symbol.for("svg-scroll-draw.registry");function Pe(){let e=globalThis;return e[Le]||(e[Le]=new Map)}function ce(e,t){Pe().set(e,t);}function le(e){Pe().delete(e);}var Qe=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function U(e,...t){Qe&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var z,Q=new Set,K=new WeakMap,k=new Map,$e=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function Ke(e){let t=new Set;for(let n of e)for(;n&&n!==document.body;n=n.parentElement)for(let r=n;r;r=r.previousElementSibling)t.add(r);return t}function Ae(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>t();z??(z=new ResizeObserver(s=>{let i=false;for(let{target:c}of s)K.get(c)!==$e(c)&&(i=true),K.set(c,"");i&&Q.forEach(c=>c());})),Q.add(n);let r=Ke(e);return [document.body,document.documentElement].forEach(s=>s&&r.add(s)),r.forEach(s=>{K.has(s)||K.set(s,$e(s)),k.set(s,(k.get(s)??0)+1),z.observe(s);}),()=>{Q.delete(n)&&(r.forEach(s=>{let i=(k.get(s)??1)-1;if(i)return void k.set(s,i);k.delete(s),z?.unobserve(s);}),Q.size||(z?.disconnect(),z=void 0));}}function Ze(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Ie(e){let t=[],n=/([\w]+)\(([^)]*)\)/g,r;for(;(r=n.exec(e))!==null;){let s=[],i=[],c=r[2].trim();if(c)for(let m of c.split(/[\s,]+/)){let u=m.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(u?parseFloat(u[1]):0),i.push(u?u[2]:"");}t.push({fn:r[1],nums:s,units:i});}return t}function Je(e,t,n){let r=Ie(e),s=Ie(t);return r.length===0||r.length!==s.length?n<1?e:t:r.map((i,c)=>{let m=s[c];return i.fn!==m.fn||i.nums.length!==m.nums.length?n<1?`${i.fn}(${i.nums.map((u,l)=>`${u}${i.units[l]}`).join(", ")})`:`${m.fn}(${m.nums.map((u,l)=>`${u}${m.units[l]}`).join(", ")})`:`${i.fn}(${i.nums.map((u,l)=>`${u+(m.nums[l]-u)*n}${i.units[l]}`).join(", ")})`}).join(" ")}function _e(e,t,n){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*n);let r=String(e),s=String(t);if(Ze(r))return Me(r,s,n);if(r.includes("("))return Je(r,s,n);let i=r.match(/^([-+]?[\d.]+)(.*)$/),c=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&c){let m=parseFloat(i[1]),u=parseFloat(c[1]);return `${m+(u-m)*n}${i[2]||c[2]}`}return n<1?r:s}function et(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var tt=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),nt=0,Ce="--scroll-draw-progress";function rt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Ne(e,t){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let{props:r,trigger:s={},easing:i="ease-out",speed:c=1,once:m=false,axis:u="y",scrollContainer:l,native:p=true,velocityScale:g=false,respectReducedMotion:T=true,triggerElement:N,onProgress:L,onComplete:P,onEnter:F,onLeave:B,onEnterBack:W,onLeaveBack:$}=t,O=T&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,S=typeof i=="function"?i:H[i]??H["ease-out"],pe=ae(s.start??"top bottom"),fe=ae(s.end??"bottom top"),X=N??e,h=typeof l=="string"?document.querySelector(l):l??null,y=Object.entries(r).map(([o,a])=>({prop:et(o),from:Array.isArray(a)?a[0]:"",to:Array.isArray(a)?a[1]:a}));function Ve(){let o=window.getComputedStyle(e);for(let a of y)a.from===""&&(a.from=o.getPropertyValue(a.prop).trim()||"0");}function De(){for(let o of y)e.style.setProperty(o.prop,String(o.to));}let Z=new Map;for(let o of [...y.map(a=>a.prop),Ce])Z.set(o,e.style.getPropertyValue(o));function J(){for(let[o,a]of Z)a?e.style.setProperty(o,a):e.style.removeProperty(o);}if(O)return De(),P?.(),{...n,destroy:J,getProgress:()=>1};Ve();let de=typeof i=="string"?Te(i):null;function He(){if(!p||!rt()||!de||u!=="y"||h||X!==e||m||c!==1||L||P||F||B||W||$||g!==false||(s.start??"top bottom").trim()!=="top bottom"||(s.end??"bottom top").trim()!=="bottom top")return false;for(let o of y)if(!tt.has(o.prop))return false;return true}function ze(){let o=`ssd-a-${++nt}`,a=y.map(d=>`${d.prop}:${d.from}`).join(";"),_=y.map(d=>`${d.prop}:${d.to}`).join(";"),v=document.createElement("style");v.setAttribute("data-ssd-animate",""),v.textContent=`@keyframes ${o}{from{${a}}to{${_}}}.${o}{animation-name:${o};animation-duration:auto;animation-timing-function:${de};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(v),e.classList.add(o);let f=()=>u==="x"?window.scrollX:window.scrollY,b=()=>u==="x"?window.innerWidth:window.innerHeight,C=()=>{let d=e.getBoundingClientRect();return ue({top:d.top,height:d.height},f(),b(),pe,fe)};ce(e,{type:"animate",getProgress:()=>oe.getProgress(),getTrigger:C});let oe={refresh(){},destroy(){e.classList.remove(o),v.remove(),e.style.animationPlayState="",J(),le(e);},replay(){e.classList.remove(o),e.offsetWidth,e.classList.add(o);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(d){let se=Math.min(1,Math.max(0,d));e.classList.remove(o);for(let ie of y)e.style.setProperty(ie.prop,_e(ie.from,ie.to,se));},getProgress(){let{tStart:d,tEnd:se}=C();return S(G(f(),d,se,c))}};return oe}if(He())return ze();let E=0,w=0,x=0,Y=false,M=false,A=-1,I=0,j=false,R=NaN,ee=-1,ge=0,be=()=>h?u==="x"?h.scrollLeft:h.scrollTop:u==="x"?window.scrollX:window.scrollY,ke=()=>h?u==="x"?h.clientWidth:h.clientHeight:u==="x"?window.innerWidth:window.innerHeight,V=X===e?y:[],he=false;function te(){let o=e.style,a=V.map(b=>o.getPropertyValue(b.prop)),_=o.transition;V.length&&(o.transition="none"),V.forEach(b=>o.setProperty(b.prop,Z.get(b.prop)??""));let v=Se(X,h,u);V.forEach((b,C)=>o.setProperty(b.prop,a[C])),V.length&&(e.offsetWidth,o.transition=_);let f=ue(v,v.scroll,ke(),pe,fe);he&&Math.abs(f.tStart-E)<1&&Math.abs(f.tEnd-w)<1||(he=true,E=f.tStart,w=f.tEnd);}function q(o){e.style.setProperty(Ce,String(o));for(let a of y)e.style.setProperty(a.prop,_e(a.from,a.to,o));L?.(o);}function Be(o){if(isNaN(R)){R=o;return}R<=0&&o>0?F?.():R>0&&o<=0&&$?.(),R<1&&o>=1?B?.():R>=1&&o<1&&W?.(),R=o;}function ne(){if(!Y||M)return;let o=performance.now(),a=be(),_=c;if(g!==false){let b=o-ge,C=b>0?Math.abs(a-(ee<0?a:ee))/b:0;_=c*Math.max(.2,1+C*(typeof g=="number"?g:1)*.04);}ee=a,ge=o;let v=w===E?0:(a-E)/(w-E);Be(v);let f=S(G(a,E,w,_));m&&(A=Math.max(A,f),f=A),I=f,q(f),f>=1&&!j?(j=true,P?.()):f<1&&!m&&(j=false),x=requestAnimationFrame(ne);}te(),w===E&&U("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 o=S(G(be(),E,w,c));m&&o>0&&(A=o),I=o,q(o);}let ye=new IntersectionObserver(o=>{o.forEach(a=>{Y=a.isIntersecting,Y&&!M?x=requestAnimationFrame(ne):cancelAnimationFrame(x);});},{root:h??null}),re;function D(){clearTimeout(re),re=setTimeout(te,150);}window.addEventListener("resize",D),window.addEventListener("orientationchange",D);let We=Ae([X],D);return ye.observe(e),ce(e,{type:"animate",getProgress:()=>I,getTrigger:()=>({tStart:E,tEnd:w})}),{destroy(){cancelAnimationFrame(x),ye.disconnect(),window.removeEventListener("resize",D),window.removeEventListener("orientationchange",D),We(),clearTimeout(re),J(),le(e);},replay(){A=-1,j=false,I=0,M=false,q(0);},pause(){M=true,cancelAnimationFrame(x);},resume(){M&&(M=false,Y&&(x=requestAnimationFrame(ne)));},seek(o){let a=Math.min(1,Math.max(0,o));I=a,A=a,M=true,cancelAnimationFrame(x),q(a);},getProgress(){return I},refresh(){te();}}}var ot={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function st(e){let t={};e.opacity!==void 0&&(t.opacity=[e.opacity,1]);let n=[],r=[];return e.x!==void 0&&(n.push(`translateX(${e.x}px)`),r.push("translateX(0px)")),e.y!==void 0&&(n.push(`translateY(${e.y}px)`),r.push("translateY(0px)")),e.scale!==void 0&&(n.push(`scale(${e.scale})`),r.push("scale(1)")),e.rotate!==void 0&&(n.push(`rotate(${e.rotate}deg)`),r.push("rotate(0deg)")),e.rotateX!==void 0&&(n.push(`rotateX(${e.rotateX}deg)`),r.push("rotateX(0deg)")),e.rotateY!==void 0&&(n.push(`rotateY(${e.rotateY}deg)`),r.push("rotateY(0deg)")),n.length>0&&(t.transform=[n.join(" "),r.join(" ")]),t}function it(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function me(e){let t=e.trim().split(/\s+/),[n,r]=t.length>1?t:/%$/.test(t[0])?["top",t[0]]:[t[0],"bottom"];return [n,/%$/.test(r)?parseFloat(r):r==="top"?0:r==="center"?50:100]}function Fe(e,t){let[n,r]=me(e);return `${n} ${+Math.max(0,r-t).toFixed(3)}%`}function at(e){let t=NaN,n=0,r=0;return e.map(s=>{let i=s.getBoundingClientRect();return Math.abs(i.top-t)<=Math.max(8,Math.min(i.height,n||i.height)/2)?r++:(t=i.top,n=i.height,r=0),r})}var Oe={destroy:()=>{}};function At(e,t={}){if(typeof window>"u")return Oe;let n=it(e);if(!n.length)return U("scrollReveal: no elements found:",e),Oe;let{preset:r="fadeUp",from:s,stagger:i=.15,easing:c="ease-out",once:m=true,trigger:u,onEnter:l,onLeave:p}=t,g={...ot[r],...s},T=st(g),N=u?.start??"top 88%",L=u?.end??"top 53%",P=Math.abs(me(N)[1]-me(L)[1]),F=Math.min(Math.max(i,0),1)*P,B=F>0?at(n):n.map(()=>0),W=n.map(($,O)=>{let S=Math.min(B[O]*F,P);return Ne($,{props:T,easing:c,once:m,native:false,trigger:S>0?{start:Fe(N,S),end:Fe(L,S)}:{start:N,end:L},onEnter:O===0?l:void 0,onLeave:O===n.length-1?p:void 0})});return {destroy(){W.forEach($=>$.destroy());}}}exports.scrollReveal=At;
@@ -1,4 +1,4 @@
1
- import { E as EasingName, T as TriggerConfig } from '../types-DHU1zNEw.mjs';
1
+ import { E as EasingName, T as TriggerConfig } from '../types-B0YM4nQP.mjs';
2
2
 
3
3
  interface ScrollRevealFrom {
4
4
  /** Start opacity (0–1). Animates to 1. */
@@ -1,4 +1,4 @@
1
- import { E as EasingName, T as TriggerConfig } from '../types-DHU1zNEw.js';
1
+ import { E as EasingName, T as TriggerConfig } from '../types-B0YM4nQP.js';
2
2
 
3
3
  interface ScrollRevealFrom {
4
4
  /** Start opacity (0–1). Animates to 1. */
@@ -1 +1 @@
1
- import {a}from'../chunk-QJ4H2HW3.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-PEFR3ZB7.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var M={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function N(e){let r={};e.opacity!==void 0&&(r.opacity=[e.opacity,1]);let t=[],n=[];return e.x!==void 0&&(t.push(`translateX(${e.x}px)`),n.push("translateX(0px)")),e.y!==void 0&&(t.push(`translateY(${e.y}px)`),n.push("translateY(0px)")),e.scale!==void 0&&(t.push(`scale(${e.scale})`),n.push("scale(1)")),e.rotate!==void 0&&(t.push(`rotate(${e.rotate}deg)`),n.push("rotate(0deg)")),e.rotateX!==void 0&&(t.push(`rotateX(${e.rotateX}deg)`),n.push("rotateX(0deg)")),e.rotateY!==void 0&&(t.push(`rotateY(${e.rotateY}deg)`),n.push("rotateY(0deg)")),t.length>0&&(r.transform=[t.join(" "),n.join(" ")]),r}function P(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function u(e){let r=e.trim().split(/\s+/),[t,n]=r.length>1?r:/%$/.test(r[0])?["top",r[0]]:[r[0],"bottom"];return [t,/%$/.test(n)?parseFloat(n):n==="top"?0:n==="center"?50:100]}function y(e,r){let[t,n]=u(e);return `${t} ${+Math.max(0,n-r).toFixed(3)}%`}function Y(e){let r=NaN,t=0,n=0;return e.map(a=>{let o=a.getBoundingClientRect();return Math.abs(o.top-r)<=Math.max(8,Math.min(o.height,t||o.height)/2)?n++:(r=o.top,t=o.height,n=0),n})}var v={destroy:()=>{}};function A(e,r={}){if(typeof window>"u")return v;let t=P(e);if(!t.length)return b("scrollReveal: no elements found:",e),v;let{preset:n="fadeUp",from:a$1,stagger:o=.15,easing:b$1="ease-out",once:R=true,trigger:d,onEnter:x,onLeave:E}=r,S={...M[n],...a$1},X=N(S),s=d?.start??"top 88%",i=d?.end??"top 53%",f=Math.abs(u(s)[1]-u(i)[1]),g=Math.min(Math.max(o,0),1)*f,$=g>0?Y(t):t.map(()=>0),L=t.map((l,c)=>{let p=Math.min($[c]*g,f);return a(l,{props:X,easing:b$1,once:R,native:false,trigger:p>0?{start:y(s,p),end:y(i,p)}:{start:s,end:i},onEnter:c===0?x:void 0,onLeave:c===t.length-1?E:void 0})});return {destroy(){L.forEach(l=>l.destroy());}}}export{A as scrollReveal};
1
+ import {a}from'../chunk-BFX2CSQ3.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var M={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function N(e){let r={};e.opacity!==void 0&&(r.opacity=[e.opacity,1]);let t=[],n=[];return e.x!==void 0&&(t.push(`translateX(${e.x}px)`),n.push("translateX(0px)")),e.y!==void 0&&(t.push(`translateY(${e.y}px)`),n.push("translateY(0px)")),e.scale!==void 0&&(t.push(`scale(${e.scale})`),n.push("scale(1)")),e.rotate!==void 0&&(t.push(`rotate(${e.rotate}deg)`),n.push("rotate(0deg)")),e.rotateX!==void 0&&(t.push(`rotateX(${e.rotateX}deg)`),n.push("rotateX(0deg)")),e.rotateY!==void 0&&(t.push(`rotateY(${e.rotateY}deg)`),n.push("rotateY(0deg)")),t.length>0&&(r.transform=[t.join(" "),n.join(" ")]),r}function P(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function u(e){let r=e.trim().split(/\s+/),[t,n]=r.length>1?r:/%$/.test(r[0])?["top",r[0]]:[r[0],"bottom"];return [t,/%$/.test(n)?parseFloat(n):n==="top"?0:n==="center"?50:100]}function y(e,r){let[t,n]=u(e);return `${t} ${+Math.max(0,n-r).toFixed(3)}%`}function Y(e){let r=NaN,t=0,n=0;return e.map(a=>{let o=a.getBoundingClientRect();return Math.abs(o.top-r)<=Math.max(8,Math.min(o.height,t||o.height)/2)?n++:(r=o.top,t=o.height,n=0),n})}var v={destroy:()=>{}};function A(e,r={}){if(typeof window>"u")return v;let t=P(e);if(!t.length)return b("scrollReveal: no elements found:",e),v;let{preset:n="fadeUp",from:a$1,stagger:o=.15,easing:b$1="ease-out",once:R=true,trigger:d,onEnter:x,onLeave:E}=r,S={...M[n],...a$1},X=N(S),s=d?.start??"top 88%",i=d?.end??"top 53%",f=Math.abs(u(s)[1]-u(i)[1]),g=Math.min(Math.max(o,0),1)*f,$=g>0?Y(t):t.map(()=>0),L=t.map((l,c)=>{let p=Math.min($[c]*g,f);return a(l,{props:X,easing:b$1,once:R,native:false,trigger:p>0?{start:y(s,p),end:y(i,p)}:{start:s,end:i},onEnter:c===0?x:void 0,onLeave:c===t.length-1?E:void 0})});return {destroy(){L.forEach(l=>l.destroy());}}}export{A as scrollReveal};
@@ -1,4 +1,4 @@
1
- import { a as ScrollDrawOptions, S as ScrollDrawInstance } from './types-DHU1zNEw.mjs';
1
+ import { a as ScrollDrawOptions, S as ScrollDrawInstance } from './types-B0YM4nQP.mjs';
2
2
 
3
3
  declare function scrollDraw(target: string | Element, options?: ScrollDrawOptions): ScrollDrawInstance;
4
4
 
@@ -1,4 +1,4 @@
1
- import { a as ScrollDrawOptions, S as ScrollDrawInstance } from './types-DHU1zNEw.js';
1
+ import { a as ScrollDrawOptions, S as ScrollDrawInstance } from './types-B0YM4nQP.js';
2
2
 
3
3
  declare function scrollDraw(target: string | Element, options?: ScrollDrawOptions): ScrollDrawInstance;
4
4
 
@@ -1,4 +1,4 @@
1
- import { E as EasingName } from '../types-DHU1zNEw.mjs';
1
+ import { E as EasingName } from '../types-B0YM4nQP.mjs';
2
2
 
3
3
  interface ScrollSnapOptions {
4
4
  /** Scroll axis. Default: 'vertical'. */
@@ -1,4 +1,4 @@
1
- import { E as EasingName } from '../types-DHU1zNEw.js';
1
+ import { E as EasingName } from '../types-B0YM4nQP.js';
2
2
 
3
3
  interface ScrollSnapOptions {
4
4
  /** Scroll axis. Default: 'vertical'. */