svg-scroll-draw 2.10.0 → 2.10.2

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 (44) hide show
  1. package/README.md +19 -10
  2. package/dist/angular/index.cjs +2 -2
  3. package/dist/angular/index.mjs +2 -2
  4. package/dist/astro/index.cjs +2 -2
  5. package/dist/astro/index.mjs +2 -2
  6. package/dist/cdn/svg-scroll-draw.dev.global.js +55 -29
  7. package/dist/cdn/svg-scroll-draw.global.js +2 -2
  8. package/dist/cinematic/index.cjs +2 -2
  9. package/dist/cinematic/index.mjs +2 -2
  10. package/dist/devtools/index.cjs +1 -1
  11. package/dist/devtools/index.mjs +1 -1
  12. package/dist/group/index.cjs +2 -2
  13. package/dist/group/index.mjs +2 -2
  14. package/dist/horizontal/index.cjs +1 -1
  15. package/dist/horizontal/index.mjs +1 -1
  16. package/dist/index.cjs +3 -3
  17. package/dist/index.mjs +3 -3
  18. package/dist/nuxt/index.cjs +2 -2
  19. package/dist/nuxt/index.mjs +2 -2
  20. package/dist/pin/index.cjs +1 -1
  21. package/dist/pin/index.mjs +1 -1
  22. package/dist/progress/index.cjs +1 -1
  23. package/dist/progress/index.mjs +1 -1
  24. package/dist/react/index.cjs +2 -2
  25. package/dist/react/index.mjs +2 -2
  26. package/dist/reveal/index.cjs +1 -1
  27. package/dist/reveal/index.mjs +1 -1
  28. package/dist/snap/index.cjs +1 -1
  29. package/dist/snap/index.mjs +1 -1
  30. package/dist/solid/index.cjs +2 -2
  31. package/dist/solid/index.mjs +2 -2
  32. package/dist/svelte/index.cjs +2 -2
  33. package/dist/svelte/index.mjs +2 -2
  34. package/dist/text/index.cjs +1 -1
  35. package/dist/text/index.mjs +1 -1
  36. package/dist/timeline/index.cjs +8 -8
  37. package/dist/timeline/index.mjs +8 -8
  38. package/dist/video/index.cjs +1 -1
  39. package/dist/video/index.mjs +1 -1
  40. package/dist/vue/index.cjs +2 -2
  41. package/dist/vue/index.mjs +2 -2
  42. package/dist/web-component/index.cjs +3 -3
  43. package/dist/web-component/index.mjs +3 -3
  44. package/package.json +255 -68
@@ -1,15 +1,15 @@
1
- function ve({bounces:e=3,decay:n=.5}={}){let r=Math.max(1,Math.round(e)),o=Math.max(.01,Math.min(.99,n)),u=Math.sqrt(o),m=0,M=[];for(let c=0;c<r;c++){let p=Math.pow(u,c);M.push(p),m+=p;}let f=[0],y=0;for(let c=0;c<r;c++)y+=M[c]/m,f.push(y);return c=>{if(c<=0)return 0;if(c>=1)return 1;for(let p=0;p<r;p++)if(c<=f[p+1]){let b=(c-f[p])/(f[p+1]-f[p]);if(p===0)return b*(2-b);let E=1-Math.pow(o,p);return E+(1-E)*(2*b-1)*(2*b-1)}return 1}}function Me({amplitude:e=1,period:n=.4}={}){let r=Math.max(1,e),o=Math.max(.1,n),u=r<=1?o/4:o/(2*Math.PI)*Math.asin(1/r);return m=>m<=0?0:m>=1?1:r*Math.pow(2,-10*m)*Math.sin((m-u)*(2*Math.PI)/o)+1}var B={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:ve(),elastic:Me()};function j(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[r="top",o="bottom"]=n.split(/\s+/).filter(Boolean);return {element:r,viewport:o}}function re(e,n,r,o){switch(o){case "top":return e+r;case "center":return e+r+n/2;case "bottom":return e+r+n;default:return e+r}}function oe(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 H(e){let n=e.tagName.toLowerCase();if(n==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),o=parseFloat(e.getAttribute("height")??"0");return 2*(r+o)}if(n==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function Ee(e,n,r){return Math.min(r,Math.max(n,e))}function ie(e,n,r,o){return r===n?0:Ee((e-n)/(r-n)*o,0,1)}function se(e,n,r,o,u){let m=re(e.top,e.height,n,o.element)-oe(o.viewport,r),M=re(e.top,e.height,n,u.element)-oe(u.viewport,r);return {tStart:m,tEnd:M}}function ae(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function ue(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let n=window.matchMedia("(prefers-reduced-motion: reduce)"),r=u=>e(!!u.matches);if(typeof n.addEventListener=="function")return n.addEventListener("change",r),()=>n.removeEventListener("change",r);let o=n;return o.addListener?.(r),()=>o.removeListener?.(r)}var Le=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function ce(e,...n){Le&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var le=["#ff90e8","#ffc900","#5865F2","#22c55e","#f59e0b","#ef4444","#aaa","#60a5fa"];function _e(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let o=typeof e=="string"?document.querySelector(e):e;if(!o)return ce("timeline: Container not found:",e),r;let u=o,{trigger:m={},speed:M=1,once:f=false,axis:y="y",tracks:c,onComplete:p,repeat:b,repeatDelay:E=0,loop:P=false,loopDuration:de=1500,debug:pe=false,label:me,respectReducedMotion:X=true}=n,fe=j(m.start??"top bottom"),be=j(m.end??"bottom top"),$=b==="infinite"?1/0:b??0,l,V=P===true?1/0:typeof P=="number"?P:0,h=false,G=0,L=V,z=X&&ae(),he=ue(t=>{z=X&&t,z&&(h=false,clearTimeout(l),l=void 0);}),O=()=>V>0&&!z,Q=new Map,q=c.map(t=>{let s=typeof t.easing=="function"?t.easing:B[t.easing??"linear"]??B.linear,d=Array.from(u.querySelectorAll(t.selector)),a=d.map(i=>H(i));return d.forEach((i,g)=>{Q.has(i)||Q.set(i,i.getAttribute("style")??""),i.style.strokeDasharray=`${a[g]}`,i.style.strokeDashoffset=`${a[g]}`,t.fade&&(i.style.opacity="0");}),{...t,elements:d,lengths:a,easeFn:s}});function ge(){for(let[t,s]of Q)s?t.setAttribute("style",s):t.removeAttribute("style");}let U=0,J=0,R=false,x=false,v=0,S=false,D=-1,T=0,w=null;pe&&(w=document.createElement("div"),Object.assign(w.style,{position:"fixed",bottom:"16px",left:"16px",zIndex:"9999",background:"rgba(0,0,0,0.88)",backdropFilter:"blur(8px)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:"10px",padding:"10px 14px",fontFamily:"monospace",fontSize:"11px",color:"#fff",minWidth:"240px",pointerEvents:"none",lineHeight:"1.4"}),document.body.appendChild(w));function we(t){if(!w)return;let s=me??(typeof e=="string"?e:"timeline"),d=c.map(({selector:a,from:i,to:g},W)=>{let I=le[W%le.length],F=g>i?Math.min(1,Math.max(0,(t-i)/(g-i))):0,k=Math.round(F*100);return `<div style="margin:4px 0">
1
+ function Le({bounces:e=3,decay:n=.5}={}){let r=Math.max(1,Math.round(e)),o=Math.max(.01,Math.min(.99,n)),s=Math.sqrt(o),m=0,E=[];for(let c=0;c<r;c++){let p=Math.pow(s,c);E.push(p),m+=p;}let f=[0],w=0;for(let c=0;c<r;c++)w+=E[c]/m,f.push(w);return c=>{if(c<=0)return 0;if(c>=1)return 1;for(let p=0;p<r;p++)if(c<=f[p+1]){let g=(c-f[p])/(f[p+1]-f[p]);if(p===0)return g*(2-g);let T=1-Math.pow(o,p);return T+(1-T)*(2*g-1)*(2*g-1)}return 1}}function Ie({amplitude:e=1,period:n=.4}={}){let r=Math.max(1,e),o=Math.max(.1,n),s=r<=1?o/4:o/(2*Math.PI)*Math.asin(1/r);return m=>m<=0?0:m>=1?1:r*Math.pow(2,-10*m)*Math.sin((m-s)*(2*Math.PI)/o)+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:Le(),elastic:Ie()};function X(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[r="top",o="bottom"]=n.split(/\s+/).filter(Boolean);return {element:r,viewport:o}}function re(e,n,r,o){switch(o){case "top":return e+r;case "center":return e+r+n/2;case "bottom":return e+r+n;default:return e+r}}function oe(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 K(e){let n=e.tagName.toLowerCase();if(n==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),o=parseFloat(e.getAttribute("height")??"0");return 2*(r+o)}if(n==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function Re(e,n,r){return Math.min(r,Math.max(n,e))}function ie(e,n,r,o){return r===n?0:Re((e-n)/(r-n)*o,0,1)}function se(e,n,r,o,s){let m=re(e.top,e.height,n,o.element)-oe(o.viewport,r),E=re(e.top,e.height,n,s.element)-oe(s.viewport,r);return {tStart:m,tEnd:E}}function ae(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function ue(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let n=window.matchMedia("(prefers-reduced-motion: reduce)"),r=s=>e(!!s.matches);if(typeof n.addEventListener=="function")return n.addEventListener("change",r),()=>n.removeEventListener("change",r);let o=n;return o.addListener?.(r),()=>o.removeListener?.(r)}var Se=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function ce(e,...n){Se&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var le=Symbol.for("svg-scroll-draw.registry");function de(){let e=globalThis;return e[le]||(e[le]=new Map)}function pe(e,n){de().set(e,n);}function me(e){de().delete(e);}var fe=["#ff90e8","#ffc900","#5865F2","#22c55e","#f59e0b","#ef4444","#aaa","#60a5fa"];function Ve(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let o=typeof e=="string"?document.querySelector(e):e;if(!o)return ce("timeline: Container not found:",e),r;let s=o,{trigger:m={},speed:E=1,once:f=false,axis:w="y",tracks:c,onComplete:p,repeat:g,repeatDelay:T=0,loop:P=false,loopDuration:ge=1500,debug:be=false,label:he,respectReducedMotion:U=true}=n,ye=X(m.start??"top bottom"),we=X(m.end??"bottom top"),D=g==="infinite"?1/0:g??0,l,V=P===true?1/0:typeof P=="number"?P:0,b=false,G=0,L=V,z=U&&ae(),xe=ue(t=>{z=U&&t,z&&(b=false,clearTimeout(l),l=void 0);}),O=()=>V>0&&!z,Q=new Map,q=c.map(t=>{let a=typeof t.easing=="function"?t.easing:H[t.easing??"linear"]??H.linear,d=Array.from(s.querySelectorAll(t.selector)),u=d.map(i=>K(i));return d.forEach((i,h)=>{Q.has(i)||Q.set(i,i.getAttribute("style")??""),i.style.strokeDasharray=`${u[h]}`,i.style.strokeDashoffset=`${u[h]}`,t.fade&&(i.style.opacity="0");}),{...t,elements:d,lengths:u,easeFn:a}});function ve(){for(let[t,a]of Q)a?t.setAttribute("style",a):t.removeAttribute("style");}let N=0,W=0,_=false,x=false,v=0,R=false,S=-1,M=0,y=null;be&&(y=document.createElement("div"),Object.assign(y.style,{position:"fixed",bottom:"16px",left:"16px",zIndex:"9999",background:"rgba(0,0,0,0.88)",backdropFilter:"blur(8px)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:"10px",padding:"10px 14px",fontFamily:"monospace",fontSize:"11px",color:"#fff",minWidth:"240px",pointerEvents:"none",lineHeight:"1.4"}),document.body.appendChild(y));function Me(t){if(!y)return;let a=he??(typeof e=="string"?e:"timeline"),d=c.map(({selector:u,from:i,to:h},j)=>{let I=fe[j%fe.length],C=h>i?Math.min(1,Math.max(0,(t-i)/(h-i))):0,F=Math.round(C*100);return `<div style="margin:4px 0">
2
2
  <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:2px">
3
- <span style="color:${I};max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">${a}</span>
4
- <span style="color:#666;margin-left:8px">${k}%</span>
3
+ <span style="color:${I};max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">${u}</span>
4
+ <span style="color:#666;margin-left:8px">${F}%</span>
5
5
  </div>
6
6
  <div style="height:3px;background:#2a2a2a;border-radius:2px;position:relative;overflow:hidden">
7
- <div style="position:absolute;left:${i*100}%;width:${(g-i)*100}%;height:100%;background:${I}33;border-radius:2px"></div>
8
- <div style="position:absolute;left:${i*100}%;width:${(g-i)*F*100}%;height:100%;background:${I};border-radius:2px;transition:width 0.05s linear"></div>
7
+ <div style="position:absolute;left:${i*100}%;width:${(h-i)*100}%;height:100%;background:${I}33;border-radius:2px"></div>
8
+ <div style="position:absolute;left:${i*100}%;width:${(h-i)*C*100}%;height:100%;background:${I};border-radius:2px;transition:width 0.05s linear"></div>
9
9
  </div>
10
- </div>`}).join("");w.innerHTML=`
10
+ </div>`}).join("");y.innerHTML=`
11
11
  <div style="color:#555;margin-bottom:8px;font-size:10px;text-transform:uppercase;letter-spacing:0.12em;border-bottom:1px solid rgba(255,255,255,0.06);padding-bottom:6px">
12
- scrollDrawTimeline \xB7 ${s}
12
+ scrollDrawTimeline \xB7 ${a}
13
13
  </div>
14
14
  ${d}
15
15
  <div style="margin-top:6px;padding-top:6px;border-top:1px solid rgba(255,255,255,0.06)">
@@ -20,4 +20,4 @@ function ve({bounces:e=3,decay:n=.5}={}){let r=Math.max(1,Math.round(e)),o=Math.
20
20
  <div style="height:2px;background:#2a2a2a;border-radius:1px;overflow:hidden">
21
21
  <div style="height:100%;background:#fff;border-radius:1px;width:${t*100}%;transition:width 0.05s linear"></div>
22
22
  </div>
23
- </div>`;}function K(){return y==="x"?window.scrollX:window.scrollY}function ye(){return y==="x"?window.innerWidth:window.innerHeight}function Y(){let t=u.getBoundingClientRect(),s=K(),d=y==="x"?t.left:t.top,a=y==="x"?t.width:t.height,i=se({top:d,height:a},s,ye(),fe,be);U=i.tStart,J=i.tEnd;}function Z(t){u.style.setProperty("--scroll-draw-progress",String(t)),q.forEach(({elements:s,lengths:d,from:a,to:i,easeFn:g,fade:W})=>{let I=i-a,F=I>0?Math.min(1,Math.max(0,(t-a)/I)):0,k=g(F);s.forEach((ne,xe)=>{ne.style.strokeDashoffset=`${d[xe]*(1-k)}`,W&&(ne.style.opacity=String(k));});}),we(t);}function _(){D=-1,T=0,S=false,q.forEach(({elements:t,lengths:s,fade:d})=>{t.forEach((a,i)=>{a.style.strokeDashoffset=`${s[i]}`,d&&(a.style.opacity="0");});}),u.style.setProperty("--scroll-draw-progress","0");}function N(){if(!R||x)return;let t;h?t=Math.min(1,(performance.now()-G)/de):(t=ie(K(),U,J,M),(f||O())&&(D=Math.max(D,t),t=D)),T=t,Z(t),t>=1&&!S?(S=true,p?.(),O()&&!h&&!l?l=setTimeout(()=>{l=void 0,L!==1/0&&L--,_(),h=true,G=performance.now();},E):$>0&&f&&!h&&!l&&(l=setTimeout(()=>{l=void 0,$!==1/0&&$--,_();},E))):!h&&t<1&&!f&&(S=false),h&&t>=1&&!l&&(S=false,L>0&&O()?l=setTimeout(()=>{l=void 0,L!==1/0&&L--,_(),G=performance.now();},E):h=false),v=requestAnimationFrame(N);}Y();let ee=new IntersectionObserver(t=>{t.forEach(s=>{R=s.isIntersecting,R&&!x?v=requestAnimationFrame(N):cancelAnimationFrame(v);});},{threshold:0});ee.observe(u);function te(){q.forEach(({elements:t,lengths:s})=>{t.forEach((d,a)=>{s[a]=H(d),d.style.strokeDasharray=`${s[a]}`;});}),Y();}let A;function C(){clearTimeout(A),A=setTimeout(te,150);}return window.addEventListener("resize",C),window.addEventListener("orientationchange",C),{destroy(){cancelAnimationFrame(v),clearTimeout(A),clearTimeout(l),ee.disconnect(),window.removeEventListener("resize",C),window.removeEventListener("orientationchange",C),he(),w&&(w.remove(),w=null),ge(),u.style.removeProperty("--scroll-draw-progress");},refresh(){clearTimeout(A),te();},replay(){$=b==="infinite"?1/0:b??0,L=V,h=false,clearTimeout(l),l=void 0,_(),x=false;},pause(){x=true,cancelAnimationFrame(v);},resume(){x&&(x=false,R&&(v=requestAnimationFrame(N)));},seek(t){T=Math.min(1,Math.max(0,t)),D=T,x=true,cancelAnimationFrame(v),Z(T);},getProgress(){return T}}}export{_e as scrollDrawTimeline};
23
+ </div>`;}function Y(){return w==="x"?window.scrollX:window.scrollY}function Ee(){return w==="x"?window.innerWidth:window.innerHeight}function J(){let t=s.getBoundingClientRect(),a=Y(),d=w==="x"?t.left:t.top,u=w==="x"?t.width:t.height,i=se({top:d,height:u},a,Ee(),ye,we);N=i.tStart,W=i.tEnd;}function Z(t){s.style.setProperty("--scroll-draw-progress",String(t)),q.forEach(({elements:a,lengths:d,from:u,to:i,easeFn:h,fade:j})=>{let I=i-u,C=I>0?Math.min(1,Math.max(0,(t-u)/I)):0,F=h(C);a.forEach((ne,Te)=>{ne.style.strokeDashoffset=`${d[Te]*(1-F)}`,j&&(ne.style.opacity=String(F));});}),Me(t);}function $(){S=-1,M=0,R=false,q.forEach(({elements:t,lengths:a,fade:d})=>{t.forEach((u,i)=>{u.style.strokeDashoffset=`${a[i]}`,d&&(u.style.opacity="0");});}),s.style.setProperty("--scroll-draw-progress","0");}function B(){if(!_||x)return;let t;b?t=Math.min(1,(performance.now()-G)/ge):(t=ie(Y(),N,W,E),(f||O())&&(S=Math.max(S,t),t=S)),M=t,Z(t),t>=1&&!R?(R=true,p?.(),O()&&!b&&!l?l=setTimeout(()=>{l=void 0,L!==1/0&&L--,$(),b=true,G=performance.now();},T):D>0&&f&&!b&&!l&&(l=setTimeout(()=>{l=void 0,D!==1/0&&D--,$();},T))):!b&&t<1&&!f&&(R=false),b&&t>=1&&!l&&(R=false,L>0&&O()?l=setTimeout(()=>{l=void 0,L!==1/0&&L--,$(),G=performance.now();},T):b=false),v=requestAnimationFrame(B);}J();let ee=new IntersectionObserver(t=>{t.forEach(a=>{_=a.isIntersecting,_&&!x?v=requestAnimationFrame(B):cancelAnimationFrame(v);});},{threshold:0});ee.observe(s);function te(){q.forEach(({elements:t,lengths:a})=>{t.forEach((d,u)=>{a[u]=K(d),d.style.strokeDasharray=`${a[u]}`;});}),J();}let A;function k(){clearTimeout(A),A=setTimeout(te,150);}return window.addEventListener("resize",k),window.addEventListener("orientationchange",k),pe(s,{type:"draw",getProgress:()=>M,getTrigger:()=>({tStart:N,tEnd:W})}),{destroy(){cancelAnimationFrame(v),clearTimeout(A),clearTimeout(l),ee.disconnect(),me(s),window.removeEventListener("resize",k),window.removeEventListener("orientationchange",k),xe(),y&&(y.remove(),y=null),ve(),s.style.removeProperty("--scroll-draw-progress");},refresh(){clearTimeout(A),te();},replay(){D=g==="infinite"?1/0:g??0,L=V,b=false,clearTimeout(l),l=void 0,$(),x=false;},pause(){x=true,cancelAnimationFrame(v);},resume(){x&&(x=false,_&&(v=requestAnimationFrame(B)));},seek(t){M=Math.min(1,Math.max(0,t)),S=M,x=true,cancelAnimationFrame(v),Z(M);},getProgress(){return M}}}export{Ve as scrollDrawTimeline};
@@ -1 +1 @@
1
- 'use strict';function Y({bounces:e=3,decay:t=.5}={}){let n=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,t)),c=Math.sqrt(r),s=0,p=[];for(let i=0;i<n;i++){let a=Math.pow(c,i);p.push(a),s+=a;}let u=[0],y=0;for(let i=0;i<n;i++)y+=p[i]/s,u.push(y);return i=>{if(i<=0)return 0;if(i>=1)return 1;for(let a=0;a<n;a++)if(i<=u[a+1]){let f=(i-u[a])/(u[a+1]-u[a]);if(a===0)return f*(2-f);let x=1-Math.pow(r,a);return x+(1-x)*(2*f-1)*(2*f-1)}return 1}}function Z({amplitude:e=1,period:t=.4}={}){let n=Math.max(1,e),r=Math.max(.1,t),c=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-c)*(2*Math.PI)/r)+1}var V={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:Y(),elastic:Z()};function P(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 O(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 $(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 H(e,t,n){return Math.min(n,Math.max(t,e))}function z(e,t,n,r){return n===t?0:H((e-t)/(n-t)*r,0,1)}function G(e,t,n,r,c){let s=O(e.top,e.height,t,r.element)-$(r.viewport,n),p=O(e.top,e.height,t,c.element)-$(c.viewport,n);return {tStart:s,tEnd:p}}var q=new Map;function B(e,t){q.set(e,t);}function W(e){q.delete(e);}var ee=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function k(e,...t){ee&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var X={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function ae(e,t={}){if(typeof window>"u")return X;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return k("scrollVideo: <video> element not found:",e),X;let r=n,{trigger:c={},easing:s="linear",once:p=false,axis:u="y",preload:y="auto",onReady:i,onComplete:a,onProgress:f}=t,x=window.matchMedia("(prefers-reduced-motion: reduce)").matches,j=typeof s=="function"?s:V[s]??V.linear,J=P(c.start??"top top"),K=P(c.end??"bottom top");r.pause(),r.hasAttribute("preload")||(r.preload=y);let C=t.from??0,S=t.to,I=0,T=0,l=0,b=false,d=false,h=-1,w=0,v=false,g=false,F=()=>u==="x"?window.scrollX:window.scrollY,Q=()=>u==="x"?window.innerWidth:window.innerHeight;function A(){let o=r.getBoundingClientRect(),m=u==="x"?o.left:o.top,U=u==="x"?o.width:o.height,N=G({top:m,height:U},F(),Q(),J,K);I=N.tStart,T=N.tEnd;}function M(o){if(!g)return;let m=S??r.duration??0;r.currentTime=C+(m-C)*o,r.style.setProperty("--scroll-draw-progress",String(o)),f?.(o);}function E(){if(!b||d||!g)return;let o=j(z(F(),I,T,1));p&&(h=Math.max(h,o),o=h),w=o,M(o),o>=1&&!v?(v=true,a?.()):o<1&&!p&&(v=false),l=requestAnimationFrame(E);}function R(){if(g=true,S===void 0&&(S=r.duration),x){M(1),i?.();return}A(),i?.(),b&&!d&&(l=requestAnimationFrame(E));}r.readyState>=1?R():r.addEventListener("loadedmetadata",R,{once:true}),g||A();let D=new IntersectionObserver(o=>{o.forEach(m=>{b=m.isIntersecting,b&&!d&&g?l=requestAnimationFrame(E):cancelAnimationFrame(l);});}),L;function _(){clearTimeout(L),L=setTimeout(A,150);}return window.addEventListener("resize",_),window.addEventListener("orientationchange",_),D.observe(r),B(r,{type:"video",getProgress:()=>w,getTrigger:()=>({tStart:I,tEnd:T})}),{destroy(){cancelAnimationFrame(l),D.disconnect(),r.removeEventListener("loadedmetadata",R),window.removeEventListener("resize",_),window.removeEventListener("orientationchange",_),clearTimeout(L),W(r);},replay(){h=-1,v=false,w=0,d=false,M(0);},pause(){d=true,cancelAnimationFrame(l);},resume(){d&&(d=false,b&&g&&(l=requestAnimationFrame(E)));},seek(o){let m=Math.min(1,Math.max(0,o));w=m,h=m,d=true,cancelAnimationFrame(l),M(m);},getProgress(){return w}}}exports.scrollVideo=ae;
1
+ 'use strict';function H({bounces:e=3,decay:t=.5}={}){let n=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,t)),c=Math.sqrt(r),s=0,p=[];for(let i=0;i<n;i++){let a=Math.pow(c,i);p.push(a),s+=a;}let u=[0],x=0;for(let i=0;i<n;i++)x+=p[i]/s,u.push(x);return i=>{if(i<=0)return 0;if(i>=1)return 1;for(let a=0;a<n;a++)if(i<=u[a+1]){let f=(i-u[a])/(u[a+1]-u[a]);if(a===0)return f*(2-f);let v=1-Math.pow(r,a);return v+(1-v)*(2*f-1)*(2*f-1)}return 1}}function ee({amplitude:e=1,period:t=.4}={}){let n=Math.max(1,e),r=Math.max(.1,t),c=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-c)*(2*Math.PI)/r)+1}var C={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:H(),elastic:ee()};function N(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 z(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 G(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 te(e,t,n){return Math.min(n,Math.max(t,e))}function q(e,t,n,r){return n===t?0:te((e-t)/(n-t)*r,0,1)}function B(e,t,n,r,c){let s=z(e.top,e.height,t,r.element)-G(r.viewport,n),p=z(e.top,e.height,t,c.element)-G(c.viewport,n);return {tStart:s,tEnd:p}}var W=Symbol.for("svg-scroll-draw.registry");function k(){let e=globalThis;return e[W]||(e[W]=new Map)}function X(e,t){k().set(e,t);}function K(e){k().delete(e);}var re=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){re&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var j={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function ce(e,t={}){if(typeof window>"u")return j;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return Y("scrollVideo: <video> element not found:",e),j;let r=n,{trigger:c={},easing:s="linear",once:p=false,axis:u="y",preload:x="auto",onReady:i,onComplete:a,onProgress:f}=t,v=window.matchMedia("(prefers-reduced-motion: reduce)").matches,J=typeof s=="function"?s:C[s]??C.linear,Q=N(c.start??"top top"),U=N(c.end??"bottom top");r.pause(),r.hasAttribute("preload")||(r.preload=x);let F=t.from??0,I=t.to,R=0,A=0,l=0,b=false,d=false,h=-1,w=0,M=false,g=false,D=()=>u==="x"?window.scrollX:window.scrollY,Z=()=>u==="x"?window.innerWidth:window.innerHeight;function L(){let o=r.getBoundingClientRect(),m=u==="x"?o.left:o.top,y=u==="x"?o.width:o.height,$=B({top:m,height:y},D(),Z(),Q,U);R=$.tStart,A=$.tEnd;}let E=NaN;function _(o){if(!g)return;let m=I??r.duration??0,y=F+(m-F)*o;y!==E&&(E=y,r.currentTime=y),r.style.setProperty("--scroll-draw-progress",String(o)),f?.(o);}function S(){if(!b||d||!g)return;let o=J(q(D(),R,A,1));p&&(h=Math.max(h,o),o=h),w=o,_(o),o>=1&&!M?(M=true,a?.()):o<1&&!p&&(M=false),l=requestAnimationFrame(S);}function V(){if(g=true,I===void 0&&(I=r.duration),v){_(1),i?.();return}L(),i?.(),b&&!d&&(l=requestAnimationFrame(S));}r.readyState>=1?V():r.addEventListener("loadedmetadata",V,{once:true}),g||L();let O=new IntersectionObserver(o=>{o.forEach(m=>{b=m.isIntersecting,b&&!d&&g?l=requestAnimationFrame(S):cancelAnimationFrame(l);});}),P;function T(){clearTimeout(P),P=setTimeout(L,150);}return window.addEventListener("resize",T),window.addEventListener("orientationchange",T),O.observe(r),X(r,{type:"video",getProgress:()=>w,getTrigger:()=>({tStart:R,tEnd:A})}),{destroy(){cancelAnimationFrame(l),O.disconnect(),r.removeEventListener("loadedmetadata",V),window.removeEventListener("resize",T),window.removeEventListener("orientationchange",T),clearTimeout(P),K(r);},replay(){h=-1,M=false,w=0,d=false,E=NaN,_(0);},pause(){d=true,cancelAnimationFrame(l);},resume(){d&&(d=false,b&&g&&(l=requestAnimationFrame(S)));},seek(o){let m=Math.min(1,Math.max(0,o));w=m,h=m,d=true,cancelAnimationFrame(l),E=NaN,_(m);},getProgress(){return w}}}exports.scrollVideo=ce;
@@ -1 +1 @@
1
- function Y({bounces:e=3,decay:t=.5}={}){let n=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,t)),c=Math.sqrt(r),s=0,p=[];for(let i=0;i<n;i++){let a=Math.pow(c,i);p.push(a),s+=a;}let u=[0],y=0;for(let i=0;i<n;i++)y+=p[i]/s,u.push(y);return i=>{if(i<=0)return 0;if(i>=1)return 1;for(let a=0;a<n;a++)if(i<=u[a+1]){let f=(i-u[a])/(u[a+1]-u[a]);if(a===0)return f*(2-f);let x=1-Math.pow(r,a);return x+(1-x)*(2*f-1)*(2*f-1)}return 1}}function Z({amplitude:e=1,period:t=.4}={}){let n=Math.max(1,e),r=Math.max(.1,t),c=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-c)*(2*Math.PI)/r)+1}var V={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:Y(),elastic:Z()};function P(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 O(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 $(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 H(e,t,n){return Math.min(n,Math.max(t,e))}function z(e,t,n,r){return n===t?0:H((e-t)/(n-t)*r,0,1)}function G(e,t,n,r,c){let s=O(e.top,e.height,t,r.element)-$(r.viewport,n),p=O(e.top,e.height,t,c.element)-$(c.viewport,n);return {tStart:s,tEnd:p}}var q=new Map;function B(e,t){q.set(e,t);}function W(e){q.delete(e);}var ee=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function k(e,...t){ee&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var X={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function ae(e,t={}){if(typeof window>"u")return X;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return k("scrollVideo: <video> element not found:",e),X;let r=n,{trigger:c={},easing:s="linear",once:p=false,axis:u="y",preload:y="auto",onReady:i,onComplete:a,onProgress:f}=t,x=window.matchMedia("(prefers-reduced-motion: reduce)").matches,j=typeof s=="function"?s:V[s]??V.linear,J=P(c.start??"top top"),K=P(c.end??"bottom top");r.pause(),r.hasAttribute("preload")||(r.preload=y);let C=t.from??0,S=t.to,I=0,T=0,l=0,b=false,d=false,h=-1,w=0,v=false,g=false,F=()=>u==="x"?window.scrollX:window.scrollY,Q=()=>u==="x"?window.innerWidth:window.innerHeight;function A(){let o=r.getBoundingClientRect(),m=u==="x"?o.left:o.top,U=u==="x"?o.width:o.height,N=G({top:m,height:U},F(),Q(),J,K);I=N.tStart,T=N.tEnd;}function M(o){if(!g)return;let m=S??r.duration??0;r.currentTime=C+(m-C)*o,r.style.setProperty("--scroll-draw-progress",String(o)),f?.(o);}function E(){if(!b||d||!g)return;let o=j(z(F(),I,T,1));p&&(h=Math.max(h,o),o=h),w=o,M(o),o>=1&&!v?(v=true,a?.()):o<1&&!p&&(v=false),l=requestAnimationFrame(E);}function R(){if(g=true,S===void 0&&(S=r.duration),x){M(1),i?.();return}A(),i?.(),b&&!d&&(l=requestAnimationFrame(E));}r.readyState>=1?R():r.addEventListener("loadedmetadata",R,{once:true}),g||A();let D=new IntersectionObserver(o=>{o.forEach(m=>{b=m.isIntersecting,b&&!d&&g?l=requestAnimationFrame(E):cancelAnimationFrame(l);});}),L;function _(){clearTimeout(L),L=setTimeout(A,150);}return window.addEventListener("resize",_),window.addEventListener("orientationchange",_),D.observe(r),B(r,{type:"video",getProgress:()=>w,getTrigger:()=>({tStart:I,tEnd:T})}),{destroy(){cancelAnimationFrame(l),D.disconnect(),r.removeEventListener("loadedmetadata",R),window.removeEventListener("resize",_),window.removeEventListener("orientationchange",_),clearTimeout(L),W(r);},replay(){h=-1,v=false,w=0,d=false,M(0);},pause(){d=true,cancelAnimationFrame(l);},resume(){d&&(d=false,b&&g&&(l=requestAnimationFrame(E)));},seek(o){let m=Math.min(1,Math.max(0,o));w=m,h=m,d=true,cancelAnimationFrame(l),M(m);},getProgress(){return w}}}export{ae as scrollVideo};
1
+ function H({bounces:e=3,decay:t=.5}={}){let n=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,t)),c=Math.sqrt(r),s=0,p=[];for(let i=0;i<n;i++){let a=Math.pow(c,i);p.push(a),s+=a;}let u=[0],x=0;for(let i=0;i<n;i++)x+=p[i]/s,u.push(x);return i=>{if(i<=0)return 0;if(i>=1)return 1;for(let a=0;a<n;a++)if(i<=u[a+1]){let f=(i-u[a])/(u[a+1]-u[a]);if(a===0)return f*(2-f);let v=1-Math.pow(r,a);return v+(1-v)*(2*f-1)*(2*f-1)}return 1}}function ee({amplitude:e=1,period:t=.4}={}){let n=Math.max(1,e),r=Math.max(.1,t),c=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-c)*(2*Math.PI)/r)+1}var C={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:H(),elastic:ee()};function N(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 z(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 G(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 te(e,t,n){return Math.min(n,Math.max(t,e))}function q(e,t,n,r){return n===t?0:te((e-t)/(n-t)*r,0,1)}function B(e,t,n,r,c){let s=z(e.top,e.height,t,r.element)-G(r.viewport,n),p=z(e.top,e.height,t,c.element)-G(c.viewport,n);return {tStart:s,tEnd:p}}var W=Symbol.for("svg-scroll-draw.registry");function k(){let e=globalThis;return e[W]||(e[W]=new Map)}function X(e,t){k().set(e,t);}function K(e){k().delete(e);}var re=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){re&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var j={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function ce(e,t={}){if(typeof window>"u")return j;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return Y("scrollVideo: <video> element not found:",e),j;let r=n,{trigger:c={},easing:s="linear",once:p=false,axis:u="y",preload:x="auto",onReady:i,onComplete:a,onProgress:f}=t,v=window.matchMedia("(prefers-reduced-motion: reduce)").matches,J=typeof s=="function"?s:C[s]??C.linear,Q=N(c.start??"top top"),U=N(c.end??"bottom top");r.pause(),r.hasAttribute("preload")||(r.preload=x);let F=t.from??0,I=t.to,R=0,A=0,l=0,b=false,d=false,h=-1,w=0,M=false,g=false,D=()=>u==="x"?window.scrollX:window.scrollY,Z=()=>u==="x"?window.innerWidth:window.innerHeight;function L(){let o=r.getBoundingClientRect(),m=u==="x"?o.left:o.top,y=u==="x"?o.width:o.height,$=B({top:m,height:y},D(),Z(),Q,U);R=$.tStart,A=$.tEnd;}let E=NaN;function _(o){if(!g)return;let m=I??r.duration??0,y=F+(m-F)*o;y!==E&&(E=y,r.currentTime=y),r.style.setProperty("--scroll-draw-progress",String(o)),f?.(o);}function S(){if(!b||d||!g)return;let o=J(q(D(),R,A,1));p&&(h=Math.max(h,o),o=h),w=o,_(o),o>=1&&!M?(M=true,a?.()):o<1&&!p&&(M=false),l=requestAnimationFrame(S);}function V(){if(g=true,I===void 0&&(I=r.duration),v){_(1),i?.();return}L(),i?.(),b&&!d&&(l=requestAnimationFrame(S));}r.readyState>=1?V():r.addEventListener("loadedmetadata",V,{once:true}),g||L();let O=new IntersectionObserver(o=>{o.forEach(m=>{b=m.isIntersecting,b&&!d&&g?l=requestAnimationFrame(S):cancelAnimationFrame(l);});}),P;function T(){clearTimeout(P),P=setTimeout(L,150);}return window.addEventListener("resize",T),window.addEventListener("orientationchange",T),O.observe(r),X(r,{type:"video",getProgress:()=>w,getTrigger:()=>({tStart:R,tEnd:A})}),{destroy(){cancelAnimationFrame(l),O.disconnect(),r.removeEventListener("loadedmetadata",V),window.removeEventListener("resize",T),window.removeEventListener("orientationchange",T),clearTimeout(P),K(r);},replay(){h=-1,M=false,w=0,d=false,E=NaN,_(0);},pause(){d=true,cancelAnimationFrame(l);},resume(){d&&(d=false,b&&g&&(l=requestAnimationFrame(S)));},seek(o){let m=Math.min(1,Math.max(0,o));w=m,h=m,d=true,cancelAnimationFrame(l),E=NaN,_(m);},getProgress(){return w}}}export{ce as scrollVideo};
@@ -1,3 +1,3 @@
1
- 'use strict';var vue=require('vue');function _t({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,r)),l=Math.sqrt(t),s=0,c=[];for(let d=0;d<n;d++){let x=Math.pow(l,d);c.push(x),s+=x;}let u=[0],m=0;for(let d=0;d<n;d++)m+=c[d]/s,u.push(m);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let x=0;x<n;x++)if(d<=u[x+1]){let N=(d-u[x])/(u[x+1]-u[x]);if(x===0)return N*(2-N);let L=1-Math.pow(t,x);return L+(1-L)*(2*N-1)*(2*N-1)}return 1}}function qt({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),t=Math.max(.1,r),l=n<=1?t/4:t/(2*Math.PI)*Math.asin(1/n);return s=>s<=0?0:s>=1?1:n*Math.pow(2,-10*s)*Math.sin((s-l)*(2*Math.PI)/t)+1}var ee={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:_t(),elastic:qt()};function pe(e="top bottom"){let r=e.trim();if(/^\d+(\.\d+)?%$/.test(r))return {element:"top",viewport:r};let[n="top",t="bottom"]=r.split(/\s+/).filter(Boolean);return {element:n,viewport:t}}function Et(e,r,n,t){switch(t){case "top":return e+n;case "center":return e+n+r/2;case "bottom":return e+n+r;default:return e+n}}function Tt(e,r){if(/^\d+(\.\d+)?%$/.test(e))return r*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return r/2;case "bottom":return r;default:return r}}function Be(e){let r=e.tagName.toLowerCase();if(r==="rect"){let n=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(n+t)}if(r==="circle"){let n=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*n}return e.getTotalLength()}function Bt(e,r,n){return Math.min(n,Math.max(r,e))}function Q(e,r,n,t){return n===r?0:Bt((e-r)/(n-r)*t,0,1)}function tt(e,r,n){let t=e.getBoundingClientRect(),l=n==="x"?t.width:t.height;return r?{top:n==="x"?t.left-r.getBoundingClientRect().left+r.scrollLeft:t.top-r.getBoundingClientRect().top+r.scrollTop,height:l,scroll:0}:{top:n==="x"?t.left:t.top,height:l,scroll:n==="x"?window.scrollX:window.scrollY}}function xe(e,r,n,t,l){let s=Et(e.top,e.height,r,t.element)-Tt(t.viewport,n),c=Et(e.top,e.height,r,l.element)-Tt(l.viewport,n);return {tStart:s,tEnd:c}}function xt(e){let r=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(r)return [parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)];let n=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n)return [parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function We(e,r,n){let t=xt(e),l=xt(r);return !t||!l?e:`rgb(${Math.round(t[0]+(l[0]-t[0])*n)},${Math.round(t[1]+(l[1]-t[1])*n)},${Math.round(t[2]+(l[2]-t[2])*n)})`}var At={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 nt=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,...r){nt&&console.warn(`[svg-scroll-draw] ${e}`,...r);}var Wt="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Gt="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Mt=33;function jt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Ut(e){let r=[];for(let n=0;n<Mt;n++){let t=n/(Mt-1);r.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${r.join(",")})`}function rt(e){switch(e){case "linear":return "linear";case "ease-in":return Wt;case "ease-out":return Gt;case "ease-in-out":return jt()?Ut(ee["ease-in-out"]):null;default:return null}}var Xt=0;function Yt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Qt(e){let r=e.getAttribute("stroke"),n=e.getAttribute("fill");!r||r==="none"?ye("Element has no stroke \u2014 path will not be visible.",e):n&&n!=="none"&&n!=="transparent"&&ye("Element has a fill \u2014 it may obscure the stroke animation.",e);}function Zt(e,r,n){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function l(){let s=n==="x"?window.scrollX:window.scrollY,c=e-s,u=r-s,m=n==="x";t.innerHTML=`
1
+ 'use strict';var vue=require('vue');function Wt({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,r)),l=Math.sqrt(t),s=0,c=[];for(let p=0;p<n;p++){let T=Math.pow(l,p);c.push(T),s+=T;}let u=[0],m=0;for(let p=0;p<n;p++)m+=c[p]/s,u.push(m);return p=>{if(p<=0)return 0;if(p>=1)return 1;for(let T=0;T<n;T++)if(p<=u[T+1]){let V=(p-u[T])/(u[T+1]-u[T]);if(T===0)return V*(2-V);let C=1-Math.pow(t,T);return C+(1-C)*(2*V-1)*(2*V-1)}return 1}}function Gt({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),t=Math.max(.1,r),l=n<=1?t/4:t/(2*Math.PI)*Math.asin(1/n);return s=>s<=0?0:s>=1?1:n*Math.pow(2,-10*s)*Math.sin((s-l)*(2*Math.PI)/t)+1}var ne={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:Wt(),elastic:Gt()};function de(e="top bottom"){let r=e.trim();if(/^\d+(\.\d+)?%$/.test(r))return {element:"top",viewport:r};let[n="top",t="bottom"]=r.split(/\s+/).filter(Boolean);return {element:n,viewport:t}}function xt(e,r,n,t){switch(t){case "top":return e+n;case "center":return e+n+r/2;case "bottom":return e+n+r;default:return e+n}}function At(e,r){if(/^\d+(\.\d+)?%$/.test(e))return r*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return r/2;case "bottom":return r;default:return r}}function Be(e){let r=e.tagName.toLowerCase();if(r==="rect"){let n=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(n+t)}if(r==="circle"){let n=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*n}return e.getTotalLength()}function jt(e,r,n){return Math.min(n,Math.max(r,e))}function K(e,r,n,t){return n===r?0:jt((e-r)/(n-r)*t,0,1)}function tt(e,r,n){let t=e.getBoundingClientRect(),l=n==="x"?t.width:t.height;return r?{top:n==="x"?t.left-r.getBoundingClientRect().left+r.scrollLeft:t.top-r.getBoundingClientRect().top+r.scrollTop,height:l,scroll:0}:{top:n==="x"?t.left:t.top,height:l,scroll:n==="x"?window.scrollX:window.scrollY}}function xe(e,r,n,t,l){let s=xt(e.top,e.height,r,t.element)-At(t.viewport,n),c=xt(e.top,e.height,r,l.element)-At(l.viewport,n);return {tStart:s,tEnd:c}}function Mt(e){let r=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(r)return [parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)];let n=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n)return [parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function We(e,r,n){let t=Mt(e),l=Mt(r);return !t||!l?e:`rgb(${Math.round(t[0]+(l[0]-t[0])*n)},${Math.round(t[1]+(l[1]-t[1])*n)},${Math.round(t[2]+(l[2]-t[2])*n)})`}var Lt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var nt=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function we(e,...r){nt&&console.warn(`[svg-scroll-draw] ${e}`,...r);}var Ut="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Yt="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Ct=33;function Xt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Qt(e){let r=[];for(let n=0;n<Ct;n++){let t=n/(Ct-1);r.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${r.join(",")})`}function rt(e){switch(e){case "linear":return "linear";case "ease-in":return Ut;case "ease-out":return Yt;case "ease-in-out":return Xt()?Qt(ne["ease-in-out"]):null;default:return null}}var $t=Symbol.for("svg-scroll-draw.registry");function Pt(){let e=globalThis;return e[$t]||(e[$t]=new Map)}function Le(e,r){Pt().set(e,r);}function Ce(e){Pt().delete(e);}var Zt=0;function Kt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Jt(e){let r=e.getAttribute("stroke"),n=e.getAttribute("fill");!r||r==="none"?we("Element has no stroke \u2014 path will not be visible.",e):n&&n!=="none"&&n!=="transparent"&&we("Element has a fill \u2014 it may obscure the stroke animation.",e);}function en(e,r,n){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function l(){let s=n==="x"?window.scrollX:window.scrollY,c=e-s,u=r-s,m=n==="x";t.innerHTML=`
2
2
  <div style="position:absolute;${m?`left:${c}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${c}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
- <div style="position:absolute;${m?`left:${u}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${u}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",l,{passive:true}),l(),{el:t,destroy(){window.removeEventListener("scroll",l),t.remove();}}}var Lt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Ct=/[MmLlHhVvCcSsQqTtAaZz]/g;function Jt(e,r,n){if(!nt)return;let t=(e.match(Ct)??[]).join("").toUpperCase(),l=(r.match(Ct)??[]).join("").toUpperCase(),s=(e.match(Lt)??[]).length,c=(r.match(Lt)??[]).length;if(t!==l){ye(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${l||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,n);return}s!==c&&ye(`morphTo: coordinate count differs (${s} \u2192 ${c}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,n);}function lt(e,r,n){let t=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),l=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let c=parseFloat(s),u=t[l++]??c;return String(+(c+(u-c)*n).toFixed(4))})}function ct(e,r={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:n,...t}=r,l=n?{...At[n],...t}:t,s=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:c="path, polyline, line, polygon, rect, circle",speed:u=1,fade:m=false,easing:d="linear",trigger:x={},stagger:N=0,direction:L="forward",once:te=false,debug:Me=false,axis:B="y",scrollContainer:Z,autoReverse:X=false,delay:W=0,strokeColor:A,strokeWidth:C,fillOpacity:M,waypoints:w,velocityScale:O=false,threshold:k=0,rootMargin:$="0px",repeat:E=0,repeatDelay:ne=0,morphTo:F,clip:re,autoplay:oe=false,duration:J=1e3,native:ue=true,onProgress:y,onStart:T,onComplete:g,onEnter:p,onLeave:I,onEnterBack:de,onLeaveBack:ve}=l,me=re===true?"left":typeof re=="string"?re:false,Se=typeof d=="function"?d:ee[d]??ee.linear,Le=pe(x.start??"top bottom"),_e=pe(x.end??"bottom top"),he=typeof Z=="string"?document.querySelector(Z):Z??null,be=Array.isArray(A)?A[0]:null,se=Array.isArray(A)?A[1]:typeof A=="string"?A:null,ie=Array.isArray(C)?C[0]:null,G=Array.isArray(C)?C[1]:typeof C=="number"?C:null,fe=Array.isArray(M)?M[0]:null,Y=Array.isArray(M)?M[1]:typeof M=="number"?M:null;function Ce(o){let a=o*100;switch(me){case "right":return `inset(0 0 0 ${100-a}%)`;case "top":return `inset(0 0 ${100-a}% 0)`;case "bottom":return `inset(${100-a}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-a}% 0 0)`}}let V=me?[]:Array.from(e.querySelectorAll(c)),P=[],i=[],f=0,we=0,D=false,z=false,_=0,j=false,ae=-1,$e=-1,K=false,Ee=0,Re=0,De,ot=null;function gt(){ot?.destroy(),ot=null;}let He=new Set,yt=NaN,Ne=true,Ye=-1,ht=performance.now(),qe=NaN;function st(){return he?B==="x"?he.scrollLeft:he.scrollTop:B==="x"?window.scrollX:window.scrollY}function bt(){return he?B==="x"?he.clientWidth:he.clientHeight:B==="x"?window.innerWidth:window.innerHeight}function wt(){let o=tt(e,he,B),a=xe(o,o.scroll,bt(),Le,_e);f=a.tStart,we=a.tEnd,Me&&nt&&(gt(),ot=Zt(f,we,B));}function Ht(o,a){if(e.style.setProperty("--scroll-draw-progress",String(o)),me){let v=a==="reverse"?1-o:o;e.style.clipPath=Ce(v);return}V.forEach((v,le)=>{v.style.strokeDashoffset=a==="reverse"?`${P[le]*o}`:`${P[le]*(1-o)}`,m&&(v.style.opacity=a==="reverse"?`${1-o}`:`${o}`),be&&se?v.style.stroke=We(be,se,o):se&&(v.style.stroke=se),ie!==null&&G!==null?v.style.strokeWidth=`${ie+(G-ie)*o}`:G!==null&&(v.style.strokeWidth=`${G}`),fe!==null&&Y!==null?v.style.fillOpacity=`${fe+(Y-fe)*o}`:Y!==null&&(v.style.fillOpacity=`${Y}`),F&&v.tagName.toLowerCase()==="path"&&i[le]&&v.setAttribute("d",lt(i[le],F,o));});}function Qe(){if(e.style.setProperty("--scroll-draw-progress","0"),me){e.style.clipPath=Ce(0);return}V.forEach((o,a)=>{o.style.strokeDasharray=`${P[a]}`,o.style.strokeDashoffset=L==="reverse"?"0":`${P[a]}`,m?o.style.opacity=L==="reverse"?"1":"0":o.style.opacity="",be&&(o.style.stroke=be),ie!==null&&(o.style.strokeWidth=`${ie}`),fe!==null&&(o.style.fillOpacity=`${fe}`),F&&o.tagName.toLowerCase()==="path"&&i[a]&&o.setAttribute("d",i[a]);});}if(V.forEach(o=>{Qt(o);let a=Be(o);P.push(a);let v=o.tagName.toLowerCase()==="path";v?i.push(o.getAttribute("d")??""):i.push(""),F&&(v?Jt(i[i.length-1],F,o):ye(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),s?(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=L==="reverse"?`${a}`:"0",m&&(o.style.opacity="1"),se&&(o.style.stroke=se),G!==null&&(o.style.strokeWidth=`${G}`),Y!==null&&(o.style.fillOpacity=`${Y}`),F&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",F)):(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=L==="reverse"?"0":`${a}`,m?o.style.opacity=L==="reverse"?"1":"0":o.style.opacity="",be&&(o.style.stroke=be),ie!==null&&(o.style.strokeWidth=`${ie}`),fe!==null&&(o.style.fillOpacity=`${fe}`));}),me){if(s)return e.style.clipPath=Ce(1),g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Ce(0);}else if(s)return g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let vt=typeof d=="string"?rt(d):null;function Nt(){return !(ue===false||!Yt()||!V.length||!vt||me||B!=="y"||he||u!==1||N!==0||te||X||O!==false||F||w||E||W>0||y||T||g||p||I||de||ve||A!=null||C!=null||M!=null||(x.start??"top bottom").trim()!=="top bottom"||(x.end??"bottom top").trim()!=="bottom top")}function Vt(){let o=++Xt,a=`svg-scroll-draw-${o}`,v=`svg-scroll-draw-host-${o}`,le=`--svg-scroll-draw-${o}`,Ie=L==="reverse"?"0":"var(--ssd-len)",Pe=L==="reverse"?"var(--ssd-len)":"0",Ae=`stroke-dashoffset:${Ie};`,S=`stroke-dashoffset:${Pe};`;m&&(Ae+=`opacity:${L==="reverse"?1:0};`,S+=`opacity:${L==="reverse"?0:1};`);let R=document.createElement("style");R.setAttribute("data-svg-scroll-draw",""),R.textContent=`@keyframes ${a}{from{${Ae}}to{${S}}}.${v}{view-timeline-name:${le};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${vt};animation-fill-mode:both;animation-timeline:${le};animation-range:cover 0% cover 100%;}`,document.head.appendChild(R),e.classList.add(v);function ce(h,U){h.style.setProperty("--ssd-len",String(P[U])),h.style.strokeDasharray=`${P[U]}`,h.style.strokeDashoffset="",h.style.opacity="",h.style.animationPlayState="",h.classList.add(a);}V.forEach(ce);let b=false,H=-1;function q(){if(H>=0)return H;let h=e.getBoundingClientRect(),{tStart:U,tEnd:Te}=xe({top:h.top,height:h.height},st(),bt(),Le,_e);return Se(Q(st(),U,Te,u))}return {destroy(){e.classList.remove(v),V.forEach(h=>{h.classList.remove(a),h.style.removeProperty("--ssd-len"),h.style.animationPlayState="";}),R.remove();},replay(){b=false,H=-1,V.forEach(ce);},pause(){b=true,V.forEach(h=>{h.style.animationPlayState="paused";});},resume(){b&&(b=false,V.forEach(h=>{h.style.animationPlayState="running";}));},seek(h){let U=Math.min(1,Math.max(0,h));H=U,b=true,V.forEach((Te,ge)=>{Te.classList.remove(a),Te.style.strokeDashoffset=L==="reverse"?`${P[ge]*U}`:`${P[ge]*(1-U)}`,m&&(Te.style.opacity=L==="reverse"?`${1-U}`:`${U}`);});},getProgress(){return q()},refresh(){V.forEach((h,U)=>{P[U]=Be(h),h.style.setProperty("--ssd-len",String(P[U])),h.style.strokeDasharray=`${P[U]}`;});}}}if(Nt())return Vt();function zt(){let o=Math.max(1,J),a=0,v=0,le=false;function Ie(b){let H=true;if(me){let q=Math.min(1,Math.max(0,b/o)),h=Se(q);Ee=h,e.style.setProperty("--scroll-draw-progress",String(h)),e.style.clipPath=Ce(L==="reverse"?1-h:h),y?.(h),q<1&&(H=false);}else V.forEach((q,h)=>{let U=h*N*o,Te=Math.min(1,Math.max(0,(b-U)/o)),ge=Se(Te);q.style.strokeDashoffset=L==="reverse"?`${P[h]*ge}`:`${P[h]*(1-ge)}`,m&&(q.style.opacity=L==="reverse"?`${1-ge}`:`${ge}`),be&&se?q.style.stroke=We(be,se,ge):se&&(q.style.stroke=se),ie!==null&&G!==null?q.style.strokeWidth=`${ie+(G-ie)*ge}`:G!==null&&(q.style.strokeWidth=`${G}`),fe!==null&&Y!==null?q.style.fillOpacity=`${fe+(Y-fe)*ge}`:Y!==null&&(q.style.fillOpacity=`${Y}`),F&&q.tagName.toLowerCase()==="path"&&i[h]&&q.setAttribute("d",lt(i[h],F,ge)),h===0&&(Ee=ge,y?.(ge),e.style.setProperty("--scroll-draw-progress",String(ge))),Te<1&&(H=false);});if(w){let q=Math.min(1,Math.max(0,b/o)),h=Se(q);for(let U in w){let Te=parseFloat(U);h>=Te&&!He.has(Te)&&(He.add(Te),w[U]?.());}}return H}function Pe(b){if(K)return;let H=b-a;z||(z=true,T?.());let q=Ie(H);if(q&&!D){D=true,Ie(o*(1+Math.max(0,V.length-1)*N)),g?.(),Re<(E==="infinite"?1/0:E??0)&&(Re++,De=setTimeout(()=>{a=performance.now(),z=false,D=false,He.clear(),Qe(),_=requestAnimationFrame(Pe);},ne));return}q||(_=requestAnimationFrame(Pe));}function Ae(){cancelAnimationFrame(_),clearTimeout(De),a=performance.now(),v=0,K=false,z=false,D=false,Re=0,le=true,Ee=0,He.clear(),Qe(),_=requestAnimationFrame(Pe);}let S=new IntersectionObserver(b=>{b.forEach(H=>{H.isIntersecting&&!(te&&D)?Ae():!H.isIntersecting&&!te&&!D&&(cancelAnimationFrame(_),clearTimeout(De),le=false);});},{root:he??null,threshold:k,rootMargin:$}),R;function ce(){clearTimeout(R),R=setTimeout(()=>{V.forEach((b,H)=>{P[H]=Be(b),b.style.strokeDasharray=`${P[H]}`;});},150);}return window.addEventListener("resize",ce),window.addEventListener("orientationchange",ce),W>0?setTimeout(()=>S.observe(e),W):S.observe(e),{destroy(){cancelAnimationFrame(_),clearTimeout(De),S.disconnect(),window.removeEventListener("resize",ce),window.removeEventListener("orientationchange",ce),clearTimeout(R);},replay(){Re=0,Ae();},pause(){K||!le||(K=true,v=performance.now()-a,cancelAnimationFrame(_));},resume(){K&&(K=false,le=true,a=performance.now()-v,_=requestAnimationFrame(Pe));},seek(b){let H=Math.min(1,Math.max(0,b));Ee=H,K=true,v=H*o,a=performance.now()-v,cancelAnimationFrame(_),Ie(v);},getProgress(){return Ee},refresh(){clearTimeout(R),V.forEach((b,H)=>{P[H]=Be(b),b.style.strokeDasharray=`${P[H]}`;});}}}if(oe)return zt();wt();function Ze(){if(!j||K)return;let o=performance.now(),a=st();if(!Ne&&O===false&&a===yt){_=requestAnimationFrame(Ze);return}Ne=false,yt=a;let v=u;if(O!==false){let S=o-ht,R=S>0?Math.abs(a-(Ye<0?a:Ye))/S:0;v=u*Math.max(.2,1+R*(typeof O=="number"?O:1)*.04);}Ye=a,ht=o;let le=X?$e===-1||a>=$e?"forward":"reverse":L;$e=a;let Ie=we-f,Pe=true,Ae=Ie===0?0:(a-f)/Ie;if(isNaN(qe)||(qe<=0&&Ae>0?p?.():qe>0&&Ae<=0&&ve?.(),qe<1&&Ae>=1?I?.():qe>=1&&Ae<1&&de?.()),qe=Ae,me){let S=Se(Q(a,f,we,v));te&&!X&&(ae=Math.max(ae,S),S=ae),Ee=S,e.style.setProperty("--scroll-draw-progress",String(S));let R=le==="reverse"?1-S:S;e.style.clipPath=Ce(R),y?.(S),!z&&Q(a,f,we,v)>0&&(z=true,T?.()),S>=1&&!D?(D=true,g?.(),Re<(E==="infinite"?1/0:E??0)&&(Re++,De=setTimeout(()=>{ae=-1,z=false,D=false,e.style.clipPath=Ce(0);},ne))):S<1&&!te&&(D=false),_=requestAnimationFrame(Ze);return}if(V.forEach((S,R)=>{let ce=R*N*Ie,b=Se(Q(a,f+ce,we+ce,v));te&&!X&&(ae=Math.max(ae,b),b=ae),Ee=b,S.style.strokeDashoffset=le==="reverse"?`${P[R]*b}`:`${P[R]*(1-b)}`,m&&(S.style.opacity=le==="reverse"?`${1-b}`:`${b}`),be&&se?S.style.stroke=We(be,se,b):se&&(S.style.stroke=se),ie!==null&&G!==null?S.style.strokeWidth=`${ie+(G-ie)*b}`:G!==null&&(S.style.strokeWidth=`${G}`),fe!==null&&Y!==null?S.style.fillOpacity=`${fe+(Y-fe)*b}`:Y!==null&&(S.style.fillOpacity=`${Y}`),F&&S.tagName.toLowerCase()==="path"&&i[R]&&S.setAttribute("d",lt(i[R],F,b)),R===0&&(y?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(Pe=false);}),w){let S=Se(Q(a,f,we,v));for(let R in w){let ce=parseFloat(R);S>=ce&&!He.has(ce)&&(He.add(ce),w[R]?.());}}!z&&Q(a,f,we,v)>0&&(z=true,T?.()),Pe&&!D?(D=true,g?.(),Re<(E==="infinite"?1/0:E??0)&&(Re++,De=setTimeout(()=>{ae=-1,z=false,D=false,He.clear(),Qe(),Ne=true;},ne))):!Pe&&!te&&(D=false),_=requestAnimationFrame(Ze);}let it=false;function Je(){it||(it=true,_=requestAnimationFrame(function(){Ze();}));}function Ke(){it=false,cancelAnimationFrame(_);}let at=new IntersectionObserver(o=>{o.forEach(a=>{j=a.isIntersecting,j&&!K?(Ne=true,Je()):Ke();});},{root:he??null,threshold:k,rootMargin:$});function St(){V.forEach((o,a)=>{P[a]=Be(o),o.style.strokeDasharray=`${P[a]}`;}),wt(),Ne=true;}let et;function Ge(){clearTimeout(et),et=setTimeout(St,150);}window.addEventListener("resize",Ge),window.addEventListener("orientationchange",Ge);let je;return typeof ResizeObserver<"u"&&(je=new ResizeObserver(()=>Ge()),je.observe(document.body),je.observe(document.documentElement),je.observe(e)),W>0?setTimeout(()=>at.observe(e),W):at.observe(e),{destroy(){cancelAnimationFrame(_),clearTimeout(De),Ke(),at.disconnect(),je?.disconnect(),window.removeEventListener("resize",Ge),window.removeEventListener("orientationchange",Ge),clearTimeout(et),gt();},replay(){ae=-1,$e=-1,Ye=-1,z=false,D=false,Re=0,K=false,Ee=0,He.clear(),clearTimeout(De),Qe(),Ne=true,j&&Je();},pause(){K=true,Ke();},resume(){K&&(K=false,Ne=true,j&&Je());},seek(o){let a=Math.min(1,Math.max(0,o));Ee=a,ae=a,K=true,Ke(),Ht(a,L),Ne=true;},getProgress(){return Ee},refresh(){clearTimeout(et),St(),j&&!K&&Je();}}}var $t=new Map;function Ve(e,r){$t.set(e,r);}function ze(e){$t.delete(e);}function Kt(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Pt(e){let r=[],n=/([\w]+)\(([^)]*)\)/g,t;for(;(t=n.exec(e))!==null;){let l=[],s=[],c=t[2].trim();if(c)for(let u of c.split(/[\s,]+/)){let m=u.match(/^([-+]?[\d.eE]+)(.*)$/);l.push(m?parseFloat(m[1]):0),s.push(m?m[2]:"");}r.push({fn:t[1],nums:l,units:s});}return r}function en(e,r,n){let t=Pt(e),l=Pt(r);return t.length===0||t.length!==l.length?n<1?e:r:t.map((s,c)=>{let u=l[c];return s.fn!==u.fn||s.nums.length!==u.nums.length?n<1?`${s.fn}(${s.nums.map((m,d)=>`${m}${s.units[d]}`).join(", ")})`:`${u.fn}(${u.nums.map((m,d)=>`${m}${u.units[d]}`).join(", ")})`:`${s.fn}(${s.nums.map((m,d)=>`${m+(u.nums[d]-m)*n}${s.units[d]}`).join(", ")})`}).join(" ")}function Ot(e,r,n){if(typeof e=="number"&&typeof r=="number")return String(e+(r-e)*n);let t=String(e),l=String(r);if(Kt(t))return We(t,l,n);if(t.includes("("))return en(t,l,n);let s=t.match(/^([-+]?[\d.]+)(.*)$/),c=l.match(/^([-+]?[\d.]+)(.*)$/);if(s&&c){let u=parseFloat(s[1]),m=parseFloat(c[1]);return `${u+(m-u)*n}${s[2]||c[2]}`}return n<1?t:l}function tn(e){return e.replace(/([A-Z])/g,r=>`-${r.toLowerCase()}`)}var nn=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),rn=0,kt="--scroll-draw-progress";function on(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function ut(e,r){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let{props:t,trigger:l={},easing:s="ease-out",speed:c=1,once:u=false,axis:m="y",scrollContainer:d,native:x=true,velocityScale:N=false,respectReducedMotion:L=true,triggerElement:te,onProgress:Me,onComplete:B,onEnter:Z,onLeave:X,onEnterBack:W,onLeaveBack:A}=r,C=L&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,M=typeof s=="function"?s:ee[s]??ee["ease-out"],w=pe(l.start??"top bottom"),O=pe(l.end??"bottom top"),k=te??e,$=typeof d=="string"?document.querySelector(d):d??null,E=Object.entries(t).map(([i,f])=>({prop:tn(i),from:Array.isArray(f)?f[0]:"",to:Array.isArray(f)?f[1]:f}));function ne(){let i=window.getComputedStyle(e);for(let f of E)f.from===""&&(f.from=i.getPropertyValue(f.prop).trim()||"0");}function F(){for(let i of E)e.style.setProperty(i.prop,String(i.to));}let re=new Map;for(let i of [...E.map(f=>f.prop),kt])re.set(i,e.style.getPropertyValue(i));function oe(){for(let[i,f]of re)f?e.style.setProperty(i,f):e.style.removeProperty(i);}if(C)return F(),B?.(),{...n,destroy:oe,getProgress:()=>1};ne();let J=typeof s=="string"?rt(s):null;function ue(){if(!x||!on()||!J||m!=="y"||$||k!==e||u||c!==1||Me||B||Z||X||W||A||N!==false||(l.start??"top bottom").trim()!=="top bottom"||(l.end??"bottom top").trim()!=="bottom top")return false;for(let i of E)if(!nn.has(i.prop))return false;return true}function y(){let i=`ssd-a-${++rn}`,f=E.map(j=>`${j.prop}:${j.from}`).join(";"),we=E.map(j=>`${j.prop}:${j.to}`).join(";"),D=document.createElement("style");D.setAttribute("data-ssd-animate",""),D.textContent=`@keyframes ${i}{from{${f}}to{${we}}}.${i}{animation-name:${i};animation-duration:auto;animation-timing-function:${J};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(D),e.classList.add(i);let z=()=>m==="x"?window.scrollX:window.scrollY,_=()=>m==="x"?window.innerWidth:window.innerHeight;return {destroy(){e.classList.remove(i),D.remove(),e.style.animationPlayState="",oe();},replay(){e.classList.remove(i),e.offsetWidth,e.classList.add(i);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(j){let ae=Math.min(1,Math.max(0,j));e.classList.remove(i);for(let $e of E)e.style.setProperty($e.prop,Ot($e.from,$e.to,ae));},getProgress(){let j=e.getBoundingClientRect(),ae=z(),$e=_(),{tStart:K,tEnd:Ee}=xe({top:j.top,height:j.height},ae,$e,w,O);return M(Q(ae,K,Ee,c))}}}if(ue())return y();let T=0,g=0,p=0,I=false,de=false,ve=-1,me=0,Se=false,Le=NaN,_e=-1,he=0,be=()=>$?m==="x"?$.scrollLeft:$.scrollTop:m==="x"?window.scrollX:window.scrollY,se=()=>$?m==="x"?$.clientWidth:$.clientHeight:m==="x"?window.innerWidth:window.innerHeight;function ie(){let i=tt(k,$,m),f=xe(i,i.scroll,se(),w,O);T=f.tStart,g=f.tEnd;}function G(i){e.style.setProperty(kt,String(i));for(let f of E)e.style.setProperty(f.prop,Ot(f.from,f.to,i));Me?.(i);}function fe(i){if(isNaN(Le)){Le=i;return}Le<=0&&i>0?Z?.():Le>0&&i<=0&&A?.(),Le<1&&i>=1?X?.():Le>=1&&i<1&&W?.(),Le=i;}function Y(){if(!I||de)return;let i=performance.now(),f=be(),we=c;if(N!==false){let _=i-he,j=_>0?Math.abs(f-(_e<0?f:_e))/_:0;we=c*Math.max(.2,1+j*(typeof N=="number"?N:1)*.04);}_e=f,he=i;let D=g===T?0:(f-T)/(g-T);fe(D);let z=M(Q(f,T,g,we));u&&(ve=Math.max(ve,z),z=ve),me=z,G(z),z>=1&&!Se?(Se=true,B?.()):z<1&&!u&&(Se=false),p=requestAnimationFrame(Y);}ie(),g===T&&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 i=M(Q(be(),T,g,c));u&&i>0&&(ve=i),me=i,G(i);}let Ce=new IntersectionObserver(i=>{i.forEach(f=>{I=f.isIntersecting,I&&!de?p=requestAnimationFrame(Y):cancelAnimationFrame(p);});},{root:$??null}),V;function P(){clearTimeout(V),V=setTimeout(ie,150);}return window.addEventListener("resize",P),window.addEventListener("orientationchange",P),Ce.observe(e),Ve(e,{type:"animate",getProgress:()=>me,getTrigger:()=>({tStart:T,tEnd:g})}),{destroy(){cancelAnimationFrame(p),Ce.disconnect(),window.removeEventListener("resize",P),window.removeEventListener("orientationchange",P),clearTimeout(V),oe(),ze(e);},replay(){ve=-1,Se=false,me=0,de=false,G(0);},pause(){de=true,cancelAnimationFrame(p);},resume(){de&&(de=false,I&&(p=requestAnimationFrame(Y)));},seek(i){let f=Math.min(1,Math.max(0,i));me=f,ve=f,de=true,cancelAnimationFrame(p),G(f);},getProgress(){return me}}}var mt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function ft(e,r){if(typeof window>"u")return mt;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return ye("scrollCounter: element not found:",e),mt;let t=n,{from:l=0,to:s,format:c,easing:u="ease-out",trigger:m={},once:d=true,decimals:x,onComplete:N}=r,L=x!==void 0?y=>y.toFixed(x):c??(y=>String(Math.round(y))),te=typeof u=="function"?u:ee[u]??ee["ease-out"],Me=pe(m.start??"top 80%"),B=pe(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=L(s),N?.(),mt;let X=0,W=0,A=0,C=false,M=false,w=-1,O=0,k=false,$=()=>window.scrollY,E=()=>window.innerHeight;function ne(){let y=t.getBoundingClientRect(),T=xe({top:y.top,height:y.height},$(),E(),Me,B);X=T.tStart,W=T.tEnd;}function F(y){t.textContent=L(l+(s-l)*y),t.style.setProperty("--scroll-draw-progress",String(y));}function re(){if(!C||M)return;let y=te(Q($(),X,W,1));d&&(w=Math.max(w,y),y=w),O=y,F(y),y>=1&&!k?(k=true,N?.()):y<1&&!d&&(k=false),A=requestAnimationFrame(re);}ne();{let y=te(Q($(),X,W,1));d&&y>0&&(w=y),O=y,F(y);}let oe=new IntersectionObserver(y=>{y.forEach(T=>{C=T.isIntersecting,C&&!M?A=requestAnimationFrame(re):cancelAnimationFrame(A);});}),J;function ue(){clearTimeout(J),J=setTimeout(ne,150);}return window.addEventListener("resize",ue),window.addEventListener("orientationchange",ue),oe.observe(t),Ve(t,{type:"counter",getProgress:()=>O,getTrigger:()=>({tStart:X,tEnd:W})}),{destroy(){cancelAnimationFrame(A),oe.disconnect(),window.removeEventListener("resize",ue),window.removeEventListener("orientationchange",ue),clearTimeout(J),ze(t);},replay(){w=-1,k=false,O=0,M=false,F(0);},pause(){M=true,cancelAnimationFrame(A);},resume(){M&&(M=false,C&&(A=requestAnimationFrame(re)));},seek(y){let T=Math.min(1,Math.max(0,y));O=T,w=T,M=true,cancelAnimationFrame(A),F(T);},getProgress(){return O}}}var Ft={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function pt(e,r={}){if(typeof window>"u")return Ft;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return ye("scrollVideo: <video> element not found:",e),Ft;let t=n,{trigger:l={},easing:s="linear",once:c=false,axis:u="y",preload:m="auto",onReady:d,onComplete:x,onProgress:N}=r,L=window.matchMedia("(prefers-reduced-motion: reduce)").matches,te=typeof s=="function"?s:ee[s]??ee.linear,Me=pe(l.start??"top top"),B=pe(l.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let Z=r.from??0,X=r.to,W=0,A=0,C=0,M=false,w=false,O=-1,k=0,$=false,E=false,ne=()=>u==="x"?window.scrollX:window.scrollY,F=()=>u==="x"?window.innerWidth:window.innerHeight;function re(){let p=t.getBoundingClientRect(),I=u==="x"?p.left:p.top,de=u==="x"?p.width:p.height,ve=xe({top:I,height:de},ne(),F(),Me,B);W=ve.tStart,A=ve.tEnd;}function oe(p){if(!E)return;let I=X??t.duration??0;t.currentTime=Z+(I-Z)*p,t.style.setProperty("--scroll-draw-progress",String(p)),N?.(p);}function J(){if(!M||w||!E)return;let p=te(Q(ne(),W,A,1));c&&(O=Math.max(O,p),p=O),k=p,oe(p),p>=1&&!$?($=true,x?.()):p<1&&!c&&($=false),C=requestAnimationFrame(J);}function ue(){if(E=true,X===void 0&&(X=t.duration),L){oe(1),d?.();return}re(),d?.(),M&&!w&&(C=requestAnimationFrame(J));}t.readyState>=1?ue():t.addEventListener("loadedmetadata",ue,{once:true}),E||re();let y=new IntersectionObserver(p=>{p.forEach(I=>{M=I.isIntersecting,M&&!w&&E?C=requestAnimationFrame(J):cancelAnimationFrame(C);});}),T;function g(){clearTimeout(T),T=setTimeout(re,150);}return window.addEventListener("resize",g),window.addEventListener("orientationchange",g),y.observe(t),Ve(t,{type:"video",getProgress:()=>k,getTrigger:()=>({tStart:W,tEnd:A})}),{destroy(){cancelAnimationFrame(C),y.disconnect(),t.removeEventListener("loadedmetadata",ue),window.removeEventListener("resize",g),window.removeEventListener("orientationchange",g),clearTimeout(T),ze(t);},replay(){O=-1,$=false,k=0,w=false,oe(0);},pause(){w=true,cancelAnimationFrame(C);},resume(){w&&(w=false,M&&E&&(C=requestAnimationFrame(J)));},seek(p){let I=Math.min(1,Math.max(0,p));k=I,O=I,w=true,cancelAnimationFrame(C),oe(I);},getProgress(){return k}}}function Dt(e){let r=e.textContent??"";return e.textContent="",r.split(/(\s+)/).filter(Boolean).map(n=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(n)?(t.textContent=n,t.style.whiteSpace="pre"):(t.textContent=n,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(n)?null:t}).filter(n=>n!==null)}function sn(e){let r=e.textContent??"";return e.textContent="",r.split("").map(n=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=n,n===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),n===" "?null:t}).filter(n=>n!==null)}function Rt(e){let r=Dt(e),n=new Map;for(let s of r){let c=s.offsetTop;n.has(c)||n.set(c,[]),n.get(c).push(s);}let t=[],l=Array.from(n.keys()).sort((s,c)=>s-c);for(let s of l){let c=n.get(s),u=document.createElement("span");u.setAttribute("aria-hidden","true"),u.style.display="inline-block",c.forEach((m,d)=>{let x=m.nextElementSibling;u.appendChild(m),d<c.length-1&&x&&x.style.whiteSpace==="pre"&&u.appendChild(x);}),t.push(u);}return e.textContent="",t.forEach((s,c)=>{e.appendChild(s),c<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function an(e,r,n,t){if(n<=1||t===0)return e;let l=(n-1)*t,s=r*t,c=s+(1-l);return c<=s?e>=s?1:0:Math.min(1,Math.max(0,(e-s)/(c-s)))}function ln(e,r){let n=[];if(r?.y!==void 0&&n.push(`translateY(${r.y*(1-e)}px)`),r?.x!==void 0&&n.push(`translateX(${r.x*(1-e)}px)`),r?.rotate!==void 0&&n.push(`rotate(${r.rotate*(1-e)}deg)`),r?.scale!==void 0){let t=r.scale+(1-r.scale)*e;n.push(`scale(${t})`);}return n.join(" ")||""}var It={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function dt(e,r={}){if(typeof window>"u")return It;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return ye("scrollText: element not found:",e),It;let t=n,{split:l="words",stagger:s=.04,easing:c="ease-out",from:u={opacity:0,y:24},trigger:m={},once:d=true,onComplete:x}=r,N=window.matchMedia("(prefers-reduced-motion: reduce)").matches,L=typeof c=="function"?c:ee[c]??ee["ease-out"],te=pe(m.start??"top 85%"),Me=pe(m.end??"top 40%"),B=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let Z;l==="chars"?Z=sn(t):l==="lines"?Z=Rt(t):Z=Dt(t);let X=Z.length;function W(g,p){u?.opacity!==void 0&&(g.style.opacity=String(u.opacity+(1-u.opacity)*p));let I=ln(p,u);I&&(g.style.transform=I);}function A(g){t.style.setProperty("--scroll-draw-progress",String(g)),Z.forEach((p,I)=>{let de=L(an(g,I,X,s));W(p,de);});}if(N)return A(1),x?.(),{destroy(){t.innerHTML=B,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};A(0);let C=0,M=0,w=0,O=false,k=false,$=-1,E=0,ne=false,F=()=>window.scrollY,re=()=>window.innerHeight;function oe(){let g=t.getBoundingClientRect(),p=xe({top:g.top,height:g.height},F(),re(),te,Me);C=p.tStart,M=p.tEnd;}function J(){if(!O||k)return;let g=Q(F(),C,M,1);d&&($=Math.max($,g),g=$),E=g,A(g),g>=1&&!ne?(ne=true,x?.()):g<1&&!d&&(ne=false),w=requestAnimationFrame(J);}oe();let ue=new IntersectionObserver(g=>{g.forEach(p=>{O=p.isIntersecting,O&&!k?w=requestAnimationFrame(J):cancelAnimationFrame(w);});}),y;function T(){clearTimeout(y),y=setTimeout(()=>{if(l==="lines"){let g=E;t.innerHTML=B,t.setAttribute("aria-label",t.textContent??""),Z=Rt(t),A(g);}oe();},150);}return window.addEventListener("resize",T),window.addEventListener("orientationchange",T),ue.observe(t),Ve(t,{type:"text",getProgress:()=>E,getTrigger:()=>({tStart:C,tEnd:M})}),{destroy(){cancelAnimationFrame(w),ue.disconnect(),window.removeEventListener("resize",T),window.removeEventListener("orientationchange",T),clearTimeout(y),t.innerHTML=B,t.removeAttribute("aria-label"),ze(t);},replay(){$=-1,ne=false,E=0,k=false,A(0);},pause(){k=true,cancelAnimationFrame(w);},resume(){k&&(k=false,O&&(w=requestAnimationFrame(J)));},seek(g){let p=Math.min(1,Math.max(0,g));E=p,$=p,k=true,cancelAnimationFrame(w),A(p);},getProgress(){return E}}}function Bn(e={}){let r=vue.ref(null);return vue.onMounted(()=>{if(!r.value)return;let n=ct(r.value,e);vue.onUnmounted(()=>n.destroy());}),r}var Wn=vue.defineComponent({name:"ScrollDraw",props:{selector:{type:String},speed:{type:Number},fade:{type:Boolean},stagger:{type:Number},easing:{type:[String,Function]},direction:{type:String},trigger:{type:Object},onProgress:{type:Function},onStart:{type:Function},onComplete:{type:Function},once:{type:Boolean},debug:{type:Boolean}},setup(e,{slots:r}){let n=vue.ref(null);return vue.onMounted(()=>{if(!n.value)return;let t={};e.selector!=null&&(t.selector=e.selector),e.speed!=null&&(t.speed=e.speed),e.fade!=null&&(t.fade=e.fade),e.stagger!=null&&(t.stagger=e.stagger),e.easing!=null&&(t.easing=e.easing),e.direction!=null&&(t.direction=e.direction),e.trigger!=null&&(t.trigger=e.trigger),e.once!=null&&(t.once=e.once),e.debug!=null&&(t.debug=e.debug),e.onProgress!=null&&(t.onProgress=e.onProgress),e.onStart!=null&&(t.onStart=e.onStart),e.onComplete!=null&&(t.onComplete=e.onComplete);let l=ct(n.value,t);vue.onUnmounted(()=>l.destroy());}),()=>vue.h("div",{ref:n},r.default?.())}});function Gn(e){let r=vue.ref(null);return vue.onMounted(()=>{if(!r.value)return;let n=ut(r.value,e);vue.onUnmounted(()=>n.destroy());}),r}var jn=vue.defineComponent({name:"ScrollAnimate",props:{options:{type:Object,required:true}},setup(e,{slots:r}){let n=vue.ref(null);return vue.onMounted(()=>{if(!n.value)return;let t=ut(n.value,e.options);vue.onUnmounted(()=>t.destroy());}),()=>vue.h("div",{ref:n},r.default?.())}});function Un(e){let r=vue.ref(null);return vue.onMounted(()=>{if(!r.value)return;let n=ft(r.value,e);vue.onUnmounted(()=>n.destroy());}),r}var Xn=vue.defineComponent({name:"ScrollCounter",props:{to:{type:Number,required:true},from:{type:Number},format:{type:Function},easing:{type:[String,Function]},trigger:{type:Object},once:{type:Boolean},decimals:{type:Number},onComplete:{type:Function}},setup(e){let r=vue.ref(null);return vue.onMounted(()=>{if(!r.value)return;let n={to:e.to};e.from!=null&&(n.from=e.from),e.format!=null&&(n.format=e.format),e.easing!=null&&(n.easing=e.easing),e.trigger!=null&&(n.trigger=e.trigger),e.once!=null&&(n.once=e.once),e.decimals!=null&&(n.decimals=e.decimals),e.onComplete!=null&&(n.onComplete=e.onComplete);let t=ft(r.value,n);vue.onUnmounted(()=>t.destroy());}),()=>vue.h("span",{ref:r})}});function Yn(e={}){let r=vue.ref(null);return vue.onMounted(()=>{if(!r.value)return;let n=pt(r.value,e);vue.onUnmounted(()=>n.destroy());}),r}var Qn=vue.defineComponent({name:"ScrollVideo",props:{src:{type:String,required:true},options:{type:Object},muted:{type:Boolean,default:true},playsInline:{type:Boolean,default:true},class:{type:String}},setup(e){let r=vue.ref(null);return vue.onMounted(()=>{if(!r.value)return;let n=pt(r.value,e.options??{});vue.onUnmounted(()=>n.destroy());}),()=>vue.h("video",{ref:r,src:e.src,muted:e.muted,playsinline:e.playsInline,preload:"auto",class:e.class})}});function Zn(e={}){let r=vue.ref(null);return vue.onMounted(()=>{if(!r.value)return;let n=dt(r.value,e);vue.onUnmounted(()=>n.destroy());}),r}var Jn=vue.defineComponent({name:"ScrollText",props:{options:{type:Object},tag:{type:String,default:"p"}},setup(e,{slots:r}){let n=vue.ref(null);return vue.onMounted(()=>{if(!n.value)return;let t=dt(n.value,e.options??{});vue.onUnmounted(()=>t.destroy());}),()=>vue.h(e.tag,{ref:n},r.default?.())}});exports.ScrollAnimate=jn;exports.ScrollCounter=Xn;exports.ScrollDraw=Wn;exports.ScrollText=Jn;exports.ScrollVideo=Qn;exports.useScrollAnimate=Gn;exports.useScrollCounter=Un;exports.useScrollDraw=Bn;exports.useScrollText=Zn;exports.useScrollVideo=Yn;
3
+ <div style="position:absolute;${m?`left:${u}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${u}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",l,{passive:true}),l(),{el:t,destroy(){window.removeEventListener("scroll",l),t.remove();}}}var Ot=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,kt=/[MmLlHhVvCcSsQqTtAaZz]/g;function tn(e,r,n){if(!nt)return;let t=(e.match(kt)??[]).join("").toUpperCase(),l=(r.match(kt)??[]).join("").toUpperCase(),s=(e.match(Ot)??[]).length,c=(r.match(Ot)??[]).length;if(t!==l){we(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${l||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,n);return}s!==c&&we(`morphTo: coordinate count differs (${s} \u2192 ${c}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,n);}function ct(e,r,n){let t=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),l=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let c=parseFloat(s),u=t[l++]??c;return String(+(c+(u-c)*n).toFixed(4))})}function ut(e,r={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:n,...t}=r,l=n?{...Lt[n],...t}:t,s=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:c="path, polyline, line, polygon, rect, circle",speed:u=1,fade:m=false,easing:p="linear",trigger:T={},stagger:V=0,direction:C="forward",once:re=false,debug:$e=false,axis:W="y",scrollContainer:J,autoReverse:X=false,delay:G=0,strokeColor:A,strokeWidth:$,fillOpacity:M,waypoints:w,velocityScale:k=false,threshold:R=0,rootMargin:P="0px",repeat:S=0,repeatDelay:oe=0,morphTo:F,clip:se,autoplay:ie=false,duration:ee=1e3,native:ae=true,onProgress:d,onStart:x,onComplete:g,onEnter:L,onLeave:E,onEnterBack:D,onLeaveBack:fe}=l,Q=se===true?"left":typeof se=="string"?se:false,Ee=typeof p=="function"?p:ne[p]??ne.linear,Pe=de(T.start??"top bottom"),_e=de(T.end??"bottom top"),ve=typeof J=="string"?document.querySelector(J):J??null,Se=Array.isArray(A)?A[0]:null,le=Array.isArray(A)?A[1]:typeof A=="string"?A:null,ce=Array.isArray($)?$[0]:null,j=Array.isArray($)?$[1]:typeof $=="number"?$:null,pe=Array.isArray(M)?M[0]:null,Z=Array.isArray(M)?M[1]:typeof M=="number"?M:null;function Oe(o){let a=o*100;switch(Q){case "right":return `inset(0 0 0 ${100-a}%)`;case "top":return `inset(0 0 ${100-a}% 0)`;case "bottom":return `inset(${100-a}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-a}% 0 0)`}}let z=Q?[]:Array.from(e.querySelectorAll(c)),O=[],i=[],f=0,ge=0,N=false,_=false,q=0,Ae=false,ye=-1,te=-1,U=false,he=0,De=0,He,ot=null;function yt(){ot?.destroy(),ot=null;}let Ve=new Set,ht=NaN,ze=true,Xe=-1,bt=performance.now(),qe=NaN;function st(){return ve?W==="x"?ve.scrollLeft:ve.scrollTop:W==="x"?window.scrollX:window.scrollY}function wt(){return ve?W==="x"?ve.clientWidth:ve.clientHeight:W==="x"?window.innerWidth:window.innerHeight}function vt(){let o=tt(e,ve,W);return xe(o,o.scroll,wt(),Pe,_e)}function St(){(({tStart:f,tEnd:ge}=vt())),$e&&nt&&(yt(),ot=en(f,ge,W));}function it(o,a=vt){Le(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:a});let b=o.destroy;return o.destroy=()=>{b.call(o),Ce(e);},o}function zt(o,a){if(e.style.setProperty("--scroll-draw-progress",String(o)),Q){let b=a==="reverse"?1-o:o;e.style.clipPath=Oe(b);return}z.forEach((b,ue)=>{b.style.strokeDashoffset=a==="reverse"?`${O[ue]*o}`:`${O[ue]*(1-o)}`,m&&(b.style.opacity=a==="reverse"?`${1-o}`:`${o}`),Se&&le?b.style.stroke=We(Se,le,o):le&&(b.style.stroke=le),ce!==null&&j!==null?b.style.strokeWidth=`${ce+(j-ce)*o}`:j!==null&&(b.style.strokeWidth=`${j}`),pe!==null&&Z!==null?b.style.fillOpacity=`${pe+(Z-pe)*o}`:Z!==null&&(b.style.fillOpacity=`${Z}`),F&&b.tagName.toLowerCase()==="path"&&i[ue]&&b.setAttribute("d",ct(i[ue],F,o));});}function Qe(){if(e.style.setProperty("--scroll-draw-progress","0"),Q){e.style.clipPath=Oe(0);return}z.forEach((o,a)=>{o.style.strokeDasharray=`${O[a]}`,o.style.strokeDashoffset=C==="reverse"?"0":`${O[a]}`,m?o.style.opacity=C==="reverse"?"1":"0":o.style.opacity="",Se&&(o.style.stroke=Se),ce!==null&&(o.style.strokeWidth=`${ce}`),pe!==null&&(o.style.fillOpacity=`${pe}`),F&&o.tagName.toLowerCase()==="path"&&i[a]&&o.setAttribute("d",i[a]);});}if(z.forEach(o=>{Jt(o);let a=Be(o);O.push(a);let b=o.tagName.toLowerCase()==="path";b?i.push(o.getAttribute("d")??""):i.push(""),F&&(b?tn(i[i.length-1],F,o):we(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),s?(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=C==="reverse"?`${a}`:"0",m&&(o.style.opacity="1"),le&&(o.style.stroke=le),j!==null&&(o.style.strokeWidth=`${j}`),Z!==null&&(o.style.fillOpacity=`${Z}`),F&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",F)):(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=C==="reverse"?"0":`${a}`,m?o.style.opacity=C==="reverse"?"1":"0":o.style.opacity="",Se&&(o.style.stroke=Se),ce!==null&&(o.style.strokeWidth=`${ce}`),pe!==null&&(o.style.fillOpacity=`${pe}`));}),Q){if(s)return e.style.clipPath=Oe(1),g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Oe(0);}else if(s)return g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Et=typeof p=="string"?rt(p):null;function _t(){return !(ae===false||!Kt()||!z.length||!Et||Q||W!=="y"||ve||u!==1||V!==0||re||X||k!==false||F||w||S||G>0||d||x||g||L||E||D||fe||A!=null||$!=null||M!=null||(T.start??"top bottom").trim()!=="top bottom"||(T.end??"bottom top").trim()!=="bottom top")}function qt(){let o=++Zt,a=`svg-scroll-draw-${o}`,b=`svg-scroll-draw-host-${o}`,ue=`--svg-scroll-draw-${o}`,Ne=C==="reverse"?"0":"var(--ssd-len)",ke=C==="reverse"?"var(--ssd-len)":"0",Me=`stroke-dashoffset:${Ne};`,v=`stroke-dashoffset:${ke};`;m&&(Me+=`opacity:${C==="reverse"?1:0};`,v+=`opacity:${C==="reverse"?0:1};`);let I=document.createElement("style");I.setAttribute("data-svg-scroll-draw",""),I.textContent=`@keyframes ${a}{from{${Me}}to{${v}}}.${b}{view-timeline-name:${ue};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${Et};animation-fill-mode:both;animation-timeline:${ue};animation-range:cover 0% cover 100%;}`,document.head.appendChild(I),e.classList.add(b);function me(y,Y){y.style.setProperty("--ssd-len",String(O[Y])),y.style.strokeDasharray=`${O[Y]}`,y.style.strokeDashoffset="",y.style.opacity="",y.style.animationPlayState="",y.classList.add(a);}z.forEach(me);let h=false,H=-1;function B(){if(H>=0)return H;let y=e.getBoundingClientRect(),{tStart:Y,tEnd:Te}=xe({top:y.top,height:y.height},st(),wt(),Pe,_e);return Ee(K(st(),Y,Te,u))}return {destroy(){e.classList.remove(b),z.forEach(y=>{y.classList.remove(a),y.style.removeProperty("--ssd-len"),y.style.animationPlayState="";}),I.remove();},replay(){h=false,H=-1,z.forEach(me);},pause(){h=true,z.forEach(y=>{y.style.animationPlayState="paused";});},resume(){h&&(h=false,z.forEach(y=>{y.style.animationPlayState="running";}));},seek(y){let Y=Math.min(1,Math.max(0,y));H=Y,h=true,z.forEach((Te,be)=>{Te.classList.remove(a),Te.style.strokeDashoffset=C==="reverse"?`${O[be]*Y}`:`${O[be]*(1-Y)}`,m&&(Te.style.opacity=C==="reverse"?`${1-Y}`:`${Y}`);});},getProgress(){return B()},refresh(){z.forEach((y,Y)=>{O[Y]=Be(y),y.style.setProperty("--ssd-len",String(O[Y])),y.style.strokeDasharray=`${O[Y]}`;});}}}if(_t())return it(qt());function Bt(){let o=Math.max(1,ee),a=0,b=0,ue=false;function Ne(h){let H=true;if(Q){let B=Math.min(1,Math.max(0,h/o)),y=Ee(B);he=y,e.style.setProperty("--scroll-draw-progress",String(y)),e.style.clipPath=Oe(C==="reverse"?1-y:y),d?.(y),B<1&&(H=false);}else z.forEach((B,y)=>{let Y=y*V*o,Te=Math.min(1,Math.max(0,(h-Y)/o)),be=Ee(Te);B.style.strokeDashoffset=C==="reverse"?`${O[y]*be}`:`${O[y]*(1-be)}`,m&&(B.style.opacity=C==="reverse"?`${1-be}`:`${be}`),Se&&le?B.style.stroke=We(Se,le,be):le&&(B.style.stroke=le),ce!==null&&j!==null?B.style.strokeWidth=`${ce+(j-ce)*be}`:j!==null&&(B.style.strokeWidth=`${j}`),pe!==null&&Z!==null?B.style.fillOpacity=`${pe+(Z-pe)*be}`:Z!==null&&(B.style.fillOpacity=`${Z}`),F&&B.tagName.toLowerCase()==="path"&&i[y]&&B.setAttribute("d",ct(i[y],F,be)),y===0&&(he=be,d?.(be),e.style.setProperty("--scroll-draw-progress",String(be))),Te<1&&(H=false);});if(w){let B=Math.min(1,Math.max(0,h/o)),y=Ee(B);for(let Y in w){let Te=parseFloat(Y);y>=Te&&!Ve.has(Te)&&(Ve.add(Te),w[Y]?.());}}return H}function ke(h){if(U)return;let H=h-a;_||(_=true,x?.());let B=Ne(H);if(B&&!N){N=true,Ne(o*(1+Math.max(0,z.length-1)*V)),g?.(),De<(S==="infinite"?1/0:S??0)&&(De++,He=setTimeout(()=>{a=performance.now(),_=false,N=false,Ve.clear(),Qe(),q=requestAnimationFrame(ke);},oe));return}B||(q=requestAnimationFrame(ke));}function Me(){cancelAnimationFrame(q),clearTimeout(He),a=performance.now(),b=0,U=false,_=false,N=false,De=0,ue=true,he=0,Ve.clear(),Qe(),q=requestAnimationFrame(ke);}let v=new IntersectionObserver(h=>{h.forEach(H=>{H.isIntersecting&&!(re&&N)?Me():!H.isIntersecting&&!re&&!N&&(cancelAnimationFrame(q),clearTimeout(He),ue=false);});},{root:ve??null,threshold:R,rootMargin:P}),I;function me(){clearTimeout(I),I=setTimeout(()=>{z.forEach((h,H)=>{O[H]=Be(h),h.style.strokeDasharray=`${O[H]}`;});},150);}return window.addEventListener("resize",me),window.addEventListener("orientationchange",me),G>0?setTimeout(()=>v.observe(e),G):v.observe(e),{destroy(){cancelAnimationFrame(q),clearTimeout(He),v.disconnect(),window.removeEventListener("resize",me),window.removeEventListener("orientationchange",me),clearTimeout(I);},replay(){De=0,Me();},pause(){U||!ue||(U=true,b=performance.now()-a,cancelAnimationFrame(q));},resume(){U&&(U=false,ue=true,a=performance.now()-b,q=requestAnimationFrame(ke));},seek(h){let H=Math.min(1,Math.max(0,h));he=H,U=true,b=H*o,a=performance.now()-b,cancelAnimationFrame(q),Ne(b);},getProgress(){return he},refresh(){clearTimeout(I),z.forEach((h,H)=>{O[H]=Be(h),h.style.strokeDasharray=`${O[H]}`;});}}}if(ie)return it(Bt());St();function Ze(){if(!Ae||U)return;let o=performance.now(),a=st();if(!ze&&k===false&&a===ht){q=requestAnimationFrame(Ze);return}ze=false,ht=a;let b=u;if(k!==false){let v=o-bt,I=v>0?Math.abs(a-(Xe<0?a:Xe))/v:0;b=u*Math.max(.2,1+I*(typeof k=="number"?k:1)*.04);}Xe=a,bt=o;let ue=X?te===-1||a>=te?"forward":"reverse":C;te=a;let Ne=ge-f,ke=true,Me=Ne===0?0:(a-f)/Ne;if(isNaN(qe)||(qe<=0&&Me>0?L?.():qe>0&&Me<=0&&fe?.(),qe<1&&Me>=1?E?.():qe>=1&&Me<1&&D?.()),qe=Me,Q){let v=Ee(K(a,f,ge,b));re&&!X&&(ye=Math.max(ye,v),v=ye),he=v,e.style.setProperty("--scroll-draw-progress",String(v));let I=ue==="reverse"?1-v:v;e.style.clipPath=Oe(I),d?.(v),!_&&K(a,f,ge,b)>0&&(_=true,x?.()),v>=1&&!N?(N=true,g?.(),De<(S==="infinite"?1/0:S??0)&&(De++,He=setTimeout(()=>{ye=-1,_=false,N=false,e.style.clipPath=Oe(0);},oe))):v<1&&!re&&(N=false),q=requestAnimationFrame(Ze);return}if(z.forEach((v,I)=>{let me=I*V*Ne,h=Ee(K(a,f+me,ge+me,b));re&&!X&&(ye=Math.max(ye,h),h=ye),he=h,v.style.strokeDashoffset=ue==="reverse"?`${O[I]*h}`:`${O[I]*(1-h)}`,m&&(v.style.opacity=ue==="reverse"?`${1-h}`:`${h}`),Se&&le?v.style.stroke=We(Se,le,h):le&&(v.style.stroke=le),ce!==null&&j!==null?v.style.strokeWidth=`${ce+(j-ce)*h}`:j!==null&&(v.style.strokeWidth=`${j}`),pe!==null&&Z!==null?v.style.fillOpacity=`${pe+(Z-pe)*h}`:Z!==null&&(v.style.fillOpacity=`${Z}`),F&&v.tagName.toLowerCase()==="path"&&i[I]&&v.setAttribute("d",ct(i[I],F,h)),I===0&&(d?.(h),e.style.setProperty("--scroll-draw-progress",String(h))),h<1&&(ke=false);}),w){let v=Ee(K(a,f,ge,b));for(let I in w){let me=parseFloat(I);v>=me&&!Ve.has(me)&&(Ve.add(me),w[I]?.());}}!_&&K(a,f,ge,b)>0&&(_=true,x?.()),ke&&!N?(N=true,g?.(),De<(S==="infinite"?1/0:S??0)&&(De++,He=setTimeout(()=>{ye=-1,_=false,N=false,Ve.clear(),Qe(),ze=true;},oe))):!ke&&!re&&(N=false),q=requestAnimationFrame(Ze);}let at=false;function Ke(){at||(at=true,q=requestAnimationFrame(function(){Ze();}));}function Je(){at=false,cancelAnimationFrame(q);}let lt=new IntersectionObserver(o=>{o.forEach(a=>{Ae=a.isIntersecting,Ae&&!U?(ze=true,Ke()):Je();});},{root:ve??null,threshold:R,rootMargin:P});function Tt(){z.forEach((o,a)=>{O[a]=Be(o),o.style.strokeDasharray=`${O[a]}`;}),St(),ze=true;}let et;function Ge(){clearTimeout(et),et=setTimeout(Tt,150);}window.addEventListener("resize",Ge),window.addEventListener("orientationchange",Ge);let je;return typeof ResizeObserver<"u"&&(je=new ResizeObserver(()=>Ge()),je.observe(document.body),je.observe(document.documentElement),je.observe(e)),G>0?setTimeout(()=>lt.observe(e),G):lt.observe(e),it({destroy(){cancelAnimationFrame(q),clearTimeout(He),Je(),lt.disconnect(),je?.disconnect(),window.removeEventListener("resize",Ge),window.removeEventListener("orientationchange",Ge),clearTimeout(et),yt();},replay(){ye=-1,te=-1,Xe=-1,_=false,N=false,De=0,U=false,he=0,Ve.clear(),clearTimeout(He),Qe(),ze=true,Ae&&Ke();},pause(){U=true,Je();},resume(){U&&(U=false,ze=true,Ae&&Ke());},seek(o){let a=Math.min(1,Math.max(0,o));he=a,ye=a,U=true,Je(),zt(a,C),ze=true;},getProgress(){return he},refresh(){clearTimeout(et),Tt(),Ae&&!U&&Ke();}},()=>({tStart:f,tEnd:ge}))}function nn(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Rt(e){let r=[],n=/([\w]+)\(([^)]*)\)/g,t;for(;(t=n.exec(e))!==null;){let l=[],s=[],c=t[2].trim();if(c)for(let u of c.split(/[\s,]+/)){let m=u.match(/^([-+]?[\d.eE]+)(.*)$/);l.push(m?parseFloat(m[1]):0),s.push(m?m[2]:"");}r.push({fn:t[1],nums:l,units:s});}return r}function rn(e,r,n){let t=Rt(e),l=Rt(r);return t.length===0||t.length!==l.length?n<1?e:r:t.map((s,c)=>{let u=l[c];return s.fn!==u.fn||s.nums.length!==u.nums.length?n<1?`${s.fn}(${s.nums.map((m,p)=>`${m}${s.units[p]}`).join(", ")})`:`${u.fn}(${u.nums.map((m,p)=>`${m}${u.units[p]}`).join(", ")})`:`${s.fn}(${s.nums.map((m,p)=>`${m+(u.nums[p]-m)*n}${s.units[p]}`).join(", ")})`}).join(" ")}function Ft(e,r,n){if(typeof e=="number"&&typeof r=="number")return String(e+(r-e)*n);let t=String(e),l=String(r);if(nn(t))return We(t,l,n);if(t.includes("("))return rn(t,l,n);let s=t.match(/^([-+]?[\d.]+)(.*)$/),c=l.match(/^([-+]?[\d.]+)(.*)$/);if(s&&c){let u=parseFloat(s[1]),m=parseFloat(c[1]);return `${u+(m-u)*n}${s[2]||c[2]}`}return n<1?t:l}function on(e){return e.replace(/([A-Z])/g,r=>`-${r.toLowerCase()}`)}var sn=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),an=0,It="--scroll-draw-progress";function ln(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function mt(e,r){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let{props:t,trigger:l={},easing:s="ease-out",speed:c=1,once:u=false,axis:m="y",scrollContainer:p,native:T=true,velocityScale:V=false,respectReducedMotion:C=true,triggerElement:re,onProgress:$e,onComplete:W,onEnter:J,onLeave:X,onEnterBack:G,onLeaveBack:A}=r,$=C&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,M=typeof s=="function"?s:ne[s]??ne["ease-out"],w=de(l.start??"top bottom"),k=de(l.end??"bottom top"),R=re??e,P=typeof p=="string"?document.querySelector(p):p??null,S=Object.entries(t).map(([i,f])=>({prop:on(i),from:Array.isArray(f)?f[0]:"",to:Array.isArray(f)?f[1]:f}));function oe(){let i=window.getComputedStyle(e);for(let f of S)f.from===""&&(f.from=i.getPropertyValue(f.prop).trim()||"0");}function F(){for(let i of S)e.style.setProperty(i.prop,String(i.to));}let se=new Map;for(let i of [...S.map(f=>f.prop),It])se.set(i,e.style.getPropertyValue(i));function ie(){for(let[i,f]of se)f?e.style.setProperty(i,f):e.style.removeProperty(i);}if($)return F(),W?.(),{...n,destroy:ie,getProgress:()=>1};oe();let ee=typeof s=="string"?rt(s):null;function ae(){if(!T||!ln()||!ee||m!=="y"||P||R!==e||u||c!==1||$e||W||J||X||G||A||V!==false||(l.start??"top bottom").trim()!=="top bottom"||(l.end??"bottom top").trim()!=="bottom top")return false;for(let i of S)if(!sn.has(i.prop))return false;return true}function d(){let i=`ssd-a-${++an}`,f=S.map(te=>`${te.prop}:${te.from}`).join(";"),ge=S.map(te=>`${te.prop}:${te.to}`).join(";"),N=document.createElement("style");N.setAttribute("data-ssd-animate",""),N.textContent=`@keyframes ${i}{from{${f}}to{${ge}}}.${i}{animation-name:${i};animation-duration:auto;animation-timing-function:${ee};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(N),e.classList.add(i);let _=()=>m==="x"?window.scrollX:window.scrollY,q=()=>m==="x"?window.innerWidth:window.innerHeight,Ae=()=>{let te=e.getBoundingClientRect();return xe({top:te.top,height:te.height},_(),q(),w,k)};Le(e,{type:"animate",getProgress:()=>ye.getProgress(),getTrigger:Ae});let ye={destroy(){e.classList.remove(i),N.remove(),e.style.animationPlayState="",ie(),Ce(e);},replay(){e.classList.remove(i),e.offsetWidth,e.classList.add(i);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(te){let U=Math.min(1,Math.max(0,te));e.classList.remove(i);for(let he of S)e.style.setProperty(he.prop,Ft(he.from,he.to,U));},getProgress(){let{tStart:te,tEnd:U}=Ae();return M(K(_(),te,U,c))}};return ye}if(ae())return d();let x=0,g=0,L=0,E=false,D=false,fe=-1,Q=0,Ee=false,Pe=NaN,_e=-1,ve=0,Se=()=>P?m==="x"?P.scrollLeft:P.scrollTop:m==="x"?window.scrollX:window.scrollY,le=()=>P?m==="x"?P.clientWidth:P.clientHeight:m==="x"?window.innerWidth:window.innerHeight;function ce(){let i=tt(R,P,m),f=xe(i,i.scroll,le(),w,k);x=f.tStart,g=f.tEnd;}function j(i){e.style.setProperty(It,String(i));for(let f of S)e.style.setProperty(f.prop,Ft(f.from,f.to,i));$e?.(i);}function pe(i){if(isNaN(Pe)){Pe=i;return}Pe<=0&&i>0?J?.():Pe>0&&i<=0&&A?.(),Pe<1&&i>=1?X?.():Pe>=1&&i<1&&G?.(),Pe=i;}function Z(){if(!E||D)return;let i=performance.now(),f=Se(),ge=c;if(V!==false){let q=i-ve,Ae=q>0?Math.abs(f-(_e<0?f:_e))/q:0;ge=c*Math.max(.2,1+Ae*(typeof V=="number"?V:1)*.04);}_e=f,ve=i;let N=g===x?0:(f-x)/(g-x);pe(N);let _=M(K(f,x,g,ge));u&&(fe=Math.max(fe,_),_=fe),Q=_,j(_),_>=1&&!Ee?(Ee=true,W?.()):_<1&&!u&&(Ee=false),L=requestAnimationFrame(Z);}ce(),g===x&&we("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let i=M(K(Se(),x,g,c));u&&i>0&&(fe=i),Q=i,j(i);}let Oe=new IntersectionObserver(i=>{i.forEach(f=>{E=f.isIntersecting,E&&!D?L=requestAnimationFrame(Z):cancelAnimationFrame(L);});},{root:P??null}),z;function O(){clearTimeout(z),z=setTimeout(ce,150);}return window.addEventListener("resize",O),window.addEventListener("orientationchange",O),Oe.observe(e),Le(e,{type:"animate",getProgress:()=>Q,getTrigger:()=>({tStart:x,tEnd:g})}),{destroy(){cancelAnimationFrame(L),Oe.disconnect(),window.removeEventListener("resize",O),window.removeEventListener("orientationchange",O),clearTimeout(z),ie(),Ce(e);},replay(){fe=-1,Ee=false,Q=0,D=false,j(0);},pause(){D=true,cancelAnimationFrame(L);},resume(){D&&(D=false,E&&(L=requestAnimationFrame(Z)));},seek(i){let f=Math.min(1,Math.max(0,i));Q=f,fe=f,D=true,cancelAnimationFrame(L),j(f);},getProgress(){return Q}}}var ft={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function pt(e,r){if(typeof window>"u")return ft;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return we("scrollCounter: element not found:",e),ft;let t=n,{from:l=0,to:s,format:c,easing:u="ease-out",trigger:m={},once:p=true,decimals:T,onComplete:V}=r,C=T!==void 0?d=>d.toFixed(T):c??(d=>String(Math.round(d))),re=typeof u=="function"?u:ne[u]??ne["ease-out"],$e=de(m.start??"top 80%"),W=de(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=C(s),V?.(),ft;let X=0,G=0,A=0,$=false,M=false,w=-1,k=0,R=false,P=()=>window.scrollY,S=()=>window.innerHeight;function oe(){let d=t.getBoundingClientRect(),x=xe({top:d.top,height:d.height},P(),S(),$e,W);X=x.tStart,G=x.tEnd;}function F(d){t.textContent=C(l+(s-l)*d),t.style.setProperty("--scroll-draw-progress",String(d));}function se(){if(!$||M)return;let d=re(K(P(),X,G,1));p&&(w=Math.max(w,d),d=w),k=d,F(d),d>=1&&!R?(R=true,V?.()):d<1&&!p&&(R=false),A=requestAnimationFrame(se);}oe();{let d=re(K(P(),X,G,1));p&&d>0&&(w=d),k=d,F(d);}let ie=new IntersectionObserver(d=>{d.forEach(x=>{$=x.isIntersecting,$&&!M?A=requestAnimationFrame(se):cancelAnimationFrame(A);});}),ee;function ae(){clearTimeout(ee),ee=setTimeout(oe,150);}return window.addEventListener("resize",ae),window.addEventListener("orientationchange",ae),ie.observe(t),Le(t,{type:"counter",getProgress:()=>k,getTrigger:()=>({tStart:X,tEnd:G})}),{destroy(){cancelAnimationFrame(A),ie.disconnect(),window.removeEventListener("resize",ae),window.removeEventListener("orientationchange",ae),clearTimeout(ee),Ce(t);},replay(){w=-1,R=false,k=0,M=false,F(0);},pause(){M=true,cancelAnimationFrame(A);},resume(){M&&(M=false,$&&(A=requestAnimationFrame(se)));},seek(d){let x=Math.min(1,Math.max(0,d));k=x,w=x,M=true,cancelAnimationFrame(A),F(x);},getProgress(){return k}}}var Dt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function dt(e,r={}){if(typeof window>"u")return Dt;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return we("scrollVideo: <video> element not found:",e),Dt;let t=n,{trigger:l={},easing:s="linear",once:c=false,axis:u="y",preload:m="auto",onReady:p,onComplete:T,onProgress:V}=r,C=window.matchMedia("(prefers-reduced-motion: reduce)").matches,re=typeof s=="function"?s:ne[s]??ne.linear,$e=de(l.start??"top top"),W=de(l.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let J=r.from??0,X=r.to,G=0,A=0,$=0,M=false,w=false,k=-1,R=0,P=false,S=false,oe=()=>u==="x"?window.scrollX:window.scrollY,F=()=>u==="x"?window.innerWidth:window.innerHeight;function se(){let E=t.getBoundingClientRect(),D=u==="x"?E.left:E.top,fe=u==="x"?E.width:E.height,Q=xe({top:D,height:fe},oe(),F(),$e,W);G=Q.tStart,A=Q.tEnd;}let ie=NaN;function ee(E){if(!S)return;let D=X??t.duration??0,fe=J+(D-J)*E;fe!==ie&&(ie=fe,t.currentTime=fe),t.style.setProperty("--scroll-draw-progress",String(E)),V?.(E);}function ae(){if(!M||w||!S)return;let E=re(K(oe(),G,A,1));c&&(k=Math.max(k,E),E=k),R=E,ee(E),E>=1&&!P?(P=true,T?.()):E<1&&!c&&(P=false),$=requestAnimationFrame(ae);}function d(){if(S=true,X===void 0&&(X=t.duration),C){ee(1),p?.();return}se(),p?.(),M&&!w&&($=requestAnimationFrame(ae));}t.readyState>=1?d():t.addEventListener("loadedmetadata",d,{once:true}),S||se();let x=new IntersectionObserver(E=>{E.forEach(D=>{M=D.isIntersecting,M&&!w&&S?$=requestAnimationFrame(ae):cancelAnimationFrame($);});}),g;function L(){clearTimeout(g),g=setTimeout(se,150);}return window.addEventListener("resize",L),window.addEventListener("orientationchange",L),x.observe(t),Le(t,{type:"video",getProgress:()=>R,getTrigger:()=>({tStart:G,tEnd:A})}),{destroy(){cancelAnimationFrame($),x.disconnect(),t.removeEventListener("loadedmetadata",d),window.removeEventListener("resize",L),window.removeEventListener("orientationchange",L),clearTimeout(g),Ce(t);},replay(){k=-1,P=false,R=0,w=false,ie=NaN,ee(0);},pause(){w=true,cancelAnimationFrame($);},resume(){w&&(w=false,M&&S&&($=requestAnimationFrame(ae)));},seek(E){let D=Math.min(1,Math.max(0,E));R=D,k=D,w=true,cancelAnimationFrame($),ie=NaN,ee(D);},getProgress(){return R}}}function Vt(e){let r=e.textContent??"";return e.textContent="",r.split(/(\s+)/).filter(Boolean).map(n=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(n)?(t.textContent=n,t.style.whiteSpace="pre"):(t.textContent=n,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(n)?null:t}).filter(n=>n!==null)}function cn(e){let r=e.textContent??"";return e.textContent="",r.split("").map(n=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=n,n===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),n===" "?null:t}).filter(n=>n!==null)}function Nt(e){let r=Vt(e),n=new Map;for(let s of r){let c=s.offsetTop;n.has(c)||n.set(c,[]),n.get(c).push(s);}let t=[],l=Array.from(n.keys()).sort((s,c)=>s-c);for(let s of l){let c=n.get(s),u=document.createElement("span");u.setAttribute("aria-hidden","true"),u.style.display="inline-block",c.forEach((m,p)=>{let T=m.nextElementSibling;u.appendChild(m),p<c.length-1&&T&&T.style.whiteSpace==="pre"&&u.appendChild(T);}),t.push(u);}return e.textContent="",t.forEach((s,c)=>{e.appendChild(s),c<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function un(e,r,n,t){if(n<=1||t===0)return e;let l=(n-1)*t,s=r*t,c=s+(1-l);return c<=s?e>=s?1:0:Math.min(1,Math.max(0,(e-s)/(c-s)))}function mn(e,r){let n=[];if(r?.y!==void 0&&n.push(`translateY(${r.y*(1-e)}px)`),r?.x!==void 0&&n.push(`translateX(${r.x*(1-e)}px)`),r?.rotate!==void 0&&n.push(`rotate(${r.rotate*(1-e)}deg)`),r?.scale!==void 0){let t=r.scale+(1-r.scale)*e;n.push(`scale(${t})`);}return n.join(" ")||""}var Ht={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function gt(e,r={}){if(typeof window>"u")return Ht;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return we("scrollText: element not found:",e),Ht;let t=n,{split:l="words",stagger:s=.04,easing:c="ease-out",from:u={opacity:0,y:24},trigger:m={},once:p=true,onComplete:T}=r,V=window.matchMedia("(prefers-reduced-motion: reduce)").matches,C=typeof c=="function"?c:ne[c]??ne["ease-out"],re=de(m.start??"top 85%"),$e=de(m.end??"top 40%"),W=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let J;l==="chars"?J=cn(t):l==="lines"?J=Nt(t):J=Vt(t);let X=J.length;function G(g,L){u?.opacity!==void 0&&(g.style.opacity=String(u.opacity+(1-u.opacity)*L));let E=mn(L,u);E&&(g.style.transform=E);}function A(g){t.style.setProperty("--scroll-draw-progress",String(g)),J.forEach((L,E)=>{let D=C(un(g,E,X,s));G(L,D);});}if(V)return A(1),T?.(),{destroy(){t.innerHTML=W,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};A(0);let $=0,M=0,w=0,k=false,R=false,P=-1,S=0,oe=false,F=()=>window.scrollY,se=()=>window.innerHeight;function ie(){let g=t.getBoundingClientRect(),L=xe({top:g.top,height:g.height},F(),se(),re,$e);$=L.tStart,M=L.tEnd;}function ee(){if(!k||R)return;let g=K(F(),$,M,1);p&&(P=Math.max(P,g),g=P),S=g,A(g),g>=1&&!oe?(oe=true,T?.()):g<1&&!p&&(oe=false),w=requestAnimationFrame(ee);}ie();let ae=new IntersectionObserver(g=>{g.forEach(L=>{k=L.isIntersecting,k&&!R?w=requestAnimationFrame(ee):cancelAnimationFrame(w);});}),d;function x(){clearTimeout(d),d=setTimeout(()=>{if(l==="lines"){let g=S;t.innerHTML=W,t.setAttribute("aria-label",t.textContent??""),J=Nt(t),A(g);}ie();},150);}return window.addEventListener("resize",x),window.addEventListener("orientationchange",x),ae.observe(t),Le(t,{type:"text",getProgress:()=>S,getTrigger:()=>({tStart:$,tEnd:M})}),{destroy(){cancelAnimationFrame(w),ae.disconnect(),window.removeEventListener("resize",x),window.removeEventListener("orientationchange",x),clearTimeout(d),t.innerHTML=W,t.removeAttribute("aria-label"),Ce(t);},replay(){P=-1,oe=false,S=0,R=false,A(0);},pause(){R=true,cancelAnimationFrame(w);},resume(){R&&(R=false,k&&(w=requestAnimationFrame(ee)));},seek(g){let L=Math.min(1,Math.max(0,g));S=L,P=L,R=true,cancelAnimationFrame(w),A(L);},getProgress(){return S}}}function Un(e={}){let r=vue.ref(null);return vue.onMounted(()=>{if(!r.value)return;let n=ut(r.value,e);vue.onUnmounted(()=>n.destroy());}),r}var Yn=vue.defineComponent({name:"ScrollDraw",props:{selector:{type:String},speed:{type:Number},fade:{type:Boolean},stagger:{type:Number},easing:{type:[String,Function]},direction:{type:String},trigger:{type:Object},onProgress:{type:Function},onStart:{type:Function},onComplete:{type:Function},once:{type:Boolean},debug:{type:Boolean}},setup(e,{slots:r}){let n=vue.ref(null);return vue.onMounted(()=>{if(!n.value)return;let t={};e.selector!=null&&(t.selector=e.selector),e.speed!=null&&(t.speed=e.speed),e.fade!=null&&(t.fade=e.fade),e.stagger!=null&&(t.stagger=e.stagger),e.easing!=null&&(t.easing=e.easing),e.direction!=null&&(t.direction=e.direction),e.trigger!=null&&(t.trigger=e.trigger),e.once!=null&&(t.once=e.once),e.debug!=null&&(t.debug=e.debug),e.onProgress!=null&&(t.onProgress=e.onProgress),e.onStart!=null&&(t.onStart=e.onStart),e.onComplete!=null&&(t.onComplete=e.onComplete);let l=ut(n.value,t);vue.onUnmounted(()=>l.destroy());}),()=>vue.h("div",{ref:n},r.default?.())}});function Xn(e){let r=vue.ref(null);return vue.onMounted(()=>{if(!r.value)return;let n=mt(r.value,e);vue.onUnmounted(()=>n.destroy());}),r}var Qn=vue.defineComponent({name:"ScrollAnimate",props:{options:{type:Object,required:true}},setup(e,{slots:r}){let n=vue.ref(null);return vue.onMounted(()=>{if(!n.value)return;let t=mt(n.value,e.options);vue.onUnmounted(()=>t.destroy());}),()=>vue.h("div",{ref:n},r.default?.())}});function Zn(e){let r=vue.ref(null);return vue.onMounted(()=>{if(!r.value)return;let n=pt(r.value,e);vue.onUnmounted(()=>n.destroy());}),r}var Kn=vue.defineComponent({name:"ScrollCounter",props:{to:{type:Number,required:true},from:{type:Number},format:{type:Function},easing:{type:[String,Function]},trigger:{type:Object},once:{type:Boolean},decimals:{type:Number},onComplete:{type:Function}},setup(e){let r=vue.ref(null);return vue.onMounted(()=>{if(!r.value)return;let n={to:e.to};e.from!=null&&(n.from=e.from),e.format!=null&&(n.format=e.format),e.easing!=null&&(n.easing=e.easing),e.trigger!=null&&(n.trigger=e.trigger),e.once!=null&&(n.once=e.once),e.decimals!=null&&(n.decimals=e.decimals),e.onComplete!=null&&(n.onComplete=e.onComplete);let t=pt(r.value,n);vue.onUnmounted(()=>t.destroy());}),()=>vue.h("span",{ref:r})}});function Jn(e={}){let r=vue.ref(null);return vue.onMounted(()=>{if(!r.value)return;let n=dt(r.value,e);vue.onUnmounted(()=>n.destroy());}),r}var er=vue.defineComponent({name:"ScrollVideo",props:{src:{type:String,required:true},options:{type:Object},muted:{type:Boolean,default:true},playsInline:{type:Boolean,default:true},class:{type:String}},setup(e){let r=vue.ref(null);return vue.onMounted(()=>{if(!r.value)return;let n=dt(r.value,e.options??{});vue.onUnmounted(()=>n.destroy());}),()=>vue.h("video",{ref:r,src:e.src,muted:e.muted,playsinline:e.playsInline,preload:"auto",class:e.class})}});function tr(e={}){let r=vue.ref(null);return vue.onMounted(()=>{if(!r.value)return;let n=gt(r.value,e);vue.onUnmounted(()=>n.destroy());}),r}var nr=vue.defineComponent({name:"ScrollText",props:{options:{type:Object},tag:{type:String,default:"p"}},setup(e,{slots:r}){let n=vue.ref(null);return vue.onMounted(()=>{if(!n.value)return;let t=gt(n.value,e.options??{});vue.onUnmounted(()=>t.destroy());}),()=>vue.h(e.tag,{ref:n},r.default?.())}});exports.ScrollAnimate=Qn;exports.ScrollCounter=Kn;exports.ScrollDraw=Yn;exports.ScrollText=nr;exports.ScrollVideo=er;exports.useScrollAnimate=Xn;exports.useScrollCounter=Zn;exports.useScrollDraw=Un;exports.useScrollText=tr;exports.useScrollVideo=Jn;
@@ -1,3 +1,3 @@
1
- import {defineComponent,ref,onMounted,onUnmounted,h}from'vue';function _t({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,r)),l=Math.sqrt(t),s=0,c=[];for(let d=0;d<n;d++){let x=Math.pow(l,d);c.push(x),s+=x;}let u=[0],m=0;for(let d=0;d<n;d++)m+=c[d]/s,u.push(m);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let x=0;x<n;x++)if(d<=u[x+1]){let N=(d-u[x])/(u[x+1]-u[x]);if(x===0)return N*(2-N);let L=1-Math.pow(t,x);return L+(1-L)*(2*N-1)*(2*N-1)}return 1}}function qt({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),t=Math.max(.1,r),l=n<=1?t/4:t/(2*Math.PI)*Math.asin(1/n);return s=>s<=0?0:s>=1?1:n*Math.pow(2,-10*s)*Math.sin((s-l)*(2*Math.PI)/t)+1}var ee={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:_t(),elastic:qt()};function pe(e="top bottom"){let r=e.trim();if(/^\d+(\.\d+)?%$/.test(r))return {element:"top",viewport:r};let[n="top",t="bottom"]=r.split(/\s+/).filter(Boolean);return {element:n,viewport:t}}function Et(e,r,n,t){switch(t){case "top":return e+n;case "center":return e+n+r/2;case "bottom":return e+n+r;default:return e+n}}function Tt(e,r){if(/^\d+(\.\d+)?%$/.test(e))return r*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return r/2;case "bottom":return r;default:return r}}function Be(e){let r=e.tagName.toLowerCase();if(r==="rect"){let n=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(n+t)}if(r==="circle"){let n=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*n}return e.getTotalLength()}function Bt(e,r,n){return Math.min(n,Math.max(r,e))}function Q(e,r,n,t){return n===r?0:Bt((e-r)/(n-r)*t,0,1)}function tt(e,r,n){let t=e.getBoundingClientRect(),l=n==="x"?t.width:t.height;return r?{top:n==="x"?t.left-r.getBoundingClientRect().left+r.scrollLeft:t.top-r.getBoundingClientRect().top+r.scrollTop,height:l,scroll:0}:{top:n==="x"?t.left:t.top,height:l,scroll:n==="x"?window.scrollX:window.scrollY}}function xe(e,r,n,t,l){let s=Et(e.top,e.height,r,t.element)-Tt(t.viewport,n),c=Et(e.top,e.height,r,l.element)-Tt(l.viewport,n);return {tStart:s,tEnd:c}}function xt(e){let r=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(r)return [parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)];let n=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n)return [parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function We(e,r,n){let t=xt(e),l=xt(r);return !t||!l?e:`rgb(${Math.round(t[0]+(l[0]-t[0])*n)},${Math.round(t[1]+(l[1]-t[1])*n)},${Math.round(t[2]+(l[2]-t[2])*n)})`}var At={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 nt=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,...r){nt&&console.warn(`[svg-scroll-draw] ${e}`,...r);}var Wt="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Gt="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Mt=33;function jt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Ut(e){let r=[];for(let n=0;n<Mt;n++){let t=n/(Mt-1);r.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${r.join(",")})`}function rt(e){switch(e){case "linear":return "linear";case "ease-in":return Wt;case "ease-out":return Gt;case "ease-in-out":return jt()?Ut(ee["ease-in-out"]):null;default:return null}}var Xt=0;function Yt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Qt(e){let r=e.getAttribute("stroke"),n=e.getAttribute("fill");!r||r==="none"?ye("Element has no stroke \u2014 path will not be visible.",e):n&&n!=="none"&&n!=="transparent"&&ye("Element has a fill \u2014 it may obscure the stroke animation.",e);}function Zt(e,r,n){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function l(){let s=n==="x"?window.scrollX:window.scrollY,c=e-s,u=r-s,m=n==="x";t.innerHTML=`
1
+ import {defineComponent,ref,onMounted,onUnmounted,h}from'vue';function Wt({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,r)),l=Math.sqrt(t),s=0,c=[];for(let p=0;p<n;p++){let T=Math.pow(l,p);c.push(T),s+=T;}let u=[0],m=0;for(let p=0;p<n;p++)m+=c[p]/s,u.push(m);return p=>{if(p<=0)return 0;if(p>=1)return 1;for(let T=0;T<n;T++)if(p<=u[T+1]){let V=(p-u[T])/(u[T+1]-u[T]);if(T===0)return V*(2-V);let C=1-Math.pow(t,T);return C+(1-C)*(2*V-1)*(2*V-1)}return 1}}function Gt({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),t=Math.max(.1,r),l=n<=1?t/4:t/(2*Math.PI)*Math.asin(1/n);return s=>s<=0?0:s>=1?1:n*Math.pow(2,-10*s)*Math.sin((s-l)*(2*Math.PI)/t)+1}var ne={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:Wt(),elastic:Gt()};function de(e="top bottom"){let r=e.trim();if(/^\d+(\.\d+)?%$/.test(r))return {element:"top",viewport:r};let[n="top",t="bottom"]=r.split(/\s+/).filter(Boolean);return {element:n,viewport:t}}function xt(e,r,n,t){switch(t){case "top":return e+n;case "center":return e+n+r/2;case "bottom":return e+n+r;default:return e+n}}function At(e,r){if(/^\d+(\.\d+)?%$/.test(e))return r*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return r/2;case "bottom":return r;default:return r}}function Be(e){let r=e.tagName.toLowerCase();if(r==="rect"){let n=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(n+t)}if(r==="circle"){let n=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*n}return e.getTotalLength()}function jt(e,r,n){return Math.min(n,Math.max(r,e))}function K(e,r,n,t){return n===r?0:jt((e-r)/(n-r)*t,0,1)}function tt(e,r,n){let t=e.getBoundingClientRect(),l=n==="x"?t.width:t.height;return r?{top:n==="x"?t.left-r.getBoundingClientRect().left+r.scrollLeft:t.top-r.getBoundingClientRect().top+r.scrollTop,height:l,scroll:0}:{top:n==="x"?t.left:t.top,height:l,scroll:n==="x"?window.scrollX:window.scrollY}}function xe(e,r,n,t,l){let s=xt(e.top,e.height,r,t.element)-At(t.viewport,n),c=xt(e.top,e.height,r,l.element)-At(l.viewport,n);return {tStart:s,tEnd:c}}function Mt(e){let r=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(r)return [parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)];let n=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n)return [parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function We(e,r,n){let t=Mt(e),l=Mt(r);return !t||!l?e:`rgb(${Math.round(t[0]+(l[0]-t[0])*n)},${Math.round(t[1]+(l[1]-t[1])*n)},${Math.round(t[2]+(l[2]-t[2])*n)})`}var Lt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var nt=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function we(e,...r){nt&&console.warn(`[svg-scroll-draw] ${e}`,...r);}var Ut="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Yt="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Ct=33;function Xt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Qt(e){let r=[];for(let n=0;n<Ct;n++){let t=n/(Ct-1);r.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${r.join(",")})`}function rt(e){switch(e){case "linear":return "linear";case "ease-in":return Ut;case "ease-out":return Yt;case "ease-in-out":return Xt()?Qt(ne["ease-in-out"]):null;default:return null}}var $t=Symbol.for("svg-scroll-draw.registry");function Pt(){let e=globalThis;return e[$t]||(e[$t]=new Map)}function Le(e,r){Pt().set(e,r);}function Ce(e){Pt().delete(e);}var Zt=0;function Kt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Jt(e){let r=e.getAttribute("stroke"),n=e.getAttribute("fill");!r||r==="none"?we("Element has no stroke \u2014 path will not be visible.",e):n&&n!=="none"&&n!=="transparent"&&we("Element has a fill \u2014 it may obscure the stroke animation.",e);}function en(e,r,n){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function l(){let s=n==="x"?window.scrollX:window.scrollY,c=e-s,u=r-s,m=n==="x";t.innerHTML=`
2
2
  <div style="position:absolute;${m?`left:${c}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${c}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
- <div style="position:absolute;${m?`left:${u}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${u}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",l,{passive:true}),l(),{el:t,destroy(){window.removeEventListener("scroll",l),t.remove();}}}var Lt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Ct=/[MmLlHhVvCcSsQqTtAaZz]/g;function Jt(e,r,n){if(!nt)return;let t=(e.match(Ct)??[]).join("").toUpperCase(),l=(r.match(Ct)??[]).join("").toUpperCase(),s=(e.match(Lt)??[]).length,c=(r.match(Lt)??[]).length;if(t!==l){ye(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${l||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,n);return}s!==c&&ye(`morphTo: coordinate count differs (${s} \u2192 ${c}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,n);}function lt(e,r,n){let t=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),l=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let c=parseFloat(s),u=t[l++]??c;return String(+(c+(u-c)*n).toFixed(4))})}function ct(e,r={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:n,...t}=r,l=n?{...At[n],...t}:t,s=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:c="path, polyline, line, polygon, rect, circle",speed:u=1,fade:m=false,easing:d="linear",trigger:x={},stagger:N=0,direction:L="forward",once:te=false,debug:Me=false,axis:B="y",scrollContainer:Z,autoReverse:X=false,delay:W=0,strokeColor:A,strokeWidth:C,fillOpacity:M,waypoints:w,velocityScale:O=false,threshold:k=0,rootMargin:$="0px",repeat:E=0,repeatDelay:ne=0,morphTo:F,clip:re,autoplay:oe=false,duration:J=1e3,native:ue=true,onProgress:y,onStart:T,onComplete:g,onEnter:p,onLeave:I,onEnterBack:de,onLeaveBack:ve}=l,me=re===true?"left":typeof re=="string"?re:false,Se=typeof d=="function"?d:ee[d]??ee.linear,Le=pe(x.start??"top bottom"),_e=pe(x.end??"bottom top"),he=typeof Z=="string"?document.querySelector(Z):Z??null,be=Array.isArray(A)?A[0]:null,se=Array.isArray(A)?A[1]:typeof A=="string"?A:null,ie=Array.isArray(C)?C[0]:null,G=Array.isArray(C)?C[1]:typeof C=="number"?C:null,fe=Array.isArray(M)?M[0]:null,Y=Array.isArray(M)?M[1]:typeof M=="number"?M:null;function Ce(o){let a=o*100;switch(me){case "right":return `inset(0 0 0 ${100-a}%)`;case "top":return `inset(0 0 ${100-a}% 0)`;case "bottom":return `inset(${100-a}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-a}% 0 0)`}}let V=me?[]:Array.from(e.querySelectorAll(c)),P=[],i=[],f=0,we=0,D=false,z=false,_=0,j=false,ae=-1,$e=-1,K=false,Ee=0,Re=0,De,ot=null;function gt(){ot?.destroy(),ot=null;}let He=new Set,yt=NaN,Ne=true,Ye=-1,ht=performance.now(),qe=NaN;function st(){return he?B==="x"?he.scrollLeft:he.scrollTop:B==="x"?window.scrollX:window.scrollY}function bt(){return he?B==="x"?he.clientWidth:he.clientHeight:B==="x"?window.innerWidth:window.innerHeight}function wt(){let o=tt(e,he,B),a=xe(o,o.scroll,bt(),Le,_e);f=a.tStart,we=a.tEnd,Me&&nt&&(gt(),ot=Zt(f,we,B));}function Ht(o,a){if(e.style.setProperty("--scroll-draw-progress",String(o)),me){let v=a==="reverse"?1-o:o;e.style.clipPath=Ce(v);return}V.forEach((v,le)=>{v.style.strokeDashoffset=a==="reverse"?`${P[le]*o}`:`${P[le]*(1-o)}`,m&&(v.style.opacity=a==="reverse"?`${1-o}`:`${o}`),be&&se?v.style.stroke=We(be,se,o):se&&(v.style.stroke=se),ie!==null&&G!==null?v.style.strokeWidth=`${ie+(G-ie)*o}`:G!==null&&(v.style.strokeWidth=`${G}`),fe!==null&&Y!==null?v.style.fillOpacity=`${fe+(Y-fe)*o}`:Y!==null&&(v.style.fillOpacity=`${Y}`),F&&v.tagName.toLowerCase()==="path"&&i[le]&&v.setAttribute("d",lt(i[le],F,o));});}function Qe(){if(e.style.setProperty("--scroll-draw-progress","0"),me){e.style.clipPath=Ce(0);return}V.forEach((o,a)=>{o.style.strokeDasharray=`${P[a]}`,o.style.strokeDashoffset=L==="reverse"?"0":`${P[a]}`,m?o.style.opacity=L==="reverse"?"1":"0":o.style.opacity="",be&&(o.style.stroke=be),ie!==null&&(o.style.strokeWidth=`${ie}`),fe!==null&&(o.style.fillOpacity=`${fe}`),F&&o.tagName.toLowerCase()==="path"&&i[a]&&o.setAttribute("d",i[a]);});}if(V.forEach(o=>{Qt(o);let a=Be(o);P.push(a);let v=o.tagName.toLowerCase()==="path";v?i.push(o.getAttribute("d")??""):i.push(""),F&&(v?Jt(i[i.length-1],F,o):ye(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),s?(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=L==="reverse"?`${a}`:"0",m&&(o.style.opacity="1"),se&&(o.style.stroke=se),G!==null&&(o.style.strokeWidth=`${G}`),Y!==null&&(o.style.fillOpacity=`${Y}`),F&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",F)):(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=L==="reverse"?"0":`${a}`,m?o.style.opacity=L==="reverse"?"1":"0":o.style.opacity="",be&&(o.style.stroke=be),ie!==null&&(o.style.strokeWidth=`${ie}`),fe!==null&&(o.style.fillOpacity=`${fe}`));}),me){if(s)return e.style.clipPath=Ce(1),g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Ce(0);}else if(s)return g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let vt=typeof d=="string"?rt(d):null;function Nt(){return !(ue===false||!Yt()||!V.length||!vt||me||B!=="y"||he||u!==1||N!==0||te||X||O!==false||F||w||E||W>0||y||T||g||p||I||de||ve||A!=null||C!=null||M!=null||(x.start??"top bottom").trim()!=="top bottom"||(x.end??"bottom top").trim()!=="bottom top")}function Vt(){let o=++Xt,a=`svg-scroll-draw-${o}`,v=`svg-scroll-draw-host-${o}`,le=`--svg-scroll-draw-${o}`,Ie=L==="reverse"?"0":"var(--ssd-len)",Pe=L==="reverse"?"var(--ssd-len)":"0",Ae=`stroke-dashoffset:${Ie};`,S=`stroke-dashoffset:${Pe};`;m&&(Ae+=`opacity:${L==="reverse"?1:0};`,S+=`opacity:${L==="reverse"?0:1};`);let R=document.createElement("style");R.setAttribute("data-svg-scroll-draw",""),R.textContent=`@keyframes ${a}{from{${Ae}}to{${S}}}.${v}{view-timeline-name:${le};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${vt};animation-fill-mode:both;animation-timeline:${le};animation-range:cover 0% cover 100%;}`,document.head.appendChild(R),e.classList.add(v);function ce(h,U){h.style.setProperty("--ssd-len",String(P[U])),h.style.strokeDasharray=`${P[U]}`,h.style.strokeDashoffset="",h.style.opacity="",h.style.animationPlayState="",h.classList.add(a);}V.forEach(ce);let b=false,H=-1;function q(){if(H>=0)return H;let h=e.getBoundingClientRect(),{tStart:U,tEnd:Te}=xe({top:h.top,height:h.height},st(),bt(),Le,_e);return Se(Q(st(),U,Te,u))}return {destroy(){e.classList.remove(v),V.forEach(h=>{h.classList.remove(a),h.style.removeProperty("--ssd-len"),h.style.animationPlayState="";}),R.remove();},replay(){b=false,H=-1,V.forEach(ce);},pause(){b=true,V.forEach(h=>{h.style.animationPlayState="paused";});},resume(){b&&(b=false,V.forEach(h=>{h.style.animationPlayState="running";}));},seek(h){let U=Math.min(1,Math.max(0,h));H=U,b=true,V.forEach((Te,ge)=>{Te.classList.remove(a),Te.style.strokeDashoffset=L==="reverse"?`${P[ge]*U}`:`${P[ge]*(1-U)}`,m&&(Te.style.opacity=L==="reverse"?`${1-U}`:`${U}`);});},getProgress(){return q()},refresh(){V.forEach((h,U)=>{P[U]=Be(h),h.style.setProperty("--ssd-len",String(P[U])),h.style.strokeDasharray=`${P[U]}`;});}}}if(Nt())return Vt();function zt(){let o=Math.max(1,J),a=0,v=0,le=false;function Ie(b){let H=true;if(me){let q=Math.min(1,Math.max(0,b/o)),h=Se(q);Ee=h,e.style.setProperty("--scroll-draw-progress",String(h)),e.style.clipPath=Ce(L==="reverse"?1-h:h),y?.(h),q<1&&(H=false);}else V.forEach((q,h)=>{let U=h*N*o,Te=Math.min(1,Math.max(0,(b-U)/o)),ge=Se(Te);q.style.strokeDashoffset=L==="reverse"?`${P[h]*ge}`:`${P[h]*(1-ge)}`,m&&(q.style.opacity=L==="reverse"?`${1-ge}`:`${ge}`),be&&se?q.style.stroke=We(be,se,ge):se&&(q.style.stroke=se),ie!==null&&G!==null?q.style.strokeWidth=`${ie+(G-ie)*ge}`:G!==null&&(q.style.strokeWidth=`${G}`),fe!==null&&Y!==null?q.style.fillOpacity=`${fe+(Y-fe)*ge}`:Y!==null&&(q.style.fillOpacity=`${Y}`),F&&q.tagName.toLowerCase()==="path"&&i[h]&&q.setAttribute("d",lt(i[h],F,ge)),h===0&&(Ee=ge,y?.(ge),e.style.setProperty("--scroll-draw-progress",String(ge))),Te<1&&(H=false);});if(w){let q=Math.min(1,Math.max(0,b/o)),h=Se(q);for(let U in w){let Te=parseFloat(U);h>=Te&&!He.has(Te)&&(He.add(Te),w[U]?.());}}return H}function Pe(b){if(K)return;let H=b-a;z||(z=true,T?.());let q=Ie(H);if(q&&!D){D=true,Ie(o*(1+Math.max(0,V.length-1)*N)),g?.(),Re<(E==="infinite"?1/0:E??0)&&(Re++,De=setTimeout(()=>{a=performance.now(),z=false,D=false,He.clear(),Qe(),_=requestAnimationFrame(Pe);},ne));return}q||(_=requestAnimationFrame(Pe));}function Ae(){cancelAnimationFrame(_),clearTimeout(De),a=performance.now(),v=0,K=false,z=false,D=false,Re=0,le=true,Ee=0,He.clear(),Qe(),_=requestAnimationFrame(Pe);}let S=new IntersectionObserver(b=>{b.forEach(H=>{H.isIntersecting&&!(te&&D)?Ae():!H.isIntersecting&&!te&&!D&&(cancelAnimationFrame(_),clearTimeout(De),le=false);});},{root:he??null,threshold:k,rootMargin:$}),R;function ce(){clearTimeout(R),R=setTimeout(()=>{V.forEach((b,H)=>{P[H]=Be(b),b.style.strokeDasharray=`${P[H]}`;});},150);}return window.addEventListener("resize",ce),window.addEventListener("orientationchange",ce),W>0?setTimeout(()=>S.observe(e),W):S.observe(e),{destroy(){cancelAnimationFrame(_),clearTimeout(De),S.disconnect(),window.removeEventListener("resize",ce),window.removeEventListener("orientationchange",ce),clearTimeout(R);},replay(){Re=0,Ae();},pause(){K||!le||(K=true,v=performance.now()-a,cancelAnimationFrame(_));},resume(){K&&(K=false,le=true,a=performance.now()-v,_=requestAnimationFrame(Pe));},seek(b){let H=Math.min(1,Math.max(0,b));Ee=H,K=true,v=H*o,a=performance.now()-v,cancelAnimationFrame(_),Ie(v);},getProgress(){return Ee},refresh(){clearTimeout(R),V.forEach((b,H)=>{P[H]=Be(b),b.style.strokeDasharray=`${P[H]}`;});}}}if(oe)return zt();wt();function Ze(){if(!j||K)return;let o=performance.now(),a=st();if(!Ne&&O===false&&a===yt){_=requestAnimationFrame(Ze);return}Ne=false,yt=a;let v=u;if(O!==false){let S=o-ht,R=S>0?Math.abs(a-(Ye<0?a:Ye))/S:0;v=u*Math.max(.2,1+R*(typeof O=="number"?O:1)*.04);}Ye=a,ht=o;let le=X?$e===-1||a>=$e?"forward":"reverse":L;$e=a;let Ie=we-f,Pe=true,Ae=Ie===0?0:(a-f)/Ie;if(isNaN(qe)||(qe<=0&&Ae>0?p?.():qe>0&&Ae<=0&&ve?.(),qe<1&&Ae>=1?I?.():qe>=1&&Ae<1&&de?.()),qe=Ae,me){let S=Se(Q(a,f,we,v));te&&!X&&(ae=Math.max(ae,S),S=ae),Ee=S,e.style.setProperty("--scroll-draw-progress",String(S));let R=le==="reverse"?1-S:S;e.style.clipPath=Ce(R),y?.(S),!z&&Q(a,f,we,v)>0&&(z=true,T?.()),S>=1&&!D?(D=true,g?.(),Re<(E==="infinite"?1/0:E??0)&&(Re++,De=setTimeout(()=>{ae=-1,z=false,D=false,e.style.clipPath=Ce(0);},ne))):S<1&&!te&&(D=false),_=requestAnimationFrame(Ze);return}if(V.forEach((S,R)=>{let ce=R*N*Ie,b=Se(Q(a,f+ce,we+ce,v));te&&!X&&(ae=Math.max(ae,b),b=ae),Ee=b,S.style.strokeDashoffset=le==="reverse"?`${P[R]*b}`:`${P[R]*(1-b)}`,m&&(S.style.opacity=le==="reverse"?`${1-b}`:`${b}`),be&&se?S.style.stroke=We(be,se,b):se&&(S.style.stroke=se),ie!==null&&G!==null?S.style.strokeWidth=`${ie+(G-ie)*b}`:G!==null&&(S.style.strokeWidth=`${G}`),fe!==null&&Y!==null?S.style.fillOpacity=`${fe+(Y-fe)*b}`:Y!==null&&(S.style.fillOpacity=`${Y}`),F&&S.tagName.toLowerCase()==="path"&&i[R]&&S.setAttribute("d",lt(i[R],F,b)),R===0&&(y?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(Pe=false);}),w){let S=Se(Q(a,f,we,v));for(let R in w){let ce=parseFloat(R);S>=ce&&!He.has(ce)&&(He.add(ce),w[R]?.());}}!z&&Q(a,f,we,v)>0&&(z=true,T?.()),Pe&&!D?(D=true,g?.(),Re<(E==="infinite"?1/0:E??0)&&(Re++,De=setTimeout(()=>{ae=-1,z=false,D=false,He.clear(),Qe(),Ne=true;},ne))):!Pe&&!te&&(D=false),_=requestAnimationFrame(Ze);}let it=false;function Je(){it||(it=true,_=requestAnimationFrame(function(){Ze();}));}function Ke(){it=false,cancelAnimationFrame(_);}let at=new IntersectionObserver(o=>{o.forEach(a=>{j=a.isIntersecting,j&&!K?(Ne=true,Je()):Ke();});},{root:he??null,threshold:k,rootMargin:$});function St(){V.forEach((o,a)=>{P[a]=Be(o),o.style.strokeDasharray=`${P[a]}`;}),wt(),Ne=true;}let et;function Ge(){clearTimeout(et),et=setTimeout(St,150);}window.addEventListener("resize",Ge),window.addEventListener("orientationchange",Ge);let je;return typeof ResizeObserver<"u"&&(je=new ResizeObserver(()=>Ge()),je.observe(document.body),je.observe(document.documentElement),je.observe(e)),W>0?setTimeout(()=>at.observe(e),W):at.observe(e),{destroy(){cancelAnimationFrame(_),clearTimeout(De),Ke(),at.disconnect(),je?.disconnect(),window.removeEventListener("resize",Ge),window.removeEventListener("orientationchange",Ge),clearTimeout(et),gt();},replay(){ae=-1,$e=-1,Ye=-1,z=false,D=false,Re=0,K=false,Ee=0,He.clear(),clearTimeout(De),Qe(),Ne=true,j&&Je();},pause(){K=true,Ke();},resume(){K&&(K=false,Ne=true,j&&Je());},seek(o){let a=Math.min(1,Math.max(0,o));Ee=a,ae=a,K=true,Ke(),Ht(a,L),Ne=true;},getProgress(){return Ee},refresh(){clearTimeout(et),St(),j&&!K&&Je();}}}var $t=new Map;function Ve(e,r){$t.set(e,r);}function ze(e){$t.delete(e);}function Kt(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Pt(e){let r=[],n=/([\w]+)\(([^)]*)\)/g,t;for(;(t=n.exec(e))!==null;){let l=[],s=[],c=t[2].trim();if(c)for(let u of c.split(/[\s,]+/)){let m=u.match(/^([-+]?[\d.eE]+)(.*)$/);l.push(m?parseFloat(m[1]):0),s.push(m?m[2]:"");}r.push({fn:t[1],nums:l,units:s});}return r}function en(e,r,n){let t=Pt(e),l=Pt(r);return t.length===0||t.length!==l.length?n<1?e:r:t.map((s,c)=>{let u=l[c];return s.fn!==u.fn||s.nums.length!==u.nums.length?n<1?`${s.fn}(${s.nums.map((m,d)=>`${m}${s.units[d]}`).join(", ")})`:`${u.fn}(${u.nums.map((m,d)=>`${m}${u.units[d]}`).join(", ")})`:`${s.fn}(${s.nums.map((m,d)=>`${m+(u.nums[d]-m)*n}${s.units[d]}`).join(", ")})`}).join(" ")}function Ot(e,r,n){if(typeof e=="number"&&typeof r=="number")return String(e+(r-e)*n);let t=String(e),l=String(r);if(Kt(t))return We(t,l,n);if(t.includes("("))return en(t,l,n);let s=t.match(/^([-+]?[\d.]+)(.*)$/),c=l.match(/^([-+]?[\d.]+)(.*)$/);if(s&&c){let u=parseFloat(s[1]),m=parseFloat(c[1]);return `${u+(m-u)*n}${s[2]||c[2]}`}return n<1?t:l}function tn(e){return e.replace(/([A-Z])/g,r=>`-${r.toLowerCase()}`)}var nn=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),rn=0,kt="--scroll-draw-progress";function on(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function ut(e,r){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let{props:t,trigger:l={},easing:s="ease-out",speed:c=1,once:u=false,axis:m="y",scrollContainer:d,native:x=true,velocityScale:N=false,respectReducedMotion:L=true,triggerElement:te,onProgress:Me,onComplete:B,onEnter:Z,onLeave:X,onEnterBack:W,onLeaveBack:A}=r,C=L&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,M=typeof s=="function"?s:ee[s]??ee["ease-out"],w=pe(l.start??"top bottom"),O=pe(l.end??"bottom top"),k=te??e,$=typeof d=="string"?document.querySelector(d):d??null,E=Object.entries(t).map(([i,f])=>({prop:tn(i),from:Array.isArray(f)?f[0]:"",to:Array.isArray(f)?f[1]:f}));function ne(){let i=window.getComputedStyle(e);for(let f of E)f.from===""&&(f.from=i.getPropertyValue(f.prop).trim()||"0");}function F(){for(let i of E)e.style.setProperty(i.prop,String(i.to));}let re=new Map;for(let i of [...E.map(f=>f.prop),kt])re.set(i,e.style.getPropertyValue(i));function oe(){for(let[i,f]of re)f?e.style.setProperty(i,f):e.style.removeProperty(i);}if(C)return F(),B?.(),{...n,destroy:oe,getProgress:()=>1};ne();let J=typeof s=="string"?rt(s):null;function ue(){if(!x||!on()||!J||m!=="y"||$||k!==e||u||c!==1||Me||B||Z||X||W||A||N!==false||(l.start??"top bottom").trim()!=="top bottom"||(l.end??"bottom top").trim()!=="bottom top")return false;for(let i of E)if(!nn.has(i.prop))return false;return true}function y(){let i=`ssd-a-${++rn}`,f=E.map(j=>`${j.prop}:${j.from}`).join(";"),we=E.map(j=>`${j.prop}:${j.to}`).join(";"),D=document.createElement("style");D.setAttribute("data-ssd-animate",""),D.textContent=`@keyframes ${i}{from{${f}}to{${we}}}.${i}{animation-name:${i};animation-duration:auto;animation-timing-function:${J};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(D),e.classList.add(i);let z=()=>m==="x"?window.scrollX:window.scrollY,_=()=>m==="x"?window.innerWidth:window.innerHeight;return {destroy(){e.classList.remove(i),D.remove(),e.style.animationPlayState="",oe();},replay(){e.classList.remove(i),e.offsetWidth,e.classList.add(i);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(j){let ae=Math.min(1,Math.max(0,j));e.classList.remove(i);for(let $e of E)e.style.setProperty($e.prop,Ot($e.from,$e.to,ae));},getProgress(){let j=e.getBoundingClientRect(),ae=z(),$e=_(),{tStart:K,tEnd:Ee}=xe({top:j.top,height:j.height},ae,$e,w,O);return M(Q(ae,K,Ee,c))}}}if(ue())return y();let T=0,g=0,p=0,I=false,de=false,ve=-1,me=0,Se=false,Le=NaN,_e=-1,he=0,be=()=>$?m==="x"?$.scrollLeft:$.scrollTop:m==="x"?window.scrollX:window.scrollY,se=()=>$?m==="x"?$.clientWidth:$.clientHeight:m==="x"?window.innerWidth:window.innerHeight;function ie(){let i=tt(k,$,m),f=xe(i,i.scroll,se(),w,O);T=f.tStart,g=f.tEnd;}function G(i){e.style.setProperty(kt,String(i));for(let f of E)e.style.setProperty(f.prop,Ot(f.from,f.to,i));Me?.(i);}function fe(i){if(isNaN(Le)){Le=i;return}Le<=0&&i>0?Z?.():Le>0&&i<=0&&A?.(),Le<1&&i>=1?X?.():Le>=1&&i<1&&W?.(),Le=i;}function Y(){if(!I||de)return;let i=performance.now(),f=be(),we=c;if(N!==false){let _=i-he,j=_>0?Math.abs(f-(_e<0?f:_e))/_:0;we=c*Math.max(.2,1+j*(typeof N=="number"?N:1)*.04);}_e=f,he=i;let D=g===T?0:(f-T)/(g-T);fe(D);let z=M(Q(f,T,g,we));u&&(ve=Math.max(ve,z),z=ve),me=z,G(z),z>=1&&!Se?(Se=true,B?.()):z<1&&!u&&(Se=false),p=requestAnimationFrame(Y);}ie(),g===T&&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 i=M(Q(be(),T,g,c));u&&i>0&&(ve=i),me=i,G(i);}let Ce=new IntersectionObserver(i=>{i.forEach(f=>{I=f.isIntersecting,I&&!de?p=requestAnimationFrame(Y):cancelAnimationFrame(p);});},{root:$??null}),V;function P(){clearTimeout(V),V=setTimeout(ie,150);}return window.addEventListener("resize",P),window.addEventListener("orientationchange",P),Ce.observe(e),Ve(e,{type:"animate",getProgress:()=>me,getTrigger:()=>({tStart:T,tEnd:g})}),{destroy(){cancelAnimationFrame(p),Ce.disconnect(),window.removeEventListener("resize",P),window.removeEventListener("orientationchange",P),clearTimeout(V),oe(),ze(e);},replay(){ve=-1,Se=false,me=0,de=false,G(0);},pause(){de=true,cancelAnimationFrame(p);},resume(){de&&(de=false,I&&(p=requestAnimationFrame(Y)));},seek(i){let f=Math.min(1,Math.max(0,i));me=f,ve=f,de=true,cancelAnimationFrame(p),G(f);},getProgress(){return me}}}var mt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function ft(e,r){if(typeof window>"u")return mt;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return ye("scrollCounter: element not found:",e),mt;let t=n,{from:l=0,to:s,format:c,easing:u="ease-out",trigger:m={},once:d=true,decimals:x,onComplete:N}=r,L=x!==void 0?y=>y.toFixed(x):c??(y=>String(Math.round(y))),te=typeof u=="function"?u:ee[u]??ee["ease-out"],Me=pe(m.start??"top 80%"),B=pe(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=L(s),N?.(),mt;let X=0,W=0,A=0,C=false,M=false,w=-1,O=0,k=false,$=()=>window.scrollY,E=()=>window.innerHeight;function ne(){let y=t.getBoundingClientRect(),T=xe({top:y.top,height:y.height},$(),E(),Me,B);X=T.tStart,W=T.tEnd;}function F(y){t.textContent=L(l+(s-l)*y),t.style.setProperty("--scroll-draw-progress",String(y));}function re(){if(!C||M)return;let y=te(Q($(),X,W,1));d&&(w=Math.max(w,y),y=w),O=y,F(y),y>=1&&!k?(k=true,N?.()):y<1&&!d&&(k=false),A=requestAnimationFrame(re);}ne();{let y=te(Q($(),X,W,1));d&&y>0&&(w=y),O=y,F(y);}let oe=new IntersectionObserver(y=>{y.forEach(T=>{C=T.isIntersecting,C&&!M?A=requestAnimationFrame(re):cancelAnimationFrame(A);});}),J;function ue(){clearTimeout(J),J=setTimeout(ne,150);}return window.addEventListener("resize",ue),window.addEventListener("orientationchange",ue),oe.observe(t),Ve(t,{type:"counter",getProgress:()=>O,getTrigger:()=>({tStart:X,tEnd:W})}),{destroy(){cancelAnimationFrame(A),oe.disconnect(),window.removeEventListener("resize",ue),window.removeEventListener("orientationchange",ue),clearTimeout(J),ze(t);},replay(){w=-1,k=false,O=0,M=false,F(0);},pause(){M=true,cancelAnimationFrame(A);},resume(){M&&(M=false,C&&(A=requestAnimationFrame(re)));},seek(y){let T=Math.min(1,Math.max(0,y));O=T,w=T,M=true,cancelAnimationFrame(A),F(T);},getProgress(){return O}}}var Ft={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function pt(e,r={}){if(typeof window>"u")return Ft;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return ye("scrollVideo: <video> element not found:",e),Ft;let t=n,{trigger:l={},easing:s="linear",once:c=false,axis:u="y",preload:m="auto",onReady:d,onComplete:x,onProgress:N}=r,L=window.matchMedia("(prefers-reduced-motion: reduce)").matches,te=typeof s=="function"?s:ee[s]??ee.linear,Me=pe(l.start??"top top"),B=pe(l.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let Z=r.from??0,X=r.to,W=0,A=0,C=0,M=false,w=false,O=-1,k=0,$=false,E=false,ne=()=>u==="x"?window.scrollX:window.scrollY,F=()=>u==="x"?window.innerWidth:window.innerHeight;function re(){let p=t.getBoundingClientRect(),I=u==="x"?p.left:p.top,de=u==="x"?p.width:p.height,ve=xe({top:I,height:de},ne(),F(),Me,B);W=ve.tStart,A=ve.tEnd;}function oe(p){if(!E)return;let I=X??t.duration??0;t.currentTime=Z+(I-Z)*p,t.style.setProperty("--scroll-draw-progress",String(p)),N?.(p);}function J(){if(!M||w||!E)return;let p=te(Q(ne(),W,A,1));c&&(O=Math.max(O,p),p=O),k=p,oe(p),p>=1&&!$?($=true,x?.()):p<1&&!c&&($=false),C=requestAnimationFrame(J);}function ue(){if(E=true,X===void 0&&(X=t.duration),L){oe(1),d?.();return}re(),d?.(),M&&!w&&(C=requestAnimationFrame(J));}t.readyState>=1?ue():t.addEventListener("loadedmetadata",ue,{once:true}),E||re();let y=new IntersectionObserver(p=>{p.forEach(I=>{M=I.isIntersecting,M&&!w&&E?C=requestAnimationFrame(J):cancelAnimationFrame(C);});}),T;function g(){clearTimeout(T),T=setTimeout(re,150);}return window.addEventListener("resize",g),window.addEventListener("orientationchange",g),y.observe(t),Ve(t,{type:"video",getProgress:()=>k,getTrigger:()=>({tStart:W,tEnd:A})}),{destroy(){cancelAnimationFrame(C),y.disconnect(),t.removeEventListener("loadedmetadata",ue),window.removeEventListener("resize",g),window.removeEventListener("orientationchange",g),clearTimeout(T),ze(t);},replay(){O=-1,$=false,k=0,w=false,oe(0);},pause(){w=true,cancelAnimationFrame(C);},resume(){w&&(w=false,M&&E&&(C=requestAnimationFrame(J)));},seek(p){let I=Math.min(1,Math.max(0,p));k=I,O=I,w=true,cancelAnimationFrame(C),oe(I);},getProgress(){return k}}}function Dt(e){let r=e.textContent??"";return e.textContent="",r.split(/(\s+)/).filter(Boolean).map(n=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(n)?(t.textContent=n,t.style.whiteSpace="pre"):(t.textContent=n,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(n)?null:t}).filter(n=>n!==null)}function sn(e){let r=e.textContent??"";return e.textContent="",r.split("").map(n=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=n,n===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),n===" "?null:t}).filter(n=>n!==null)}function Rt(e){let r=Dt(e),n=new Map;for(let s of r){let c=s.offsetTop;n.has(c)||n.set(c,[]),n.get(c).push(s);}let t=[],l=Array.from(n.keys()).sort((s,c)=>s-c);for(let s of l){let c=n.get(s),u=document.createElement("span");u.setAttribute("aria-hidden","true"),u.style.display="inline-block",c.forEach((m,d)=>{let x=m.nextElementSibling;u.appendChild(m),d<c.length-1&&x&&x.style.whiteSpace==="pre"&&u.appendChild(x);}),t.push(u);}return e.textContent="",t.forEach((s,c)=>{e.appendChild(s),c<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function an(e,r,n,t){if(n<=1||t===0)return e;let l=(n-1)*t,s=r*t,c=s+(1-l);return c<=s?e>=s?1:0:Math.min(1,Math.max(0,(e-s)/(c-s)))}function ln(e,r){let n=[];if(r?.y!==void 0&&n.push(`translateY(${r.y*(1-e)}px)`),r?.x!==void 0&&n.push(`translateX(${r.x*(1-e)}px)`),r?.rotate!==void 0&&n.push(`rotate(${r.rotate*(1-e)}deg)`),r?.scale!==void 0){let t=r.scale+(1-r.scale)*e;n.push(`scale(${t})`);}return n.join(" ")||""}var It={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function dt(e,r={}){if(typeof window>"u")return It;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return ye("scrollText: element not found:",e),It;let t=n,{split:l="words",stagger:s=.04,easing:c="ease-out",from:u={opacity:0,y:24},trigger:m={},once:d=true,onComplete:x}=r,N=window.matchMedia("(prefers-reduced-motion: reduce)").matches,L=typeof c=="function"?c:ee[c]??ee["ease-out"],te=pe(m.start??"top 85%"),Me=pe(m.end??"top 40%"),B=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let Z;l==="chars"?Z=sn(t):l==="lines"?Z=Rt(t):Z=Dt(t);let X=Z.length;function W(g,p){u?.opacity!==void 0&&(g.style.opacity=String(u.opacity+(1-u.opacity)*p));let I=ln(p,u);I&&(g.style.transform=I);}function A(g){t.style.setProperty("--scroll-draw-progress",String(g)),Z.forEach((p,I)=>{let de=L(an(g,I,X,s));W(p,de);});}if(N)return A(1),x?.(),{destroy(){t.innerHTML=B,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};A(0);let C=0,M=0,w=0,O=false,k=false,$=-1,E=0,ne=false,F=()=>window.scrollY,re=()=>window.innerHeight;function oe(){let g=t.getBoundingClientRect(),p=xe({top:g.top,height:g.height},F(),re(),te,Me);C=p.tStart,M=p.tEnd;}function J(){if(!O||k)return;let g=Q(F(),C,M,1);d&&($=Math.max($,g),g=$),E=g,A(g),g>=1&&!ne?(ne=true,x?.()):g<1&&!d&&(ne=false),w=requestAnimationFrame(J);}oe();let ue=new IntersectionObserver(g=>{g.forEach(p=>{O=p.isIntersecting,O&&!k?w=requestAnimationFrame(J):cancelAnimationFrame(w);});}),y;function T(){clearTimeout(y),y=setTimeout(()=>{if(l==="lines"){let g=E;t.innerHTML=B,t.setAttribute("aria-label",t.textContent??""),Z=Rt(t),A(g);}oe();},150);}return window.addEventListener("resize",T),window.addEventListener("orientationchange",T),ue.observe(t),Ve(t,{type:"text",getProgress:()=>E,getTrigger:()=>({tStart:C,tEnd:M})}),{destroy(){cancelAnimationFrame(w),ue.disconnect(),window.removeEventListener("resize",T),window.removeEventListener("orientationchange",T),clearTimeout(y),t.innerHTML=B,t.removeAttribute("aria-label"),ze(t);},replay(){$=-1,ne=false,E=0,k=false,A(0);},pause(){k=true,cancelAnimationFrame(w);},resume(){k&&(k=false,O&&(w=requestAnimationFrame(J)));},seek(g){let p=Math.min(1,Math.max(0,g));E=p,$=p,k=true,cancelAnimationFrame(w),A(p);},getProgress(){return E}}}function Bn(e={}){let r=ref(null);return onMounted(()=>{if(!r.value)return;let n=ct(r.value,e);onUnmounted(()=>n.destroy());}),r}var Wn=defineComponent({name:"ScrollDraw",props:{selector:{type:String},speed:{type:Number},fade:{type:Boolean},stagger:{type:Number},easing:{type:[String,Function]},direction:{type:String},trigger:{type:Object},onProgress:{type:Function},onStart:{type:Function},onComplete:{type:Function},once:{type:Boolean},debug:{type:Boolean}},setup(e,{slots:r}){let n=ref(null);return onMounted(()=>{if(!n.value)return;let t={};e.selector!=null&&(t.selector=e.selector),e.speed!=null&&(t.speed=e.speed),e.fade!=null&&(t.fade=e.fade),e.stagger!=null&&(t.stagger=e.stagger),e.easing!=null&&(t.easing=e.easing),e.direction!=null&&(t.direction=e.direction),e.trigger!=null&&(t.trigger=e.trigger),e.once!=null&&(t.once=e.once),e.debug!=null&&(t.debug=e.debug),e.onProgress!=null&&(t.onProgress=e.onProgress),e.onStart!=null&&(t.onStart=e.onStart),e.onComplete!=null&&(t.onComplete=e.onComplete);let l=ct(n.value,t);onUnmounted(()=>l.destroy());}),()=>h("div",{ref:n},r.default?.())}});function Gn(e){let r=ref(null);return onMounted(()=>{if(!r.value)return;let n=ut(r.value,e);onUnmounted(()=>n.destroy());}),r}var jn=defineComponent({name:"ScrollAnimate",props:{options:{type:Object,required:true}},setup(e,{slots:r}){let n=ref(null);return onMounted(()=>{if(!n.value)return;let t=ut(n.value,e.options);onUnmounted(()=>t.destroy());}),()=>h("div",{ref:n},r.default?.())}});function Un(e){let r=ref(null);return onMounted(()=>{if(!r.value)return;let n=ft(r.value,e);onUnmounted(()=>n.destroy());}),r}var Xn=defineComponent({name:"ScrollCounter",props:{to:{type:Number,required:true},from:{type:Number},format:{type:Function},easing:{type:[String,Function]},trigger:{type:Object},once:{type:Boolean},decimals:{type:Number},onComplete:{type:Function}},setup(e){let r=ref(null);return onMounted(()=>{if(!r.value)return;let n={to:e.to};e.from!=null&&(n.from=e.from),e.format!=null&&(n.format=e.format),e.easing!=null&&(n.easing=e.easing),e.trigger!=null&&(n.trigger=e.trigger),e.once!=null&&(n.once=e.once),e.decimals!=null&&(n.decimals=e.decimals),e.onComplete!=null&&(n.onComplete=e.onComplete);let t=ft(r.value,n);onUnmounted(()=>t.destroy());}),()=>h("span",{ref:r})}});function Yn(e={}){let r=ref(null);return onMounted(()=>{if(!r.value)return;let n=pt(r.value,e);onUnmounted(()=>n.destroy());}),r}var Qn=defineComponent({name:"ScrollVideo",props:{src:{type:String,required:true},options:{type:Object},muted:{type:Boolean,default:true},playsInline:{type:Boolean,default:true},class:{type:String}},setup(e){let r=ref(null);return onMounted(()=>{if(!r.value)return;let n=pt(r.value,e.options??{});onUnmounted(()=>n.destroy());}),()=>h("video",{ref:r,src:e.src,muted:e.muted,playsinline:e.playsInline,preload:"auto",class:e.class})}});function Zn(e={}){let r=ref(null);return onMounted(()=>{if(!r.value)return;let n=dt(r.value,e);onUnmounted(()=>n.destroy());}),r}var Jn=defineComponent({name:"ScrollText",props:{options:{type:Object},tag:{type:String,default:"p"}},setup(e,{slots:r}){let n=ref(null);return onMounted(()=>{if(!n.value)return;let t=dt(n.value,e.options??{});onUnmounted(()=>t.destroy());}),()=>h(e.tag,{ref:n},r.default?.())}});export{jn as ScrollAnimate,Xn as ScrollCounter,Wn as ScrollDraw,Jn as ScrollText,Qn as ScrollVideo,Gn as useScrollAnimate,Un as useScrollCounter,Bn as useScrollDraw,Zn as useScrollText,Yn as useScrollVideo};
3
+ <div style="position:absolute;${m?`left:${u}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${u}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",l,{passive:true}),l(),{el:t,destroy(){window.removeEventListener("scroll",l),t.remove();}}}var Ot=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,kt=/[MmLlHhVvCcSsQqTtAaZz]/g;function tn(e,r,n){if(!nt)return;let t=(e.match(kt)??[]).join("").toUpperCase(),l=(r.match(kt)??[]).join("").toUpperCase(),s=(e.match(Ot)??[]).length,c=(r.match(Ot)??[]).length;if(t!==l){we(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${l||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,n);return}s!==c&&we(`morphTo: coordinate count differs (${s} \u2192 ${c}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,n);}function ct(e,r,n){let t=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),l=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let c=parseFloat(s),u=t[l++]??c;return String(+(c+(u-c)*n).toFixed(4))})}function ut(e,r={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:n,...t}=r,l=n?{...Lt[n],...t}:t,s=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:c="path, polyline, line, polygon, rect, circle",speed:u=1,fade:m=false,easing:p="linear",trigger:T={},stagger:V=0,direction:C="forward",once:re=false,debug:$e=false,axis:W="y",scrollContainer:J,autoReverse:X=false,delay:G=0,strokeColor:A,strokeWidth:$,fillOpacity:M,waypoints:w,velocityScale:k=false,threshold:R=0,rootMargin:P="0px",repeat:S=0,repeatDelay:oe=0,morphTo:F,clip:se,autoplay:ie=false,duration:ee=1e3,native:ae=true,onProgress:d,onStart:x,onComplete:g,onEnter:L,onLeave:E,onEnterBack:D,onLeaveBack:fe}=l,Q=se===true?"left":typeof se=="string"?se:false,Ee=typeof p=="function"?p:ne[p]??ne.linear,Pe=de(T.start??"top bottom"),_e=de(T.end??"bottom top"),ve=typeof J=="string"?document.querySelector(J):J??null,Se=Array.isArray(A)?A[0]:null,le=Array.isArray(A)?A[1]:typeof A=="string"?A:null,ce=Array.isArray($)?$[0]:null,j=Array.isArray($)?$[1]:typeof $=="number"?$:null,pe=Array.isArray(M)?M[0]:null,Z=Array.isArray(M)?M[1]:typeof M=="number"?M:null;function Oe(o){let a=o*100;switch(Q){case "right":return `inset(0 0 0 ${100-a}%)`;case "top":return `inset(0 0 ${100-a}% 0)`;case "bottom":return `inset(${100-a}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-a}% 0 0)`}}let z=Q?[]:Array.from(e.querySelectorAll(c)),O=[],i=[],f=0,ge=0,N=false,_=false,q=0,Ae=false,ye=-1,te=-1,U=false,he=0,De=0,He,ot=null;function yt(){ot?.destroy(),ot=null;}let Ve=new Set,ht=NaN,ze=true,Xe=-1,bt=performance.now(),qe=NaN;function st(){return ve?W==="x"?ve.scrollLeft:ve.scrollTop:W==="x"?window.scrollX:window.scrollY}function wt(){return ve?W==="x"?ve.clientWidth:ve.clientHeight:W==="x"?window.innerWidth:window.innerHeight}function vt(){let o=tt(e,ve,W);return xe(o,o.scroll,wt(),Pe,_e)}function St(){(({tStart:f,tEnd:ge}=vt())),$e&&nt&&(yt(),ot=en(f,ge,W));}function it(o,a=vt){Le(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:a});let b=o.destroy;return o.destroy=()=>{b.call(o),Ce(e);},o}function zt(o,a){if(e.style.setProperty("--scroll-draw-progress",String(o)),Q){let b=a==="reverse"?1-o:o;e.style.clipPath=Oe(b);return}z.forEach((b,ue)=>{b.style.strokeDashoffset=a==="reverse"?`${O[ue]*o}`:`${O[ue]*(1-o)}`,m&&(b.style.opacity=a==="reverse"?`${1-o}`:`${o}`),Se&&le?b.style.stroke=We(Se,le,o):le&&(b.style.stroke=le),ce!==null&&j!==null?b.style.strokeWidth=`${ce+(j-ce)*o}`:j!==null&&(b.style.strokeWidth=`${j}`),pe!==null&&Z!==null?b.style.fillOpacity=`${pe+(Z-pe)*o}`:Z!==null&&(b.style.fillOpacity=`${Z}`),F&&b.tagName.toLowerCase()==="path"&&i[ue]&&b.setAttribute("d",ct(i[ue],F,o));});}function Qe(){if(e.style.setProperty("--scroll-draw-progress","0"),Q){e.style.clipPath=Oe(0);return}z.forEach((o,a)=>{o.style.strokeDasharray=`${O[a]}`,o.style.strokeDashoffset=C==="reverse"?"0":`${O[a]}`,m?o.style.opacity=C==="reverse"?"1":"0":o.style.opacity="",Se&&(o.style.stroke=Se),ce!==null&&(o.style.strokeWidth=`${ce}`),pe!==null&&(o.style.fillOpacity=`${pe}`),F&&o.tagName.toLowerCase()==="path"&&i[a]&&o.setAttribute("d",i[a]);});}if(z.forEach(o=>{Jt(o);let a=Be(o);O.push(a);let b=o.tagName.toLowerCase()==="path";b?i.push(o.getAttribute("d")??""):i.push(""),F&&(b?tn(i[i.length-1],F,o):we(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),s?(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=C==="reverse"?`${a}`:"0",m&&(o.style.opacity="1"),le&&(o.style.stroke=le),j!==null&&(o.style.strokeWidth=`${j}`),Z!==null&&(o.style.fillOpacity=`${Z}`),F&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",F)):(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=C==="reverse"?"0":`${a}`,m?o.style.opacity=C==="reverse"?"1":"0":o.style.opacity="",Se&&(o.style.stroke=Se),ce!==null&&(o.style.strokeWidth=`${ce}`),pe!==null&&(o.style.fillOpacity=`${pe}`));}),Q){if(s)return e.style.clipPath=Oe(1),g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Oe(0);}else if(s)return g?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Et=typeof p=="string"?rt(p):null;function _t(){return !(ae===false||!Kt()||!z.length||!Et||Q||W!=="y"||ve||u!==1||V!==0||re||X||k!==false||F||w||S||G>0||d||x||g||L||E||D||fe||A!=null||$!=null||M!=null||(T.start??"top bottom").trim()!=="top bottom"||(T.end??"bottom top").trim()!=="bottom top")}function qt(){let o=++Zt,a=`svg-scroll-draw-${o}`,b=`svg-scroll-draw-host-${o}`,ue=`--svg-scroll-draw-${o}`,Ne=C==="reverse"?"0":"var(--ssd-len)",ke=C==="reverse"?"var(--ssd-len)":"0",Me=`stroke-dashoffset:${Ne};`,v=`stroke-dashoffset:${ke};`;m&&(Me+=`opacity:${C==="reverse"?1:0};`,v+=`opacity:${C==="reverse"?0:1};`);let I=document.createElement("style");I.setAttribute("data-svg-scroll-draw",""),I.textContent=`@keyframes ${a}{from{${Me}}to{${v}}}.${b}{view-timeline-name:${ue};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${Et};animation-fill-mode:both;animation-timeline:${ue};animation-range:cover 0% cover 100%;}`,document.head.appendChild(I),e.classList.add(b);function me(y,Y){y.style.setProperty("--ssd-len",String(O[Y])),y.style.strokeDasharray=`${O[Y]}`,y.style.strokeDashoffset="",y.style.opacity="",y.style.animationPlayState="",y.classList.add(a);}z.forEach(me);let h=false,H=-1;function B(){if(H>=0)return H;let y=e.getBoundingClientRect(),{tStart:Y,tEnd:Te}=xe({top:y.top,height:y.height},st(),wt(),Pe,_e);return Ee(K(st(),Y,Te,u))}return {destroy(){e.classList.remove(b),z.forEach(y=>{y.classList.remove(a),y.style.removeProperty("--ssd-len"),y.style.animationPlayState="";}),I.remove();},replay(){h=false,H=-1,z.forEach(me);},pause(){h=true,z.forEach(y=>{y.style.animationPlayState="paused";});},resume(){h&&(h=false,z.forEach(y=>{y.style.animationPlayState="running";}));},seek(y){let Y=Math.min(1,Math.max(0,y));H=Y,h=true,z.forEach((Te,be)=>{Te.classList.remove(a),Te.style.strokeDashoffset=C==="reverse"?`${O[be]*Y}`:`${O[be]*(1-Y)}`,m&&(Te.style.opacity=C==="reverse"?`${1-Y}`:`${Y}`);});},getProgress(){return B()},refresh(){z.forEach((y,Y)=>{O[Y]=Be(y),y.style.setProperty("--ssd-len",String(O[Y])),y.style.strokeDasharray=`${O[Y]}`;});}}}if(_t())return it(qt());function Bt(){let o=Math.max(1,ee),a=0,b=0,ue=false;function Ne(h){let H=true;if(Q){let B=Math.min(1,Math.max(0,h/o)),y=Ee(B);he=y,e.style.setProperty("--scroll-draw-progress",String(y)),e.style.clipPath=Oe(C==="reverse"?1-y:y),d?.(y),B<1&&(H=false);}else z.forEach((B,y)=>{let Y=y*V*o,Te=Math.min(1,Math.max(0,(h-Y)/o)),be=Ee(Te);B.style.strokeDashoffset=C==="reverse"?`${O[y]*be}`:`${O[y]*(1-be)}`,m&&(B.style.opacity=C==="reverse"?`${1-be}`:`${be}`),Se&&le?B.style.stroke=We(Se,le,be):le&&(B.style.stroke=le),ce!==null&&j!==null?B.style.strokeWidth=`${ce+(j-ce)*be}`:j!==null&&(B.style.strokeWidth=`${j}`),pe!==null&&Z!==null?B.style.fillOpacity=`${pe+(Z-pe)*be}`:Z!==null&&(B.style.fillOpacity=`${Z}`),F&&B.tagName.toLowerCase()==="path"&&i[y]&&B.setAttribute("d",ct(i[y],F,be)),y===0&&(he=be,d?.(be),e.style.setProperty("--scroll-draw-progress",String(be))),Te<1&&(H=false);});if(w){let B=Math.min(1,Math.max(0,h/o)),y=Ee(B);for(let Y in w){let Te=parseFloat(Y);y>=Te&&!Ve.has(Te)&&(Ve.add(Te),w[Y]?.());}}return H}function ke(h){if(U)return;let H=h-a;_||(_=true,x?.());let B=Ne(H);if(B&&!N){N=true,Ne(o*(1+Math.max(0,z.length-1)*V)),g?.(),De<(S==="infinite"?1/0:S??0)&&(De++,He=setTimeout(()=>{a=performance.now(),_=false,N=false,Ve.clear(),Qe(),q=requestAnimationFrame(ke);},oe));return}B||(q=requestAnimationFrame(ke));}function Me(){cancelAnimationFrame(q),clearTimeout(He),a=performance.now(),b=0,U=false,_=false,N=false,De=0,ue=true,he=0,Ve.clear(),Qe(),q=requestAnimationFrame(ke);}let v=new IntersectionObserver(h=>{h.forEach(H=>{H.isIntersecting&&!(re&&N)?Me():!H.isIntersecting&&!re&&!N&&(cancelAnimationFrame(q),clearTimeout(He),ue=false);});},{root:ve??null,threshold:R,rootMargin:P}),I;function me(){clearTimeout(I),I=setTimeout(()=>{z.forEach((h,H)=>{O[H]=Be(h),h.style.strokeDasharray=`${O[H]}`;});},150);}return window.addEventListener("resize",me),window.addEventListener("orientationchange",me),G>0?setTimeout(()=>v.observe(e),G):v.observe(e),{destroy(){cancelAnimationFrame(q),clearTimeout(He),v.disconnect(),window.removeEventListener("resize",me),window.removeEventListener("orientationchange",me),clearTimeout(I);},replay(){De=0,Me();},pause(){U||!ue||(U=true,b=performance.now()-a,cancelAnimationFrame(q));},resume(){U&&(U=false,ue=true,a=performance.now()-b,q=requestAnimationFrame(ke));},seek(h){let H=Math.min(1,Math.max(0,h));he=H,U=true,b=H*o,a=performance.now()-b,cancelAnimationFrame(q),Ne(b);},getProgress(){return he},refresh(){clearTimeout(I),z.forEach((h,H)=>{O[H]=Be(h),h.style.strokeDasharray=`${O[H]}`;});}}}if(ie)return it(Bt());St();function Ze(){if(!Ae||U)return;let o=performance.now(),a=st();if(!ze&&k===false&&a===ht){q=requestAnimationFrame(Ze);return}ze=false,ht=a;let b=u;if(k!==false){let v=o-bt,I=v>0?Math.abs(a-(Xe<0?a:Xe))/v:0;b=u*Math.max(.2,1+I*(typeof k=="number"?k:1)*.04);}Xe=a,bt=o;let ue=X?te===-1||a>=te?"forward":"reverse":C;te=a;let Ne=ge-f,ke=true,Me=Ne===0?0:(a-f)/Ne;if(isNaN(qe)||(qe<=0&&Me>0?L?.():qe>0&&Me<=0&&fe?.(),qe<1&&Me>=1?E?.():qe>=1&&Me<1&&D?.()),qe=Me,Q){let v=Ee(K(a,f,ge,b));re&&!X&&(ye=Math.max(ye,v),v=ye),he=v,e.style.setProperty("--scroll-draw-progress",String(v));let I=ue==="reverse"?1-v:v;e.style.clipPath=Oe(I),d?.(v),!_&&K(a,f,ge,b)>0&&(_=true,x?.()),v>=1&&!N?(N=true,g?.(),De<(S==="infinite"?1/0:S??0)&&(De++,He=setTimeout(()=>{ye=-1,_=false,N=false,e.style.clipPath=Oe(0);},oe))):v<1&&!re&&(N=false),q=requestAnimationFrame(Ze);return}if(z.forEach((v,I)=>{let me=I*V*Ne,h=Ee(K(a,f+me,ge+me,b));re&&!X&&(ye=Math.max(ye,h),h=ye),he=h,v.style.strokeDashoffset=ue==="reverse"?`${O[I]*h}`:`${O[I]*(1-h)}`,m&&(v.style.opacity=ue==="reverse"?`${1-h}`:`${h}`),Se&&le?v.style.stroke=We(Se,le,h):le&&(v.style.stroke=le),ce!==null&&j!==null?v.style.strokeWidth=`${ce+(j-ce)*h}`:j!==null&&(v.style.strokeWidth=`${j}`),pe!==null&&Z!==null?v.style.fillOpacity=`${pe+(Z-pe)*h}`:Z!==null&&(v.style.fillOpacity=`${Z}`),F&&v.tagName.toLowerCase()==="path"&&i[I]&&v.setAttribute("d",ct(i[I],F,h)),I===0&&(d?.(h),e.style.setProperty("--scroll-draw-progress",String(h))),h<1&&(ke=false);}),w){let v=Ee(K(a,f,ge,b));for(let I in w){let me=parseFloat(I);v>=me&&!Ve.has(me)&&(Ve.add(me),w[I]?.());}}!_&&K(a,f,ge,b)>0&&(_=true,x?.()),ke&&!N?(N=true,g?.(),De<(S==="infinite"?1/0:S??0)&&(De++,He=setTimeout(()=>{ye=-1,_=false,N=false,Ve.clear(),Qe(),ze=true;},oe))):!ke&&!re&&(N=false),q=requestAnimationFrame(Ze);}let at=false;function Ke(){at||(at=true,q=requestAnimationFrame(function(){Ze();}));}function Je(){at=false,cancelAnimationFrame(q);}let lt=new IntersectionObserver(o=>{o.forEach(a=>{Ae=a.isIntersecting,Ae&&!U?(ze=true,Ke()):Je();});},{root:ve??null,threshold:R,rootMargin:P});function Tt(){z.forEach((o,a)=>{O[a]=Be(o),o.style.strokeDasharray=`${O[a]}`;}),St(),ze=true;}let et;function Ge(){clearTimeout(et),et=setTimeout(Tt,150);}window.addEventListener("resize",Ge),window.addEventListener("orientationchange",Ge);let je;return typeof ResizeObserver<"u"&&(je=new ResizeObserver(()=>Ge()),je.observe(document.body),je.observe(document.documentElement),je.observe(e)),G>0?setTimeout(()=>lt.observe(e),G):lt.observe(e),it({destroy(){cancelAnimationFrame(q),clearTimeout(He),Je(),lt.disconnect(),je?.disconnect(),window.removeEventListener("resize",Ge),window.removeEventListener("orientationchange",Ge),clearTimeout(et),yt();},replay(){ye=-1,te=-1,Xe=-1,_=false,N=false,De=0,U=false,he=0,Ve.clear(),clearTimeout(He),Qe(),ze=true,Ae&&Ke();},pause(){U=true,Je();},resume(){U&&(U=false,ze=true,Ae&&Ke());},seek(o){let a=Math.min(1,Math.max(0,o));he=a,ye=a,U=true,Je(),zt(a,C),ze=true;},getProgress(){return he},refresh(){clearTimeout(et),Tt(),Ae&&!U&&Ke();}},()=>({tStart:f,tEnd:ge}))}function nn(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Rt(e){let r=[],n=/([\w]+)\(([^)]*)\)/g,t;for(;(t=n.exec(e))!==null;){let l=[],s=[],c=t[2].trim();if(c)for(let u of c.split(/[\s,]+/)){let m=u.match(/^([-+]?[\d.eE]+)(.*)$/);l.push(m?parseFloat(m[1]):0),s.push(m?m[2]:"");}r.push({fn:t[1],nums:l,units:s});}return r}function rn(e,r,n){let t=Rt(e),l=Rt(r);return t.length===0||t.length!==l.length?n<1?e:r:t.map((s,c)=>{let u=l[c];return s.fn!==u.fn||s.nums.length!==u.nums.length?n<1?`${s.fn}(${s.nums.map((m,p)=>`${m}${s.units[p]}`).join(", ")})`:`${u.fn}(${u.nums.map((m,p)=>`${m}${u.units[p]}`).join(", ")})`:`${s.fn}(${s.nums.map((m,p)=>`${m+(u.nums[p]-m)*n}${s.units[p]}`).join(", ")})`}).join(" ")}function Ft(e,r,n){if(typeof e=="number"&&typeof r=="number")return String(e+(r-e)*n);let t=String(e),l=String(r);if(nn(t))return We(t,l,n);if(t.includes("("))return rn(t,l,n);let s=t.match(/^([-+]?[\d.]+)(.*)$/),c=l.match(/^([-+]?[\d.]+)(.*)$/);if(s&&c){let u=parseFloat(s[1]),m=parseFloat(c[1]);return `${u+(m-u)*n}${s[2]||c[2]}`}return n<1?t:l}function on(e){return e.replace(/([A-Z])/g,r=>`-${r.toLowerCase()}`)}var sn=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),an=0,It="--scroll-draw-progress";function ln(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function mt(e,r){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let{props:t,trigger:l={},easing:s="ease-out",speed:c=1,once:u=false,axis:m="y",scrollContainer:p,native:T=true,velocityScale:V=false,respectReducedMotion:C=true,triggerElement:re,onProgress:$e,onComplete:W,onEnter:J,onLeave:X,onEnterBack:G,onLeaveBack:A}=r,$=C&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,M=typeof s=="function"?s:ne[s]??ne["ease-out"],w=de(l.start??"top bottom"),k=de(l.end??"bottom top"),R=re??e,P=typeof p=="string"?document.querySelector(p):p??null,S=Object.entries(t).map(([i,f])=>({prop:on(i),from:Array.isArray(f)?f[0]:"",to:Array.isArray(f)?f[1]:f}));function oe(){let i=window.getComputedStyle(e);for(let f of S)f.from===""&&(f.from=i.getPropertyValue(f.prop).trim()||"0");}function F(){for(let i of S)e.style.setProperty(i.prop,String(i.to));}let se=new Map;for(let i of [...S.map(f=>f.prop),It])se.set(i,e.style.getPropertyValue(i));function ie(){for(let[i,f]of se)f?e.style.setProperty(i,f):e.style.removeProperty(i);}if($)return F(),W?.(),{...n,destroy:ie,getProgress:()=>1};oe();let ee=typeof s=="string"?rt(s):null;function ae(){if(!T||!ln()||!ee||m!=="y"||P||R!==e||u||c!==1||$e||W||J||X||G||A||V!==false||(l.start??"top bottom").trim()!=="top bottom"||(l.end??"bottom top").trim()!=="bottom top")return false;for(let i of S)if(!sn.has(i.prop))return false;return true}function d(){let i=`ssd-a-${++an}`,f=S.map(te=>`${te.prop}:${te.from}`).join(";"),ge=S.map(te=>`${te.prop}:${te.to}`).join(";"),N=document.createElement("style");N.setAttribute("data-ssd-animate",""),N.textContent=`@keyframes ${i}{from{${f}}to{${ge}}}.${i}{animation-name:${i};animation-duration:auto;animation-timing-function:${ee};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(N),e.classList.add(i);let _=()=>m==="x"?window.scrollX:window.scrollY,q=()=>m==="x"?window.innerWidth:window.innerHeight,Ae=()=>{let te=e.getBoundingClientRect();return xe({top:te.top,height:te.height},_(),q(),w,k)};Le(e,{type:"animate",getProgress:()=>ye.getProgress(),getTrigger:Ae});let ye={destroy(){e.classList.remove(i),N.remove(),e.style.animationPlayState="",ie(),Ce(e);},replay(){e.classList.remove(i),e.offsetWidth,e.classList.add(i);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(te){let U=Math.min(1,Math.max(0,te));e.classList.remove(i);for(let he of S)e.style.setProperty(he.prop,Ft(he.from,he.to,U));},getProgress(){let{tStart:te,tEnd:U}=Ae();return M(K(_(),te,U,c))}};return ye}if(ae())return d();let x=0,g=0,L=0,E=false,D=false,fe=-1,Q=0,Ee=false,Pe=NaN,_e=-1,ve=0,Se=()=>P?m==="x"?P.scrollLeft:P.scrollTop:m==="x"?window.scrollX:window.scrollY,le=()=>P?m==="x"?P.clientWidth:P.clientHeight:m==="x"?window.innerWidth:window.innerHeight;function ce(){let i=tt(R,P,m),f=xe(i,i.scroll,le(),w,k);x=f.tStart,g=f.tEnd;}function j(i){e.style.setProperty(It,String(i));for(let f of S)e.style.setProperty(f.prop,Ft(f.from,f.to,i));$e?.(i);}function pe(i){if(isNaN(Pe)){Pe=i;return}Pe<=0&&i>0?J?.():Pe>0&&i<=0&&A?.(),Pe<1&&i>=1?X?.():Pe>=1&&i<1&&G?.(),Pe=i;}function Z(){if(!E||D)return;let i=performance.now(),f=Se(),ge=c;if(V!==false){let q=i-ve,Ae=q>0?Math.abs(f-(_e<0?f:_e))/q:0;ge=c*Math.max(.2,1+Ae*(typeof V=="number"?V:1)*.04);}_e=f,ve=i;let N=g===x?0:(f-x)/(g-x);pe(N);let _=M(K(f,x,g,ge));u&&(fe=Math.max(fe,_),_=fe),Q=_,j(_),_>=1&&!Ee?(Ee=true,W?.()):_<1&&!u&&(Ee=false),L=requestAnimationFrame(Z);}ce(),g===x&&we("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let i=M(K(Se(),x,g,c));u&&i>0&&(fe=i),Q=i,j(i);}let Oe=new IntersectionObserver(i=>{i.forEach(f=>{E=f.isIntersecting,E&&!D?L=requestAnimationFrame(Z):cancelAnimationFrame(L);});},{root:P??null}),z;function O(){clearTimeout(z),z=setTimeout(ce,150);}return window.addEventListener("resize",O),window.addEventListener("orientationchange",O),Oe.observe(e),Le(e,{type:"animate",getProgress:()=>Q,getTrigger:()=>({tStart:x,tEnd:g})}),{destroy(){cancelAnimationFrame(L),Oe.disconnect(),window.removeEventListener("resize",O),window.removeEventListener("orientationchange",O),clearTimeout(z),ie(),Ce(e);},replay(){fe=-1,Ee=false,Q=0,D=false,j(0);},pause(){D=true,cancelAnimationFrame(L);},resume(){D&&(D=false,E&&(L=requestAnimationFrame(Z)));},seek(i){let f=Math.min(1,Math.max(0,i));Q=f,fe=f,D=true,cancelAnimationFrame(L),j(f);},getProgress(){return Q}}}var ft={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function pt(e,r){if(typeof window>"u")return ft;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return we("scrollCounter: element not found:",e),ft;let t=n,{from:l=0,to:s,format:c,easing:u="ease-out",trigger:m={},once:p=true,decimals:T,onComplete:V}=r,C=T!==void 0?d=>d.toFixed(T):c??(d=>String(Math.round(d))),re=typeof u=="function"?u:ne[u]??ne["ease-out"],$e=de(m.start??"top 80%"),W=de(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=C(s),V?.(),ft;let X=0,G=0,A=0,$=false,M=false,w=-1,k=0,R=false,P=()=>window.scrollY,S=()=>window.innerHeight;function oe(){let d=t.getBoundingClientRect(),x=xe({top:d.top,height:d.height},P(),S(),$e,W);X=x.tStart,G=x.tEnd;}function F(d){t.textContent=C(l+(s-l)*d),t.style.setProperty("--scroll-draw-progress",String(d));}function se(){if(!$||M)return;let d=re(K(P(),X,G,1));p&&(w=Math.max(w,d),d=w),k=d,F(d),d>=1&&!R?(R=true,V?.()):d<1&&!p&&(R=false),A=requestAnimationFrame(se);}oe();{let d=re(K(P(),X,G,1));p&&d>0&&(w=d),k=d,F(d);}let ie=new IntersectionObserver(d=>{d.forEach(x=>{$=x.isIntersecting,$&&!M?A=requestAnimationFrame(se):cancelAnimationFrame(A);});}),ee;function ae(){clearTimeout(ee),ee=setTimeout(oe,150);}return window.addEventListener("resize",ae),window.addEventListener("orientationchange",ae),ie.observe(t),Le(t,{type:"counter",getProgress:()=>k,getTrigger:()=>({tStart:X,tEnd:G})}),{destroy(){cancelAnimationFrame(A),ie.disconnect(),window.removeEventListener("resize",ae),window.removeEventListener("orientationchange",ae),clearTimeout(ee),Ce(t);},replay(){w=-1,R=false,k=0,M=false,F(0);},pause(){M=true,cancelAnimationFrame(A);},resume(){M&&(M=false,$&&(A=requestAnimationFrame(se)));},seek(d){let x=Math.min(1,Math.max(0,d));k=x,w=x,M=true,cancelAnimationFrame(A),F(x);},getProgress(){return k}}}var Dt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function dt(e,r={}){if(typeof window>"u")return Dt;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return we("scrollVideo: <video> element not found:",e),Dt;let t=n,{trigger:l={},easing:s="linear",once:c=false,axis:u="y",preload:m="auto",onReady:p,onComplete:T,onProgress:V}=r,C=window.matchMedia("(prefers-reduced-motion: reduce)").matches,re=typeof s=="function"?s:ne[s]??ne.linear,$e=de(l.start??"top top"),W=de(l.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let J=r.from??0,X=r.to,G=0,A=0,$=0,M=false,w=false,k=-1,R=0,P=false,S=false,oe=()=>u==="x"?window.scrollX:window.scrollY,F=()=>u==="x"?window.innerWidth:window.innerHeight;function se(){let E=t.getBoundingClientRect(),D=u==="x"?E.left:E.top,fe=u==="x"?E.width:E.height,Q=xe({top:D,height:fe},oe(),F(),$e,W);G=Q.tStart,A=Q.tEnd;}let ie=NaN;function ee(E){if(!S)return;let D=X??t.duration??0,fe=J+(D-J)*E;fe!==ie&&(ie=fe,t.currentTime=fe),t.style.setProperty("--scroll-draw-progress",String(E)),V?.(E);}function ae(){if(!M||w||!S)return;let E=re(K(oe(),G,A,1));c&&(k=Math.max(k,E),E=k),R=E,ee(E),E>=1&&!P?(P=true,T?.()):E<1&&!c&&(P=false),$=requestAnimationFrame(ae);}function d(){if(S=true,X===void 0&&(X=t.duration),C){ee(1),p?.();return}se(),p?.(),M&&!w&&($=requestAnimationFrame(ae));}t.readyState>=1?d():t.addEventListener("loadedmetadata",d,{once:true}),S||se();let x=new IntersectionObserver(E=>{E.forEach(D=>{M=D.isIntersecting,M&&!w&&S?$=requestAnimationFrame(ae):cancelAnimationFrame($);});}),g;function L(){clearTimeout(g),g=setTimeout(se,150);}return window.addEventListener("resize",L),window.addEventListener("orientationchange",L),x.observe(t),Le(t,{type:"video",getProgress:()=>R,getTrigger:()=>({tStart:G,tEnd:A})}),{destroy(){cancelAnimationFrame($),x.disconnect(),t.removeEventListener("loadedmetadata",d),window.removeEventListener("resize",L),window.removeEventListener("orientationchange",L),clearTimeout(g),Ce(t);},replay(){k=-1,P=false,R=0,w=false,ie=NaN,ee(0);},pause(){w=true,cancelAnimationFrame($);},resume(){w&&(w=false,M&&S&&($=requestAnimationFrame(ae)));},seek(E){let D=Math.min(1,Math.max(0,E));R=D,k=D,w=true,cancelAnimationFrame($),ie=NaN,ee(D);},getProgress(){return R}}}function Vt(e){let r=e.textContent??"";return e.textContent="",r.split(/(\s+)/).filter(Boolean).map(n=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(n)?(t.textContent=n,t.style.whiteSpace="pre"):(t.textContent=n,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(n)?null:t}).filter(n=>n!==null)}function cn(e){let r=e.textContent??"";return e.textContent="",r.split("").map(n=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=n,n===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),n===" "?null:t}).filter(n=>n!==null)}function Nt(e){let r=Vt(e),n=new Map;for(let s of r){let c=s.offsetTop;n.has(c)||n.set(c,[]),n.get(c).push(s);}let t=[],l=Array.from(n.keys()).sort((s,c)=>s-c);for(let s of l){let c=n.get(s),u=document.createElement("span");u.setAttribute("aria-hidden","true"),u.style.display="inline-block",c.forEach((m,p)=>{let T=m.nextElementSibling;u.appendChild(m),p<c.length-1&&T&&T.style.whiteSpace==="pre"&&u.appendChild(T);}),t.push(u);}return e.textContent="",t.forEach((s,c)=>{e.appendChild(s),c<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function un(e,r,n,t){if(n<=1||t===0)return e;let l=(n-1)*t,s=r*t,c=s+(1-l);return c<=s?e>=s?1:0:Math.min(1,Math.max(0,(e-s)/(c-s)))}function mn(e,r){let n=[];if(r?.y!==void 0&&n.push(`translateY(${r.y*(1-e)}px)`),r?.x!==void 0&&n.push(`translateX(${r.x*(1-e)}px)`),r?.rotate!==void 0&&n.push(`rotate(${r.rotate*(1-e)}deg)`),r?.scale!==void 0){let t=r.scale+(1-r.scale)*e;n.push(`scale(${t})`);}return n.join(" ")||""}var Ht={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function gt(e,r={}){if(typeof window>"u")return Ht;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return we("scrollText: element not found:",e),Ht;let t=n,{split:l="words",stagger:s=.04,easing:c="ease-out",from:u={opacity:0,y:24},trigger:m={},once:p=true,onComplete:T}=r,V=window.matchMedia("(prefers-reduced-motion: reduce)").matches,C=typeof c=="function"?c:ne[c]??ne["ease-out"],re=de(m.start??"top 85%"),$e=de(m.end??"top 40%"),W=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let J;l==="chars"?J=cn(t):l==="lines"?J=Nt(t):J=Vt(t);let X=J.length;function G(g,L){u?.opacity!==void 0&&(g.style.opacity=String(u.opacity+(1-u.opacity)*L));let E=mn(L,u);E&&(g.style.transform=E);}function A(g){t.style.setProperty("--scroll-draw-progress",String(g)),J.forEach((L,E)=>{let D=C(un(g,E,X,s));G(L,D);});}if(V)return A(1),T?.(),{destroy(){t.innerHTML=W,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};A(0);let $=0,M=0,w=0,k=false,R=false,P=-1,S=0,oe=false,F=()=>window.scrollY,se=()=>window.innerHeight;function ie(){let g=t.getBoundingClientRect(),L=xe({top:g.top,height:g.height},F(),se(),re,$e);$=L.tStart,M=L.tEnd;}function ee(){if(!k||R)return;let g=K(F(),$,M,1);p&&(P=Math.max(P,g),g=P),S=g,A(g),g>=1&&!oe?(oe=true,T?.()):g<1&&!p&&(oe=false),w=requestAnimationFrame(ee);}ie();let ae=new IntersectionObserver(g=>{g.forEach(L=>{k=L.isIntersecting,k&&!R?w=requestAnimationFrame(ee):cancelAnimationFrame(w);});}),d;function x(){clearTimeout(d),d=setTimeout(()=>{if(l==="lines"){let g=S;t.innerHTML=W,t.setAttribute("aria-label",t.textContent??""),J=Nt(t),A(g);}ie();},150);}return window.addEventListener("resize",x),window.addEventListener("orientationchange",x),ae.observe(t),Le(t,{type:"text",getProgress:()=>S,getTrigger:()=>({tStart:$,tEnd:M})}),{destroy(){cancelAnimationFrame(w),ae.disconnect(),window.removeEventListener("resize",x),window.removeEventListener("orientationchange",x),clearTimeout(d),t.innerHTML=W,t.removeAttribute("aria-label"),Ce(t);},replay(){P=-1,oe=false,S=0,R=false,A(0);},pause(){R=true,cancelAnimationFrame(w);},resume(){R&&(R=false,k&&(w=requestAnimationFrame(ee)));},seek(g){let L=Math.min(1,Math.max(0,g));S=L,P=L,R=true,cancelAnimationFrame(w),A(L);},getProgress(){return S}}}function Un(e={}){let r=ref(null);return onMounted(()=>{if(!r.value)return;let n=ut(r.value,e);onUnmounted(()=>n.destroy());}),r}var Yn=defineComponent({name:"ScrollDraw",props:{selector:{type:String},speed:{type:Number},fade:{type:Boolean},stagger:{type:Number},easing:{type:[String,Function]},direction:{type:String},trigger:{type:Object},onProgress:{type:Function},onStart:{type:Function},onComplete:{type:Function},once:{type:Boolean},debug:{type:Boolean}},setup(e,{slots:r}){let n=ref(null);return onMounted(()=>{if(!n.value)return;let t={};e.selector!=null&&(t.selector=e.selector),e.speed!=null&&(t.speed=e.speed),e.fade!=null&&(t.fade=e.fade),e.stagger!=null&&(t.stagger=e.stagger),e.easing!=null&&(t.easing=e.easing),e.direction!=null&&(t.direction=e.direction),e.trigger!=null&&(t.trigger=e.trigger),e.once!=null&&(t.once=e.once),e.debug!=null&&(t.debug=e.debug),e.onProgress!=null&&(t.onProgress=e.onProgress),e.onStart!=null&&(t.onStart=e.onStart),e.onComplete!=null&&(t.onComplete=e.onComplete);let l=ut(n.value,t);onUnmounted(()=>l.destroy());}),()=>h("div",{ref:n},r.default?.())}});function Xn(e){let r=ref(null);return onMounted(()=>{if(!r.value)return;let n=mt(r.value,e);onUnmounted(()=>n.destroy());}),r}var Qn=defineComponent({name:"ScrollAnimate",props:{options:{type:Object,required:true}},setup(e,{slots:r}){let n=ref(null);return onMounted(()=>{if(!n.value)return;let t=mt(n.value,e.options);onUnmounted(()=>t.destroy());}),()=>h("div",{ref:n},r.default?.())}});function Zn(e){let r=ref(null);return onMounted(()=>{if(!r.value)return;let n=pt(r.value,e);onUnmounted(()=>n.destroy());}),r}var Kn=defineComponent({name:"ScrollCounter",props:{to:{type:Number,required:true},from:{type:Number},format:{type:Function},easing:{type:[String,Function]},trigger:{type:Object},once:{type:Boolean},decimals:{type:Number},onComplete:{type:Function}},setup(e){let r=ref(null);return onMounted(()=>{if(!r.value)return;let n={to:e.to};e.from!=null&&(n.from=e.from),e.format!=null&&(n.format=e.format),e.easing!=null&&(n.easing=e.easing),e.trigger!=null&&(n.trigger=e.trigger),e.once!=null&&(n.once=e.once),e.decimals!=null&&(n.decimals=e.decimals),e.onComplete!=null&&(n.onComplete=e.onComplete);let t=pt(r.value,n);onUnmounted(()=>t.destroy());}),()=>h("span",{ref:r})}});function Jn(e={}){let r=ref(null);return onMounted(()=>{if(!r.value)return;let n=dt(r.value,e);onUnmounted(()=>n.destroy());}),r}var er=defineComponent({name:"ScrollVideo",props:{src:{type:String,required:true},options:{type:Object},muted:{type:Boolean,default:true},playsInline:{type:Boolean,default:true},class:{type:String}},setup(e){let r=ref(null);return onMounted(()=>{if(!r.value)return;let n=dt(r.value,e.options??{});onUnmounted(()=>n.destroy());}),()=>h("video",{ref:r,src:e.src,muted:e.muted,playsinline:e.playsInline,preload:"auto",class:e.class})}});function tr(e={}){let r=ref(null);return onMounted(()=>{if(!r.value)return;let n=gt(r.value,e);onUnmounted(()=>n.destroy());}),r}var nr=defineComponent({name:"ScrollText",props:{options:{type:Object},tag:{type:String,default:"p"}},setup(e,{slots:r}){let n=ref(null);return onMounted(()=>{if(!n.value)return;let t=gt(n.value,e.options??{});onUnmounted(()=>t.destroy());}),()=>h(e.tag,{ref:n},r.default?.())}});export{Qn as ScrollAnimate,Kn as ScrollCounter,Yn as ScrollDraw,nr as ScrollText,er as ScrollVideo,Xn as useScrollAnimate,Zn as useScrollCounter,Un as useScrollDraw,tr as useScrollText,Jn as useScrollVideo};