svg-scroll-draw 2.21.0 → 2.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +17 -15
  2. package/dist/angular/index.cjs +3 -3
  3. package/dist/angular/index.d.mts +1 -1
  4. package/dist/angular/index.d.ts +1 -1
  5. package/dist/angular/index.mjs +1 -1
  6. package/dist/aos/index.cjs +2 -2
  7. package/dist/aos/index.mjs +1 -1
  8. package/dist/aos/react/index.cjs +2 -2
  9. package/dist/aos/react/index.mjs +1 -1
  10. package/dist/astro/index.cjs +3 -3
  11. package/dist/astro/index.mjs +1 -1
  12. package/dist/cdn/aos.global.js +2 -2
  13. package/dist/cdn/scrollreveal.global.js +2 -2
  14. package/dist/cdn/svg-scroll-draw.dev.global.js +83 -29
  15. package/dist/cdn/svg-scroll-draw.global.js +3 -3
  16. package/dist/cdn/vivus.global.js +1 -1
  17. package/dist/chunk-2PYLM3E7.mjs +1 -0
  18. package/dist/chunk-DWK6XXY6.mjs +2 -0
  19. package/dist/chunk-DY5JCXVR.mjs +1 -0
  20. package/dist/chunk-EAWFBJUR.mjs +2 -0
  21. package/dist/{chunk-MTEGM4RR.mjs → chunk-GVBO5GRD.mjs} +1 -1
  22. package/dist/chunk-HX4SP5WN.mjs +3 -0
  23. package/dist/chunk-JCXMBI4G.mjs +2 -0
  24. package/dist/chunk-KV3WCPQ5.mjs +1 -0
  25. package/dist/chunk-LTCJVVSC.mjs +1 -0
  26. package/dist/{chunk-SMRTRZSD.mjs → chunk-OTDD2ROH.mjs} +1 -1
  27. package/dist/{chunk-MENZ5DS4.mjs → chunk-VMUJMXKO.mjs} +1 -1
  28. package/dist/chunk-WXUOF4NM.mjs +1 -0
  29. package/dist/chunk-YNNA33A5.mjs +2 -0
  30. package/dist/cinematic/index.cjs +2 -2
  31. package/dist/cinematic/index.mjs +1 -1
  32. package/dist/{engine-DQyBzZDl.d.ts → engine-B7UpB4fT.d.ts} +2 -1
  33. package/dist/{engine-P8u6OK4m.d.mts → engine-o1VSQ1lX.d.mts} +2 -1
  34. package/dist/group/index.cjs +3 -3
  35. package/dist/group/index.d.mts +2 -2
  36. package/dist/group/index.d.ts +2 -2
  37. package/dist/group/index.mjs +1 -1
  38. package/dist/horizontal/index.cjs +1 -1
  39. package/dist/horizontal/index.d.mts +2 -1
  40. package/dist/horizontal/index.d.ts +2 -1
  41. package/dist/horizontal/index.mjs +1 -1
  42. package/dist/{index-CMqK0GCT.d.mts → index-BY-CNE8c.d.mts} +1 -1
  43. package/dist/{index-DPqPEnO-.d.ts → index-DqXXiDIk.d.ts} +1 -1
  44. package/dist/index.cjs +4 -4
  45. package/dist/index.d.mts +2 -2
  46. package/dist/index.d.ts +2 -2
  47. package/dist/index.mjs +1 -1
  48. package/dist/nuxt/index.cjs +3 -3
  49. package/dist/nuxt/index.d.mts +1 -1
  50. package/dist/nuxt/index.d.ts +1 -1
  51. package/dist/nuxt/index.mjs +1 -1
  52. package/dist/react/index.cjs +3 -3
  53. package/dist/react/index.d.mts +1 -1
  54. package/dist/react/index.d.ts +1 -1
  55. package/dist/react/index.mjs +1 -1
  56. package/dist/reveal/index.cjs +1 -1
  57. package/dist/reveal/index.mjs +1 -1
  58. package/dist/scrollreveal/index.cjs +2 -2
  59. package/dist/scrollreveal/index.mjs +1 -1
  60. package/dist/scrollreveal/react/index.cjs +2 -2
  61. package/dist/scrollreveal/react/index.mjs +1 -1
  62. package/dist/snap/index.mjs +1 -1
  63. package/dist/solid/index.cjs +2 -2
  64. package/dist/solid/index.d.mts +1 -1
  65. package/dist/solid/index.d.ts +1 -1
  66. package/dist/solid/index.mjs +1 -1
  67. package/dist/svelte/index.cjs +3 -3
  68. package/dist/svelte/index.d.mts +1 -1
  69. package/dist/svelte/index.d.ts +1 -1
  70. package/dist/svelte/index.mjs +1 -1
  71. package/dist/text/index.cjs +1 -1
  72. package/dist/text/index.mjs +1 -1
  73. package/dist/timeline/index.mjs +1 -1
  74. package/dist/video/index.cjs +1 -1
  75. package/dist/video/index.mjs +1 -1
  76. package/dist/vivus/index.cjs +2 -2
  77. package/dist/vivus/index.d.mts +3 -0
  78. package/dist/vivus/index.d.ts +3 -0
  79. package/dist/vivus/index.mjs +1 -1
  80. package/dist/vivus/react/index.cjs +2 -2
  81. package/dist/vivus/react/index.mjs +1 -1
  82. package/dist/vue/index.cjs +3 -3
  83. package/dist/vue/index.d.mts +1 -1
  84. package/dist/vue/index.d.ts +1 -1
  85. package/dist/vue/index.mjs +1 -1
  86. package/dist/web-component/index.cjs +3 -3
  87. package/dist/web-component/index.mjs +1 -1
  88. package/package.json +1 -1
  89. package/dist/chunk-426RAN5I.mjs +0 -1
  90. package/dist/chunk-4T5R3ZTL.mjs +0 -2
  91. package/dist/chunk-7SBTYJGH.mjs +0 -1
  92. package/dist/chunk-BFX2CSQ3.mjs +0 -1
  93. package/dist/chunk-ENACACPZ.mjs +0 -3
  94. package/dist/chunk-KGAJQP2N.mjs +0 -2
  95. package/dist/chunk-KHQ7OGQK.mjs +0 -1
  96. package/dist/chunk-OMI46IXL.mjs +0 -2
  97. package/dist/chunk-WQZKXAXK.mjs +0 -2
@@ -1,3 +1,3 @@
1
- 'use strict';var vue=require('vue');function bn({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,r)),s=Math.sqrt(t),i=0,l=[];for(let p=0;p<n;p++){let E=Math.pow(s,p);l.push(E),i+=E;}let u=[0],f=0;for(let p=0;p<n;p++)f+=l[p]/i,u.push(f);return p=>{if(p<=0)return 0;if(p>=1)return 1;for(let E=0;E<n;E++)if(p<=u[E+1]){let N=(p-u[E])/(u[E+1]-u[E]);if(E===0)return N*(2-N);let $=1-Math.pow(t,E);return $+(1-$)*(2*N-1)*(2*N-1)}return 1}}function wn({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),t=Math.max(.1,r),s=n<=1?t/4:t/(2*Math.PI)*Math.asin(1/n);return i=>i<=0?0:i>=1?1:n*Math.pow(2,-10*i)*Math.sin((i-s)*(2*Math.PI)/t)+1}var le={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:bn(),elastic:wn()};function Vt(e,r,n){return Math.min(n,Math.max(r,e))}function he(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 zt(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 _t(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 re(e,r,n,t){return n===r?0:Vt((e-r)/(n-r)*t,0,1)}function $e(e,r,n,t,s){let i=zt(e.top,e.height,r,t.element)-_t(t.viewport,n),l=zt(e.top,e.height,r,s.element)-_t(s.viewport,n);return {tStart:i,tEnd:l}}function lt(e,r,n){let t=e.getBoundingClientRect(),s=n==="x"?t.width:t.height;return r?{top:n==="x"?t.left-r.getBoundingClientRect().left+r.scrollLeft:t.top-r.getBoundingClientRect().top+r.scrollTop,height:s,scroll:0}:{top:n==="x"?t.left:t.top,height:s,scroll:n==="x"?window.scrollX:window.scrollY}}function Ue(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){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 Ye(e,r,n){let t=Bt(e),s=Bt(r);return !t||!s?e:`rgb(${Math.round(t[0]+(s[0]-t[0])*n)},${Math.round(t[1]+(s[1]-t[1])*n)},${Math.round(t[2]+(s[2]-t[2])*n)})`}var Wt={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 Qe=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function be(e,...r){Qe&&console.warn(`[svg-scroll-draw] ${e}`,...r);}var vn="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Sn="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",qt=33;function En(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Tn(e){let r=[];for(let n=0;n<qt;n++){let t=n/(qt-1);r.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${r.join(",")})`}function ct(e){switch(e){case "linear":return "linear";case "ease-in":return vn;case "ease-out":return Sn;case "ease-in-out":return En()?Tn(le["ease-in-out"]):null;default:return null}}var Gt=Symbol.for("svg-scroll-draw.registry");function jt(){let e=globalThis;return e[Gt]||(e[Gt]=new Map)}function ke(e,r){jt().set(e,r);}function Re(e){jt().delete(e);}var Ze,ut=new Set,mt=new WeakMap,Je=new Map,Ut=e=>{let r=e.getBoundingClientRect();return r.width+" "+r.height};function xn(e){let r=new Set;for(let n of e)for(;n&&n!==document.body;n=n.parentElement)for(let t=n;t;t=t.previousElementSibling)r.add(t);return r}function Ie(e,r){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>r();Ze??(Ze=new ResizeObserver(s=>{let i=false;for(let{target:l}of s)mt.get(l)!==Ut(l)&&(i=true),mt.set(l,"");i&&ut.forEach(l=>l());})),ut.add(n);let t=xn(e);return [document.body,document.documentElement].forEach(s=>s&&t.add(s)),t.forEach(s=>{mt.has(s)||mt.set(s,Ut(s)),Je.set(s,(Je.get(s)??0)+1),Ze.observe(s);}),()=>{ut.delete(n)&&(t.forEach(s=>{let i=(Je.get(s)??1)-1;if(i)return void Je.set(s,i);Je.delete(s),Ze?.unobserve(s);}),ut.size||(Ze?.disconnect(),Ze=void 0));}}var Mn=0;function An(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Yt(e,r){let n="";try{n=getComputedStyle(e).getPropertyValue(r).trim();}catch{}return n||(e.getAttribute(r)??"").trim()}var Xt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function Ln(e){if(!Qe)return;let r=Yt(e,"stroke");if(!r||r==="none"){be("Element has no stroke \u2014 path will not be visible.",e);return}let n=(e.getAttribute("fill")??"").trim();n&&!Xt.has(n)&&!Xt.has(Yt(e,"fill"))&&be("Element has a fill \u2014 it may obscure the stroke animation.",e);}function Cn(e,r,n){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function s(){let i=n==="x"?window.scrollX:window.scrollY,l=e-i,u=r-i,f=n==="x";t.innerHTML=`
2
- <div style="position:absolute;${f?`left:${l}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${l}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
- <div style="position:absolute;${f?`left:${u}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${u}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",s,{passive:true}),s(),{el:t,destroy(){window.removeEventListener("scroll",s),t.remove();}}}var Kt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Qt=/[MmLlHhVvCcSsQqTtAaZz]/g;function $n(e,r,n){if(!Qe)return;let t=(e.match(Qt)??[]).join("").toUpperCase(),s=(r.match(Qt)??[]).join("").toUpperCase(),i=(e.match(Kt)??[]).length,l=(r.match(Kt)??[]).length;if(t!==s){be(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${s||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,n);return}i!==l&&be(`morphTo: coordinate count differs (${i} \u2192 ${l}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,n);}function bt(e,r,n){let t=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),s=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,i=>{let l=parseFloat(i),u=t[s++]??l;return String(+(l+(u-l)*n).toFixed(4))})}function wt(e,r={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:n,...t}=r,s=n?{...Wt[n],...t}:t,i=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:l="path, polyline, line, polygon, rect, circle",speed:u=1,fade:f=false,easing:p="linear",trigger:E={},stagger:N=0,direction:$="forward",once:oe=false,debug:Pe=false,axis:G="y",scrollContainer:Ae,autoReverse:H=false,delay:Y=0,strokeColor:X,strokeWidth:L,fillOpacity:R,waypoints:T,velocityScale:C=false,threshold:P=0,rootMargin:x="0px",repeat:w=0,repeatDelay:K=0,morphTo:M,clip:te,autoplay:xe=false,duration:we=1e3,native:ce=true,onProgress:W,onStart:D,onComplete:m,onEnter:k,onLeave:v,onEnterBack:A,onLeaveBack:ue}=s,y=te===true?"left":typeof te=="string"?te:false,V=typeof p=="function"?p:le[p]??le.linear,me=he(E.start??"top bottom"),He=he(E.end??"bottom top"),ve=typeof Ae=="string"?document.querySelector(Ae):Ae??null,Me=Array.isArray(X)?X[0]:null,fe=Array.isArray(X)?X[1]:typeof X=="string"?X:null,Q=Array.isArray(L)?L[0]:null,se=Array.isArray(L)?L[1]:typeof L=="number"?L:null,ie=Array.isArray(R)?R[0]:null,Z=Array.isArray(R)?R[1]:typeof R=="number"?R:null;function Ve(o){let a=o*100;switch(y){case "right":return `inset(0 0 0 ${100-a}%)`;case "top":return `inset(0 0 ${100-a}% 0)`;case "bottom":return `inset(${100-a}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-a}% 0 0)`}}let z=y?[]:Array.from(e.querySelectorAll(l)),I=[],pe=[],ne=0,Se=0,c=N,h=0,_=false,q=false,O=0,de=false,ye=-1,ze=[],ae=-1,j=false,Ee=0,_e=0,Be,ft=null;function Pt(){ft?.destroy(),ft=null;}let We=new Set,Ot=NaN,qe=true,rt=-1,kt=performance.now(),Ge=NaN;function Xe(){return ve?G==="x"?ve.scrollLeft:ve.scrollTop:G==="x"?window.scrollX:window.scrollY}function Rt(){return ve?G==="x"?ve.clientWidth:ve.clientHeight:G==="x"?window.innerWidth:window.innerHeight}function Dt(){let o=lt(e,ve,G);return $e(o,o.scroll,Rt(),me,He)}function fn(){let o=Se-ne,a=z.length-1,g=ve??document.documentElement,J=G==="x"?"Width":"Height";if(c=N,N>0&&a>0&&o>0){let Le=g[`scroll${J}`]-g[`client${J}`]-1-ne-o/u;Le>=0&&(c=Math.min(N,Le/(a*o)));}h=Se+a*c*o;}function It(){(({tStart:ne,tEnd:Se}=Dt())),fn(),Pe&&Qe&&(Pt(),ft=Cn(ne,Se,G));}function pt(o,a=Dt){ke(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:a});let g=o.destroy;return o.destroy=()=>{g.call(o),Re(e);},o}function pn(o,a){if(e.style.setProperty("--scroll-draw-progress",String(o)),y){let g=a==="reverse"?1-o:o;e.style.clipPath=Ve(g);return}z.forEach((g,J)=>{g.style.strokeDashoffset=a==="reverse"?`${I[J]*o}`:`${I[J]*(1-o)}`,f&&(g.style.opacity=a==="reverse"?`${1-o}`:`${o}`),Me&&fe?g.style.stroke=Ye(Me,fe,o):fe&&(g.style.stroke=fe),Q!==null&&se!==null?g.style.strokeWidth=`${Q+(se-Q)*o}`:se!==null&&(g.style.strokeWidth=`${se}`),ie!==null&&Z!==null?g.style.fillOpacity=`${ie+(Z-ie)*o}`:Z!==null&&(g.style.fillOpacity=`${Z}`),M&&g.tagName.toLowerCase()==="path"&&pe[J]&&g.setAttribute("d",bt(pe[J],M,o));});}function ot(){if(e.style.setProperty("--scroll-draw-progress","0"),y){e.style.clipPath=Ve(0);return}z.forEach((o,a)=>{o.style.strokeDasharray=`${I[a]}`,o.style.strokeDashoffset=$==="reverse"?"0":`${I[a]}`,f?o.style.opacity=$==="reverse"?"1":"0":o.style.opacity="",Me&&(o.style.stroke=Me),Q!==null&&(o.style.strokeWidth=`${Q}`),ie!==null&&(o.style.fillOpacity=`${ie}`),M&&o.tagName.toLowerCase()==="path"&&pe[a]&&o.setAttribute("d",pe[a]);});}if(z.forEach(o=>{Ln(o);let a=Ue(o);I.push(a);let g=o.tagName.toLowerCase()==="path";g?pe.push(o.getAttribute("d")??""):pe.push(""),M&&(g?$n(pe[pe.length-1],M,o):be(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),i?(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=$==="reverse"?`${a}`:"0",f&&(o.style.opacity="1"),fe&&(o.style.stroke=fe),se!==null&&(o.style.strokeWidth=`${se}`),Z!==null&&(o.style.fillOpacity=`${Z}`),M&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",M)):(o.style.strokeDasharray=`${a}`,o.style.strokeDashoffset=$==="reverse"?"0":`${a}`,f?o.style.opacity=$==="reverse"?"1":"0":o.style.opacity="",Me&&(o.style.stroke=Me),Q!==null&&(o.style.strokeWidth=`${Q}`),ie!==null&&(o.style.fillOpacity=`${ie}`));}),y){if(i)return e.style.clipPath=Ve(1),m?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Ve(0);}else if(i)return m?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Ft=typeof p=="string"?ct(p):null;function dn(){return !(ce===false||!An()||!z.length||!Ft||y||G!=="y"||ve||u!==1||N!==0||oe||H||C!==false||M||T||w||Y>0||W||D||m||k||v||A||ue||X!=null||L!=null||R!=null||(E.start??"top bottom").trim()!=="top bottom"||(E.end??"bottom top").trim()!=="bottom top")}function gn(){let o=++Mn,a=`svg-scroll-draw-${o}`,g=`svg-scroll-draw-host-${o}`,J=`--svg-scroll-draw-${o}`,Le=$==="reverse"?"0":"var(--ssd-len)",De=$==="reverse"?"var(--ssd-len)":"0",Oe=`stroke-dashoffset:${Le};`,S=`stroke-dashoffset:${De};`;f&&(Oe+=`opacity:${$==="reverse"?1:0};`,S+=`opacity:${$==="reverse"?0:1};`);let F=document.createElement("style");F.setAttribute("data-svg-scroll-draw",""),F.textContent=`@keyframes ${a}{from{${Oe}}to{${S}}}.${g}{view-timeline-name:${J};view-timeline-axis:block;}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${Ft};animation-fill-mode:both;animation-timeline:${J};animation-range:cover 0% cover 100%;}`,document.head.appendChild(F),e.classList.add(g);function ge(d,ee){d.style.setProperty("--ssd-len",String(I[ee])),d.style.strokeDasharray=`${I[ee]}`,d.style.strokeDashoffset="",d.style.opacity="",d.style.animationPlayState="",d.classList.add(a);}z.forEach(ge);let b=false,B=-1;function U(){if(B>=0)return B;let d=e.getBoundingClientRect(),{tStart:ee,tEnd:Ce}=$e({top:d.top,height:d.height},Xe(),Rt(),me,He);return V(re(Xe(),ee,Ce,u))}return {destroy(){e.classList.remove(g),z.forEach(d=>{d.classList.remove(a),d.style.removeProperty("--ssd-len"),d.style.animationPlayState="";}),F.remove();},replay(){b=false,B=-1,z.forEach(ge);},pause(){b=true,z.forEach(d=>{d.style.animationPlayState="paused";});},resume(){b&&(b=false,z.forEach(d=>{d.style.animationPlayState="running";}));},seek(d){let ee=Math.min(1,Math.max(0,d));B=ee,b=true,z.forEach((Ce,Te)=>{Ce.classList.remove(a),Ce.style.strokeDashoffset=$==="reverse"?`${I[Te]*ee}`:`${I[Te]*(1-ee)}`,f&&(Ce.style.opacity=$==="reverse"?`${1-ee}`:`${ee}`);});},getProgress(){return U()},refresh(){z.forEach((d,ee)=>{I[ee]=Ue(d),d.style.setProperty("--ssd-len",String(I[ee])),d.style.strokeDasharray=`${I[ee]}`;});}}}if(dn())return pt(gn());function yn(){let o=Math.max(1,we),a=0,g=0,J=false;function Le(b){let B=true;if(y){let U=Math.min(1,Math.max(0,b/o)),d=V(U);Ee=d,e.style.setProperty("--scroll-draw-progress",String(d)),e.style.clipPath=Ve($==="reverse"?1-d:d),W?.(d),U<1&&(B=false);}else z.forEach((U,d)=>{let ee=d*N*o,Ce=Math.min(1,Math.max(0,(b-ee)/o)),Te=V(Ce);U.style.strokeDashoffset=$==="reverse"?`${I[d]*Te}`:`${I[d]*(1-Te)}`,f&&(U.style.opacity=$==="reverse"?`${1-Te}`:`${Te}`),Me&&fe?U.style.stroke=Ye(Me,fe,Te):fe&&(U.style.stroke=fe),Q!==null&&se!==null?U.style.strokeWidth=`${Q+(se-Q)*Te}`:se!==null&&(U.style.strokeWidth=`${se}`),ie!==null&&Z!==null?U.style.fillOpacity=`${ie+(Z-ie)*Te}`:Z!==null&&(U.style.fillOpacity=`${Z}`),M&&U.tagName.toLowerCase()==="path"&&pe[d]&&U.setAttribute("d",bt(pe[d],M,Te)),d===0&&(Ee=Te,W?.(Te),e.style.setProperty("--scroll-draw-progress",String(Te))),Ce<1&&(B=false);});if(T){let U=Math.min(1,Math.max(0,b/o)),d=V(U);for(let ee in T){let Ce=parseFloat(ee);d>=Ce&&!We.has(Ce)&&(We.add(Ce),T[ee]?.());}}return B}function De(b){if(j)return;let B=b-a;q||(q=true,D?.());let U=Le(B);if(U&&!_){_=true,Le(o*(1+Math.max(0,z.length-1)*N)),m?.(),_e<(w==="infinite"?1/0:w??0)&&(_e++,Be=setTimeout(()=>{a=performance.now(),q=false,_=false,We.clear(),ot(),O=requestAnimationFrame(De);},K));return}U||(O=requestAnimationFrame(De));}function Oe(){cancelAnimationFrame(O),clearTimeout(Be),a=performance.now(),g=0,j=false,q=false,_=false,_e=0,J=true,Ee=0,We.clear(),ot(),O=requestAnimationFrame(De);}let S=new IntersectionObserver(b=>{b.forEach(B=>{B.isIntersecting&&!(oe&&_)?Oe():!B.isIntersecting&&!oe&&!_&&(cancelAnimationFrame(O),clearTimeout(Be),J=false);});},{root:ve??null,threshold:P,rootMargin:x}),F;function ge(){clearTimeout(F),F=setTimeout(()=>{z.forEach((b,B)=>{I[B]=Ue(b),b.style.strokeDasharray=`${I[B]}`;});},150);}return window.addEventListener("resize",ge),window.addEventListener("orientationchange",ge),Y>0?setTimeout(()=>S.observe(e),Y):S.observe(e),{destroy(){cancelAnimationFrame(O),clearTimeout(Be),S.disconnect(),window.removeEventListener("resize",ge),window.removeEventListener("orientationchange",ge),clearTimeout(F);},replay(){_e=0,Oe();},pause(){j||!J||(j=true,g=performance.now()-a,cancelAnimationFrame(O));},resume(){j&&(j=false,J=true,a=performance.now()-g,O=requestAnimationFrame(De));},seek(b){let B=Math.min(1,Math.max(0,b));Ee=B,j=true,g=B*o,a=performance.now()-g,cancelAnimationFrame(O),Le(g);},getProgress(){return Ee},refresh(){clearTimeout(F),z.forEach((b,B)=>{I[B]=Ue(b),b.style.strokeDasharray=`${I[B]}`;});}}}if(xe)return pt(yn());It();function Nt(){if(j||!je)return;let o=performance.now(),a=Xe();if(!qe&&C===false&&a===Ot){gt(a);return}qe=false,Ot=a;let g=u;if(C!==false){let S=o-kt,F=S>0?Math.abs(a-(rt<0?a:rt))/S:0;g=u*Math.max(.2,1+F*(typeof C=="number"?C:1)*.04);}rt=a,kt=o;let J=H?ae===-1||a>=ae?"forward":"reverse":$;ae=a;let Le=Se-ne,De=true,Oe=Le===0?0:(a-ne)/Le;if(isNaN(Ge)||(Ge<=0&&Oe>0?k?.():Ge>0&&Oe<=0&&ue?.(),Ge<1&&Oe>=1?v?.():Ge>=1&&Oe<1&&A?.()),Ge=Oe,y){let S=V(re(a,ne,Se,g));oe&&!H&&(ye=Math.max(ye,S),S=ye),Ee=S,e.style.setProperty("--scroll-draw-progress",String(S));let F=J==="reverse"?1-S:S;e.style.clipPath=Ve(F),W?.(S),!q&&re(a,ne,Se,g)>0&&(q=true,D?.()),S>=1&&!_?(_=true,m?.(),_e<(w==="infinite"?1/0:w??0)&&(_e++,Be=setTimeout(()=>{ye=-1,q=false,_=false,e.style.clipPath=Ve(0);},K))):S<1&&!oe&&(_=false),gt(a);return}if(z.forEach((S,F)=>{let ge=F*c*Le,b=V(re(a,ne+ge,Se+ge,g));oe&&!H&&(b=ze[F]=Math.max(ze[F]??ye,b)),S.style.strokeDashoffset=J==="reverse"?`${I[F]*b}`:`${I[F]*(1-b)}`,f&&(S.style.opacity=J==="reverse"?`${1-b}`:`${b}`),Me&&fe?S.style.stroke=Ye(Me,fe,b):fe&&(S.style.stroke=fe),Q!==null&&se!==null?S.style.strokeWidth=`${Q+(se-Q)*b}`:se!==null&&(S.style.strokeWidth=`${se}`),ie!==null&&Z!==null?S.style.fillOpacity=`${ie+(Z-ie)*b}`:Z!==null&&(S.style.fillOpacity=`${Z}`),M&&S.tagName.toLowerCase()==="path"&&pe[F]&&S.setAttribute("d",bt(pe[F],M,b)),F===0&&(Ee=b,W?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(De=false);}),T){let S=V(re(a,ne,Se,g));for(let F in T){let ge=parseFloat(F);S>=ge&&!We.has(ge)&&(We.add(ge),T[F]?.());}}!q&&re(a,ne,Se,g)>0&&(q=true,D?.()),De&&!_?(_=true,m?.(),_e<(w==="infinite"?1/0:w??0)&&(_e++,Be=setTimeout(()=>{ye=-1,ze=[],q=false,_=false,We.clear(),ot(),qe=true;},K))):!De&&!oe&&(_=false),gt(a);}function dt(o){return o>=Se&&o<h}function gt(o){de||dt(o)?O=requestAnimationFrame(Nt):je=false;}function yt(){return de||dt(Xe())}let je=false;function st(){je||(je=true,O=requestAnimationFrame(function(){Nt();}));}function it(){je=false,cancelAnimationFrame(O);}let ht=new IntersectionObserver(o=>{o.forEach(a=>{de=a.isIntersecting,de&&!j?(qe=true,st()):je&&!j&&dt(Xe())||it();});},{root:ve??null,threshold:P,rootMargin:x});function Ht(){z.forEach((o,a)=>{I[a]=Ue(o),o.style.strokeDasharray=`${I[a]}`;}),It(),qe=true;}let at;function Ke(){clearTimeout(at),at=setTimeout(Ht,150);}window.addEventListener("resize",Ke),window.addEventListener("orientationchange",Ke);let hn=Ie([e],Ke);return Y>0?setTimeout(()=>ht.observe(e),Y):ht.observe(e),pt({destroy(){cancelAnimationFrame(O),clearTimeout(Be),it(),ht.disconnect(),hn(),window.removeEventListener("resize",Ke),window.removeEventListener("orientationchange",Ke),clearTimeout(at),Pt();},replay(){ye=-1,ze=[],ae=-1,rt=-1,q=false,_=false,_e=0,j=false,Ee=0,We.clear(),clearTimeout(Be),ot(),qe=true,yt()&&st();},pause(){j=true,it();},resume(){j&&(j=false,qe=true,yt()&&st());},seek(o){let a=Math.min(1,Math.max(0,o));Ee=a,ye=a,ze=[],j=true,it(),pn(a,$),qe=true;},getProgress(){return Ee},refresh(){clearTimeout(at),Ht(),yt()&&!j&&st();}},()=>({tStart:ne,tEnd:Se}))}var Zt=new WeakMap,Pn=0;function Jt(e){return JSON.stringify(e,(r,n)=>{if(typeof n=="function")return "\u0192";if(typeof Element<"u"&&n instanceof Element){let t=Zt.get(n);return t===void 0&&Zt.set(n,t=++Pn),`el#${t}`}return n})}function en(e,r){let n={...e};for(let t of Object.keys(n))typeof n[t]=="function"&&(n[t]=(...s)=>r()[t]?.(...s));return n}function On(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function tn(e){let r=[],n=/([\w]+)\(([^)]*)\)/g,t;for(;(t=n.exec(e))!==null;){let s=[],i=[],l=t[2].trim();if(l)for(let u of l.split(/[\s,]+/)){let f=u.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(f?parseFloat(f[1]):0),i.push(f?f[2]:"");}r.push({fn:t[1],nums:s,units:i});}return r}function kn(e,r,n){let t=tn(e),s=tn(r);return t.length===0||t.length!==s.length?n<1?e:r:t.map((i,l)=>{let u=s[l];return i.fn!==u.fn||i.nums.length!==u.nums.length?n<1?`${i.fn}(${i.nums.map((f,p)=>`${f}${i.units[p]}`).join(", ")})`:`${u.fn}(${u.nums.map((f,p)=>`${f}${u.units[p]}`).join(", ")})`:`${i.fn}(${i.nums.map((f,p)=>`${f+(u.nums[p]-f)*n}${i.units[p]}`).join(", ")})`}).join(" ")}function nn(e,r,n){if(typeof e=="number"&&typeof r=="number")return String(e+(r-e)*n);let t=String(e),s=String(r);if(On(t))return Ye(t,s,n);if(t.includes("("))return kn(t,s,n);let i=t.match(/^([-+]?[\d.]+)(.*)$/),l=s.match(/^([-+]?[\d.]+)(.*)$/);if(i&&l){let u=parseFloat(i[1]),f=parseFloat(l[1]);return `${u+(f-u)*n}${i[2]||l[2]}`}return n<1?t:s}function Rn(e){return e.replace(/([A-Z])/g,r=>`-${r.toLowerCase()}`)}var Dn=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),In=0,rn="--scroll-draw-progress";function Fn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function vt(e,r){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let{props:t,trigger:s={},easing:i="ease-out",speed:l=1,once:u=false,axis:f="y",scrollContainer:p,native:E=true,velocityScale:N=false,respectReducedMotion:$=true,triggerElement:oe,onProgress:Pe,onComplete:G,onEnter:Ae,onLeave:H,onEnterBack:Y,onLeaveBack:X}=r,L=$&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,R=typeof i=="function"?i:le[i]??le["ease-out"],T=he(s.start??"top bottom"),C=he(s.end??"bottom top"),P=oe??e,x=typeof p=="string"?document.querySelector(p):p??null,w=Object.entries(t).map(([c,h])=>({prop:Rn(c),from:Array.isArray(h)?h[0]:"",to:Array.isArray(h)?h[1]:h}));function K(){let c=window.getComputedStyle(e);for(let h of w)h.from===""&&(h.from=c.getPropertyValue(h.prop).trim()||"0");}function M(){for(let c of w)e.style.setProperty(c.prop,String(c.to));}let te=new Map;for(let c of [...w.map(h=>h.prop),rn])te.set(c,e.style.getPropertyValue(c));function xe(){for(let[c,h]of te)h?e.style.setProperty(c,h):e.style.removeProperty(c);}if(L)return M(),G?.(),{...n,destroy:xe,getProgress:()=>1};K();let we=typeof i=="string"?ct(i):null;function ce(){if(!E||!Fn()||!we||f!=="y"||x||P!==e||u||l!==1||Pe||G||Ae||H||Y||X||N!==false||(s.start??"top bottom").trim()!=="top bottom"||(s.end??"bottom top").trim()!=="bottom top")return false;for(let c of w)if(!Dn.has(c.prop))return false;return true}function W(){let c=`ssd-a-${++In}`,h=w.map(ae=>`${ae.prop}:${ae.from}`).join(";"),_=w.map(ae=>`${ae.prop}:${ae.to}`).join(";"),q=document.createElement("style");q.setAttribute("data-ssd-animate",""),q.textContent=`@keyframes ${c}{from{${h}}to{${_}}}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${we};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(q),e.classList.add(c);let O=()=>f==="x"?window.scrollX:window.scrollY,de=()=>f==="x"?window.innerWidth:window.innerHeight,ye=()=>{let ae=e.getBoundingClientRect();return $e({top:ae.top,height:ae.height},O(),de(),T,C)};ke(e,{type:"animate",getProgress:()=>ze.getProgress(),getTrigger:ye});let ze={refresh(){},destroy(){e.classList.remove(c),q.remove(),e.style.animationPlayState="",xe(),Re(e);},replay(){e.classList.remove(c),e.offsetWidth,e.classList.add(c);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(ae){let j=Math.min(1,Math.max(0,ae));e.classList.remove(c);for(let Ee of w)e.style.setProperty(Ee.prop,nn(Ee.from,Ee.to,j));},getProgress(){let{tStart:ae,tEnd:j}=ye();return R(re(O(),ae,j,l))}};return ze}if(ce())return W();let D=0,m=0,k=0,v=false,A=false,ue=-1,y=0,V=false,me=NaN,He=-1,ve=0,Me=()=>x?f==="x"?x.scrollLeft:x.scrollTop:f==="x"?window.scrollX:window.scrollY,fe=()=>x?f==="x"?x.clientWidth:x.clientHeight:f==="x"?window.innerWidth:window.innerHeight,Q=P===e?w:[],se=false;function ie(){let c=e.style,h=Q.map(de=>c.getPropertyValue(de.prop)),_=c.transition;Q.length&&(c.transition="none"),Q.forEach(de=>c.setProperty(de.prop,te.get(de.prop)??""));let q=lt(P,x,f);Q.forEach((de,ye)=>c.setProperty(de.prop,h[ye])),Q.length&&(e.offsetWidth,c.transition=_);let O=$e(q,q.scroll,fe(),T,C);se&&Math.abs(O.tStart-D)<1&&Math.abs(O.tEnd-m)<1||(se=true,D=O.tStart,m=O.tEnd);}function Z(c){e.style.setProperty(rn,String(c));for(let h of w)e.style.setProperty(h.prop,nn(h.from,h.to,c));Pe?.(c);}function Ve(c){if(isNaN(me)){me=c;return}me<=0&&c>0?Ae?.():me>0&&c<=0&&X?.(),me<1&&c>=1?H?.():me>=1&&c<1&&Y?.(),me=c;}function z(){if(!v||A)return;let c=performance.now(),h=Me(),_=l;if(N!==false){let de=c-ve,ye=de>0?Math.abs(h-(He<0?h:He))/de:0;_=l*Math.max(.2,1+ye*(typeof N=="number"?N:1)*.04);}He=h,ve=c;let q=m===D?0:(h-D)/(m-D);Ve(q);let O=R(re(h,D,m,_));u&&(ue=Math.max(ue,O),O=ue),y=O,Z(O),O>=1&&!V?(V=true,G?.()):O<1&&!u&&(V=false),k=requestAnimationFrame(z);}ie(),m===D&&be("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let c=R(re(Me(),D,m,l));u&&c>0&&(ue=c),y=c,Z(c);}let I=new IntersectionObserver(c=>{c.forEach(h=>{v=h.isIntersecting,v&&!A?k=requestAnimationFrame(z):cancelAnimationFrame(k);});},{root:x??null}),pe;function ne(){clearTimeout(pe),pe=setTimeout(ie,150);}window.addEventListener("resize",ne),window.addEventListener("orientationchange",ne);let Se=Ie([P],ne);return I.observe(e),ke(e,{type:"animate",getProgress:()=>y,getTrigger:()=>({tStart:D,tEnd:m})}),{destroy(){cancelAnimationFrame(k),I.disconnect(),window.removeEventListener("resize",ne),window.removeEventListener("orientationchange",ne),Se(),clearTimeout(pe),xe(),Re(e);},replay(){ue=-1,V=false,y=0,A=false,Z(0);},pause(){A=true,cancelAnimationFrame(k);},resume(){A&&(A=false,v&&(k=requestAnimationFrame(z)));},seek(c){let h=Math.min(1,Math.max(0,c));y=h,ue=h,A=true,cancelAnimationFrame(k),Z(h);},getProgress(){return y},refresh(){ie();}}}var St={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Et(e,r){if(typeof window>"u")return St;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return be("scrollCounter: element not found:",e),St;let t=n,{from:s=0,to:i,format:l,easing:u="ease-out",trigger:f={},once:p=true,decimals:E,onComplete:N}=r,$=E!==void 0?m=>m.toFixed(E):l??(m=>String(Math.round(m))),oe=typeof u=="function"?u:le[u]??le["ease-out"],Pe=he(f.start??"top 80%"),G=he(f.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=$(i),N?.(),St;let H=0,Y=0,X=false,L=0,R=false,T=false,C=-1,P=0,x=false,w=()=>window.scrollY,K=()=>window.innerHeight;function M(){let m=t.getBoundingClientRect(),k=$e({top:m.top,height:m.height},w(),K(),Pe,G);X&&Math.abs(k.tStart-H)<1&&Math.abs(k.tEnd-Y)<1||(X=true,H=k.tStart,Y=k.tEnd);}function te(m){t.textContent=$(s+(i-s)*m),t.style.setProperty("--scroll-draw-progress",String(m));}function xe(){if(!R||T)return;let m=oe(re(w(),H,Y,1));p&&(C=Math.max(C,m),m=C),P=m,te(m),m>=1&&!x?(x=true,N?.()):m<1&&!p&&(x=false),L=requestAnimationFrame(xe);}M();{let m=oe(re(w(),H,Y,1));p&&m>0&&(C=m),P=m,te(m);}let we=new IntersectionObserver(m=>{m.forEach(k=>{R=k.isIntersecting,R&&!T?L=requestAnimationFrame(xe):cancelAnimationFrame(L);});}),ce;function W(){clearTimeout(ce),ce=setTimeout(M,150);}window.addEventListener("resize",W),window.addEventListener("orientationchange",W);let D=Ie([t],W);return we.observe(t),ke(t,{type:"counter",getProgress:()=>P,getTrigger:()=>({tStart:H,tEnd:Y})}),{destroy(){cancelAnimationFrame(L),we.disconnect(),window.removeEventListener("resize",W),window.removeEventListener("orientationchange",W),D(),clearTimeout(ce),Re(t);},replay(){C=-1,x=false,P=0,T=false,te(0);},pause(){T=true,cancelAnimationFrame(L);},resume(){T&&(T=false,R&&(L=requestAnimationFrame(xe)));},seek(m){let k=Math.min(1,Math.max(0,m));P=k,C=k,T=true,cancelAnimationFrame(L),te(k);},getProgress(){return P}}}var on={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Tt(e,r={}){if(typeof window>"u")return on;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return be("scrollVideo: <video> element not found:",e),on;let t=n,{trigger:s={},easing:i="linear",once:l=false,axis:u="y",preload:f="auto",triggerElement:p,onReady:E,onComplete:N,onProgress:$}=r,oe=p??t,Pe=window.matchMedia("(prefers-reduced-motion: reduce)").matches,G=typeof i=="function"?i:le[i]??le.linear,Ae=he(s.start??"top top"),H=he(s.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=f);let Y=r.from??0,X=r.to,L=0,R=0,T=0,C=false,P=false,x=-1,w=0,K=false,M=false,te=()=>u==="x"?window.scrollX:window.scrollY,xe=()=>u==="x"?window.innerWidth:window.innerHeight;function we(){let y=oe.getBoundingClientRect(),V=u==="x"?y.left:y.top,me=u==="x"?y.width:y.height,He=$e({top:V,height:me},te(),xe(),Ae,H);L=He.tStart,R=He.tEnd,M&&R===L&&be("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t);}let ce=NaN;function W(y){if(!M)return;let V=X??t.duration??0,me=Y+(V-Y)*y;me!==ce&&(ce=me,t.currentTime=me),t.style.setProperty("--scroll-draw-progress",String(y)),$?.(y);}function D(){if(!C||P||!M||Pe)return;let y=G(re(te(),L,R,1));l&&(x=Math.max(x,y),y=x),w=y,W(y),y>=1&&!K?(K=true,N?.()):y<1&&!l&&(K=false),T=requestAnimationFrame(D);}function m(){if(M=true,X===void 0&&(X=t.duration),Pe){W(1),E?.();return}we(),E?.(),C&&!P&&(T=requestAnimationFrame(D));}t.readyState>=1?m():t.addEventListener("loadedmetadata",m,{once:true}),M||we();let k=new IntersectionObserver(y=>{y.forEach(V=>{C=V.isIntersecting,C&&!P&&M?T=requestAnimationFrame(D):cancelAnimationFrame(T);});}),v;function A(){clearTimeout(v),v=setTimeout(we,150);}window.addEventListener("resize",A),window.addEventListener("orientationchange",A);let ue=Ie([oe],A);return k.observe(t),ke(t,{type:"video",getProgress:()=>w,getTrigger:()=>({tStart:L,tEnd:R})}),{destroy(){cancelAnimationFrame(T),k.disconnect(),t.removeEventListener("loadedmetadata",m),window.removeEventListener("resize",A),window.removeEventListener("orientationchange",A),ue(),clearTimeout(v),Re(t);},replay(){x=-1,K=false,w=0,P=false,ce=NaN,W(0);},pause(){P=true,cancelAnimationFrame(T);},resume(){P&&(P=false,C&&M&&(T=requestAnimationFrame(D)));},seek(y){let V=Math.min(1,Math.max(0,y));w=V,x=V,P=true,cancelAnimationFrame(T),ce=NaN,W(V);},getProgress(){return w}}}function sn(e,r){let n=document.createElement("span");n.textContent=r,n.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;user-select:none",e.appendChild(n);}function cn(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 Nn(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 an(e){let r=cn(e),n=new Map;for(let i of r){let l=i.offsetTop;n.has(l)||n.set(l,[]),n.get(l).push(i);}let t=[],s=Array.from(n.keys()).sort((i,l)=>i-l);for(let i of s){let l=n.get(i),u=document.createElement("span");u.setAttribute("aria-hidden","true"),u.style.display="inline-block",l.forEach((f,p)=>{let E=f.nextElementSibling;u.appendChild(f),p<l.length-1&&E&&E.style.whiteSpace==="pre"&&u.appendChild(E);}),t.push(u);}return e.textContent="",t.forEach((i,l)=>{e.appendChild(i),l<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function Hn(e,r,n,t){if(n<=1||t===0)return e;let s=(n-1)*t,i=r*t,l=i+(1-s);return l<=i?e>=i?1:0:Math.min(1,Math.max(0,(e-i)/(l-i)))}function Vn(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 ln={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function xt(e,r={}){if(typeof window>"u")return ln;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return be("scrollText: element not found:",e),ln;let t=n,{split:s="words",stagger:i=.04,easing:l="ease-out",from:u={opacity:0,y:24},trigger:f={},once:p=true,onComplete:E}=r,N=window.matchMedia("(prefers-reduced-motion: reduce)").matches,$=typeof l=="function"?l:le[l]??le["ease-out"],oe=he(f.start??"top 85%"),Pe=he(f.end??"top 40%"),G=t.innerHTML,Ae=t.textContent??"",H;s==="chars"?H=Nn(t):s==="lines"?H=an(t):H=cn(t),sn(t,Ae);let Y=H.length;function X(v,A){u?.opacity!==void 0&&(v.style.opacity=String(u.opacity+(1-u.opacity)*A));let ue=Vn(A,u);ue&&(v.style.transform=ue);}function L(v){t.style.setProperty("--scroll-draw-progress",String(v)),H.forEach((A,ue)=>{let y=$(Hn(v,ue,Y,i));X(A,y);});}if(N)return L(1),E?.(),{destroy(){t.innerHTML=G;},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};L(0);let R=0,T=0,C=0,P=false,x=false,w=-1,K=0,M=false,te=()=>window.scrollY,xe=()=>window.innerHeight;function we(){let v=t.getBoundingClientRect(),A=$e({top:v.top,height:v.height},te(),xe(),oe,Pe);R=A.tStart,T=A.tEnd;}function ce(){if(!P||x)return;let v=re(te(),R,T,1);p&&(w=Math.max(w,v),v=w),K=v,L(v),v>=1&&!M?(M=true,E?.()):v<1&&!p&&(M=false),C=requestAnimationFrame(ce);}we();let W=new IntersectionObserver(v=>{v.forEach(A=>{P=A.isIntersecting,P&&!x?C=requestAnimationFrame(ce):cancelAnimationFrame(C);});}),D;function m(){clearTimeout(D),D=setTimeout(()=>{if(s==="lines"){let v=K;t.innerHTML=G,H=an(t),sn(t,Ae),L(v);}we();},150);}window.addEventListener("resize",m),window.addEventListener("orientationchange",m);let k=Ie([t],m);return W.observe(t),ke(t,{type:"text",getProgress:()=>K,getTrigger:()=>({tStart:R,tEnd:T})}),{destroy(){cancelAnimationFrame(C),W.disconnect(),window.removeEventListener("resize",m),window.removeEventListener("orientationchange",m),k(),clearTimeout(D),t.innerHTML=G,Re(t);},replay(){w=-1,M=false,K=0,x=false,L(0);},pause(){x=true,cancelAnimationFrame(C);},resume(){x&&(x=false,P&&(C=requestAnimationFrame(ce)));},seek(v){let A=Math.min(1,Math.max(0,v));K=A,w=A,x=true,cancelAnimationFrame(C),L(A);},getProgress(){return K}}}var nt=e=>typeof e=="function"?e():vue.unref(e);function Ne(e,r,n){let t=null,s=r(),i=()=>{t?.destroy(),t=e.value?n(e.value,en(s,()=>s)):null;};vue.onMounted(i),vue.watch(()=>Jt(s=r()),i),vue.onUnmounted(()=>{t?.destroy(),t=null;});}function qn(e={}){let r=vue.ref(null);return Ne(r,()=>nt(e),wt),r}var un={preset:0,selector:0,speed:0,fade:1,easing:0,trigger:0,stagger:0,direction:0,once:1,debug:1,axis:0,scrollContainer:0,autoReverse:1,delay:0,strokeColor:0,strokeWidth:0,fillOpacity:0,clip:2,waypoints:0,velocityScale:3,threshold:0,rootMargin:0,repeat:0,repeatDelay:0,morphTo:0,onProgress:0,onStart:0,onComplete:0,onEnter:0,onLeave:0,onEnterBack:0,onLeaveBack:0,autoplay:1,duration:0,native:1},Gn=[null,Boolean,[Boolean,String],[Boolean,Number]],mn=e=>({type:e,default:void 0}),Mt=vue.defineComponent({name:"ScrollDraw",props:Object.fromEntries(Object.entries(un).map(([e,r])=>[e,r?mn(Gn[r]):null])),setup(e,{slots:r}){let n=vue.ref(null);return Ne(n,()=>{let t={};for(let s in un){let i=e[s];i!=null&&(t[s]=i);}return t},wt),()=>vue.h("div",{ref:n},r.default?.())}});function jn(e){let r=vue.ref(null);return Ne(r,()=>nt(e),vt),r}var At=vue.defineComponent({name:"ScrollAnimate",props:{options:{type:Object,required:true}},setup(e,{slots:r}){let n=vue.ref(null);return Ne(n,()=>e.options,vt),()=>vue.h("div",{ref:n},r.default?.())}});function Un(e){let r=vue.ref(null);return Ne(r,()=>nt(e),Et),r}var Lt=vue.defineComponent({name:"ScrollCounter",props:{to:{type:Number,required:true},from:{type:Number},format:{type:Function},easing:{type:[String,Function]},trigger:{type:Object},once:mn(Boolean),decimals:{type:Number},onComplete:{type:Function}},setup(e){let r=vue.ref(null);return Ne(r,()=>{let n={to:e.to};return 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),n},Et),()=>vue.h("span",{ref:r})}});function Yn(e={}){let r=vue.ref(null);return Ne(r,()=>nt(e),Tt),r}var Ct=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 Ne(r,()=>e.options??{},Tt),()=>vue.h("video",{ref:r,src:e.src,muted:e.muted,playsinline:e.playsInline,preload:"auto",class:e.class})}});function Xn(e={}){let r=vue.ref(null);return Ne(r,()=>nt(e),xt),r}var $t=vue.defineComponent({name:"ScrollText",props:{options:{type:Object},tag:{type:String,default:"p"}},setup(e,{slots:r}){let n=vue.ref(null);return Ne(n,()=>e.options??{},xt),()=>vue.h(e.tag,{ref:n},r.default?.())}});function ro(){return {install(e){e.component("ScrollDraw",Mt),e.component("ScrollAnimate",At),e.component("ScrollCounter",Lt),e.component("ScrollVideo",Ct),e.component("ScrollText",$t);}}}exports.ScrollAnimate=At;exports.ScrollCounter=Lt;exports.ScrollDraw=Mt;exports.ScrollText=$t;exports.ScrollVideo=Ct;exports.createScrollDrawPlugin=ro;exports.useScrollAnimate=jn;exports.useScrollCounter=Un;exports.useScrollDraw=qn;exports.useScrollText=Xn;exports.useScrollVideo=Yn;
1
+ 'use strict';var vue=require('vue');function En({bounces:e=3,decay:n=.5}={}){let t=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,n)),o=Math.sqrt(r),i=0,a=[];for(let d=0;d<t;d++){let x=Math.pow(o,d);a.push(x),i+=x;}let m=[0],f=0;for(let d=0;d<t;d++)f+=a[d]/i,m.push(f);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let x=0;x<t;x++)if(d<=m[x+1]){let F=(d-m[x])/(m[x+1]-m[x]);if(x===0)return F*(2-F);let $=1-Math.pow(r,x);return $+(1-$)*(2*F-1)*(2*F-1)}return 1}}function Tn({amplitude:e=1,period:n=.4}={}){let t=Math.max(1,e),r=Math.max(.1,n),o=t<=1?r/4:r/(2*Math.PI)*Math.asin(1/t);return i=>i<=0?0:i>=1?1:t*Math.pow(2,-10*i)*Math.sin((i-o)*(2*Math.PI)/r)+1}var oe={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:En(),elastic:Tn()};function _t(e,n,t){return Math.min(t,Math.max(n,e))}function ye(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[t="top",r="bottom"]=n.split(/\s+/).filter(Boolean);return {element:t,viewport:r}}function Wt(e,n,t,r){switch(r){case "top":return e+t;case "center":return e+t+n/2;case "bottom":return e+t+n;default:return e+t}}function qt(e,n){if(/^\d+(\.\d+)?%$/.test(e))return n*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return n/2;case "bottom":return n;default:return n}}function ee(e,n,t,r){return t===n?0:_t((e-n)/(t-n)*r,0,1)}function Le(e,n,t,r,o){let i=Wt(e.top,e.height,n,r.element)-qt(r.viewport,t),a=Wt(e.top,e.height,n,o.element)-qt(o.viewport,t);return {tStart:i,tEnd:a}}function ct(e,n,t){let r=e.getBoundingClientRect(),o=t==="x"?r.width:r.height;return n?{top:t==="x"?r.left-n.getBoundingClientRect().left+n.scrollLeft:r.top-n.getBoundingClientRect().top+n.scrollTop,height:o,scroll:0}:{top:t==="x"?r.left:r.top,height:o,scroll:t==="x"?window.scrollX:window.scrollY}}function Ue(e){let n=e.tagName.toLowerCase();if(n==="rect"){let t=parseFloat(e.getAttribute("width")??"0"),r=parseFloat(e.getAttribute("height")??"0");return 2*(t+r)}if(n==="circle"){let t=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*t}return e.getTotalLength()}function Bt(e){let n=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(n)return [parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)];let t=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(t)return [parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)];let r=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return r?[parseInt(r[1]),parseInt(r[2]),parseInt(r[3])]:null}function Ye(e,n,t){let r=Bt(e),o=Bt(n);return !r||!o?e:`rgb(${Math.round(r[0]+(o[0]-r[0])*t)},${Math.round(r[1]+(o[1]-r[1])*t)},${Math.round(r[2]+(o[2]-r[2])*t)})`}var Gt={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 Ze=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function he(e,...n){Ze&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var xn="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Mn="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",jt=33;function Ln(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function An(e){let n=[];for(let t=0;t<jt;t++){let r=t/(jt-1);n.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${n.join(",")})`}function ut(e){switch(e){case "linear":return "linear";case "ease-in":return xn;case "ease-out":return Mn;case "ease-in-out":return Ln()?An(oe["ease-in-out"]):null;default:return null}}var Qt=Symbol.for("svg-scroll-draw.registry");function Ut(){let e=globalThis;return e[Qt]||(e[Qt]=new Map)}function Oe(e,n){Ut().set(e,n);}function Pe(e){Ut().delete(e);}var Je,mt=new Set,ft=new WeakMap,et=new Map,Yt=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function Cn(e){let n=new Set;for(let t of e)for(;t&&t!==document.body;t=t.parentElement)for(let r=t;r;r=r.previousElementSibling)n.add(r);return n}function Ie(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let t=()=>n();Je??(Je=new ResizeObserver(o=>{let i=false;for(let{target:a}of o)ft.get(a)!==Yt(a)&&(i=true),ft.set(a,"");i&&mt.forEach(a=>a());})),mt.add(t);let r=Cn(e);return [document.body,document.documentElement].forEach(o=>o&&r.add(o)),r.forEach(o=>{ft.has(o)||ft.set(o,Yt(o)),et.set(o,(et.get(o)??0)+1),Je.observe(o);}),()=>{mt.delete(t)&&(r.forEach(o=>{let i=(et.get(o)??1)-1;if(i)return void et.set(o,i);et.delete(o),Je?.unobserve(o);}),mt.size||(Je?.disconnect(),Je=void 0));}}function pt(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let n=window.matchMedia("(prefers-reduced-motion: reduce)"),t=o=>e(!!o.matches);if(typeof n.addEventListener=="function")return n.addEventListener("change",t),()=>n.removeEventListener("change",t);let r=n;return r.addListener?.(t),()=>r.removeListener?.(t)}function Ge(e,n){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return n(e,true);let t=n(e,false),r=pt(i=>{if(!i)return;r();let a=(t.getProgress?.()??0)>=1;t.destroy(),t=n(a?{...e,onComplete:void 0}:e,true);}),o={};for(let i of Object.keys(t))o[i]=(...a)=>t[i]?.(...a);return o.destroy=()=>{r(),t.destroy();},o}var $n=0;function On(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Xt(e,n){let t="";try{t=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return t||(e.getAttribute(n)??"").trim()}var Kt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function Pn(e){if(!Ze)return;let n=Xt(e,"stroke");if(!n||n==="none"){he("Element has no stroke \u2014 path will not be visible.",e);return}let t=(e.getAttribute("fill")??"").trim();t&&!Kt.has(t)&&!Kt.has(Xt(e,"fill"))&&he("Element has a fill \u2014 it may obscure the stroke animation.",e);}function kn(e,n,t){let r=document.createElement("div");r.setAttribute("data-svg-scroll-draw-debug",""),r.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function o(){let i=t==="x"?window.scrollX:window.scrollY,a=e-i,m=n-i,f=t==="x";r.innerHTML=`
2
+ <div style="position:absolute;${f?`left:${a}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${a}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
+ <div style="position:absolute;${f?`left:${m}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${m}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(r),window.addEventListener("scroll",o,{passive:true}),o(),{el:r,destroy(){window.removeEventListener("scroll",o),r.remove();}}}var Zt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Jt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Rn(e,n,t){if(!Ze)return;let r=(e.match(Jt)??[]).join("").toUpperCase(),o=(n.match(Jt)??[]).join("").toUpperCase(),i=(e.match(Zt)??[]).length,a=(n.match(Zt)??[]).length;if(r!==o){he(`morphTo: command sequence differs (${r||"\u2205"} \u2192 ${o||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,t);return}i!==a&&he(`morphTo: coordinate count differs (${i} \u2192 ${a}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,t);}function vt(e,n,t){let r=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,i=>{let a=parseFloat(i),m=r[o++]??a;return String(+(a+(m-a)*t).toFixed(4))})}function St(e,n={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:Ge(n,(t,r)=>Dn(e,t,r))}function Dn(e,n,t){let{preset:r,...o}=n,i=r?{...Gt[r],...o}:o,{selector:a="path, polyline, line, polygon, rect, circle",speed:m=1,fade:f=false,easing:d="linear",trigger:x={},stagger:F=0,direction:$="forward",once:Q=false,debug:me=false,axis:R="y",scrollContainer:se,autoReverse:be=false,delay:D=0,strokeColor:H,strokeWidth:P,fillOpacity:M,waypoints:w,velocityScale:v=false,threshold:T=0,rootMargin:U="0px",repeat:N=0,repeatDelay:B=0,morphTo:L,clip:fe,autoplay:Se=false,duration:ie=1e3,native:z=true,onProgress:u,onStart:A,onComplete:h,onEnter:k,onLeave:te,onEnterBack:pe,onLeaveBack:Ee}=i,Z=fe===true?"left":typeof fe=="string"?fe:false,S=typeof d=="function"?d:oe[d]??oe.linear,de=ye(x.start??"top bottom"),Ae=ye(x.end??"bottom top"),ae=typeof se=="string"?document.querySelector(se):se??null,le=Array.isArray(H)?H[0]:null,ne=Array.isArray(H)?H[1]:typeof H=="string"?H:null,re=Array.isArray(P)?P[0]:null,Y=Array.isArray(P)?P[1]:typeof P=="number"?P:null,ge=Array.isArray(M)?M[0]:null,J=Array.isArray(M)?M[1]:typeof M=="number"?M:null;function ke(s){let c=s*100;switch(Z){case "right":return `inset(0 0 0 ${100-c}%)`;case "top":return `inset(0 0 ${100-c}% 0)`;case "bottom":return `inset(${100-c}% 0 0 0)`;case "center":return `circle(${s*150}% at 50% 50%)`;default:return `inset(0 ${100-c}% 0 0)`}}let _=Z?[]:Array.from(e.querySelectorAll(a)),O=[],we=[],l=0,p=0,Ce=F,Te=0,C=false,V=false,G=0,ze=false,q=-1,Ne=[],_e=-1,ce=false,Re=0,Ve=0,We,dt=null;function kt(){dt?.destroy(),dt=null;}let qe=new Set,Rt=NaN,Be=true,ot=-1,Dt=performance.now(),je=NaN;function Xe(){return ae?R==="x"?ae.scrollLeft:ae.scrollTop:R==="x"?window.scrollX:window.scrollY}function It(){return ae?R==="x"?ae.clientWidth:ae.clientHeight:R==="x"?window.innerWidth:window.innerHeight}function Ft(){let s=ct(e,ae,R);return Le(s,s.scroll,It(),de,Ae)}function yn(){let s=p-l,c=_.length-1,y=ae??document.documentElement,X=R==="x"?"Width":"Height";if(Ce=F,F>0&&c>0&&s>0){let xe=y[`scroll${X}`]-y[`client${X}`]-1-l-s/m;xe>=0&&(Ce=Math.min(F,xe/(c*s)));}Te=p+c*Ce*s;}function Ht(){(({tStart:l,tEnd:p}=Ft())),yn(),me&&Ze&&(kt(),dt=kn(l,p,R));}function gt(s,c=Ft){Oe(e,{type:"draw",getProgress:()=>s.getProgress(),getTrigger:c});let y=s.destroy;return s.destroy=()=>{y.call(s),Pe(e);},s}function hn(s,c){if(e.style.setProperty("--scroll-draw-progress",String(s)),Z){let y=c==="reverse"?1-s:s;e.style.clipPath=ke(y);return}_.forEach((y,X)=>{y.style.strokeDashoffset=c==="reverse"?`${O[X]*s}`:`${O[X]*(1-s)}`,f&&(y.style.opacity=c==="reverse"?`${1-s}`:`${s}`),le&&ne?y.style.stroke=Ye(le,ne,s):ne&&(y.style.stroke=ne),re!==null&&Y!==null?y.style.strokeWidth=`${re+(Y-re)*s}`:Y!==null&&(y.style.strokeWidth=`${Y}`),ge!==null&&J!==null?y.style.fillOpacity=`${ge+(J-ge)*s}`:J!==null&&(y.style.fillOpacity=`${J}`),L&&y.tagName.toLowerCase()==="path"&&we[X]&&y.setAttribute("d",vt(we[X],L,s));});}function st(){if(e.style.setProperty("--scroll-draw-progress","0"),Z){e.style.clipPath=ke(0);return}_.forEach((s,c)=>{s.style.strokeDasharray=`${O[c]}`,s.style.strokeDashoffset=$==="reverse"?"0":`${O[c]}`,f?s.style.opacity=$==="reverse"?"1":"0":s.style.opacity="",le&&(s.style.stroke=le),re!==null&&(s.style.strokeWidth=`${re}`),ge!==null&&(s.style.fillOpacity=`${ge}`),L&&s.tagName.toLowerCase()==="path"&&we[c]&&s.setAttribute("d",we[c]);});}if(_.forEach(s=>{Pn(s);let c=Ue(s);O.push(c);let y=s.tagName.toLowerCase()==="path";y?we.push(s.getAttribute("d")??""):we.push(""),L&&(y?Rn(we[we.length-1],L,s):he(`morphTo only applies to <path> elements \u2014 ignored on <${s.tagName}>.`,s)),t?(s.style.strokeDasharray=`${c}`,s.style.strokeDashoffset=$==="reverse"?`${c}`:"0",f&&(s.style.opacity="1"),ne&&(s.style.stroke=ne),Y!==null&&(s.style.strokeWidth=`${Y}`),J!==null&&(s.style.fillOpacity=`${J}`),L&&s.tagName.toLowerCase()==="path"&&s.setAttribute("d",L)):(s.style.strokeDasharray=`${c}`,s.style.strokeDashoffset=$==="reverse"?"0":`${c}`,f?s.style.opacity=$==="reverse"?"1":"0":s.style.opacity="",le&&(s.style.stroke=le),re!==null&&(s.style.strokeWidth=`${re}`),ge!==null&&(s.style.fillOpacity=`${ge}`));}),Z){if(t)return e.style.clipPath=ke(1),h?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=ke(0);}else if(t)return h?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Nt=typeof d=="string"?ut(d):null;function bn(){return !(z===false||!On()||!_.length||!Nt||Z||R!=="y"||ae||m!==1||F!==0||Q||be||v!==false||L||w||N||D>0||u||A||h||k||te||pe||Ee||H!=null||P!=null||M!=null||(x.start??"top bottom").trim()!=="top bottom"||(x.end??"bottom top").trim()!=="bottom top")}function wn(){let s=++$n,c=`svg-scroll-draw-${s}`,y=`svg-scroll-draw-host-${s}`,X=`--svg-scroll-draw-${s}`,xe=$==="reverse"?"0":"var(--ssd-len)",De=$==="reverse"?"var(--ssd-len)":"0",$e=`stroke-dashoffset:${xe};`,E=`stroke-dashoffset:${De};`;f&&($e+=`opacity:${$==="reverse"?1:0};`,E+=`opacity:${$==="reverse"?0:1};`);let I=document.createElement("style");I.setAttribute("data-svg-scroll-draw",""),I.textContent=`@keyframes ${c}{from{${$e}}to{${E}}}.${y}{view-timeline-name:${X};view-timeline-axis:block;}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${Nt};animation-fill-mode:both;animation-timeline:${X};animation-range:cover 0% cover 100%;}`,document.head.appendChild(I),e.classList.add(y);function ue(g,K){g.style.setProperty("--ssd-len",String(O[K])),g.style.strokeDasharray=`${O[K]}`,g.style.strokeDashoffset="",g.style.opacity="",g.style.animationPlayState="",g.classList.add(c);}_.forEach(ue);let b=false,W=-1;function j(){if(W>=0)return W;let g=e.getBoundingClientRect(),{tStart:K,tEnd:Me}=Le({top:g.top,height:g.height},Xe(),It(),de,Ae);return S(ee(Xe(),K,Me,m))}return {destroy(){e.classList.remove(y),_.forEach(g=>{g.classList.remove(c),g.style.removeProperty("--ssd-len"),g.style.animationPlayState="";}),I.remove();},replay(){b=false,W=-1,_.forEach(ue);},pause(){b=true,_.forEach(g=>{g.style.animationPlayState="paused";});},resume(){b&&(b=false,_.forEach(g=>{g.style.animationPlayState="running";}));},seek(g){let K=Math.min(1,Math.max(0,g));W=K,b=true,_.forEach((Me,ve)=>{Me.classList.remove(c),Me.style.strokeDashoffset=$==="reverse"?`${O[ve]*K}`:`${O[ve]*(1-K)}`,f&&(Me.style.opacity=$==="reverse"?`${1-K}`:`${K}`);});},getProgress(){return j()},refresh(){_.forEach((g,K)=>{O[K]=Ue(g),g.style.setProperty("--ssd-len",String(O[K])),g.style.strokeDasharray=`${O[K]}`;});}}}if(bn())return gt(wn());function vn(){let s=Math.max(1,ie),c=0,y=0,X=false;function xe(b){let W=true;if(Z){let j=Math.min(1,Math.max(0,b/s)),g=S(j);Re=g,e.style.setProperty("--scroll-draw-progress",String(g)),e.style.clipPath=ke($==="reverse"?1-g:g),u?.(g),j<1&&(W=false);}else _.forEach((j,g)=>{let K=g*F*s,Me=Math.min(1,Math.max(0,(b-K)/s)),ve=S(Me);j.style.strokeDashoffset=$==="reverse"?`${O[g]*ve}`:`${O[g]*(1-ve)}`,f&&(j.style.opacity=$==="reverse"?`${1-ve}`:`${ve}`),le&&ne?j.style.stroke=Ye(le,ne,ve):ne&&(j.style.stroke=ne),re!==null&&Y!==null?j.style.strokeWidth=`${re+(Y-re)*ve}`:Y!==null&&(j.style.strokeWidth=`${Y}`),ge!==null&&J!==null?j.style.fillOpacity=`${ge+(J-ge)*ve}`:J!==null&&(j.style.fillOpacity=`${J}`),L&&j.tagName.toLowerCase()==="path"&&we[g]&&j.setAttribute("d",vt(we[g],L,ve)),g===0&&(Re=ve,u?.(ve),e.style.setProperty("--scroll-draw-progress",String(ve))),Me<1&&(W=false);});if(w){let j=Math.min(1,Math.max(0,b/s)),g=S(j);for(let K in w){let Me=parseFloat(K);g>=Me&&!qe.has(Me)&&(qe.add(Me),w[K]?.());}}return W}function De(b){if(ce)return;let W=b-c;V||(V=true,A?.());let j=xe(W);if(j&&!C){C=true,xe(s*(1+Math.max(0,_.length-1)*F)),h?.(),Ve<(N==="infinite"?1/0:N??0)&&(Ve++,We=setTimeout(()=>{c=performance.now(),V=false,C=false,qe.clear(),st(),G=requestAnimationFrame(De);},B));return}j||(G=requestAnimationFrame(De));}function $e(){cancelAnimationFrame(G),clearTimeout(We),c=performance.now(),y=0,ce=false,V=false,C=false,Ve=0,X=true,Re=0,qe.clear(),st(),G=requestAnimationFrame(De);}let E=new IntersectionObserver(b=>{b.forEach(W=>{W.isIntersecting&&!(Q&&C)?$e():!W.isIntersecting&&!Q&&!C&&(cancelAnimationFrame(G),clearTimeout(We),X=false);});},{root:ae??null,threshold:T,rootMargin:U}),I;function ue(){clearTimeout(I),I=setTimeout(()=>{_.forEach((b,W)=>{O[W]=Ue(b),b.style.strokeDasharray=`${O[W]}`;});},150);}return window.addEventListener("resize",ue),window.addEventListener("orientationchange",ue),D>0?setTimeout(()=>E.observe(e),D):E.observe(e),{destroy(){cancelAnimationFrame(G),clearTimeout(We),E.disconnect(),window.removeEventListener("resize",ue),window.removeEventListener("orientationchange",ue),clearTimeout(I);},replay(){Ve=0,$e();},pause(){ce||!X||(ce=true,y=performance.now()-c,cancelAnimationFrame(G));},resume(){ce&&(ce=false,X=true,c=performance.now()-y,G=requestAnimationFrame(De));},seek(b){let W=Math.min(1,Math.max(0,b));Re=W,ce=true,y=W*s,c=performance.now()-y,cancelAnimationFrame(G),xe(y);},getProgress(){return Re},refresh(){clearTimeout(I),_.forEach((b,W)=>{O[W]=Ue(b),b.style.strokeDasharray=`${O[W]}`;});}}}if(Se)return gt(vn());Ht();function Vt(){if(ce||!Qe)return;let s=performance.now(),c=Xe();if(!Be&&v===false&&c===Rt){ht(c);return}Be=false,Rt=c;let y=m;if(v!==false){let E=s-Dt,I=E>0?Math.abs(c-(ot<0?c:ot))/E:0;y=m*Math.max(.2,1+I*(typeof v=="number"?v:1)*.04);}ot=c,Dt=s;let X=be?_e===-1||c>=_e?"forward":"reverse":$;_e=c;let xe=p-l,De=true,$e=xe===0?0:(c-l)/xe;if(isNaN(je)||(je<=0&&$e>0?k?.():je>0&&$e<=0&&Ee?.(),je<1&&$e>=1?te?.():je>=1&&$e<1&&pe?.()),je=$e,Z){let E=S(ee(c,l,p,y));Q&&!be&&(q=Math.max(q,E),E=q),Re=E,e.style.setProperty("--scroll-draw-progress",String(E));let I=X==="reverse"?1-E:E;e.style.clipPath=ke(I),u?.(E),!V&&ee(c,l,p,y)>0&&(V=true,A?.()),E>=1&&!C?(C=true,h?.(),Ve<(N==="infinite"?1/0:N??0)&&(Ve++,We=setTimeout(()=>{q=-1,V=false,C=false,e.style.clipPath=ke(0);},B))):E<1&&!Q&&(C=false),ht(c);return}if(_.forEach((E,I)=>{let ue=I*Ce*xe,b=S(ee(c,l+ue,p+ue,y));Q&&!be&&(b=Ne[I]=Math.max(Ne[I]??q,b)),E.style.strokeDashoffset=X==="reverse"?`${O[I]*b}`:`${O[I]*(1-b)}`,f&&(E.style.opacity=X==="reverse"?`${1-b}`:`${b}`),le&&ne?E.style.stroke=Ye(le,ne,b):ne&&(E.style.stroke=ne),re!==null&&Y!==null?E.style.strokeWidth=`${re+(Y-re)*b}`:Y!==null&&(E.style.strokeWidth=`${Y}`),ge!==null&&J!==null?E.style.fillOpacity=`${ge+(J-ge)*b}`:J!==null&&(E.style.fillOpacity=`${J}`),L&&E.tagName.toLowerCase()==="path"&&we[I]&&E.setAttribute("d",vt(we[I],L,b)),I===0&&(Re=b,u?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(De=false);}),w){let E=S(ee(c,l,p,y));for(let I in w){let ue=parseFloat(I);E>=ue&&!qe.has(ue)&&(qe.add(ue),w[I]?.());}}!V&&ee(c,l,p,y)>0&&(V=true,A?.()),De&&!C?(C=true,h?.(),Ve<(N==="infinite"?1/0:N??0)&&(Ve++,We=setTimeout(()=>{q=-1,Ne=[],V=false,C=false,qe.clear(),st(),Be=true;},B))):!De&&!Q&&(C=false),ht(c);}function yt(s){return s>=p&&s<Te}function ht(s){ze||yt(s)?G=requestAnimationFrame(Vt):Qe=false;}function bt(){return ze||yt(Xe())}let Qe=false;function it(){Qe||(Qe=true,G=requestAnimationFrame(function(){Vt();}));}function at(){Qe=false,cancelAnimationFrame(G);}let wt=new IntersectionObserver(s=>{s.forEach(c=>{ze=c.isIntersecting,ze&&!ce?(Be=true,it()):Qe&&!ce&&yt(Xe())||at();});},{root:ae??null,threshold:T,rootMargin:U});function zt(){_.forEach((s,c)=>{O[c]=Ue(s),s.style.strokeDasharray=`${O[c]}`;}),Ht(),Be=true;}let lt;function Ke(){clearTimeout(lt),lt=setTimeout(zt,150);}window.addEventListener("resize",Ke),window.addEventListener("orientationchange",Ke);let Sn=Ie([e],Ke);return D>0?setTimeout(()=>wt.observe(e),D):wt.observe(e),gt({destroy(){cancelAnimationFrame(G),clearTimeout(We),at(),wt.disconnect(),Sn(),window.removeEventListener("resize",Ke),window.removeEventListener("orientationchange",Ke),clearTimeout(lt),kt();},replay(){q=-1,Ne=[],_e=-1,ot=-1,V=false,C=false,Ve=0,ce=false,Re=0,qe.clear(),clearTimeout(We),st(),Be=true,bt()&&it();},pause(){ce=true,at();},resume(){ce&&(ce=false,Be=true,bt()&&it());},seek(s){let c=Math.min(1,Math.max(0,s));Re=c,q=c,Ne=[],ce=true,at(),hn(c,$),Be=true;},getProgress(){return Re},refresh(){clearTimeout(lt),zt(),bt()&&!ce&&it();}},()=>({tStart:l,tEnd:p}))}var en=new WeakMap,In=0;function tn(e){return JSON.stringify(e,(n,t)=>{if(typeof t=="function")return "\u0192";if(typeof Element<"u"&&t instanceof Element){let r=en.get(t);return r===void 0&&en.set(t,r=++In),`el#${r}`}return t})}function nn(e,n){let t={...e};for(let r of Object.keys(t))typeof t[r]=="function"&&(t[r]=(...o)=>n()[r]?.(...o));return t}function Fn(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function rn(e){let n=[],t=/([\w]+)\(([^)]*)\)/g,r;for(;(r=t.exec(e))!==null;){let o=[],i=[],a=r[2].trim();if(a)for(let m of a.split(/[\s,]+/)){let f=m.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(f?parseFloat(f[1]):0),i.push(f?f[2]:"");}n.push({fn:r[1],nums:o,units:i});}return n}function Hn(e,n,t){let r=rn(e),o=rn(n);return r.length===0||r.length!==o.length?t<1?e:n:r.map((i,a)=>{let m=o[a];return i.fn!==m.fn||i.nums.length!==m.nums.length?t<1?`${i.fn}(${i.nums.map((f,d)=>`${f}${i.units[d]}`).join(", ")})`:`${m.fn}(${m.nums.map((f,d)=>`${f}${m.units[d]}`).join(", ")})`:`${i.fn}(${i.nums.map((f,d)=>`${f+(m.nums[d]-f)*t}${i.units[d]}`).join(", ")})`}).join(" ")}function on(e,n,t){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*t);let r=String(e),o=String(n);if(Fn(r))return Ye(r,o,t);if(r.includes("("))return Hn(r,o,t);let i=r.match(/^([-+]?[\d.]+)(.*)$/),a=o.match(/^([-+]?[\d.]+)(.*)$/);if(i&&a){let m=parseFloat(i[1]),f=parseFloat(a[1]);return `${m+(f-m)*t}${i[2]||a[2]}`}return t<1?r:o}function Nn(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Vn=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),zn=0,sn="--scroll-draw-progress";function _n(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var ln={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Et(e,n){return typeof window>"u"?ln:n.respectReducedMotion===false?an(e,n,false):Ge(n,(t,r)=>an(e,t,r))}function an(e,n,t){let{props:r,trigger:o={},easing:i="ease-out",speed:a=1,once:m=false,axis:f="y",scrollContainer:d,native:x=true,velocityScale:F=false,triggerElement:$,onProgress:Q,onComplete:me,onEnter:R,onLeave:se,onEnterBack:be,onLeaveBack:D}=n,H=typeof i=="function"?i:oe[i]??oe["ease-out"],P=ye(o.start??"top bottom"),M=ye(o.end??"bottom top"),w=$??e,v=typeof d=="string"?document.querySelector(d):d??null,T=Object.entries(r).map(([l,p])=>({prop:Nn(l),from:Array.isArray(p)?p[0]:"",to:Array.isArray(p)?p[1]:p}));function U(){let l=window.getComputedStyle(e);for(let p of T)p.from===""&&(p.from=l.getPropertyValue(p.prop).trim()||"0");}function N(){for(let l of T)e.style.setProperty(l.prop,String(l.to));}let B=new Map;for(let l of [...T.map(p=>p.prop),sn])B.set(l,e.style.getPropertyValue(l));function L(){for(let[l,p]of B)p?e.style.setProperty(l,p):e.style.removeProperty(l);}if(t)return N(),me?.(),{...ln,destroy:L,getProgress:()=>1};U();let fe=typeof i=="string"?ut(i):null;function Se(){if(!x||!_n()||!fe||f!=="y"||v||w!==e||m||a!==1||Q||me||R||se||be||D||F!==false||(o.start??"top bottom").trim()!=="top bottom"||(o.end??"bottom top").trim()!=="bottom top")return false;for(let l of T)if(!Vn.has(l.prop))return false;return true}function ie(){let l=`ssd-a-${++zn}`,p=T.map(q=>`${q.prop}:${q.from}`).join(";"),Ce=T.map(q=>`${q.prop}:${q.to}`).join(";"),Te=document.createElement("style");Te.setAttribute("data-ssd-animate",""),Te.textContent=`@keyframes ${l}{from{${p}}to{${Ce}}}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${fe};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(Te),e.classList.add(l);let C=()=>f==="x"?window.scrollX:window.scrollY,V=()=>f==="x"?window.innerWidth:window.innerHeight,G=()=>{let q=e.getBoundingClientRect();return Le({top:q.top,height:q.height},C(),V(),P,M)};Oe(e,{type:"animate",getProgress:()=>ze.getProgress(),getTrigger:G});let ze={refresh(){},destroy(){e.classList.remove(l),Te.remove(),e.style.animationPlayState="",L(),Pe(e);},replay(){e.classList.remove(l),e.offsetWidth,e.classList.add(l);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(q){let Ne=Math.min(1,Math.max(0,q));e.classList.remove(l);for(let _e of T)e.style.setProperty(_e.prop,on(_e.from,_e.to,Ne));},getProgress(){let{tStart:q,tEnd:Ne}=G();return H(ee(C(),q,Ne,a))}};return ze}if(Se())return ie();let z=0,u=0,A=0,h=false,k=false,te=-1,pe=0,Ee=false,Z=NaN,S=-1,de=0,Ae=()=>v?f==="x"?v.scrollLeft:v.scrollTop:f==="x"?window.scrollX:window.scrollY,ae=()=>v?f==="x"?v.clientWidth:v.clientHeight:f==="x"?window.innerWidth:window.innerHeight,le=w===e?T:[],ne=false;function re(){let l=e.style,p=le.map(V=>l.getPropertyValue(V.prop)),Ce=l.transition;le.length&&(l.transition="none"),le.forEach(V=>l.setProperty(V.prop,B.get(V.prop)??""));let Te=ct(w,v,f);le.forEach((V,G)=>l.setProperty(V.prop,p[G])),le.length&&(e.offsetWidth,l.transition=Ce);let C=Le(Te,Te.scroll,ae(),P,M);ne&&Math.abs(C.tStart-z)<1&&Math.abs(C.tEnd-u)<1||(ne=true,z=C.tStart,u=C.tEnd);}function Y(l){e.style.setProperty(sn,String(l));for(let p of T)e.style.setProperty(p.prop,on(p.from,p.to,l));Q?.(l);}function ge(l){if(isNaN(Z)){Z=l;return}Z<=0&&l>0?R?.():Z>0&&l<=0&&D?.(),Z<1&&l>=1?se?.():Z>=1&&l<1&&be?.(),Z=l;}function J(){if(!h||k)return;let l=performance.now(),p=Ae(),Ce=a;if(F!==false){let V=l-de,G=V>0?Math.abs(p-(S<0?p:S))/V:0;Ce=a*Math.max(.2,1+G*(typeof F=="number"?F:1)*.04);}S=p,de=l;let Te=u===z?0:(p-z)/(u-z);ge(Te);let C=H(ee(p,z,u,Ce));m&&(te=Math.max(te,C),C=te),pe=C,Y(C),C>=1&&!Ee?(Ee=true,me?.()):C<1&&!m&&(Ee=false),A=requestAnimationFrame(J);}re(),u===z&&he("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let l=H(ee(Ae(),z,u,a));m&&l>0&&(te=l),pe=l,Y(l);}let ke=new IntersectionObserver(l=>{l.forEach(p=>{h=p.isIntersecting,h&&!k?A=requestAnimationFrame(J):cancelAnimationFrame(A);});},{root:v??null}),_;function O(){clearTimeout(_),_=setTimeout(re,150);}window.addEventListener("resize",O),window.addEventListener("orientationchange",O);let we=Ie([w],O);return ke.observe(e),Oe(e,{type:"animate",getProgress:()=>pe,getTrigger:()=>({tStart:z,tEnd:u})}),{destroy(){cancelAnimationFrame(A),ke.disconnect(),window.removeEventListener("resize",O),window.removeEventListener("orientationchange",O),we(),clearTimeout(_),L(),Pe(e);},replay(){te=-1,Ee=false,pe=0,k=false,Y(0);},pause(){k=true,cancelAnimationFrame(A);},resume(){k&&(k=false,h&&(A=requestAnimationFrame(J)));},seek(l){let p=Math.min(1,Math.max(0,l));pe=p,te=p,k=true,cancelAnimationFrame(A),Y(p);},getProgress(){return pe},refresh(){re();}}}var Tt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function xt(e,n){if(typeof window>"u")return Tt;let t=typeof e=="string"?document.querySelector(e):e;return t?Ge(n,(r,o)=>Wn(t,r,o)):(he("scrollCounter: element not found:",e),Tt)}function Wn(e,n,t){let{from:r=0,to:o,format:i,easing:a="ease-out",trigger:m={},once:f=true,decimals:d,onComplete:x}=n,F=d!==void 0?u=>u.toFixed(d):i??(u=>String(Math.round(u))),$=typeof a=="function"?a:oe[a]??oe["ease-out"],Q=ye(m.start??"top 80%"),me=ye(m.end??"top 20%");if(t)return e.textContent=F(o),x?.(),{...Tt,getProgress:()=>1};let R=0,se=0,be=false,D=0,H=false,P=false,M=-1,w=0,v=false,T=()=>window.scrollY,U=()=>window.innerHeight;function N(){let u=e.getBoundingClientRect(),A=Le({top:u.top,height:u.height},T(),U(),Q,me);be&&Math.abs(A.tStart-R)<1&&Math.abs(A.tEnd-se)<1||(be=true,R=A.tStart,se=A.tEnd);}function B(u){e.textContent=F(r+(o-r)*u),e.style.setProperty("--scroll-draw-progress",String(u));}function L(){if(!H||P)return;let u=$(ee(T(),R,se,1));f&&(M=Math.max(M,u),u=M),w=u,B(u),u>=1&&!v?(v=true,x?.()):u<1&&!f&&(v=false),D=requestAnimationFrame(L);}N();{let u=$(ee(T(),R,se,1));f&&u>0&&(M=u),w=u,B(u);}let fe=new IntersectionObserver(u=>{u.forEach(A=>{H=A.isIntersecting,H&&!P?D=requestAnimationFrame(L):cancelAnimationFrame(D);});}),Se;function ie(){clearTimeout(Se),Se=setTimeout(N,150);}window.addEventListener("resize",ie),window.addEventListener("orientationchange",ie);let z=Ie([e],ie);return fe.observe(e),Oe(e,{type:"counter",getProgress:()=>w,getTrigger:()=>({tStart:R,tEnd:se})}),{destroy(){cancelAnimationFrame(D),fe.disconnect(),window.removeEventListener("resize",ie),window.removeEventListener("orientationchange",ie),z(),clearTimeout(Se),Pe(e);},replay(){M=-1,v=false,w=0,P=false,B(0);},pause(){P=true,cancelAnimationFrame(D);},resume(){P&&(P=false,H&&(D=requestAnimationFrame(L)));},seek(u){let A=Math.min(1,Math.max(0,u));w=A,M=A,P=true,cancelAnimationFrame(D),B(A);},getProgress(){return w}}}var cn={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Mt(e,n={}){if(typeof window>"u")return cn;let t=typeof e=="string"?document.querySelector(e):e;if(!t||t.tagName.toLowerCase()!=="video")return he("scrollVideo: <video> element not found:",e),cn;let r=t,{trigger:o={},easing:i="linear",once:a=false,axis:m="y",preload:f="auto",triggerElement:d,onReady:x,onComplete:F,onProgress:$}=n,Q=d??r,me=window.matchMedia("(prefers-reduced-motion: reduce)").matches,R=typeof i=="function"?i:oe[i]??oe.linear,se=ye(o.start??"top top"),be=ye(o.end??"bottom top");r.pause(),r.hasAttribute("preload")||(r.preload=f);let D=n.from??0,H=n.to,P=0,M=0,w=0,v=false,T=false,U=-1,N=0,B=false,L=false,fe=()=>m==="x"?window.scrollX:window.scrollY,Se=()=>m==="x"?window.innerWidth:window.innerHeight;function ie(){let S=Q.getBoundingClientRect(),de=m==="x"?S.left:S.top,Ae=m==="x"?S.width:S.height,ae=Le({top:de,height:Ae},fe(),Se(),se,be);P=ae.tStart,M=ae.tEnd,L&&M===P&&he("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",r);}let z=NaN;function u(S){if(!L)return;let de=H??r.duration??0,Ae=D+(de-D)*S;Ae!==z&&(z=Ae,r.currentTime=Ae),r.style.setProperty("--scroll-draw-progress",String(S)),$?.(S);}function A(){if(!v||T||!L||me)return;let S=R(ee(fe(),P,M,1));a&&(U=Math.max(U,S),S=U),N=S,u(S),S>=1&&!B?(B=true,F?.()):S<1&&!a&&(B=false),w=requestAnimationFrame(A);}function h(){if(L=true,H===void 0&&(H=r.duration),me){u(1),x?.();return}ie(),x?.(),v&&!T&&(w=requestAnimationFrame(A));}r.readyState>=1?h():r.addEventListener("loadedmetadata",h,{once:true}),L||ie();let k=me?()=>{}:pt(S=>{S&&(k(),me=true,cancelAnimationFrame(w),u(1));}),te=new IntersectionObserver(S=>{S.forEach(de=>{v=de.isIntersecting,v&&!T&&L?w=requestAnimationFrame(A):cancelAnimationFrame(w);});}),pe;function Ee(){clearTimeout(pe),pe=setTimeout(ie,150);}window.addEventListener("resize",Ee),window.addEventListener("orientationchange",Ee);let Z=Ie([Q],Ee);return te.observe(r),Oe(r,{type:"video",getProgress:()=>N,getTrigger:()=>({tStart:P,tEnd:M})}),{destroy(){cancelAnimationFrame(w),te.disconnect(),r.removeEventListener("loadedmetadata",h),window.removeEventListener("resize",Ee),window.removeEventListener("orientationchange",Ee),Z(),k(),clearTimeout(pe),Pe(r);},replay(){U=-1,B=false,N=0,T=false,z=NaN,u(0);},pause(){T=true,cancelAnimationFrame(w);},resume(){T&&(T=false,v&&L&&(w=requestAnimationFrame(A)));},seek(S){let de=Math.min(1,Math.max(0,S));N=de,U=de,T=true,cancelAnimationFrame(w),z=NaN,u(de);},getProgress(){return N}}}function un(e,n){let t=document.createElement("span");t.textContent=n,t.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;user-select:none",e.appendChild(t);}function pn(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(t=>{let r=document.createElement("span");return r.setAttribute("aria-hidden","true"),/^\s+$/.test(t)?(r.textContent=t,r.style.whiteSpace="pre"):(r.textContent=t,r.style.display="inline-block"),e.appendChild(r),/^\s+$/.test(t)?null:r}).filter(t=>t!==null)}function qn(e){let n=e.textContent??"";return e.textContent="",n.split("").map(t=>{let r=document.createElement("span");return r.setAttribute("aria-hidden","true"),r.textContent=t,t===" "?r.style.whiteSpace="pre":r.style.display="inline-block",e.appendChild(r),t===" "?null:r}).filter(t=>t!==null)}function mn(e){let n=pn(e),t=new Map;for(let i of n){let a=i.offsetTop;t.has(a)||t.set(a,[]),t.get(a).push(i);}let r=[],o=Array.from(t.keys()).sort((i,a)=>i-a);for(let i of o){let a=t.get(i),m=document.createElement("span");m.setAttribute("aria-hidden","true"),m.style.display="inline-block",a.forEach((f,d)=>{let x=f.nextElementSibling;m.appendChild(f),d<a.length-1&&x&&x.style.whiteSpace==="pre"&&m.appendChild(x);}),r.push(m);}return e.textContent="",r.forEach((i,a)=>{e.appendChild(i),a<r.length-1&&e.appendChild(document.createTextNode(" "));}),r}function Bn(e,n,t,r){if(t<=1||r===0)return e;let o=(t-1)*r,i=n*r,a=i+(1-o);return a<=i?e>=i?1:0:Math.min(1,Math.max(0,(e-i)/(a-i)))}function Gn(e,n){let t=[];if(n?.y!==void 0&&t.push(`translateY(${n.y*(1-e)}px)`),n?.x!==void 0&&t.push(`translateX(${n.x*(1-e)}px)`),n?.rotate!==void 0&&t.push(`rotate(${n.rotate*(1-e)}deg)`),n?.scale!==void 0){let r=n.scale+(1-n.scale)*e;t.push(`scale(${r})`);}return t.join(" ")||""}var fn={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Lt(e,n={}){if(typeof window>"u")return fn;let t=typeof e=="string"?document.querySelector(e):e;if(!t)return he("scrollText: element not found:",e),fn;let r=t;return Ge(n,(o,i)=>jn(r,o,i))}function jn(e,n,t){let{split:r="words",stagger:o=.04,easing:i="ease-out",from:a={opacity:0,y:24},trigger:m={},once:f=true,onComplete:d}=n,x=typeof i=="function"?i:oe[i]??oe["ease-out"],F=ye(m.start??"top 85%"),$=ye(m.end??"top 40%"),Q=e.innerHTML,me=e.textContent??"",R;r==="chars"?R=qn(e):r==="lines"?R=mn(e):R=pn(e),un(e,me);let se=R.length;function be(h,k){a?.opacity!==void 0&&(h.style.opacity=String(a.opacity+(1-a.opacity)*k));let te=Gn(k,a);te&&(h.style.transform=te);}function D(h){e.style.setProperty("--scroll-draw-progress",String(h)),R.forEach((k,te)=>{let pe=x(Bn(h,te,se,o));be(k,pe);});}if(t)return D(1),d?.(),{destroy(){e.innerHTML=Q;},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};D(0);let H=0,P=0,M=0,w=false,v=false,T=-1,U=0,N=false,B=()=>window.scrollY,L=()=>window.innerHeight;function fe(){let h=e.getBoundingClientRect(),k=Le({top:h.top,height:h.height},B(),L(),F,$);H=k.tStart,P=k.tEnd;}function Se(){if(!w||v)return;let h=ee(B(),H,P,1);f&&(T=Math.max(T,h),h=T),U=h,D(h),h>=1&&!N?(N=true,d?.()):h<1&&!f&&(N=false),M=requestAnimationFrame(Se);}fe();let ie=new IntersectionObserver(h=>{h.forEach(k=>{w=k.isIntersecting,w&&!v?M=requestAnimationFrame(Se):cancelAnimationFrame(M);});}),z;function u(){clearTimeout(z),z=setTimeout(()=>{if(r==="lines"){let h=U;e.innerHTML=Q,R=mn(e),un(e,me),D(h);}fe();},150);}window.addEventListener("resize",u),window.addEventListener("orientationchange",u);let A=Ie([e],u);return ie.observe(e),Oe(e,{type:"text",getProgress:()=>U,getTrigger:()=>({tStart:H,tEnd:P})}),{destroy(){cancelAnimationFrame(M),ie.disconnect(),window.removeEventListener("resize",u),window.removeEventListener("orientationchange",u),A(),clearTimeout(z),e.innerHTML=Q,Pe(e);},replay(){T=-1,N=false,U=0,v=false,D(0);},pause(){v=true,cancelAnimationFrame(M);},resume(){v&&(v=false,w&&(M=requestAnimationFrame(Se)));},seek(h){let k=Math.min(1,Math.max(0,h));U=k,T=k,v=true,cancelAnimationFrame(M),D(k);},getProgress(){return U}}}var rt=e=>typeof e=="function"?e():vue.unref(e);function He(e,n,t){let r=null,o=n(),i=()=>{r?.destroy(),r=e.value?t(e.value,nn(o,()=>o)):null;};vue.onMounted(i),vue.watch(()=>tn(o=n()),i),vue.onUnmounted(()=>{r?.destroy(),r=null;});}function Kn(e={}){let n=vue.ref(null);return He(n,()=>rt(e),St),n}var dn={preset:0,selector:0,speed:0,fade:1,easing:0,trigger:0,stagger:0,direction:0,once:1,debug:1,axis:0,scrollContainer:0,autoReverse:1,delay:0,strokeColor:0,strokeWidth:0,fillOpacity:0,clip:2,waypoints:0,velocityScale:3,threshold:0,rootMargin:0,repeat:0,repeatDelay:0,morphTo:0,onProgress:0,onStart:0,onComplete:0,onEnter:0,onLeave:0,onEnterBack:0,onLeaveBack:0,autoplay:1,duration:0,native:1},Zn=[null,Boolean,[Boolean,String],[Boolean,Number]],gn=e=>({type:e,default:void 0}),At=vue.defineComponent({name:"ScrollDraw",props:Object.fromEntries(Object.entries(dn).map(([e,n])=>[e,n?gn(Zn[n]):null])),setup(e,{slots:n}){let t=vue.ref(null);return He(t,()=>{let r={};for(let o in dn){let i=e[o];i!=null&&(r[o]=i);}return r},St),()=>vue.h("div",{ref:t},n.default?.())}});function Jn(e){let n=vue.ref(null);return He(n,()=>rt(e),Et),n}var Ct=vue.defineComponent({name:"ScrollAnimate",props:{options:{type:Object,required:true}},setup(e,{slots:n}){let t=vue.ref(null);return He(t,()=>e.options,Et),()=>vue.h("div",{ref:t},n.default?.())}});function er(e){let n=vue.ref(null);return He(n,()=>rt(e),xt),n}var $t=vue.defineComponent({name:"ScrollCounter",props:{to:{type:Number,required:true},from:{type:Number},format:{type:Function},easing:{type:[String,Function]},trigger:{type:Object},once:gn(Boolean),decimals:{type:Number},onComplete:{type:Function}},setup(e){let n=vue.ref(null);return He(n,()=>{let t={to:e.to};return e.from!=null&&(t.from=e.from),e.format!=null&&(t.format=e.format),e.easing!=null&&(t.easing=e.easing),e.trigger!=null&&(t.trigger=e.trigger),e.once!=null&&(t.once=e.once),e.decimals!=null&&(t.decimals=e.decimals),e.onComplete!=null&&(t.onComplete=e.onComplete),t},xt),()=>vue.h("span",{ref:n})}});function tr(e={}){let n=vue.ref(null);return He(n,()=>rt(e),Mt),n}var Ot=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 n=vue.ref(null);return He(n,()=>e.options??{},Mt),()=>vue.h("video",{ref:n,src:e.src,muted:e.muted,playsinline:e.playsInline,preload:"auto",class:e.class})}});function nr(e={}){let n=vue.ref(null);return He(n,()=>rt(e),Lt),n}var Pt=vue.defineComponent({name:"ScrollText",props:{options:{type:Object},tag:{type:String,default:"p"}},setup(e,{slots:n}){let t=vue.ref(null);return He(t,()=>e.options??{},Lt),()=>vue.h(e.tag,{ref:t},n.default?.())}});function wo(){return {install(e){e.component("ScrollDraw",At),e.component("ScrollAnimate",Ct),e.component("ScrollCounter",$t),e.component("ScrollVideo",Ot),e.component("ScrollText",Pt);}}}exports.ScrollAnimate=Ct;exports.ScrollCounter=$t;exports.ScrollDraw=At;exports.ScrollText=Pt;exports.ScrollVideo=Ot;exports.createScrollDrawPlugin=wo;exports.useScrollAnimate=Jn;exports.useScrollCounter=er;exports.useScrollDraw=Kn;exports.useScrollText=nr;exports.useScrollVideo=tr;
@@ -1,7 +1,7 @@
1
1
  export { ScrollAnimate, ScrollCounter, ScrollDraw, ScrollText, ScrollVideo, useScrollAnimate, useScrollCounter, useScrollDraw, useScrollText, useScrollVideo } from '../vue/index.mjs';
2
2
  export { a as ScrollDrawOptions } from '../types-MswK0erX.mjs';
3
3
  import { App } from 'vue';
4
- export { S as ScrollAnimateOptions } from '../engine-P8u6OK4m.mjs';
4
+ export { S as ScrollAnimateOptions } from '../engine-o1VSQ1lX.mjs';
5
5
  export { S as ScrollCounterOptions } from '../index-CdaBYn3A.mjs';
6
6
  export { ScrollTextOptions } from '../text/index.mjs';
7
7
  export { ScrollVideoOptions } from '../video/index.mjs';
@@ -1,7 +1,7 @@
1
1
  export { ScrollAnimate, ScrollCounter, ScrollDraw, ScrollText, ScrollVideo, useScrollAnimate, useScrollCounter, useScrollDraw, useScrollText, useScrollVideo } from '../vue/index.js';
2
2
  export { a as ScrollDrawOptions } from '../types-MswK0erX.js';
3
3
  import { App } from 'vue';
4
- export { S as ScrollAnimateOptions } from '../engine-DQyBzZDl.js';
4
+ export { S as ScrollAnimateOptions } from '../engine-B7UpB4fT.js';
5
5
  export { S as ScrollCounterOptions } from '../index-D3o4vT3e.js';
6
6
  export { ScrollTextOptions } from '../text/index.js';
7
7
  export { ScrollVideoOptions } from '../video/index.js';
@@ -1 +1 @@
1
- import {b,d,f,h,j}from'../chunk-MENZ5DS4.mjs';export{d as ScrollAnimate,f as ScrollCounter,b as ScrollDraw,j as ScrollText,h as ScrollVideo,c as useScrollAnimate,e as useScrollCounter,a as useScrollDraw,i as useScrollText,g as useScrollVideo}from'../chunk-MENZ5DS4.mjs';import'../chunk-XSVTHCLO.mjs';import'../chunk-7SBTYJGH.mjs';import'../chunk-426RAN5I.mjs';import'../chunk-KHQ7OGQK.mjs';import'../chunk-BFX2CSQ3.mjs';import'../chunk-ENACACPZ.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';function s(){return {install(o){o.component("ScrollDraw",b),o.component("ScrollAnimate",d),o.component("ScrollCounter",f),o.component("ScrollVideo",h),o.component("ScrollText",j);}}}export{s as createScrollDrawPlugin};
1
+ import {b,d,f,h,j}from'../chunk-VMUJMXKO.mjs';export{d as ScrollAnimate,f as ScrollCounter,b as ScrollDraw,j as ScrollText,h as ScrollVideo,c as useScrollAnimate,e as useScrollCounter,a as useScrollDraw,i as useScrollText,g as useScrollVideo}from'../chunk-VMUJMXKO.mjs';import'../chunk-XSVTHCLO.mjs';import'../chunk-KV3WCPQ5.mjs';import'../chunk-DY5JCXVR.mjs';import'../chunk-WXUOF4NM.mjs';import'../chunk-LTCJVVSC.mjs';import'../chunk-HX4SP5WN.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';function s(){return {install(o){o.component("ScrollDraw",b),o.component("ScrollAnimate",d),o.component("ScrollCounter",f),o.component("ScrollVideo",h),o.component("ScrollText",j);}}}export{s as createScrollDrawPlugin};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
- 'use strict';var Nr=require('react'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Nr__default=/*#__PURE__*/_interopDefault(Nr);function ur({bounces:e=3,decay:n=.5}={}){let r=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,n)),o=Math.sqrt(t),s=0,a=[];for(let p=0;p<r;p++){let E=Math.pow(o,p);a.push(E),s+=E;}let c=[0],m=0;for(let p=0;p<r;p++)m+=a[p]/s,c.push(m);return p=>{if(p<=0)return 0;if(p>=1)return 1;for(let E=0;E<r;E++)if(p<=c[E+1]){let P=(p-c[E])/(c[E+1]-c[E]);if(E===0)return P*(2-P);let $=1-Math.pow(t,E);return $+(1-$)*(2*P-1)*(2*P-1)}return 1}}function mr({amplitude:e=1,period:n=.4}={}){let r=Math.max(1,e),t=Math.max(.1,n),o=r<=1?t/4:t/(2*Math.PI)*Math.asin(1/r);return s=>s<=0?0:s>=1?1:r*Math.pow(2,-10*s)*Math.sin((s-o)*(2*Math.PI)/t)+1}var J={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:ur(),elastic:mr()};function Pt(e,n,r){return Math.min(r,Math.max(n,e))}function ie(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[r="top",t="bottom"]=n.split(/\s+/).filter(Boolean);return {element:r,viewport:t}}function Ct(e,n,r,t){switch(t){case "top":return e+r;case "center":return e+r+n/2;case "bottom":return e+r+n;default:return e+r}}function $t(e,n){if(/^\d+(\.\d+)?%$/.test(e))return n*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return n/2;case "bottom":return n;default:return n}}function Z(e,n,r,t){return r===n?0:Pt((e-n)/(r-n)*t,0,1)}function Le(e,n,r,t,o){let s=Ct(e.top,e.height,n,t.element)-$t(t.viewport,r),a=Ct(e.top,e.height,n,o.element)-$t(o.viewport,r);return {tStart:s,tEnd:a}}function it(e,n,r){let t=e.getBoundingClientRect(),o=r==="x"?t.width:t.height;return n?{top:r==="x"?t.left-n.getBoundingClientRect().left+n.scrollLeft:t.top-n.getBoundingClientRect().top+n.scrollTop,height:o,scroll:0}:{top:r==="x"?t.left:t.top,height:o,scroll:r==="x"?window.scrollX:window.scrollY}}function Ge(e){let n=e.tagName.toLowerCase();if(n==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(r+t)}if(n==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function kt(e){let n=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(n)return [parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)];let r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(r)return [parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function je(e,n,r){let t=kt(e),o=kt(n);return !t||!o?e:`rgb(${Math.round(t[0]+(o[0]-t[0])*r)},${Math.round(t[1]+(o[1]-t[1])*r)},${Math.round(t[2]+(o[2]-t[2])*r)})`}var Rt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var Ke=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function ve(e,...n){Ke&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var fr="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",pr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Ot=33;function dr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function gr(e){let n=[];for(let r=0;r<Ot;r++){let t=r/(Ot-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function at(e){switch(e){case "linear":return "linear";case "ease-in":return fr;case "ease-out":return pr;case "ease-in-out":return dr()?gr(J["ease-in-out"]):null;default:return null}}var It=Symbol.for("svg-scroll-draw.registry");function Nt(){let e=globalThis;return e[It]||(e[It]=new Map)}function Re(e,n){Nt().set(e,n);}function Oe(e){Nt().delete(e);}var Qe,lt=new Set,ct=new WeakMap,Je=new Map,Ft=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function yr(e){let n=new Set;for(let r of e)for(;r&&r!==document.body;r=r.parentElement)for(let t=r;t;t=t.previousElementSibling)n.add(t);return n}function Ne(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>n();Qe??(Qe=new ResizeObserver(o=>{let s=false;for(let{target:a}of o)ct.get(a)!==Ft(a)&&(s=true),ct.set(a,"");s&&lt.forEach(a=>a());})),lt.add(r);let t=yr(e);return [document.body,document.documentElement].forEach(o=>o&&t.add(o)),t.forEach(o=>{ct.has(o)||ct.set(o,Ft(o)),Je.set(o,(Je.get(o)??0)+1),Qe.observe(o);}),()=>{lt.delete(r)&&(t.forEach(o=>{let s=(Je.get(o)??1)-1;if(s)return void Je.set(o,s);Je.delete(o),Qe?.unobserve(o);}),lt.size||(Qe?.disconnect(),Qe=void 0));}}var hr=0;function br(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Dt(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var Ht=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function wr(e){if(!Ke)return;let n=Dt(e,"stroke");if(!n||n==="none"){ve("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!Ht.has(r)&&!Ht.has(Dt(e,"fill"))&&ve("Element has a fill \u2014 it may obscure the stroke animation.",e);}function vr(e,n,r){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function o(){let s=r==="x"?window.scrollX:window.scrollY,a=e-s,c=n-s,m=r==="x";t.innerHTML=`
3
- <div style="position:absolute;${m?`left:${a}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${a}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
4
- <div style="position:absolute;${m?`left:${c}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${c}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",o,{passive:true}),o(),{el:t,destroy(){window.removeEventListener("scroll",o),t.remove();}}}var zt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Vt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Er(e,n,r){if(!Ke)return;let t=(e.match(Vt)??[]).join("").toUpperCase(),o=(n.match(Vt)??[]).join("").toUpperCase(),s=(e.match(zt)??[]).length,a=(n.match(zt)??[]).length;if(t!==o){ve(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${o||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,r);return}s!==a&&ve(`morphTo: coordinate count differs (${s} \u2192 ${a}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function ht(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let a=parseFloat(s),c=t[o++]??a;return String(+(a+(c-a)*r).toFixed(4))})}function _t(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,o=r?{...Rt[r],...t}:t,s=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:a="path, polyline, line, polygon, rect, circle",speed:c=1,fade:m=false,easing:p="linear",trigger:E={},stagger:P=0,direction:$="forward",once:ee=false,debug:Ee=false,axis:z="y",scrollContainer:me,autoReverse:I=false,delay:q=0,strokeColor:U,strokeWidth:C,fillOpacity:R,waypoints:S,velocityScale:x=false,threshold:A=0,rootMargin:g="0px",repeat:d=0,repeatDelay:V=0,morphTo:T,clip:_,autoplay:ae=false,duration:Se=1e3,native:fe=true,onProgress:X,onStart:F,onComplete:f,onEnter:N,onLeave:M,onEnterBack:k,onLeaveBack:pe}=o,b=_===true?"left":typeof _=="string"?_:false,W=typeof p=="function"?p:J[p]??J.linear,de=ie(E.start??"top bottom"),Fe=ie(E.end??"bottom top"),Te=typeof me=="string"?document.querySelector(me):me??null,Pe=Array.isArray(U)?U[0]:null,ge=Array.isArray(U)?U[1]:typeof U=="string"?U:null,te=Array.isArray(C)?C[0]:null,le=Array.isArray(C)?C[1]:typeof C=="number"?C:null,ce=Array.isArray(R)?R[0]:null,re=Array.isArray(R)?R[1]:typeof R=="number"?R:null;function De(i){let l=i*100;switch(b){case "right":return `inset(0 0 0 ${100-l}%)`;case "top":return `inset(0 0 ${100-l}% 0)`;case "bottom":return `inset(${100-l}% 0 0 0)`;case "center":return `circle(${i*150}% at 50% 50%)`;default:return `inset(0 ${100-l}% 0 0)`}}let B=b?[]:Array.from(e.querySelectorAll(a)),D=[],ye=[],se=0,xe=0,u=P,w=0,G=false,Y=false,O=0,he=false,we=-1,He=[],ue=-1,K=false,Ae=0,ze=0,Ve,mt=null;function wt(){mt?.destroy(),mt=null;}let _e=new Set,vt=NaN,qe=true,tt=-1,Et=performance.now(),We=NaN;function Xe(){return Te?z==="x"?Te.scrollLeft:Te.scrollTop:z==="x"?window.scrollX:window.scrollY}function St(){return Te?z==="x"?Te.clientWidth:Te.clientHeight:z==="x"?window.innerWidth:window.innerHeight}function Tt(){let i=it(e,Te,z);return Le(i,i.scroll,St(),de,Fe)}function or(){let i=xe-se,l=B.length-1,h=Te??document.documentElement,ne=z==="x"?"Width":"Height";if(u=P,P>0&&l>0&&i>0){let Ce=h[`scroll${ne}`]-h[`client${ne}`]-1-se-i/c;Ce>=0&&(u=Math.min(P,Ce/(l*i)));}w=xe+l*u*i;}function xt(){(({tStart:se,tEnd:xe}=Tt())),or(),Ee&&Ke&&(wt(),mt=vr(se,xe,z));}function ft(i,l=Tt){Re(e,{type:"draw",getProgress:()=>i.getProgress(),getTrigger:l});let h=i.destroy;return i.destroy=()=>{h.call(i),Oe(e);},i}function sr(i,l){if(e.style.setProperty("--scroll-draw-progress",String(i)),b){let h=l==="reverse"?1-i:i;e.style.clipPath=De(h);return}B.forEach((h,ne)=>{h.style.strokeDashoffset=l==="reverse"?`${D[ne]*i}`:`${D[ne]*(1-i)}`,m&&(h.style.opacity=l==="reverse"?`${1-i}`:`${i}`),Pe&&ge?h.style.stroke=je(Pe,ge,i):ge&&(h.style.stroke=ge),te!==null&&le!==null?h.style.strokeWidth=`${te+(le-te)*i}`:le!==null&&(h.style.strokeWidth=`${le}`),ce!==null&&re!==null?h.style.fillOpacity=`${ce+(re-ce)*i}`:re!==null&&(h.style.fillOpacity=`${re}`),T&&h.tagName.toLowerCase()==="path"&&ye[ne]&&h.setAttribute("d",ht(ye[ne],T,i));});}function rt(){if(e.style.setProperty("--scroll-draw-progress","0"),b){e.style.clipPath=De(0);return}B.forEach((i,l)=>{i.style.strokeDasharray=`${D[l]}`,i.style.strokeDashoffset=$==="reverse"?"0":`${D[l]}`,m?i.style.opacity=$==="reverse"?"1":"0":i.style.opacity="",Pe&&(i.style.stroke=Pe),te!==null&&(i.style.strokeWidth=`${te}`),ce!==null&&(i.style.fillOpacity=`${ce}`),T&&i.tagName.toLowerCase()==="path"&&ye[l]&&i.setAttribute("d",ye[l]);});}if(B.forEach(i=>{wr(i);let l=Ge(i);D.push(l);let h=i.tagName.toLowerCase()==="path";h?ye.push(i.getAttribute("d")??""):ye.push(""),T&&(h?Er(ye[ye.length-1],T,i):ve(`morphTo only applies to <path> elements \u2014 ignored on <${i.tagName}>.`,i)),s?(i.style.strokeDasharray=`${l}`,i.style.strokeDashoffset=$==="reverse"?`${l}`:"0",m&&(i.style.opacity="1"),ge&&(i.style.stroke=ge),le!==null&&(i.style.strokeWidth=`${le}`),re!==null&&(i.style.fillOpacity=`${re}`),T&&i.tagName.toLowerCase()==="path"&&i.setAttribute("d",T)):(i.style.strokeDasharray=`${l}`,i.style.strokeDashoffset=$==="reverse"?"0":`${l}`,m?i.style.opacity=$==="reverse"?"1":"0":i.style.opacity="",Pe&&(i.style.stroke=Pe),te!==null&&(i.style.strokeWidth=`${te}`),ce!==null&&(i.style.fillOpacity=`${ce}`));}),b){if(s)return e.style.clipPath=De(1),f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=De(0);}else if(s)return f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let At=typeof p=="string"?at(p):null;function ir(){return !(fe===false||!br()||!B.length||!At||b||z!=="y"||Te||c!==1||P!==0||ee||I||x!==false||T||S||d||q>0||X||F||f||N||M||k||pe||U!=null||C!=null||R!=null||(E.start??"top bottom").trim()!=="top bottom"||(E.end??"bottom top").trim()!=="bottom top")}function ar(){let i=++hr,l=`svg-scroll-draw-${i}`,h=`svg-scroll-draw-host-${i}`,ne=`--svg-scroll-draw-${i}`,Ce=$==="reverse"?"0":"var(--ssd-len)",Ie=$==="reverse"?"var(--ssd-len)":"0",ke=`stroke-dashoffset:${Ce};`,L=`stroke-dashoffset:${Ie};`;m&&(ke+=`opacity:${$==="reverse"?1:0};`,L+=`opacity:${$==="reverse"?0:1};`);let H=document.createElement("style");H.setAttribute("data-svg-scroll-draw",""),H.textContent=`@keyframes ${l}{from{${ke}}to{${L}}}.${h}{view-timeline-name:${ne};view-timeline-axis:block;}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${At};animation-fill-mode:both;animation-timeline:${ne};animation-range:cover 0% cover 100%;}`,document.head.appendChild(H),e.classList.add(h);function be(y,oe){y.style.setProperty("--ssd-len",String(D[oe])),y.style.strokeDasharray=`${D[oe]}`,y.style.strokeDashoffset="",y.style.opacity="",y.style.animationPlayState="",y.classList.add(l);}B.forEach(be);let v=false,j=-1;function Q(){if(j>=0)return j;let y=e.getBoundingClientRect(),{tStart:oe,tEnd:$e}=Le({top:y.top,height:y.height},Xe(),St(),de,Fe);return W(Z(Xe(),oe,$e,c))}return {destroy(){e.classList.remove(h),B.forEach(y=>{y.classList.remove(l),y.style.removeProperty("--ssd-len"),y.style.animationPlayState="";}),H.remove();},replay(){v=false,j=-1,B.forEach(be);},pause(){v=true,B.forEach(y=>{y.style.animationPlayState="paused";});},resume(){v&&(v=false,B.forEach(y=>{y.style.animationPlayState="running";}));},seek(y){let oe=Math.min(1,Math.max(0,y));j=oe,v=true,B.forEach(($e,Me)=>{$e.classList.remove(l),$e.style.strokeDashoffset=$==="reverse"?`${D[Me]*oe}`:`${D[Me]*(1-oe)}`,m&&($e.style.opacity=$==="reverse"?`${1-oe}`:`${oe}`);});},getProgress(){return Q()},refresh(){B.forEach((y,oe)=>{D[oe]=Ge(y),y.style.setProperty("--ssd-len",String(D[oe])),y.style.strokeDasharray=`${D[oe]}`;});}}}if(ir())return ft(ar());function lr(){let i=Math.max(1,Se),l=0,h=0,ne=false;function Ce(v){let j=true;if(b){let Q=Math.min(1,Math.max(0,v/i)),y=W(Q);Ae=y,e.style.setProperty("--scroll-draw-progress",String(y)),e.style.clipPath=De($==="reverse"?1-y:y),X?.(y),Q<1&&(j=false);}else B.forEach((Q,y)=>{let oe=y*P*i,$e=Math.min(1,Math.max(0,(v-oe)/i)),Me=W($e);Q.style.strokeDashoffset=$==="reverse"?`${D[y]*Me}`:`${D[y]*(1-Me)}`,m&&(Q.style.opacity=$==="reverse"?`${1-Me}`:`${Me}`),Pe&&ge?Q.style.stroke=je(Pe,ge,Me):ge&&(Q.style.stroke=ge),te!==null&&le!==null?Q.style.strokeWidth=`${te+(le-te)*Me}`:le!==null&&(Q.style.strokeWidth=`${le}`),ce!==null&&re!==null?Q.style.fillOpacity=`${ce+(re-ce)*Me}`:re!==null&&(Q.style.fillOpacity=`${re}`),T&&Q.tagName.toLowerCase()==="path"&&ye[y]&&Q.setAttribute("d",ht(ye[y],T,Me)),y===0&&(Ae=Me,X?.(Me),e.style.setProperty("--scroll-draw-progress",String(Me))),$e<1&&(j=false);});if(S){let Q=Math.min(1,Math.max(0,v/i)),y=W(Q);for(let oe in S){let $e=parseFloat(oe);y>=$e&&!_e.has($e)&&(_e.add($e),S[oe]?.());}}return j}function Ie(v){if(K)return;let j=v-l;Y||(Y=true,F?.());let Q=Ce(j);if(Q&&!G){G=true,Ce(i*(1+Math.max(0,B.length-1)*P)),f?.(),ze<(d==="infinite"?1/0:d??0)&&(ze++,Ve=setTimeout(()=>{l=performance.now(),Y=false,G=false,_e.clear(),rt(),O=requestAnimationFrame(Ie);},V));return}Q||(O=requestAnimationFrame(Ie));}function ke(){cancelAnimationFrame(O),clearTimeout(Ve),l=performance.now(),h=0,K=false,Y=false,G=false,ze=0,ne=true,Ae=0,_e.clear(),rt(),O=requestAnimationFrame(Ie);}let L=new IntersectionObserver(v=>{v.forEach(j=>{j.isIntersecting&&!(ee&&G)?ke():!j.isIntersecting&&!ee&&!G&&(cancelAnimationFrame(O),clearTimeout(Ve),ne=false);});},{root:Te??null,threshold:A,rootMargin:g}),H;function be(){clearTimeout(H),H=setTimeout(()=>{B.forEach((v,j)=>{D[j]=Ge(v),v.style.strokeDasharray=`${D[j]}`;});},150);}return window.addEventListener("resize",be),window.addEventListener("orientationchange",be),q>0?setTimeout(()=>L.observe(e),q):L.observe(e),{destroy(){cancelAnimationFrame(O),clearTimeout(Ve),L.disconnect(),window.removeEventListener("resize",be),window.removeEventListener("orientationchange",be),clearTimeout(H);},replay(){ze=0,ke();},pause(){K||!ne||(K=true,h=performance.now()-l,cancelAnimationFrame(O));},resume(){K&&(K=false,ne=true,l=performance.now()-h,O=requestAnimationFrame(Ie));},seek(v){let j=Math.min(1,Math.max(0,v));Ae=j,K=true,h=j*i,l=performance.now()-h,cancelAnimationFrame(O),Ce(h);},getProgress(){return Ae},refresh(){clearTimeout(H),B.forEach((v,j)=>{D[j]=Ge(v),v.style.strokeDasharray=`${D[j]}`;});}}}if(ae)return ft(lr());xt();function Mt(){if(K||!Be)return;let i=performance.now(),l=Xe();if(!qe&&x===false&&l===vt){dt(l);return}qe=false,vt=l;let h=c;if(x!==false){let L=i-Et,H=L>0?Math.abs(l-(tt<0?l:tt))/L:0;h=c*Math.max(.2,1+H*(typeof x=="number"?x:1)*.04);}tt=l,Et=i;let ne=I?ue===-1||l>=ue?"forward":"reverse":$;ue=l;let Ce=xe-se,Ie=true,ke=Ce===0?0:(l-se)/Ce;if(isNaN(We)||(We<=0&&ke>0?N?.():We>0&&ke<=0&&pe?.(),We<1&&ke>=1?M?.():We>=1&&ke<1&&k?.()),We=ke,b){let L=W(Z(l,se,xe,h));ee&&!I&&(we=Math.max(we,L),L=we),Ae=L,e.style.setProperty("--scroll-draw-progress",String(L));let H=ne==="reverse"?1-L:L;e.style.clipPath=De(H),X?.(L),!Y&&Z(l,se,xe,h)>0&&(Y=true,F?.()),L>=1&&!G?(G=true,f?.(),ze<(d==="infinite"?1/0:d??0)&&(ze++,Ve=setTimeout(()=>{we=-1,Y=false,G=false,e.style.clipPath=De(0);},V))):L<1&&!ee&&(G=false),dt(l);return}if(B.forEach((L,H)=>{let be=H*u*Ce,v=W(Z(l,se+be,xe+be,h));ee&&!I&&(v=He[H]=Math.max(He[H]??we,v)),L.style.strokeDashoffset=ne==="reverse"?`${D[H]*v}`:`${D[H]*(1-v)}`,m&&(L.style.opacity=ne==="reverse"?`${1-v}`:`${v}`),Pe&&ge?L.style.stroke=je(Pe,ge,v):ge&&(L.style.stroke=ge),te!==null&&le!==null?L.style.strokeWidth=`${te+(le-te)*v}`:le!==null&&(L.style.strokeWidth=`${le}`),ce!==null&&re!==null?L.style.fillOpacity=`${ce+(re-ce)*v}`:re!==null&&(L.style.fillOpacity=`${re}`),T&&L.tagName.toLowerCase()==="path"&&ye[H]&&L.setAttribute("d",ht(ye[H],T,v)),H===0&&(Ae=v,X?.(v),e.style.setProperty("--scroll-draw-progress",String(v))),v<1&&(Ie=false);}),S){let L=W(Z(l,se,xe,h));for(let H in S){let be=parseFloat(H);L>=be&&!_e.has(be)&&(_e.add(be),S[H]?.());}}!Y&&Z(l,se,xe,h)>0&&(Y=true,F?.()),Ie&&!G?(G=true,f?.(),ze<(d==="infinite"?1/0:d??0)&&(ze++,Ve=setTimeout(()=>{we=-1,He=[],Y=false,G=false,_e.clear(),rt(),qe=true;},V))):!Ie&&!ee&&(G=false),dt(l);}function pt(i){return i>=xe&&i<w}function dt(i){he||pt(i)?O=requestAnimationFrame(Mt):Be=false;}function gt(){return he||pt(Xe())}let Be=false;function nt(){Be||(Be=true,O=requestAnimationFrame(function(){Mt();}));}function ot(){Be=false,cancelAnimationFrame(O);}let yt=new IntersectionObserver(i=>{i.forEach(l=>{he=l.isIntersecting,he&&!K?(qe=true,nt()):Be&&!K&&pt(Xe())||ot();});},{root:Te??null,threshold:A,rootMargin:g});function Lt(){B.forEach((i,l)=>{D[l]=Ge(i),i.style.strokeDasharray=`${D[l]}`;}),xt(),qe=true;}let st;function Ye(){clearTimeout(st),st=setTimeout(Lt,150);}window.addEventListener("resize",Ye),window.addEventListener("orientationchange",Ye);let cr=Ne([e],Ye);return q>0?setTimeout(()=>yt.observe(e),q):yt.observe(e),ft({destroy(){cancelAnimationFrame(O),clearTimeout(Ve),ot(),yt.disconnect(),cr(),window.removeEventListener("resize",Ye),window.removeEventListener("orientationchange",Ye),clearTimeout(st),wt();},replay(){we=-1,He=[],ue=-1,tt=-1,Y=false,G=false,ze=0,K=false,Ae=0,_e.clear(),clearTimeout(Ve),rt(),qe=true,gt()&&nt();},pause(){K=true,ot();},resume(){K&&(K=false,qe=true,gt()&&nt());},seek(i){let l=Math.min(1,Math.max(0,i));Ae=l,we=l,He=[],K=true,ot(),sr(l,$),qe=true;},getProgress(){return Ae},refresh(){clearTimeout(st),Lt(),gt()&&!K&&nt();}},()=>({tStart:se,tEnd:xe}))}var qt=new WeakMap,Sr=0;function Wt(e){return JSON.stringify(e,(n,r)=>{if(typeof r=="function")return "\u0192";if(typeof Element<"u"&&r instanceof Element){let t=qt.get(r);return t===void 0&&qt.set(r,t=++Sr),`el#${t}`}return r})}function Bt(e,n){let r={...e};for(let t of Object.keys(r))typeof r[t]=="function"&&(r[t]=(...o)=>n()[t]?.(...o));return r}function Tr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Gt(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let o=[],s=[],a=t[2].trim();if(a)for(let c of a.split(/[\s,]+/)){let m=c.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(m?parseFloat(m[1]):0),s.push(m?m[2]:"");}n.push({fn:t[1],nums:o,units:s});}return n}function xr(e,n,r){let t=Gt(e),o=Gt(n);return t.length===0||t.length!==o.length?r<1?e:n:t.map((s,a)=>{let c=o[a];return s.fn!==c.fn||s.nums.length!==c.nums.length?r<1?`${s.fn}(${s.nums.map((m,p)=>`${m}${s.units[p]}`).join(", ")})`:`${c.fn}(${c.nums.map((m,p)=>`${m}${c.units[p]}`).join(", ")})`:`${s.fn}(${s.nums.map((m,p)=>`${m+(c.nums[p]-m)*r}${s.units[p]}`).join(", ")})`}).join(" ")}function jt(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),o=String(n);if(Tr(t))return je(t,o,r);if(t.includes("("))return xr(t,o,r);let s=t.match(/^([-+]?[\d.]+)(.*)$/),a=o.match(/^([-+]?[\d.]+)(.*)$/);if(s&&a){let c=parseFloat(s[1]),m=parseFloat(a[1]);return `${c+(m-c)*r}${s[2]||a[2]}`}return r<1?t:o}function Ar(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Mr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Lr=0,Ut="--scroll-draw-progress";function Pr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Xt(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:t,trigger:o={},easing:s="ease-out",speed:a=1,once:c=false,axis:m="y",scrollContainer:p,native:E=true,velocityScale:P=false,respectReducedMotion:$=true,triggerElement:ee,onProgress:Ee,onComplete:z,onEnter:me,onLeave:I,onEnterBack:q,onLeaveBack:U}=n,C=$&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,R=typeof s=="function"?s:J[s]??J["ease-out"],S=ie(o.start??"top bottom"),x=ie(o.end??"bottom top"),A=ee??e,g=typeof p=="string"?document.querySelector(p):p??null,d=Object.entries(t).map(([u,w])=>({prop:Ar(u),from:Array.isArray(w)?w[0]:"",to:Array.isArray(w)?w[1]:w}));function V(){let u=window.getComputedStyle(e);for(let w of d)w.from===""&&(w.from=u.getPropertyValue(w.prop).trim()||"0");}function T(){for(let u of d)e.style.setProperty(u.prop,String(u.to));}let _=new Map;for(let u of [...d.map(w=>w.prop),Ut])_.set(u,e.style.getPropertyValue(u));function ae(){for(let[u,w]of _)w?e.style.setProperty(u,w):e.style.removeProperty(u);}if(C)return T(),z?.(),{...r,destroy:ae,getProgress:()=>1};V();let Se=typeof s=="string"?at(s):null;function fe(){if(!E||!Pr()||!Se||m!=="y"||g||A!==e||c||a!==1||Ee||z||me||I||q||U||P!==false||(o.start??"top bottom").trim()!=="top bottom"||(o.end??"bottom top").trim()!=="bottom top")return false;for(let u of d)if(!Mr.has(u.prop))return false;return true}function X(){let u=`ssd-a-${++Lr}`,w=d.map(ue=>`${ue.prop}:${ue.from}`).join(";"),G=d.map(ue=>`${ue.prop}:${ue.to}`).join(";"),Y=document.createElement("style");Y.setAttribute("data-ssd-animate",""),Y.textContent=`@keyframes ${u}{from{${w}}to{${G}}}.${u}{animation-name:${u};animation-duration:auto;animation-timing-function:${Se};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(Y),e.classList.add(u);let O=()=>m==="x"?window.scrollX:window.scrollY,he=()=>m==="x"?window.innerWidth:window.innerHeight,we=()=>{let ue=e.getBoundingClientRect();return Le({top:ue.top,height:ue.height},O(),he(),S,x)};Re(e,{type:"animate",getProgress:()=>He.getProgress(),getTrigger:we});let He={refresh(){},destroy(){e.classList.remove(u),Y.remove(),e.style.animationPlayState="",ae(),Oe(e);},replay(){e.classList.remove(u),e.offsetWidth,e.classList.add(u);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(ue){let K=Math.min(1,Math.max(0,ue));e.classList.remove(u);for(let Ae of d)e.style.setProperty(Ae.prop,jt(Ae.from,Ae.to,K));},getProgress(){let{tStart:ue,tEnd:K}=we();return R(Z(O(),ue,K,a))}};return He}if(fe())return X();let F=0,f=0,N=0,M=false,k=false,pe=-1,b=0,W=false,de=NaN,Fe=-1,Te=0,Pe=()=>g?m==="x"?g.scrollLeft:g.scrollTop:m==="x"?window.scrollX:window.scrollY,ge=()=>g?m==="x"?g.clientWidth:g.clientHeight:m==="x"?window.innerWidth:window.innerHeight,te=A===e?d:[],le=false;function ce(){let u=e.style,w=te.map(he=>u.getPropertyValue(he.prop)),G=u.transition;te.length&&(u.transition="none"),te.forEach(he=>u.setProperty(he.prop,_.get(he.prop)??""));let Y=it(A,g,m);te.forEach((he,we)=>u.setProperty(he.prop,w[we])),te.length&&(e.offsetWidth,u.transition=G);let O=Le(Y,Y.scroll,ge(),S,x);le&&Math.abs(O.tStart-F)<1&&Math.abs(O.tEnd-f)<1||(le=true,F=O.tStart,f=O.tEnd);}function re(u){e.style.setProperty(Ut,String(u));for(let w of d)e.style.setProperty(w.prop,jt(w.from,w.to,u));Ee?.(u);}function De(u){if(isNaN(de)){de=u;return}de<=0&&u>0?me?.():de>0&&u<=0&&U?.(),de<1&&u>=1?I?.():de>=1&&u<1&&q?.(),de=u;}function B(){if(!M||k)return;let u=performance.now(),w=Pe(),G=a;if(P!==false){let he=u-Te,we=he>0?Math.abs(w-(Fe<0?w:Fe))/he:0;G=a*Math.max(.2,1+we*(typeof P=="number"?P:1)*.04);}Fe=w,Te=u;let Y=f===F?0:(w-F)/(f-F);De(Y);let O=R(Z(w,F,f,G));c&&(pe=Math.max(pe,O),O=pe),b=O,re(O),O>=1&&!W?(W=true,z?.()):O<1&&!c&&(W=false),N=requestAnimationFrame(B);}ce(),f===F&&ve("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let u=R(Z(Pe(),F,f,a));c&&u>0&&(pe=u),b=u,re(u);}let D=new IntersectionObserver(u=>{u.forEach(w=>{M=w.isIntersecting,M&&!k?N=requestAnimationFrame(B):cancelAnimationFrame(N);});},{root:g??null}),ye;function se(){clearTimeout(ye),ye=setTimeout(ce,150);}window.addEventListener("resize",se),window.addEventListener("orientationchange",se);let xe=Ne([A],se);return D.observe(e),Re(e,{type:"animate",getProgress:()=>b,getTrigger:()=>({tStart:F,tEnd:f})}),{destroy(){cancelAnimationFrame(N),D.disconnect(),window.removeEventListener("resize",se),window.removeEventListener("orientationchange",se),xe(),clearTimeout(ye),ae(),Oe(e);},replay(){pe=-1,W=false,b=0,k=false,re(0);},pause(){k=true,cancelAnimationFrame(N);},resume(){k&&(k=false,M&&(N=requestAnimationFrame(B)));},seek(u){let w=Math.min(1,Math.max(0,u));b=w,pe=w,k=true,cancelAnimationFrame(N),re(w);},getProgress(){return b},refresh(){ce();}}}var bt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Yt(e,n){if(typeof window>"u")return bt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return ve("scrollCounter: element not found:",e),bt;let t=r,{from:o=0,to:s,format:a,easing:c="ease-out",trigger:m={},once:p=true,decimals:E,onComplete:P}=n,$=E!==void 0?f=>f.toFixed(E):a??(f=>String(Math.round(f))),ee=typeof c=="function"?c:J[c]??J["ease-out"],Ee=ie(m.start??"top 80%"),z=ie(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=$(s),P?.(),bt;let I=0,q=0,U=false,C=0,R=false,S=false,x=-1,A=0,g=false,d=()=>window.scrollY,V=()=>window.innerHeight;function T(){let f=t.getBoundingClientRect(),N=Le({top:f.top,height:f.height},d(),V(),Ee,z);U&&Math.abs(N.tStart-I)<1&&Math.abs(N.tEnd-q)<1||(U=true,I=N.tStart,q=N.tEnd);}function _(f){t.textContent=$(o+(s-o)*f),t.style.setProperty("--scroll-draw-progress",String(f));}function ae(){if(!R||S)return;let f=ee(Z(d(),I,q,1));p&&(x=Math.max(x,f),f=x),A=f,_(f),f>=1&&!g?(g=true,P?.()):f<1&&!p&&(g=false),C=requestAnimationFrame(ae);}T();{let f=ee(Z(d(),I,q,1));p&&f>0&&(x=f),A=f,_(f);}let Se=new IntersectionObserver(f=>{f.forEach(N=>{R=N.isIntersecting,R&&!S?C=requestAnimationFrame(ae):cancelAnimationFrame(C);});}),fe;function X(){clearTimeout(fe),fe=setTimeout(T,150);}window.addEventListener("resize",X),window.addEventListener("orientationchange",X);let F=Ne([t],X);return Se.observe(t),Re(t,{type:"counter",getProgress:()=>A,getTrigger:()=>({tStart:I,tEnd:q})}),{destroy(){cancelAnimationFrame(C),Se.disconnect(),window.removeEventListener("resize",X),window.removeEventListener("orientationchange",X),F(),clearTimeout(fe),Oe(t);},replay(){x=-1,g=false,A=0,S=false,_(0);},pause(){S=true,cancelAnimationFrame(C);},resume(){S&&(S=false,R&&(C=requestAnimationFrame(ae)));},seek(f){let N=Math.min(1,Math.max(0,f));A=N,x=N,S=true,cancelAnimationFrame(C),_(N);},getProgress(){return A}}}var Kt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Qt(e,n={}){if(typeof window>"u")return Kt;let r=typeof e=="string"?document.querySelector(e):e;if(!r||r.tagName.toLowerCase()!=="video")return ve("scrollVideo: <video> element not found:",e),Kt;let t=r,{trigger:o={},easing:s="linear",once:a=false,axis:c="y",preload:m="auto",triggerElement:p,onReady:E,onComplete:P,onProgress:$}=n,ee=p??t,Ee=window.matchMedia("(prefers-reduced-motion: reduce)").matches,z=typeof s=="function"?s:J[s]??J.linear,me=ie(o.start??"top top"),I=ie(o.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let q=n.from??0,U=n.to,C=0,R=0,S=0,x=false,A=false,g=-1,d=0,V=false,T=false,_=()=>c==="x"?window.scrollX:window.scrollY,ae=()=>c==="x"?window.innerWidth:window.innerHeight;function Se(){let b=ee.getBoundingClientRect(),W=c==="x"?b.left:b.top,de=c==="x"?b.width:b.height,Fe=Le({top:W,height:de},_(),ae(),me,I);C=Fe.tStart,R=Fe.tEnd,T&&R===C&&ve("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t);}let fe=NaN;function X(b){if(!T)return;let W=U??t.duration??0,de=q+(W-q)*b;de!==fe&&(fe=de,t.currentTime=de),t.style.setProperty("--scroll-draw-progress",String(b)),$?.(b);}function F(){if(!x||A||!T||Ee)return;let b=z(Z(_(),C,R,1));a&&(g=Math.max(g,b),b=g),d=b,X(b),b>=1&&!V?(V=true,P?.()):b<1&&!a&&(V=false),S=requestAnimationFrame(F);}function f(){if(T=true,U===void 0&&(U=t.duration),Ee){X(1),E?.();return}Se(),E?.(),x&&!A&&(S=requestAnimationFrame(F));}t.readyState>=1?f():t.addEventListener("loadedmetadata",f,{once:true}),T||Se();let N=new IntersectionObserver(b=>{b.forEach(W=>{x=W.isIntersecting,x&&!A&&T?S=requestAnimationFrame(F):cancelAnimationFrame(S);});}),M;function k(){clearTimeout(M),M=setTimeout(Se,150);}window.addEventListener("resize",k),window.addEventListener("orientationchange",k);let pe=Ne([ee],k);return N.observe(t),Re(t,{type:"video",getProgress:()=>d,getTrigger:()=>({tStart:C,tEnd:R})}),{destroy(){cancelAnimationFrame(S),N.disconnect(),t.removeEventListener("loadedmetadata",f),window.removeEventListener("resize",k),window.removeEventListener("orientationchange",k),pe(),clearTimeout(M),Oe(t);},replay(){g=-1,V=false,d=0,A=false,fe=NaN,X(0);},pause(){A=true,cancelAnimationFrame(S);},resume(){A&&(A=false,x&&T&&(S=requestAnimationFrame(F)));},seek(b){let W=Math.min(1,Math.max(0,b));d=W,g=W,A=true,cancelAnimationFrame(S),fe=NaN,X(W);},getProgress(){return d}}}function Jt(e,n){let r=document.createElement("span");r.textContent=n,r.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;user-select:none",e.appendChild(r);}function tr(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(r)?(t.textContent=r,t.style.whiteSpace="pre"):(t.textContent=r,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(r)?null:t}).filter(r=>r!==null)}function Cr(e){let n=e.textContent??"";return e.textContent="",n.split("").map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=r,r===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),r===" "?null:t}).filter(r=>r!==null)}function Zt(e){let n=tr(e),r=new Map;for(let s of n){let a=s.offsetTop;r.has(a)||r.set(a,[]),r.get(a).push(s);}let t=[],o=Array.from(r.keys()).sort((s,a)=>s-a);for(let s of o){let a=r.get(s),c=document.createElement("span");c.setAttribute("aria-hidden","true"),c.style.display="inline-block",a.forEach((m,p)=>{let E=m.nextElementSibling;c.appendChild(m),p<a.length-1&&E&&E.style.whiteSpace==="pre"&&c.appendChild(E);}),t.push(c);}return e.textContent="",t.forEach((s,a)=>{e.appendChild(s),a<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function $r(e,n,r,t){if(r<=1||t===0)return e;let o=(r-1)*t,s=n*t,a=s+(1-o);return a<=s?e>=s?1:0:Math.min(1,Math.max(0,(e-s)/(a-s)))}function kr(e,n){let r=[];if(n?.y!==void 0&&r.push(`translateY(${n.y*(1-e)}px)`),n?.x!==void 0&&r.push(`translateX(${n.x*(1-e)}px)`),n?.rotate!==void 0&&r.push(`rotate(${n.rotate*(1-e)}deg)`),n?.scale!==void 0){let t=n.scale+(1-n.scale)*e;r.push(`scale(${t})`);}return r.join(" ")||""}var er={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function rr(e,n={}){if(typeof window>"u")return er;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return ve("scrollText: element not found:",e),er;let t=r,{split:o="words",stagger:s=.04,easing:a="ease-out",from:c={opacity:0,y:24},trigger:m={},once:p=true,onComplete:E}=n,P=window.matchMedia("(prefers-reduced-motion: reduce)").matches,$=typeof a=="function"?a:J[a]??J["ease-out"],ee=ie(m.start??"top 85%"),Ee=ie(m.end??"top 40%"),z=t.innerHTML,me=t.textContent??"",I;o==="chars"?I=Cr(t):o==="lines"?I=Zt(t):I=tr(t),Jt(t,me);let q=I.length;function U(M,k){c?.opacity!==void 0&&(M.style.opacity=String(c.opacity+(1-c.opacity)*k));let pe=kr(k,c);pe&&(M.style.transform=pe);}function C(M){t.style.setProperty("--scroll-draw-progress",String(M)),I.forEach((k,pe)=>{let b=$($r(M,pe,q,s));U(k,b);});}if(P)return C(1),E?.(),{destroy(){t.innerHTML=z;},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};C(0);let R=0,S=0,x=0,A=false,g=false,d=-1,V=0,T=false,_=()=>window.scrollY,ae=()=>window.innerHeight;function Se(){let M=t.getBoundingClientRect(),k=Le({top:M.top,height:M.height},_(),ae(),ee,Ee);R=k.tStart,S=k.tEnd;}function fe(){if(!A||g)return;let M=Z(_(),R,S,1);p&&(d=Math.max(d,M),M=d),V=M,C(M),M>=1&&!T?(T=true,E?.()):M<1&&!p&&(T=false),x=requestAnimationFrame(fe);}Se();let X=new IntersectionObserver(M=>{M.forEach(k=>{A=k.isIntersecting,A&&!g?x=requestAnimationFrame(fe):cancelAnimationFrame(x);});}),F;function f(){clearTimeout(F),F=setTimeout(()=>{if(o==="lines"){let M=V;t.innerHTML=z,I=Zt(t),Jt(t,me),C(M);}Se();},150);}window.addEventListener("resize",f),window.addEventListener("orientationchange",f);let N=Ne([t],f);return X.observe(t),Re(t,{type:"text",getProgress:()=>V,getTrigger:()=>({tStart:R,tEnd:S})}),{destroy(){cancelAnimationFrame(x),X.disconnect(),window.removeEventListener("resize",f),window.removeEventListener("orientationchange",f),N(),clearTimeout(F),t.innerHTML=z,Oe(t);},replay(){d=-1,T=false,V=0,g=false,C(0);},pause(){g=true,cancelAnimationFrame(x);},resume(){g&&(g=false,A&&(x=requestAnimationFrame(fe)));},seek(M){let k=Math.min(1,Math.max(0,M));V=k,d=k,g=true,cancelAnimationFrame(x),C(k);},getProgress(){return V}}}function Ir(e,n={}){let[r,t]=Nr.useState(0),o=Nr.useRef(n);o.current=n;let s=Nr.useRef(-1);return Nr.useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){t(1);return}let a=typeof e=="string"?document.querySelector(e):e.current;if(!a)return;let c=a,{axis:m="y",scrollContainer:p,trigger:E={}}=o.current,P=typeof p=="string"?document.querySelector(p):p??null,$=ie(E.start??"top bottom"),ee=ie(E.end??"bottom top"),Ee=0,z=0,me=false,I=0;function q(){return P?m==="x"?P.scrollLeft:P.scrollTop:m==="x"?window.scrollX:window.scrollY}function U(){return P?m==="x"?P.clientWidth:P.clientHeight:m==="x"?window.innerWidth:window.innerHeight}function C(){let g=c.getBoundingClientRect(),d=q(),V=m==="x"?g.left:g.top,T=m==="x"?g.width:g.height,_=Le({top:V,height:T},d,U(),$,ee);Ee=_.tStart,z=_.tEnd;}function R(){if(!me)return;let{speed:g=1,easing:d="linear",once:V=false}=o.current,T=typeof d=="function"?d:J[d]??J.linear,_=Z(q(),Ee,z,g),ae=T(_);V&&(s.current=Math.max(s.current,ae),ae=s.current),t(ae),I=requestAnimationFrame(R);}let S=new IntersectionObserver(g=>{g.forEach(d=>{me=d.isIntersecting,me?I=requestAnimationFrame(R):cancelAnimationFrame(I);});},{root:P??null,threshold:0});C(),S.observe(c);let x;function A(){clearTimeout(x),x=setTimeout(C,150);}return window.addEventListener("resize",A),window.addEventListener("orientationchange",A),()=>{cancelAnimationFrame(I),clearTimeout(x),S.disconnect(),window.removeEventListener("resize",A),window.removeEventListener("orientationchange",A);}},[]),r}function Ze(e,n,r){let t=Nr.useRef(n);t.current=n;let o=Wt(n);Nr.useEffect(()=>{if(!e.current)return;let s=r(e.current,Bt(t.current,()=>t.current));return ()=>s.destroy()},[o]);}var Dr=/^(data-|aria-)|^(id|role|title|tabIndex|lang|dir|hidden)$/;function et(e){let n={},r={};for(let[t,o]of Object.entries(e))(Dr.test(t)?r:n)[t]=o;return [n,r]}function Xn({children:e,className:n,style:r,...t}){let o=Nr.useRef(null),[s,a]=et(t);return Ze(o,s,_t),jsxRuntime.jsx("div",{ref:o,className:n,style:r,...a,children:e})}function Yn({children:e,className:n,style:r,...t}){let o=Nr.useRef(null),[s,a]=et(t);return Ze(o,s,Xt),jsxRuntime.jsx("div",{ref:o,className:n,style:r,...a,children:e})}function Kn({className:e,style:n,...r}){let t=Nr.useRef(null),[o,s]=et(r);return Ze(t,o,Yt),jsxRuntime.jsx("span",{ref:t,className:e,style:n,...s})}function Qn({src:e,className:n,style:r,muted:t=true,playsInline:o=true,...s}){let a=Nr.useRef(null),[c,m]=et(s);return Ze(a,c,Qt),jsxRuntime.jsx("video",{...m,ref:a,src:e,className:n,style:r,muted:t,playsInline:o,preload:"auto"})}function Jn({children:e,as:n="p",className:r,style:t,...o}){let s=Nr.useRef(null),[a,c]=et(o);return Ze(s,a,rr),Nr__default.default.createElement(n,{...c,ref:s,className:r,style:t},e)}exports.ScrollAnimate=Yn;exports.ScrollCounter=Kn;exports.ScrollDraw=Xn;exports.ScrollText=Jn;exports.ScrollVideo=Qn;exports.useScrollDrawProgress=Ir;
2
+ 'use strict';var qn=require('react'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var qn__default=/*#__PURE__*/_interopDefault(qn);function gn({bounces:e=3,decay:r=.5}={}){let t=Math.max(1,Math.round(e)),n=Math.max(.01,Math.min(.99,r)),o=Math.sqrt(n),s=0,a=[];for(let d=0;d<t;d++){let x=Math.pow(o,d);a.push(x),s+=x;}let m=[0],u=0;for(let d=0;d<t;d++)u+=a[d]/s,m.push(u);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let x=0;x<t;x++)if(d<=m[x+1]){let P=(d-m[x])/(m[x+1]-m[x]);if(x===0)return P*(2-P);let C=1-Math.pow(n,x);return C+(1-C)*(2*P-1)*(2*P-1)}return 1}}function yn({amplitude:e=1,period:r=.4}={}){let t=Math.max(1,e),n=Math.max(.1,r),o=t<=1?n/4:n/(2*Math.PI)*Math.asin(1/t);return s=>s<=0?0:s>=1?1:t*Math.pow(2,-10*s)*Math.sin((s-o)*(2*Math.PI)/n)+1}var J={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:gn(),elastic:yn()};function $t(e,r,t){return Math.min(t,Math.max(r,e))}function le(e="top bottom"){let r=e.trim();if(/^\d+(\.\d+)?%$/.test(r))return {element:"top",viewport:r};let[t="top",n="bottom"]=r.split(/\s+/).filter(Boolean);return {element:t,viewport:n}}function kt(e,r,t,n){switch(n){case "top":return e+t;case "center":return e+t+r/2;case "bottom":return e+t+r;default:return e+t}}function Rt(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 Z(e,r,t,n){return t===r?0:$t((e-r)/(t-r)*n,0,1)}function Se(e,r,t,n,o){let s=kt(e.top,e.height,r,n.element)-Rt(n.viewport,t),a=kt(e.top,e.height,r,o.element)-Rt(o.viewport,t);return {tStart:s,tEnd:a}}function lt(e,r,t){let n=e.getBoundingClientRect(),o=t==="x"?n.width:n.height;return r?{top:t==="x"?n.left-r.getBoundingClientRect().left+r.scrollLeft:n.top-r.getBoundingClientRect().top+r.scrollTop,height:o,scroll:0}:{top:t==="x"?n.left:n.top,height:o,scroll:t==="x"?window.scrollX:window.scrollY}}function Ge(e){let r=e.tagName.toLowerCase();if(r==="rect"){let t=parseFloat(e.getAttribute("width")??"0"),n=parseFloat(e.getAttribute("height")??"0");return 2*(t+n)}if(r==="circle"){let t=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*t}return e.getTotalLength()}function Ot(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 t=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(t)return [parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)];let n=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return n?[parseInt(n[1]),parseInt(n[2]),parseInt(n[3])]:null}function Qe(e,r,t){let n=Ot(e),o=Ot(r);return !n||!o?e:`rgb(${Math.round(n[0]+(o[0]-n[0])*t)},${Math.round(n[1]+(o[1]-n[1])*t)},${Math.round(n[2]+(o[2]-n[2])*t)})`}var It={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var Je=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function we(e,...r){Je&&console.warn(`[svg-scroll-draw] ${e}`,...r);}var hn="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",bn="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Dt=33;function wn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function vn(e){let r=[];for(let t=0;t<Dt;t++){let n=t/(Dt-1);r.push(String(Math.round(e(n)*1e5)/1e5));}return `linear(${r.join(",")})`}function ct(e){switch(e){case "linear":return "linear";case "ease-in":return hn;case "ease-out":return bn;case "ease-in-out":return wn()?vn(J["ease-in-out"]):null;default:return null}}var Ft=Symbol.for("svg-scroll-draw.registry");function Nt(){let e=globalThis;return e[Ft]||(e[Ft]=new Map)}function $e(e,r){Nt().set(e,r);}function ke(e){Nt().delete(e);}var Ze,ut=new Set,mt=new WeakMap,et=new Map,Ht=e=>{let r=e.getBoundingClientRect();return r.width+" "+r.height};function En(e){let r=new Set;for(let t of e)for(;t&&t!==document.body;t=t.parentElement)for(let n=t;n;n=n.previousElementSibling)r.add(n);return r}function De(e,r){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let t=()=>r();Ze??(Ze=new ResizeObserver(o=>{let s=false;for(let{target:a}of o)mt.get(a)!==Ht(a)&&(s=true),mt.set(a,"");s&&ut.forEach(a=>a());})),ut.add(t);let n=En(e);return [document.body,document.documentElement].forEach(o=>o&&n.add(o)),n.forEach(o=>{mt.has(o)||mt.set(o,Ht(o)),et.set(o,(et.get(o)??0)+1),Ze.observe(o);}),()=>{ut.delete(t)&&(n.forEach(o=>{let s=(et.get(o)??1)-1;if(s)return void et.set(o,s);et.delete(o),Ze?.unobserve(o);}),ut.size||(Ze?.disconnect(),Ze=void 0));}}function Ue(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let r=window.matchMedia("(prefers-reduced-motion: reduce)"),t=o=>e(!!o.matches);if(typeof r.addEventListener=="function")return r.addEventListener("change",t),()=>r.removeEventListener("change",t);let n=r;return n.addListener?.(t),()=>n.removeListener?.(t)}function qe(e,r){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return r(e,true);let t=r(e,false),n=Ue(s=>{if(!s)return;n();let a=(t.getProgress?.()??0)>=1;t.destroy(),t=r(a?{...e,onComplete:void 0}:e,true);}),o={};for(let s of Object.keys(t))o[s]=(...a)=>t[s]?.(...a);return o.destroy=()=>{n(),t.destroy();},o}var Sn=0;function Tn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function zt(e,r){let t="";try{t=getComputedStyle(e).getPropertyValue(r).trim();}catch{}return t||(e.getAttribute(r)??"").trim()}var Vt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function xn(e){if(!Je)return;let r=zt(e,"stroke");if(!r||r==="none"){we("Element has no stroke \u2014 path will not be visible.",e);return}let t=(e.getAttribute("fill")??"").trim();t&&!Vt.has(t)&&!Vt.has(zt(e,"fill"))&&we("Element has a fill \u2014 it may obscure the stroke animation.",e);}function Mn(e,r,t){let n=document.createElement("div");n.setAttribute("data-svg-scroll-draw-debug",""),n.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function o(){let s=t==="x"?window.scrollX:window.scrollY,a=e-s,m=r-s,u=t==="x";n.innerHTML=`
3
+ <div style="position:absolute;${u?`left:${a}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${a}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
4
+ <div style="position:absolute;${u?`left:${m}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${m}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(n),window.addEventListener("scroll",o,{passive:true}),o(),{el:n,destroy(){window.removeEventListener("scroll",o),n.remove();}}}var _t=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Wt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Ln(e,r,t){if(!Je)return;let n=(e.match(Wt)??[]).join("").toUpperCase(),o=(r.match(Wt)??[]).join("").toUpperCase(),s=(e.match(_t)??[]).length,a=(r.match(_t)??[]).length;if(n!==o){we(`morphTo: command sequence differs (${n||"\u2205"} \u2192 ${o||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,t);return}s!==a&&we(`morphTo: coordinate count differs (${s} \u2192 ${a}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,t);}function wt(e,r,t){let n=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let a=parseFloat(s),m=n[o++]??a;return String(+(a+(m-a)*t).toFixed(4))})}function qt(e,r={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:qe(r,(t,n)=>An(e,t,n))}function An(e,r,t){let{preset:n,...o}=r,s=n?{...It[n],...o}:o,{selector:a="path, polyline, line, polygon, rect, circle",speed:m=1,fade:u=false,easing:d="linear",trigger:x={},stagger:P=0,direction:C="forward",once:j=false,debug:oe=false,axis:O="y",scrollContainer:Q,autoReverse:U=false,delay:I=0,strokeColor:H,strokeWidth:$,fillOpacity:M,waypoints:y,velocityScale:h=false,threshold:v=0,rootMargin:_="0px",repeat:S=0,repeatDelay:D=0,morphTo:T,clip:ee,autoplay:se=false,duration:X=1e3,native:W=true,onProgress:f,onStart:k,onComplete:w,onEnter:N,onLeave:ce,onEnterBack:ye,onLeaveBack:Te}=s,ie=ee===true?"left":typeof ee=="string"?ee:false,L=typeof d=="function"?d:J[d]??J.linear,he=le(x.start??"top bottom"),Ae=le(x.end??"bottom top"),fe=typeof Q=="string"?document.querySelector(Q):Q??null,pe=Array.isArray(H)?H[0]:null,ue=Array.isArray(H)?H[1]:typeof H=="string"?H:null,me=Array.isArray($)?$[0]:null,te=Array.isArray($)?$[1]:typeof $=="number"?$:null,be=Array.isArray(M)?M[0]:null,ae=Array.isArray(M)?M[1]:typeof M=="number"?M:null;function Re(i){let c=i*100;switch(ie){case "right":return `inset(0 0 0 ${100-c}%)`;case "top":return `inset(0 0 ${100-c}% 0)`;case "bottom":return `inset(${100-c}% 0 0 0)`;case "center":return `circle(${i*150}% at 50% 50%)`;default:return `inset(0 ${100-c}% 0 0)`}}let q=ie?[]:Array.from(e.querySelectorAll(a)),F=[],ve=[],l=0,p=0,Pe=P,xe=0,R=false,V=false,Y=0,He=false,G=-1,Fe=[],ze=-1,de=false,Oe=0,Ne=0,Ve,pt=null;function Et(){pt?.destroy(),pt=null;}let _e=new Set,St=NaN,We=true,rt=-1,Tt=performance.now(),Be=NaN;function Ye(){return fe?O==="x"?fe.scrollLeft:fe.scrollTop:O==="x"?window.scrollX:window.scrollY}function xt(){return fe?O==="x"?fe.clientWidth:fe.clientHeight:O==="x"?window.innerWidth:window.innerHeight}function Mt(){let i=lt(e,fe,O);return Se(i,i.scroll,xt(),he,Ae)}function cn(){let i=p-l,c=q.length-1,b=fe??document.documentElement,ne=O==="x"?"Width":"Height";if(Pe=P,P>0&&c>0&&i>0){let Me=b[`scroll${ne}`]-b[`client${ne}`]-1-l-i/m;Me>=0&&(Pe=Math.min(P,Me/(c*i)));}xe=p+c*Pe*i;}function Lt(){(({tStart:l,tEnd:p}=Mt())),cn(),oe&&Je&&(Et(),pt=Mn(l,p,O));}function dt(i,c=Mt){$e(e,{type:"draw",getProgress:()=>i.getProgress(),getTrigger:c});let b=i.destroy;return i.destroy=()=>{b.call(i),ke(e);},i}function un(i,c){if(e.style.setProperty("--scroll-draw-progress",String(i)),ie){let b=c==="reverse"?1-i:i;e.style.clipPath=Re(b);return}q.forEach((b,ne)=>{b.style.strokeDashoffset=c==="reverse"?`${F[ne]*i}`:`${F[ne]*(1-i)}`,u&&(b.style.opacity=c==="reverse"?`${1-i}`:`${i}`),pe&&ue?b.style.stroke=Qe(pe,ue,i):ue&&(b.style.stroke=ue),me!==null&&te!==null?b.style.strokeWidth=`${me+(te-me)*i}`:te!==null&&(b.style.strokeWidth=`${te}`),be!==null&&ae!==null?b.style.fillOpacity=`${be+(ae-be)*i}`:ae!==null&&(b.style.fillOpacity=`${ae}`),T&&b.tagName.toLowerCase()==="path"&&ve[ne]&&b.setAttribute("d",wt(ve[ne],T,i));});}function ot(){if(e.style.setProperty("--scroll-draw-progress","0"),ie){e.style.clipPath=Re(0);return}q.forEach((i,c)=>{i.style.strokeDasharray=`${F[c]}`,i.style.strokeDashoffset=C==="reverse"?"0":`${F[c]}`,u?i.style.opacity=C==="reverse"?"1":"0":i.style.opacity="",pe&&(i.style.stroke=pe),me!==null&&(i.style.strokeWidth=`${me}`),be!==null&&(i.style.fillOpacity=`${be}`),T&&i.tagName.toLowerCase()==="path"&&ve[c]&&i.setAttribute("d",ve[c]);});}if(q.forEach(i=>{xn(i);let c=Ge(i);F.push(c);let b=i.tagName.toLowerCase()==="path";b?ve.push(i.getAttribute("d")??""):ve.push(""),T&&(b?Ln(ve[ve.length-1],T,i):we(`morphTo only applies to <path> elements \u2014 ignored on <${i.tagName}>.`,i)),t?(i.style.strokeDasharray=`${c}`,i.style.strokeDashoffset=C==="reverse"?`${c}`:"0",u&&(i.style.opacity="1"),ue&&(i.style.stroke=ue),te!==null&&(i.style.strokeWidth=`${te}`),ae!==null&&(i.style.fillOpacity=`${ae}`),T&&i.tagName.toLowerCase()==="path"&&i.setAttribute("d",T)):(i.style.strokeDasharray=`${c}`,i.style.strokeDashoffset=C==="reverse"?"0":`${c}`,u?i.style.opacity=C==="reverse"?"1":"0":i.style.opacity="",pe&&(i.style.stroke=pe),me!==null&&(i.style.strokeWidth=`${me}`),be!==null&&(i.style.fillOpacity=`${be}`));}),ie){if(t)return e.style.clipPath=Re(1),w?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Re(0);}else if(t)return w?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let At=typeof d=="string"?ct(d):null;function mn(){return !(W===false||!Tn()||!q.length||!At||ie||O!=="y"||fe||m!==1||P!==0||j||U||h!==false||T||y||S||I>0||f||k||w||N||ce||ye||Te||H!=null||$!=null||M!=null||(x.start??"top bottom").trim()!=="top bottom"||(x.end??"bottom top").trim()!=="bottom top")}function fn(){let i=++Sn,c=`svg-scroll-draw-${i}`,b=`svg-scroll-draw-host-${i}`,ne=`--svg-scroll-draw-${i}`,Me=C==="reverse"?"0":"var(--ssd-len)",Ie=C==="reverse"?"var(--ssd-len)":"0",Ce=`stroke-dashoffset:${Me};`,A=`stroke-dashoffset:${Ie};`;u&&(Ce+=`opacity:${C==="reverse"?1:0};`,A+=`opacity:${C==="reverse"?0:1};`);let z=document.createElement("style");z.setAttribute("data-svg-scroll-draw",""),z.textContent=`@keyframes ${c}{from{${Ce}}to{${A}}}.${b}{view-timeline-name:${ne};view-timeline-axis:block;}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${At};animation-fill-mode:both;animation-timeline:${ne};animation-range:cover 0% cover 100%;}`,document.head.appendChild(z),e.classList.add(b);function ge(g,re){g.style.setProperty("--ssd-len",String(F[re])),g.style.strokeDasharray=`${F[re]}`,g.style.strokeDashoffset="",g.style.opacity="",g.style.animationPlayState="",g.classList.add(c);}q.forEach(ge);let E=false,B=-1;function K(){if(B>=0)return B;let g=e.getBoundingClientRect(),{tStart:re,tEnd:Le}=Se({top:g.top,height:g.height},Ye(),xt(),he,Ae);return L(Z(Ye(),re,Le,m))}return {destroy(){e.classList.remove(b),q.forEach(g=>{g.classList.remove(c),g.style.removeProperty("--ssd-len"),g.style.animationPlayState="";}),z.remove();},replay(){E=false,B=-1,q.forEach(ge);},pause(){E=true,q.forEach(g=>{g.style.animationPlayState="paused";});},resume(){E&&(E=false,q.forEach(g=>{g.style.animationPlayState="running";}));},seek(g){let re=Math.min(1,Math.max(0,g));B=re,E=true,q.forEach((Le,Ee)=>{Le.classList.remove(c),Le.style.strokeDashoffset=C==="reverse"?`${F[Ee]*re}`:`${F[Ee]*(1-re)}`,u&&(Le.style.opacity=C==="reverse"?`${1-re}`:`${re}`);});},getProgress(){return K()},refresh(){q.forEach((g,re)=>{F[re]=Ge(g),g.style.setProperty("--ssd-len",String(F[re])),g.style.strokeDasharray=`${F[re]}`;});}}}if(mn())return dt(fn());function pn(){let i=Math.max(1,X),c=0,b=0,ne=false;function Me(E){let B=true;if(ie){let K=Math.min(1,Math.max(0,E/i)),g=L(K);Oe=g,e.style.setProperty("--scroll-draw-progress",String(g)),e.style.clipPath=Re(C==="reverse"?1-g:g),f?.(g),K<1&&(B=false);}else q.forEach((K,g)=>{let re=g*P*i,Le=Math.min(1,Math.max(0,(E-re)/i)),Ee=L(Le);K.style.strokeDashoffset=C==="reverse"?`${F[g]*Ee}`:`${F[g]*(1-Ee)}`,u&&(K.style.opacity=C==="reverse"?`${1-Ee}`:`${Ee}`),pe&&ue?K.style.stroke=Qe(pe,ue,Ee):ue&&(K.style.stroke=ue),me!==null&&te!==null?K.style.strokeWidth=`${me+(te-me)*Ee}`:te!==null&&(K.style.strokeWidth=`${te}`),be!==null&&ae!==null?K.style.fillOpacity=`${be+(ae-be)*Ee}`:ae!==null&&(K.style.fillOpacity=`${ae}`),T&&K.tagName.toLowerCase()==="path"&&ve[g]&&K.setAttribute("d",wt(ve[g],T,Ee)),g===0&&(Oe=Ee,f?.(Ee),e.style.setProperty("--scroll-draw-progress",String(Ee))),Le<1&&(B=false);});if(y){let K=Math.min(1,Math.max(0,E/i)),g=L(K);for(let re in y){let Le=parseFloat(re);g>=Le&&!_e.has(Le)&&(_e.add(Le),y[re]?.());}}return B}function Ie(E){if(de)return;let B=E-c;V||(V=true,k?.());let K=Me(B);if(K&&!R){R=true,Me(i*(1+Math.max(0,q.length-1)*P)),w?.(),Ne<(S==="infinite"?1/0:S??0)&&(Ne++,Ve=setTimeout(()=>{c=performance.now(),V=false,R=false,_e.clear(),ot(),Y=requestAnimationFrame(Ie);},D));return}K||(Y=requestAnimationFrame(Ie));}function Ce(){cancelAnimationFrame(Y),clearTimeout(Ve),c=performance.now(),b=0,de=false,V=false,R=false,Ne=0,ne=true,Oe=0,_e.clear(),ot(),Y=requestAnimationFrame(Ie);}let A=new IntersectionObserver(E=>{E.forEach(B=>{B.isIntersecting&&!(j&&R)?Ce():!B.isIntersecting&&!j&&!R&&(cancelAnimationFrame(Y),clearTimeout(Ve),ne=false);});},{root:fe??null,threshold:v,rootMargin:_}),z;function ge(){clearTimeout(z),z=setTimeout(()=>{q.forEach((E,B)=>{F[B]=Ge(E),E.style.strokeDasharray=`${F[B]}`;});},150);}return window.addEventListener("resize",ge),window.addEventListener("orientationchange",ge),I>0?setTimeout(()=>A.observe(e),I):A.observe(e),{destroy(){cancelAnimationFrame(Y),clearTimeout(Ve),A.disconnect(),window.removeEventListener("resize",ge),window.removeEventListener("orientationchange",ge),clearTimeout(z);},replay(){Ne=0,Ce();},pause(){de||!ne||(de=true,b=performance.now()-c,cancelAnimationFrame(Y));},resume(){de&&(de=false,ne=true,c=performance.now()-b,Y=requestAnimationFrame(Ie));},seek(E){let B=Math.min(1,Math.max(0,E));Oe=B,de=true,b=B*i,c=performance.now()-b,cancelAnimationFrame(Y),Me(b);},getProgress(){return Oe},refresh(){clearTimeout(z),q.forEach((E,B)=>{F[B]=Ge(E),E.style.strokeDasharray=`${F[B]}`;});}}}if(se)return dt(pn());Lt();function Pt(){if(de||!je)return;let i=performance.now(),c=Ye();if(!We&&h===false&&c===St){yt(c);return}We=false,St=c;let b=m;if(h!==false){let A=i-Tt,z=A>0?Math.abs(c-(rt<0?c:rt))/A:0;b=m*Math.max(.2,1+z*(typeof h=="number"?h:1)*.04);}rt=c,Tt=i;let ne=U?ze===-1||c>=ze?"forward":"reverse":C;ze=c;let Me=p-l,Ie=true,Ce=Me===0?0:(c-l)/Me;if(isNaN(Be)||(Be<=0&&Ce>0?N?.():Be>0&&Ce<=0&&Te?.(),Be<1&&Ce>=1?ce?.():Be>=1&&Ce<1&&ye?.()),Be=Ce,ie){let A=L(Z(c,l,p,b));j&&!U&&(G=Math.max(G,A),A=G),Oe=A,e.style.setProperty("--scroll-draw-progress",String(A));let z=ne==="reverse"?1-A:A;e.style.clipPath=Re(z),f?.(A),!V&&Z(c,l,p,b)>0&&(V=true,k?.()),A>=1&&!R?(R=true,w?.(),Ne<(S==="infinite"?1/0:S??0)&&(Ne++,Ve=setTimeout(()=>{G=-1,V=false,R=false,e.style.clipPath=Re(0);},D))):A<1&&!j&&(R=false),yt(c);return}if(q.forEach((A,z)=>{let ge=z*Pe*Me,E=L(Z(c,l+ge,p+ge,b));j&&!U&&(E=Fe[z]=Math.max(Fe[z]??G,E)),A.style.strokeDashoffset=ne==="reverse"?`${F[z]*E}`:`${F[z]*(1-E)}`,u&&(A.style.opacity=ne==="reverse"?`${1-E}`:`${E}`),pe&&ue?A.style.stroke=Qe(pe,ue,E):ue&&(A.style.stroke=ue),me!==null&&te!==null?A.style.strokeWidth=`${me+(te-me)*E}`:te!==null&&(A.style.strokeWidth=`${te}`),be!==null&&ae!==null?A.style.fillOpacity=`${be+(ae-be)*E}`:ae!==null&&(A.style.fillOpacity=`${ae}`),T&&A.tagName.toLowerCase()==="path"&&ve[z]&&A.setAttribute("d",wt(ve[z],T,E)),z===0&&(Oe=E,f?.(E),e.style.setProperty("--scroll-draw-progress",String(E))),E<1&&(Ie=false);}),y){let A=L(Z(c,l,p,b));for(let z in y){let ge=parseFloat(z);A>=ge&&!_e.has(ge)&&(_e.add(ge),y[z]?.());}}!V&&Z(c,l,p,b)>0&&(V=true,k?.()),Ie&&!R?(R=true,w?.(),Ne<(S==="infinite"?1/0:S??0)&&(Ne++,Ve=setTimeout(()=>{G=-1,Fe=[],V=false,R=false,_e.clear(),ot(),We=true;},D))):!Ie&&!j&&(R=false),yt(c);}function gt(i){return i>=p&&i<xe}function yt(i){He||gt(i)?Y=requestAnimationFrame(Pt):je=false;}function ht(){return He||gt(Ye())}let je=false;function st(){je||(je=true,Y=requestAnimationFrame(function(){Pt();}));}function it(){je=false,cancelAnimationFrame(Y);}let bt=new IntersectionObserver(i=>{i.forEach(c=>{He=c.isIntersecting,He&&!de?(We=true,st()):je&&!de&&gt(Ye())||it();});},{root:fe??null,threshold:v,rootMargin:_});function Ct(){q.forEach((i,c)=>{F[c]=Ge(i),i.style.strokeDasharray=`${F[c]}`;}),Lt(),We=true;}let at;function Ke(){clearTimeout(at),at=setTimeout(Ct,150);}window.addEventListener("resize",Ke),window.addEventListener("orientationchange",Ke);let dn=De([e],Ke);return I>0?setTimeout(()=>bt.observe(e),I):bt.observe(e),dt({destroy(){cancelAnimationFrame(Y),clearTimeout(Ve),it(),bt.disconnect(),dn(),window.removeEventListener("resize",Ke),window.removeEventListener("orientationchange",Ke),clearTimeout(at),Et();},replay(){G=-1,Fe=[],ze=-1,rt=-1,V=false,R=false,Ne=0,de=false,Oe=0,_e.clear(),clearTimeout(Ve),ot(),We=true,ht()&&st();},pause(){de=true,it();},resume(){de&&(de=false,We=true,ht()&&st());},seek(i){let c=Math.min(1,Math.max(0,i));Oe=c,G=c,Fe=[],de=true,it(),un(c,C),We=true;},getProgress(){return Oe},refresh(){clearTimeout(at),Ct(),ht()&&!de&&st();}},()=>({tStart:l,tEnd:p}))}var Bt=new WeakMap,Pn=0;function jt(e){return JSON.stringify(e,(r,t)=>{if(typeof t=="function")return "\u0192";if(typeof Element<"u"&&t instanceof Element){let n=Bt.get(t);return n===void 0&&Bt.set(t,n=++Pn),`el#${n}`}return t})}function Gt(e,r){let t={...e};for(let n of Object.keys(t))typeof t[n]=="function"&&(t[n]=(...o)=>r()[n]?.(...o));return t}function Cn(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Qt(e){let r=[],t=/([\w]+)\(([^)]*)\)/g,n;for(;(n=t.exec(e))!==null;){let o=[],s=[],a=n[2].trim();if(a)for(let m of a.split(/[\s,]+/)){let u=m.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(u?parseFloat(u[1]):0),s.push(u?u[2]:"");}r.push({fn:n[1],nums:o,units:s});}return r}function $n(e,r,t){let n=Qt(e),o=Qt(r);return n.length===0||n.length!==o.length?t<1?e:r:n.map((s,a)=>{let m=o[a];return s.fn!==m.fn||s.nums.length!==m.nums.length?t<1?`${s.fn}(${s.nums.map((u,d)=>`${u}${s.units[d]}`).join(", ")})`:`${m.fn}(${m.nums.map((u,d)=>`${u}${m.units[d]}`).join(", ")})`:`${s.fn}(${s.nums.map((u,d)=>`${u+(m.nums[d]-u)*t}${s.units[d]}`).join(", ")})`}).join(" ")}function Ut(e,r,t){if(typeof e=="number"&&typeof r=="number")return String(e+(r-e)*t);let n=String(e),o=String(r);if(Cn(n))return Qe(n,o,t);if(n.includes("("))return $n(n,o,t);let s=n.match(/^([-+]?[\d.]+)(.*)$/),a=o.match(/^([-+]?[\d.]+)(.*)$/);if(s&&a){let m=parseFloat(s[1]),u=parseFloat(a[1]);return `${m+(u-m)*t}${s[2]||a[2]}`}return t<1?n:o}function kn(e){return e.replace(/([A-Z])/g,r=>`-${r.toLowerCase()}`)}var Rn=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),On=0,Xt="--scroll-draw-progress";function In(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var Kt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Jt(e,r){return typeof window>"u"?Kt:r.respectReducedMotion===false?Yt(e,r,false):qe(r,(t,n)=>Yt(e,t,n))}function Yt(e,r,t){let{props:n,trigger:o={},easing:s="ease-out",speed:a=1,once:m=false,axis:u="y",scrollContainer:d,native:x=true,velocityScale:P=false,triggerElement:C,onProgress:j,onComplete:oe,onEnter:O,onLeave:Q,onEnterBack:U,onLeaveBack:I}=r,H=typeof s=="function"?s:J[s]??J["ease-out"],$=le(o.start??"top bottom"),M=le(o.end??"bottom top"),y=C??e,h=typeof d=="string"?document.querySelector(d):d??null,v=Object.entries(n).map(([l,p])=>({prop:kn(l),from:Array.isArray(p)?p[0]:"",to:Array.isArray(p)?p[1]:p}));function _(){let l=window.getComputedStyle(e);for(let p of v)p.from===""&&(p.from=l.getPropertyValue(p.prop).trim()||"0");}function S(){for(let l of v)e.style.setProperty(l.prop,String(l.to));}let D=new Map;for(let l of [...v.map(p=>p.prop),Xt])D.set(l,e.style.getPropertyValue(l));function T(){for(let[l,p]of D)p?e.style.setProperty(l,p):e.style.removeProperty(l);}if(t)return S(),oe?.(),{...Kt,destroy:T,getProgress:()=>1};_();let ee=typeof s=="string"?ct(s):null;function se(){if(!x||!In()||!ee||u!=="y"||h||y!==e||m||a!==1||j||oe||O||Q||U||I||P!==false||(o.start??"top bottom").trim()!=="top bottom"||(o.end??"bottom top").trim()!=="bottom top")return false;for(let l of v)if(!Rn.has(l.prop))return false;return true}function X(){let l=`ssd-a-${++On}`,p=v.map(G=>`${G.prop}:${G.from}`).join(";"),Pe=v.map(G=>`${G.prop}:${G.to}`).join(";"),xe=document.createElement("style");xe.setAttribute("data-ssd-animate",""),xe.textContent=`@keyframes ${l}{from{${p}}to{${Pe}}}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${ee};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(xe),e.classList.add(l);let R=()=>u==="x"?window.scrollX:window.scrollY,V=()=>u==="x"?window.innerWidth:window.innerHeight,Y=()=>{let G=e.getBoundingClientRect();return Se({top:G.top,height:G.height},R(),V(),$,M)};$e(e,{type:"animate",getProgress:()=>He.getProgress(),getTrigger:Y});let He={refresh(){},destroy(){e.classList.remove(l),xe.remove(),e.style.animationPlayState="",T(),ke(e);},replay(){e.classList.remove(l),e.offsetWidth,e.classList.add(l);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(G){let Fe=Math.min(1,Math.max(0,G));e.classList.remove(l);for(let ze of v)e.style.setProperty(ze.prop,Ut(ze.from,ze.to,Fe));},getProgress(){let{tStart:G,tEnd:Fe}=Y();return H(Z(R(),G,Fe,a))}};return He}if(se())return X();let W=0,f=0,k=0,w=false,N=false,ce=-1,ye=0,Te=false,ie=NaN,L=-1,he=0,Ae=()=>h?u==="x"?h.scrollLeft:h.scrollTop:u==="x"?window.scrollX:window.scrollY,fe=()=>h?u==="x"?h.clientWidth:h.clientHeight:u==="x"?window.innerWidth:window.innerHeight,pe=y===e?v:[],ue=false;function me(){let l=e.style,p=pe.map(V=>l.getPropertyValue(V.prop)),Pe=l.transition;pe.length&&(l.transition="none"),pe.forEach(V=>l.setProperty(V.prop,D.get(V.prop)??""));let xe=lt(y,h,u);pe.forEach((V,Y)=>l.setProperty(V.prop,p[Y])),pe.length&&(e.offsetWidth,l.transition=Pe);let R=Se(xe,xe.scroll,fe(),$,M);ue&&Math.abs(R.tStart-W)<1&&Math.abs(R.tEnd-f)<1||(ue=true,W=R.tStart,f=R.tEnd);}function te(l){e.style.setProperty(Xt,String(l));for(let p of v)e.style.setProperty(p.prop,Ut(p.from,p.to,l));j?.(l);}function be(l){if(isNaN(ie)){ie=l;return}ie<=0&&l>0?O?.():ie>0&&l<=0&&I?.(),ie<1&&l>=1?Q?.():ie>=1&&l<1&&U?.(),ie=l;}function ae(){if(!w||N)return;let l=performance.now(),p=Ae(),Pe=a;if(P!==false){let V=l-he,Y=V>0?Math.abs(p-(L<0?p:L))/V:0;Pe=a*Math.max(.2,1+Y*(typeof P=="number"?P:1)*.04);}L=p,he=l;let xe=f===W?0:(p-W)/(f-W);be(xe);let R=H(Z(p,W,f,Pe));m&&(ce=Math.max(ce,R),R=ce),ye=R,te(R),R>=1&&!Te?(Te=true,oe?.()):R<1&&!m&&(Te=false),k=requestAnimationFrame(ae);}me(),f===W&&we("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let l=H(Z(Ae(),W,f,a));m&&l>0&&(ce=l),ye=l,te(l);}let Re=new IntersectionObserver(l=>{l.forEach(p=>{w=p.isIntersecting,w&&!N?k=requestAnimationFrame(ae):cancelAnimationFrame(k);});},{root:h??null}),q;function F(){clearTimeout(q),q=setTimeout(me,150);}window.addEventListener("resize",F),window.addEventListener("orientationchange",F);let ve=De([y],F);return Re.observe(e),$e(e,{type:"animate",getProgress:()=>ye,getTrigger:()=>({tStart:W,tEnd:f})}),{destroy(){cancelAnimationFrame(k),Re.disconnect(),window.removeEventListener("resize",F),window.removeEventListener("orientationchange",F),ve(),clearTimeout(q),T(),ke(e);},replay(){ce=-1,Te=false,ye=0,N=false,te(0);},pause(){N=true,cancelAnimationFrame(k);},resume(){N&&(N=false,w&&(k=requestAnimationFrame(ae)));},seek(l){let p=Math.min(1,Math.max(0,l));ye=p,ce=p,N=true,cancelAnimationFrame(k),te(p);},getProgress(){return ye},refresh(){me();}}}var vt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Zt(e,r){if(typeof window>"u")return vt;let t=typeof e=="string"?document.querySelector(e):e;return t?qe(r,(n,o)=>Dn(t,n,o)):(we("scrollCounter: element not found:",e),vt)}function Dn(e,r,t){let{from:n=0,to:o,format:s,easing:a="ease-out",trigger:m={},once:u=true,decimals:d,onComplete:x}=r,P=d!==void 0?f=>f.toFixed(d):s??(f=>String(Math.round(f))),C=typeof a=="function"?a:J[a]??J["ease-out"],j=le(m.start??"top 80%"),oe=le(m.end??"top 20%");if(t)return e.textContent=P(o),x?.(),{...vt,getProgress:()=>1};let O=0,Q=0,U=false,I=0,H=false,$=false,M=-1,y=0,h=false,v=()=>window.scrollY,_=()=>window.innerHeight;function S(){let f=e.getBoundingClientRect(),k=Se({top:f.top,height:f.height},v(),_(),j,oe);U&&Math.abs(k.tStart-O)<1&&Math.abs(k.tEnd-Q)<1||(U=true,O=k.tStart,Q=k.tEnd);}function D(f){e.textContent=P(n+(o-n)*f),e.style.setProperty("--scroll-draw-progress",String(f));}function T(){if(!H||$)return;let f=C(Z(v(),O,Q,1));u&&(M=Math.max(M,f),f=M),y=f,D(f),f>=1&&!h?(h=true,x?.()):f<1&&!u&&(h=false),I=requestAnimationFrame(T);}S();{let f=C(Z(v(),O,Q,1));u&&f>0&&(M=f),y=f,D(f);}let ee=new IntersectionObserver(f=>{f.forEach(k=>{H=k.isIntersecting,H&&!$?I=requestAnimationFrame(T):cancelAnimationFrame(I);});}),se;function X(){clearTimeout(se),se=setTimeout(S,150);}window.addEventListener("resize",X),window.addEventListener("orientationchange",X);let W=De([e],X);return ee.observe(e),$e(e,{type:"counter",getProgress:()=>y,getTrigger:()=>({tStart:O,tEnd:Q})}),{destroy(){cancelAnimationFrame(I),ee.disconnect(),window.removeEventListener("resize",X),window.removeEventListener("orientationchange",X),W(),clearTimeout(se),ke(e);},replay(){M=-1,h=false,y=0,$=false,D(0);},pause(){$=true,cancelAnimationFrame(I);},resume(){$&&($=false,H&&(I=requestAnimationFrame(T)));},seek(f){let k=Math.min(1,Math.max(0,f));y=k,M=k,$=true,cancelAnimationFrame(I),D(k);},getProgress(){return y}}}var en={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function tn(e,r={}){if(typeof window>"u")return en;let t=typeof e=="string"?document.querySelector(e):e;if(!t||t.tagName.toLowerCase()!=="video")return we("scrollVideo: <video> element not found:",e),en;let n=t,{trigger:o={},easing:s="linear",once:a=false,axis:m="y",preload:u="auto",triggerElement:d,onReady:x,onComplete:P,onProgress:C}=r,j=d??n,oe=window.matchMedia("(prefers-reduced-motion: reduce)").matches,O=typeof s=="function"?s:J[s]??J.linear,Q=le(o.start??"top top"),U=le(o.end??"bottom top");n.pause(),n.hasAttribute("preload")||(n.preload=u);let I=r.from??0,H=r.to,$=0,M=0,y=0,h=false,v=false,_=-1,S=0,D=false,T=false,ee=()=>m==="x"?window.scrollX:window.scrollY,se=()=>m==="x"?window.innerWidth:window.innerHeight;function X(){let L=j.getBoundingClientRect(),he=m==="x"?L.left:L.top,Ae=m==="x"?L.width:L.height,fe=Se({top:he,height:Ae},ee(),se(),Q,U);$=fe.tStart,M=fe.tEnd,T&&M===$&&we("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",n);}let W=NaN;function f(L){if(!T)return;let he=H??n.duration??0,Ae=I+(he-I)*L;Ae!==W&&(W=Ae,n.currentTime=Ae),n.style.setProperty("--scroll-draw-progress",String(L)),C?.(L);}function k(){if(!h||v||!T||oe)return;let L=O(Z(ee(),$,M,1));a&&(_=Math.max(_,L),L=_),S=L,f(L),L>=1&&!D?(D=true,P?.()):L<1&&!a&&(D=false),y=requestAnimationFrame(k);}function w(){if(T=true,H===void 0&&(H=n.duration),oe){f(1),x?.();return}X(),x?.(),h&&!v&&(y=requestAnimationFrame(k));}n.readyState>=1?w():n.addEventListener("loadedmetadata",w,{once:true}),T||X();let N=oe?()=>{}:Ue(L=>{L&&(N(),oe=true,cancelAnimationFrame(y),f(1));}),ce=new IntersectionObserver(L=>{L.forEach(he=>{h=he.isIntersecting,h&&!v&&T?y=requestAnimationFrame(k):cancelAnimationFrame(y);});}),ye;function Te(){clearTimeout(ye),ye=setTimeout(X,150);}window.addEventListener("resize",Te),window.addEventListener("orientationchange",Te);let ie=De([j],Te);return ce.observe(n),$e(n,{type:"video",getProgress:()=>S,getTrigger:()=>({tStart:$,tEnd:M})}),{destroy(){cancelAnimationFrame(y),ce.disconnect(),n.removeEventListener("loadedmetadata",w),window.removeEventListener("resize",Te),window.removeEventListener("orientationchange",Te),ie(),N(),clearTimeout(ye),ke(n);},replay(){_=-1,D=false,S=0,v=false,W=NaN,f(0);},pause(){v=true,cancelAnimationFrame(y);},resume(){v&&(v=false,h&&T&&(y=requestAnimationFrame(k)));},seek(L){let he=Math.min(1,Math.max(0,L));S=he,_=he,v=true,cancelAnimationFrame(y),W=NaN,f(he);},getProgress(){return S}}}function nn(e,r){let t=document.createElement("span");t.textContent=r,t.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;user-select:none",e.appendChild(t);}function sn(e){let r=e.textContent??"";return e.textContent="",r.split(/(\s+)/).filter(Boolean).map(t=>{let n=document.createElement("span");return n.setAttribute("aria-hidden","true"),/^\s+$/.test(t)?(n.textContent=t,n.style.whiteSpace="pre"):(n.textContent=t,n.style.display="inline-block"),e.appendChild(n),/^\s+$/.test(t)?null:n}).filter(t=>t!==null)}function Fn(e){let r=e.textContent??"";return e.textContent="",r.split("").map(t=>{let n=document.createElement("span");return n.setAttribute("aria-hidden","true"),n.textContent=t,t===" "?n.style.whiteSpace="pre":n.style.display="inline-block",e.appendChild(n),t===" "?null:n}).filter(t=>t!==null)}function rn(e){let r=sn(e),t=new Map;for(let s of r){let a=s.offsetTop;t.has(a)||t.set(a,[]),t.get(a).push(s);}let n=[],o=Array.from(t.keys()).sort((s,a)=>s-a);for(let s of o){let a=t.get(s),m=document.createElement("span");m.setAttribute("aria-hidden","true"),m.style.display="inline-block",a.forEach((u,d)=>{let x=u.nextElementSibling;m.appendChild(u),d<a.length-1&&x&&x.style.whiteSpace==="pre"&&m.appendChild(x);}),n.push(m);}return e.textContent="",n.forEach((s,a)=>{e.appendChild(s),a<n.length-1&&e.appendChild(document.createTextNode(" "));}),n}function Nn(e,r,t,n){if(t<=1||n===0)return e;let o=(t-1)*n,s=r*n,a=s+(1-o);return a<=s?e>=s?1:0:Math.min(1,Math.max(0,(e-s)/(a-s)))}function Hn(e,r){let t=[];if(r?.y!==void 0&&t.push(`translateY(${r.y*(1-e)}px)`),r?.x!==void 0&&t.push(`translateX(${r.x*(1-e)}px)`),r?.rotate!==void 0&&t.push(`rotate(${r.rotate*(1-e)}deg)`),r?.scale!==void 0){let n=r.scale+(1-r.scale)*e;t.push(`scale(${n})`);}return t.join(" ")||""}var on={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function an(e,r={}){if(typeof window>"u")return on;let t=typeof e=="string"?document.querySelector(e):e;if(!t)return we("scrollText: element not found:",e),on;let n=t;return qe(r,(o,s)=>zn(n,o,s))}function zn(e,r,t){let{split:n="words",stagger:o=.04,easing:s="ease-out",from:a={opacity:0,y:24},trigger:m={},once:u=true,onComplete:d}=r,x=typeof s=="function"?s:J[s]??J["ease-out"],P=le(m.start??"top 85%"),C=le(m.end??"top 40%"),j=e.innerHTML,oe=e.textContent??"",O;n==="chars"?O=Fn(e):n==="lines"?O=rn(e):O=sn(e),nn(e,oe);let Q=O.length;function U(w,N){a?.opacity!==void 0&&(w.style.opacity=String(a.opacity+(1-a.opacity)*N));let ce=Hn(N,a);ce&&(w.style.transform=ce);}function I(w){e.style.setProperty("--scroll-draw-progress",String(w)),O.forEach((N,ce)=>{let ye=x(Nn(w,ce,Q,o));U(N,ye);});}if(t)return I(1),d?.(),{destroy(){e.innerHTML=j;},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};I(0);let H=0,$=0,M=0,y=false,h=false,v=-1,_=0,S=false,D=()=>window.scrollY,T=()=>window.innerHeight;function ee(){let w=e.getBoundingClientRect(),N=Se({top:w.top,height:w.height},D(),T(),P,C);H=N.tStart,$=N.tEnd;}function se(){if(!y||h)return;let w=Z(D(),H,$,1);u&&(v=Math.max(v,w),w=v),_=w,I(w),w>=1&&!S?(S=true,d?.()):w<1&&!u&&(S=false),M=requestAnimationFrame(se);}ee();let X=new IntersectionObserver(w=>{w.forEach(N=>{y=N.isIntersecting,y&&!h?M=requestAnimationFrame(se):cancelAnimationFrame(M);});}),W;function f(){clearTimeout(W),W=setTimeout(()=>{if(n==="lines"){let w=_;e.innerHTML=j,O=rn(e),nn(e,oe),I(w);}ee();},150);}window.addEventListener("resize",f),window.addEventListener("orientationchange",f);let k=De([e],f);return X.observe(e),$e(e,{type:"text",getProgress:()=>_,getTrigger:()=>({tStart:H,tEnd:$})}),{destroy(){cancelAnimationFrame(M),X.disconnect(),window.removeEventListener("resize",f),window.removeEventListener("orientationchange",f),k(),clearTimeout(W),e.innerHTML=j,ke(e);},replay(){v=-1,S=false,_=0,h=false,I(0);},pause(){h=true,cancelAnimationFrame(M);},resume(){h&&(h=false,y&&(M=requestAnimationFrame(se)));},seek(w){let N=Math.min(1,Math.max(0,w));_=N,v=N,h=true,cancelAnimationFrame(M),I(N);},getProgress(){return _}}}function Wn(e,r={}){let[t,n]=qn.useState(0),o=qn.useRef(r);o.current=r;let s=qn.useRef(-1);return qn.useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){n(1);return}let a=typeof e=="string"?document.querySelector(e):e.current;if(!a)return;let m=a,{axis:u="y",scrollContainer:d,trigger:x={}}=o.current,P=typeof d=="string"?document.querySelector(d):d??null,C=le(x.start??"top bottom"),j=le(x.end??"bottom top"),oe=0,O=0,Q=false,U=0;function I(){return P?u==="x"?P.scrollLeft:P.scrollTop:u==="x"?window.scrollX:window.scrollY}function H(){return P?u==="x"?P.clientWidth:P.clientHeight:u==="x"?window.innerWidth:window.innerHeight}function $(){let S=m.getBoundingClientRect(),D=I(),T=u==="x"?S.left:S.top,ee=u==="x"?S.width:S.height,se=Se({top:T,height:ee},D,H(),C,j);oe=se.tStart,O=se.tEnd;}function M(){if(!Q)return;let{speed:S=1,easing:D="linear",once:T=false}=o.current,ee=typeof D=="function"?D:J[D]??J.linear,se=Z(I(),oe,O,S),X=ee(se);T&&(s.current=Math.max(s.current,X),X=s.current),n(X),U=requestAnimationFrame(M);}let y=new IntersectionObserver(S=>{S.forEach(D=>{Q=D.isIntersecting,Q?U=requestAnimationFrame(M):cancelAnimationFrame(U);});},{root:P??null,threshold:0});$(),y.observe(m);let h;function v(){clearTimeout(h),h=setTimeout($,150);}window.addEventListener("resize",v),window.addEventListener("orientationchange",v);let _=Ue(S=>{S&&(_(),cancelAnimationFrame(U),y.disconnect(),n(1));});return ()=>{_(),cancelAnimationFrame(U),clearTimeout(h),y.disconnect(),window.removeEventListener("resize",v),window.removeEventListener("orientationchange",v);}},[]),t}function tt(e,r,t){let n=qn.useRef(r);n.current=r;let o=jt(r);qn.useEffect(()=>{if(!e.current)return;let s=t(e.current,Gt(n.current,()=>n.current));return ()=>s.destroy()},[o]);}var jn=/^(data-|aria-)|^(id|role|title|tabIndex|lang|dir|hidden)$/;function nt(e){let r={},t={};for(let[n,o]of Object.entries(e))(jn.test(n)?t:r)[n]=o;return [r,t]}function uo({children:e,className:r,style:t,...n}){let o=qn.useRef(null),[s,a]=nt(n);return tt(o,s,qt),jsxRuntime.jsx("div",{ref:o,className:r,style:t,...a,children:e})}function mo({children:e,className:r,style:t,...n}){let o=qn.useRef(null),[s,a]=nt(n);return tt(o,s,Jt),jsxRuntime.jsx("div",{ref:o,className:r,style:t,...a,children:e})}function fo({className:e,style:r,...t}){let n=qn.useRef(null),[o,s]=nt(t);return tt(n,o,Zt),jsxRuntime.jsx("span",{ref:n,className:e,style:r,...s})}function po({src:e,className:r,style:t,muted:n=true,playsInline:o=true,...s}){let a=qn.useRef(null),[m,u]=nt(s);return tt(a,m,tn),jsxRuntime.jsx("video",{...u,ref:a,src:e,className:r,style:t,muted:n,playsInline:o,preload:"auto"})}function go({children:e,as:r="p",className:t,style:n,...o}){let s=qn.useRef(null),[a,m]=nt(o);return tt(s,a,an),qn__default.default.createElement(r,{...m,ref:s,className:t,style:n},e)}exports.ScrollAnimate=mo;exports.ScrollCounter=fo;exports.ScrollDraw=uo;exports.ScrollText=go;exports.ScrollVideo=po;exports.useScrollDrawProgress=Wn;
@@ -1,6 +1,6 @@
1
1
  import React, { RefObject } from 'react';
2
2
  import { E as EasingName, T as TriggerConfig, a as ScrollDrawOptions } from '../types-MswK0erX.mjs';
3
- import { S as ScrollAnimateOptions } from '../engine-P8u6OK4m.mjs';
3
+ import { S as ScrollAnimateOptions } from '../engine-o1VSQ1lX.mjs';
4
4
  import { S as ScrollCounterOptions } from '../index-CdaBYn3A.mjs';
5
5
  import { ScrollVideoOptions } from '../video/index.mjs';
6
6
  import { ScrollTextOptions } from '../text/index.mjs';
@@ -1,6 +1,6 @@
1
1
  import React, { RefObject } from 'react';
2
2
  import { E as EasingName, T as TriggerConfig, a as ScrollDrawOptions } from '../types-MswK0erX.js';
3
- import { S as ScrollAnimateOptions } from '../engine-DQyBzZDl.js';
3
+ import { S as ScrollAnimateOptions } from '../engine-B7UpB4fT.js';
4
4
  import { S as ScrollCounterOptions } from '../index-D3o4vT3e.js';
5
5
  import { ScrollVideoOptions } from '../video/index.js';
6
6
  import { ScrollTextOptions } from '../text/index.js';
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import {a as a$1,b as b$1}from'../chunk-XSVTHCLO.mjs';import {a as a$4}from'../chunk-7SBTYJGH.mjs';import {a as a$5}from'../chunk-426RAN5I.mjs';import {a as a$3}from'../chunk-KHQ7OGQK.mjs';import {a as a$2}from'../chunk-BFX2CSQ3.mjs';import {b as b$2}from'../chunk-ENACACPZ.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import {a,c,b}from'../chunk-A4JCC3QQ.mjs';import {d as d$1}from'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';import Y,{useState,useRef,useEffect}from'react';import {jsx}from'react/jsx-runtime';function K(n,t={}){let[o,e]=useState(0),r=useRef(t);r.current=t;let s=useRef(-1);return useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){e(1);return}let i=typeof n=="string"?document.querySelector(n):n.current;if(!i)return;let u=i,{axis:l="y",scrollContainer:E,trigger:h={}}=r.current,a$1=typeof E=="string"?document.querySelector(E):E??null,X=a(h.start??"top bottom"),$=a(h.end??"bottom top"),A=0,C=0,O=false,g=0;function D(){return a$1?l==="x"?a$1.scrollLeft:a$1.scrollTop:l==="x"?window.scrollX:window.scrollY}function B(){return a$1?l==="x"?a$1.clientWidth:a$1.clientHeight:l==="x"?window.innerWidth:window.innerHeight}function N(){let c$1=u.getBoundingClientRect(),p=D(),x=l==="x"?c$1.left:c$1.top,R=l==="x"?c$1.width:c$1.height,y=c({top:x,height:R},p,B(),X,$);A=y.tStart,C=y.tEnd;}function L(){if(!O)return;let{speed:c=1,easing:p="linear",once:x=false}=r.current,R=typeof p=="function"?p:d$1[p]??d$1.linear,y=b(D(),A,C,c),T=R(y);x&&(s.current=Math.max(s.current,T),T=s.current),e(T),g=requestAnimationFrame(L);}let H=new IntersectionObserver(c=>{c.forEach(p=>{O=p.isIntersecting,O?g=requestAnimationFrame(L):cancelAnimationFrame(g);});},{root:a$1??null,threshold:0});N(),H.observe(u);let b$1;function S(){clearTimeout(b$1),b$1=setTimeout(N,150);}return window.addEventListener("resize",S),window.addEventListener("orientationchange",S),()=>{cancelAnimationFrame(g),clearTimeout(b$1),H.disconnect(),window.removeEventListener("resize",S),window.removeEventListener("orientationchange",S);}},[]),o}function d(n,t,o){let e=useRef(t);e.current=t;let r=a$1(t);useEffect(()=>{if(!n.current)return;let s=o(n.current,b$1(e.current,()=>e.current));return ()=>s.destroy()},[r]);}var Z=/^(data-|aria-)|^(id|role|title|tabIndex|lang|dir|hidden)$/;function f(n){let t={},o={};for(let[e,r]of Object.entries(n))(Z.test(e)?o:t)[e]=r;return [t,o]}function pe({children:n,className:t,style:o,...e}){let r=useRef(null),[s,i]=f(e);return d(r,s,b$2),jsx("div",{ref:r,className:t,style:o,...i,children:n})}function ue({children:n,className:t,style:o,...e}){let r=useRef(null),[s,i]=f(e);return d(r,s,a$2),jsx("div",{ref:r,className:t,style:o,...i,children:n})}function me({className:n,style:t,...o}){let e=useRef(null),[r,s]=f(o);return d(e,r,a$3),jsx("span",{ref:e,className:n,style:t,...s})}function de({src:n,className:t,style:o,muted:e=true,playsInline:r=true,...s}){let i=useRef(null),[u,l]=f(s);return d(i,u,a$4),jsx("video",{...l,ref:i,src:n,className:t,style:o,muted:e,playsInline:r,preload:"auto"})}function fe({children:n,as:t="p",className:o,style:e,...r}){let s=useRef(null),[i,u]=f(r);return d(s,i,a$5),Y.createElement(t,{...u,ref:s,className:o,style:e},n)}export{ue as ScrollAnimate,me as ScrollCounter,pe as ScrollDraw,fe as ScrollText,de as ScrollVideo,K as useScrollDrawProgress};
2
+ import {a as a$2,b as b$1}from'../chunk-XSVTHCLO.mjs';import {a as a$5}from'../chunk-KV3WCPQ5.mjs';import {a as a$6}from'../chunk-DY5JCXVR.mjs';import {a as a$4}from'../chunk-WXUOF4NM.mjs';import {a as a$3}from'../chunk-LTCJVVSC.mjs';import {b as b$2}from'../chunk-HX4SP5WN.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-2PYLM3E7.mjs';import {a,c,b}from'../chunk-A4JCC3QQ.mjs';import {d}from'../chunk-DM6EDKWH.mjs';import {a as a$1}from'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';import Z,{useState,useRef,useEffect}from'react';import {jsx}from'react/jsx-runtime';function Q(n,t={}){let[o,e]=useState(0),r=useRef(t);r.current=t;let s=useRef(-1);return useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){e(1);return}let i=typeof n=="string"?document.querySelector(n):n.current;if(!i)return;let u=i,{axis:c$1="y",scrollContainer:E,trigger:A={}}=r.current,a$2=typeof E=="string"?document.querySelector(E):E??null,B=a(A.start??"top bottom"),G=a(A.end??"bottom top"),C=0,D=0,O=false,d$1=0;function N(){return a$2?c$1==="x"?a$2.scrollLeft:a$2.scrollTop:c$1==="x"?window.scrollX:window.scrollY}function J(){return a$2?c$1==="x"?a$2.clientWidth:a$2.clientHeight:c$1==="x"?window.innerWidth:window.innerHeight}function L(){let l=u.getBoundingClientRect(),m=N(),R=c$1==="x"?l.left:l.top,T=c$1==="x"?l.width:l.height,y=c({top:R,height:T},m,J(),B,G);C=y.tStart,D=y.tEnd;}function M(){if(!O)return;let{speed:l=1,easing:m="linear",once:R=false}=r.current,T=typeof m=="function"?m:d[m]??d.linear,y=b(N(),C,D,l),v=T(y);R&&(s.current=Math.max(s.current,v),v=s.current),e(v),d$1=requestAnimationFrame(M);}let b$1=new IntersectionObserver(l=>{l.forEach(m=>{O=m.isIntersecting,O?d$1=requestAnimationFrame(M):cancelAnimationFrame(d$1);});},{root:a$2??null,threshold:0});L(),b$1.observe(u);let x;function S(){clearTimeout(x),x=setTimeout(L,150);}window.addEventListener("resize",S),window.addEventListener("orientationchange",S);let H=a$1(l=>{l&&(H(),cancelAnimationFrame(d$1),b$1.disconnect(),e(1));});return ()=>{H(),cancelAnimationFrame(d$1),clearTimeout(x),b$1.disconnect(),window.removeEventListener("resize",S),window.removeEventListener("orientationchange",S);}},[]),o}function f(n,t,o){let e=useRef(t);e.current=t;let r=a$2(t);useEffect(()=>{if(!n.current)return;let s=o(n.current,b$1(e.current,()=>e.current));return ()=>s.destroy()},[r]);}var ee=/^(data-|aria-)|^(id|role|title|tabIndex|lang|dir|hidden)$/;function g(n){let t={},o={};for(let[e,r]of Object.entries(n))(ee.test(e)?o:t)[e]=r;return [t,o]}function de({children:n,className:t,style:o,...e}){let r=useRef(null),[s,i]=g(e);return f(r,s,b$2),jsx("div",{ref:r,className:t,style:o,...i,children:n})}function fe({children:n,className:t,style:o,...e}){let r=useRef(null),[s,i]=g(e);return f(r,s,a$3),jsx("div",{ref:r,className:t,style:o,...i,children:n})}function ge({className:n,style:t,...o}){let e=useRef(null),[r,s]=g(o);return f(e,r,a$4),jsx("span",{ref:e,className:n,style:t,...s})}function Se({src:n,className:t,style:o,muted:e=true,playsInline:r=true,...s}){let i=useRef(null),[u,c]=g(s);return f(i,u,a$5),jsx("video",{...c,ref:i,src:n,className:t,style:o,muted:e,playsInline:r,preload:"auto"})}function ye({children:n,as:t="p",className:o,style:e,...r}){let s=useRef(null),[i,u]=g(r);return f(s,i,a$6),Z.createElement(t,{...u,ref:s,className:o,style:e},n)}export{fe as ScrollAnimate,ge as ScrollCounter,de as ScrollDraw,ye as ScrollText,Se as ScrollVideo,Q as useScrollDrawProgress};