svg-scroll-draw 2.25.0 → 2.26.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/README.md +116 -15
  2. package/dist/angular/index.cjs +3 -3
  3. package/dist/angular/index.d.mts +60 -6
  4. package/dist/angular/index.d.ts +60 -6
  5. package/dist/angular/index.mjs +1 -1
  6. package/dist/astro/index.cjs +2 -2
  7. package/dist/astro/index.d.mts +3 -3
  8. package/dist/astro/index.d.ts +3 -3
  9. package/dist/astro/index.mjs +1 -1
  10. package/dist/cdn/svg-scroll-draw.dev.global.js +71 -34
  11. package/dist/cdn/svg-scroll-draw.global.js +2 -2
  12. package/dist/{chunk-NX74KN5X.mjs → chunk-5U4JXBHR.mjs} +1 -1
  13. package/dist/chunk-7LDSB4FT.mjs +1 -0
  14. package/dist/chunk-ASCOHQQD.mjs +2 -0
  15. package/dist/chunk-GBFWTY5L.mjs +1 -0
  16. package/dist/chunk-HAGTU5EX.mjs +1 -0
  17. package/dist/chunk-HJTHOZK5.mjs +1 -0
  18. package/dist/chunk-IJPLLT7E.mjs +1 -0
  19. package/dist/chunk-IXR6RML7.mjs +1 -0
  20. package/dist/chunk-KN2YB54Z.mjs +1 -0
  21. package/dist/chunk-NJV6S5LD.mjs +1 -0
  22. package/dist/chunk-OGFXZCKC.mjs +1 -0
  23. package/dist/chunk-UBH4K5YD.mjs +1 -0
  24. package/dist/chunk-UF3MO5XQ.mjs +1 -0
  25. package/dist/chunk-XLXVGQ3P.mjs +3 -0
  26. package/dist/chunk-YOOPMYT6.mjs +1 -0
  27. package/dist/cinematic/index.cjs +2 -2
  28. package/dist/cinematic/index.d.mts +3 -1
  29. package/dist/cinematic/index.d.ts +3 -1
  30. package/dist/cinematic/index.mjs +1 -1
  31. package/dist/{engine-6VsjEwzb.d.ts → engine-Bi2x8-X-.d.mts} +2 -2
  32. package/dist/{engine-BLWKCfxC.d.mts → engine-DAlvk6i0.d.ts} +2 -2
  33. package/dist/frames/index.cjs +1 -1
  34. package/dist/frames/index.d.mts +2 -2
  35. package/dist/frames/index.d.ts +2 -2
  36. package/dist/frames/index.mjs +1 -1
  37. package/dist/group/index.cjs +3 -3
  38. package/dist/group/index.d.mts +3 -3
  39. package/dist/group/index.d.ts +3 -3
  40. package/dist/group/index.mjs +1 -1
  41. package/dist/horizontal/index.cjs +1 -1
  42. package/dist/horizontal/index.d.mts +2 -2
  43. package/dist/horizontal/index.d.ts +2 -2
  44. package/dist/horizontal/index.mjs +1 -1
  45. package/dist/{index-BN8yKeQ3.d.ts → index-BMMZ8aW7.d.mts} +2 -2
  46. package/dist/{index-hSQqLVbg.d.ts → index-CEMsUTEG.d.ts} +3 -3
  47. package/dist/{index-DAiRJgtF.d.mts → index-ClAFxNEp.d.mts} +3 -3
  48. package/dist/{index-DVjblK_4.d.mts → index-MdQ4ti_z.d.ts} +2 -2
  49. package/dist/index.cjs +4 -4
  50. package/dist/index.d.mts +6 -6
  51. package/dist/index.d.ts +6 -6
  52. package/dist/index.mjs +1 -1
  53. package/dist/lenis/index.cjs +1 -1
  54. package/dist/lenis/index.d.mts +15 -16
  55. package/dist/lenis/index.d.ts +15 -16
  56. package/dist/lenis/index.mjs +1 -1
  57. package/dist/nuxt/index.cjs +3 -3
  58. package/dist/nuxt/index.d.mts +4 -3
  59. package/dist/nuxt/index.d.ts +4 -3
  60. package/dist/nuxt/index.mjs +1 -1
  61. package/dist/progress/index.cjs +1 -1
  62. package/dist/progress/index.d.mts +2 -2
  63. package/dist/progress/index.d.ts +2 -2
  64. package/dist/progress/index.mjs +1 -1
  65. package/dist/react/index.cjs +2 -2
  66. package/dist/react/index.d.mts +4 -4
  67. package/dist/react/index.d.ts +4 -4
  68. package/dist/react/index.mjs +1 -1
  69. package/dist/reveal/index.cjs +1 -1
  70. package/dist/reveal/index.d.mts +2 -2
  71. package/dist/reveal/index.d.ts +2 -2
  72. package/dist/reveal/index.mjs +1 -1
  73. package/dist/{scroll-draw-Fzir8hlU.d.mts → scroll-draw-CKZysh22.d.mts} +1 -1
  74. package/dist/{scroll-draw-BsU_Ohmu.d.ts → scroll-draw-DbY8RUJE.d.ts} +1 -1
  75. package/dist/snap/index.cjs +1 -1
  76. package/dist/snap/index.d.mts +2 -2
  77. package/dist/snap/index.d.ts +2 -2
  78. package/dist/snap/index.mjs +1 -1
  79. package/dist/solid/index.cjs +3 -3
  80. package/dist/solid/index.d.mts +40 -4
  81. package/dist/solid/index.d.ts +40 -4
  82. package/dist/solid/index.mjs +1 -1
  83. package/dist/svelte/index.cjs +3 -3
  84. package/dist/svelte/index.d.mts +47 -4
  85. package/dist/svelte/index.d.ts +47 -4
  86. package/dist/svelte/index.mjs +1 -1
  87. package/dist/text/index.cjs +1 -1
  88. package/dist/text/index.d.mts +2 -2
  89. package/dist/text/index.d.ts +2 -2
  90. package/dist/text/index.mjs +1 -1
  91. package/dist/timeline/index.cjs +10 -10
  92. package/dist/timeline/index.d.mts +2 -2
  93. package/dist/timeline/index.d.ts +2 -2
  94. package/dist/timeline/index.mjs +2 -2
  95. package/dist/{types-9bcJdVcg.d.mts → types-iITMwrru.d.mts} +10 -2
  96. package/dist/{types-9bcJdVcg.d.ts → types-iITMwrru.d.ts} +10 -2
  97. package/dist/video/index.cjs +1 -1
  98. package/dist/video/index.d.mts +2 -2
  99. package/dist/video/index.d.ts +2 -2
  100. package/dist/video/index.mjs +1 -1
  101. package/dist/vue/index.cjs +3 -3
  102. package/dist/vue/index.d.mts +4 -7
  103. package/dist/vue/index.d.ts +4 -7
  104. package/dist/vue/index.mjs +1 -1
  105. package/dist/web-component/index.cjs +3 -3
  106. package/dist/web-component/index.mjs +1 -1
  107. package/dist/wrapper-BOHrDnBO.d.mts +8 -0
  108. package/dist/wrapper-Cm7JTIVl.d.ts +8 -0
  109. package/package.json +1 -1
  110. package/dist/chunk-22P4KBPG.mjs +0 -1
  111. package/dist/chunk-32ZCSGFZ.mjs +0 -1
  112. package/dist/chunk-7USW2XFB.mjs +0 -1
  113. package/dist/chunk-7XOFQCQE.mjs +0 -3
  114. package/dist/chunk-BDXWPUBJ.mjs +0 -2
  115. package/dist/chunk-BRV2B2YW.mjs +0 -1
  116. package/dist/chunk-D2BHE4F2.mjs +0 -1
  117. package/dist/chunk-QZKYGS74.mjs +0 -1
  118. package/dist/chunk-THPTANES.mjs +0 -1
  119. package/dist/chunk-U5TKLHGW.mjs +0 -1
  120. package/dist/chunk-V3Z6G5JE.mjs +0 -1
  121. package/dist/chunk-WKOT2MND.mjs +0 -1
  122. package/dist/chunk-XSVTHCLO.mjs +0 -1
@@ -1,4 +1,4 @@
1
1
  "use client";
2
- 'use strict';var tn=require('react'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var tn__default=/*#__PURE__*/_interopDefault(tn);function xr({tension:e=2.5,friction:n=2.2}={}){return r=>1-Math.cos(r*Math.PI*e)*Math.pow(1-r,n)}function Tr({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,i=[];for(let d=0;d<r;d++){let y=Math.pow(o,d);i.push(y),s+=y;}let u=[0],c=0;for(let d=0;d<r;d++)c+=i[d]/s,u.push(c);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let y=0;y<r;y++)if(d<=u[y+1]){let v=(d-u[y])/(u[y+1]-u[y]);if(y===0)return v*(2-v);let S=1-Math.pow(t,y);return S+(1-S)*(2*v-1)*(2*v-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 K={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:xr(),bounce:Tr(),elastic:Mr()};function ot(e,n,r){return Math.min(r,Math.max(n,e))}function te(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}}var Dt=(e,n)=>e==="top"?0:e==="center"?.5:e==="bottom"?1:n;function Ht(e,n,r,t){return e+r+n*Dt(t,0)}function It(e,n){return n*(/^\d+(\.\d+)?%$/.test(e)?parseFloat(e)/100:Dt(e,1))}function j(e,n,r,t){return r===n?0:ot((e-n)/(r-n)*t,0,1)}function ye(e,n,r,t,o){let s=Ht(e.top,e.height,n,t.element)-It(t.viewport,r),i=Ht(e.top,e.height,n,o.element)-It(o.viewport,r);return {tStart:s,tEnd:i}}function Ke(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.clientLeft+n.scrollLeft:t.top-n.getBoundingClientRect().top-n.clientTop+n.scrollTop,height:o,scroll:0}:{top:r==="x"?t.left:t.top,height:o,scroll:r==="x"?window.scrollX:window.scrollY}}function ft(e){let n=parseFloat(e.getAttribute("pathLength")??"");if(n>0)return n;let r=e.tagName.toLowerCase();if(r==="rect"){let t=parseFloat(e.getAttribute("width")??"0"),o=parseFloat(e.getAttribute("height")??"0");return 2*(t+o)}if(r==="circle"){let t=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*t}return e.getTotalLength()}function Ft(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 mt(e,n,r){let t=Ft(e),o=Ft(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 _t={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 B(e,...n){Je&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var Pr="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Lr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Vt=33;function Ar(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Cr(e){let n=[];for(let r=0;r<Vt;r++){let t=r/(Vt-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function pt(e){switch(e){case "linear":return "linear";case "ease-in":return Pr;case "ease-out":return Lr;case "ease-in-out":return Ar()?Cr(K["ease-in-out"]):null;default:return null}}var zt=Symbol.for("svg-scroll-draw.registry");function Wt(){let e=globalThis;return e[zt]||(e[zt]=new Map)}function Oe(e,n){Wt().set(e,n);}function $e(e){Wt().delete(e);}function je(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let n=window.matchMedia("(prefers-reduced-motion: reduce)"),r=o=>e(!!o.matches);if(typeof n.addEventListener=="function")return n.addEventListener("change",r),()=>n.removeEventListener("change",r);let t=n;return t.addListener?.(r),()=>t.removeListener?.(r)}function Be(e,n){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return n(e,true);let r=n(e,false),t=je(s=>{if(!s)return;t();let i=(r.getProgress?.()??0)>=1;r.destroy(),r=n(i?{...e,onComplete:void 0}:e,true);}),o={};for(let s of Object.keys(r))o[s]=(...i)=>r[s]?.(...i);return o.destroy=()=>{t(),r.destroy();},o}var st,dt=new Set,gt=new WeakMap,it=new Map,Gt=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function kr(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 jt(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>n();st??(st=new ResizeObserver(o=>{let s=false;for(let{target:i}of o)gt.get(i)!==Gt(i)&&(s=true),gt.set(i,"");s&&dt.forEach(i=>i());})),dt.add(r);let t=kr(e);return [document.body,document.documentElement].forEach(o=>o&&t.add(o)),t.forEach(o=>{gt.has(o)||gt.set(o,Gt(o)),it.set(o,(it.get(o)??0)+1),st.observe(o);}),()=>{dt.delete(r)&&(t.forEach(o=>{let s=(it.get(o)??1)-1;if(s)return void it.set(o,s);it.delete(o),st?.unobserve(o);}),dt.size||(st?.disconnect(),st=void 0));}}function Ae(e,n,r,t,o){let s,i=NaN,u,c,d=()=>{s=0,t(),!u&&!s&&(i=r())>0&&i<1&&(s=requestAnimationFrame(d));},y=()=>{!s&&!u&&r()!==i&&(s=requestAnimationFrame(d));},v=$=>{u=$,cancelAnimationFrame(s),s=i=NaN,y();},S=()=>{clearTimeout(c),o(),y();},z=()=>{clearTimeout(c),c=setTimeout(S,150);},G=jt(n,z),b=$=>{e[$]("scroll",y,{passive:true}),window[$]("resize",z),window[$]("orientationchange",z);};return b("addEventListener"),y(),{hold:v,remeasure:S,off(){v(true),b("removeEventListener"),G(),clearTimeout(c);}}}var Rr=0;function Or(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Bt(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var qt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function $r(e){if(!Je)return;let n=Bt(e,"stroke");if(!n||n==="none"){B("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!qt.has(r)&&!qt.has(Bt(e,"fill"))&&B("Element has a fill \u2014 it may obscure the stroke animation.",e);}function Nr(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,i=e-s,u=n-s,c=r==="x";t.innerHTML=`
2
+ 'use strict';var cn=require('react'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var cn__default=/*#__PURE__*/_interopDefault(cn);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 z(e,...n){Ke&&console.warn(`[svg-scroll-draw] ${e}`,...n);}function Ar({tension:e=2.5,friction:n=2.2}={}){return t=>1-Math.cos(t*Math.PI*e)*Math.pow(1-t,n)}function Or({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),s=0,i=[];for(let p=0;p<t;p++){let b=Math.pow(o,p);i.push(b),s+=b;}let l=[0],c=0;for(let p=0;p<t;p++)c+=i[p]/s,l.push(c);return p=>{if(p<=0)return 0;if(p>=1)return 1;for(let b=0;b<t;b++)if(p<=l[b+1]){let S=(p-l[b])/(l[b+1]-l[b]);if(b===0)return S*(2-S);let T=1-Math.pow(r,b);return T+(1-T)*(2*S-1)*(2*S-1)}return 1}}function kr({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 s=>s<=0?0:s>=1?1:t*Math.pow(2,-10*s)*Math.sin((s-o)*(2*Math.PI)/r)+1}var Je={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:Ar(),bounce:Or(),elastic:kr()};function $r(e,n,t,r){let o=(s,i,l)=>((1+3*s-3*i)*l+3*i-6*s)*l*l+3*s*l;return s=>{if(s<=0||s>=1)return +(s>0);let i=s;for(let l=0;l<8;l++)i-=(o(e,t,i)-s)/((3*(1+3*e-3*t)*i+6*t-12*e)*i+3*e);if(!(i>=0&&i<=1&&Math.abs(o(e,t,i)-s)<1e-9))for(let l=0,c=0,p=1;l<30;l++)i=(c+p)/2,o(e,t,i)<s?c=i:p=i;return o(n,r,i)}}function xt(e){let n=/^cubic-bezier\((.*)\)$/.exec(e==="ease"?"cubic-bezier(.25,.1,.25,1)":e.trim()),t=n?n[1].split(",").map(parseFloat):[];if(t.length===4&&t.every(Number.isFinite)&&t[0]*(1-t[0])>=0&&t[2]*(1-t[2])>=0)return [$r(t[0],t[1],t[2],t[3]),`cubic-bezier(${t})`]}var It=new Set;function Le(e,n="linear"){if(typeof e=="function")return e;if(e==null)return Je[n];if({}.hasOwnProperty.call(Je,e))return Je[e];let t=xt(String(e));return t?t[0]:(!It.has(e)&&It.add(e)&&z(`Unknown easing ${JSON.stringify(e)}: use a name, cubic-bezier() or a function.`),Je[n])}function st(e,n,t){return Math.min(t,Math.max(n,e))}function Z(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}}var zt=(e,n)=>e==="top"?0:e==="center"?.5:e==="bottom"?1:n;function _t(e,n,t,r){return e+t+n*zt(r,0)}function Vt(e,n){return n*(/^\d+(\.\d+)?%$/.test(e)?parseFloat(e)/100:zt(e,1))}function j(e,n,t,r){return t===n?0:st((e-n)/(t-n)*r,0,1)}function he(e,n,t,r,o){let s=_t(e.top,e.height,n,r.element)-Vt(r.viewport,t),i=_t(e.top,e.height,n,o.element)-Vt(o.viewport,t);return {tStart:s,tEnd:i}}function Ze(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.clientLeft+n.scrollLeft:r.top-n.getBoundingClientRect().top-n.clientTop+n.scrollTop,height:o,scroll:0}:{top:t==="x"?r.left:r.top,height:o,scroll:t==="x"?window.scrollX:window.scrollY}}function mt(e){let n=parseFloat(e.getAttribute("pathLength")??"");if(n>0)return n;let t=e.tagName.toLowerCase();if(t==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),o=parseFloat(e.getAttribute("height")??"0");return 2*(r+o)}if(t==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function pt(e){return `${e} ${e*2}`}function Wt(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 dt(e,n,t){let r=Wt(e),o=Wt(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 Rr="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Fr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Bt=33;function Hr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Nr(e){let n=[];for(let t=0;t<Bt;t++){let r=t/(Bt-1);n.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${n.join(",")})`}function gt(e){switch(e){case "linear":return "linear";case "ease-in":return Rr;case "ease-out":return Fr;case "ease-in-out":return Hr()?Nr(Je["ease-in-out"]):null;default:return xt(e)?.[1]??null}}var jt=Symbol.for("svg-scroll-draw.registry");function qt(){let e=globalThis;return e[jt]||(e[jt]=new Map)}function $e(e,n){qt().set(e,n);}function Re(e){qt().delete(e);}function Be(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 je(e,n){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return n(e,true);let t=n(e,false),r=Be(s=>{if(!s)return;r();let i=(t.getProgress?.()??0)>=1;t.destroy(),t=n(i?{...e,onComplete:void 0}:e,true);}),o={};for(let s of Object.keys(t))o[s]=(...i)=>t[s]?.(...i);return o.destroy=()=>{r(),t.destroy();},o}var it,ht=new Set,yt=new WeakMap,at=new Map,Ut=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function Dr(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 Yt(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let t=()=>n();it??(it=new ResizeObserver(o=>{let s=false;for(let{target:i}of o)yt.get(i)!==Ut(i)&&(s=true),yt.set(i,"");s&&ht.forEach(i=>i());})),ht.add(t);let r=Dr(e);return [document.body,document.documentElement].forEach(o=>o&&r.add(o)),r.forEach(o=>{yt.has(o)||yt.set(o,Ut(o)),at.set(o,(at.get(o)??0)+1),it.observe(o);}),()=>{ht.delete(t)&&(r.forEach(o=>{let s=(at.get(o)??1)-1;if(s)return void at.set(o,s);at.delete(o),it?.unobserve(o);}),ht.size||(it?.disconnect(),it=void 0));}}function Ce(e,n,t,r,o){let s,i=NaN,l,c,p=()=>{s=0,r(),!l&&!s&&(i=t())>0&&i<1&&(s=requestAnimationFrame(p));},b=()=>{!s&&!l&&t()!==i&&(s=requestAnimationFrame(p));},S=W=>{l=W,cancelAnimationFrame(s),s=i=NaN,b();},T=()=>{clearTimeout(c),o(),b();},O=()=>{clearTimeout(c),c=setTimeout(T,150);},R=Yt(n,O),v=W=>{e[W]("scroll",b,{passive:true}),window[W]("resize",O),window[W]("orientationchange",O);};return v("addEventListener"),b(),{hold:S,remeasure:T,off(){S(true),v("removeEventListener"),R(),clearTimeout(c);}}}var Ir=0;function _r(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Qt(e,n){let t="";try{t=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return t||(e.getAttribute(n)??"").trim()}var Xt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function Vr(e){if(!Ke)return;let n=Qt(e,"stroke");if(!n||n==="none"){z("Element has no stroke \u2014 path will not be visible.",e);return}let t=(e.getAttribute("fill")??"").trim();t&&!Xt.has(t)&&!Xt.has(Qt(e,"fill"))&&z("Element has a fill \u2014 it may obscure the stroke animation.",e);}function zr(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 s=t==="x"?window.scrollX:window.scrollY,i=e-s,l=n-s,c=t==="x";r.innerHTML=`
3
3
  <div style="position:absolute;${c?`left:${i}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${i}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;${c?`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",o,{passive:true}),o(),{el:t,destroy(){window.removeEventListener("scroll",o),t.remove();}}}var Ut=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Yt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Hr(e,n,r){if(!Je)return;let t=(e.match(Yt)??[]).join("").toUpperCase(),o=(n.match(Yt)??[]).join("").toUpperCase(),s=(e.match(Ut)??[]).length,i=(n.match(Ut)??[]).length;if(t!==o){B(`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!==i&&B(`morphTo: coordinate count differs (${s} \u2192 ${i}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function Ir(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 i=parseFloat(s),u=t[o++]??i;return String(+(i+(u-i)*r).toFixed(4))})}function Qt(e,n={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:Be(n,(r,t)=>Dr(e,r,t))}function Dr(e,n,r){let{preset:t,...o}=n,s=t?{..._t[t],...o}:o,{selector:i="path, polyline, line, polygon, rect, circle",speed:u=1,fade:c=false,easing:d="linear",trigger:y={},stagger:v=0,direction:S="forward",once:z=false,debug:G=false,axis:b="y",scrollContainer:$,autoReverse:J=false,delay:k=0,strokeColor:A,strokeWidth:T,fillOpacity:O,waypoints:h,velocityScale:R=false,threshold:D=0,rootMargin:re="0px",repeat:q=0,repeatDelay:N=0,morphTo:F,clip:M,autoplay:Z=false,duration:x=1e3,native:C=true,onProgress:be,onStart:_,onComplete:Y,onEnter:fe,onLeave:xe,onEnterBack:me,onLeaveBack:le}=s,P=M===true?"left":typeof M=="string"?M:false,L=typeof d=="function"?d:K[d]??K.linear,se=te(y.start||"top bottom"),Ne=te(y.end||"bottom top"),ee=typeof $=="string"?document.querySelector($):$??null,He=Array.isArray(A)?A[0]:null,Te=Array.isArray(A)?A[1]:typeof A=="string"?A:null,we=Array.isArray(T)?T[0]:null,_e=Array.isArray(T)?T[1]:typeof T=="number"?T:null,Ie=Array.isArray(O)?O[0]:null,Me=Array.isArray(O)?O[1]:typeof O=="number"?O:null;function Ce(a){let m=a*100;switch(P){case "right":return `inset(0 0 0 ${100-m}%)`;case "top":return `inset(0 0 ${100-m}% 0)`;case "bottom":return `inset(${100-m}% 0 0 0)`;case "center":return `circle(${a*150}% at 50% 50%)`;default:return `inset(0 ${100-m}% 0 0)`}}let l=P?[]:Array.from(e.querySelectorAll(i)),g=[],ie=[],H=0,W=0,U=v,Q=0,Fe=0,ae=false,De=false,ve=0,Qe=-1,qe=[],Ue=-1,pe=false,f=0,p=0,E,ce=false,Ee=null;function Ve(){Ee?.destroy(),Ee=null;}let ke=new Set,ze=NaN,We=true,ct=-1,Tt=performance.now(),Xe=NaN;function ut(){return ee?b==="x"?ee.scrollLeft:ee.scrollTop:b==="x"?window.scrollX:window.scrollY}function Mt(){return ee?b==="x"?ee.clientWidth:ee.clientHeight:b==="x"?window.innerWidth:window.innerHeight}function Pt(){let a=Ke(e,ee,b);return ye(a,a.scroll,Mt(),se,Ne)}function hr(){let a=W-H,m=l.length-1,w=ee??document.documentElement,V=b==="x"?"Width":"Height";if(U=v,v>0&&m>0&&a>0){let de=w[`scroll${V}`]-w[`client${V}`]-1-H-a/u;de>=0&&(U=Math.min(v,de/(m*a)));}let ue=Math.max(0,m)*U*a,Pe=a/Math.min(u,1);Q=H+Math.min(0,ue,Pe,ue+Pe),Fe=H+Math.max(0,ue,Pe,ue+Pe);}function Lt(){(({tStart:H,tEnd:W}=Pt())),hr(),G&&Je&&(Ve(),Ee=Nr(H,W,b));}function bt(a,m=Pt){Oe(e,{type:"draw",getProgress:()=>a.getProgress(),getTrigger:m});let w=a.destroy;return a.destroy=()=>{w.call(a),$e(e);},a}function At(a,m){return z&&!J?Math.max(Qe,L(qe[a]=Math.max(qe[a]??0,m))):L(m)}function yr(a,m){if(e.style.setProperty("--scroll-draw-progress",String(a)),P){let w=m==="reverse"?1-a:a;e.style.clipPath=Ce(w);return}l.forEach((w,V)=>wt(w,V,a,m));}function wt(a,m,w,V){a.style.strokeDashoffset=V==="reverse"?`${g[m]*w}`:`${g[m]*(1-w)}`,c&&(a.style.opacity=V==="reverse"?`${1-w}`:`${w}`),He&&Te?a.style.stroke=mt(He,Te,w):Te&&(a.style.stroke=Te),we!==null&&_e!==null?a.style.strokeWidth=`${we+(_e-we)*w}`:_e!==null&&(a.style.strokeWidth=`${_e}`),Ie!==null&&Me!==null?a.style.fillOpacity=`${Ie+(Me-Ie)*w}`:Me!==null&&(a.style.fillOpacity=`${Me}`),F&&a.tagName.toLowerCase()==="path"&&ie[m]&&a.setAttribute("d",Ir(ie[m],F,w));}function vt(){if(e.style.setProperty("--scroll-draw-progress","0"),P){e.style.clipPath=Ce(S==="reverse"?1:0);return}l.forEach((a,m)=>{a.style.strokeDasharray=`${g[m]}`,a.style.strokeDashoffset=S==="reverse"?"0":`${g[m]}`,c?a.style.opacity=S==="reverse"?"1":"0":a.style.opacity="",He&&(a.style.stroke=He),we!==null&&(a.style.strokeWidth=`${we}`),Ie!==null&&(a.style.fillOpacity=`${Ie}`),F&&a.tagName.toLowerCase()==="path"&&ie[m]&&a.setAttribute("d",ie[m]);});}function tt(a,m){let w=a.getAttribute("d"),V=ft(a);if(F&&ie[m]){a.setAttribute("d",F);let ue=ft(a);a.setAttribute("d",ie[m]),V=Math.max(ft(a),ue),a.setAttribute("d",w);}g[m]=V,a.style.strokeDasharray=`${V}`;}if(l.forEach((a,m)=>{$r(a);let w=a.tagName.toLowerCase()==="path";w?ie.push(a.getAttribute("d")??""):ie.push(""),tt(a,m);let V=g[m];F&&(w?Hr(ie[ie.length-1],F,a):B(`morphTo only applies to <path> elements \u2014 ignored on <${a.tagName}>.`,a)),r?(a.style.strokeDashoffset=S==="reverse"?`${V}`:"0",c&&(a.style.opacity="1"),Te&&(a.style.stroke=Te),_e!==null&&(a.style.strokeWidth=`${_e}`),Me!==null&&(a.style.fillOpacity=`${Me}`),F&&a.tagName.toLowerCase()==="path"&&a.setAttribute("d",F)):(a.style.strokeDashoffset=S==="reverse"?"0":`${V}`,c?a.style.opacity=S==="reverse"?"1":"0":a.style.opacity="",He&&(a.style.stroke=He),we!==null&&(a.style.strokeWidth=`${we}`),Ie!==null&&(a.style.fillOpacity=`${Ie}`));}),r)return P&&(e.style.clipPath=Ce(1)),Y?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};P&&(e.style.clipPath=Ce(S==="reverse"?1:0));let Ct=typeof d=="string"?pt(d):null;function br(){return !(C===false||Z||G&&Je||!Or()||!l.length||!Ct||P||b!=="y"||ee||u!==1||v!==0||z||J||R!==false||F||h||q||k>0||be||_||Y||fe||xe||me||le||A!=null||T!=null||O!=null||(y.start||"top bottom").trim()!=="top bottom"||(y.end||"bottom top").trim()!=="bottom top")}function wr(){let a=++Rr,m=`svg-scroll-draw-${a}`,w=`svg-scroll-draw-host-${a}`,V=`--svg-scroll-draw-${a}`,ue=S==="reverse"?"0":"var(--ssd-len)",Pe=S==="reverse"?"var(--ssd-len)":"0",de=`stroke-dashoffset:${ue};`,ne=`stroke-dashoffset:${Pe};`;c&&(de+=`opacity:${S==="reverse"?1:0};`,ne+=`opacity:${S==="reverse"?0:1};`);let oe=document.createElement("style");oe.setAttribute("data-svg-scroll-draw",""),oe.textContent=`@keyframes ${m}{from{${de}}to{${ne}}}.${w}{view-timeline-name:${V};view-timeline-axis:block;}.${m}{animation-name:${m};animation-duration:auto;animation-timing-function:${Ct};animation-fill-mode:both;animation-timeline:${V};animation-range:cover 0% cover 100%;}`,document.head.appendChild(oe),e.classList.add(w);function Se(I,X){I.style.setProperty("--ssd-len",String(g[X])),I.style.strokeDasharray=`${g[X]}`,I.style.strokeDashoffset="",I.style.opacity="",I.style.animationPlayState="",I.classList.add(m);}l.forEach(Se);let ge=false,Le=-1;function Re(){if(Le>=0)return Le;let I=e.getBoundingClientRect(),{tStart:X,tEnd:he}=ye({top:I.top,height:I.height},ut(),Mt(),se,Ne);return L(j(ut(),X,he,u))}return {destroy(){e.classList.remove(w),l.forEach(I=>{I.classList.remove(m),I.style.removeProperty("--ssd-len"),I.style.animationPlayState="";}),oe.remove();},replay(){ge=false,Le=-1,l.forEach(Se);},pause(){ge=true,l.forEach(I=>{I.style.animationPlayState="paused";});},resume(){ge&&(ge=false,l.forEach(I=>{I.style.animationPlayState="running";}));},seek(I){let X=Math.min(1,Math.max(0,I));Le=X,ge=true,l.forEach((he,Ge)=>{he.classList.remove(m),he.style.strokeDashoffset=S==="reverse"?`${g[Ge]*X}`:`${g[Ge]*(1-X)}`,c&&(he.style.opacity=S==="reverse"?`${1-X}`:`${X}`);});},getProgress(){return Re()},refresh(){l.forEach((I,X)=>{tt(I,X),I.style.setProperty("--ssd-len",String(g[X]));});}}}if(br())return bt(wr());function vr(){let a=Math.max(1,x),m=P?a:a*(1+Math.max(0,l.length-1)*v),w=0,V=0,ue=false;function Pe(Le){let Re=true,I=Math.min(1,Math.max(0,Le/m));if(P){let X=Math.min(1,Math.max(0,Le/a)),he=L(X);f=he,e.style.setProperty("--scroll-draw-progress",String(he)),e.style.clipPath=Ce(S==="reverse"?1-he:he),be?.(he),X<1&&(Re=false);}else {l.forEach((he,Ge)=>{let Sr=Ge*v*a,Nt=Math.min(1,Math.max(0,(Le-Sr)/a));wt(he,Ge,L(Nt),S),Nt<1&&(Re=false);});let X=L(I);f=X,be?.(X),e.style.setProperty("--scroll-draw-progress",String(X));}if(h){let X=L(I);for(let he in h){let Ge=parseFloat(he);X>=Ge&&!ke.has(Ge)&&(ke.add(Ge),h[he]?.());}}return Re}function de(Le){if(pe)return;let Re=Le-w;De||(De=true,_?.());let I=Pe(Re);if(I&&!ae){ae=true,Pe(m),Y?.(),p<(q==="infinite"?1/0:q??0)&&(p++,E=setTimeout(()=>{w=performance.now(),De=false,ae=false,ke.clear(),vt(),ve=requestAnimationFrame(de);},N));return}I||(ve=requestAnimationFrame(de));}function ne(){cancelAnimationFrame(ve),clearTimeout(E),w=performance.now(),V=0,pe=false,De=false,ae=false,p=0,ue=true,f=0,ke.clear(),vt(),ve=requestAnimationFrame(de);}let oe=new IntersectionObserver(Le=>{Le.forEach(Re=>{Re.isIntersecting&&!(z&&ae)?ne():!Re.isIntersecting&&!z&&!ae&&(cancelAnimationFrame(ve),clearTimeout(E),ue=false);});},{root:ee??null,threshold:D,rootMargin:re}),Se;function ge(){clearTimeout(Se),Se=setTimeout(()=>l.forEach(tt),150);}return window.addEventListener("resize",ge),window.addEventListener("orientationchange",ge),k>0?setTimeout(()=>oe.observe(e),k):oe.observe(e),{destroy(){cancelAnimationFrame(ve),clearTimeout(E),oe.disconnect(),window.removeEventListener("resize",ge),window.removeEventListener("orientationchange",ge),clearTimeout(Se);},replay(){p=0,ne();},pause(){pe||!ue||(pe=true,V=performance.now()-w,cancelAnimationFrame(ve));},resume(){pe&&(pe=false,ue=true,w=performance.now()-V,ve=requestAnimationFrame(de));},seek(Le){let Re=Math.min(1,Math.max(0,Le));f=Re,pe=true,V=Re*m,w=performance.now()-V,cancelAnimationFrame(ve),Pe(V);},getProgress(){return f},refresh(){clearTimeout(Se),l.forEach(tt);}}}if(Z)return bt(vr());Lt();let kt=()=>j(ut(),Q,Fe,1);function Rt(){ae=true,Y?.(),p<(q==="infinite"?1/0:q)&&(p++,E=setTimeout(()=>{ce=true;},N));}function Ot(){Qe=-1,qe=[],De=false,ae=false,ce=false,ke.clear(),vt(),We=true;}function Er(){let a=performance.now(),m=ut();if(ce&&kt()%1&&Ot(),!We&&R===false&&m===ze)return;We=false,ze=m;let w=u;if(R!==false){let ne=a-Tt,oe=ne>0?Math.abs(m-(ct<0?m:ct))/ne:0;w=u*Math.max(.2,1+oe*(typeof R=="number"?R:1)*.04);}ct=m,Tt=a;let V=J?Ue===-1||m>=Ue?"forward":"reverse":S;Ue=m;let ue=W-H,Pe=true,de=ue===0?0:(m-H)/ue;if(isNaN(Xe)||(Xe<=0&&de>0&&fe?.(),Xe<1&&de>=1&&xe?.(),Xe>=1&&de<1&&me?.(),Xe>0&&de<=0&&le?.()),Xe=de,P){let ne=At(0,j(m,H,W,w));f=ne,e.style.setProperty("--scroll-draw-progress",String(ne));let oe=V==="reverse"?1-ne:ne;e.style.clipPath=Ce(oe),be?.(ne),!De&&j(m,H,W,w)>0&&(De=true,_?.()),ne>=1&&!ae?Rt():ne<1&&!z&&(ae=false);return}if(l.forEach((ne,oe)=>{let Se=oe*U*ue,ge=At(oe,j(m,H+Se,W+Se,w));wt(ne,oe,ge,V),oe===0&&(f=ge,be?.(ge),e.style.setProperty("--scroll-draw-progress",String(ge))),ge<1&&(Pe=false);}),h){let ne=L(j(m,H,W,w));for(let oe in h){let Se=parseFloat(oe);ne>=Se&&!ke.has(Se)&&(ke.add(Se),h[oe]?.());}}!De&&j(m,H,W,w)>0&&(De=true,_?.()),Pe&&!ae?Rt():!Pe&&!z&&(ae=false);}let rt=Ae(ee??window,[e],kt,Er,()=>{let a=g.join();l.forEach(tt),Lt(),We=true,g.join()!==a&&nt();}),Et=k>0;function nt(){rt.hold(pe||Et);}let $t;return Et&&($t=setTimeout(()=>{Et=false,nt();},k)),nt(),bt({destroy(){clearTimeout(E),clearTimeout($t),rt.off(),Ve();},replay(){Ot(),Ue=-1,ct=-1,p=0,pe=false,f=0,clearTimeout(E),nt();},pause(){pe=true,rt.hold(true);},resume(){pe&&(pe=false,We=true,nt());},seek(a){let m=Math.min(1,Math.max(0,a));f=m,Qe=m,qe=[],pe=true,rt.hold(true),yr(m,S),We=true;},getProgress(){return f},refresh:rt.remeasure},()=>({tStart:H,tEnd:W}))}var Xt=new WeakMap,Fr=0;function at(e){return JSON.stringify(e,(n,r)=>{if(typeof r=="function")return "\u0192";if(typeof Element<"u"&&r instanceof Element){let t=Xt.get(r);return t===void 0&&Xt.set(r,t=++Fr),`el#${t}`}return r})}function Kt(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 _r(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Jt(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let o=[],s=[],i=t[2].trim();if(i)for(let u of i.split(/[\s,]+/)){let c=u.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(c?parseFloat(c[1]):0),s.push(c?c[2]:"");}n.push({fn:t[1],nums:o,units:s});}return n}function Vr(e,n,r){let t=Jt(e),o=Jt(n);return t.length===0||t.length!==o.length?r<1?e:n:t.map((s,i)=>{let u=o[i];return s.fn!==u.fn||s.nums.length!==u.nums.length?r<1?`${s.fn}(${s.nums.map((c,d)=>`${c}${s.units[d]}`).join(", ")})`:`${u.fn}(${u.nums.map((c,d)=>`${c}${u.units[d]}`).join(", ")})`:`${s.fn}(${s.nums.map((c,d)=>`${c+(u.nums[d]-c)*r}${s.units[d]}`).join(", ")})`}).join(" ")}function Zt(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),o=String(n);if(_r(t))return mt(t,o,r);if(t.includes("("))return Vr(t,o,r);let s=t.match(/^([-+]?[\d.]+)(.*)$/),i=o.match(/^([-+]?[\d.]+)(.*)$/);if(s&&i){let u=parseFloat(s[1]),c=parseFloat(i[1]);return `${u+(c-u)*r}${s[2]||i[2]}`}return r<1?t:o}function zr(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Wr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Gr=0,er="--scroll-draw-progress";function jr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var rr={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function nr(e,n){return typeof window>"u"?rr:n.respectReducedMotion===false?tr(e,n,false):Be(n,(r,t)=>tr(e,r,t))}function tr(e,n,r){let{props:t,trigger:o={},easing:s="ease-out",speed:i=1,once:u=false,axis:c="y",scrollContainer:d,native:y=true,velocityScale:v=false,triggerElement:S,onProgress:z,onComplete:G,onEnter:b,onLeave:$,onEnterBack:J,onLeaveBack:k}=n,A=typeof s=="function"?s:K[s]??K["ease-out"],T=te(o.start||"top bottom"),O=te(o.end||"bottom top"),h=S??e,R=typeof d=="string"?document.querySelector(d):d??null,D=Object.entries(t).map(([l,g])=>({prop:zr(l),from:Array.isArray(g)?g[0]:"",to:Array.isArray(g)?g[1]:g}));function re(){let l=window.getComputedStyle(e);for(let g of D)g.from===""&&(g.from=l.getPropertyValue(g.prop).trim()||"0");}function q(){for(let l of D)e.style.setProperty(l.prop,String(l.to));}let N=new Map;for(let l of [...D.map(g=>g.prop),er])N.set(l,e.style.getPropertyValue(l));function F(){for(let[l,g]of N)g?e.style.setProperty(l,g):e.style.removeProperty(l);}if(r)return q(),G?.(),{...rr,destroy:F,getProgress:()=>1};re();let M=()=>R?c==="x"?R.scrollLeft:R.scrollTop:c==="x"?window.scrollX:window.scrollY,Z=()=>R?c==="x"?R.clientWidth:R.clientHeight:c==="x"?window.innerWidth:window.innerHeight,x=typeof s=="string"?pt(s):null;function C(){if(!y||!jr()||!x||c!=="y"||R||h!==e||u||i!==1||z||G||b||$||J||k||v!==false||(o.start||"top bottom").trim()!=="top bottom"||(o.end||"bottom top").trim()!=="bottom top")return false;for(let l of D)if(!Wr.has(l.prop))return false;return true}function be(){let l=`ssd-a-${++Gr}`,g=D.map(Q=>`${Q.prop}:${Q.from}`).join(";"),ie=D.map(Q=>`${Q.prop}:${Q.to}`).join(";"),H=document.createElement("style");H.setAttribute("data-ssd-animate",""),H.textContent=`@keyframes ${l}{from{${g}}to{${ie}}}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${x};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(H),e.classList.add(l);let W=()=>{let Q=e.getBoundingClientRect();return ye({top:Q.top,height:Q.height},M(),Z(),T,O)};Oe(e,{type:"animate",getProgress:()=>U.getProgress(),getTrigger:W});let U={refresh(){},destroy(){e.classList.remove(l),H.remove(),e.style.animationPlayState="",F(),$e(e);},replay(){e.classList.remove(l),e.offsetWidth,e.classList.add(l);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(Q){let Fe=Math.min(1,Math.max(0,Q));e.classList.remove(l);for(let ae of D)e.style.setProperty(ae.prop,Zt(ae.from,ae.to,Fe));},getProgress(){let{tStart:Q,tEnd:Fe}=W();return A(j(M(),Q,Fe,i))}};return U}if(C())return be();let _=0,Y=0,fe=false,xe=-1,me=0,le=0,P=false,L=NaN,se=-1,Ne=0,ee=h===e?D:[],He=false;function Te(){let l=e.style,g=ee.map(U=>l.getPropertyValue(U.prop)),ie=l.transition;ee.length&&(l.transition="none"),ee.forEach(U=>l.setProperty(U.prop,N.get(U.prop)??""));let H=Ke(h,R,c);ee.forEach((U,Q)=>l.setProperty(U.prop,g[Q])),ee.length&&(e.offsetWidth,l.transition=ie);let W=ye(H,H.scroll,Z(),T,O);He&&Math.abs(W.tStart-_)<1&&Math.abs(W.tEnd-Y)<1||(He=true,_=W.tStart,Y=W.tEnd);}function we(l){e.style.setProperty(er,String(l));for(let g of D)e.style.setProperty(g.prop,Zt(g.from,g.to,l));z?.(l);}function _e(l){if(isNaN(L)){L=l;return}L<=0&&l>0&&b?.(),L<1&&l>=1&&$?.(),L>=1&&l<1&&J?.(),L>0&&l<=0&&k?.(),L=l;}function Ie(){if(fe)return;let l=performance.now(),g=M(),ie=i;if(v!==false){let Q=l-Ne,Fe=Q>0?Math.abs(g-(se<0?g:se))/Q:0;ie=i*Math.max(.2,1+Fe*(typeof v=="number"?v:1)*.04);}se=g,Ne=l;let H=Y===_?0:(g-_)/(Y-_);_e(H);let W=j(g,_,Y,ie),U=u?Math.max(xe,A(me=Math.max(me,W))):A(W);le=U,we(U),U>=1&&!P?(P=true,G?.()):U<1&&!u&&(P=false);}let Me=Ae(R??window,[h],()=>j(M(),_,Y,Math.min(i,1)),Ie,Te);Te(),Y===_&&B("scrollAnimate: zero-length trigger window, so it never animates. In a sticky stage, set triggerElement.",e),me=j(M(),_,Y,i),le=A(me),we(le),Oe(e,{type:"animate",getProgress:()=>le,getTrigger:()=>({tStart:_,tEnd:Y})});function Ce(){fe=true,Me.hold(true);}return {destroy(){fe=true,Me.off(),F(),$e(e);},replay(){xe=-1,me=0,P=false,le=0,fe=false,we(0),Me.hold(false);},pause:Ce,resume(){fe&&(fe=false,Me.hold(false));},seek(l){let g=Math.min(1,Math.max(0,l));le=g,xe=g,me=0,Ce(),we(g);},getProgress(){return le},refresh:Me.remeasure}}var St={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function or(e,n){if(typeof window>"u")return St;let r=typeof e=="string"?document.querySelector(e):e;return r?Be(n,(t,o)=>Br(r,t,o)):(B("scrollCounter: element not found:",e),St)}function Br(e,n,r){let{from:t=0,to:o,format:s,easing:i="ease-out",trigger:u={},once:c=true,decimals:d,onComplete:y}=n,v=d!==void 0?x=>x.toFixed(d):s??(x=>String(Math.round(x))),S=typeof i=="function"?i:K[i]??K["ease-out"],z=te(u.start||"top 80%"),G=te(u.end||"top 20%");if(r)return e.textContent=v(o),y?.(),{...St,getProgress:()=>1};let b=0,$=0,J=false,k=-1,A=0,T=0,O=false,h=()=>window.scrollY,R=()=>window.innerHeight;function D(){let x=e.getBoundingClientRect(),C=ye({top:x.top,height:x.height},h(),R(),z,G);J&&Math.abs(C.tStart-b)<1&&Math.abs(C.tEnd-$)<1||(J=true,b=C.tStart,$=C.tEnd);}let re=e.style.getPropertyValue("--scroll-draw-progress");function q(x){e.textContent=v(t+(o-t)*x),e.style.setProperty("--scroll-draw-progress",String(x));}let N=()=>j(h(),b,$,1);function F(){let x=N(),C=c?Math.max(k,S(A=Math.max(A,x))):S(x);T=C,q(C),C>=1&&!O?(O=true,y?.()):C<1&&!c&&(O=false);}D();{A=j(h(),b,$,1);let x=S(A);T=x,q(x);}let M=Ae(window,[e],N,F,D);Oe(e,{type:"counter",getProgress:()=>T,getTrigger:()=>({tStart:b,tEnd:$})});let Z=()=>M.hold(false);return {destroy(){M.off(),e.style.setProperty("--scroll-draw-progress",re),$e(e);},replay(){k=-1,A=0,O=false,T=0,q(0),Z();},pause:()=>M.hold(true),resume:Z,seek(x){let C=Math.min(1,Math.max(0,x));T=C,k=C,A=0,M.hold(true),q(C);},getProgress(){return T}}}var sr={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function ir(e,n={}){if(typeof window>"u")return sr;let r=typeof e=="string"?document.querySelector(e):e;if(!r||r.tagName.toLowerCase()!=="video")return B("scrollVideo: <video> element not found:",e),sr;let t=r,{trigger:o={},easing:s="linear",once:i=false,axis:u="y",preload:c="auto",triggerElement:d,onReady:y,onComplete:v,onProgress:S}=n,z=d??t,G=window.matchMedia("(prefers-reduced-motion: reduce)").matches,b=typeof s=="function"?s:K[s]??K.linear,$=te(o.start||"top top"),J=te(o.end||"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=c);let k=n.from??0,A=n.to,T=0,O=0,h=false,R=-1,D=0,re=0,q=false,N=false,F=()=>u==="x"?window.scrollX:window.scrollY,M=()=>u==="x"?window.innerWidth:window.innerHeight;function Z(){let P=z.getBoundingClientRect(),L=u==="x"?P.left:P.top,se=u==="x"?P.width:P.height,Ne=ye({top:L,height:se},F(),M(),$,J);T=Ne.tStart,O=Ne.tEnd,N&&O===T&&B("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t);}let x=NaN;function C(P){if(!N)return;let L=A??t.duration??0,se=k+(L-k)*P;se!==x&&(x=se,t.currentTime=se),t.style.setProperty("--scroll-draw-progress",String(P)),S?.(P);}let be=()=>j(F(),T,O,1);function _(){if(!N||G)return;let P=be(),L=i?Math.max(R,b(D=Math.max(D,P))):b(P);re=L,C(L),L>=1&&!q?(q=true,v?.()):L<1&&!i&&(q=false);}let Y=Ae(window,[z],be,_,Z),fe=()=>Y.hold(h||!N||G);fe();function xe(){if(N=true,A===void 0&&(A=t.duration),G){C(1),y?.();return}Z(),y?.(),h?C(re):fe();}t.readyState>=1?xe():t.addEventListener("loadedmetadata",xe,{once:true}),N||Z();let me=G?()=>{}:je(P=>{P&&(me(),G=true,Y.hold(true),C(1));});Oe(t,{type:"video",getProgress:()=>re,getTrigger:()=>({tStart:T,tEnd:O})});function le(){h&&(h=false,fe());}return {destroy(){Y.off(),t.removeEventListener("loadedmetadata",xe),me(),$e(t);},replay(){R=-1,D=0,q=false,re=0,x=NaN,C(0),le();},pause(){h=true,Y.hold(true);},resume:le,seek(P){let L=Math.min(1,Math.max(0,P));re=L,R=L,D=0,h=true,Y.hold(true),x=NaN,C(L);},getProgress(){return re}}}var ht={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function qr(e){let n=e>1?[0,e-1]:[0],r=[[0,e-1]];for(let t=0;t<r.length;t++){let[o,s]=r[t];if(s-o<2)continue;let i=o+s>>1;n.push(i),r.push([o,i],[i,s]);}return n}function ar(e,n){if(typeof window>"u")return ht;let r=typeof e=="string"?document.querySelector(e):e;if(!r||r.tagName.toLowerCase()!=="canvas")return B("scrollFrames: <canvas> element not found:",e),ht;let t=r,{frames:o,trigger:s={},easing:i="linear",once:u=false,axis:c="y",fit:d="cover",triggerElement:y,onReady:v,onLoad:S,onComplete:z,onProgress:G}=n||{},b=Array.isArray(o)?o:null,$=n?.count,J=Math.floor(b?Math.min($??b.length,b.length):$??NaN);if(!(b||typeof o=="function")||!Number.isFinite(J)||J<1)return B("scrollFrames: no frames. Pass `frames` as an array of URLs, or a function with a finite `count` of 1 or more.",t),ht;let k=n.concurrency??6;(!Number.isFinite(k)||k<1)&&(B("scrollFrames: `concurrency` must be a finite number of 1 or more; using 6.",n.concurrency),k=6),k=Math.floor(k);let A=t.getContext("2d");if(!A)return B("scrollFrames: the canvas has no 2D context.",t),ht;let T=J-1,O=y??t,h=window.matchMedia("(prefers-reduced-motion: reduce)").matches,R=typeof i=="function"?i:K[i]??K.linear,D=f=>{let p=R(f);return p===p?p:0},re=te(s.start||"top top"),q=te(s.end||"bottom top"),N=0,F=0,M=false,Z=-1,x=0,C=0,be=false,_=false,Y=false,fe=false,xe=0,me=-1,le=new Array(J),P=new Uint8Array(J),L=new Set,se=h?[T]:qr(J),Ne=0,ee=0,He=false,Te=(f,...p)=>{if(f)try{f(...p);}catch(E){typeof reportError=="function"?reportError(E):setTimeout(()=>{throw E});}},we=false,_e=f=>{let p;try{p=b?b[f]:o(f);}catch(E){p=E;}return typeof p=="string"&&p?p:(we||(we=true,B(`scrollFrames: no URL for frame ${f}; it is skipped for its nearest neighbour.`,p)),null)},Ie=()=>c==="x"?window.scrollX:window.scrollY,Me=()=>c==="x"?window.innerWidth:window.innerHeight;function Ce(){!He&&ee===se.length&&(He=true,Te(S));}function l(){for(;!_&&L.size<k&&Ne<se.length;){let f=se[Ne++];P[f]||g(f);}}function g(f){P[f]=1;let p=_e(f);if(p===null){ee++,queueMicrotask(()=>{_||Ce();});return}let E=new Image,ce=false,Ee=Ve=>{ce||_||(ce=true,E.onload=E.onerror=null,L.delete(E),Ve?le[f]=E:B("scrollFrames: a frame failed to load; its nearest neighbour shows instead:",p),ee++,l(),W(),Ce());};L.add(E),E.decoding="async",E.onerror=()=>Ee(false),E.src=p,typeof E.decode=="function"?E.decode().then(()=>Ee(true),()=>{E.complete?Ee(E.naturalWidth>0):E.onload=()=>Ee(true);}):E.onload=()=>Ee(true);}function ie(f){for(let p=0;p<=T;p++){if(le[f-p])return f-p;if(le[f+p])return f+p}return -1}function H(){let f=t.clientWidth,p=t.clientHeight;if(!f||!p)return;let E=Math.min(window.devicePixelRatio||1,2),ce=Math.round(f*E),Ee=Math.round(p*E);if(Math.abs(t.width-ce)<=1&&Math.abs(t.height-Ee)<=1)return;t.width=ce,t.height=Ee,me=-1;let Ve=t.clientWidth,ke=t.clientHeight;if(Ve!==f||ke!==p){let ze=t.style;Ve!==f&&ke!==p?(ze.width=`${f}px`,ze.height=`${p}px`):ze.aspectRatio=`${f} / ${p}`;}}function W(){let f=ie(xe);if(f<0||f===me)return;let p=le[f],E=t.width,ce=t.height,Ee=p.naturalWidth||E,Ve=p.naturalHeight||ce,ke=(d==="contain"?Math.min:Math.max)(E/Ee,ce/Ve),ze=Ee*ke,We=Ve*ke;A.clearRect(0,0,E,ce),A.drawImage(p,(E-ze)/2,(ce-We)/2,ze,We),me=f,Y||(Y=true,Te(v));}function U(f){xe=Math.min(T,Math.max(0,Math.round(f*T))),t.style.setProperty("--scroll-draw-progress",String(f)),W(),Te(G,f,xe);}function Q(){let f=O.getBoundingClientRect(),p=c==="x"?f.left:f.top,E=c==="x"?f.width:f.height,ce=ye({top:p,height:E},Ie(),Me(),re,q);N=ce.tStart,F=ce.tEnd,F===N&&E>0&&!h&&!fe&&(fe=true,B("scrollFrames: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t));}let Fe=()=>j(Ie(),N,F,1);function ae(){if(h)return;let f=Fe(),p=u?Math.max(Z,D(x=Math.max(x,f))):D(f);C=p,U(p),p>=1&&!be?(be=true,Te(z)):p<1&&!u&&(be=false);}function De(){C=1,U(1);}H(),h||Q();let ve=Ae(window,[O],Fe,ae,()=>{H(),h||Q(),W();}),Qe=()=>ve.hold(M||h);Qe(),h&&De(),l();let qe=typeof ResizeObserver=="function"?new ResizeObserver(()=>{H(),W();}):null;qe?.observe(t);let Ue=h?()=>{}:je(f=>{f&&(Ue(),h=true,ve.hold(true),se=se.slice(0,Ne),P[T]||se.push(T),Ce(),De(),l());});Oe(t,{type:"frames",getProgress:()=>C,getTrigger:()=>({tStart:N,tEnd:F})});function pe(){_||!M||(M=false,Qe());}return {destroy(){if(!_){_=true,ve.off(),qe?.disconnect(),Ue();for(let f of L)f.onload=f.onerror=null,f.src="";L.clear(),$e(t);}},replay(){_||(Z=-1,x=0,be=false,C=0,U(0),pe());},pause(){_||(M=true,ve.hold(true));},resume:pe,seek(f){if(_)return;let p=Math.min(1,Math.max(0,f===f?f:0));C=p,Z=p,x=0,M=true,ve.hold(true),U(p);},getProgress(){return C}}}var Ur=1e4;function lr(e){let{frames:n,count:r}=e;if(typeof n!="function")return at(e);let t=Number.isFinite(r)?Math.min(Math.max(Math.floor(r),0),Ur):0,o;try{o=Array.from({length:t},(s,i)=>n(i));}catch{o=["throws"];}return at({...e,frames:o})}function cr(e){if(!e||e.getAttribute("aria-hidden")==="true")return;let n=e.getAttribute("role");n==="presentation"||n==="none"||e.getAttribute("aria-label")||e.getAttribute("aria-labelledby")||B('<ScrollFrames>: the canvas has no aria-label. Say what the frames show, or set aria-hidden="true" if they are decoration.',e);}function ur(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 yt(e=""){let n=document.createElement("span");return n.setAttribute("aria-hidden","true"),n.textContent=e,n}function mr(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(r=>{let t=e.appendChild(yt(r)),o=/^\s+$/.test(r);return o?t.style.whiteSpace="pre":t.style.display="inline-block",o?null:t}).filter(r=>r!==null)}function Yr(e){let n=e.textContent??"";e.textContent="";let r=[],t=null;for(let o of n){let s=yt(o),i=o===" ";i?s.style.whiteSpace="pre":(s.style.display="inline-block",r.push(s)),i||o>"\u0DFF"?t=null:t||(t=e.appendChild(yt()),t.style.cssText="display:inline-block;white-space:nowrap"),(t??e).appendChild(s);}return r}function fr(e){let n=mr(e),r=new Map;for(let s of n){let i=s.offsetTop;r.has(i)||r.set(i,[]),r.get(i).push(s);}let t=[],o=Array.from(r.keys()).sort((s,i)=>s-i);for(let s of o){let i=r.get(s),u=yt();u.style.display="inline-block",i.forEach((c,d)=>{let y=c.nextElementSibling;u.appendChild(c),d<i.length-1&&y&&y.style.whiteSpace==="pre"&&u.appendChild(y);}),t.push(u);}return e.textContent="",t.forEach((s,i)=>{e.appendChild(s),i<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function Qr(e,n,r,t){if(r<=1||t===0)return e;t=Math.min(t,1/r);let o=(r-1)*t,s=n*t,i=s+(1-o);return i<=s?e>=s?1:0:ot((e-s)/(i-s),0,1)}function Xr(e,n){let r=[];if(n?.y!==void 0&&r.push(`translateY(${n.y*(1-e)}px)`),n?.x!==void 0&&r.push(`translateX(${n.x*(1-e)}px)`),n?.rotate!==void 0&&r.push(`rotate(${n.rotate*(1-e)}deg)`),n?.scale!==void 0){let t=n.scale+(1-n.scale)*e;r.push(`scale(${t})`);}return r.join(" ")}var xt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function pr(e,n={}){if(typeof window>"u")return xt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return B("scrollText: element not found:",e),xt;let t=r;return Be(n,(o,s)=>Kr(t,o,s))}function Kr(e,n,r){let{split:t="words",stagger:o=.04,easing:s="ease-out",from:i={opacity:0,y:24},trigger:u={},once:c=true,onComplete:d}=n,y=typeof s=="function"?s:K[s]??K["ease-out"],v=te(u.start||"top 85%"),S=te(u.end||"top 40%"),z=e.innerHTML,G=e.textContent??"",b;t==="chars"?b=Yr(e):t==="lines"?b=fr(e):b=mr(e),ur(e,G);let $=b.length;function J(M,Z){i?.opacity!==void 0&&(M.style.opacity=String(i.opacity+(1-i.opacity)*Z));let x=Xr(Z,i);x&&(M.style.transform=x);}function k(M){e.style.setProperty("--scroll-draw-progress",String(M)),b.forEach((Z,x)=>{let C=y(Qr(M,x,$,o));J(Z,C);});}if(r)return k(1),d?.(),{...xt,destroy:()=>{e.innerHTML=z;},getProgress:()=>1};k(0);let A=0,T=0,O=-1,h=0,R=false;function D(){({tStart:A,tEnd:T}=ye(e.getBoundingClientRect(),window.scrollY,window.innerHeight,v,S));}let re=()=>j(window.scrollY,A,T,1);function q(){let M=c?O=Math.max(O,re()):re();h=M,k(M),M>=1&&!R?(R=true,d?.()):M<1&&!c&&(R=false);}D();let N=Ae(window,[e],re,q,()=>{t==="lines"&&(e.innerHTML=z,b=fr(e),ur(e,G),k(h)),D();});Oe(e,{type:"text",getProgress:()=>h,getTrigger:()=>({tStart:A,tEnd:T})});let F=()=>N.hold(false);return {destroy(){N.off(),e.innerHTML=z,$e(e);},replay(){O=-1,R=false,h=0,k(0),F();},pause:()=>N.hold(true),resume:F,seek(M){N.hold(true),k(h=O=ot(M,0,1));},getProgress(){return h}}}function en(e,n={}){let[r,t]=tn.useState(0),o=tn.useRef(n);o.current=n;let s=tn.useRef(0);return tn.useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){t(1);return}let i=typeof e=="string"?document.querySelector(e):e.current;if(!i)return;let u=i,{axis:c="y",scrollContainer:d,trigger:y={}}=o.current,v=typeof d=="string"?document.querySelector(d):d??null,S=te(y.start||"top bottom"),z=te(y.end||"bottom top"),G=0,b=0;function $(){return v?c==="x"?v.scrollLeft:v.scrollTop:c==="x"?window.scrollX:window.scrollY}function J(){return v?c==="x"?v.clientWidth:v.clientHeight:c==="x"?window.innerWidth:window.innerHeight}function k(){let h=Ke(u,v,c);({tStart:G,tEnd:b}=ye(h,h.scroll,J(),S,z));}function A(){let{speed:h=1,easing:R="linear",once:D=false}=o.current,re=typeof R=="function"?R:K[R]??K.linear,q=j($(),G,b,h),N=re(D?s.current=Math.max(s.current,q):q);t(N);}k();let T=Ae(v??window,[u],()=>j($(),G,b,Math.min(o.current.speed??1,1)),A,k),O=je(h=>{h&&(O(),T.off(),t(1));});return ()=>{O(),T.off();}},[]),r}function Ze(e,n,r,t=at(n)){let o=tn.useRef(n);o.current=n,tn.useEffect(()=>{if(!e.current)return;let s=r(e.current,Kt(o.current,()=>o.current));return ()=>s.destroy()},[t]);}var rn=/^(data-|aria-)|^(id|role|title|tabIndex|lang|dir|hidden)$/;function et(e){let n={},r={};for(let[t,o]of Object.entries(e))(rn.test(t)?r:n)[t]=o;return [n,r]}function Vo({children:e,className:n,style:r,...t}){let o=tn.useRef(null),[s,i]=et(t);return Ze(o,s,Qt),jsxRuntime.jsx("div",{ref:o,className:n,style:r,...i,children:e})}function zo({children:e,className:n,style:r,...t}){let o=tn.useRef(null),[s,i]=et(t);return Ze(o,s,nr),jsxRuntime.jsx("div",{ref:o,className:n,style:r,...i,children:e})}function Wo({className:e,style:n,...r}){let t=tn.useRef(null),[o,s]=et(r);return Ze(t,o,or),jsxRuntime.jsx("span",{ref:t,className:e,style:n,...s})}function Go({src:e,poster:n,className:r,style:t,muted:o=true,playsInline:s=true,...i}){let u=tn.useRef(null),[c,d]=et(i);return Ze(u,c,ir),jsxRuntime.jsx("video",{...d,ref:u,src:e,poster:n,className:r,style:t,muted:o,playsInline:s,preload:c.preload??"auto"})}function jo({className:e,style:n,role:r="img",triggerElement:t,...o}){let s=tn.useRef(null),[i,u]=et(o),c=t&&"current"in t?t:null;return !c&&t&&(i.triggerElement=t),Ze(s,i,(d,y)=>ar(d,{...y,frames:i.frames,...c&&{triggerElement:c.current??void 0}}),lr(i)+(c?"+ref":"")),tn.useEffect(()=>cr(s.current),[]),jsxRuntime.jsx("canvas",{...u,ref:s,role:r,className:e,style:n})}function Bo({children:e,as:n="p",className:r,style:t,...o}){let s=tn.useRef(null),[i,u]=et(o);return Ze(s,i,pr),tn__default.default.createElement(n,{...u,ref:s,className:r,style:t},e)}exports.ScrollAnimate=zo;exports.ScrollCounter=Wo;exports.ScrollDraw=Vo;exports.ScrollFrames=jo;exports.ScrollText=Bo;exports.ScrollVideo=Go;exports.useScrollDrawProgress=en;
4
+ <div style="position:absolute;${c?`left:${l}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${l}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 Kt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Jt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Wr(e,n,t){if(!Ke)return;let r=(e.match(Jt)??[]).join("").toUpperCase(),o=(n.match(Jt)??[]).join("").toUpperCase(),s=(e.match(Kt)??[]).length,i=(n.match(Kt)??[]).length;if(r!==o){z(`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}s!==i&&z(`morphTo: coordinate count differs (${s} \u2192 ${i}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,t);}function Gr(e,n,t){let r=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let i=parseFloat(s),l=r[o++]??i;return String(+(i+(l-i)*t).toFixed(4))})}function Zt(e,n={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:je(n,(t,r)=>Br(e,t,r))}function Br(e,n,t){let{preset:r,...o}=n,s=r?{...Gt[r],...o}:o,{selector:i="path, polyline, line, polygon, rect, circle",speed:l=1,fade:c=false,easing:p="linear",trigger:b={},stagger:S=0,direction:T="forward",once:O=false,debug:R=false,axis:v="y",scrollContainer:W,autoReverse:G=false,delay:x=0,strokeColor:A,strokeWidth:L,fillOpacity:H,waypoints:h,velocityScale:k=false,threshold:F=0,rootMargin:X="0px",repeat:K=0,repeatDelay:$=0,morphTo:N,clip:y,autoplay:C=false,duration:re=1e3,native:ne=true,onProgress:ye,onStart:_,onComplete:U,onEnter:ue,onLeave:Se,onEnterBack:fe,onLeaveBack:ae}=s,M=y===true?"left":typeof y=="string"?y:false,P=Le(p),oe=Z(b.start||"top bottom"),Fe=Z(b.end||"bottom top"),J=typeof W=="string"?document.querySelector(W):W??null,He=Array.isArray(A)?A[0]:null,Te=Array.isArray(A)?A[1]:typeof A=="string"?A:null,be=Array.isArray(L)?L[0]:null,_e=Array.isArray(L)?L[1]:typeof L=="number"?L:null,Ne=Array.isArray(H)?H[0]:null,xe=Array.isArray(H)?H[1]:typeof H=="number"?H:null;function Ae(a){let m=a*100;switch(M){case "right":return `inset(0 0 0 ${100-m}%)`;case "top":return `inset(0 0 ${100-m}% 0)`;case "bottom":return `inset(${100-m}% 0 0 0)`;case "center":return `circle(${a*150}% at 50% 50%)`;default:return `inset(0 ${100-m}% 0 0)`}}let u=M?[]:Array.from(e.querySelectorAll(i)),g=[],se=[],D=0,B=0,q=S,Y=0,Ie=0,ie=false,De=false,we=0,Qe=-1,Ue=[],Ye=-1,me=false,f=0,d=0,E,le=false,ve=null;function Ve(){ve?.destroy(),ve=null;}let Oe=new Set,ze=NaN,We=true,ut=-1,Lt=performance.now(),Xe=NaN;function ft(){return J?v==="x"?J.scrollLeft:J.scrollTop:v==="x"?window.scrollX:window.scrollY}function Ct(){return J?v==="x"?J.clientWidth:J.clientHeight:v==="x"?window.innerWidth:window.innerHeight}function At(){let a=Ze(e,J,v);return he(a,a.scroll,Ct(),oe,Fe)}function Sr(){let a=B-D,m=u.length-1,w=J??document.documentElement,V=v==="x"?"Width":"Height";if(q=S,S>0&&m>0&&a>0){let pe=w[`scroll${V}`]-w[`client${V}`]-1-D-a/l;pe>=0&&(q=Math.min(S,pe/(m*a)));}let ce=Math.max(0,m)*q*a,Me=a/Math.min(l,1);Y=D+Math.min(0,ce,Me,ce+Me),Ie=D+Math.max(0,ce,Me,ce+Me);}function Ot(){(({tStart:D,tEnd:B}=At())),Sr(),R&&Ke&&(Ve(),ve=zr(D,B,v));}function vt(a,m=At){$e(e,{type:"draw",getProgress:()=>a.getProgress(),getTrigger:m});let w=a.destroy;return a.destroy=()=>{w.call(a),Re(e);},a}function kt(a,m){return O&&!G?Math.max(Qe,P(Ue[a]=Math.max(Ue[a]??0,m))):P(m)}function Tr(a,m){if(e.style.setProperty("--scroll-draw-progress",String(a)),M){let w=m==="reverse"?1-a:a;e.style.clipPath=Ae(w);return}u.forEach((w,V)=>Et(w,V,a,m));}function Et(a,m,w,V){a.style.strokeDashoffset=V==="reverse"?`${g[m]*w}`:`${g[m]*(1-w)}`,c&&(a.style.opacity=V==="reverse"?`${1-w}`:`${w}`),He&&Te?a.style.stroke=dt(He,Te,w):Te&&(a.style.stroke=Te),be!==null&&_e!==null?a.style.strokeWidth=`${be+(_e-be)*w}`:_e!==null&&(a.style.strokeWidth=`${_e}`),Ne!==null&&xe!==null?a.style.fillOpacity=`${Ne+(xe-Ne)*w}`:xe!==null&&(a.style.fillOpacity=`${xe}`),N&&a.tagName.toLowerCase()==="path"&&se[m]&&a.setAttribute("d",Gr(se[m],N,w));}function St(){if(e.style.setProperty("--scroll-draw-progress","0"),M){e.style.clipPath=Ae(T==="reverse"?1:0);return}u.forEach((a,m)=>{a.style.strokeDasharray=pt(g[m]),a.style.strokeDashoffset=T==="reverse"?"0":`${g[m]}`,c?a.style.opacity=T==="reverse"?"1":"0":a.style.opacity="",He&&(a.style.stroke=He),be!==null&&(a.style.strokeWidth=`${be}`),Ne!==null&&(a.style.fillOpacity=`${Ne}`),N&&a.tagName.toLowerCase()==="path"&&se[m]&&a.setAttribute("d",se[m]);});}function rt(a,m){let w=a.getAttribute("d"),V=mt(a);if(N&&se[m]){a.setAttribute("d",N);let ce=mt(a);a.setAttribute("d",se[m]),V=Math.max(mt(a),ce),a.setAttribute("d",w);}g[m]=V,a.style.strokeDasharray=pt(V);}if(u.forEach((a,m)=>{Vr(a);let w=a.tagName.toLowerCase()==="path";w?se.push(a.getAttribute("d")??""):se.push(""),rt(a,m);let V=g[m];N&&(w?Wr(se[se.length-1],N,a):z(`morphTo only applies to <path> elements \u2014 ignored on <${a.tagName}>.`,a)),t?(a.style.strokeDashoffset=T==="reverse"?`${V}`:"0",c&&(a.style.opacity="1"),Te&&(a.style.stroke=Te),_e!==null&&(a.style.strokeWidth=`${_e}`),xe!==null&&(a.style.fillOpacity=`${xe}`),N&&a.tagName.toLowerCase()==="path"&&a.setAttribute("d",N)):(a.style.strokeDashoffset=T==="reverse"?"0":`${V}`,c?a.style.opacity=T==="reverse"?"1":"0":a.style.opacity="",He&&(a.style.stroke=He),be!==null&&(a.style.strokeWidth=`${be}`),Ne!==null&&(a.style.fillOpacity=`${Ne}`));}),t)return M&&(e.style.clipPath=Ae(1)),U?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};M&&(e.style.clipPath=Ae(T==="reverse"?1:0));let $t=typeof p=="string"?gt(p):null;function xr(){return !(ne===false||C||R&&Ke||!_r()||!u.length||!$t||M||v!=="y"||J||l!==1||S!==0||O||G||k!==false||N||h||K||x>0||ye||_||U||ue||Se||fe||ae||A!=null||L!=null||H!=null||(b.start||"top bottom").trim()!=="top bottom"||(b.end||"bottom top").trim()!=="bottom top")}function Mr(){let a=++Ir,m=`svg-scroll-draw-${a}`,w=`svg-scroll-draw-host-${a}`,V=`--svg-scroll-draw-${a}`,ce=T==="reverse"?"0":"var(--ssd-len)",Me=T==="reverse"?"var(--ssd-len)":"0",pe=`stroke-dashoffset:${ce};`,ee=`stroke-dashoffset:${Me};`;c&&(pe+=`opacity:${T==="reverse"?1:0};`,ee+=`opacity:${T==="reverse"?0:1};`);let te=document.createElement("style");te.setAttribute("data-svg-scroll-draw",""),te.textContent=`@keyframes ${m}{from{${pe}}to{${ee}}}.${w}{view-timeline-name:${V};view-timeline-axis:block;}.${m}{animation-name:${m};animation-duration:auto;animation-timing-function:${$t};animation-fill-mode:both;animation-timeline:${V};animation-range:cover 0% cover 100%;}`,document.head.appendChild(te),e.classList.add(w);function Ee(I,Q){I.style.setProperty("--ssd-len",String(g[Q])),I.style.strokeDasharray=pt(g[Q]),I.style.strokeDashoffset="",I.style.opacity="",I.style.animationPlayState="",I.classList.add(m);}u.forEach(Ee);let de=false,Pe=-1;function ke(){if(Pe>=0)return Pe;let I=e.getBoundingClientRect(),{tStart:Q,tEnd:ge}=he({top:I.top,height:I.height},ft(),Ct(),oe,Fe);return P(j(ft(),Q,ge,l))}return {destroy(){e.classList.remove(w),u.forEach(I=>{I.classList.remove(m),I.style.removeProperty("--ssd-len"),I.style.animationPlayState="";}),te.remove();},replay(){de=false,Pe=-1,u.forEach(Ee);},pause(){de=true,u.forEach(I=>{I.style.animationPlayState="paused";});},resume(){de&&(de=false,u.forEach(I=>{I.style.animationPlayState="running";}));},seek(I){let Q=Math.min(1,Math.max(0,I));Pe=Q,de=true,u.forEach((ge,Ge)=>{ge.classList.remove(m),ge.style.strokeDashoffset=T==="reverse"?`${g[Ge]*Q}`:`${g[Ge]*(1-Q)}`,c&&(ge.style.opacity=T==="reverse"?`${1-Q}`:`${Q}`);});},getProgress(){return ke()},refresh(){u.forEach((I,Q)=>{rt(I,Q),I.style.setProperty("--ssd-len",String(g[Q]));});}}}if(xr())return vt(Mr());function Pr(){let a=Math.max(1,re),m=M?a:a*(1+Math.max(0,u.length-1)*S),w=0,V=0,ce=false;function Me(Pe){let ke=true,I=Math.min(1,Math.max(0,Pe/m));if(M){let Q=Math.min(1,Math.max(0,Pe/a)),ge=P(Q);f=ge,e.style.setProperty("--scroll-draw-progress",String(ge)),e.style.clipPath=Ae(T==="reverse"?1-ge:ge),ye?.(ge),Q<1&&(ke=false);}else {u.forEach((ge,Ge)=>{let Cr=Ge*S*a,Dt=Math.min(1,Math.max(0,(Pe-Cr)/a));Et(ge,Ge,P(Dt),T),Dt<1&&(ke=false);});let Q=P(I);f=Q,ye?.(Q),e.style.setProperty("--scroll-draw-progress",String(Q));}if(h){let Q=P(I);for(let ge in h){let Ge=parseFloat(ge);Q>=Ge&&!Oe.has(Ge)&&(Oe.add(Ge),h[ge]?.());}}return ke}function pe(Pe){if(me)return;let ke=Pe-w;De||(De=true,_?.());let I=Me(ke);if(I&&!ie){ie=true,Me(m),U?.(),d<(K==="infinite"?1/0:K??0)&&(d++,E=setTimeout(()=>{w=performance.now(),De=false,ie=false,Oe.clear(),St(),we=requestAnimationFrame(pe);},$));return}I||(we=requestAnimationFrame(pe));}function ee(){cancelAnimationFrame(we),clearTimeout(E),w=performance.now(),V=0,me=false,De=false,ie=false,d=0,ce=true,f=0,Oe.clear(),St(),we=requestAnimationFrame(pe);}let te=new IntersectionObserver(Pe=>{Pe.forEach(ke=>{ke.isIntersecting&&!(O&&ie)?ee():!ke.isIntersecting&&!O&&!ie&&(cancelAnimationFrame(we),clearTimeout(E),ce=false);});},{root:J??null,threshold:F,rootMargin:X}),Ee;function de(){clearTimeout(Ee),Ee=setTimeout(()=>u.forEach(rt),150);}return window.addEventListener("resize",de),window.addEventListener("orientationchange",de),x>0?setTimeout(()=>te.observe(e),x):te.observe(e),{destroy(){cancelAnimationFrame(we),clearTimeout(E),te.disconnect(),window.removeEventListener("resize",de),window.removeEventListener("orientationchange",de),clearTimeout(Ee);},replay(){d=0,ee();},pause(){me||!ce||(me=true,V=performance.now()-w,cancelAnimationFrame(we));},resume(){me&&(me=false,ce=true,w=performance.now()-V,we=requestAnimationFrame(pe));},seek(Pe){let ke=Math.min(1,Math.max(0,Pe));f=ke,me=true,V=ke*m,w=performance.now()-V,cancelAnimationFrame(we),Me(V);},getProgress(){return f},refresh(){clearTimeout(Ee),u.forEach(rt);}}}if(C)return vt(Pr());Ot();let Rt=()=>j(ft(),Y,Ie,1);function Ft(){ie=true,U?.(),d<(K==="infinite"?1/0:K)&&(d++,E=setTimeout(()=>{le=true;},$));}function Ht(){Qe=-1,Ue=[],De=false,ie=false,le=false,Oe.clear(),St(),We=true;}function Lr(){let a=performance.now(),m=ft();if(le&&Rt()%1&&Ht(),!We&&k===false&&m===ze)return;We=false,ze=m;let w=l;if(k!==false){let ee=a-Lt,te=ee>0?Math.abs(m-(ut<0?m:ut))/ee:0;w=l*Math.max(.2,1+te*(typeof k=="number"?k:1)*.04);}ut=m,Lt=a;let V=G?Ye===-1||m>=Ye?"forward":"reverse":T;Ye=m;let ce=B-D,Me=true,pe=ce===0?0:(m-D)/ce;if(isNaN(Xe)||(Xe<=0&&pe>0&&ue?.(),Xe<1&&pe>=1&&Se?.(),Xe>=1&&pe<1&&fe?.(),Xe>0&&pe<=0&&ae?.()),Xe=pe,M){let ee=kt(0,j(m,D,B,w));f=ee,e.style.setProperty("--scroll-draw-progress",String(ee));let te=V==="reverse"?1-ee:ee;e.style.clipPath=Ae(te),ye?.(ee),!De&&j(m,D,B,w)>0&&(De=true,_?.()),ee>=1&&!ie?Ft():ee<1&&!O&&(ie=false);return}if(u.forEach((ee,te)=>{let Ee=te*q*ce,de=kt(te,j(m,D+Ee,B+Ee,w));Et(ee,te,de,V),te===0&&(f=de,ye?.(de),e.style.setProperty("--scroll-draw-progress",String(de))),de<1&&(Me=false);}),h){let ee=P(j(m,D,B,w));for(let te in h){let Ee=parseFloat(te);ee>=Ee&&!Oe.has(Ee)&&(Oe.add(Ee),h[te]?.());}}!De&&j(m,D,B,w)>0&&(De=true,_?.()),Me&&!ie?Ft():!Me&&!O&&(ie=false);}let nt=Ce(J??window,[e],Rt,Lr,()=>{let a=g.join();u.forEach(rt),Ot(),We=true,g.join()!==a&&ot();}),Tt=x>0;function ot(){nt.hold(me||Tt);}let Nt;return Tt&&(Nt=setTimeout(()=>{Tt=false,ot();},x)),ot(),vt({destroy(){clearTimeout(E),clearTimeout(Nt),nt.off(),Ve();},replay(){Ht(),Ye=-1,ut=-1,d=0,me=false,f=0,clearTimeout(E),ot();},pause(){me=true,nt.hold(true);},resume(){me&&(me=false,We=true,ot());},seek(a){let m=Math.min(1,Math.max(0,a));f=m,Qe=m,Ue=[],me=true,nt.hold(true),Tr(m,T),We=true;},getProgress(){return f},refresh:nt.remeasure},()=>({tStart:D,tEnd:B}))}var er=new WeakMap,jr=0;function lt(e){return JSON.stringify(e,(n,t)=>{if(typeof t=="function")return "\u0192";if(typeof Element<"u"&&t instanceof Element){let r=er.get(t);return r===void 0&&er.set(t,r=++jr),`el#${r}`}return t})}function tr(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 qr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function rr(e){let n=[],t=/([\w]+)\(([^)]*)\)/g,r;for(;(r=t.exec(e))!==null;){let o=[],s=[],i=r[2].trim();if(i)for(let l of i.split(/[\s,]+/)){let c=l.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(c?parseFloat(c[1]):0),s.push(c?c[2]:"");}n.push({fn:r[1],nums:o,units:s});}return n}function Ur(e,n,t){let r=rr(e),o=rr(n);return r.length===0||r.length!==o.length?t<1?e:n:r.map((s,i)=>{let l=o[i];return s.fn!==l.fn||s.nums.length!==l.nums.length?t<1?`${s.fn}(${s.nums.map((c,p)=>`${c}${s.units[p]}`).join(", ")})`:`${l.fn}(${l.nums.map((c,p)=>`${c}${l.units[p]}`).join(", ")})`:`${s.fn}(${s.nums.map((c,p)=>`${c+(l.nums[p]-c)*t}${s.units[p]}`).join(", ")})`}).join(" ")}function nr(e,n,t){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*t);let r=String(e),o=String(n);if(qr(r))return dt(r,o,t);if(r.includes("("))return Ur(r,o,t);let s=r.match(/^([-+]?[\d.]+)(.*)$/),i=o.match(/^([-+]?[\d.]+)(.*)$/);if(s&&i){let l=parseFloat(s[1]),c=parseFloat(i[1]);return `${l+(c-l)*t}${s[2]||i[2]}`}return t<1?r:o}function Yr(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Qr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Xr=0,or="--scroll-draw-progress";function Kr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var ir={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function ar(e,n){return typeof window>"u"?ir:n.respectReducedMotion===false?sr(e,n,false):je(n,(t,r)=>sr(e,t,r))}function sr(e,n,t){let{props:r,trigger:o={},easing:s="ease-out",speed:i=1,once:l=false,axis:c="y",scrollContainer:p,native:b=true,velocityScale:S=false,triggerElement:T,onProgress:O,onComplete:R,onEnter:v,onLeave:W,onEnterBack:G,onLeaveBack:x}=n,A=Le(s,"ease-out"),L=Z(o.start||"top bottom"),H=Z(o.end||"bottom top"),h=T??e,k=typeof p=="string"?document.querySelector(p):p??null,F=Object.entries(r).map(([u,g])=>({prop:Yr(u),from:Array.isArray(g)?g[0]:"",to:Array.isArray(g)?g[1]:g}));function X(){let u=window.getComputedStyle(e);for(let g of F)g.from===""&&(g.from=u.getPropertyValue(g.prop).trim()||"0");}function K(){for(let u of F)e.style.setProperty(u.prop,String(u.to));}let $=new Map;for(let u of [...F.map(g=>g.prop),or])$.set(u,e.style.getPropertyValue(u));function N(){for(let[u,g]of $)g?e.style.setProperty(u,g):e.style.removeProperty(u);}if(t)return K(),R?.(),{...ir,destroy:N,getProgress:()=>1};X();let y=()=>k?c==="x"?k.scrollLeft:k.scrollTop:c==="x"?window.scrollX:window.scrollY,C=()=>k?c==="x"?k.clientWidth:k.clientHeight:c==="x"?window.innerWidth:window.innerHeight,re=typeof s=="string"?gt(s):null;function ne(){if(!b||!Kr()||!re||c!=="y"||k||h!==e||l||i!==1||O||R||v||W||G||x||S!==false||(o.start||"top bottom").trim()!=="top bottom"||(o.end||"bottom top").trim()!=="bottom top")return false;for(let u of F)if(!Qr.has(u.prop))return false;return true}function ye(){let u=`ssd-a-${++Xr}`,g=F.map(Y=>`${Y.prop}:${Y.from}`).join(";"),se=F.map(Y=>`${Y.prop}:${Y.to}`).join(";"),D=document.createElement("style");D.setAttribute("data-ssd-animate",""),D.textContent=`@keyframes ${u}{from{${g}}to{${se}}}.${u}{animation-name:${u};animation-duration:auto;animation-timing-function:${re};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(D),e.classList.add(u);let B=()=>{let Y=e.getBoundingClientRect();return he({top:Y.top,height:Y.height},y(),C(),L,H)};$e(e,{type:"animate",getProgress:()=>q.getProgress(),getTrigger:B});let q={refresh(){},destroy(){e.classList.remove(u),D.remove(),e.style.animationPlayState="",N(),Re(e);},replay(){e.classList.remove(u),e.offsetWidth,e.classList.add(u);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(Y){let Ie=Math.min(1,Math.max(0,Y));e.classList.remove(u);for(let ie of F)e.style.setProperty(ie.prop,nr(ie.from,ie.to,Ie));},getProgress(){let{tStart:Y,tEnd:Ie}=B();return A(j(y(),Y,Ie,i))}};return q}if(ne())return ye();let _=0,U=0,ue=false,Se=-1,fe=0,ae=0,M=false,P=NaN,oe=-1,Fe=0,J=h===e?F:[],He=false;function Te(){let u=e.style,g=J.map(q=>u.getPropertyValue(q.prop)),se=u.transition;J.length&&(u.transition="none"),J.forEach(q=>u.setProperty(q.prop,$.get(q.prop)??""));let D=Ze(h,k,c);J.forEach((q,Y)=>u.setProperty(q.prop,g[Y])),J.length&&(e.offsetWidth,u.transition=se);let B=he(D,D.scroll,C(),L,H);He&&Math.abs(B.tStart-_)<1&&Math.abs(B.tEnd-U)<1||(He=true,_=B.tStart,U=B.tEnd);}function be(u){e.style.setProperty(or,String(u));for(let g of F)e.style.setProperty(g.prop,nr(g.from,g.to,u));O?.(u);}function _e(u){if(isNaN(P)){P=u;return}P<=0&&u>0&&v?.(),P<1&&u>=1&&W?.(),P>=1&&u<1&&G?.(),P>0&&u<=0&&x?.(),P=u;}function Ne(){if(ue)return;let u=performance.now(),g=y(),se=i;if(S!==false){let Y=u-Fe,Ie=Y>0?Math.abs(g-(oe<0?g:oe))/Y:0;se=i*Math.max(.2,1+Ie*(typeof S=="number"?S:1)*.04);}oe=g,Fe=u;let D=U===_?0:(g-_)/(U-_);_e(D);let B=j(g,_,U,se),q=l?Math.max(Se,A(fe=Math.max(fe,B))):A(B);ae=q,be(q),q>=1&&!M?(M=true,R?.()):q<1&&!l&&(M=false);}let xe=Ce(k??window,[h],()=>j(y(),_,U,Math.min(i,1)),Ne,Te);Te(),U===_&&z("scrollAnimate: zero-length trigger window, so it never animates. In a sticky stage, set triggerElement.",e),fe=j(y(),_,U,i),ae=A(fe),be(ae),$e(e,{type:"animate",getProgress:()=>ae,getTrigger:()=>({tStart:_,tEnd:U})});function Ae(){ue=true,xe.hold(true);}return {destroy(){ue=true,xe.off(),N(),Re(e);},replay(){Se=-1,fe=0,M=false,ae=0,ue=false,be(0),xe.hold(false);},pause:Ae,resume(){ue&&(ue=false,xe.hold(false));},seek(u){let g=Math.min(1,Math.max(0,u));ae=g,Se=g,fe=0,Ae(),be(g);},getProgress(){return ae},refresh:xe.remeasure}}var lr=({decimals:e,format:n})=>e!==void 0?t=>t.toFixed(e):n??(t=>String(Math.round(t))),cr=e=>lr(e)(e.to),Mt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function ur(e,n){if(typeof window>"u")return Mt;let t=typeof e=="string"?document.querySelector(e):e;return t?je(n,(r,o)=>Jr(t,r,o)):(z("scrollCounter: element not found:",e),Mt)}function Jr(e,n,t){let{from:r=0,to:o,easing:s="ease-out",trigger:i={},once:l=true,onComplete:c}=n,p=lr(n),b=Le(s,"ease-out"),S=Z(i.start||"top 80%"),T=Z(i.end||"top 20%");if(t)return e.textContent=p(o),c?.(),{...Mt,getProgress:()=>1};let O=0,R=0,v=false,W=-1,G=0,x=0,A=false,L=()=>window.scrollY,H=()=>window.innerHeight;function h(){let y=e.getBoundingClientRect(),C=he({top:y.top,height:y.height},L(),H(),S,T);v&&Math.abs(C.tStart-O)<1&&Math.abs(C.tEnd-R)<1||(v=true,O=C.tStart,R=C.tEnd);}let k=e.style.getPropertyValue("--scroll-draw-progress");function F(y){e.textContent=p(r+(o-r)*y),e.style.setProperty("--scroll-draw-progress",String(y));}let X=()=>j(L(),O,R,1);function K(){let y=X(),C=l?Math.max(W,b(G=Math.max(G,y))):b(y);x=C,F(C),C>=1&&!A?(A=true,c?.()):C<1&&!l&&(A=false);}h();{G=j(L(),O,R,1);let y=b(G);x=y,F(y);}let $=Ce(window,[e],X,K,h);$e(e,{type:"counter",getProgress:()=>x,getTrigger:()=>({tStart:O,tEnd:R})});let N=()=>$.hold(false);return {destroy(){$.off(),e.style.setProperty("--scroll-draw-progress",k),Re(e);},replay(){W=-1,G=0,A=false,x=0,F(0),N();},pause:()=>$.hold(true),resume:N,seek(y){let C=Math.min(1,Math.max(0,y));x=C,W=C,G=0,$.hold(true),F(C);},getProgress(){return x}}}var fr={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function mr(e,n={}){if(typeof window>"u")return fr;let t=typeof e=="string"?document.querySelector(e):e;if(!t||t.tagName.toLowerCase()!=="video")return z("scrollVideo: <video> element not found:",e),fr;let r=t,{trigger:o={},easing:s="linear",once:i=false,axis:l="y",preload:c="auto",triggerElement:p,onReady:b,onComplete:S,onProgress:T}=n,O=p??r,R=window.matchMedia("(prefers-reduced-motion: reduce)").matches,v=Le(s),W=Z(o.start||"top top"),G=Z(o.end||"bottom top");r.pause(),r.hasAttribute("preload")||(r.preload=c);let x=n.from??0,A=n.to,L=0,H=0,h=false,k=-1,F=0,X=0,K=false,$=false,N=()=>l==="x"?window.scrollX:window.scrollY,y=()=>l==="x"?window.innerWidth:window.innerHeight;function C(){let M=O.getBoundingClientRect(),P=l==="x"?M.left:M.top,oe=l==="x"?M.width:M.height,Fe=he({top:P,height:oe},N(),y(),W,G);L=Fe.tStart,H=Fe.tEnd,$&&H===L&&z("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",r);}let re=NaN;function ne(M){if(!$)return;let P=A??r.duration??0,oe=x+(P-x)*M;oe!==re&&(re=oe,r.currentTime=oe),r.style.setProperty("--scroll-draw-progress",String(M)),T?.(M);}let ye=()=>j(N(),L,H,1);function _(){if(!$||R)return;let M=ye(),P=i?Math.max(k,v(F=Math.max(F,M))):v(M);X=P,ne(P),P>=1&&!K?(K=true,S?.()):P<1&&!i&&(K=false);}let U=Ce(window,[O],ye,_,C),ue=()=>U.hold(h||!$||R);ue();function Se(){if($=true,A===void 0&&(A=r.duration),R){ne(1),b?.();return}C(),b?.(),h?ne(X):ue();}r.readyState>=1?Se():r.addEventListener("loadedmetadata",Se,{once:true}),$||C();let fe=R?()=>{}:Be(M=>{M&&(fe(),R=true,U.hold(true),ne(1));});$e(r,{type:"video",getProgress:()=>X,getTrigger:()=>({tStart:L,tEnd:H})});function ae(){h&&(h=false,ue());}return {destroy(){U.off(),r.removeEventListener("loadedmetadata",Se),fe(),Re(r);},replay(){k=-1,F=0,K=false,X=0,re=NaN,ne(0),ae();},pause(){h=true,U.hold(true);},resume:ae,seek(M){let P=Math.min(1,Math.max(0,M));X=P,k=P,F=0,h=true,U.hold(true),re=NaN,ne(P);},getProgress(){return X}}}var bt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Zr(e){let n=e>1?[0,e-1]:[0],t=[[0,e-1]];for(let r=0;r<t.length;r++){let[o,s]=t[r];if(s-o<2)continue;let i=o+s>>1;n.push(i),t.push([o,i],[i,s]);}return n}function pr(e,n){if(typeof window>"u")return bt;let t=typeof e=="string"?document.querySelector(e):e;if(!t||t.tagName.toLowerCase()!=="canvas")return z("scrollFrames: <canvas> element not found:",e),bt;let r=t,{frames:o,trigger:s={},easing:i="linear",once:l=false,axis:c="y",fit:p="cover",triggerElement:b,onReady:S,onLoad:T,onComplete:O,onProgress:R}=n||{},v=Array.isArray(o)?o:null,W=n?.count,G=Math.floor(v?Math.min(W??v.length,v.length):W??NaN);if(!(v||typeof o=="function")||!Number.isFinite(G)||G<1)return z("scrollFrames: no frames. Pass `frames` as an array of URLs, or a function with a finite `count` of 1 or more.",r),bt;let x=n.concurrency??6;(!Number.isFinite(x)||x<1)&&(z("scrollFrames: `concurrency` must be a finite number of 1 or more; using 6.",n.concurrency),x=6),x=Math.floor(x);let A=r.getContext("2d");if(!A)return z("scrollFrames: the canvas has no 2D context.",r),bt;let L=G-1,H=b??r,h=window.matchMedia("(prefers-reduced-motion: reduce)").matches,k=Le(i),F=f=>{let d=k(f);return d===d?d:0},X=Z(s.start||"top top"),K=Z(s.end||"bottom top"),$=0,N=0,y=false,C=-1,re=0,ne=0,ye=false,_=false,U=false,ue=false,Se=0,fe=-1,ae=new Array(G),M=new Uint8Array(G),P=new Set,oe=h?[L]:Zr(G),Fe=0,J=0,He=false,Te=(f,...d)=>{if(f)try{f(...d);}catch(E){typeof reportError=="function"?reportError(E):setTimeout(()=>{throw E});}},be=false,_e=f=>{let d;try{d=v?v[f]:o(f);}catch(E){d=E;}return typeof d=="string"&&d?d:(be||(be=true,z(`scrollFrames: no URL for frame ${f}; it is skipped for its nearest neighbour.`,d)),null)},Ne=()=>c==="x"?window.scrollX:window.scrollY,xe=()=>c==="x"?window.innerWidth:window.innerHeight;function Ae(){!He&&J===oe.length&&(He=true,Te(T));}function u(){for(;!_&&P.size<x&&Fe<oe.length;){let f=oe[Fe++];M[f]||g(f);}}function g(f){M[f]=1;let d=_e(f);if(d===null){J++,queueMicrotask(()=>{_||Ae();});return}let E=new Image,le=false,ve=Ve=>{le||_||(le=true,E.onload=E.onerror=null,P.delete(E),Ve?ae[f]=E:z("scrollFrames: a frame failed to load; its nearest neighbour shows instead:",d),J++,u(),B(),Ae());};P.add(E),E.decoding="async",E.onerror=()=>ve(false),E.src=d,typeof E.decode=="function"?E.decode().then(()=>ve(true),()=>{E.complete?ve(E.naturalWidth>0):E.onload=()=>ve(true);}):E.onload=()=>ve(true);}function se(f){for(let d=0;d<=L;d++){if(ae[f-d])return f-d;if(ae[f+d])return f+d}return -1}function D(){let f=r.clientWidth,d=r.clientHeight;if(!f||!d)return;let E=Math.min(window.devicePixelRatio||1,2),le=Math.round(f*E),ve=Math.round(d*E);if(Math.abs(r.width-le)<=1&&Math.abs(r.height-ve)<=1)return;r.width=le,r.height=ve,fe=-1;let Ve=r.clientWidth,Oe=r.clientHeight;if(Ve!==f||Oe!==d){let ze=r.style;Ve!==f&&Oe!==d?(ze.width=`${f}px`,ze.height=`${d}px`):ze.aspectRatio=`${f} / ${d}`;}}function B(){let f=se(Se);if(f<0||f===fe)return;let d=ae[f],E=r.width,le=r.height,ve=d.naturalWidth||E,Ve=d.naturalHeight||le,Oe=(p==="contain"?Math.min:Math.max)(E/ve,le/Ve),ze=ve*Oe,We=Ve*Oe;A.clearRect(0,0,E,le),A.drawImage(d,(E-ze)/2,(le-We)/2,ze,We),fe=f,U||(U=true,Te(S));}function q(f){Se=Math.min(L,Math.max(0,Math.round(f*L))),r.style.setProperty("--scroll-draw-progress",String(f)),B(),Te(R,f,Se);}function Y(){let f=H.getBoundingClientRect(),d=c==="x"?f.left:f.top,E=c==="x"?f.width:f.height,le=he({top:d,height:E},Ne(),xe(),X,K);$=le.tStart,N=le.tEnd,N===$&&E>0&&!h&&!ue&&(ue=true,z("scrollFrames: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",r));}let Ie=()=>j(Ne(),$,N,1);function ie(){if(h)return;let f=Ie(),d=l?Math.max(C,F(re=Math.max(re,f))):F(f);ne=d,q(d),d>=1&&!ye?(ye=true,Te(O)):d<1&&!l&&(ye=false);}function De(){ne=1,q(1);}D(),h||Y();let we=Ce(window,[H],Ie,ie,()=>{D(),h||Y(),B();}),Qe=()=>we.hold(y||h);Qe(),h&&De(),u();let Ue=typeof ResizeObserver=="function"?new ResizeObserver(()=>{D(),B();}):null;Ue?.observe(r);let Ye=h?()=>{}:Be(f=>{f&&(Ye(),h=true,we.hold(true),oe=oe.slice(0,Fe),M[L]||oe.push(L),Ae(),De(),u());});$e(r,{type:"frames",getProgress:()=>ne,getTrigger:()=>({tStart:$,tEnd:N})});function me(){_||!y||(y=false,Qe());}return {destroy(){if(!_){_=true,we.off(),Ue?.disconnect(),Ye();for(let f of P)f.onload=f.onerror=null,f.src="";P.clear(),Re(r);}},replay(){_||(C=-1,re=0,ye=false,ne=0,q(0),me());},pause(){_||(y=true,we.hold(true));},resume:me,seek(f){if(_)return;let d=Math.min(1,Math.max(0,f===f?f:0));ne=d,C=d,re=0,y=true,we.hold(true),q(d);},getProgress(){return ne}}}var en=1e4;function dr(e){let{frames:n,count:t}=e;if(typeof n!="function")return lt(e);let r=Number.isFinite(t)?Math.min(Math.max(Math.floor(t),0),en):0,o;try{o=Array.from({length:r},(s,i)=>n(i));}catch{o=["throws"];}return lt({...e,frames:o})}function gr(e,n="<ScrollFrames>"){if(!e||e.getAttribute("aria-hidden")==="true")return;let t=e.getAttribute("role");t==="presentation"||t==="none"||e.getAttribute("aria-label")||e.getAttribute("aria-labelledby")||z(`${n}: the canvas has no aria-label. Say what the frames show, or set aria-hidden="true" if they are decoration.`,e);}function hr(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 wt(e=""){let n=document.createElement("span");return n.setAttribute("aria-hidden","true"),n.textContent=e,n}function br(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(t=>{let r=e.appendChild(wt(t)),o=/^\s+$/.test(t);return o?r.style.whiteSpace="pre":r.style.display="inline-block",o?null:r}).filter(t=>t!==null)}function tn(e){let n=e.textContent??"";e.textContent="";let t=[],r=null;for(let o of n){let s=wt(o),i=o===" ";i?s.style.whiteSpace="pre":(s.style.display="inline-block",t.push(s)),i||o>"\u0DFF"?r=null:r||(r=e.appendChild(wt()),r.style.cssText="display:inline-block;white-space:nowrap"),(r??e).appendChild(s);}return t}function yr(e){let n=br(e),t=new Map;for(let s of n){let i=s.offsetTop;t.has(i)||t.set(i,[]),t.get(i).push(s);}let r=[],o=Array.from(t.keys()).sort((s,i)=>s-i);for(let s of o){let i=t.get(s),l=wt();l.style.display="inline-block",i.forEach((c,p)=>{let b=c.nextElementSibling;l.appendChild(c),p<i.length-1&&b&&b.style.whiteSpace==="pre"&&l.appendChild(b);}),r.push(l);}return e.textContent="",r.forEach((s,i)=>{e.appendChild(s),i<r.length-1&&e.appendChild(document.createTextNode(" "));}),r}function rn(e,n,t,r){if(t<=1||r===0)return e;r=Math.min(r,1/t);let o=(t-1)*r,s=n*r,i=s+(1-o);return i<=s?e>=s?1:0:st((e-s)/(i-s),0,1)}function nn(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 Pt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function wr(e,n={}){if(typeof window>"u")return Pt;let t=typeof e=="string"?document.querySelector(e):e;if(!t)return z("scrollText: element not found:",e),Pt;let r=t;return je(n,(o,s)=>on(r,o,s))}function on(e,n,t){let{split:r="words",stagger:o=.04,easing:s="ease-out",from:i={opacity:0,y:24},trigger:l={},once:c=true,onComplete:p}=n,b=Le(s,"ease-out"),S=Z(l.start||"top 85%"),T=Z(l.end||"top 40%"),O=e.innerHTML,R=e.textContent??"",v;r==="chars"?v=tn(e):r==="lines"?v=yr(e):v=br(e),hr(e,R);let W=v.length;function G(y,C){i?.opacity!==void 0&&(y.style.opacity=String(i.opacity+(1-i.opacity)*C));let re=nn(C,i);re&&(y.style.transform=re);}function x(y){e.style.setProperty("--scroll-draw-progress",String(y)),v.forEach((C,re)=>{let ne=b(rn(y,re,W,o));G(C,ne);});}if(t)return x(1),p?.(),{...Pt,destroy:()=>{e.innerHTML=O;},getProgress:()=>1};x(0);let A=0,L=0,H=-1,h=0,k=false;function F(){({tStart:A,tEnd:L}=he(e.getBoundingClientRect(),window.scrollY,window.innerHeight,S,T));}let X=()=>j(window.scrollY,A,L,1);function K(){let y=c?H=Math.max(H,X()):X();h=y,x(y),y>=1&&!k?(k=true,p?.()):y<1&&!c&&(k=false);}F();let $=Ce(window,[e],X,K,()=>{r==="lines"&&(e.innerHTML=O,v=yr(e),hr(e,R),x(h)),F();});$e(e,{type:"text",getProgress:()=>h,getTrigger:()=>({tStart:A,tEnd:L})});let N=()=>$.hold(false);return {destroy(){$.off(),e.innerHTML=O,Re(e);},replay(){H=-1,k=false,h=0,x(0),N();},pause:()=>$.hold(true),resume:N,seek(y){$.hold(true),x(h=H=st(y,0,1));},getProgress(){return h}}}function ln(e,n={}){let[t,r]=cn.useState(0),o=cn.useRef(n);o.current=n;let s=cn.useRef(0);return cn.useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){r(1);return}let i=typeof e=="string"?document.querySelector(e):e.current;if(!i)return;let l=i,{axis:c="y",scrollContainer:p,trigger:b={}}=o.current,S=typeof p=="string"?document.querySelector(p):p??null,T=Z(b.start||"top bottom"),O=Z(b.end||"bottom top"),R=0,v=0;function W(){return S?c==="x"?S.scrollLeft:S.scrollTop:c==="x"?window.scrollX:window.scrollY}function G(){return S?c==="x"?S.clientWidth:S.clientHeight:c==="x"?window.innerWidth:window.innerHeight}function x(){let h=Ze(l,S,c);({tStart:R,tEnd:v}=he(h,h.scroll,G(),T,O));}function A(){let{speed:h=1,easing:k="linear",once:F=false}=o.current,X=Le(k),K=j(W(),R,v,h),$=X(F?s.current=Math.max(s.current,K):K);r($);}x();let L=Ce(S??window,[l],()=>j(W(),R,v,Math.min(o.current.speed??1,1)),A,x),H=Be(h=>{h&&(H(),L.off(),r(1));});return ()=>{H(),L.off();}},[]),t}function et(e,n,t,r=lt(n)){let o=cn.useRef(n);o.current=n,cn.useEffect(()=>{if(!e.current)return;let s=t(e.current,tr(o.current,()=>o.current));return ()=>s.destroy()},[r]);}var un=/^(data-|aria-)|^(id|role|title|tabIndex|lang|dir|hidden)$/;function tt(e){let n={},t={};for(let[r,o]of Object.entries(e))(un.test(r)?t:n)[r]=o;return [n,t]}function Xo({children:e,className:n,style:t,...r}){let o=cn.useRef(null),[s,i]=tt(r);return et(o,s,Zt),jsxRuntime.jsx("div",{ref:o,className:n,style:t,...i,children:e})}function Ko({children:e,className:n,style:t,...r}){let o=cn.useRef(null),[s,i]=tt(r);return et(o,s,ar),jsxRuntime.jsx("div",{ref:o,className:n,style:t,...i,children:e})}function Jo({className:e,style:n,...t}){let r=cn.useRef(null),[o,s]=tt(t);et(r,o,ur);let i=cn.useRef(cr(o)).current;return jsxRuntime.jsx("span",{ref:r,className:e,style:n,...s,children:i})}function Zo({src:e,poster:n,className:t,style:r,muted:o=true,playsInline:s=true,...i}){let l=cn.useRef(null),[c,p]=tt(i);return et(l,c,mr),jsxRuntime.jsx("video",{...p,ref:l,src:e,poster:n,className:t,style:r,muted:o,playsInline:s,preload:c.preload??"auto"})}function es({className:e,style:n,role:t="img",triggerElement:r,...o}){let s=cn.useRef(null),[i,l]=tt(o),c=r&&"current"in r?r:null;return !c&&r&&(i.triggerElement=r),et(s,i,(p,b)=>pr(p,{...b,frames:i.frames,...c&&{triggerElement:c.current??void 0}}),dr(i)+(c?"+ref":"")),cn.useEffect(()=>gr(s.current),[]),jsxRuntime.jsx("canvas",{...l,ref:s,role:t,className:e,style:n})}function ts({children:e,as:n="p",className:t,style:r,...o}){let s=cn.useRef(null),[i,l]=tt(o);return et(s,i,wr),cn__default.default.createElement(n,{...l,ref:s,className:t,style:r},e)}exports.ScrollAnimate=Ko;exports.ScrollCounter=Jo;exports.ScrollDraw=Xo;exports.ScrollFrames=es;exports.ScrollText=ts;exports.ScrollVideo=Zo;exports.useScrollDrawProgress=ln;
@@ -1,7 +1,7 @@
1
1
  import React, { RefObject } from 'react';
2
- import { E as EasingName, T as TriggerConfig, a as ScrollDrawOptions } from '../types-9bcJdVcg.mjs';
3
- import { S as ScrollAnimateOptions } from '../engine-BLWKCfxC.mjs';
4
- import { S as ScrollCounterOptions } from '../index-DVjblK_4.mjs';
2
+ import { E as Easing, T as TriggerConfig, a as ScrollDrawOptions } from '../types-iITMwrru.mjs';
3
+ import { S as ScrollAnimateOptions } from '../engine-Bi2x8-X-.mjs';
4
+ import { S as ScrollCounterOptions } from '../index-BMMZ8aW7.mjs';
5
5
  import { ScrollVideoOptions } from '../video/index.mjs';
6
6
  import { ScrollFramesOptions } from '../frames/index.mjs';
7
7
  import { ScrollTextOptions } from '../text/index.mjs';
@@ -10,7 +10,7 @@ interface UseScrollDrawProgressOptions {
10
10
  /** Same speed multiplier as ScrollDraw. Values > 1 complete faster. Default 1. */
11
11
  speed?: number;
12
12
  /** Same easing curves as ScrollDraw. Default 'linear'. */
13
- easing?: EasingName | ((t: number) => number);
13
+ easing?: Easing;
14
14
  /** Same trigger syntax as ScrollDraw. Default: start 'top bottom', end 'bottom top'. */
15
15
  trigger?: TriggerConfig;
16
16
  /** Scroll axis. Default 'y'. */
@@ -1,7 +1,7 @@
1
1
  import React, { RefObject } from 'react';
2
- import { E as EasingName, T as TriggerConfig, a as ScrollDrawOptions } from '../types-9bcJdVcg.js';
3
- import { S as ScrollAnimateOptions } from '../engine-6VsjEwzb.js';
4
- import { S as ScrollCounterOptions } from '../index-BN8yKeQ3.js';
2
+ import { E as Easing, T as TriggerConfig, a as ScrollDrawOptions } from '../types-iITMwrru.js';
3
+ import { S as ScrollAnimateOptions } from '../engine-DAlvk6i0.js';
4
+ import { S as ScrollCounterOptions } from '../index-MdQ4ti_z.js';
5
5
  import { ScrollVideoOptions } from '../video/index.js';
6
6
  import { ScrollFramesOptions } from '../frames/index.js';
7
7
  import { ScrollTextOptions } from '../text/index.js';
@@ -10,7 +10,7 @@ interface UseScrollDrawProgressOptions {
10
10
  /** Same speed multiplier as ScrollDraw. Values > 1 complete faster. Default 1. */
11
11
  speed?: number;
12
12
  /** Same easing curves as ScrollDraw. Default 'linear'. */
13
- easing?: EasingName | ((t: number) => number);
13
+ easing?: Easing;
14
14
  /** Same trigger syntax as ScrollDraw. Default: start 'top bottom', end 'bottom top'. */
15
15
  trigger?: TriggerConfig;
16
16
  /** Scroll axis. Default 'y'. */
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import {a as a$2,b as b$1}from'../chunk-22P4KBPG.mjs';import {a as a$3}from'../chunk-D2BHE4F2.mjs';import {b as b$2,a as a$5}from'../chunk-XSVTHCLO.mjs';import {a as a$8}from'../chunk-BRV2B2YW.mjs';import {a as a$9}from'../chunk-32ZCSGFZ.mjs';import {a as a$7}from'../chunk-U5TKLHGW.mjs';import {a as a$6}from'../chunk-7USW2XFB.mjs';import {b as b$3}from'../chunk-7XOFQCQE.mjs';import'../chunk-V3Z6G5JE.mjs';import {a as a$4}from'../chunk-UPWWULKI.mjs';import'../chunk-XC5NR2MU.mjs';import'../chunk-2PYLM3E7.mjs';import {a,e,b,c}from'../chunk-NV6YTPHI.mjs';import {d as d$1}from'../chunk-THPTANES.mjs';import'../chunk-4DOJSIEQ.mjs';import {a as a$1}from'../chunk-5PJEKEEP.mjs';import'../chunk-EBU6E26L.mjs';import'../chunk-LFSU6LR3.mjs';import ee,{useState,useRef,useEffect}from'react';import {jsx}from'react/jsx-runtime';function _(o,r={}){let[s,e$1]=useState(0),t=useRef(r);t.current=r;let n=useRef(0);return useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){e$1(1);return}let l=typeof o=="string"?document.querySelector(o):o.current;if(!l)return;let c$1=l,{axis:i="y",scrollContainer:m,trigger:g={}}=t.current,a$2=typeof m=="string"?document.querySelector(m):m??null,K=a(g.start||"top bottom"),W=a(g.end||"bottom top"),y=0,E=0;function P(){return a$2?i==="x"?a$2.scrollLeft:a$2.scrollTop:i==="x"?window.scrollX:window.scrollY}function X(){return a$2?i==="x"?a$2.clientWidth:a$2.clientHeight:i==="x"?window.innerWidth:window.innerHeight}function b$1(){let u=a$4(c$1,a$2,i);({tStart:y,tEnd:E}=c(u,u.scroll,X(),K,W));}function $(){let{speed:u=1,easing:O="linear",once:J=false}=t.current,Y=typeof O=="function"?O:d$1[O]??d$1.linear,v=b(P(),y,E,u),B=Y(J?n.current=Math.max(n.current,v):v);e$1(B);}b$1();let T=e(a$2??window,[c$1],()=>b(P(),y,E,Math.min(t.current.speed??1,1)),$,b$1),C=a$1(u=>{u&&(C(),T.off(),e$1(1));});return ()=>{C(),T.off();}},[]),s}function f(o,r,s,e=a$5(r)){let t=useRef(r);t.current=r,useEffect(()=>{if(!o.current)return;let n=s(o.current,b$2(t.current,()=>t.current));return ()=>n.destroy()},[e]);}var te=/^(data-|aria-)|^(id|role|title|tabIndex|lang|dir|hidden)$/;function d(o){let r={},s={};for(let[e,t]of Object.entries(o))(te.test(e)?s:r)[e]=t;return [r,s]}function Ee({children:o,className:r,style:s,...e}){let t=useRef(null),[n,l]=d(e);return f(t,n,b$3),jsx("div",{ref:t,className:r,style:s,...l,children:o})}function Oe({children:o,className:r,style:s,...e}){let t=useRef(null),[n,l]=d(e);return f(t,n,a$6),jsx("div",{ref:t,className:r,style:s,...l,children:o})}function we({className:o,style:r,...s}){let e=useRef(null),[t,n]=d(s);return f(e,t,a$7),jsx("span",{ref:e,className:o,style:r,...n})}function Re({src:o,poster:r,className:s,style:e,muted:t=true,playsInline:n=true,...l}){let c=useRef(null),[i,m]=d(l);return f(c,i,a$8),jsx("video",{...m,ref:c,src:o,poster:r,className:s,style:e,muted:t,playsInline:n,preload:i.preload??"auto"})}function xe({className:o,style:r,role:s="img",triggerElement:e,...t}){let n=useRef(null),[l,c]=d(t),i=e&&"current"in e?e:null;return !i&&e&&(l.triggerElement=e),f(n,l,(m,g)=>a$3(m,{...g,frames:l.frames,...i&&{triggerElement:i.current??void 0}}),a$2(l)+(i?"+ref":"")),useEffect(()=>b$1(n.current),[]),jsx("canvas",{...c,ref:n,role:s,className:o,style:r})}function Pe({children:o,as:r="p",className:s,style:e,...t}){let n=useRef(null),[l,c]=d(t);return f(n,l,a$9),ee.createElement(r,{...c,ref:n,className:s,style:e},o)}export{Oe as ScrollAnimate,we as ScrollCounter,Ee as ScrollDraw,xe as ScrollFrames,Pe as ScrollText,Re as ScrollVideo,_ as useScrollDrawProgress};
2
+ import {c,d as d$1,b as b$1,a as a$5}from'../chunk-KN2YB54Z.mjs';import {a as a$7}from'../chunk-HJTHOZK5.mjs';import {a as a$3}from'../chunk-GBFWTY5L.mjs';import {a as a$8}from'../chunk-UF3MO5XQ.mjs';import {a as a$2,b as b$3}from'../chunk-OGFXZCKC.mjs';import {a as a$6}from'../chunk-HAGTU5EX.mjs';import {b as b$2}from'../chunk-XLXVGQ3P.mjs';import'../chunk-7LDSB4FT.mjs';import {a as a$4}from'../chunk-UPWWULKI.mjs';import'../chunk-XC5NR2MU.mjs';import'../chunk-YOOPMYT6.mjs';import'../chunk-2PYLM3E7.mjs';import {a,e,b,c as c$1}from'../chunk-NV6YTPHI.mjs';import {f as f$1}from'../chunk-IXR6RML7.mjs';import'../chunk-4DOJSIEQ.mjs';import {a as a$1}from'../chunk-5PJEKEEP.mjs';import'../chunk-EBU6E26L.mjs';import'../chunk-LFSU6LR3.mjs';import te,{useState,useRef,useEffect}from'react';import {jsx}from'react/jsx-runtime';function ee(o,r={}){let[s,e$1]=useState(0),t=useRef(r);t.current=r;let n=useRef(0);return useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){e$1(1);return}let l=typeof o=="string"?document.querySelector(o):o.current;if(!l)return;let c=l,{axis:i="y",scrollContainer:p,trigger:g={}}=t.current,a$2=typeof p=="string"?document.querySelector(p):p??null,W=a(g.start||"top bottom"),X=a(g.end||"bottom top"),y=0,E=0;function x(){return a$2?i==="x"?a$2.scrollLeft:a$2.scrollTop:i==="x"?window.scrollX:window.scrollY}function $(){return a$2?i==="x"?a$2.clientWidth:a$2.clientHeight:i==="x"?window.innerWidth:window.innerHeight}function R(){let u=a$4(c,a$2,i);({tStart:y,tEnd:E}=c$1(u,u.scroll,$(),W,X));}function G(){let{speed:u=1,easing:J="linear",once:Y=false}=t.current,B=f$1(J),b$1=b(x(),y,E,u),Q=B(Y?n.current=Math.max(n.current,b$1):b$1);e$1(Q);}R();let P=e(a$2??window,[c],()=>b(x(),y,E,Math.min(t.current.speed??1,1)),G,R),T=a$1(u=>{u&&(T(),P.off(),e$1(1));});return ()=>{T(),P.off();}},[]),s}function f(o,r,s,e=a$5(r)){let t=useRef(r);t.current=r,useEffect(()=>{if(!o.current)return;let n=s(o.current,b$1(t.current,()=>t.current));return ()=>n.destroy()},[e]);}var re=/^(data-|aria-)|^(id|role|title|tabIndex|lang|dir|hidden)$/;function d(o){let r={},s={};for(let[e,t]of Object.entries(o))(re.test(e)?s:r)[e]=t;return [r,s]}function Oe({children:o,className:r,style:s,...e}){let t=useRef(null),[n,l]=d(e);return f(t,n,b$2),jsx("div",{ref:t,className:r,style:s,...l,children:o})}function we({children:o,className:r,style:s,...e}){let t=useRef(null),[n,l]=d(e);return f(t,n,a$6),jsx("div",{ref:t,className:r,style:s,...l,children:o})}function xe({className:o,style:r,...s}){let e=useRef(null),[t,n]=d(s);f(e,t,b$3);let l=useRef(a$2(t)).current;return jsx("span",{ref:e,className:o,style:r,...n,children:l})}function Re({src:o,poster:r,className:s,style:e,muted:t=true,playsInline:n=true,...l}){let c=useRef(null),[i,p]=d(l);return f(c,i,a$7),jsx("video",{...p,ref:c,src:o,poster:r,className:s,style:e,muted:t,playsInline:n,preload:i.preload??"auto"})}function Pe({className:o,style:r,role:s="img",triggerElement:e,...t}){let n=useRef(null),[l,c$1]=d(t),i=e&&"current"in e?e:null;return !i&&e&&(l.triggerElement=e),f(n,l,(p,g)=>a$3(p,{...g,frames:l.frames,...i&&{triggerElement:i.current??void 0}}),c(l)+(i?"+ref":"")),useEffect(()=>d$1(n.current),[]),jsx("canvas",{...c$1,ref:n,role:s,className:o,style:r})}function Te({children:o,as:r="p",className:s,style:e,...t}){let n=useRef(null),[l,c]=d(t);return f(n,l,a$8),te.createElement(r,{...c,ref:n,className:s,style:e},o)}export{we as ScrollAnimate,xe as ScrollCounter,Oe as ScrollDraw,Pe as ScrollFrames,Te as ScrollText,Re as ScrollVideo,ee as useScrollDrawProgress};
@@ -1 +1 @@
1
- 'use strict';function ze({tension:e=2.5,friction:t=2.2}={}){return n=>1-Math.cos(n*Math.PI*e)*Math.pow(1-n,t)}function Xe({bounces:e=3,decay:t=.5}={}){let n=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,t)),o=Math.sqrt(r),s=0,a=[];for(let l=0;l<n;l++){let f=Math.pow(o,l);a.push(f),s+=f;}let m=[0],c=0;for(let l=0;l<n;l++)c+=a[l]/s,m.push(c);return l=>{if(l<=0)return 0;if(l>=1)return 1;for(let f=0;f<n;f++)if(l<=m[f+1]){let d=(l-m[f])/(m[f+1]-m[f]);if(f===0)return d*(2-d);let E=1-Math.pow(r,f);return E+(1-E)*(2*d-1)*(2*d-1)}return 1}}function Ye({amplitude:e=1,period:t=.4}={}){let n=Math.max(1,e),r=Math.max(.1,t),o=n<=1?r/4:r/(2*Math.PI)*Math.asin(1/n);return s=>s<=0?0:s>=1?1:n*Math.pow(2,-10*s)*Math.sin((s-o)*(2*Math.PI)/r)+1}var H={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:ze(),bounce:Xe(),elastic:Ye()};function pe(e,t,n){return Math.min(n,Math.max(t,e))}function ne(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return {element:"top",viewport:t};let[n="top",r="bottom"]=t.split(/\s+/).filter(Boolean);return {element:n,viewport:r}}var be=(e,t)=>e==="top"?0:e==="center"?.5:e==="bottom"?1:t;function de(e,t,n,r){return e+n+t*be(r,0)}function ge(e,t){return t*(/^\d+(\.\d+)?%$/.test(e)?parseFloat(e)/100:be(e,1))}function V(e,t,n,r){return n===t?0:pe((e-t)/(n-t)*r,0,1)}function re(e,t,n,r,o){let s=de(e.top,e.height,t,r.element)-ge(r.viewport,n),a=de(e.top,e.height,t,o.element)-ge(o.viewport,n);return {tStart:s,tEnd:a}}function he(e,t,n){let r=e.getBoundingClientRect(),o=n==="x"?r.width:r.height;return t?{top:n==="x"?r.left-t.getBoundingClientRect().left-t.clientLeft+t.scrollLeft:r.top-t.getBoundingClientRect().top-t.clientTop+t.scrollTop,height:o,scroll:0}:{top:n==="x"?r.left:r.top,height:o,scroll:n==="x"?window.scrollX:window.scrollY}}function ye(e){let t=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(t)return [parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)];let n=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n)return [parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)];let r=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return r?[parseInt(r[1]),parseInt(r[2]),parseInt(r[3])]:null}function ve(e,t,n){let r=ye(e),o=ye(t);return !r||!o?e:`rgb(${Math.round(r[0]+(o[0]-r[0])*n)},${Math.round(r[1]+(o[1]-r[1])*n)},${Math.round(r[2]+(o[2]-r[2])*n)})`}var Ge="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Qe="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Ee=33;function je(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function qe(e){let t=[];for(let n=0;n<Ee;n++){let r=n/(Ee-1);t.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${t.join(",")})`}function we(e){switch(e){case "linear":return "linear";case "ease-in":return Ge;case "ease-out":return Qe;case "ease-in-out":return je()?qe(H["ease-in-out"]):null;default:return null}}var Se=Symbol.for("svg-scroll-draw.registry");function Me(){let e=globalThis;return e[Se]||(e[Se]=new Map)}function oe(e,t){Me().set(e,t);}function se(e){Me().delete(e);}var Ue=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function q(e,...t){Ue&&console.warn(`[svg-scroll-draw] ${e}`,...t);}function xe(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let t=window.matchMedia("(prefers-reduced-motion: reduce)"),n=o=>e(!!o.matches);if(typeof t.addEventListener=="function")return t.addEventListener("change",n),()=>t.removeEventListener("change",n);let r=t;return r.addListener?.(n),()=>r.removeListener?.(n)}function Le(e,t){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t(e,true);let n=t(e,false),r=xe(s=>{if(!s)return;r();let a=(n.getProgress?.()??0)>=1;n.destroy(),n=t(a?{...e,onComplete:void 0}:e,true);}),o={};for(let s of Object.keys(n))o[s]=(...a)=>n[s]?.(...a);return o.destroy=()=>{r(),n.destroy();},o}var W,U=new Set,K=new WeakMap,B=new Map,Re=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function Ke(e){let t=new Set;for(let n of e)for(;n&&n!==document.body;n=n.parentElement)for(let r=n;r;r=r.previousElementSibling)t.add(r);return t}function Te(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>t();W??(W=new ResizeObserver(o=>{let s=false;for(let{target:a}of o)K.get(a)!==Re(a)&&(s=true),K.set(a,"");s&&U.forEach(a=>a());})),U.add(n);let r=Ke(e);return [document.body,document.documentElement].forEach(o=>o&&r.add(o)),r.forEach(o=>{K.has(o)||K.set(o,Re(o)),B.set(o,(B.get(o)??0)+1),W.observe(o);}),()=>{U.delete(n)&&(r.forEach(o=>{let s=(B.get(o)??1)-1;if(s)return void B.set(o,s);B.delete(o),W?.unobserve(o);}),U.size||(W?.disconnect(),W=void 0));}}function Pe(e,t,n,r,o){let s,a=NaN,m,c,l=()=>{s=0,r(),!m&&!s&&(a=n())>0&&a<1&&(s=requestAnimationFrame(l));},f=()=>{!s&&!m&&n()!==a&&(s=requestAnimationFrame(l));},d=b=>{m=b,cancelAnimationFrame(s),s=a=NaN,f();},E=()=>{clearTimeout(c),o(),f();},h=()=>{clearTimeout(c),c=setTimeout(E,150);},w=Te(t,h),R=b=>{e[b]("scroll",f,{passive:true}),window[b]("resize",h),window[b]("orientationchange",h);};return R("addEventListener"),f(),{hold:d,remeasure:E,off(){d(true),R("removeEventListener"),w(),clearTimeout(c);}}}function Ze(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function $e(e){let t=[],n=/([\w]+)\(([^)]*)\)/g,r;for(;(r=n.exec(e))!==null;){let o=[],s=[],a=r[2].trim();if(a)for(let m of a.split(/[\s,]+/)){let c=m.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(c?parseFloat(c[1]):0),s.push(c?c[2]:"");}t.push({fn:r[1],nums:o,units:s});}return t}function Je(e,t,n){let r=$e(e),o=$e(t);return r.length===0||r.length!==o.length?n<1?e:t:r.map((s,a)=>{let m=o[a];return s.fn!==m.fn||s.nums.length!==m.nums.length?n<1?`${s.fn}(${s.nums.map((c,l)=>`${c}${s.units[l]}`).join(", ")})`:`${m.fn}(${m.nums.map((c,l)=>`${c}${m.units[l]}`).join(", ")})`:`${s.fn}(${s.nums.map((c,l)=>`${c+(m.nums[l]-c)*n}${s.units[l]}`).join(", ")})`}).join(" ")}function Ae(e,t,n){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*n);let r=String(e),o=String(t);if(Ze(r))return ve(r,o,n);if(r.includes("("))return Je(r,o,n);let s=r.match(/^([-+]?[\d.]+)(.*)$/),a=o.match(/^([-+]?[\d.]+)(.*)$/);if(s&&a){let m=parseFloat(s[1]),c=parseFloat(a[1]);return `${m+(c-m)*n}${s[2]||a[2]}`}return n<1?r:o}function et(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var tt=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),nt=0,Ce="--scroll-draw-progress";function rt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var Ie={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Ne(e,t){return typeof window>"u"?Ie:t.respectReducedMotion===false?_e(e,t,false):Le(t,(n,r)=>_e(e,n,r))}function _e(e,t,n){let{props:r,trigger:o={},easing:s="ease-out",speed:a=1,once:m=false,axis:c="y",scrollContainer:l,native:f=true,velocityScale:d=false,triggerElement:E,onProgress:h,onComplete:w,onEnter:R,onLeave:b,onEnterBack:z,onLeaveBack:X}=t,T=typeof s=="function"?s:H[s]??H["ease-out"],A=ne(o.start||"top bottom"),C=ne(o.end||"bottom top"),Y=E??e,S=typeof l=="string"?document.querySelector(l):l??null,M=Object.entries(r).map(([i,u])=>({prop:et(i),from:Array.isArray(u)?u[0]:"",to:Array.isArray(u)?u[1]:u}));function Fe(){let i=window.getComputedStyle(e);for(let u of M)u.from===""&&(u.from=i.getPropertyValue(u.prop).trim()||"0");}function De(){for(let i of M)e.style.setProperty(i.prop,String(i.to));}let Z=new Map;for(let i of [...M.map(u=>u.prop),Ce])Z.set(i,e.style.getPropertyValue(i));function J(){for(let[i,u]of Z)u?e.style.setProperty(i,u):e.style.removeProperty(i);}if(n)return De(),w?.(),{...Ie,destroy:J,getProgress:()=>1};Fe();let O=()=>S?c==="x"?S.scrollLeft:S.scrollTop:c==="x"?window.scrollX:window.scrollY,ae=()=>S?c==="x"?S.clientWidth:S.clientHeight:c==="x"?window.innerWidth:window.innerHeight,ue=typeof s=="string"?we(s):null;function He(){if(!f||!rt()||!ue||c!=="y"||S||Y!==e||m||a!==1||h||w||R||b||z||X||d!==false||(o.start||"top bottom").trim()!=="top bottom"||(o.end||"bottom top").trim()!=="bottom top")return false;for(let i of M)if(!tt.has(i.prop))return false;return true}function Ve(){let i=`ssd-a-${++nt}`,u=M.map(p=>`${p.prop}:${p.from}`).join(";"),N=M.map(p=>`${p.prop}:${p.to}`).join(";"),L=document.createElement("style");L.setAttribute("data-ssd-animate",""),L.textContent=`@keyframes ${i}{from{${u}}to{${N}}}.${i}{animation-name:${i};animation-duration:auto;animation-timing-function:${ue};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(L),e.classList.add(i);let v=()=>{let p=e.getBoundingClientRect();return re({top:p.top,height:p.height},O(),ae(),A,C)};oe(e,{type:"animate",getProgress:()=>g.getProgress(),getTrigger:v});let g={refresh(){},destroy(){e.classList.remove(i),L.remove(),e.style.animationPlayState="",J(),se(e);},replay(){e.classList.remove(i),e.offsetWidth,e.classList.add(i);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(p){let D=Math.min(1,Math.max(0,p));e.classList.remove(i);for(let j of M)e.style.setProperty(j.prop,Ae(j.from,j.to,D));},getProgress(){let{tStart:p,tEnd:D}=v();return T(V(O(),p,D,a))}};return g}if(He())return Ve();let y=0,x=0,_=false,ee=-1,I=0,P=0,G=false,$=NaN,te=-1,ce=0,k=Y===e?M:[],le=false;function me(){let i=e.style,u=k.map(g=>i.getPropertyValue(g.prop)),N=i.transition;k.length&&(i.transition="none"),k.forEach(g=>i.setProperty(g.prop,Z.get(g.prop)??""));let L=he(Y,S,c);k.forEach((g,p)=>i.setProperty(g.prop,u[p])),k.length&&(e.offsetWidth,i.transition=N);let v=re(L,L.scroll,ae(),A,C);le&&Math.abs(v.tStart-y)<1&&Math.abs(v.tEnd-x)<1||(le=true,y=v.tStart,x=v.tEnd);}function Q(i){e.style.setProperty(Ce,String(i));for(let u of M)e.style.setProperty(u.prop,Ae(u.from,u.to,i));h?.(i);}function We(i){if(isNaN($)){$=i;return}$<=0&&i>0&&R?.(),$<1&&i>=1&&b?.(),$>=1&&i<1&&z?.(),$>0&&i<=0&&X?.(),$=i;}function Be(){if(_)return;let i=performance.now(),u=O(),N=a;if(d!==false){let p=i-ce,D=p>0?Math.abs(u-(te<0?u:te))/p:0;N=a*Math.max(.2,1+D*(typeof d=="number"?d:1)*.04);}te=u,ce=i;let L=x===y?0:(u-y)/(x-y);We(L);let v=V(u,y,x,N),g=m?Math.max(ee,T(I=Math.max(I,v))):T(v);P=g,Q(g),g>=1&&!G?(G=true,w?.()):g<1&&!m&&(G=false);}let F=Pe(S??window,[Y],()=>V(O(),y,x,Math.min(a,1)),Be,me);me(),x===y&&q("scrollAnimate: zero-length trigger window, so it never animates. In a sticky stage, set triggerElement.",e),I=V(O(),y,x,a),P=T(I),Q(P),oe(e,{type:"animate",getProgress:()=>P,getTrigger:()=>({tStart:y,tEnd:x})});function fe(){_=true,F.hold(true);}return {destroy(){_=true,F.off(),J(),se(e);},replay(){ee=-1,I=0,G=false,P=0,_=false,Q(0),F.hold(false);},pause:fe,resume(){_&&(_=false,F.hold(false));},seek(i){let u=Math.min(1,Math.max(0,i));P=u,ee=u,I=0,fe(),Q(u);},getProgress(){return P},refresh:F.remeasure}}var ot={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function st(e){let t={};e.opacity!==void 0&&(t.opacity=[e.opacity,1]);let n=[],r=[];return e.x!==void 0&&(n.push(`translateX(${e.x}px)`),r.push("translateX(0px)")),e.y!==void 0&&(n.push(`translateY(${e.y}px)`),r.push("translateY(0px)")),e.scale!==void 0&&(n.push(`scale(${e.scale})`),r.push("scale(1)")),e.rotate!==void 0&&(n.push(`rotate(${e.rotate}deg)`),r.push("rotate(0deg)")),e.rotateX!==void 0&&(n.push(`rotateX(${e.rotateX}deg)`),r.push("rotateX(0deg)")),e.rotateY!==void 0&&(n.push(`rotateY(${e.rotateY}deg)`),r.push("rotateY(0deg)")),n.length>0&&(t.transform=[n.join(" "),r.join(" ")]),t}function it(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function ie(e){let t=e.trim().split(/\s+/),[n,r]=t.length>1?t:/%$/.test(t[0])?["top",t[0]]:[t[0],"bottom"];return [n,/%$/.test(r)?parseFloat(r):r==="top"?0:r==="center"?50:100]}function Oe(e,t){let[n,r]=ie(e);return `${n} ${+Math.max(0,r-t).toFixed(3)}%`}function at(e){let t=NaN,n=0,r=0;return e.map(o=>{let s=o.getBoundingClientRect();return Math.abs(s.top-t)<=Math.max(8,Math.min(s.height,n||s.height)/2)?r++:(t=s.top,n=s.height,r=0),r})}var ke={destroy:()=>{}};function kt(e,t={}){if(typeof window>"u")return ke;let n=it(e);if(!n.length)return q("scrollReveal: no elements found:",e),ke;let{preset:r="fadeUp",from:o,stagger:s=.15,easing:a="ease-out",once:m=true,trigger:c,onEnter:l,onLeave:f}=t,d={...ot[r],...o},E=st(d),h=c?.start||"top 88%",w=c?.end||"top 53%",R=Math.abs(ie(h)[1]-ie(w)[1]),b=Math.min(Math.max(s,0),1)*R,z=b>0?at(n):n.map(()=>0),X=n.map((T,A)=>{let C=Math.min(z[A]*b,R);return Ne(T,{props:E,easing:a,once:m,native:false,trigger:C>0?{start:Oe(h,C),end:Oe(w,C)}:{start:h,end:w},onEnter:A===0?l:void 0,onLeave:A===n.length-1?f:void 0})});return {destroy(){X.forEach(T=>T.destroy());}}}exports.scrollReveal=kt;
1
+ 'use strict';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 O(e,...n){Qe&&console.warn(`[svg-scroll-draw] ${e}`,...n);}function je({tension:e=2.5,friction:n=2.2}={}){return t=>1-Math.cos(t*Math.PI*e)*Math.pow(1-t,n)}function Ge({bounces:e=3,decay:n=.5}={}){let t=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,n)),s=Math.sqrt(r),o=0,i=[];for(let m=0;m<t;m++){let f=Math.pow(s,m);i.push(f),o+=f;}let u=[0],c=0;for(let m=0;m<t;m++)c+=i[m]/o,u.push(c);return m=>{if(m<=0)return 0;if(m>=1)return 1;for(let f=0;f<t;f++)if(m<=u[f+1]){let d=(m-u[f])/(u[f+1]-u[f]);if(f===0)return d*(2-d);let E=1-Math.pow(r,f);return E+(1-E)*(2*d-1)*(2*d-1)}return 1}}function Ue({amplitude:e=1,period:n=.4}={}){let t=Math.max(1,e),r=Math.max(.1,n),s=t<=1?r/4:r/(2*Math.PI)*Math.asin(1/t);return o=>o<=0?0:o>=1?1:t*Math.pow(2,-10*o)*Math.sin((o-s)*(2*Math.PI)/r)+1}var F={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:je(),bounce:Ge(),elastic:Ue()};function qe(e,n,t,r){let s=(o,i,u)=>((1+3*o-3*i)*u+3*i-6*o)*u*u+3*o*u;return o=>{if(o<=0||o>=1)return +(o>0);let i=o;for(let u=0;u<8;u++)i-=(s(e,t,i)-o)/((3*(1+3*e-3*t)*i+6*t-12*e)*i+3*e);if(!(i>=0&&i<=1&&Math.abs(s(e,t,i)-o)<1e-9))for(let u=0,c=0,m=1;u<30;u++)i=(c+m)/2,s(e,t,i)<o?c=i:m=i;return s(n,r,i)}}function ne(e){let n=/^cubic-bezier\((.*)\)$/.exec(e==="ease"?"cubic-bezier(.25,.1,.25,1)":e.trim()),t=n?n[1].split(",").map(parseFloat):[];if(t.length===4&&t.every(Number.isFinite)&&t[0]*(1-t[0])>=0&&t[2]*(1-t[2])>=0)return [qe(t[0],t[1],t[2],t[3]),`cubic-bezier(${t})`]}var de=new Set;function ge(e,n="linear"){if(typeof e=="function")return e;if(e==null)return F[n];if({}.hasOwnProperty.call(F,e))return F[e];let t=ne(String(e));return t?t[0]:(!de.has(e)&&de.add(e)&&O(`Unknown easing ${JSON.stringify(e)}: use a name, cubic-bezier() or a function.`),F[n])}function be(e,n,t){return Math.min(t,Math.max(n,e))}function re(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}}var ve=(e,n)=>e==="top"?0:e==="center"?.5:e==="bottom"?1:n;function he(e,n,t,r){return e+t+n*ve(r,0)}function ye(e,n){return n*(/^\d+(\.\d+)?%$/.test(e)?parseFloat(e)/100:ve(e,1))}function z(e,n,t,r){return t===n?0:be((e-n)/(t-n)*r,0,1)}function oe(e,n,t,r,s){let o=he(e.top,e.height,n,r.element)-ye(r.viewport,t),i=he(e.top,e.height,n,s.element)-ye(s.viewport,t);return {tStart:o,tEnd:i}}function Ee(e,n,t){let r=e.getBoundingClientRect(),s=t==="x"?r.width:r.height;return n?{top:t==="x"?r.left-n.getBoundingClientRect().left-n.clientLeft+n.scrollLeft:r.top-n.getBoundingClientRect().top-n.clientTop+n.scrollTop,height:s,scroll:0}:{top:t==="x"?r.left:r.top,height:s,scroll:t==="x"?window.scrollX:window.scrollY}}function we(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 Se(e,n,t){let r=we(e),s=we(n);return !r||!s?e:`rgb(${Math.round(r[0]+(s[0]-r[0])*t)},${Math.round(r[1]+(s[1]-r[1])*t)},${Math.round(r[2]+(s[2]-r[2])*t)})`}var Je="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Ke="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Me=33;function Ze(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function et(e){let n=[];for(let t=0;t<Me;t++){let r=t/(Me-1);n.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${n.join(",")})`}function Le(e){switch(e){case "linear":return "linear";case "ease-in":return Je;case "ease-out":return Ke;case "ease-in-out":return Ze()?et(F["ease-in-out"]):null;default:return ne(e)?.[1]??null}}var xe=Symbol.for("svg-scroll-draw.registry");function Re(){let e=globalThis;return e[xe]||(e[xe]=new Map)}function se(e,n){Re().set(e,n);}function ie(e){Re().delete(e);}function Te(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let n=window.matchMedia("(prefers-reduced-motion: reduce)"),t=s=>e(!!s.matches);if(typeof n.addEventListener=="function")return n.addEventListener("change",t),()=>n.removeEventListener("change",t);let r=n;return r.addListener?.(t),()=>r.removeListener?.(t)}function $e(e,n){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return n(e,true);let t=n(e,false),r=Te(o=>{if(!o)return;r();let i=(t.getProgress?.()??0)>=1;t.destroy(),t=n(i?{...e,onComplete:void 0}:e,true);}),s={};for(let o of Object.keys(t))s[o]=(...i)=>t[o]?.(...i);return s.destroy=()=>{r(),t.destroy();},s}var W,q=new Set,J=new WeakMap,B=new Map,Pe=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function tt(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 Ae(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let t=()=>n();W??(W=new ResizeObserver(s=>{let o=false;for(let{target:i}of s)J.get(i)!==Pe(i)&&(o=true),J.set(i,"");o&&q.forEach(i=>i());})),q.add(t);let r=tt(e);return [document.body,document.documentElement].forEach(s=>s&&r.add(s)),r.forEach(s=>{J.has(s)||J.set(s,Pe(s)),B.set(s,(B.get(s)??0)+1),W.observe(s);}),()=>{q.delete(t)&&(r.forEach(s=>{let o=(B.get(s)??1)-1;if(o)return void B.set(s,o);B.delete(s),W?.unobserve(s);}),q.size||(W?.disconnect(),W=void 0));}}function Ce(e,n,t,r,s){let o,i=NaN,u,c,m=()=>{o=0,r(),!u&&!o&&(i=t())>0&&i<1&&(o=requestAnimationFrame(m));},f=()=>{!o&&!u&&t()!==i&&(o=requestAnimationFrame(m));},d=b=>{u=b,cancelAnimationFrame(o),o=i=NaN,f();},E=()=>{clearTimeout(c),s(),f();},h=()=>{clearTimeout(c),c=setTimeout(E,150);},w=Ae(n,h),R=b=>{e[b]("scroll",f,{passive:true}),window[b]("resize",h),window[b]("orientationchange",h);};return R("addEventListener"),f(),{hold:d,remeasure:E,off(){d(true),R("removeEventListener"),w(),clearTimeout(c);}}}function nt(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function _e(e){let n=[],t=/([\w]+)\(([^)]*)\)/g,r;for(;(r=t.exec(e))!==null;){let s=[],o=[],i=r[2].trim();if(i)for(let u of i.split(/[\s,]+/)){let c=u.match(/^([-+]?[\d.eE]+)(.*)$/);s.push(c?parseFloat(c[1]):0),o.push(c?c[2]:"");}n.push({fn:r[1],nums:s,units:o});}return n}function rt(e,n,t){let r=_e(e),s=_e(n);return r.length===0||r.length!==s.length?t<1?e:n:r.map((o,i)=>{let u=s[i];return o.fn!==u.fn||o.nums.length!==u.nums.length?t<1?`${o.fn}(${o.nums.map((c,m)=>`${c}${o.units[m]}`).join(", ")})`:`${u.fn}(${u.nums.map((c,m)=>`${c}${u.units[m]}`).join(", ")})`:`${o.fn}(${o.nums.map((c,m)=>`${c+(u.nums[m]-c)*t}${o.units[m]}`).join(", ")})`}).join(" ")}function Ie(e,n,t){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*t);let r=String(e),s=String(n);if(nt(r))return Se(r,s,t);if(r.includes("("))return rt(r,s,t);let o=r.match(/^([-+]?[\d.]+)(.*)$/),i=s.match(/^([-+]?[\d.]+)(.*)$/);if(o&&i){let u=parseFloat(o[1]),c=parseFloat(i[1]);return `${u+(c-u)*t}${o[2]||i[2]}`}return t<1?r:s}function ot(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var st=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),it=0,Ne="--scroll-draw-progress";function at(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var Fe={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function ke(e,n){return typeof window>"u"?Fe:n.respectReducedMotion===false?Oe(e,n,false):$e(n,(t,r)=>Oe(e,t,r))}function Oe(e,n,t){let{props:r,trigger:s={},easing:o="ease-out",speed:i=1,once:u=false,axis:c="y",scrollContainer:m,native:f=true,velocityScale:d=false,triggerElement:E,onProgress:h,onComplete:w,onEnter:R,onLeave:b,onEnterBack:X,onLeaveBack:Y}=n,T=ge(o,"ease-out"),A=re(s.start||"top bottom"),C=re(s.end||"bottom top"),Q=E??e,S=typeof m=="string"?document.querySelector(m):m??null,M=Object.entries(r).map(([a,l])=>({prop:ot(a),from:Array.isArray(l)?l[0]:"",to:Array.isArray(l)?l[1]:l}));function Ve(){let a=window.getComputedStyle(e);for(let l of M)l.from===""&&(l.from=a.getPropertyValue(l.prop).trim()||"0");}function ze(){for(let a of M)e.style.setProperty(a.prop,String(a.to));}let K=new Map;for(let a of [...M.map(l=>l.prop),Ne])K.set(a,e.style.getPropertyValue(a));function Z(){for(let[a,l]of K)l?e.style.setProperty(a,l):e.style.removeProperty(a);}if(t)return ze(),w?.(),{...Fe,destroy:Z,getProgress:()=>1};Ve();let k=()=>S?c==="x"?S.scrollLeft:S.scrollTop:c==="x"?window.scrollX:window.scrollY,ue=()=>S?c==="x"?S.clientWidth:S.clientHeight:c==="x"?window.innerWidth:window.innerHeight,ce=typeof o=="string"?Le(o):null;function We(){if(!f||!at()||!ce||c!=="y"||S||Q!==e||u||i!==1||h||w||R||b||X||Y||d!==false||(s.start||"top bottom").trim()!=="top bottom"||(s.end||"bottom top").trim()!=="bottom top")return false;for(let a of M)if(!st.has(a.prop))return false;return true}function Be(){let a=`ssd-a-${++it}`,l=M.map(p=>`${p.prop}:${p.from}`).join(";"),N=M.map(p=>`${p.prop}:${p.to}`).join(";"),x=document.createElement("style");x.setAttribute("data-ssd-animate",""),x.textContent=`@keyframes ${a}{from{${l}}to{${N}}}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${ce};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(x),e.classList.add(a);let v=()=>{let p=e.getBoundingClientRect();return oe({top:p.top,height:p.height},k(),ue(),A,C)};se(e,{type:"animate",getProgress:()=>g.getProgress(),getTrigger:v});let g={refresh(){},destroy(){e.classList.remove(a),x.remove(),e.style.animationPlayState="",Z(),ie(e);},replay(){e.classList.remove(a),e.offsetWidth,e.classList.add(a);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(p){let V=Math.min(1,Math.max(0,p));e.classList.remove(a);for(let U of M)e.style.setProperty(U.prop,Ie(U.from,U.to,V));},getProgress(){let{tStart:p,tEnd:V}=v();return T(z(k(),p,V,i))}};return g}if(We())return Be();let y=0,L=0,_=false,ee=-1,I=0,$=0,j=false,P=NaN,te=-1,le=0,D=Q===e?M:[],me=false;function fe(){let a=e.style,l=D.map(g=>a.getPropertyValue(g.prop)),N=a.transition;D.length&&(a.transition="none"),D.forEach(g=>a.setProperty(g.prop,K.get(g.prop)??""));let x=Ee(Q,S,c);D.forEach((g,p)=>a.setProperty(g.prop,l[p])),D.length&&(e.offsetWidth,a.transition=N);let v=oe(x,x.scroll,ue(),A,C);me&&Math.abs(v.tStart-y)<1&&Math.abs(v.tEnd-L)<1||(me=true,y=v.tStart,L=v.tEnd);}function G(a){e.style.setProperty(Ne,String(a));for(let l of M)e.style.setProperty(l.prop,Ie(l.from,l.to,a));h?.(a);}function Xe(a){if(isNaN(P)){P=a;return}P<=0&&a>0&&R?.(),P<1&&a>=1&&b?.(),P>=1&&a<1&&X?.(),P>0&&a<=0&&Y?.(),P=a;}function Ye(){if(_)return;let a=performance.now(),l=k(),N=i;if(d!==false){let p=a-le,V=p>0?Math.abs(l-(te<0?l:te))/p:0;N=i*Math.max(.2,1+V*(typeof d=="number"?d:1)*.04);}te=l,le=a;let x=L===y?0:(l-y)/(L-y);Xe(x);let v=z(l,y,L,N),g=u?Math.max(ee,T(I=Math.max(I,v))):T(v);$=g,G(g),g>=1&&!j?(j=true,w?.()):g<1&&!u&&(j=false);}let H=Ce(S??window,[Q],()=>z(k(),y,L,Math.min(i,1)),Ye,fe);fe(),L===y&&O("scrollAnimate: zero-length trigger window, so it never animates. In a sticky stage, set triggerElement.",e),I=z(k(),y,L,i),$=T(I),G($),se(e,{type:"animate",getProgress:()=>$,getTrigger:()=>({tStart:y,tEnd:L})});function pe(){_=true,H.hold(true);}return {destroy(){_=true,H.off(),Z(),ie(e);},replay(){ee=-1,I=0,j=false,$=0,_=false,G(0),H.hold(false);},pause:pe,resume(){_&&(_=false,H.hold(false));},seek(a){let l=Math.min(1,Math.max(0,a));$=l,ee=l,I=0,pe(),G(l);},getProgress(){return $},refresh:H.remeasure}}var ut={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function ct(e){let n={};e.opacity!==void 0&&(n.opacity=[e.opacity,1]);let t=[],r=[];return e.x!==void 0&&(t.push(`translateX(${e.x}px)`),r.push("translateX(0px)")),e.y!==void 0&&(t.push(`translateY(${e.y}px)`),r.push("translateY(0px)")),e.scale!==void 0&&(t.push(`scale(${e.scale})`),r.push("scale(1)")),e.rotate!==void 0&&(t.push(`rotate(${e.rotate}deg)`),r.push("rotate(0deg)")),e.rotateX!==void 0&&(t.push(`rotateX(${e.rotateX}deg)`),r.push("rotateX(0deg)")),e.rotateY!==void 0&&(t.push(`rotateY(${e.rotateY}deg)`),r.push("rotateY(0deg)")),t.length>0&&(n.transform=[t.join(" "),r.join(" ")]),n}function lt(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function ae(e){let n=e.trim().split(/\s+/),[t,r]=n.length>1?n:/%$/.test(n[0])?["top",n[0]]:[n[0],"bottom"];return [t,/%$/.test(r)?parseFloat(r):r==="top"?0:r==="center"?50:100]}function De(e,n){let[t,r]=ae(e);return `${t} ${+Math.max(0,r-n).toFixed(3)}%`}function mt(e){let n=NaN,t=0,r=0;return e.map(s=>{let o=s.getBoundingClientRect();return Math.abs(o.top-n)<=Math.max(8,Math.min(o.height,t||o.height)/2)?r++:(n=o.top,t=o.height,r=0),r})}var He={destroy:()=>{}};function zt(e,n={}){if(typeof window>"u")return He;let t=lt(e);if(!t.length)return O("scrollReveal: no elements found:",e),He;let{preset:r="fadeUp",from:s,stagger:o=.15,easing:i="ease-out",once:u=true,trigger:c,onEnter:m,onLeave:f}=n,d={...ut[r],...s},E=ct(d),h=c?.start||"top 88%",w=c?.end||"top 53%",R=Math.abs(ae(h)[1]-ae(w)[1]),b=Math.min(Math.max(o,0),1)*R,X=b>0?mt(t):t.map(()=>0),Y=t.map((T,A)=>{let C=Math.min(X[A]*b,R);return ke(T,{props:E,easing:i,once:u,native:false,trigger:C>0?{start:De(h,C),end:De(w,C)}:{start:h,end:w},onEnter:A===0?m:void 0,onLeave:A===t.length-1?f:void 0})});return {destroy(){Y.forEach(T=>T.destroy());}}}exports.scrollReveal=zt;
@@ -1,4 +1,4 @@
1
- import { E as EasingName, T as TriggerConfig } from '../types-9bcJdVcg.mjs';
1
+ import { E as Easing, T as TriggerConfig } from '../types-iITMwrru.mjs';
2
2
 
3
3
  interface ScrollRevealFrom {
4
4
  /** Start opacity (0–1). Animates to 1. */
@@ -53,7 +53,7 @@ interface ScrollRevealOptions {
53
53
  */
54
54
  stagger?: number;
55
55
  /** Animation easing. Default: `'ease-out'`. */
56
- easing?: EasingName | ((t: number) => number);
56
+ easing?: Easing;
57
57
  /** Freeze at max progress — don't reverse on scroll back. Default: true. */
58
58
  once?: boolean;
59
59
  /** Override the default trigger window. */
@@ -1,4 +1,4 @@
1
- import { E as EasingName, T as TriggerConfig } from '../types-9bcJdVcg.js';
1
+ import { E as Easing, T as TriggerConfig } from '../types-iITMwrru.js';
2
2
 
3
3
  interface ScrollRevealFrom {
4
4
  /** Start opacity (0–1). Animates to 1. */
@@ -53,7 +53,7 @@ interface ScrollRevealOptions {
53
53
  */
54
54
  stagger?: number;
55
55
  /** Animation easing. Default: `'ease-out'`. */
56
- easing?: EasingName | ((t: number) => number);
56
+ easing?: Easing;
57
57
  /** Freeze at max progress — don't reverse on scroll back. Default: true. */
58
58
  once?: boolean;
59
59
  /** Override the default trigger window. */
@@ -1 +1 @@
1
- import {a}from'../chunk-7USW2XFB.mjs';import'../chunk-V3Z6G5JE.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-THPTANES.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-EBU6E26L.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var M={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function N(e){let r={};e.opacity!==void 0&&(r.opacity=[e.opacity,1]);let t=[],n=[];return e.x!==void 0&&(t.push(`translateX(${e.x}px)`),n.push("translateX(0px)")),e.y!==void 0&&(t.push(`translateY(${e.y}px)`),n.push("translateY(0px)")),e.scale!==void 0&&(t.push(`scale(${e.scale})`),n.push("scale(1)")),e.rotate!==void 0&&(t.push(`rotate(${e.rotate}deg)`),n.push("rotate(0deg)")),e.rotateX!==void 0&&(t.push(`rotateX(${e.rotateX}deg)`),n.push("rotateX(0deg)")),e.rotateY!==void 0&&(t.push(`rotateY(${e.rotateY}deg)`),n.push("rotateY(0deg)")),t.length>0&&(r.transform=[t.join(" "),n.join(" ")]),r}function P(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function u(e){let r=e.trim().split(/\s+/),[t,n]=r.length>1?r:/%$/.test(r[0])?["top",r[0]]:[r[0],"bottom"];return [t,/%$/.test(n)?parseFloat(n):n==="top"?0:n==="center"?50:100]}function y(e,r){let[t,n]=u(e);return `${t} ${+Math.max(0,n-r).toFixed(3)}%`}function Y(e){let r=NaN,t=0,n=0;return e.map(a=>{let o=a.getBoundingClientRect();return Math.abs(o.top-r)<=Math.max(8,Math.min(o.height,t||o.height)/2)?n++:(r=o.top,t=o.height,n=0),n})}var v={destroy:()=>{}};function A(e,r={}){if(typeof window>"u")return v;let t=P(e);if(!t.length)return b("scrollReveal: no elements found:",e),v;let{preset:n="fadeUp",from:a$1,stagger:o=.15,easing:b$1="ease-out",once:R=true,trigger:d,onEnter:x,onLeave:E}=r,S={...M[n],...a$1},X=N(S),s=d?.start||"top 88%",i=d?.end||"top 53%",f=Math.abs(u(s)[1]-u(i)[1]),g=Math.min(Math.max(o,0),1)*f,$=g>0?Y(t):t.map(()=>0),L=t.map((l,c)=>{let p=Math.min($[c]*g,f);return a(l,{props:X,easing:b$1,once:R,native:false,trigger:p>0?{start:y(s,p),end:y(i,p)}:{start:s,end:i},onEnter:c===0?x:void 0,onLeave:c===t.length-1?E:void 0})});return {destroy(){L.forEach(l=>l.destroy());}}}export{A as scrollReveal};
1
+ import {a}from'../chunk-HAGTU5EX.mjs';import'../chunk-7LDSB4FT.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-IXR6RML7.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-EBU6E26L.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var M={fadeUp:{opacity:0,y:32},fadeDown:{opacity:0,y:-32},fadeLeft:{opacity:0,x:32},fadeRight:{opacity:0,x:-32},scale:{opacity:0,scale:.88},flip:{opacity:0,rotateX:20},flipX:{opacity:0,rotateY:20}};function P(e){let r={};e.opacity!==void 0&&(r.opacity=[e.opacity,1]);let t=[],n=[];return e.x!==void 0&&(t.push(`translateX(${e.x}px)`),n.push("translateX(0px)")),e.y!==void 0&&(t.push(`translateY(${e.y}px)`),n.push("translateY(0px)")),e.scale!==void 0&&(t.push(`scale(${e.scale})`),n.push("scale(1)")),e.rotate!==void 0&&(t.push(`rotate(${e.rotate}deg)`),n.push("rotate(0deg)")),e.rotateX!==void 0&&(t.push(`rotateX(${e.rotateX}deg)`),n.push("rotateX(0deg)")),e.rotateY!==void 0&&(t.push(`rotateY(${e.rotateY}deg)`),n.push("rotateY(0deg)")),t.length>0&&(r.transform=[t.join(" "),n.join(" ")]),r}function Y(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function d(e){let r=e.trim().split(/\s+/),[t,n]=r.length>1?r:/%$/.test(r[0])?["top",r[0]]:[r[0],"bottom"];return [t,/%$/.test(n)?parseFloat(n):n==="top"?0:n==="center"?50:100]}function y(e,r){let[t,n]=d(e);return `${t} ${+Math.max(0,n-r).toFixed(3)}%`}function w(e){let r=NaN,t=0,n=0;return e.map(a=>{let o=a.getBoundingClientRect();return Math.abs(o.top-r)<=Math.max(8,Math.min(o.height,t||o.height)/2)?n++:(r=o.top,t=o.height,n=0),n})}var v={destroy:()=>{}};function A(e,r={}){if(typeof window>"u")return v;let t=Y(e);if(!t.length)return b("scrollReveal: no elements found:",e),v;let{preset:n="fadeUp",from:a$1,stagger:o=.15,easing:R="ease-out",once:b$1=true,trigger:u,onEnter:x,onLeave:E}=r,S={...M[n],...a$1},X=P(S),s=u?.start||"top 88%",i=u?.end||"top 53%",f=Math.abs(d(s)[1]-d(i)[1]),g=Math.min(Math.max(o,0),1)*f,$=g>0?w(t):t.map(()=>0),L=t.map((l,c)=>{let p=Math.min($[c]*g,f);return a(l,{props:X,easing:R,once:b$1,native:false,trigger:p>0?{start:y(s,p),end:y(i,p)}:{start:s,end:i},onEnter:c===0?x:void 0,onLeave:c===t.length-1?E:void 0})});return {destroy(){L.forEach(l=>l.destroy());}}}export{A as scrollReveal};
@@ -1,4 +1,4 @@
1
- import { a as ScrollDrawOptions, S as ScrollDrawInstance } from './types-9bcJdVcg.mjs';
1
+ import { a as ScrollDrawOptions, S as ScrollDrawInstance } from './types-iITMwrru.mjs';
2
2
 
3
3
  declare function scrollDraw(target: string | Element, options?: ScrollDrawOptions): ScrollDrawInstance;
4
4
 
@@ -1,4 +1,4 @@
1
- import { a as ScrollDrawOptions, S as ScrollDrawInstance } from './types-9bcJdVcg.js';
1
+ import { a as ScrollDrawOptions, S as ScrollDrawInstance } from './types-iITMwrru.js';
2
2
 
3
3
  declare function scrollDraw(target: string | Element, options?: ScrollDrawOptions): ScrollDrawInstance;
4
4
 
@@ -1 +1 @@
1
- 'use strict';function K({tension:e=2.5,friction:r=2.2}={}){return n=>1-Math.cos(n*Math.PI*e)*Math.pow(1-n,r)}function X({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),a=Math.max(.01,Math.min(.99,r)),p=Math.sqrt(a),u=0,h=[];for(let o=0;o<n;o++){let s=Math.pow(p,o);h.push(s),u+=s;}let m=[0],M=0;for(let o=0;o<n;o++)M+=h[o]/u,m.push(M);return o=>{if(o<=0)return 0;if(o>=1)return 1;for(let s=0;s<n;s++)if(o<=m[s+1]){let b=(o-m[s])/(m[s+1]-m[s]);if(s===0)return b*(2-b);let E=1-Math.pow(a,s);return E+(1-E)*(2*b-1)*(2*b-1)}return 1}}function j({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),a=Math.max(.1,r),p=n<=1?a/4:a/(2*Math.PI)*Math.asin(1/n);return u=>u<=0?0:u>=1?1:n*Math.pow(2,-10*u)*Math.sin((u-p)*(2*Math.PI)/a)+1}var A={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:K(),bounce:X(),elastic:j()};function x(e,r,n){return Math.min(n,Math.max(r,e))}var J=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function q(e,...r){J&&console.warn(`[svg-scroll-draw] ${e}`,...r);}function H(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function P(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let r=window.matchMedia("(prefers-reduced-motion: reduce)"),n=p=>e(!!p.matches);if(typeof r.addEventListener=="function")return r.addEventListener("change",n),()=>r.removeEventListener("change",n);let a=r;return a.addListener?.(n),()=>a.removeListener?.(n)}var W=Symbol.for("svg-scroll-draw.registry");function F(){let e=globalThis;return e[W]||(e[W]=new Map)}function G(e,r){F().set(e,r);}function z(e){F().delete(e);}var $={destroy:()=>{},snapTo:()=>{},getCurrentIndex:()=>0};function U(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function de(e,r={}){if(typeof window>"u")return $;let n=U(e);if(!n.length)return q("scrollSnap: no sections found"),$;let{direction:a="vertical",duration:p=600,easing:u="ease-in-out",threshold:h=.3,scrollContainer:m,onSnap:M,respectReducedMotion:o=true}=r,s=o&&H(),b=o?P(t=>{s=t;}):()=>{},E=typeof u=="function"?u:A[u]??A["ease-in-out"],y=a==="horizontal",_=y?"Width":"Height",C=y?"left":"top",f=typeof m=="string"?document.querySelector(m):m??null,R=false,v=0;function w(){return f?y?f.scrollLeft:f.scrollTop:y?window.scrollX:window.scrollY}function N(t){let i=f??window,c=y?{left:t}:{top:t};try{i.scrollTo({...c,behavior:"instant"});}catch{i.scrollTo(c);}}function S(){let t=f??document.scrollingElement??document.documentElement,i=t[`scroll${_}`]-t[`client${_}`],c=f?f.getBoundingClientRect()[C]+f[y?"clientLeft":"clientTop"]:0,d=w();return n.map(g=>x(g.getBoundingClientRect()[C]-c+d,0,i))}function B(){let t=w(),i=S();return i.reduce((c,d,g)=>Math.abs(d-t)<Math.abs(i[c]-t)?g:c,0)}let l=B();function T(t){R=false,l=t,M?.(t);}function L(t){let i=x(t,0,n.length-1);cancelAnimationFrame(v),R=true;let c=S(),d=w(),g=c[i];if(Math.abs(d-g)<1)return T(i);if(s)return N(g),T(i);let k=performance.now();function Q(Y){let V=x((Y-k)/p,0,1);N(d+(g-d)*E(V)),V<1?v=requestAnimationFrame(Q):T(i);}v=requestAnimationFrame(Q);}let I;function O(){R||(clearTimeout(I),I=setTimeout(()=>{let t=w(),i=S();if(Math.abs(t-i[l])<1)return;let c=n[l][`offset${_}`],d=t-i[l];d>c*h&&l<n.length-1?L(l+1):d<-(c*h)&&l>0?L(l-1):L(l);},100));}let D=f??window;return D.addEventListener("scroll",O,{passive:true}),G(n[0],{type:"snap",getProgress:()=>l/(n.length-1||1),getTrigger:()=>{let t=S();return {tStart:t[0],tEnd:t[t.length-1]}}}),{destroy(){cancelAnimationFrame(v),clearTimeout(I),D.removeEventListener("scroll",O),b(),z(n[0]);},snapTo:L,getCurrentIndex(){return l}}}exports.scrollSnap=de;
1
+ 'use strict';var U=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function _(e,...t){U&&console.warn(`[svg-scroll-draw] ${e}`,...t);}function X({tension:e=2.5,friction:t=2.2}={}){return n=>1-Math.cos(n*Math.PI*e)*Math.pow(1-n,t)}function j({bounces:e=3,decay:t=.5}={}){let n=Math.max(1,Math.round(e)),l=Math.max(.01,Math.min(.99,t)),d=Math.sqrt(l),o=0,i=[];for(let c=0;c<n;c++){let u=Math.pow(d,c);i.push(u),o+=u;}let s=[0],g=0;for(let c=0;c<n;c++)g+=i[c]/o,s.push(g);return c=>{if(c<=0)return 0;if(c>=1)return 1;for(let u=0;u<n;u++)if(c<=s[u+1]){let h=(c-s[u])/(s[u+1]-s[u]);if(u===0)return h*(2-h);let M=1-Math.pow(l,u);return M+(1-M)*(2*h-1)*(2*h-1)}return 1}}function Z({amplitude:e=1,period:t=.4}={}){let n=Math.max(1,e),l=Math.max(.1,t),d=n<=1?l/4:l/(2*Math.PI)*Math.asin(1/n);return o=>o<=0?0:o>=1?1:n*Math.pow(2,-10*o)*Math.sin((o-d)*(2*Math.PI)/l)+1}var R={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:X(),bounce:j(),elastic:Z()};function ee(e,t,n,l){let d=(o,i,s)=>((1+3*o-3*i)*s+3*i-6*o)*s*s+3*o*s;return o=>{if(o<=0||o>=1)return +(o>0);let i=o;for(let s=0;s<8;s++)i-=(d(e,n,i)-o)/((3*(1+3*e-3*n)*i+6*n-12*e)*i+3*e);if(!(i>=0&&i<=1&&Math.abs(d(e,n,i)-o)<1e-9))for(let s=0,g=0,c=1;s<30;s++)i=(g+c)/2,d(e,n,i)<o?g=i:c=i;return d(t,l,i)}}function ne(e){let t=/^cubic-bezier\((.*)\)$/.exec(e==="ease"?"cubic-bezier(.25,.1,.25,1)":e.trim()),n=t?t[1].split(",").map(parseFloat):[];if(n.length===4&&n.every(Number.isFinite)&&n[0]*(1-n[0])>=0&&n[2]*(1-n[2])>=0)return [ee(n[0],n[1],n[2],n[3]),`cubic-bezier(${n})`]}var q=new Set;function F(e,t="linear"){if(typeof e=="function")return e;if(e==null)return R[t];if({}.hasOwnProperty.call(R,e))return R[e];let n=ne(String(e));return n?n[0]:(!q.has(e)&&q.add(e)&&_(`Unknown easing ${JSON.stringify(e)}: use a name, cubic-bezier() or a function.`),R[t])}function T(e,t,n){return Math.min(n,Math.max(t,e))}function P(){return typeof window>"u"||typeof window.matchMedia!="function"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function $(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let t=window.matchMedia("(prefers-reduced-motion: reduce)"),n=d=>e(!!d.matches);if(typeof t.addEventListener=="function")return t.addEventListener("change",n),()=>t.removeEventListener("change",n);let l=t;return l.addListener?.(n),()=>l.removeListener?.(n)}var H=Symbol.for("svg-scroll-draw.registry");function W(){let e=globalThis;return e[H]||(e[H]=new Map)}function B(e,t){W().set(e,t);}function G(e){W().delete(e);}var k={destroy:()=>{},snapTo:()=>{},getCurrentIndex:()=>0};function te(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):e instanceof NodeList?Array.from(e):e}function ge(e,t={}){if(typeof window>"u")return k;let n=te(e);if(!n.length)return _("scrollSnap: no sections found"),k;let{direction:l="vertical",duration:d=600,easing:o="ease-in-out",threshold:i=.3,scrollContainer:s,onSnap:g,respectReducedMotion:c=true}=t,u=c&&P(),h=c?$(r=>{u=r;}):()=>{},M=F(o,"ease-in-out"),E=l==="horizontal",x=E?"Width":"Height",N=E?"left":"top",b=typeof s=="string"?document.querySelector(s):s??null,I=false,w=0;function v(){return b?E?b.scrollLeft:b.scrollTop:E?window.scrollX:window.scrollY}function C(r){let a=b??window,m=E?{left:r}:{top:r};try{a.scrollTo({...m,behavior:"instant"});}catch{a.scrollTo(m);}}function S(){let r=b??document.scrollingElement??document.documentElement,a=r[`scroll${x}`]-r[`client${x}`],m=b?b.getBoundingClientRect()[N]+b[E?"clientLeft":"clientTop"]:0,p=v();return n.map(y=>T(y.getBoundingClientRect()[N]-m+p,0,a))}function Y(){let r=v(),a=S();return a.reduce((m,p,y)=>Math.abs(p-r)<Math.abs(a[m]-r)?y:m,0)}let f=Y();function A(r){I=false,f=r,g?.(r);}function L(r){let a=T(r,0,n.length-1);cancelAnimationFrame(w),I=true;let m=S(),p=v(),y=m[a];if(Math.abs(p-y)<1)return A(a);if(u)return C(y),A(a);let J=performance.now();function Q(K){let V=T((K-J)/d,0,1);C(p+(y-p)*M(V)),V<1?w=requestAnimationFrame(Q):A(a);}w=requestAnimationFrame(Q);}let O;function z(){I||(clearTimeout(O),O=setTimeout(()=>{let r=v(),a=S();if(Math.abs(r-a[f])<1)return;let m=n[f][`offset${x}`],p=r-a[f];p>m*i&&f<n.length-1?L(f+1):p<-(m*i)&&f>0?L(f-1):L(f);},100));}let D=b??window;return D.addEventListener("scroll",z,{passive:true}),B(n[0],{type:"snap",getProgress:()=>f/(n.length-1||1),getTrigger:()=>{let r=S();return {tStart:r[0],tEnd:r[r.length-1]}}}),{destroy(){cancelAnimationFrame(w),clearTimeout(O),D.removeEventListener("scroll",z),h(),G(n[0]);},snapTo:L,getCurrentIndex(){return f}}}exports.scrollSnap=ge;
@@ -1,4 +1,4 @@
1
- import { E as EasingName } from '../types-9bcJdVcg.mjs';
1
+ import { E as Easing } from '../types-iITMwrru.mjs';
2
2
 
3
3
  interface ScrollSnapOptions {
4
4
  /** Scroll axis. Default: 'vertical'. */
@@ -6,7 +6,7 @@ interface ScrollSnapOptions {
6
6
  /** Snap animation duration in ms. Default: 600. */
7
7
  duration?: number;
8
8
  /** Easing for the snap scroll animation. Default: 'ease-in-out'. */
9
- easing?: EasingName | ((t: number) => number);
9
+ easing?: Easing;
10
10
  /**
11
11
  * Fraction of a section's size the user must scroll past before it snaps
12
12
  * forward instead of snapping back. Range 0–1. Default: 0.3.
@@ -1,4 +1,4 @@
1
- import { E as EasingName } from '../types-9bcJdVcg.js';
1
+ import { E as Easing } from '../types-iITMwrru.js';
2
2
 
3
3
  interface ScrollSnapOptions {
4
4
  /** Scroll axis. Default: 'vertical'. */
@@ -6,7 +6,7 @@ interface ScrollSnapOptions {
6
6
  /** Snap animation duration in ms. Default: 600. */
7
7
  duration?: number;
8
8
  /** Easing for the snap scroll animation. Default: 'ease-in-out'. */
9
- easing?: EasingName | ((t: number) => number);
9
+ easing?: Easing;
10
10
  /**
11
11
  * Fraction of a section's size the user must scroll past before it snaps
12
12
  * forward instead of snapping back. Range 0–1. Default: 0.3.
@@ -1 +1 @@
1
- import {a}from'../chunk-AJ22VSHC.mjs';import {d}from'../chunk-THPTANES.mjs';import {a as a$3}from'../chunk-4DOJSIEQ.mjs';import {a as a$1}from'../chunk-5PJEKEEP.mjs';import {a as a$2,b as b$1}from'../chunk-EBU6E26L.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var z={destroy:()=>{},snapTo:()=>{},getCurrentIndex:()=>0};function k(c){return typeof c=="string"?Array.from(document.querySelectorAll(c)):c instanceof NodeList?Array.from(c):c}function Z(c,$={}){if(typeof window>"u")return z;let i=k(c);if(!i.length)return b("scrollSnap: no sections found"),z;let{direction:B="vertical",duration:P=600,easing:g="ease-in-out",threshold:v=.3,scrollContainer:S,onSnap:_,respectReducedMotion:w=true}=$,M=w&&a(),G=w?a$1(e=>{M=e;}):()=>{},W=typeof g=="function"?g:d[g]??d["ease-in-out"],a$4=B==="horizontal",b$2=a$4?"Width":"Height",x=a$4?"left":"top",s=typeof S=="string"?document.querySelector(S):S??null,h=false,u=0;function m(){return s?a$4?s.scrollLeft:s.scrollTop:a$4?window.scrollX:window.scrollY}function L(e){let t=s??window,n=a$4?{left:e}:{top:e};try{t.scrollTo({...n,behavior:"instant"});}catch{t.scrollTo(n);}}function d$1(){let e=s??document.scrollingElement??document.documentElement,t=e[`scroll${b$2}`]-e[`client${b$2}`],n=s?s.getBoundingClientRect()[x]+s[a$4?"clientLeft":"clientTop"]:0,r=m();return i.map(l=>a$3(l.getBoundingClientRect()[x]-n+r,0,t))}function X(){let e=m(),t=d$1();return t.reduce((n,r,l)=>Math.abs(r-e)<Math.abs(t[n]-e)?l:n,0)}let o=X();function T(e){h=false,o=e,_?.(e);}function f(e){let t=a$3(e,0,i.length-1);cancelAnimationFrame(u),h=true;let n=d$1(),r=m(),l=n[t];if(Math.abs(r-l)<1)return T(t);if(M)return L(l),T(t);let Y=performance.now();function R(j){let C=a$3((j-Y)/P,0,1);L(r+(l-r)*W(C)),C<1?u=requestAnimationFrame(R):T(t);}u=requestAnimationFrame(R);}let E;function I(){h||(clearTimeout(E),E=setTimeout(()=>{let e=m(),t=d$1();if(Math.abs(e-t[o])<1)return;let n=i[o][`offset${b$2}`],r=e-t[o];r>n*v&&o<i.length-1?f(o+1):r<-(n*v)&&o>0?f(o-1):f(o);},100));}let A=s??window;return A.addEventListener("scroll",I,{passive:true}),a$2(i[0],{type:"snap",getProgress:()=>o/(i.length-1||1),getTrigger:()=>{let e=d$1();return {tStart:e[0],tEnd:e[e.length-1]}}}),{destroy(){cancelAnimationFrame(u),clearTimeout(E),A.removeEventListener("scroll",I),G(),b$1(i[0]);},snapTo:f,getCurrentIndex(){return o}}}export{Z as scrollSnap};
1
+ import {a}from'../chunk-AJ22VSHC.mjs';import {f}from'../chunk-IXR6RML7.mjs';import {a as a$3}from'../chunk-4DOJSIEQ.mjs';import {a as a$1}from'../chunk-5PJEKEEP.mjs';import {a as a$2,b as b$1}from'../chunk-EBU6E26L.mjs';import {b}from'../chunk-LFSU6LR3.mjs';var z={destroy:()=>{},snapTo:()=>{},getCurrentIndex:()=>0};function D(c){return typeof c=="string"?Array.from(document.querySelectorAll(c)):c instanceof NodeList?Array.from(c):c}function Z(c,N={}){if(typeof window>"u")return z;let i=D(c);if(!i.length)return b("scrollSnap: no sections found"),z;let{direction:$="vertical",duration:B=600,easing:P="ease-in-out",threshold:E=.3,scrollContainer:g,onSnap:_,respectReducedMotion:v=true}=N,y=v&&a(),W=v?a$1(e=>{y=e;}):()=>{},X=f(P,"ease-in-out"),a$4=$==="horizontal",S=a$4?"Width":"Height",w=a$4?"left":"top",s=typeof g=="string"?document.querySelector(g):g??null,h=false,u=0;function m(){return s?a$4?s.scrollLeft:s.scrollTop:a$4?window.scrollX:window.scrollY}function M(e){let t=s??window,n=a$4?{left:e}:{top:e};try{t.scrollTo({...n,behavior:"instant"});}catch{t.scrollTo(n);}}function d(){let e=s??document.scrollingElement??document.documentElement,t=e[`scroll${S}`]-e[`client${S}`],n=s?s.getBoundingClientRect()[w]+s[a$4?"clientLeft":"clientTop"]:0,r=m();return i.map(l=>a$3(l.getBoundingClientRect()[w]-n+r,0,t))}function Y(){let e=m(),t=d();return t.reduce((n,r,l)=>Math.abs(r-e)<Math.abs(t[n]-e)?l:n,0)}let o=Y();function T(e){h=false,o=e,_?.(e);}function f$1(e){let t=a$3(e,0,i.length-1);cancelAnimationFrame(u),h=true;let n=d(),r=m(),l=n[t];if(Math.abs(r-l)<1)return T(t);if(y)return M(l),T(t);let j=performance.now();function I(k){let A=a$3((k-j)/B,0,1);M(r+(l-r)*X(A)),A<1?u=requestAnimationFrame(I):T(t);}u=requestAnimationFrame(I);}let b$2;function x(){h||(clearTimeout(b$2),b$2=setTimeout(()=>{let e=m(),t=d();if(Math.abs(e-t[o])<1)return;let n=i[o][`offset${S}`],r=e-t[o];r>n*E&&o<i.length-1?f$1(o+1):r<-(n*E)&&o>0?f$1(o-1):f$1(o);},100));}let L=s??window;return L.addEventListener("scroll",x,{passive:true}),a$2(i[0],{type:"snap",getProgress:()=>o/(i.length-1||1),getTrigger:()=>{let e=d();return {tStart:e[0],tEnd:e[e.length-1]}}}),{destroy(){cancelAnimationFrame(u),clearTimeout(b$2),L.removeEventListener("scroll",x),W(),b$1(i[0]);},snapTo:f$1,getCurrentIndex(){return o}}}export{Z as scrollSnap};