svg-scroll-draw 2.23.4 → 2.23.5

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 (101) hide show
  1. package/README.md +4 -4
  2. package/dist/angular/index.cjs +3 -3
  3. package/dist/angular/index.d.mts +3 -3
  4. package/dist/angular/index.d.ts +3 -3
  5. package/dist/angular/index.mjs +1 -1
  6. package/dist/astro/index.cjs +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 +190 -265
  11. package/dist/cdn/svg-scroll-draw.global.js +3 -3
  12. package/dist/{chunk-DSFD227B.mjs → chunk-22B37AWY.mjs} +1 -1
  13. package/dist/{chunk-YNNA33A5.mjs → chunk-BSW7W2Y5.mjs} +1 -1
  14. package/dist/{chunk-XTPAW6XR.mjs → chunk-CZLUBJAI.mjs} +1 -1
  15. package/dist/chunk-K6VATIJH.mjs +3 -0
  16. package/dist/chunk-NV6YTPHI.mjs +1 -0
  17. package/dist/chunk-NYQJPPMP.mjs +1 -0
  18. package/dist/{chunk-ZNCZYV3Q.mjs → chunk-OSGWGHQJ.mjs} +1 -1
  19. package/dist/chunk-PAGN26EH.mjs +1 -0
  20. package/dist/chunk-THPTANES.mjs +1 -0
  21. package/dist/{chunk-OJFWQ6CU.mjs → chunk-V3Z6G5JE.mjs} +1 -1
  22. package/dist/chunk-VJ5ZU55P.mjs +1 -0
  23. package/dist/chunk-XNM3VKEK.mjs +1 -0
  24. package/dist/cinematic/index.cjs +2 -2
  25. package/dist/cinematic/index.mjs +1 -1
  26. package/dist/{engine-B7UpB4fT.d.ts → engine-6VsjEwzb.d.ts} +1 -1
  27. package/dist/{engine-o1VSQ1lX.d.mts → engine-BLWKCfxC.d.mts} +1 -1
  28. package/dist/group/index.cjs +3 -3
  29. package/dist/group/index.d.mts +3 -3
  30. package/dist/group/index.d.ts +3 -3
  31. package/dist/group/index.mjs +1 -1
  32. package/dist/horizontal/index.cjs +1 -1
  33. package/dist/horizontal/index.d.mts +1 -1
  34. package/dist/horizontal/index.d.ts +1 -1
  35. package/dist/horizontal/index.mjs +1 -1
  36. package/dist/{index-D3o4vT3e.d.ts → index-BN8yKeQ3.d.ts} +1 -1
  37. package/dist/{index-BY-CNE8c.d.mts → index-DAiRJgtF.d.mts} +2 -2
  38. package/dist/{index-CdaBYn3A.d.mts → index-DVjblK_4.d.mts} +1 -1
  39. package/dist/{index-DqXXiDIk.d.ts → index-hSQqLVbg.d.ts} +2 -2
  40. package/dist/index.cjs +4 -4
  41. package/dist/index.d.mts +6 -6
  42. package/dist/index.d.ts +6 -6
  43. package/dist/index.mjs +1 -1
  44. package/dist/nuxt/index.cjs +3 -3
  45. package/dist/nuxt/index.d.mts +3 -3
  46. package/dist/nuxt/index.d.ts +3 -3
  47. package/dist/nuxt/index.mjs +1 -1
  48. package/dist/progress/index.cjs +1 -1
  49. package/dist/progress/index.d.mts +1 -1
  50. package/dist/progress/index.d.ts +1 -1
  51. package/dist/progress/index.mjs +1 -1
  52. package/dist/react/index.cjs +2 -2
  53. package/dist/react/index.d.mts +3 -3
  54. package/dist/react/index.d.ts +3 -3
  55. package/dist/react/index.mjs +1 -1
  56. package/dist/reveal/index.cjs +1 -1
  57. package/dist/reveal/index.d.mts +1 -1
  58. package/dist/reveal/index.d.ts +1 -1
  59. package/dist/reveal/index.mjs +1 -1
  60. package/dist/{scroll-draw-DsBMkwrX.d.ts → scroll-draw-BsU_Ohmu.d.ts} +1 -1
  61. package/dist/{scroll-draw-Dej-GIRP.d.mts → scroll-draw-Fzir8hlU.d.mts} +1 -1
  62. package/dist/snap/index.cjs +1 -1
  63. package/dist/snap/index.d.mts +1 -1
  64. package/dist/snap/index.d.ts +1 -1
  65. package/dist/snap/index.mjs +1 -1
  66. package/dist/solid/index.cjs +3 -3
  67. package/dist/solid/index.d.mts +3 -3
  68. package/dist/solid/index.d.ts +3 -3
  69. package/dist/solid/index.mjs +1 -1
  70. package/dist/svelte/index.cjs +3 -3
  71. package/dist/svelte/index.d.mts +3 -3
  72. package/dist/svelte/index.d.ts +3 -3
  73. package/dist/svelte/index.mjs +1 -1
  74. package/dist/text/index.cjs +1 -1
  75. package/dist/text/index.d.mts +1 -1
  76. package/dist/text/index.d.ts +1 -1
  77. package/dist/text/index.mjs +1 -1
  78. package/dist/timeline/index.cjs +9 -9
  79. package/dist/timeline/index.d.mts +1 -1
  80. package/dist/timeline/index.d.ts +1 -1
  81. package/dist/timeline/index.mjs +8 -8
  82. package/dist/{types-MswK0erX.d.mts → types-9bcJdVcg.d.mts} +6 -2
  83. package/dist/{types-MswK0erX.d.ts → types-9bcJdVcg.d.ts} +6 -2
  84. package/dist/video/index.cjs +1 -1
  85. package/dist/video/index.d.mts +1 -1
  86. package/dist/video/index.d.ts +1 -1
  87. package/dist/video/index.mjs +1 -1
  88. package/dist/vue/index.cjs +3 -3
  89. package/dist/vue/index.d.mts +3 -3
  90. package/dist/vue/index.d.ts +3 -3
  91. package/dist/vue/index.mjs +1 -1
  92. package/dist/web-component/index.cjs +3 -3
  93. package/dist/web-component/index.mjs +1 -1
  94. package/package.json +1 -1
  95. package/dist/chunk-6TWFLRUB.mjs +0 -3
  96. package/dist/chunk-A4JCC3QQ.mjs +0 -1
  97. package/dist/chunk-DM6EDKWH.mjs +0 -1
  98. package/dist/chunk-I73SOXBN.mjs +0 -1
  99. package/dist/chunk-NLPSVYFP.mjs +0 -1
  100. package/dist/chunk-OPXWNJBG.mjs +0 -1
  101. package/dist/chunk-QFSTKVA3.mjs +0 -1
@@ -1,4 +1,4 @@
1
- import { T as TriggerConfig, E as EasingName, S as ScrollDrawInstance } from '../types-MswK0erX.js';
1
+ import { T as TriggerConfig, E as EasingName, S as ScrollDrawInstance } from '../types-9bcJdVcg.js';
2
2
 
3
3
  interface ScrollVideoOptions {
4
4
  trigger?: TriggerConfig;
@@ -1 +1 @@
1
- export{a as scrollVideo}from'../chunk-QFSTKVA3.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';
1
+ export{a as scrollVideo}from'../chunk-NYQJPPMP.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-THPTANES.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';
@@ -1,3 +1,3 @@
1
- 'use strict';var vue=require('vue');function Sn({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),i=0,a=[];for(let y=0;y<n;y++){let E=Math.pow(o,y);a.push(E),i+=E;}let m=[0],p=0;for(let y=0;y<n;y++)p+=a[y]/i,m.push(p);return y=>{if(y<=0)return 0;if(y>=1)return 1;for(let E=0;E<n;E++)if(y<=m[E+1]){let N=(y-m[E])/(m[E+1]-m[E]);if(E===0)return N*(2-N);let S=1-Math.pow(r,E);return S+(1-S)*(2*N-1)*(2*N-1)}return 1}}function Tn({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 i=>i<=0?0:i>=1?1:n*Math.pow(2,-10*i)*Math.sin((i-o)*(2*Math.PI)/r)+1}var ee={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:Sn(),elastic:Tn()};function _t(e,t,n){return Math.min(n,Math.max(t,e))}function de(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return {element:"top",viewport:t};let[n="top",r="bottom"]=t.split(/\s+/).filter(Boolean);return {element:n,viewport:r}}function Bt(e,t,n,r){switch(r){case "top":return e+n;case "center":return e+n+t/2;case "bottom":return e+n+t;default:return e+n}}function Wt(e,t){if(/^\d+(\.\d+)?%$/.test(e))return t*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return t/2;case "bottom":return t;default:return t}}function U(e,t,n,r){return n===t?0:_t((e-t)/(n-t)*r,0,1)}function Le(e,t,n,r,o){let i=Bt(e.top,e.height,t,r.element)-Wt(r.viewport,n),a=Bt(e.top,e.height,t,o.element)-Wt(o.viewport,n);return {tStart:i,tEnd:a}}function lt(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 ct(e){let t=parseFloat(e.getAttribute("pathLength")??"");if(t>0)return t;let n=e.tagName.toLowerCase();if(n==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),o=parseFloat(e.getAttribute("height")??"0");return 2*(r+o)}if(n==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function qt(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 ut(e,t,n){let r=qt(e),o=qt(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 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 Qe=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function ge(e,...t){Qe&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var xn="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Mn="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",jt=33;function Ln(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function An(e){let t=[];for(let n=0;n<jt;n++){let r=n/(jt-1);t.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${t.join(",")})`}function mt(e){switch(e){case "linear":return "linear";case "ease-in":return xn;case "ease-out":return Mn;case "ease-in-out":return Ln()?An(ee["ease-in-out"]):null;default:return null}}var Qt=Symbol.for("svg-scroll-draw.registry");function Ut(){let e=globalThis;return e[Qt]||(e[Qt]=new Map)}function Ce(e,t){Ut().set(e,t);}function Pe(e){Ut().delete(e);}var Ze,ft=new Set,pt=new WeakMap,Je=new Map,Yt=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function Cn(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 ke(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>t();Ze??(Ze=new ResizeObserver(o=>{let i=false;for(let{target:a}of o)pt.get(a)!==Yt(a)&&(i=true),pt.set(a,"");i&&ft.forEach(a=>a());})),ft.add(n);let r=Cn(e);return [document.body,document.documentElement].forEach(o=>o&&r.add(o)),r.forEach(o=>{pt.has(o)||pt.set(o,Yt(o)),Je.set(o,(Je.get(o)??0)+1),Ze.observe(o);}),()=>{ft.delete(n)&&(r.forEach(o=>{let i=(Je.get(o)??1)-1;if(i)return void Je.set(o,i);Je.delete(o),Ze?.unobserve(o);}),ft.size||(Ze?.disconnect(),Ze=void 0));}}function dt(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 We(e,t){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t(e,true);let n=t(e,false),r=dt(i=>{if(!i)return;r();let a=(n.getProgress?.()??0)>=1;n.destroy(),n=t(a?{...e,onComplete:void 0}:e,true);}),o={};for(let i of Object.keys(n))o[i]=(...a)=>n[i]?.(...a);return o.destroy=()=>{r(),n.destroy();},o}var Pn=0;function On(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Xt(e,t){let n="";try{n=getComputedStyle(e).getPropertyValue(t).trim();}catch{}return n||(e.getAttribute(t)??"").trim()}var Kt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function Rn(e){if(!Qe)return;let t=Xt(e,"stroke");if(!t||t==="none"){ge("Element has no stroke \u2014 path will not be visible.",e);return}let n=(e.getAttribute("fill")??"").trim();n&&!Kt.has(n)&&!Kt.has(Xt(e,"fill"))&&ge("Element has a fill \u2014 it may obscure the stroke animation.",e);}function kn(e,t,n){let r=document.createElement("div");r.setAttribute("data-svg-scroll-draw-debug",""),r.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function o(){let i=n==="x"?window.scrollX:window.scrollY,a=e-i,m=t-i,p=n==="x";r.innerHTML=`
2
- <div style="position:absolute;${p?`left:${a}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${a}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
- <div style="position:absolute;${p?`left:${m}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${m}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(r),window.addEventListener("scroll",o,{passive:true}),o(),{el:r,destroy(){window.removeEventListener("scroll",o),r.remove();}}}var Zt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Jt=/[MmLlHhVvCcSsQqTtAaZz]/g;function $n(e,t,n){if(!Qe)return;let r=(e.match(Jt)??[]).join("").toUpperCase(),o=(t.match(Jt)??[]).join("").toUpperCase(),i=(e.match(Zt)??[]).length,a=(t.match(Zt)??[]).length;if(r!==o){ge(`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.`,n);return}i!==a&&ge(`morphTo: coordinate count differs (${i} \u2192 ${a}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,n);}function In(e,t,n){let r=(t.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,i=>{let a=parseFloat(i),m=r[o++]??a;return String(+(a+(m-a)*n).toFixed(4))})}function Tt(e,t={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:We(t,(n,r)=>Fn(e,n,r))}function Fn(e,t,n){let{preset:r,...o}=t,i=r?{...Gt[r],...o}:o,{selector:a="path, polyline, line, polygon, rect, circle",speed:m=1,fade:p=false,easing:y="linear",trigger:E={},stagger:N=0,direction:S="forward",once:Y=false,debug:te=false,axis:L="y",scrollContainer:ne,autoReverse:we=false,delay:P=0,strokeColor:$,strokeWidth:O,fillOpacity:A,waypoints:b,velocityScale:h=false,threshold:v=0,rootMargin:G="0px",repeat:_=0,repeatDelay:W=0,morphTo:H,clip:I,autoplay:re=false,duration:Te=1e3,native:ce=true,onProgress:D,onStart:R,onComplete:k,onEnter:u,onLeave:d,onEnterBack:X,onLeaveBack:xe}=i,V=I===true?"left":typeof I=="string"?I:false,K=typeof y=="function"?y:ee[y]??ee.linear,Oe=de(E.start||"top bottom"),x=de(E.end||"bottom top"),T=typeof ne=="string"?document.querySelector(ne):ne??null,ue=Array.isArray($)?$[0]:null,me=Array.isArray($)?$[1]:typeof $=="string"?$:null,Re=Array.isArray(O)?O[0]:null,Fe=Array.isArray(O)?O[1]:typeof O=="number"?O:null,Me=Array.isArray(A)?A[0]:null,Ve=Array.isArray(A)?A[1]:typeof A=="number"?A:null;function Ne(s){let l=s*100;switch(V){case "right":return `inset(0 0 0 ${100-l}%)`;case "top":return `inset(0 0 ${100-l}% 0)`;case "bottom":return `inset(${100-l}% 0 0 0)`;case "center":return `circle(${s*150}% at 50% 50%)`;default:return `inset(0 ${100-l}% 0 0)`}}let F=V?[]:Array.from(e.querySelectorAll(a)),ye=[],ve=[],oe=0,Z=0,qe=N,rt=0,j=false,c=false,f=0,Ae=false,fe=-1,J=[],Q=-1,w=false,se=0,he=0,ze,yt=null;function Ot(){yt?.destroy(),yt=null;}let _e=new Set,Rt=NaN,Be=true,ot=-1,kt=performance.now(),Ge=NaN;function Ue(){return T?L==="x"?T.scrollLeft:T.scrollTop:L==="x"?window.scrollX:window.scrollY}function $t(){return T?L==="x"?T.clientWidth:T.clientHeight:L==="x"?window.innerWidth:window.innerHeight}function It(){let s=lt(e,T,L);return Le(s,s.scroll,$t(),Oe,x)}function gn(){let s=Z-oe,l=F.length-1,g=T??document.documentElement,C=L==="x"?"Width":"Height";if(qe=N,N>0&&l>0&&s>0){let pe=g[`scroll${C}`]-g[`client${C}`]-1-oe-s/m;pe>=0&&(qe=Math.min(N,pe/(l*s)));}rt=Z+l*qe*s;}function Ft(){(({tStart:oe,tEnd:Z}=It())),gn(),te&&Qe&&(Ot(),yt=kn(oe,Z,L));}function ht(s,l=It){Ce(e,{type:"draw",getProgress:()=>s.getProgress(),getTrigger:l});let g=s.destroy;return s.destroy=()=>{g.call(s),Pe(e);},s}function Nt(s,l){return Y&&!we?Math.max(fe,K(J[s]=Math.max(J[s]??0,l))):K(l)}function yn(s,l){if(e.style.setProperty("--scroll-draw-progress",String(s)),V){let g=l==="reverse"?1-s:s;e.style.clipPath=Ne(g);return}F.forEach((g,C)=>bt(g,C,s,l));}function bt(s,l,g,C){s.style.strokeDashoffset=C==="reverse"?`${ye[l]*g}`:`${ye[l]*(1-g)}`,p&&(s.style.opacity=C==="reverse"?`${1-g}`:`${g}`),ue&&me?s.style.stroke=ut(ue,me,g):me&&(s.style.stroke=me),Re!==null&&Fe!==null?s.style.strokeWidth=`${Re+(Fe-Re)*g}`:Fe!==null&&(s.style.strokeWidth=`${Fe}`),Me!==null&&Ve!==null?s.style.fillOpacity=`${Me+(Ve-Me)*g}`:Ve!==null&&(s.style.fillOpacity=`${Ve}`),H&&s.tagName.toLowerCase()==="path"&&ve[l]&&s.setAttribute("d",In(ve[l],H,g));}function Ye(){if(e.style.setProperty("--scroll-draw-progress","0"),V){e.style.clipPath=Ne(S==="reverse"?1:0);return}F.forEach((s,l)=>{s.style.strokeDasharray=`${ye[l]}`,s.style.strokeDashoffset=S==="reverse"?"0":`${ye[l]}`,p?s.style.opacity=S==="reverse"?"1":"0":s.style.opacity="",ue&&(s.style.stroke=ue),Re!==null&&(s.style.strokeWidth=`${Re}`),Me!==null&&(s.style.fillOpacity=`${Me}`),H&&s.tagName.toLowerCase()==="path"&&ve[l]&&s.setAttribute("d",ve[l]);});}function Xe(s,l){let g=s.getAttribute("d"),C=ct(s);if(H&&ve[l]){s.setAttribute("d",H);let pe=ct(s);s.setAttribute("d",ve[l]),C=Math.max(ct(s),pe),s.setAttribute("d",g);}ye[l]=C,s.style.strokeDasharray=`${C}`;}if(F.forEach((s,l)=>{Rn(s);let g=s.tagName.toLowerCase()==="path";g?ve.push(s.getAttribute("d")??""):ve.push(""),Xe(s,l);let C=ye[l];H&&(g?$n(ve[ve.length-1],H,s):ge(`morphTo only applies to <path> elements \u2014 ignored on <${s.tagName}>.`,s)),n?(s.style.strokeDashoffset=S==="reverse"?`${C}`:"0",p&&(s.style.opacity="1"),me&&(s.style.stroke=me),Fe!==null&&(s.style.strokeWidth=`${Fe}`),Ve!==null&&(s.style.fillOpacity=`${Ve}`),H&&s.tagName.toLowerCase()==="path"&&s.setAttribute("d",H)):(s.style.strokeDashoffset=S==="reverse"?"0":`${C}`,p?s.style.opacity=S==="reverse"?"1":"0":s.style.opacity="",ue&&(s.style.stroke=ue),Re!==null&&(s.style.strokeWidth=`${Re}`),Me!==null&&(s.style.fillOpacity=`${Me}`));}),n)return V&&(e.style.clipPath=Ne(1)),k?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};V&&(e.style.clipPath=Ne(S==="reverse"?1:0));let Dt=typeof y=="string"?mt(y):null;function hn(){return !(ce===false||re||te&&Qe||!On()||!F.length||!Dt||V||L!=="y"||T||m!==1||N!==0||Y||we||h!==false||H||b||_||P>0||D||R||k||u||d||X||xe||$!=null||O!=null||A!=null||(E.start||"top bottom").trim()!=="top bottom"||(E.end||"bottom top").trim()!=="bottom top")}function bn(){let s=++Pn,l=`svg-scroll-draw-${s}`,g=`svg-scroll-draw-host-${s}`,C=`--svg-scroll-draw-${s}`,pe=S==="reverse"?"0":"var(--ssd-len)",De=S==="reverse"?"var(--ssd-len)":"0",Ee=`stroke-dashoffset:${pe};`,B=`stroke-dashoffset:${De};`;p&&(Ee+=`opacity:${S==="reverse"?1:0};`,B+=`opacity:${S==="reverse"?0:1};`);let q=document.createElement("style");q.setAttribute("data-svg-scroll-draw",""),q.textContent=`@keyframes ${l}{from{${Ee}}to{${B}}}.${g}{view-timeline-name:${C};view-timeline-axis:block;}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${Dt};animation-fill-mode:both;animation-timeline:${C};animation-range:cover 0% cover 100%;}`,document.head.appendChild(q),e.classList.add(g);function ie(M,z){M.style.setProperty("--ssd-len",String(ye[z])),M.style.strokeDasharray=`${ye[z]}`,M.style.strokeDashoffset="",M.style.opacity="",M.style.animationPlayState="",M.classList.add(l);}F.forEach(ie);let ae=false,be=-1;function Se(){if(be>=0)return be;let M=e.getBoundingClientRect(),{tStart:z,tEnd:le}=Le({top:M.top,height:M.height},Ue(),$t(),Oe,x);return K(U(Ue(),z,le,m))}return {destroy(){e.classList.remove(g),F.forEach(M=>{M.classList.remove(l),M.style.removeProperty("--ssd-len"),M.style.animationPlayState="";}),q.remove();},replay(){ae=false,be=-1,F.forEach(ie);},pause(){ae=true,F.forEach(M=>{M.style.animationPlayState="paused";});},resume(){ae&&(ae=false,F.forEach(M=>{M.style.animationPlayState="running";}));},seek(M){let z=Math.min(1,Math.max(0,M));be=z,ae=true,F.forEach((le,He)=>{le.classList.remove(l),le.style.strokeDashoffset=S==="reverse"?`${ye[He]*z}`:`${ye[He]*(1-z)}`,p&&(le.style.opacity=S==="reverse"?`${1-z}`:`${z}`);});},getProgress(){return Se()},refresh(){F.forEach((M,z)=>{Xe(M,z),M.style.setProperty("--ssd-len",String(ye[z]));});}}}if(hn())return ht(bn());function wn(){let s=Math.max(1,Te),l=V?s:s*(1+Math.max(0,F.length-1)*N),g=0,C=0,pe=false;function De(be){let Se=true,M=Math.min(1,Math.max(0,be/l));if(V){let z=Math.min(1,Math.max(0,be/s)),le=K(z);se=le,e.style.setProperty("--scroll-draw-progress",String(le)),e.style.clipPath=Ne(S==="reverse"?1-le:le),D?.(le),z<1&&(Se=false);}else {F.forEach((le,He)=>{let En=He*N*s,zt=Math.min(1,Math.max(0,(be-En)/s));bt(le,He,K(zt),S),zt<1&&(Se=false);});let z=K(M);se=z,D?.(z),e.style.setProperty("--scroll-draw-progress",String(z));}if(b){let z=K(M);for(let le in b){let He=parseFloat(le);z>=He&&!_e.has(He)&&(_e.add(He),b[le]?.());}}return Se}function Ee(be){if(w)return;let Se=be-g;c||(c=true,R?.());let M=De(Se);if(M&&!j){j=true,De(l),k?.(),he<(_==="infinite"?1/0:_??0)&&(he++,ze=setTimeout(()=>{g=performance.now(),c=false,j=false,_e.clear(),Ye(),f=requestAnimationFrame(Ee);},W));return}M||(f=requestAnimationFrame(Ee));}function B(){cancelAnimationFrame(f),clearTimeout(ze),g=performance.now(),C=0,w=false,c=false,j=false,he=0,pe=true,se=0,_e.clear(),Ye(),f=requestAnimationFrame(Ee);}let q=new IntersectionObserver(be=>{be.forEach(Se=>{Se.isIntersecting&&!(Y&&j)?B():!Se.isIntersecting&&!Y&&!j&&(cancelAnimationFrame(f),clearTimeout(ze),pe=false);});},{root:T??null,threshold:v,rootMargin:G}),ie;function ae(){clearTimeout(ie),ie=setTimeout(()=>F.forEach(Xe),150);}return window.addEventListener("resize",ae),window.addEventListener("orientationchange",ae),P>0?setTimeout(()=>q.observe(e),P):q.observe(e),{destroy(){cancelAnimationFrame(f),clearTimeout(ze),q.disconnect(),window.removeEventListener("resize",ae),window.removeEventListener("orientationchange",ae),clearTimeout(ie);},replay(){he=0,B();},pause(){w||!pe||(w=true,C=performance.now()-g,cancelAnimationFrame(f));},resume(){w&&(w=false,pe=true,g=performance.now()-C,f=requestAnimationFrame(Ee));},seek(be){let Se=Math.min(1,Math.max(0,be));se=Se,w=true,C=Se*l,g=performance.now()-C,cancelAnimationFrame(f),De(C);},getProgress(){return se},refresh(){clearTimeout(ie),F.forEach(Xe);}}}if(re)return ht(wn());Ft();function Ht(){if(w||!je)return;let s=performance.now(),l=Ue();if(!Be&&h===false&&l===Rt){vt(l);return}Be=false,Rt=l;let g=m;if(h!==false){let B=s-kt,q=B>0?Math.abs(l-(ot<0?l:ot))/B:0;g=m*Math.max(.2,1+q*(typeof h=="number"?h:1)*.04);}ot=l,kt=s;let C=we?Q===-1||l>=Q?"forward":"reverse":S;Q=l;let pe=Z-oe,De=true,Ee=pe===0?0:(l-oe)/pe;if(isNaN(Ge)||(Ge<=0&&Ee>0?u?.():Ge>0&&Ee<=0&&xe?.(),Ge<1&&Ee>=1?d?.():Ge>=1&&Ee<1&&X?.()),Ge=Ee,V){let B=Nt(0,U(l,oe,Z,g));se=B,e.style.setProperty("--scroll-draw-progress",String(B));let q=C==="reverse"?1-B:B;e.style.clipPath=Ne(q),D?.(B),!c&&U(l,oe,Z,g)>0&&(c=true,R?.()),B>=1&&!j?(j=true,k?.(),he<(_==="infinite"?1/0:_??0)&&(he++,ze=setTimeout(()=>{fe=-1,J=[],c=false,j=false,Ye();},W))):B<1&&!Y&&(j=false),vt(l);return}if(F.forEach((B,q)=>{let ie=q*qe*pe,ae=Nt(q,U(l,oe+ie,Z+ie,g));bt(B,q,ae,C),q===0&&(se=ae,D?.(ae),e.style.setProperty("--scroll-draw-progress",String(ae))),ae<1&&(De=false);}),b){let B=K(U(l,oe,Z,g));for(let q in b){let ie=parseFloat(q);B>=ie&&!_e.has(ie)&&(_e.add(ie),b[q]?.());}}!c&&U(l,oe,Z,g)>0&&(c=true,R?.()),De&&!j?(j=true,k?.(),he<(_==="infinite"?1/0:_??0)&&(he++,ze=setTimeout(()=>{fe=-1,J=[],c=false,j=false,_e.clear(),Ye(),Be=true;},W))):!De&&!Y&&(j=false),vt(l);}function wt(s){return s>=Z&&s<rt}function vt(s){Ae||wt(s)?f=requestAnimationFrame(Ht):je=false;}function Et(){return Ae||wt(Ue())}let je=false;function st(){je||(je=true,f=requestAnimationFrame(function(){Ht();}));}function it(){je=false,cancelAnimationFrame(f);}let St=new IntersectionObserver(s=>{s.forEach(l=>{Ae=l.isIntersecting,Ae&&!w?(Be=true,st()):je&&!w&&wt(Ue())||it();});},{root:T??null,threshold:v,rootMargin:G});function Vt(){F.forEach(Xe),Ft(),Be=true;}let at;function Ke(){clearTimeout(at),at=setTimeout(Vt,150);}window.addEventListener("resize",Ke),window.addEventListener("orientationchange",Ke);let vn=ke([e],Ke);return P>0?setTimeout(()=>St.observe(e),P):St.observe(e),ht({destroy(){cancelAnimationFrame(f),clearTimeout(ze),it(),St.disconnect(),vn(),window.removeEventListener("resize",Ke),window.removeEventListener("orientationchange",Ke),clearTimeout(at),Ot();},replay(){fe=-1,J=[],Q=-1,ot=-1,c=false,j=false,he=0,w=false,se=0,_e.clear(),clearTimeout(ze),Ye(),Be=true,Et()&&st();},pause(){w=true,it();},resume(){w&&(w=false,Be=true,Et()&&st());},seek(s){let l=Math.min(1,Math.max(0,s));se=l,fe=l,J=[],w=true,it(),yn(l,S),Be=true;},getProgress(){return se},refresh(){clearTimeout(at),Vt(),Et()&&!w&&st();}},()=>({tStart:oe,tEnd:Z}))}var en=new WeakMap,Nn=0;function tn(e){return JSON.stringify(e,(t,n)=>{if(typeof n=="function")return "\u0192";if(typeof Element<"u"&&n instanceof Element){let r=en.get(n);return r===void 0&&en.set(n,r=++Nn),`el#${r}`}return n})}function nn(e,t){let n={...e};for(let r of Object.keys(n))typeof n[r]=="function"&&(n[r]=(...o)=>t()[r]?.(...o));return n}function Dn(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function rn(e){let t=[],n=/([\w]+)\(([^)]*)\)/g,r;for(;(r=n.exec(e))!==null;){let o=[],i=[],a=r[2].trim();if(a)for(let m of a.split(/[\s,]+/)){let p=m.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(p?parseFloat(p[1]):0),i.push(p?p[2]:"");}t.push({fn:r[1],nums:o,units:i});}return t}function Hn(e,t,n){let r=rn(e),o=rn(t);return r.length===0||r.length!==o.length?n<1?e:t:r.map((i,a)=>{let m=o[a];return i.fn!==m.fn||i.nums.length!==m.nums.length?n<1?`${i.fn}(${i.nums.map((p,y)=>`${p}${i.units[y]}`).join(", ")})`:`${m.fn}(${m.nums.map((p,y)=>`${p}${m.units[y]}`).join(", ")})`:`${i.fn}(${i.nums.map((p,y)=>`${p+(m.nums[y]-p)*n}${i.units[y]}`).join(", ")})`}).join(" ")}function on(e,t,n){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*n);let r=String(e),o=String(t);if(Dn(r))return ut(r,o,n);if(r.includes("("))return Hn(r,o,n);let i=r.match(/^([-+]?[\d.]+)(.*)$/),a=o.match(/^([-+]?[\d.]+)(.*)$/);if(i&&a){let m=parseFloat(i[1]),p=parseFloat(a[1]);return `${m+(p-m)*n}${i[2]||a[2]}`}return n<1?r:o}function Vn(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var zn=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),_n=0,sn="--scroll-draw-progress";function Bn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var ln={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function xt(e,t){return typeof window>"u"?ln:t.respectReducedMotion===false?an(e,t,false):We(t,(n,r)=>an(e,n,r))}function an(e,t,n){let{props:r,trigger:o={},easing:i="ease-out",speed:a=1,once:m=false,axis:p="y",scrollContainer:y,native:E=true,velocityScale:N=false,triggerElement:S,onProgress:Y,onComplete:te,onEnter:L,onLeave:ne,onEnterBack:we,onLeaveBack:P}=t,$=typeof i=="function"?i:ee[i]??ee["ease-out"],O=de(o.start||"top bottom"),A=de(o.end||"bottom top"),b=S??e,h=typeof y=="string"?document.querySelector(y):y??null,v=Object.entries(r).map(([c,f])=>({prop:Vn(c),from:Array.isArray(f)?f[0]:"",to:Array.isArray(f)?f[1]:f}));function G(){let c=window.getComputedStyle(e);for(let f of v)f.from===""&&(f.from=c.getPropertyValue(f.prop).trim()||"0");}function _(){for(let c of v)e.style.setProperty(c.prop,String(c.to));}let W=new Map;for(let c of [...v.map(f=>f.prop),sn])W.set(c,e.style.getPropertyValue(c));function H(){for(let[c,f]of W)f?e.style.setProperty(c,f):e.style.removeProperty(c);}if(n)return _(),te?.(),{...ln,destroy:H,getProgress:()=>1};G();let I=()=>h?p==="x"?h.scrollLeft:h.scrollTop:p==="x"?window.scrollX:window.scrollY,re=()=>h?p==="x"?h.clientWidth:h.clientHeight:p==="x"?window.innerWidth:window.innerHeight,Te=typeof i=="string"?mt(i):null;function ce(){if(!E||!Bn()||!Te||p!=="y"||h||b!==e||m||a!==1||Y||te||L||ne||we||P||N!==false||(o.start||"top bottom").trim()!=="top bottom"||(o.end||"bottom top").trim()!=="bottom top")return false;for(let c of v)if(!zn.has(c.prop))return false;return true}function D(){let c=`ssd-a-${++_n}`,f=v.map(w=>`${w.prop}:${w.from}`).join(";"),Ae=v.map(w=>`${w.prop}:${w.to}`).join(";"),fe=document.createElement("style");fe.setAttribute("data-ssd-animate",""),fe.textContent=`@keyframes ${c}{from{${f}}to{${Ae}}}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${Te};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(fe),e.classList.add(c);let J=()=>{let w=e.getBoundingClientRect();return Le({top:w.top,height:w.height},I(),re(),O,A)};Ce(e,{type:"animate",getProgress:()=>Q.getProgress(),getTrigger:J});let Q={refresh(){},destroy(){e.classList.remove(c),fe.remove(),e.style.animationPlayState="",H(),Pe(e);},replay(){e.classList.remove(c),e.offsetWidth,e.classList.add(c);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(w){let se=Math.min(1,Math.max(0,w));e.classList.remove(c);for(let he of v)e.style.setProperty(he.prop,on(he.from,he.to,se));},getProgress(){let{tStart:w,tEnd:se}=J();return $(U(I(),w,se,a))}};return Q}if(ce())return D();let R=0,k=0,u=0,d=NaN,X=false,xe=-1,V=0,K=0,Oe=false,x=NaN,T=-1,ue=0,me=b===e?v:[],Re=false;function Fe(){let c=e.style,f=me.map(Q=>c.getPropertyValue(Q.prop)),Ae=c.transition;me.length&&(c.transition="none"),me.forEach(Q=>c.setProperty(Q.prop,W.get(Q.prop)??""));let fe=lt(b,h,p);me.forEach((Q,w)=>c.setProperty(Q.prop,f[w])),me.length&&(e.offsetWidth,c.transition=Ae);let J=Le(fe,fe.scroll,re(),O,A);Re&&Math.abs(J.tStart-R)<1&&Math.abs(J.tEnd-k)<1||(Re=true,R=J.tStart,k=J.tEnd);}function Me(c){e.style.setProperty(sn,String(c));for(let f of v)e.style.setProperty(f.prop,on(f.from,f.to,c));Y?.(c);}function Ve(c){if(isNaN(x)){x=c;return}x<=0&&c>0?L?.():x>0&&c<=0&&P?.(),x<1&&c>=1?ne?.():x>=1&&c<1&&we?.(),x=c;}let Ne=c=>U(c,R,k,Math.min(a,1));function F(){!u&&!X&&Ne(I())!==d&&(u=requestAnimationFrame(ye));}function ye(){if(X)return;let c=performance.now(),f=I(),Ae=a;if(N!==false){let w=c-ue,se=w>0?Math.abs(f-(T<0?f:T))/w:0;Ae=a*Math.max(.2,1+se*(typeof N=="number"?N:1)*.04);}T=f,ue=c;let fe=k===R?0:(f-R)/(k-R);Ve(fe);let J=U(f,R,k,Ae),Q=m?Math.max(xe,$(V=Math.max(V,J))):$(J);K=Q,Me(Q),Q>=1&&!Oe?(Oe=true,te?.()):Q<1&&!m&&(Oe=false),!X&&(d=Ne(f),u=d>0&&d<1?requestAnimationFrame(ye):0);}Fe(),k===R&&ge("scrollAnimate: zero-length trigger window, so it never animates. In a sticky stage, set triggerElement.",e),V=U(I(),R,k,a),K=$(V),Me(K);function ve(){Fe(),F();}let oe;function Z(){clearTimeout(oe),oe=setTimeout(ve,150);}let qe=h??window;qe.addEventListener("scroll",F,{passive:true}),window.addEventListener("resize",Z),window.addEventListener("orientationchange",Z);let rt=ke([b],Z);F(),Ce(e,{type:"animate",getProgress:()=>K,getTrigger:()=>({tStart:R,tEnd:k})});function j(){X=true,cancelAnimationFrame(u),u=0,d=NaN;}return {destroy(){j(),qe.removeEventListener("scroll",F),window.removeEventListener("resize",Z),window.removeEventListener("orientationchange",Z),rt(),clearTimeout(oe),H(),Pe(e);},replay(){xe=-1,V=0,Oe=false,K=0,X=false,Me(0),d=0,F();},pause:j,resume(){X&&(X=false,F());},seek(c){let f=Math.min(1,Math.max(0,c));K=f,xe=f,V=0,j(),Me(f);},getProgress(){return K},refresh:ve}}var Mt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Lt(e,t){if(typeof window>"u")return Mt;let n=typeof e=="string"?document.querySelector(e):e;return n?We(t,(r,o)=>Wn(n,r,o)):(ge("scrollCounter: element not found:",e),Mt)}function Wn(e,t,n){let{from:r=0,to:o,format:i,easing:a="ease-out",trigger:m={},once:p=true,decimals:y,onComplete:E}=t,N=y!==void 0?u=>u.toFixed(y):i??(u=>String(Math.round(u))),S=typeof a=="function"?a:ee[a]??ee["ease-out"],Y=de(m.start||"top 80%"),te=de(m.end||"top 20%");if(n)return e.textContent=N(o),E?.(),{...Mt,getProgress:()=>1};let L=0,ne=0,we=false,P=0,$=false,O=false,A=-1,b=0,h=0,v=false,G=()=>window.scrollY,_=()=>window.innerHeight;function W(){let u=e.getBoundingClientRect(),d=Le({top:u.top,height:u.height},G(),_(),Y,te);we&&Math.abs(d.tStart-L)<1&&Math.abs(d.tEnd-ne)<1||(we=true,L=d.tStart,ne=d.tEnd);}let H=e.style.getPropertyValue("--scroll-draw-progress");function I(u){e.textContent=N(r+(o-r)*u),e.style.setProperty("--scroll-draw-progress",String(u));}function re(){if(!$||O)return;let u=U(G(),L,ne,1),d=p?Math.max(A,S(b=Math.max(b,u))):S(u);h=d,I(d),d>=1&&!v?(v=true,E?.()):d<1&&!p&&(v=false),P=requestAnimationFrame(re);}W();{b=U(G(),L,ne,1);let u=S(b);h=u,I(u);}let Te=new IntersectionObserver(u=>{u.forEach(d=>{$=d.isIntersecting,$&&!O?P=requestAnimationFrame(re):cancelAnimationFrame(P);});}),ce;function D(){clearTimeout(ce),ce=setTimeout(W,150);}window.addEventListener("resize",D),window.addEventListener("orientationchange",D);let R=ke([e],D);Te.observe(e),Ce(e,{type:"counter",getProgress:()=>h,getTrigger:()=>({tStart:L,tEnd:ne})});function k(){O&&(O=false,$&&(P=requestAnimationFrame(re)));}return {destroy(){cancelAnimationFrame(P),Te.disconnect(),window.removeEventListener("resize",D),window.removeEventListener("orientationchange",D),R(),clearTimeout(ce),e.style.setProperty("--scroll-draw-progress",H),Pe(e);},replay(){A=-1,b=0,v=false,h=0,I(0),k();},pause(){O=true,cancelAnimationFrame(P);},resume:k,seek(u){let d=Math.min(1,Math.max(0,u));h=d,A=d,b=0,O=true,cancelAnimationFrame(P),I(d);},getProgress(){return h}}}var cn={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function At(e,t={}){if(typeof window>"u")return cn;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return ge("scrollVideo: <video> element not found:",e),cn;let r=n,{trigger:o={},easing:i="linear",once:a=false,axis:m="y",preload:p="auto",triggerElement:y,onReady:E,onComplete:N,onProgress:S}=t,Y=y??r,te=window.matchMedia("(prefers-reduced-motion: reduce)").matches,L=typeof i=="function"?i:ee[i]??ee.linear,ne=de(o.start||"top top"),we=de(o.end||"bottom top");r.pause(),r.hasAttribute("preload")||(r.preload=p);let P=t.from??0,$=t.to,O=0,A=0,b=0,h=false,v=false,G=-1,_=0,W=0,H=false,I=false,re=()=>m==="x"?window.scrollX:window.scrollY,Te=()=>m==="x"?window.innerWidth:window.innerHeight;function ce(){let x=Y.getBoundingClientRect(),T=m==="x"?x.left:x.top,ue=m==="x"?x.width:x.height,me=Le({top:T,height:ue},re(),Te(),ne,we);O=me.tStart,A=me.tEnd,I&&A===O&&ge("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",r);}let D=NaN;function R(x){if(!I)return;let T=$??r.duration??0,ue=P+(T-P)*x;ue!==D&&(D=ue,r.currentTime=ue),r.style.setProperty("--scroll-draw-progress",String(x)),S?.(x);}function k(){if(!h||v||!I||te)return;let x=U(re(),O,A,1),T=a?Math.max(G,L(_=Math.max(_,x))):L(x);W=T,R(T),T>=1&&!H?(H=true,N?.()):T<1&&!a&&(H=false),b=requestAnimationFrame(k);}function u(){if(I=true,$===void 0&&($=r.duration),te){R(1),E?.();return}ce(),E?.(),v?R(W):h&&(b=requestAnimationFrame(k));}r.readyState>=1?u():r.addEventListener("loadedmetadata",u,{once:true}),I||ce();let d=te?()=>{}:dt(x=>{x&&(d(),te=true,cancelAnimationFrame(b),R(1));}),X=new IntersectionObserver(x=>{x.forEach(T=>{h=T.isIntersecting,h&&!v&&I?b=requestAnimationFrame(k):cancelAnimationFrame(b);});}),xe;function V(){clearTimeout(xe),xe=setTimeout(ce,150);}window.addEventListener("resize",V),window.addEventListener("orientationchange",V);let K=ke([Y],V);X.observe(r),Ce(r,{type:"video",getProgress:()=>W,getTrigger:()=>({tStart:O,tEnd:A})});function Oe(){v&&(v=false,h&&I&&(b=requestAnimationFrame(k)));}return {destroy(){cancelAnimationFrame(b),X.disconnect(),r.removeEventListener("loadedmetadata",u),window.removeEventListener("resize",V),window.removeEventListener("orientationchange",V),K(),d(),clearTimeout(xe),Pe(r);},replay(){G=-1,_=0,H=false,W=0,D=NaN,R(0),Oe();},pause(){v=true,cancelAnimationFrame(b);},resume:Oe,seek(x){let T=Math.min(1,Math.max(0,x));W=T,G=T,_=0,v=true,cancelAnimationFrame(b),D=NaN,R(T);},getProgress(){return W}}}function un(e,t){let n=document.createElement("span");n.textContent=t,n.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;user-select:none",e.appendChild(n);}function gt(e=""){let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=e,t}function fn(e){let t=e.textContent??"";return e.textContent="",t.split(/(\s+)/).filter(Boolean).map(n=>{let r=e.appendChild(gt(n)),o=/^\s+$/.test(n);return o?r.style.whiteSpace="pre":r.style.display="inline-block",o?null:r}).filter(n=>n!==null)}function qn(e){let t=e.textContent??"";e.textContent="";let n=[],r=null;for(let o of t){let i=gt(o),a=o===" ";a?i.style.whiteSpace="pre":(i.style.display="inline-block",n.push(i)),a||o>"\u0DFF"?r=null:r||(r=e.appendChild(gt()),r.style.cssText="display:inline-block;white-space:nowrap"),(r??e).appendChild(i);}return n}function mn(e){let t=fn(e),n=new Map;for(let i of t){let a=i.offsetTop;n.has(a)||n.set(a,[]),n.get(a).push(i);}let r=[],o=Array.from(n.keys()).sort((i,a)=>i-a);for(let i of o){let a=n.get(i),m=gt();m.style.display="inline-block",a.forEach((p,y)=>{let E=p.nextElementSibling;m.appendChild(p),y<a.length-1&&E&&E.style.whiteSpace==="pre"&&m.appendChild(E);}),r.push(m);}return e.textContent="",r.forEach((i,a)=>{e.appendChild(i),a<r.length-1&&e.appendChild(document.createTextNode(" "));}),r}function Gn(e,t,n,r){if(n<=1||r===0)return e;r=Math.min(r,1/n);let o=(n-1)*r,i=t*r,a=i+(1-o);return a<=i?e>=i?1:0:Math.min(1,Math.max(0,(e-i)/(a-i)))}function jn(e,t){let n=[];if(t?.y!==void 0&&n.push(`translateY(${t.y*(1-e)}px)`),t?.x!==void 0&&n.push(`translateX(${t.x*(1-e)}px)`),t?.rotate!==void 0&&n.push(`rotate(${t.rotate*(1-e)}deg)`),t?.scale!==void 0){let r=t.scale+(1-t.scale)*e;n.push(`scale(${r})`);}return n.join(" ")}var Ct={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Pt(e,t={}){if(typeof window>"u")return Ct;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return ge("scrollText: element not found:",e),Ct;let r=n;return We(t,(o,i)=>Qn(r,o,i))}function Qn(e,t,n){let{split:r="words",stagger:o=.04,easing:i="ease-out",from:a={opacity:0,y:24},trigger:m={},once:p=true,onComplete:y}=t,E=typeof i=="function"?i:ee[i]??ee["ease-out"],N=de(m.start||"top 85%"),S=de(m.end||"top 40%"),Y=e.innerHTML,te=e.textContent??"",L;r==="chars"?L=qn(e):r==="lines"?L=mn(e):L=fn(e),un(e,te);let ne=L.length;function we(u,d){a?.opacity!==void 0&&(u.style.opacity=String(a.opacity+(1-a.opacity)*d));let X=jn(d,a);X&&(u.style.transform=X);}function P(u){e.style.setProperty("--scroll-draw-progress",String(u)),L.forEach((d,X)=>{let xe=E(Gn(u,X,ne,o));we(d,xe);});}if(n)return P(1),y?.(),{...Ct,destroy:()=>{e.innerHTML=Y;},getProgress:()=>1};P(0);let $=0,O=0,A=0,b=false,h=false,v=-1,G=0,_=false,W=()=>window.scrollY,H=()=>window.innerHeight;function I(){let u=e.getBoundingClientRect(),d=Le({top:u.top,height:u.height},W(),H(),N,S);$=d.tStart,O=d.tEnd;}function re(){if(!b||h)return;let u=U(W(),$,O,1);p&&(v=Math.max(v,u),u=v),G=u,P(u),u>=1&&!_?(_=true,y?.()):u<1&&!p&&(_=false),A=requestAnimationFrame(re);}I();let Te=new IntersectionObserver(u=>{u.forEach(d=>{b=d.isIntersecting,b&&!h?A=requestAnimationFrame(re):cancelAnimationFrame(A);});}),ce;function D(){clearTimeout(ce),ce=setTimeout(()=>{if(r==="lines"){let u=G;e.innerHTML=Y,L=mn(e),un(e,te),P(u);}I();},150);}window.addEventListener("resize",D),window.addEventListener("orientationchange",D);let R=ke([e],D);Te.observe(e),Ce(e,{type:"text",getProgress:()=>G,getTrigger:()=>({tStart:$,tEnd:O})});function k(){h&&(h=false,b&&(A=requestAnimationFrame(re)));}return {destroy(){cancelAnimationFrame(A),Te.disconnect(),window.removeEventListener("resize",D),window.removeEventListener("orientationchange",D),R(),clearTimeout(ce),e.innerHTML=Y,Pe(e);},replay(){v=-1,_=false,G=0,P(0),k();},pause(){h=true,cancelAnimationFrame(A);},resume:k,seek(u){let d=Math.min(1,Math.max(0,u));G=d,v=d,h=true,cancelAnimationFrame(A),P(d);},getProgress(){return G}}}var nt=e=>typeof e=="function"?e():vue.unref(e);function Ie(e,t,n){let r=null,o=t(),i=()=>{r?.destroy(),r=e.value?n(e.value,nn(o,()=>o)):null;};vue.onMounted(i),vue.watch(()=>tn(o=t()),i),vue.onUnmounted(()=>{r?.destroy(),r=null;});}function fo(e={}){let t=vue.ref(null);return Ie(t,()=>nt(e),Tt),t}var pn={preset:0,selector:0,speed:0,fade:1,easing:0,trigger:0,stagger:0,direction:0,once:1,debug:1,axis:0,scrollContainer:0,autoReverse:1,delay:0,strokeColor:0,strokeWidth:0,fillOpacity:0,clip:2,waypoints:0,velocityScale:3,threshold:0,rootMargin:0,repeat:0,repeatDelay:0,morphTo:0,onProgress:0,onStart:0,onComplete:0,onEnter:0,onLeave:0,onEnterBack:0,onLeaveBack:0,autoplay:1,duration:0,native:1},Zn=[null,Boolean,[Boolean,String],[Boolean,Number]],dn=e=>({type:e,default:void 0}),po=vue.defineComponent({name:"ScrollDraw",props:Object.fromEntries(Object.entries(pn).map(([e,t])=>[e,t?dn(Zn[t]):null])),setup(e,{slots:t}){let n=vue.ref(null);return Ie(n,()=>{let r={};for(let o in pn){let i=e[o];i!=null&&(r[o]=i);}return r},Tt),()=>vue.h("div",{ref:n},t.default?.())}});function go(e){let t=vue.ref(null);return Ie(t,()=>nt(e),xt),t}var yo=vue.defineComponent({name:"ScrollAnimate",props:{options:{type:Object,required:true}},setup(e,{slots:t}){let n=vue.ref(null);return Ie(n,()=>e.options,xt),()=>vue.h("div",{ref:n},t.default?.())}});function ho(e){let t=vue.ref(null);return Ie(t,()=>nt(e),Lt),t}var bo=vue.defineComponent({name:"ScrollCounter",props:{to:{type:Number,required:true},from:{type:Number},format:{type:Function},easing:{type:[String,Function]},trigger:{type:Object},once:dn(Boolean),decimals:{type:Number},onComplete:{type:Function}},setup(e){let t=vue.ref(null);return Ie(t,()=>{let n={to:e.to};return e.from!=null&&(n.from=e.from),e.format!=null&&(n.format=e.format),e.easing!=null&&(n.easing=e.easing),e.trigger!=null&&(n.trigger=e.trigger),e.once!=null&&(n.once=e.once),e.decimals!=null&&(n.decimals=e.decimals),e.onComplete!=null&&(n.onComplete=e.onComplete),n},Lt),()=>vue.h("span",{ref:t})}});function wo(e={}){let t=vue.ref(null);return Ie(t,()=>nt(e),At),t}var vo=vue.defineComponent({name:"ScrollVideo",props:{src:{type:String,required:true},options:{type:Object},muted:{type:Boolean,default:true},playsInline:{type:Boolean,default:true},class:{type:String}},setup(e){let t=vue.ref(null);return Ie(t,()=>e.options??{},At),()=>vue.h("video",{ref:t,src:e.src,muted:e.muted,playsinline:e.playsInline,preload:"auto",class:e.class})}});function Eo(e={}){let t=vue.ref(null);return Ie(t,()=>nt(e),Pt),t}var So=vue.defineComponent({name:"ScrollText",props:{options:{type:Object},tag:{type:String,default:"p"}},setup(e,{slots:t}){let n=vue.ref(null);return Ie(n,()=>e.options??{},Pt),()=>vue.h(e.tag,{ref:n},t.default?.())}});exports.ScrollAnimate=yo;exports.ScrollCounter=bo;exports.ScrollDraw=po;exports.ScrollText=So;exports.ScrollVideo=vo;exports.useScrollAnimate=go;exports.useScrollCounter=ho;exports.useScrollDraw=fo;exports.useScrollText=Eo;exports.useScrollVideo=wo;
1
+ 'use strict';var vue=require('vue');function En({tension:e=2.5,friction:t=2.2}={}){return n=>1-Math.cos(n*Math.PI*e)*Math.pow(1-n,t)}function Sn({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 p=0;p<n;p++){let g=Math.pow(o,p);a.push(g),s+=g;}let c=[0],f=0;for(let p=0;p<n;p++)f+=a[p]/s,c.push(f);return p=>{if(p<=0)return 0;if(p>=1)return 1;for(let g=0;g<n;g++)if(p<=c[g+1]){let x=(p-c[g])/(c[g+1]-c[g]);if(g===0)return x*(2-x);let y=1-Math.pow(r,g);return y+(1-y)*(2*x-1)*(2*x-1)}return 1}}function Tn({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 ee={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:En(),bounce:Sn(),elastic:Tn()};function Qe(e,t,n){return Math.min(n,Math.max(t,e))}function ie(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 Gt=(e,t)=>e==="top"?0:e==="center"?.5:e==="bottom"?1:t;function Vt(e,t,n,r){return e+n+t*Gt(r,0)}function _t(e,t){return t*(/^\d+(\.\d+)?%$/.test(e)?parseFloat(e)/100:Gt(e,1))}function z(e,t,n,r){return n===t?0:Qe((e-t)/(n-t)*r,0,1)}function we(e,t,n,r,o){let s=Vt(e.top,e.height,t,r.element)-_t(r.viewport,n),a=Vt(e.top,e.height,t,o.element)-_t(o.viewport,n);return {tStart:s,tEnd:a}}function ot(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 st(e){let t=parseFloat(e.getAttribute("pathLength")??"");if(t>0)return t;let n=e.tagName.toLowerCase();if(n==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),o=parseFloat(e.getAttribute("height")??"0");return 2*(r+o)}if(n==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function Wt(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 it(e,t,n){let r=Wt(e),o=Wt(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 Bt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var ze=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function ae(e,...t){ze&&console.warn(`[svg-scroll-draw] ${e}`,...t);}var xn="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Mn="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",zt=33;function Ln(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Cn(e){let t=[];for(let n=0;n<zt;n++){let r=n/(zt-1);t.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${t.join(",")})`}function at(e){switch(e){case "linear":return "linear";case "ease-in":return xn;case "ease-out":return Mn;case "ease-in-out":return Ln()?Cn(ee["ease-in-out"]):null;default:return null}}var jt=Symbol.for("svg-scroll-draw.registry");function qt(){let e=globalThis;return e[jt]||(e[jt]=new Map)}function ve(e,t){qt().set(e,t);}function Ee(e){qt().delete(e);}function lt(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 Fe(e,t){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t(e,true);let n=t(e,false),r=lt(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 Ue,ut=new Set,ct=new WeakMap,Xe=new Map,Yt=e=>{let t=e.getBoundingClientRect();return t.width+" "+t.height};function An(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 Qt(e,t){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>t();Ue??(Ue=new ResizeObserver(o=>{let s=false;for(let{target:a}of o)ct.get(a)!==Yt(a)&&(s=true),ct.set(a,"");s&&ut.forEach(a=>a());})),ut.add(n);let r=An(e);return [document.body,document.documentElement].forEach(o=>o&&r.add(o)),r.forEach(o=>{ct.has(o)||ct.set(o,Yt(o)),Xe.set(o,(Xe.get(o)??0)+1),Ue.observe(o);}),()=>{ut.delete(n)&&(r.forEach(o=>{let s=(Xe.get(o)??1)-1;if(s)return void Xe.set(o,s);Xe.delete(o),Ue?.unobserve(o);}),ut.size||(Ue?.disconnect(),Ue=void 0));}}function Me(e,t,n,r,o){let s,a=NaN,c,f,p=()=>{s=0,r(),!c&&!s&&(a=n())>0&&a<1&&(s=requestAnimationFrame(p));},g=()=>{!s&&!c&&n()!==a&&(s=requestAnimationFrame(p));},x=H=>{c=H,cancelAnimationFrame(s),s=a=NaN,g();},y=()=>{clearTimeout(f),o(),g();},R=()=>{clearTimeout(f),f=setTimeout(y,150);},j=Qt(t,R),w=H=>{e[H]("scroll",g,{passive:true}),window[H]("resize",R),window[H]("orientationchange",R);};return w("addEventListener"),g(),{hold:x,remeasure:y,off(){x(true),w("removeEventListener"),j(),clearTimeout(f);}}}var Pn=0;function On(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Ut(e,t){let n="";try{n=getComputedStyle(e).getPropertyValue(t).trim();}catch{}return n||(e.getAttribute(t)??"").trim()}var Xt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function kn(e){if(!ze)return;let t=Ut(e,"stroke");if(!t||t==="none"){ae("Element has no stroke \u2014 path will not be visible.",e);return}let n=(e.getAttribute("fill")??"").trim();n&&!Xt.has(n)&&!Xt.has(Ut(e,"fill"))&&ae("Element has a fill \u2014 it may obscure the stroke animation.",e);}function $n(e,t,n){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=n==="x"?window.scrollX:window.scrollY,a=e-s,c=t-s,f=n==="x";r.innerHTML=`
2
+ <div style="position:absolute;${f?`left:${a}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${a}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
+ <div style="position:absolute;${f?`left:${c}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${c}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(r),window.addEventListener("scroll",o,{passive:true}),o(),{el:r,destroy(){window.removeEventListener("scroll",o),r.remove();}}}var Kt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Zt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Rn(e,t,n){if(!ze)return;let r=(e.match(Zt)??[]).join("").toUpperCase(),o=(t.match(Zt)??[]).join("").toUpperCase(),s=(e.match(Kt)??[]).length,a=(t.match(Kt)??[]).length;if(r!==o){ae(`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.`,n);return}s!==a&&ae(`morphTo: coordinate count differs (${s} \u2192 ${a}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,n);}function Hn(e,t,n){let r=(t.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let a=parseFloat(s),c=r[o++]??a;return String(+(a+(c-a)*n).toFixed(4))})}function wt(e,t={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:Fe(t,(n,r)=>Nn(e,n,r))}function Nn(e,t,n){let{preset:r,...o}=t,s=r?{...Bt[r],...o}:o,{selector:a="path, polyline, line, polygon, rect, circle",speed:c=1,fade:f=false,easing:p="linear",trigger:g={},stagger:x=0,direction:y="forward",once:R=false,debug:j=false,axis:w="y",scrollContainer:H,autoReverse:ce=false,delay:N=0,strokeColor:M,strokeWidth:C,fillOpacity:O,waypoints:v,velocityScale:A=false,threshold:D=0,rootMargin:te="0px",repeat:q=0,repeatDelay:F=0,morphTo:I,clip:E,autoplay:Q=false,duration:h=1e3,native:P=true,onProgress:Se,onStart:U,onComplete:_,onEnter:fe,onLeave:Te,onEnterBack:ge,onLeaveBack:me}=s,b=E===true?"left":typeof E=="string"?E:false,S=typeof p=="function"?p:ee[p]??ee.linear,ye=ie(g.start||"top bottom"),Ne=ie(g.end||"bottom top"),X=typeof H=="string"?document.querySelector(H):H??null,Ae=Array.isArray(M)?M[0]:null,Pe=Array.isArray(M)?M[1]:typeof M=="string"?M:null,he=Array.isArray(C)?C[0]:null,De=Array.isArray(C)?C[1]:typeof C=="number"?C:null,Oe=Array.isArray(O)?O[0]:null,be=Array.isArray(O)?O[1]:typeof O=="number"?O:null;function ke(i){let u=i*100;switch(b){case "right":return `inset(0 0 0 ${100-u}%)`;case "top":return `inset(0 0 ${100-u}% 0)`;case "bottom":return `inset(${100-u}% 0 0 0)`;case "center":return `circle(${i*150}% at 50% 50%)`;default:return `inset(0 ${100-u}% 0 0)`}}let l=b?[]:Array.from(e.querySelectorAll(a)),m=[],K=[],k=0,V=0,Y=x,G=0,Ie=0,Z=false,$e=false,Re=0,mt=-1,et=[],tt=-1,pe=false,xe=0,Ve=0,_e,pt=false,dt=null;function Lt(){dt?.destroy(),dt=null;}let Ge=new Set,Ct=NaN,We=true,nt=-1,At=performance.now(),Be=NaN;function rt(){return X?w==="x"?X.scrollLeft:X.scrollTop:w==="x"?window.scrollX:window.scrollY}function Pt(){return X?w==="x"?X.clientWidth:X.clientHeight:w==="x"?window.innerWidth:window.innerHeight}function Ot(){let i=ot(e,X,w);return we(i,i.scroll,Pt(),ye,Ne)}function dn(){let i=V-k,u=l.length-1,d=X??document.documentElement,L=w==="x"?"Width":"Height";if(Y=x,x>0&&u>0&&i>0){let ne=d[`scroll${L}`]-d[`client${L}`]-1-k-i/c;ne>=0&&(Y=Math.min(x,ne/(u*i)));}let J=Math.max(0,u)*Y*i,le=i/Math.min(c,1);G=k+Math.min(0,J,le,J+le),Ie=k+Math.max(0,J,le,J+le);}function kt(){(({tStart:k,tEnd:V}=Ot())),dn(),j&&ze&&(Lt(),dt=$n(k,V,w));}function gt(i,u=Ot){ve(e,{type:"draw",getProgress:()=>i.getProgress(),getTrigger:u});let d=i.destroy;return i.destroy=()=>{d.call(i),Ee(e);},i}function $t(i,u){return R&&!ce?Math.max(mt,S(et[i]=Math.max(et[i]??0,u))):S(u)}function gn(i,u){if(e.style.setProperty("--scroll-draw-progress",String(i)),b){let d=u==="reverse"?1-i:i;e.style.clipPath=ke(d);return}l.forEach((d,L)=>yt(d,L,i,u));}function yt(i,u,d,L){i.style.strokeDashoffset=L==="reverse"?`${m[u]*d}`:`${m[u]*(1-d)}`,f&&(i.style.opacity=L==="reverse"?`${1-d}`:`${d}`),Ae&&Pe?i.style.stroke=it(Ae,Pe,d):Pe&&(i.style.stroke=Pe),he!==null&&De!==null?i.style.strokeWidth=`${he+(De-he)*d}`:De!==null&&(i.style.strokeWidth=`${De}`),Oe!==null&&be!==null?i.style.fillOpacity=`${Oe+(be-Oe)*d}`:be!==null&&(i.style.fillOpacity=`${be}`),I&&i.tagName.toLowerCase()==="path"&&K[u]&&i.setAttribute("d",Hn(K[u],I,d));}function ht(){if(e.style.setProperty("--scroll-draw-progress","0"),b){e.style.clipPath=ke(y==="reverse"?1:0);return}l.forEach((i,u)=>{i.style.strokeDasharray=`${m[u]}`,i.style.strokeDashoffset=y==="reverse"?"0":`${m[u]}`,f?i.style.opacity=y==="reverse"?"1":"0":i.style.opacity="",Ae&&(i.style.stroke=Ae),he!==null&&(i.style.strokeWidth=`${he}`),Oe!==null&&(i.style.fillOpacity=`${Oe}`),I&&i.tagName.toLowerCase()==="path"&&K[u]&&i.setAttribute("d",K[u]);});}function je(i,u){let d=i.getAttribute("d"),L=st(i);if(I&&K[u]){i.setAttribute("d",I);let J=st(i);i.setAttribute("d",K[u]),L=Math.max(st(i),J),i.setAttribute("d",d);}m[u]=L,i.style.strokeDasharray=`${L}`;}if(l.forEach((i,u)=>{kn(i);let d=i.tagName.toLowerCase()==="path";d?K.push(i.getAttribute("d")??""):K.push(""),je(i,u);let L=m[u];I&&(d?Rn(K[K.length-1],I,i):ae(`morphTo only applies to <path> elements \u2014 ignored on <${i.tagName}>.`,i)),n?(i.style.strokeDashoffset=y==="reverse"?`${L}`:"0",f&&(i.style.opacity="1"),Pe&&(i.style.stroke=Pe),De!==null&&(i.style.strokeWidth=`${De}`),be!==null&&(i.style.fillOpacity=`${be}`),I&&i.tagName.toLowerCase()==="path"&&i.setAttribute("d",I)):(i.style.strokeDashoffset=y==="reverse"?"0":`${L}`,f?i.style.opacity=y==="reverse"?"1":"0":i.style.opacity="",Ae&&(i.style.stroke=Ae),he!==null&&(i.style.strokeWidth=`${he}`),Oe!==null&&(i.style.fillOpacity=`${Oe}`));}),n)return b&&(e.style.clipPath=ke(1)),_?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};b&&(e.style.clipPath=ke(y==="reverse"?1:0));let Rt=typeof p=="string"?at(p):null;function yn(){return !(P===false||Q||j&&ze||!On()||!l.length||!Rt||b||w!=="y"||X||c!==1||x!==0||R||ce||A!==false||I||v||q||N>0||Se||U||_||fe||Te||ge||me||M!=null||C!=null||O!=null||(g.start||"top bottom").trim()!=="top bottom"||(g.end||"bottom top").trim()!=="bottom top")}function hn(){let i=++Pn,u=`svg-scroll-draw-${i}`,d=`svg-scroll-draw-host-${i}`,L=`--svg-scroll-draw-${i}`,J=y==="reverse"?"0":"var(--ssd-len)",le=y==="reverse"?"var(--ssd-len)":"0",ne=`stroke-dashoffset:${J};`,W=`stroke-dashoffset:${le};`;f&&(ne+=`opacity:${y==="reverse"?1:0};`,W+=`opacity:${y==="reverse"?0:1};`);let B=document.createElement("style");B.setAttribute("data-svg-scroll-draw",""),B.textContent=`@keyframes ${u}{from{${ne}}to{${W}}}.${d}{view-timeline-name:${L};view-timeline-axis:block;}.${u}{animation-name:${u};animation-duration:auto;animation-timing-function:${Rt};animation-fill-mode:both;animation-timeline:${L};animation-range:cover 0% cover 100%;}`,document.head.appendChild(B),e.classList.add(d);function se(T,$){T.style.setProperty("--ssd-len",String(m[$])),T.style.strokeDasharray=`${m[$]}`,T.style.strokeDashoffset="",T.style.opacity="",T.style.animationPlayState="",T.classList.add(u);}l.forEach(se);let re=false,ue=-1;function de(){if(ue>=0)return ue;let T=e.getBoundingClientRect(),{tStart:$,tEnd:oe}=we({top:T.top,height:T.height},rt(),Pt(),ye,Ne);return S(z(rt(),$,oe,c))}return {destroy(){e.classList.remove(d),l.forEach(T=>{T.classList.remove(u),T.style.removeProperty("--ssd-len"),T.style.animationPlayState="";}),B.remove();},replay(){re=false,ue=-1,l.forEach(se);},pause(){re=true,l.forEach(T=>{T.style.animationPlayState="paused";});},resume(){re&&(re=false,l.forEach(T=>{T.style.animationPlayState="running";}));},seek(T){let $=Math.min(1,Math.max(0,T));ue=$,re=true,l.forEach((oe,He)=>{oe.classList.remove(u),oe.style.strokeDashoffset=y==="reverse"?`${m[He]*$}`:`${m[He]*(1-$)}`,f&&(oe.style.opacity=y==="reverse"?`${1-$}`:`${$}`);});},getProgress(){return de()},refresh(){l.forEach((T,$)=>{je(T,$),T.style.setProperty("--ssd-len",String(m[$]));});}}}if(yn())return gt(hn());function bn(){let i=Math.max(1,h),u=b?i:i*(1+Math.max(0,l.length-1)*x),d=0,L=0,J=false;function le(ue){let de=true,T=Math.min(1,Math.max(0,ue/u));if(b){let $=Math.min(1,Math.max(0,ue/i)),oe=S($);xe=oe,e.style.setProperty("--scroll-draw-progress",String(oe)),e.style.clipPath=ke(y==="reverse"?1-oe:oe),Se?.(oe),$<1&&(de=false);}else {l.forEach((oe,He)=>{let vn=He*x*i,Ft=Math.min(1,Math.max(0,(ue-vn)/i));yt(oe,He,S(Ft),y),Ft<1&&(de=false);});let $=S(T);xe=$,Se?.($),e.style.setProperty("--scroll-draw-progress",String($));}if(v){let $=S(T);for(let oe in v){let He=parseFloat(oe);$>=He&&!Ge.has(He)&&(Ge.add(He),v[oe]?.());}}return de}function ne(ue){if(pe)return;let de=ue-d;$e||($e=true,U?.());let T=le(de);if(T&&!Z){Z=true,le(u),_?.(),Ve<(q==="infinite"?1/0:q??0)&&(Ve++,_e=setTimeout(()=>{d=performance.now(),$e=false,Z=false,Ge.clear(),ht(),Re=requestAnimationFrame(ne);},F));return}T||(Re=requestAnimationFrame(ne));}function W(){cancelAnimationFrame(Re),clearTimeout(_e),d=performance.now(),L=0,pe=false,$e=false,Z=false,Ve=0,J=true,xe=0,Ge.clear(),ht(),Re=requestAnimationFrame(ne);}let B=new IntersectionObserver(ue=>{ue.forEach(de=>{de.isIntersecting&&!(R&&Z)?W():!de.isIntersecting&&!R&&!Z&&(cancelAnimationFrame(Re),clearTimeout(_e),J=false);});},{root:X??null,threshold:D,rootMargin:te}),se;function re(){clearTimeout(se),se=setTimeout(()=>l.forEach(je),150);}return window.addEventListener("resize",re),window.addEventListener("orientationchange",re),N>0?setTimeout(()=>B.observe(e),N):B.observe(e),{destroy(){cancelAnimationFrame(Re),clearTimeout(_e),B.disconnect(),window.removeEventListener("resize",re),window.removeEventListener("orientationchange",re),clearTimeout(se);},replay(){Ve=0,W();},pause(){pe||!J||(pe=true,L=performance.now()-d,cancelAnimationFrame(Re));},resume(){pe&&(pe=false,J=true,d=performance.now()-L,Re=requestAnimationFrame(ne));},seek(ue){let de=Math.min(1,Math.max(0,ue));xe=de,pe=true,L=de*u,d=performance.now()-L,cancelAnimationFrame(Re),le(L);},getProgress(){return xe},refresh(){clearTimeout(se),l.forEach(je);}}}if(Q)return gt(bn());kt();let Ht=()=>z(rt(),G,Ie,1);function Nt(){Z=true,_?.(),Ve<(q==="infinite"?1/0:q)&&(Ve++,_e=setTimeout(()=>{pt=true;},F));}function Dt(){mt=-1,et=[],$e=false,Z=false,pt=false,Ge.clear(),ht(),We=true;}function wn(){let i=performance.now(),u=rt();if(pt&&Ht()%1&&Dt(),!We&&A===false&&u===Ct)return;We=false,Ct=u;let d=c;if(A!==false){let W=i-At,B=W>0?Math.abs(u-(nt<0?u:nt))/W:0;d=c*Math.max(.2,1+B*(typeof A=="number"?A:1)*.04);}nt=u,At=i;let L=ce?tt===-1||u>=tt?"forward":"reverse":y;tt=u;let J=V-k,le=true,ne=J===0?0:(u-k)/J;if(isNaN(Be)||(Be<=0&&ne>0&&fe?.(),Be<1&&ne>=1&&Te?.(),Be>=1&&ne<1&&ge?.(),Be>0&&ne<=0&&me?.()),Be=ne,b){let W=$t(0,z(u,k,V,d));xe=W,e.style.setProperty("--scroll-draw-progress",String(W));let B=L==="reverse"?1-W:W;e.style.clipPath=ke(B),Se?.(W),!$e&&z(u,k,V,d)>0&&($e=true,U?.()),W>=1&&!Z?Nt():W<1&&!R&&(Z=false);return}if(l.forEach((W,B)=>{let se=B*Y*J,re=$t(B,z(u,k+se,V+se,d));yt(W,B,re,L),B===0&&(xe=re,Se?.(re),e.style.setProperty("--scroll-draw-progress",String(re))),re<1&&(le=false);}),v){let W=S(z(u,k,V,d));for(let B in v){let se=parseFloat(B);W>=se&&!Ge.has(se)&&(Ge.add(se),v[B]?.());}}!$e&&z(u,k,V,d)>0&&($e=true,U?.()),le&&!Z?Nt():!le&&!R&&(Z=false);}let qe=Me(X??window,[e],Ht,wn,()=>{let i=m.join();l.forEach(je),kt(),We=true,m.join()!==i&&Ye();}),bt=N>0;function Ye(){qe.hold(pe||bt);}let It;return bt&&(It=setTimeout(()=>{bt=false,Ye();},N)),Ye(),gt({destroy(){clearTimeout(_e),clearTimeout(It),qe.off(),Lt();},replay(){Dt(),tt=-1,nt=-1,Ve=0,pe=false,xe=0,clearTimeout(_e),Ye();},pause(){pe=true,qe.hold(true);},resume(){pe&&(pe=false,We=true,Ye());},seek(i){let u=Math.min(1,Math.max(0,i));xe=u,mt=u,et=[],pe=true,qe.hold(true),gn(u,y),We=true;},getProgress(){return xe},refresh:qe.remeasure},()=>({tStart:k,tEnd:V}))}var Jt=new WeakMap,Dn=0;function en(e){return JSON.stringify(e,(t,n)=>{if(typeof n=="function")return "\u0192";if(typeof Element<"u"&&n instanceof Element){let r=Jt.get(n);return r===void 0&&Jt.set(n,r=++Dn),`el#${r}`}return n})}function tn(e,t){let n={...e};for(let r of Object.keys(n))typeof n[r]=="function"&&(n[r]=(...o)=>t()[r]?.(...o));return n}function In(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function nn(e){let t=[],n=/([\w]+)\(([^)]*)\)/g,r;for(;(r=n.exec(e))!==null;){let o=[],s=[],a=r[2].trim();if(a)for(let c of a.split(/[\s,]+/)){let f=c.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(f?parseFloat(f[1]):0),s.push(f?f[2]:"");}t.push({fn:r[1],nums:o,units:s});}return t}function Fn(e,t,n){let r=nn(e),o=nn(t);return r.length===0||r.length!==o.length?n<1?e:t:r.map((s,a)=>{let c=o[a];return s.fn!==c.fn||s.nums.length!==c.nums.length?n<1?`${s.fn}(${s.nums.map((f,p)=>`${f}${s.units[p]}`).join(", ")})`:`${c.fn}(${c.nums.map((f,p)=>`${f}${c.units[p]}`).join(", ")})`:`${s.fn}(${s.nums.map((f,p)=>`${f+(c.nums[p]-f)*n}${s.units[p]}`).join(", ")})`}).join(" ")}function rn(e,t,n){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*n);let r=String(e),o=String(t);if(In(r))return it(r,o,n);if(r.includes("("))return Fn(r,o,n);let s=r.match(/^([-+]?[\d.]+)(.*)$/),a=o.match(/^([-+]?[\d.]+)(.*)$/);if(s&&a){let c=parseFloat(s[1]),f=parseFloat(a[1]);return `${c+(f-c)*n}${s[2]||a[2]}`}return n<1?r:o}function Vn(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var _n=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Gn=0,on="--scroll-draw-progress";function Wn(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var an={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function vt(e,t){return typeof window>"u"?an:t.respectReducedMotion===false?sn(e,t,false):Fe(t,(n,r)=>sn(e,n,r))}function sn(e,t,n){let{props:r,trigger:o={},easing:s="ease-out",speed:a=1,once:c=false,axis:f="y",scrollContainer:p,native:g=true,velocityScale:x=false,triggerElement:y,onProgress:R,onComplete:j,onEnter:w,onLeave:H,onEnterBack:ce,onLeaveBack:N}=t,M=typeof s=="function"?s:ee[s]??ee["ease-out"],C=ie(o.start||"top bottom"),O=ie(o.end||"bottom top"),v=y??e,A=typeof p=="string"?document.querySelector(p):p??null,D=Object.entries(r).map(([l,m])=>({prop:Vn(l),from:Array.isArray(m)?m[0]:"",to:Array.isArray(m)?m[1]:m}));function te(){let l=window.getComputedStyle(e);for(let m of D)m.from===""&&(m.from=l.getPropertyValue(m.prop).trim()||"0");}function q(){for(let l of D)e.style.setProperty(l.prop,String(l.to));}let F=new Map;for(let l of [...D.map(m=>m.prop),on])F.set(l,e.style.getPropertyValue(l));function I(){for(let[l,m]of F)m?e.style.setProperty(l,m):e.style.removeProperty(l);}if(n)return q(),j?.(),{...an,destroy:I,getProgress:()=>1};te();let E=()=>A?f==="x"?A.scrollLeft:A.scrollTop:f==="x"?window.scrollX:window.scrollY,Q=()=>A?f==="x"?A.clientWidth:A.clientHeight:f==="x"?window.innerWidth:window.innerHeight,h=typeof s=="string"?at(s):null;function P(){if(!g||!Wn()||!h||f!=="y"||A||v!==e||c||a!==1||R||j||w||H||ce||N||x!==false||(o.start||"top bottom").trim()!=="top bottom"||(o.end||"bottom top").trim()!=="bottom top")return false;for(let l of D)if(!_n.has(l.prop))return false;return true}function Se(){let l=`ssd-a-${++Gn}`,m=D.map(G=>`${G.prop}:${G.from}`).join(";"),K=D.map(G=>`${G.prop}:${G.to}`).join(";"),k=document.createElement("style");k.setAttribute("data-ssd-animate",""),k.textContent=`@keyframes ${l}{from{${m}}to{${K}}}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${h};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(k),e.classList.add(l);let V=()=>{let G=e.getBoundingClientRect();return we({top:G.top,height:G.height},E(),Q(),C,O)};ve(e,{type:"animate",getProgress:()=>Y.getProgress(),getTrigger:V});let Y={refresh(){},destroy(){e.classList.remove(l),k.remove(),e.style.animationPlayState="",I(),Ee(e);},replay(){e.classList.remove(l),e.offsetWidth,e.classList.add(l);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(G){let Ie=Math.min(1,Math.max(0,G));e.classList.remove(l);for(let Z of D)e.style.setProperty(Z.prop,rn(Z.from,Z.to,Ie));},getProgress(){let{tStart:G,tEnd:Ie}=V();return M(z(E(),G,Ie,a))}};return Y}if(P())return Se();let U=0,_=0,fe=false,Te=-1,ge=0,me=0,b=false,S=NaN,ye=-1,Ne=0,X=v===e?D:[],Ae=false;function Pe(){let l=e.style,m=X.map(Y=>l.getPropertyValue(Y.prop)),K=l.transition;X.length&&(l.transition="none"),X.forEach(Y=>l.setProperty(Y.prop,F.get(Y.prop)??""));let k=ot(v,A,f);X.forEach((Y,G)=>l.setProperty(Y.prop,m[G])),X.length&&(e.offsetWidth,l.transition=K);let V=we(k,k.scroll,Q(),C,O);Ae&&Math.abs(V.tStart-U)<1&&Math.abs(V.tEnd-_)<1||(Ae=true,U=V.tStart,_=V.tEnd);}function he(l){e.style.setProperty(on,String(l));for(let m of D)e.style.setProperty(m.prop,rn(m.from,m.to,l));R?.(l);}function De(l){if(isNaN(S)){S=l;return}S<=0&&l>0&&w?.(),S<1&&l>=1&&H?.(),S>=1&&l<1&&ce?.(),S>0&&l<=0&&N?.(),S=l;}function Oe(){if(fe)return;let l=performance.now(),m=E(),K=a;if(x!==false){let G=l-Ne,Ie=G>0?Math.abs(m-(ye<0?m:ye))/G:0;K=a*Math.max(.2,1+Ie*(typeof x=="number"?x:1)*.04);}ye=m,Ne=l;let k=_===U?0:(m-U)/(_-U);De(k);let V=z(m,U,_,K),Y=c?Math.max(Te,M(ge=Math.max(ge,V))):M(V);me=Y,he(Y),Y>=1&&!b?(b=true,j?.()):Y<1&&!c&&(b=false);}let be=Me(A??window,[v],()=>z(E(),U,_,Math.min(a,1)),Oe,Pe);Pe(),_===U&&ae("scrollAnimate: zero-length trigger window, so it never animates. In a sticky stage, set triggerElement.",e),ge=z(E(),U,_,a),me=M(ge),he(me),ve(e,{type:"animate",getProgress:()=>me,getTrigger:()=>({tStart:U,tEnd:_})});function ke(){fe=true,be.hold(true);}return {destroy(){fe=true,be.off(),I(),Ee(e);},replay(){Te=-1,ge=0,b=false,me=0,fe=false,he(0),be.hold(false);},pause:ke,resume(){fe&&(fe=false,be.hold(false));},seek(l){let m=Math.min(1,Math.max(0,l));me=m,Te=m,ge=0,ke(),he(m);},getProgress(){return me},refresh:be.remeasure}}var Et={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function St(e,t){if(typeof window>"u")return Et;let n=typeof e=="string"?document.querySelector(e):e;return n?Fe(t,(r,o)=>Bn(n,r,o)):(ae("scrollCounter: element not found:",e),Et)}function Bn(e,t,n){let{from:r=0,to:o,format:s,easing:a="ease-out",trigger:c={},once:f=true,decimals:p,onComplete:g}=t,x=p!==void 0?h=>h.toFixed(p):s??(h=>String(Math.round(h))),y=typeof a=="function"?a:ee[a]??ee["ease-out"],R=ie(c.start||"top 80%"),j=ie(c.end||"top 20%");if(n)return e.textContent=x(o),g?.(),{...Et,getProgress:()=>1};let w=0,H=0,ce=false,N=-1,M=0,C=0,O=false,v=()=>window.scrollY,A=()=>window.innerHeight;function D(){let h=e.getBoundingClientRect(),P=we({top:h.top,height:h.height},v(),A(),R,j);ce&&Math.abs(P.tStart-w)<1&&Math.abs(P.tEnd-H)<1||(ce=true,w=P.tStart,H=P.tEnd);}let te=e.style.getPropertyValue("--scroll-draw-progress");function q(h){e.textContent=x(r+(o-r)*h),e.style.setProperty("--scroll-draw-progress",String(h));}let F=()=>z(v(),w,H,1);function I(){let h=F(),P=f?Math.max(N,y(M=Math.max(M,h))):y(h);C=P,q(P),P>=1&&!O?(O=true,g?.()):P<1&&!f&&(O=false);}D();{M=z(v(),w,H,1);let h=y(M);C=h,q(h);}let E=Me(window,[e],F,I,D);ve(e,{type:"counter",getProgress:()=>C,getTrigger:()=>({tStart:w,tEnd:H})});let Q=()=>E.hold(false);return {destroy(){E.off(),e.style.setProperty("--scroll-draw-progress",te),Ee(e);},replay(){N=-1,M=0,O=false,C=0,q(0),Q();},pause:()=>E.hold(true),resume:Q,seek(h){let P=Math.min(1,Math.max(0,h));C=P,N=P,M=0,E.hold(true),q(P);},getProgress(){return C}}}var ln={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Tt(e,t={}){if(typeof window>"u")return ln;let n=typeof e=="string"?document.querySelector(e):e;if(!n||n.tagName.toLowerCase()!=="video")return ae("scrollVideo: <video> element not found:",e),ln;let r=n,{trigger:o={},easing:s="linear",once:a=false,axis:c="y",preload:f="auto",triggerElement:p,onReady:g,onComplete:x,onProgress:y}=t,R=p??r,j=window.matchMedia("(prefers-reduced-motion: reduce)").matches,w=typeof s=="function"?s:ee[s]??ee.linear,H=ie(o.start||"top top"),ce=ie(o.end||"bottom top");r.pause(),r.hasAttribute("preload")||(r.preload=f);let N=t.from??0,M=t.to,C=0,O=0,v=false,A=-1,D=0,te=0,q=false,F=false,I=()=>c==="x"?window.scrollX:window.scrollY,E=()=>c==="x"?window.innerWidth:window.innerHeight;function Q(){let b=R.getBoundingClientRect(),S=c==="x"?b.left:b.top,ye=c==="x"?b.width:b.height,Ne=we({top:S,height:ye},I(),E(),H,ce);C=Ne.tStart,O=Ne.tEnd,F&&O===C&&ae("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",r);}let h=NaN;function P(b){if(!F)return;let S=M??r.duration??0,ye=N+(S-N)*b;ye!==h&&(h=ye,r.currentTime=ye),r.style.setProperty("--scroll-draw-progress",String(b)),y?.(b);}let Se=()=>z(I(),C,O,1);function U(){if(!F||j)return;let b=Se(),S=a?Math.max(A,w(D=Math.max(D,b))):w(b);te=S,P(S),S>=1&&!q?(q=true,x?.()):S<1&&!a&&(q=false);}let _=Me(window,[R],Se,U,Q),fe=()=>_.hold(v||!F||j);fe();function Te(){if(F=true,M===void 0&&(M=r.duration),j){P(1),g?.();return}Q(),g?.(),v?P(te):fe();}r.readyState>=1?Te():r.addEventListener("loadedmetadata",Te,{once:true}),F||Q();let ge=j?()=>{}:lt(b=>{b&&(ge(),j=true,_.hold(true),P(1));});ve(r,{type:"video",getProgress:()=>te,getTrigger:()=>({tStart:C,tEnd:O})});function me(){v&&(v=false,fe());}return {destroy(){_.off(),r.removeEventListener("loadedmetadata",Te),ge(),Ee(r);},replay(){A=-1,D=0,q=false,te=0,h=NaN,P(0),me();},pause(){v=true,_.hold(true);},resume:me,seek(b){let S=Math.min(1,Math.max(0,b));te=S,A=S,D=0,v=true,_.hold(true),h=NaN,P(S);},getProgress(){return te}}}function un(e,t){let n=document.createElement("span");n.textContent=t,n.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;user-select:none",e.appendChild(n);}function ft(e=""){let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=e,t}function fn(e){let t=e.textContent??"";return e.textContent="",t.split(/(\s+)/).filter(Boolean).map(n=>{let r=e.appendChild(ft(n)),o=/^\s+$/.test(n);return o?r.style.whiteSpace="pre":r.style.display="inline-block",o?null:r}).filter(n=>n!==null)}function zn(e){let t=e.textContent??"";e.textContent="";let n=[],r=null;for(let o of t){let s=ft(o),a=o===" ";a?s.style.whiteSpace="pre":(s.style.display="inline-block",n.push(s)),a||o>"\u0DFF"?r=null:r||(r=e.appendChild(ft()),r.style.cssText="display:inline-block;white-space:nowrap"),(r??e).appendChild(s);}return n}function cn(e){let t=fn(e),n=new Map;for(let s of t){let a=s.offsetTop;n.has(a)||n.set(a,[]),n.get(a).push(s);}let r=[],o=Array.from(n.keys()).sort((s,a)=>s-a);for(let s of o){let a=n.get(s),c=ft();c.style.display="inline-block",a.forEach((f,p)=>{let g=f.nextElementSibling;c.appendChild(f),p<a.length-1&&g&&g.style.whiteSpace==="pre"&&c.appendChild(g);}),r.push(c);}return e.textContent="",r.forEach((s,a)=>{e.appendChild(s),a<r.length-1&&e.appendChild(document.createTextNode(" "));}),r}function jn(e,t,n,r){if(n<=1||r===0)return e;r=Math.min(r,1/n);let o=(n-1)*r,s=t*r,a=s+(1-o);return a<=s?e>=s?1:0:Qe((e-s)/(a-s),0,1)}function qn(e,t){let n=[];if(t?.y!==void 0&&n.push(`translateY(${t.y*(1-e)}px)`),t?.x!==void 0&&n.push(`translateX(${t.x*(1-e)}px)`),t?.rotate!==void 0&&n.push(`rotate(${t.rotate*(1-e)}deg)`),t?.scale!==void 0){let r=t.scale+(1-t.scale)*e;n.push(`scale(${r})`);}return n.join(" ")}var xt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Mt(e,t={}){if(typeof window>"u")return xt;let n=typeof e=="string"?document.querySelector(e):e;if(!n)return ae("scrollText: element not found:",e),xt;let r=n;return Fe(t,(o,s)=>Yn(r,o,s))}function Yn(e,t,n){let{split:r="words",stagger:o=.04,easing:s="ease-out",from:a={opacity:0,y:24},trigger:c={},once:f=true,onComplete:p}=t,g=typeof s=="function"?s:ee[s]??ee["ease-out"],x=ie(c.start||"top 85%"),y=ie(c.end||"top 40%"),R=e.innerHTML,j=e.textContent??"",w;r==="chars"?w=zn(e):r==="lines"?w=cn(e):w=fn(e),un(e,j);let H=w.length;function ce(E,Q){a?.opacity!==void 0&&(E.style.opacity=String(a.opacity+(1-a.opacity)*Q));let h=qn(Q,a);h&&(E.style.transform=h);}function N(E){e.style.setProperty("--scroll-draw-progress",String(E)),w.forEach((Q,h)=>{let P=g(jn(E,h,H,o));ce(Q,P);});}if(n)return N(1),p?.(),{...xt,destroy:()=>{e.innerHTML=R;},getProgress:()=>1};N(0);let M=0,C=0,O=-1,v=0,A=false;function D(){({tStart:M,tEnd:C}=we(e.getBoundingClientRect(),window.scrollY,window.innerHeight,x,y));}let te=()=>z(window.scrollY,M,C,1);function q(){let E=f?O=Math.max(O,te()):te();v=E,N(E),E>=1&&!A?(A=true,p?.()):E<1&&!f&&(A=false);}D();let F=Me(window,[e],te,q,()=>{r==="lines"&&(e.innerHTML=R,w=cn(e),un(e,j),N(v)),D();});ve(e,{type:"text",getProgress:()=>v,getTrigger:()=>({tStart:M,tEnd:C})});let I=()=>F.hold(false);return {destroy(){F.off(),e.innerHTML=R,Ee(e);},replay(){O=-1,A=false,v=0,N(0),I();},pause:()=>F.hold(true),resume:I,seek(E){F.hold(true),N(v=O=Qe(E,0,1));},getProgress(){return v}}}var Je=e=>typeof e=="function"?e():vue.unref(e);function Ce(e,t,n){let r=null,o=t(),s=()=>{r?.destroy(),r=e.value?n(e.value,tn(o,()=>o)):null;};vue.onMounted(s),vue.watch(()=>en(o=t()),s),vue.onUnmounted(()=>{r?.destroy(),r=null;});}function yo(e={}){let t=vue.ref(null);return Ce(t,()=>Je(e),wt),t}var mn={preset:0,selector:0,speed:0,fade:1,easing:0,trigger:0,stagger:0,direction:0,once:1,debug:1,axis:0,scrollContainer:0,autoReverse:1,delay:0,strokeColor:0,strokeWidth:0,fillOpacity:0,clip:2,waypoints:0,velocityScale:3,threshold:0,rootMargin:0,repeat:0,repeatDelay:0,morphTo:0,onProgress:0,onStart:0,onComplete:0,onEnter:0,onLeave:0,onEnterBack:0,onLeaveBack:0,autoplay:1,duration:0,native:1},Zn=[null,Boolean,[Boolean,String],[Boolean,Number]],pn=e=>({type:e,default:void 0}),ho=vue.defineComponent({name:"ScrollDraw",props:Object.fromEntries(Object.entries(mn).map(([e,t])=>[e,t?pn(Zn[t]):null])),setup(e,{slots:t}){let n=vue.ref(null);return Ce(n,()=>{let r={};for(let o in mn){let s=e[o];s!=null&&(r[o]=s);}return r},wt),()=>vue.h("div",{ref:n},t.default?.())}});function bo(e){let t=vue.ref(null);return Ce(t,()=>Je(e),vt),t}var wo=vue.defineComponent({name:"ScrollAnimate",props:{options:{type:Object,required:true}},setup(e,{slots:t}){let n=vue.ref(null);return Ce(n,()=>e.options,vt),()=>vue.h("div",{ref:n},t.default?.())}});function vo(e){let t=vue.ref(null);return Ce(t,()=>Je(e),St),t}var Eo=vue.defineComponent({name:"ScrollCounter",props:{to:{type:Number,required:true},from:{type:Number},format:{type:Function},easing:{type:[String,Function]},trigger:{type:Object},once:pn(Boolean),decimals:{type:Number},onComplete:{type:Function}},setup(e){let t=vue.ref(null);return Ce(t,()=>{let n={to:e.to};return e.from!=null&&(n.from=e.from),e.format!=null&&(n.format=e.format),e.easing!=null&&(n.easing=e.easing),e.trigger!=null&&(n.trigger=e.trigger),e.once!=null&&(n.once=e.once),e.decimals!=null&&(n.decimals=e.decimals),e.onComplete!=null&&(n.onComplete=e.onComplete),n},St),()=>vue.h("span",{ref:t})}});function So(e={}){let t=vue.ref(null);return Ce(t,()=>Je(e),Tt),t}var To=vue.defineComponent({name:"ScrollVideo",props:{src:{type:String,required:true},options:{type:Object},muted:{type:Boolean,default:true},playsInline:{type:Boolean,default:true},class:{type:String}},setup(e){let t=vue.ref(null);return Ce(t,()=>e.options??{},Tt),()=>vue.h("video",{ref:t,src:e.src,muted:e.muted,playsinline:e.playsInline,preload:"auto",class:e.class})}});function xo(e={}){let t=vue.ref(null);return Ce(t,()=>Je(e),Mt),t}var Mo=vue.defineComponent({name:"ScrollText",props:{options:{type:Object},tag:{type:String,default:"p"}},setup(e,{slots:t}){let n=vue.ref(null);return Ce(n,()=>e.options??{},Mt),()=>vue.h(e.tag,{ref:n},t.default?.())}});exports.ScrollAnimate=wo;exports.ScrollCounter=Eo;exports.ScrollDraw=ho;exports.ScrollText=Mo;exports.ScrollVideo=To;exports.useScrollAnimate=bo;exports.useScrollCounter=vo;exports.useScrollDraw=yo;exports.useScrollText=xo;exports.useScrollVideo=So;
@@ -1,8 +1,8 @@
1
1
  import * as vue from 'vue';
2
2
  import { Ref } from 'vue';
3
- import { a as ScrollDrawOptions } from '../types-MswK0erX.mjs';
4
- import { S as ScrollAnimateOptions } from '../engine-o1VSQ1lX.mjs';
5
- import { S as ScrollCounterOptions } from '../index-CdaBYn3A.mjs';
3
+ import { a as ScrollDrawOptions } from '../types-9bcJdVcg.mjs';
4
+ import { S as ScrollAnimateOptions } from '../engine-BLWKCfxC.mjs';
5
+ import { S as ScrollCounterOptions } from '../index-DVjblK_4.mjs';
6
6
  import { ScrollVideoOptions } from '../video/index.mjs';
7
7
  import { ScrollTextOptions } from '../text/index.mjs';
8
8
 
@@ -1,8 +1,8 @@
1
1
  import * as vue from 'vue';
2
2
  import { Ref } from 'vue';
3
- import { a as ScrollDrawOptions } from '../types-MswK0erX.js';
4
- import { S as ScrollAnimateOptions } from '../engine-B7UpB4fT.js';
5
- import { S as ScrollCounterOptions } from '../index-D3o4vT3e.js';
3
+ import { a as ScrollDrawOptions } from '../types-9bcJdVcg.js';
4
+ import { S as ScrollAnimateOptions } from '../engine-6VsjEwzb.js';
5
+ import { S as ScrollCounterOptions } from '../index-BN8yKeQ3.js';
6
6
  import { ScrollVideoOptions } from '../video/index.js';
7
7
  import { ScrollTextOptions } from '../text/index.js';
8
8
 
@@ -1 +1 @@
1
- export{d as ScrollAnimate,f as ScrollCounter,b as ScrollDraw,j as ScrollText,h as ScrollVideo,c as useScrollAnimate,e as useScrollCounter,a as useScrollDraw,i as useScrollText,g as useScrollVideo}from'../chunk-ZNCZYV3Q.mjs';import'../chunk-XSVTHCLO.mjs';import'../chunk-QFSTKVA3.mjs';import'../chunk-NLPSVYFP.mjs';import'../chunk-I73SOXBN.mjs';import'../chunk-OPXWNJBG.mjs';import'../chunk-6TWFLRUB.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-XC5NR2MU.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';
1
+ export{d as ScrollAnimate,f as ScrollCounter,b as ScrollDraw,j as ScrollText,h as ScrollVideo,c as useScrollAnimate,e as useScrollCounter,a as useScrollDraw,i as useScrollText,g as useScrollVideo}from'../chunk-OSGWGHQJ.mjs';import'../chunk-XSVTHCLO.mjs';import'../chunk-NYQJPPMP.mjs';import'../chunk-XNM3VKEK.mjs';import'../chunk-PAGN26EH.mjs';import'../chunk-VJ5ZU55P.mjs';import'../chunk-K6VATIJH.mjs';import'../chunk-V3Z6G5JE.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-XC5NR2MU.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-THPTANES.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';
@@ -1,3 +1,3 @@
1
- 'use strict';function Xt({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),o=Math.max(.01,Math.min(.99,r)),i=Math.sqrt(o),a=0,u=[];for(let d=0;d<n;d++){let b=Math.pow(i,d);u.push(b),a+=b;}let y=[0],M=0;for(let d=0;d<n;d++)M+=u[d]/a,y.push(M);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let b=0;b<n;b++)if(d<=y[b+1]){let L=(d-y[b])/(y[b+1]-y[b]);if(b===0)return L*(2-L);let g=1-Math.pow(o,b);return g+(1-g)*(2*L-1)*(2*L-1)}return 1}}function Yt({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),o=Math.max(.1,r),i=n<=1?o/4:o/(2*Math.PI)*Math.asin(1/n);return a=>a<=0?0:a>=1?1:n*Math.pow(2,-10*a)*Math.sin((a-i)*(2*Math.PI)/o)+1}var xe={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:Xt(),elastic:Yt()};function bt(e,r,n){return Math.min(n,Math.max(r,e))}function je(e="top bottom"){let r=e.trim();if(/^\d+(\.\d+)?%$/.test(r))return {element:"top",viewport:r};let[n="top",o="bottom"]=r.split(/\s+/).filter(Boolean);return {element:n,viewport:o}}function vt(e,r,n,o){switch(o){case "top":return e+n;case "center":return e+n+r/2;case "bottom":return e+n+r;default:return e+n}}function wt(e,r){if(/^\d+(\.\d+)?%$/.test(e))return r*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return r/2;case "bottom":return r;default:return r}}function re(e,r,n,o){return n===r?0:bt((e-r)/(n-r)*o,0,1)}function Xe(e,r,n,o,i){let a=vt(e.top,e.height,r,o.element)-wt(o.viewport,n),u=vt(e.top,e.height,r,i.element)-wt(i.viewport,n);return {tStart:a,tEnd:u}}function Et(e,r,n){let o=e.getBoundingClientRect(),i=n==="x"?o.width:o.height;return r?{top:n==="x"?o.left-r.getBoundingClientRect().left-r.clientLeft+r.scrollLeft:o.top-r.getBoundingClientRect().top-r.clientTop+r.scrollTop,height:i,scroll:0}:{top:n==="x"?o.left:o.top,height:i,scroll:n==="x"?window.scrollX:window.scrollY}}function Oe(e){let r=parseFloat(e.getAttribute("pathLength")??"");if(r>0)return r;let n=e.tagName.toLowerCase();if(n==="rect"){let o=parseFloat(e.getAttribute("width")??"0"),i=parseFloat(e.getAttribute("height")??"0");return 2*(o+i)}if(n==="circle"){let o=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*o}return e.getTotalLength()}function St(e){let r=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(r)return [parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)];let n=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n)return [parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)];let o=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return o?[parseInt(o[1]),parseInt(o[2]),parseInt(o[3])]:null}function xt(e,r,n){let o=St(e),i=St(r);return !o||!i?e:`rgb(${Math.round(o[0]+(i[0]-o[0])*n)},${Math.round(o[1]+(i[1]-o[1])*n)},${Math.round(o[2]+(i[2]-o[2])*n)})`}var Mt={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 me=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function de(e,...r){me&&console.warn(`[svg-scroll-draw] ${e}`,...r);}var Jt="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Kt="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Tt=33;function Zt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function er(e){let r=[];for(let n=0;n<Tt;n++){let o=n/(Tt-1);r.push(String(Math.round(e(o)*1e5)/1e5));}return `linear(${r.join(",")})`}function At(e){switch(e){case "linear":return "linear";case "ease-in":return Jt;case "ease-out":return Kt;case "ease-in-out":return Zt()?er(xe["ease-in-out"]):null;default:return null}}var Lt=Symbol.for("svg-scroll-draw.registry");function kt(){let e=globalThis;return e[Lt]||(e[Lt]=new Map)}function $t(e,r){kt().set(e,r);}function Pt(e){kt().delete(e);}var Me,Ie=new Set,_e=new WeakMap,Te=new Map,Dt=e=>{let r=e.getBoundingClientRect();return r.width+" "+r.height};function tr(e){let r=new Set;for(let n of e)for(;n&&n!==document.body;n=n.parentElement)for(let o=n;o;o=o.previousElementSibling)r.add(o);return r}function Rt(e,r){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>r();Me??(Me=new ResizeObserver(i=>{let a=false;for(let{target:u}of i)_e.get(u)!==Dt(u)&&(a=true),_e.set(u,"");a&&Ie.forEach(u=>u());})),Ie.add(n);let o=tr(e);return [document.body,document.documentElement].forEach(i=>i&&o.add(i)),o.forEach(i=>{_e.has(i)||_e.set(i,Dt(i)),Te.set(i,(Te.get(i)??0)+1),Me.observe(i);}),()=>{Ie.delete(n)&&(o.forEach(i=>{let a=(Te.get(i)??1)-1;if(a)return void Te.set(i,a);Te.delete(i),Me?.unobserve(i);}),Ie.size||(Me?.disconnect(),Me=void 0));}}function Ct(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let r=window.matchMedia("(prefers-reduced-motion: reduce)"),n=i=>e(!!i.matches);if(typeof r.addEventListener=="function")return r.addEventListener("change",n),()=>r.removeEventListener("change",n);let o=r;return o.addListener?.(n),()=>o.removeListener?.(n)}function Ot(e,r){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return r(e,true);let n=r(e,false),o=Ct(a=>{if(!a)return;o();let u=(n.getProgress?.()??0)>=1;n.destroy(),n=r(u?{...e,onComplete:void 0}:e,true);}),i={};for(let a of Object.keys(n))i[a]=(...u)=>n[a]?.(...u);return i.destroy=()=>{o(),n.destroy();},i}var rr=0;function nr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function It(e,r){let n="";try{n=getComputedStyle(e).getPropertyValue(r).trim();}catch{}return n||(e.getAttribute(r)??"").trim()}var _t=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function or(e){if(!me)return;let r=It(e,"stroke");if(!r||r==="none"){de("Element has no stroke \u2014 path will not be visible.",e);return}let n=(e.getAttribute("fill")??"").trim();n&&!_t.has(n)&&!_t.has(It(e,"fill"))&&de("Element has a fill \u2014 it may obscure the stroke animation.",e);}function sr(e,r,n){let o=document.createElement("div");o.setAttribute("data-svg-scroll-draw-debug",""),o.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function i(){let a=n==="x"?window.scrollX:window.scrollY,u=e-a,y=r-a,M=n==="x";o.innerHTML=`
2
- <div style="position:absolute;${M?`left:${u}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${u}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
- <div style="position:absolute;${M?`left:${y}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${y}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(o),window.addEventListener("scroll",i,{passive:true}),i(),{el:o,destroy(){window.removeEventListener("scroll",i),o.remove();}}}var Ft=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Nt=/[MmLlHhVvCcSsQqTtAaZz]/g;function ir(e,r,n){if(!me)return;let o=(e.match(Nt)??[]).join("").toUpperCase(),i=(r.match(Nt)??[]).join("").toUpperCase(),a=(e.match(Ft)??[]).length,u=(r.match(Ft)??[]).length;if(o!==i){de(`morphTo: command sequence differs (${o||"\u2205"} \u2192 ${i||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,n);return}a!==u&&de(`morphTo: coordinate count differs (${a} \u2192 ${u}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,n);}function ar(e,r,n){let o=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),i=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,a=>{let u=parseFloat(a),y=o[i++]??u;return String(+(u+(y-u)*n).toFixed(4))})}function Vt(e,r={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:Ot(r,(n,o)=>lr(e,n,o))}function lr(e,r,n){let{preset:o,...i}=r,a=o?{...Mt[o],...i}:i,{selector:u="path, polyline, line, polygon, rect, circle",speed:y=1,fade:M=false,easing:d="linear",trigger:b={},stagger:L=0,direction:g="forward",once:ne=false,debug:Ye=false,axis:q="y",scrollContainer:Fe,autoReverse:Ne=false,delay:pe=0,strokeColor:X,strokeWidth:Y,fillOpacity:J,waypoints:K,velocityScale:ge=false,threshold:Je=0,rootMargin:Ke="0px",repeat:Z=0,repeatDelay:Ve=0,morphTo:F,clip:ze,autoplay:Ze=false,duration:zt=1e3,native:Ht=true,onProgress:he,onStart:Ae,onComplete:ye,onEnter:et,onLeave:tt,onEnterBack:rt,onLeaveBack:nt}=a,N=ze===true?"left":typeof ze=="string"?ze:false,B=typeof d=="function"?d:xe[d]??xe.linear,ot=je(b.start||"top bottom"),st=je(b.end||"bottom top"),O=typeof Fe=="string"?document.querySelector(Fe):Fe??null,oe=Array.isArray(X)?X[0]:null,se=Array.isArray(X)?X[1]:typeof X=="string"?X:null,ee=Array.isArray(Y)?Y[0]:null,ie=Array.isArray(Y)?Y[1]:typeof Y=="number"?Y:null,te=Array.isArray(J)?J[0]:null,ae=Array.isArray(J)?J[1]:typeof J=="number"?J:null;function le(t){let s=t*100;switch(N){case "right":return `inset(0 0 0 ${100-s}%)`;case "top":return `inset(0 0 ${100-s}% 0)`;case "bottom":return `inset(${100-s}% 0 0 0)`;case "center":return `circle(${t*150}% at 50% 50%)`;default:return `inset(0 ${100-s}% 0 0)`}}let v=N?[]:Array.from(e.querySelectorAll(u)),I=[],V=[],R=0,C=0,Le=L,it=0,T=false,_=false,$=0,ke=false,be=-1,ue=[],$e=-1,w=false,z=0,H=0,Q,He=null;function at(){He?.destroy(),He=null;}let U=new Set,lt=NaN,j=true,Pe=-1,ut=performance.now(),ce=NaN;function ve(){return O?q==="x"?O.scrollLeft:O.scrollTop:q==="x"?window.scrollX:window.scrollY}function ct(){return O?q==="x"?O.clientWidth:O.clientHeight:q==="x"?window.innerWidth:window.innerHeight}function ft(){let t=Et(e,O,q);return Xe(t,t.scroll,ct(),ot,st)}function Wt(){let t=C-R,s=v.length-1,l=O??document.documentElement,f=q==="x"?"Width":"Height";if(Le=L,L>0&&s>0&&t>0){let A=l[`scroll${f}`]-l[`client${f}`]-1-R-t/y;A>=0&&(Le=Math.min(L,A/(s*t)));}it=C+s*Le*t;}function mt(){(({tStart:R,tEnd:C}=ft())),Wt(),Ye&&me&&(at(),He=sr(R,C,q));}function We(t,s=ft){$t(e,{type:"draw",getProgress:()=>t.getProgress(),getTrigger:s});let l=t.destroy;return t.destroy=()=>{l.call(t),Pt(e);},t}function dt(t,s){return ne&&!Ne?Math.max(be,B(ue[t]=Math.max(ue[t]??0,s))):B(s)}function Gt(t,s){if(e.style.setProperty("--scroll-draw-progress",String(t)),N){let l=s==="reverse"?1-t:t;e.style.clipPath=le(l);return}v.forEach((l,f)=>Ge(l,f,t,s));}function Ge(t,s,l,f){t.style.strokeDashoffset=f==="reverse"?`${I[s]*l}`:`${I[s]*(1-l)}`,M&&(t.style.opacity=f==="reverse"?`${1-l}`:`${l}`),oe&&se?t.style.stroke=xt(oe,se,l):se&&(t.style.stroke=se),ee!==null&&ie!==null?t.style.strokeWidth=`${ee+(ie-ee)*l}`:ie!==null&&(t.style.strokeWidth=`${ie}`),te!==null&&ae!==null?t.style.fillOpacity=`${te+(ae-te)*l}`:ae!==null&&(t.style.fillOpacity=`${ae}`),F&&t.tagName.toLowerCase()==="path"&&V[s]&&t.setAttribute("d",ar(V[s],F,l));}function we(){if(e.style.setProperty("--scroll-draw-progress","0"),N){e.style.clipPath=le(g==="reverse"?1:0);return}v.forEach((t,s)=>{t.style.strokeDasharray=`${I[s]}`,t.style.strokeDashoffset=g==="reverse"?"0":`${I[s]}`,M?t.style.opacity=g==="reverse"?"1":"0":t.style.opacity="",oe&&(t.style.stroke=oe),ee!==null&&(t.style.strokeWidth=`${ee}`),te!==null&&(t.style.fillOpacity=`${te}`),F&&t.tagName.toLowerCase()==="path"&&V[s]&&t.setAttribute("d",V[s]);});}function Ee(t,s){let l=t.getAttribute("d"),f=Oe(t);if(F&&V[s]){t.setAttribute("d",F);let A=Oe(t);t.setAttribute("d",V[s]),f=Math.max(Oe(t),A),t.setAttribute("d",l);}I[s]=f,t.style.strokeDasharray=`${f}`;}if(v.forEach((t,s)=>{or(t);let l=t.tagName.toLowerCase()==="path";l?V.push(t.getAttribute("d")??""):V.push(""),Ee(t,s);let f=I[s];F&&(l?ir(V[V.length-1],F,t):de(`morphTo only applies to <path> elements \u2014 ignored on <${t.tagName}>.`,t)),n?(t.style.strokeDashoffset=g==="reverse"?`${f}`:"0",M&&(t.style.opacity="1"),se&&(t.style.stroke=se),ie!==null&&(t.style.strokeWidth=`${ie}`),ae!==null&&(t.style.fillOpacity=`${ae}`),F&&t.tagName.toLowerCase()==="path"&&t.setAttribute("d",F)):(t.style.strokeDashoffset=g==="reverse"?"0":`${f}`,M?t.style.opacity=g==="reverse"?"1":"0":t.style.opacity="",oe&&(t.style.stroke=oe),ee!==null&&(t.style.strokeWidth=`${ee}`),te!==null&&(t.style.fillOpacity=`${te}`));}),n)return N&&(e.style.clipPath=le(1)),ye?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};N&&(e.style.clipPath=le(g==="reverse"?1:0));let pt=typeof d=="string"?At(d):null;function qt(){return !(Ht===false||Ze||Ye&&me||!nr()||!v.length||!pt||N||q!=="y"||O||y!==1||L!==0||ne||Ne||ge!==false||F||K||Z||pe>0||he||Ae||ye||et||tt||rt||nt||X!=null||Y!=null||J!=null||(b.start||"top bottom").trim()!=="top bottom"||(b.end||"bottom top").trim()!=="bottom top")}function Bt(){let t=++rr,s=`svg-scroll-draw-${t}`,l=`svg-scroll-draw-host-${t}`,f=`--svg-scroll-draw-${t}`,A=g==="reverse"?"0":"var(--ssd-len)",W=g==="reverse"?"var(--ssd-len)":"0",P=`stroke-dashoffset:${A};`,p=`stroke-dashoffset:${W};`;M&&(P+=`opacity:${g==="reverse"?1:0};`,p+=`opacity:${g==="reverse"?0:1};`);let h=document.createElement("style");h.setAttribute("data-svg-scroll-draw",""),h.textContent=`@keyframes ${s}{from{${P}}to{${p}}}.${l}{view-timeline-name:${f};view-timeline-axis:block;}.${s}{animation-name:${s};animation-duration:auto;animation-timing-function:${pt};animation-fill-mode:both;animation-timeline:${f};animation-range:cover 0% cover 100%;}`,document.head.appendChild(h),e.classList.add(l);function E(c,m){c.style.setProperty("--ssd-len",String(I[m])),c.style.strokeDasharray=`${I[m]}`,c.style.strokeDashoffset="",c.style.opacity="",c.style.animationPlayState="",c.classList.add(s);}v.forEach(E);let S=false,k=-1;function D(){if(k>=0)return k;let c=e.getBoundingClientRect(),{tStart:m,tEnd:x}=Xe({top:c.top,height:c.height},ve(),ct(),ot,st);return B(re(ve(),m,x,y))}return {destroy(){e.classList.remove(l),v.forEach(c=>{c.classList.remove(s),c.style.removeProperty("--ssd-len"),c.style.animationPlayState="";}),h.remove();},replay(){S=false,k=-1,v.forEach(E);},pause(){S=true,v.forEach(c=>{c.style.animationPlayState="paused";});},resume(){S&&(S=false,v.forEach(c=>{c.style.animationPlayState="running";}));},seek(c){let m=Math.min(1,Math.max(0,c));k=m,S=true,v.forEach((x,G)=>{x.classList.remove(s),x.style.strokeDashoffset=g==="reverse"?`${I[G]*m}`:`${I[G]*(1-m)}`,M&&(x.style.opacity=g==="reverse"?`${1-m}`:`${m}`);});},getProgress(){return D()},refresh(){v.forEach((c,m)=>{Ee(c,m),c.style.setProperty("--ssd-len",String(I[m]));});}}}if(qt())return We(Bt());function Qt(){let t=Math.max(1,zt),s=N?t:t*(1+Math.max(0,v.length-1)*L),l=0,f=0,A=false;function W(k){let D=true,c=Math.min(1,Math.max(0,k/s));if(N){let m=Math.min(1,Math.max(0,k/t)),x=B(m);z=x,e.style.setProperty("--scroll-draw-progress",String(x)),e.style.clipPath=le(g==="reverse"?1-x:x),he?.(x),m<1&&(D=false);}else {v.forEach((x,G)=>{let jt=G*L*t,yt=Math.min(1,Math.max(0,(k-jt)/t));Ge(x,G,B(yt),g),yt<1&&(D=false);});let m=B(c);z=m,he?.(m),e.style.setProperty("--scroll-draw-progress",String(m));}if(K){let m=B(c);for(let x in K){let G=parseFloat(x);m>=G&&!U.has(G)&&(U.add(G),K[x]?.());}}return D}function P(k){if(w)return;let D=k-l;_||(_=true,Ae?.());let c=W(D);if(c&&!T){T=true,W(s),ye?.(),H<(Z==="infinite"?1/0:Z??0)&&(H++,Q=setTimeout(()=>{l=performance.now(),_=false,T=false,U.clear(),we(),$=requestAnimationFrame(P);},Ve));return}c||($=requestAnimationFrame(P));}function p(){cancelAnimationFrame($),clearTimeout(Q),l=performance.now(),f=0,w=false,_=false,T=false,H=0,A=true,z=0,U.clear(),we(),$=requestAnimationFrame(P);}let h=new IntersectionObserver(k=>{k.forEach(D=>{D.isIntersecting&&!(ne&&T)?p():!D.isIntersecting&&!ne&&!T&&(cancelAnimationFrame($),clearTimeout(Q),A=false);});},{root:O??null,threshold:Je,rootMargin:Ke}),E;function S(){clearTimeout(E),E=setTimeout(()=>v.forEach(Ee),150);}return window.addEventListener("resize",S),window.addEventListener("orientationchange",S),pe>0?setTimeout(()=>h.observe(e),pe):h.observe(e),{destroy(){cancelAnimationFrame($),clearTimeout(Q),h.disconnect(),window.removeEventListener("resize",S),window.removeEventListener("orientationchange",S),clearTimeout(E);},replay(){H=0,p();},pause(){w||!A||(w=true,f=performance.now()-l,cancelAnimationFrame($));},resume(){w&&(w=false,A=true,l=performance.now()-f,$=requestAnimationFrame(P));},seek(k){let D=Math.min(1,Math.max(0,k));z=D,w=true,f=D*s,l=performance.now()-f,cancelAnimationFrame($),W(f);},getProgress(){return z},refresh(){clearTimeout(E),v.forEach(Ee);}}}if(Ze)return We(Qt());mt();function gt(){if(w||!fe)return;let t=performance.now(),s=ve();if(!j&&ge===false&&s===lt){Be(s);return}j=false,lt=s;let l=y;if(ge!==false){let p=t-ut,h=p>0?Math.abs(s-(Pe<0?s:Pe))/p:0;l=y*Math.max(.2,1+h*(typeof ge=="number"?ge:1)*.04);}Pe=s,ut=t;let f=Ne?$e===-1||s>=$e?"forward":"reverse":g;$e=s;let A=C-R,W=true,P=A===0?0:(s-R)/A;if(isNaN(ce)||(ce<=0&&P>0?et?.():ce>0&&P<=0&&nt?.(),ce<1&&P>=1?tt?.():ce>=1&&P<1&&rt?.()),ce=P,N){let p=dt(0,re(s,R,C,l));z=p,e.style.setProperty("--scroll-draw-progress",String(p));let h=f==="reverse"?1-p:p;e.style.clipPath=le(h),he?.(p),!_&&re(s,R,C,l)>0&&(_=true,Ae?.()),p>=1&&!T?(T=true,ye?.(),H<(Z==="infinite"?1/0:Z??0)&&(H++,Q=setTimeout(()=>{be=-1,ue=[],_=false,T=false,we();},Ve))):p<1&&!ne&&(T=false),Be(s);return}if(v.forEach((p,h)=>{let E=h*Le*A,S=dt(h,re(s,R+E,C+E,l));Ge(p,h,S,f),h===0&&(z=S,he?.(S),e.style.setProperty("--scroll-draw-progress",String(S))),S<1&&(W=false);}),K){let p=B(re(s,R,C,l));for(let h in K){let E=parseFloat(h);p>=E&&!U.has(E)&&(U.add(E),K[h]?.());}}!_&&re(s,R,C,l)>0&&(_=true,Ae?.()),W&&!T?(T=true,ye?.(),H<(Z==="infinite"?1/0:Z??0)&&(H++,Q=setTimeout(()=>{be=-1,ue=[],_=false,T=false,U.clear(),we(),j=true;},Ve))):!W&&!ne&&(T=false),Be(s);}function qe(t){return t>=C&&t<it}function Be(t){ke||qe(t)?$=requestAnimationFrame(gt):fe=false;}function Qe(){return ke||qe(ve())}let fe=false;function De(){fe||(fe=true,$=requestAnimationFrame(function(){gt();}));}function Re(){fe=false,cancelAnimationFrame($);}let Ue=new IntersectionObserver(t=>{t.forEach(s=>{ke=s.isIntersecting,ke&&!w?(j=true,De()):fe&&!w&&qe(ve())||Re();});},{root:O??null,threshold:Je,rootMargin:Ke});function ht(){v.forEach(Ee),mt(),j=true;}let Ce;function Se(){clearTimeout(Ce),Ce=setTimeout(ht,150);}window.addEventListener("resize",Se),window.addEventListener("orientationchange",Se);let Ut=Rt([e],Se);return pe>0?setTimeout(()=>Ue.observe(e),pe):Ue.observe(e),We({destroy(){cancelAnimationFrame($),clearTimeout(Q),Re(),Ue.disconnect(),Ut(),window.removeEventListener("resize",Se),window.removeEventListener("orientationchange",Se),clearTimeout(Ce),at();},replay(){be=-1,ue=[],$e=-1,Pe=-1,_=false,T=false,H=0,w=false,z=0,U.clear(),clearTimeout(Q),we(),j=true,Qe()&&De();},pause(){w=true,Re();},resume(){w&&(w=false,j=true,Qe()&&De());},seek(t){let s=Math.min(1,Math.max(0,t));z=s,be=s,ue=[],w=true,Re(),Gt(s,g),j=true;},getProgress(){return z},refresh(){clearTimeout(Ce),ht(),Qe()&&!w&&De();}},()=>({tStart:R,tEnd:C}))}if(typeof HTMLElement<"u"&&typeof customElements<"u"&&!customElements.get("scroll-draw")){let e=["speed","easing","stagger","direction","selector","fade","once"];class r extends HTMLElement{constructor(){super(...arguments);this.instance=null;this.key="";}connectedCallback(){this.build();}attributeChangedCallback(){this.instance&&this.build();}build(){let i=JSON.stringify(e.map(L=>this.getAttribute(L)));if(this.instance&&i===this.key)return;this.instance?.destroy(),this.key=i;let a={},u=this.getAttribute("speed"),y=this.getAttribute("easing"),M=this.getAttribute("stagger"),d=this.getAttribute("direction"),b=this.getAttribute("selector");u&&(a.speed=parseFloat(u)),y&&(a.easing=y),M&&(a.stagger=parseFloat(M)),d&&(a.direction=d),b&&(a.selector=b),this.hasAttribute("fade")&&(a.fade=this.getAttribute("fade")!=="false"),this.hasAttribute("once")&&(a.once=this.getAttribute("once")!=="false"),this.instance=Vt(this,a);}disconnectedCallback(){this.instance?.destroy(),this.instance=null;}}r.observedAttributes=e,customElements.define("scroll-draw",r);}
1
+ 'use strict';function jt({tension:e=2.5,friction:r=2.2}={}){return n=>1-Math.cos(n*Math.PI*e)*Math.pow(1-n,r)}function Yt({bounces:e=3,decay:r=.5}={}){let n=Math.max(1,Math.round(e)),o=Math.max(.01,Math.min(.99,r)),i=Math.sqrt(o),a=0,u=[];for(let d=0;d<n;d++){let p=Math.pow(i,d);u.push(p),a+=p;}let m=[0],y=0;for(let d=0;d<n;d++)y+=u[d]/a,m.push(y);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let p=0;p<n;p++)if(d<=m[p+1]){let E=(d-m[p])/(m[p+1]-m[p]);if(p===0)return E*(2-E);let g=1-Math.pow(o,p);return g+(1-g)*(2*E-1)*(2*E-1)}return 1}}function Xt({amplitude:e=1,period:r=.4}={}){let n=Math.max(1,e),o=Math.max(.1,r),i=n<=1?o/4:o/(2*Math.PI)*Math.asin(1/n);return a=>a<=0?0:a>=1?1:n*Math.pow(2,-10*a)*Math.sin((a-i)*(2*Math.PI)/o)+1}var ve={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:jt(),bounce:Yt(),elastic:Xt()};function dt(e,r,n){return Math.min(n,Math.max(r,e))}function We(e="top bottom"){let r=e.trim();if(/^\d+(\.\d+)?%$/.test(r))return {element:"top",viewport:r};let[n="top",o="bottom"]=r.split(/\s+/).filter(Boolean);return {element:n,viewport:o}}var ht=(e,r)=>e==="top"?0:e==="center"?.5:e==="bottom"?1:r;function pt(e,r,n,o){return e+n+r*ht(o,0)}function gt(e,r){return r*(/^\d+(\.\d+)?%$/.test(e)?parseFloat(e)/100:ht(e,1))}function U(e,r,n,o){return n===r?0:dt((e-r)/(n-r)*o,0,1)}function ze(e,r,n,o,i){let a=pt(e.top,e.height,r,o.element)-gt(o.viewport,n),u=pt(e.top,e.height,r,i.element)-gt(i.viewport,n);return {tStart:a,tEnd:u}}function yt(e,r,n){let o=e.getBoundingClientRect(),i=n==="x"?o.width:o.height;return r?{top:n==="x"?o.left-r.getBoundingClientRect().left-r.clientLeft+r.scrollLeft:o.top-r.getBoundingClientRect().top-r.clientTop+r.scrollTop,height:i,scroll:0}:{top:n==="x"?o.left:o.top,height:i,scroll:n==="x"?window.scrollX:window.scrollY}}function Pe(e){let r=parseFloat(e.getAttribute("pathLength")??"");if(r>0)return r;let n=e.tagName.toLowerCase();if(n==="rect"){let o=parseFloat(e.getAttribute("width")??"0"),i=parseFloat(e.getAttribute("height")??"0");return 2*(o+i)}if(n==="circle"){let o=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*o}return e.getTotalLength()}function bt(e){let r=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(r)return [parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)];let n=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(n)return [parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)];let o=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return o?[parseInt(o[1]),parseInt(o[2]),parseInt(o[3])]:null}function vt(e,r,n){let o=bt(e),i=bt(r);return !o||!i?e:`rgb(${Math.round(o[0]+(i[0]-o[0])*n)},${Math.round(o[1]+(i[1]-o[1])*n)},${Math.round(o[2]+(i[2]-o[2])*n)})`}var wt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var ce=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function fe(e,...r){ce&&console.warn(`[svg-scroll-draw] ${e}`,...r);}var Jt="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Kt="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Et=33;function Zt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function er(e){let r=[];for(let n=0;n<Et;n++){let o=n/(Et-1);r.push(String(Math.round(e(o)*1e5)/1e5));}return `linear(${r.join(",")})`}function St(e){switch(e){case "linear":return "linear";case "ease-in":return Jt;case "ease-out":return Kt;case "ease-in-out":return Zt()?er(ve["ease-in-out"]):null;default:return null}}var xt=Symbol.for("svg-scroll-draw.registry");function Mt(){let e=globalThis;return e[xt]||(e[xt]=new Map)}function Tt(e,r){Mt().set(e,r);}function At(e){Mt().delete(e);}function Lt(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let r=window.matchMedia("(prefers-reduced-motion: reduce)"),n=i=>e(!!i.matches);if(typeof r.addEventListener=="function")return r.addEventListener("change",n),()=>r.removeEventListener("change",n);let o=r;return o.addListener?.(n),()=>o.removeListener?.(n)}function kt(e,r){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return r(e,true);let n=r(e,false),o=Lt(a=>{if(!a)return;o();let u=(n.getProgress?.()??0)>=1;n.destroy(),n=r(u?{...e,onComplete:void 0}:e,true);}),i={};for(let a of Object.keys(n))i[a]=(...u)=>n[a]?.(...u);return i.destroy=()=>{o(),n.destroy();},i}var we,De=new Set,Ce=new WeakMap,Ee=new Map,$t=e=>{let r=e.getBoundingClientRect();return r.width+" "+r.height};function tr(e){let r=new Set;for(let n of e)for(;n&&n!==document.body;n=n.parentElement)for(let o=n;o;o=o.previousElementSibling)r.add(o);return r}function Pt(e,r){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>r();we??(we=new ResizeObserver(i=>{let a=false;for(let{target:u}of i)Ce.get(u)!==$t(u)&&(a=true),Ce.set(u,"");a&&De.forEach(u=>u());})),De.add(n);let o=tr(e);return [document.body,document.documentElement].forEach(i=>i&&o.add(i)),o.forEach(i=>{Ce.has(i)||Ce.set(i,$t(i)),Ee.set(i,(Ee.get(i)??0)+1),we.observe(i);}),()=>{De.delete(n)&&(o.forEach(i=>{let a=(Ee.get(i)??1)-1;if(a)return void Ee.set(i,a);Ee.delete(i),we?.unobserve(i);}),De.size||(we?.disconnect(),we=void 0));}}function Dt(e,r,n,o,i){let a,u=NaN,m,y,d=()=>{a=0,o(),!m&&!a&&(u=n())>0&&u<1&&(a=requestAnimationFrame(d));},p=()=>{!a&&!m&&n()!==u&&(a=requestAnimationFrame(d));},E=W=>{m=W,cancelAnimationFrame(a),a=u=NaN,p();},g=()=>{clearTimeout(y),i(),p();},N=()=>{clearTimeout(y),y=setTimeout(g,150);},Se=Pt(r,N),R=W=>{e[W]("scroll",p,{passive:true}),window[W]("resize",N),window[W]("orientationchange",N);};return R("addEventListener"),p(),{hold:E,remeasure:g,off(){E(true),R("removeEventListener"),Se(),clearTimeout(y);}}}var rr=0;function nr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Ct(e,r){let n="";try{n=getComputedStyle(e).getPropertyValue(r).trim();}catch{}return n||(e.getAttribute(r)??"").trim()}var Ot=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function or(e){if(!ce)return;let r=Ct(e,"stroke");if(!r||r==="none"){fe("Element has no stroke \u2014 path will not be visible.",e);return}let n=(e.getAttribute("fill")??"").trim();n&&!Ot.has(n)&&!Ot.has(Ct(e,"fill"))&&fe("Element has a fill \u2014 it may obscure the stroke animation.",e);}function sr(e,r,n){let o=document.createElement("div");o.setAttribute("data-svg-scroll-draw-debug",""),o.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function i(){let a=n==="x"?window.scrollX:window.scrollY,u=e-a,m=r-a,y=n==="x";o.innerHTML=`
2
+ <div style="position:absolute;${y?`left:${u}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${u}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
+ <div style="position:absolute;${y?`left:${m}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${m}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(o),window.addEventListener("scroll",i,{passive:true}),i(),{el:o,destroy(){window.removeEventListener("scroll",i),o.remove();}}}var Rt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,It=/[MmLlHhVvCcSsQqTtAaZz]/g;function ir(e,r,n){if(!ce)return;let o=(e.match(It)??[]).join("").toUpperCase(),i=(r.match(It)??[]).join("").toUpperCase(),a=(e.match(Rt)??[]).length,u=(r.match(Rt)??[]).length;if(o!==i){fe(`morphTo: command sequence differs (${o||"\u2205"} \u2192 ${i||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,n);return}a!==u&&fe(`morphTo: coordinate count differs (${a} \u2192 ${u}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,n);}function ar(e,r,n){let o=(r.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),i=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,a=>{let u=parseFloat(a),m=o[i++]??u;return String(+(u+(m-u)*n).toFixed(4))})}function Nt(e,r={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:kt(r,(n,o)=>lr(e,n,o))}function lr(e,r,n){let{preset:o,...i}=r,a=o?{...wt[o],...i}:i,{selector:u="path, polyline, line, polygon, rect, circle",speed:m=1,fade:y=false,easing:d="linear",trigger:p={},stagger:E=0,direction:g="forward",once:N=false,debug:Se=false,axis:R="y",scrollContainer:W,autoReverse:Oe=false,delay:me=0,strokeColor:j,strokeWidth:Y,fillOpacity:X,waypoints:J,velocityScale:de=false,threshold:Ft=0,rootMargin:_t="0px",repeat:pe=0,repeatDelay:qe=0,morphTo:F,clip:Re,autoplay:Be=false,duration:Vt=1e3,native:Ht=true,onProgress:ge,onStart:xe,onComplete:Me,onEnter:Qe,onLeave:Ue,onEnterBack:je,onLeaveBack:Ye}=a,_=Re===true?"left":typeof Re=="string"?Re:false,Q=typeof d=="function"?d:ve[d]??ve.linear,Xe=We(p.start||"top bottom"),Je=We(p.end||"bottom top"),I=typeof W=="string"?document.querySelector(W):W??null,ne=Array.isArray(j)?j[0]:null,oe=Array.isArray(j)?j[1]:typeof j=="string"?j:null,K=Array.isArray(Y)?Y[0]:null,se=Array.isArray(Y)?Y[1]:typeof Y=="number"?Y:null,Z=Array.isArray(X)?X[0]:null,ie=Array.isArray(X)?X[1]:typeof X=="number"?X:null;function ae(t){let s=t*100;switch(_){case "right":return `inset(0 0 0 ${100-s}%)`;case "top":return `inset(0 0 ${100-s}% 0)`;case "bottom":return `inset(${100-s}% 0 0 0)`;case "center":return `circle(${t*150}% at 50% 50%)`;default:return `inset(0 ${100-s}% 0 0)`}}let w=_?[]:Array.from(e.querySelectorAll(u)),P=[],V=[],L=0,H=0,Te=E,Ke=0,Ze=0,O=false,z=false,q=0,Ie=-1,Ae=[],Le=-1,D=false,G=0,ee=0,te,Ne=false,Fe=null;function et(){Fe?.destroy(),Fe=null;}let re=new Set,tt=NaN,le=true,ke=-1,rt=performance.now(),ue=NaN;function $e(){return I?R==="x"?I.scrollLeft:I.scrollTop:R==="x"?window.scrollX:window.scrollY}function nt(){return I?R==="x"?I.clientWidth:I.clientHeight:R==="x"?window.innerWidth:window.innerHeight}function ot(){let t=yt(e,I,R);return ze(t,t.scroll,nt(),Xe,Je)}function Gt(){let t=H-L,s=w.length-1,l=I??document.documentElement,f=R==="x"?"Width":"Height";if(Te=E,E>0&&s>0&&t>0){let x=l[`scroll${f}`]-l[`client${f}`]-1-L-t/m;x>=0&&(Te=Math.min(E,x/(s*t)));}let S=Math.max(0,s)*Te*t,k=t/Math.min(m,1);Ke=L+Math.min(0,S,k,S+k),Ze=L+Math.max(0,S,k,S+k);}function st(){(({tStart:L,tEnd:H}=ot())),Gt(),Se&&ce&&(et(),Fe=sr(L,H,R));}function _e(t,s=ot){Tt(e,{type:"draw",getProgress:()=>t.getProgress(),getTrigger:s});let l=t.destroy;return t.destroy=()=>{l.call(t),At(e);},t}function it(t,s){return N&&!Oe?Math.max(Ie,Q(Ae[t]=Math.max(Ae[t]??0,s))):Q(s)}function Wt(t,s){if(e.style.setProperty("--scroll-draw-progress",String(t)),_){let l=s==="reverse"?1-t:t;e.style.clipPath=ae(l);return}w.forEach((l,f)=>Ve(l,f,t,s));}function Ve(t,s,l,f){t.style.strokeDashoffset=f==="reverse"?`${P[s]*l}`:`${P[s]*(1-l)}`,y&&(t.style.opacity=f==="reverse"?`${1-l}`:`${l}`),ne&&oe?t.style.stroke=vt(ne,oe,l):oe&&(t.style.stroke=oe),K!==null&&se!==null?t.style.strokeWidth=`${K+(se-K)*l}`:se!==null&&(t.style.strokeWidth=`${se}`),Z!==null&&ie!==null?t.style.fillOpacity=`${Z+(ie-Z)*l}`:ie!==null&&(t.style.fillOpacity=`${ie}`),F&&t.tagName.toLowerCase()==="path"&&V[s]&&t.setAttribute("d",ar(V[s],F,l));}function He(){if(e.style.setProperty("--scroll-draw-progress","0"),_){e.style.clipPath=ae(g==="reverse"?1:0);return}w.forEach((t,s)=>{t.style.strokeDasharray=`${P[s]}`,t.style.strokeDashoffset=g==="reverse"?"0":`${P[s]}`,y?t.style.opacity=g==="reverse"?"1":"0":t.style.opacity="",ne&&(t.style.stroke=ne),K!==null&&(t.style.strokeWidth=`${K}`),Z!==null&&(t.style.fillOpacity=`${Z}`),F&&t.tagName.toLowerCase()==="path"&&V[s]&&t.setAttribute("d",V[s]);});}function he(t,s){let l=t.getAttribute("d"),f=Pe(t);if(F&&V[s]){t.setAttribute("d",F);let S=Pe(t);t.setAttribute("d",V[s]),f=Math.max(Pe(t),S),t.setAttribute("d",l);}P[s]=f,t.style.strokeDasharray=`${f}`;}if(w.forEach((t,s)=>{or(t);let l=t.tagName.toLowerCase()==="path";l?V.push(t.getAttribute("d")??""):V.push(""),he(t,s);let f=P[s];F&&(l?ir(V[V.length-1],F,t):fe(`morphTo only applies to <path> elements \u2014 ignored on <${t.tagName}>.`,t)),n?(t.style.strokeDashoffset=g==="reverse"?`${f}`:"0",y&&(t.style.opacity="1"),oe&&(t.style.stroke=oe),se!==null&&(t.style.strokeWidth=`${se}`),ie!==null&&(t.style.fillOpacity=`${ie}`),F&&t.tagName.toLowerCase()==="path"&&t.setAttribute("d",F)):(t.style.strokeDashoffset=g==="reverse"?"0":`${f}`,y?t.style.opacity=g==="reverse"?"1":"0":t.style.opacity="",ne&&(t.style.stroke=ne),K!==null&&(t.style.strokeWidth=`${K}`),Z!==null&&(t.style.fillOpacity=`${Z}`));}),n)return _&&(e.style.clipPath=ae(1)),Me?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};_&&(e.style.clipPath=ae(g==="reverse"?1:0));let at=typeof d=="string"?St(d):null;function zt(){return !(Ht===false||Be||Se&&ce||!nr()||!w.length||!at||_||R!=="y"||I||m!==1||E!==0||N||Oe||de!==false||F||J||pe||me>0||ge||xe||Me||Qe||Ue||je||Ye||j!=null||Y!=null||X!=null||(p.start||"top bottom").trim()!=="top bottom"||(p.end||"bottom top").trim()!=="bottom top")}function qt(){let t=++rr,s=`svg-scroll-draw-${t}`,l=`svg-scroll-draw-host-${t}`,f=`--svg-scroll-draw-${t}`,S=g==="reverse"?"0":"var(--ssd-len)",k=g==="reverse"?"var(--ssd-len)":"0",x=`stroke-dashoffset:${S};`,b=`stroke-dashoffset:${k};`;y&&(x+=`opacity:${g==="reverse"?1:0};`,b+=`opacity:${g==="reverse"?0:1};`);let v=document.createElement("style");v.setAttribute("data-svg-scroll-draw",""),v.textContent=`@keyframes ${s}{from{${x}}to{${b}}}.${l}{view-timeline-name:${f};view-timeline-axis:block;}.${s}{animation-name:${s};animation-duration:auto;animation-timing-function:${at};animation-fill-mode:both;animation-timeline:${f};animation-range:cover 0% cover 100%;}`,document.head.appendChild(v),e.classList.add(l);function A(c,h){c.style.setProperty("--ssd-len",String(P[h])),c.style.strokeDasharray=`${P[h]}`,c.style.strokeDashoffset="",c.style.opacity="",c.style.animationPlayState="",c.classList.add(s);}w.forEach(A);let M=false,$=-1;function C(){if($>=0)return $;let c=e.getBoundingClientRect(),{tStart:h,tEnd:T}=ze({top:c.top,height:c.height},$e(),nt(),Xe,Je);return Q(U($e(),h,T,m))}return {destroy(){e.classList.remove(l),w.forEach(c=>{c.classList.remove(s),c.style.removeProperty("--ssd-len"),c.style.animationPlayState="";}),v.remove();},replay(){M=false,$=-1,w.forEach(A);},pause(){M=true,w.forEach(c=>{c.style.animationPlayState="paused";});},resume(){M&&(M=false,w.forEach(c=>{c.style.animationPlayState="running";}));},seek(c){let h=Math.min(1,Math.max(0,c));$=h,M=true,w.forEach((T,B)=>{T.classList.remove(s),T.style.strokeDashoffset=g==="reverse"?`${P[B]*h}`:`${P[B]*(1-h)}`,y&&(T.style.opacity=g==="reverse"?`${1-h}`:`${h}`);});},getProgress(){return C()},refresh(){w.forEach((c,h)=>{he(c,h),c.style.setProperty("--ssd-len",String(P[h]));});}}}if(zt())return _e(qt());function Bt(){let t=Math.max(1,Vt),s=_?t:t*(1+Math.max(0,w.length-1)*E),l=0,f=0,S=false;function k($){let C=true,c=Math.min(1,Math.max(0,$/s));if(_){let h=Math.min(1,Math.max(0,$/t)),T=Q(h);G=T,e.style.setProperty("--scroll-draw-progress",String(T)),e.style.clipPath=ae(g==="reverse"?1-T:T),ge?.(T),h<1&&(C=false);}else {w.forEach((T,B)=>{let Ut=B*E*t,mt=Math.min(1,Math.max(0,($-Ut)/t));Ve(T,B,Q(mt),g),mt<1&&(C=false);});let h=Q(c);G=h,ge?.(h),e.style.setProperty("--scroll-draw-progress",String(h));}if(J){let h=Q(c);for(let T in J){let B=parseFloat(T);h>=B&&!re.has(B)&&(re.add(B),J[T]?.());}}return C}function x($){if(D)return;let C=$-l;z||(z=true,xe?.());let c=k(C);if(c&&!O){O=true,k(s),Me?.(),ee<(pe==="infinite"?1/0:pe??0)&&(ee++,te=setTimeout(()=>{l=performance.now(),z=false,O=false,re.clear(),He(),q=requestAnimationFrame(x);},qe));return}c||(q=requestAnimationFrame(x));}function b(){cancelAnimationFrame(q),clearTimeout(te),l=performance.now(),f=0,D=false,z=false,O=false,ee=0,S=true,G=0,re.clear(),He(),q=requestAnimationFrame(x);}let v=new IntersectionObserver($=>{$.forEach(C=>{C.isIntersecting&&!(N&&O)?b():!C.isIntersecting&&!N&&!O&&(cancelAnimationFrame(q),clearTimeout(te),S=false);});},{root:I??null,threshold:Ft,rootMargin:_t}),A;function M(){clearTimeout(A),A=setTimeout(()=>w.forEach(he),150);}return window.addEventListener("resize",M),window.addEventListener("orientationchange",M),me>0?setTimeout(()=>v.observe(e),me):v.observe(e),{destroy(){cancelAnimationFrame(q),clearTimeout(te),v.disconnect(),window.removeEventListener("resize",M),window.removeEventListener("orientationchange",M),clearTimeout(A);},replay(){ee=0,b();},pause(){D||!S||(D=true,f=performance.now()-l,cancelAnimationFrame(q));},resume(){D&&(D=false,S=true,l=performance.now()-f,q=requestAnimationFrame(x));},seek($){let C=Math.min(1,Math.max(0,$));G=C,D=true,f=C*s,l=performance.now()-f,cancelAnimationFrame(q),k(f);},getProgress(){return G},refresh(){clearTimeout(A),w.forEach(he);}}}if(Be)return _e(Bt());st();let lt=()=>U($e(),Ke,Ze,1);function ut(){O=true,Me?.(),ee<(pe==="infinite"?1/0:pe)&&(ee++,te=setTimeout(()=>{Ne=true;},qe));}function ct(){Ie=-1,Ae=[],z=false,O=false,Ne=false,re.clear(),He(),le=true;}function Qt(){let t=performance.now(),s=$e();if(Ne&&lt()%1&&ct(),!le&&de===false&&s===tt)return;le=false,tt=s;let l=m;if(de!==false){let b=t-rt,v=b>0?Math.abs(s-(ke<0?s:ke))/b:0;l=m*Math.max(.2,1+v*(typeof de=="number"?de:1)*.04);}ke=s,rt=t;let f=Oe?Le===-1||s>=Le?"forward":"reverse":g;Le=s;let S=H-L,k=true,x=S===0?0:(s-L)/S;if(isNaN(ue)||(ue<=0&&x>0&&Qe?.(),ue<1&&x>=1&&Ue?.(),ue>=1&&x<1&&je?.(),ue>0&&x<=0&&Ye?.()),ue=x,_){let b=it(0,U(s,L,H,l));G=b,e.style.setProperty("--scroll-draw-progress",String(b));let v=f==="reverse"?1-b:b;e.style.clipPath=ae(v),ge?.(b),!z&&U(s,L,H,l)>0&&(z=true,xe?.()),b>=1&&!O?ut():b<1&&!N&&(O=false);return}if(w.forEach((b,v)=>{let A=v*Te*S,M=it(v,U(s,L+A,H+A,l));Ve(b,v,M,f),v===0&&(G=M,ge?.(M),e.style.setProperty("--scroll-draw-progress",String(M))),M<1&&(k=false);}),J){let b=Q(U(s,L,H,l));for(let v in J){let A=parseFloat(v);b>=A&&!re.has(A)&&(re.add(A),J[v]?.());}}!z&&U(s,L,H,l)>0&&(z=true,xe?.()),k&&!O?ut():!k&&!N&&(O=false);}let ye=Dt(I??window,[e],lt,Qt,()=>{let t=P.join();w.forEach(he),st(),le=true,P.join()!==t&&be();}),Ge=me>0;function be(){ye.hold(D||Ge);}let ft;return Ge&&(ft=setTimeout(()=>{Ge=false,be();},me)),be(),_e({destroy(){clearTimeout(te),clearTimeout(ft),ye.off(),et();},replay(){ct(),Le=-1,ke=-1,ee=0,D=false,G=0,clearTimeout(te),be();},pause(){D=true,ye.hold(true);},resume(){D&&(D=false,le=true,be());},seek(t){let s=Math.min(1,Math.max(0,t));G=s,Ie=s,Ae=[],D=true,ye.hold(true),Wt(s,g),le=true;},getProgress(){return G},refresh:ye.remeasure},()=>({tStart:L,tEnd:H}))}if(typeof HTMLElement<"u"&&typeof customElements<"u"&&!customElements.get("scroll-draw")){let e=["speed","easing","stagger","direction","selector","fade","once"];class r extends HTMLElement{constructor(){super(...arguments);this.instance=null;this.key="";}connectedCallback(){this.build();}attributeChangedCallback(){this.instance&&this.build();}build(){let i=JSON.stringify(e.map(E=>this.getAttribute(E)));if(this.instance&&i===this.key)return;this.instance?.destroy(),this.key=i;let a={},u=this.getAttribute("speed"),m=this.getAttribute("easing"),y=this.getAttribute("stagger"),d=this.getAttribute("direction"),p=this.getAttribute("selector");u&&(a.speed=parseFloat(u)),m&&(a.easing=m),y&&(a.stagger=parseFloat(y)),d&&(a.direction=d),p&&(a.selector=p),this.hasAttribute("fade")&&(a.fade=this.getAttribute("fade")!=="false"),this.hasAttribute("once")&&(a.once=this.getAttribute("once")!=="false"),this.instance=Nt(this,a);}disconnectedCallback(){this.instance?.destroy(),this.instance=null;}}r.observedAttributes=e,customElements.define("scroll-draw",r);}
@@ -1 +1 @@
1
- import {b}from'../chunk-6TWFLRUB.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-XC5NR2MU.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';if(typeof HTMLElement<"u"&&typeof customElements<"u"&&!customElements.get("scroll-draw")){let e=["speed","easing","stagger","direction","selector","fade","once"];class s extends HTMLElement{constructor(){super(...arguments);this.instance=null;this.key="";}connectedCallback(){this.build();}attributeChangedCallback(){this.instance&&this.build();}build(){let i=JSON.stringify(e.map(d=>this.getAttribute(d)));if(this.instance&&i===this.key)return;this.instance?.destroy(),this.key=i;let t={},n=this.getAttribute("speed"),r=this.getAttribute("easing"),a=this.getAttribute("stagger"),c=this.getAttribute("direction"),o=this.getAttribute("selector");n&&(t.speed=parseFloat(n)),r&&(t.easing=r),a&&(t.stagger=parseFloat(a)),c&&(t.direction=c),o&&(t.selector=o),this.hasAttribute("fade")&&(t.fade=this.getAttribute("fade")!=="false"),this.hasAttribute("once")&&(t.once=this.getAttribute("once")!=="false"),this.instance=b(this,t);}disconnectedCallback(){this.instance?.destroy(),this.instance=null;}}s.observedAttributes=e,customElements.define("scroll-draw",s);}
1
+ import {b}from'../chunk-K6VATIJH.mjs';import'../chunk-V3Z6G5JE.mjs';import'../chunk-UPWWULKI.mjs';import'../chunk-XC5NR2MU.mjs';import'../chunk-2PYLM3E7.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-THPTANES.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';if(typeof HTMLElement<"u"&&typeof customElements<"u"&&!customElements.get("scroll-draw")){let e=["speed","easing","stagger","direction","selector","fade","once"];class s extends HTMLElement{constructor(){super(...arguments);this.instance=null;this.key="";}connectedCallback(){this.build();}attributeChangedCallback(){this.instance&&this.build();}build(){let i=JSON.stringify(e.map(d=>this.getAttribute(d)));if(this.instance&&i===this.key)return;this.instance?.destroy(),this.key=i;let t={},n=this.getAttribute("speed"),r=this.getAttribute("easing"),a=this.getAttribute("stagger"),c=this.getAttribute("direction"),o=this.getAttribute("selector");n&&(t.speed=parseFloat(n)),r&&(t.easing=r),a&&(t.stagger=parseFloat(a)),c&&(t.direction=c),o&&(t.selector=o),this.hasAttribute("fade")&&(t.fade=this.getAttribute("fade")!=="false"),this.hasAttribute("once")&&(t.once=this.getAttribute("once")!=="false"),this.instance=b(this,t);}disconnectedCallback(){this.instance?.destroy(),this.instance=null;}}s.observedAttributes=e,customElements.define("scroll-draw",s);}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svg-scroll-draw",
3
- "version": "2.23.4",
3
+ "version": "2.23.5",
4
4
  "description": "Scroll-driven animation for the web — draw SVG paths, reveal elements, pin sections, scrub video. Zero dependencies, native CSS fast path, works with React, Vue, Svelte, Solid, Angular, Astro and vanilla JS",
5
5
  "keywords": [
6
6
  "svg",
@@ -1,3 +0,0 @@
1
- import {b as b$1,a as a$6}from'./chunk-OJFWQ6CU.mjs';import {a as a$2}from'./chunk-UPWWULKI.mjs';import {a as a$5}from'./chunk-XC5NR2MU.mjs';import {a}from'./chunk-2PYLM3E7.mjs';import {a as a$1,d as d$1,c,b as b$3}from'./chunk-A4JCC3QQ.mjs';import {d}from'./chunk-DM6EDKWH.mjs';import {a as a$4,b as b$2}from'./chunk-BCV4RAIX.mjs';import {b,a as a$3}from'./chunk-LFSU6LR3.mjs';var Et={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var Nt=0;function Ht(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function St(r,m){let f="";try{f=getComputedStyle(r).getPropertyValue(m).trim();}catch{}return f||(r.getAttribute(m)??"").trim()}var Tt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function It(r){if(!a$3)return;let m=St(r,"stroke");if(!m||m==="none"){b("Element has no stroke \u2014 path will not be visible.",r);return}let f=(r.getAttribute("fill")??"").trim();f&&!Tt.has(f)&&!Tt.has(St(r,"fill"))&&b("Element has a fill \u2014 it may obscure the stroke animation.",r);}function Rt(r,m,f){let p=document.createElement("div");p.setAttribute("data-svg-scroll-draw-debug",""),p.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 x(){let H=f==="x"?window.scrollX:window.scrollY,k=r-H,D=m-H,I=f==="x";p.innerHTML=`
2
- <div style="position:absolute;${I?`left:${k}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${k}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
- <div style="position:absolute;${I?`left:${D}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${D}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(p),window.addEventListener("scroll",x,{passive:true}),x(),{el:p,destroy(){window.removeEventListener("scroll",x),p.remove();}}}var $t=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,At=/[MmLlHhVvCcSsQqTtAaZz]/g;function zt(r,m,f){if(!a$3)return;let p=(r.match(At)??[]).join("").toUpperCase(),x=(m.match(At)??[]).join("").toUpperCase(),H=(r.match($t)??[]).length,k=(m.match($t)??[]).length;if(p!==x){b(`morphTo: command sequence differs (${p||"\u2205"} \u2192 ${x||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,f);return}H!==k&&b(`morphTo: coordinate count differs (${H} \u2192 ${k}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,f);}function Vt(r,m,f){let p=(m.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),x=0;return r.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,H=>{let k=parseFloat(H),D=p[x++]??k;return String(+(k+(D-k)*f).toFixed(4))})}function er(r,m={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:a(m,(f,p)=>Wt(r,f,p))}function Wt(r,m,f){let{preset:p,...x}=m,H=p?{...Et[p],...x}:x,{selector:k="path, polyline, line, polygon, rect, circle",speed:D=1,fade:I=false,easing:ue="linear",trigger:Se={},stagger:U=0,direction:u="forward",once:te=false,debug:Ue=false,axis:W="y",scrollContainer:Ce,autoReverse:Oe=false,delay:me=0,strokeColor:j,strokeWidth:X,fillOpacity:Y,waypoints:Q,velocityScale:pe=false,threshold:je=0,rootMargin:Xe="0px",repeat:Z=0,repeatDelay:Fe=0,morphTo:C,clip:Ne,autoplay:Ye=false,duration:xt=1e3,native:kt=true,onProgress:de,onStart:Te,onComplete:ye,onEnter:Qe,onLeave:Ze,onEnterBack:Je,onLeaveBack:Ke}=H,O=Ne===true?"left":typeof Ne=="string"?Ne:false,q=typeof ue=="function"?ue:d[ue]??d.linear,et=a$1(Se.start||"top bottom"),tt=a$1(Se.end||"bottom top"),P=typeof Ce=="string"?document.querySelector(Ce):Ce??null,re=Array.isArray(j)?j[0]:null,se=Array.isArray(j)?j[1]:typeof j=="string"?j:null,J=Array.isArray(X)?X[0]:null,ne=Array.isArray(X)?X[1]:typeof X=="number"?X:null,K=Array.isArray(Y)?Y[0]:null,oe=Array.isArray(Y)?Y[1]:typeof Y=="number"?Y:null;function ie(e){let t=e*100;switch(O){case "right":return `inset(0 0 0 ${100-t}%)`;case "top":return `inset(0 0 ${100-t}% 0)`;case "bottom":return `inset(${100-t}% 0 0 0)`;case "center":return `circle(${e*150}% at 50% 50%)`;default:return `inset(0 ${100-t}% 0 0)`}}let c$1=O?[]:Array.from(r.querySelectorAll(k)),L=[],F=[],$=0,A=0,$e=U,rt=0,v=false,M=false,E=0,Ae=false,ge=-1,ae=[],xe=-1,d$2=false,N=0,R=0,G,He=null;function st(){He?.destroy(),He=null;}let B=new Set,nt=NaN,_=true,ke=-1,ot=performance.now(),le=NaN;function he(){return P?W==="x"?P.scrollLeft:P.scrollTop:W==="x"?window.scrollX:window.scrollY}function it(){return P?W==="x"?P.clientWidth:P.clientHeight:W==="x"?window.innerWidth:window.innerHeight}function at(){let e=a$2(r,P,W);return c(e,e.scroll,it(),et,tt)}function Pt(){let e=A-$,t=c$1.length-1,s=P??document.documentElement,o=W==="x"?"Width":"Height";if($e=U,U>0&&t>0&&e>0){let w=s[`scroll${o}`]-s[`client${o}`]-1-$-e/D;w>=0&&($e=Math.min(U,w/(t*e)));}rt=A+t*$e*e;}function lt(){(({tStart:$,tEnd:A}=at())),Pt(),Ue&&a$3&&(st(),He=Rt($,A,W));}function Ie(e,t=at){a$4(r,{type:"draw",getProgress:()=>e.getProgress(),getTrigger:t});let s=e.destroy;return e.destroy=()=>{s.call(e),b$2(r);},e}function ft(e,t){return te&&!Oe?Math.max(ge,q(ae[e]=Math.max(ae[e]??0,t))):q(t)}function Lt(e,t){if(r.style.setProperty("--scroll-draw-progress",String(e)),O){let s=t==="reverse"?1-e:e;r.style.clipPath=ie(s);return}c$1.forEach((s,o)=>Re(s,o,e,t));}function Re(e,t,s,o){e.style.strokeDashoffset=o==="reverse"?`${L[t]*s}`:`${L[t]*(1-s)}`,I&&(e.style.opacity=o==="reverse"?`${1-s}`:`${s}`),re&&se?e.style.stroke=a$6(re,se,s):se&&(e.style.stroke=se),J!==null&&ne!==null?e.style.strokeWidth=`${J+(ne-J)*s}`:ne!==null&&(e.style.strokeWidth=`${ne}`),K!==null&&oe!==null?e.style.fillOpacity=`${K+(oe-K)*s}`:oe!==null&&(e.style.fillOpacity=`${oe}`),C&&e.tagName.toLowerCase()==="path"&&F[t]&&e.setAttribute("d",Vt(F[t],C,s));}function ve(){if(r.style.setProperty("--scroll-draw-progress","0"),O){r.style.clipPath=ie(u==="reverse"?1:0);return}c$1.forEach((e,t)=>{e.style.strokeDasharray=`${L[t]}`,e.style.strokeDashoffset=u==="reverse"?"0":`${L[t]}`,I?e.style.opacity=u==="reverse"?"1":"0":e.style.opacity="",re&&(e.style.stroke=re),J!==null&&(e.style.strokeWidth=`${J}`),K!==null&&(e.style.fillOpacity=`${K}`),C&&e.tagName.toLowerCase()==="path"&&F[t]&&e.setAttribute("d",F[t]);});}function we(e,t){let s=e.getAttribute("d"),o=a$5(e);if(C&&F[t]){e.setAttribute("d",C);let w=a$5(e);e.setAttribute("d",F[t]),o=Math.max(a$5(e),w),e.setAttribute("d",s);}L[t]=o,e.style.strokeDasharray=`${o}`;}if(c$1.forEach((e,t)=>{It(e);let s=e.tagName.toLowerCase()==="path";s?F.push(e.getAttribute("d")??""):F.push(""),we(e,t);let o=L[t];C&&(s?zt(F[F.length-1],C,e):b(`morphTo only applies to <path> elements \u2014 ignored on <${e.tagName}>.`,e)),f?(e.style.strokeDashoffset=u==="reverse"?`${o}`:"0",I&&(e.style.opacity="1"),se&&(e.style.stroke=se),ne!==null&&(e.style.strokeWidth=`${ne}`),oe!==null&&(e.style.fillOpacity=`${oe}`),C&&e.tagName.toLowerCase()==="path"&&e.setAttribute("d",C)):(e.style.strokeDashoffset=u==="reverse"?"0":`${o}`,I?e.style.opacity=u==="reverse"?"1":"0":e.style.opacity="",re&&(e.style.stroke=re),J!==null&&(e.style.strokeWidth=`${J}`),K!==null&&(e.style.fillOpacity=`${K}`));}),f)return O&&(r.style.clipPath=ie(1)),ye?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};O&&(r.style.clipPath=ie(u==="reverse"?1:0));let ct=typeof ue=="string"?b$1(ue):null;function Mt(){return !(kt===false||Ye||Ue&&a$3||!Ht()||!c$1.length||!ct||O||W!=="y"||P||D!==1||U!==0||te||Oe||pe!==false||C||Q||Z||me>0||de||Te||ye||Qe||Ze||Je||Ke||j!=null||X!=null||Y!=null||(Se.start||"top bottom").trim()!=="top bottom"||(Se.end||"bottom top").trim()!=="bottom top")}function Dt(){let e=++Nt,t=`svg-scroll-draw-${e}`,s=`svg-scroll-draw-host-${e}`,o=`--svg-scroll-draw-${e}`,w=u==="reverse"?"0":"var(--ssd-len)",z=u==="reverse"?"var(--ssd-len)":"0",S=`stroke-dashoffset:${w};`,a=`stroke-dashoffset:${z};`;I&&(S+=`opacity:${u==="reverse"?1:0};`,a+=`opacity:${u==="reverse"?0:1};`);let l=document.createElement("style");l.setAttribute("data-svg-scroll-draw",""),l.textContent=`@keyframes ${t}{from{${S}}to{${a}}}.${s}{view-timeline-name:${o};view-timeline-axis:block;}.${t}{animation-name:${t};animation-duration:auto;animation-timing-function:${ct};animation-fill-mode:both;animation-timeline:${o};animation-range:cover 0% cover 100%;}`,document.head.appendChild(l),r.classList.add(s);function y(n,i){n.style.setProperty("--ssd-len",String(L[i])),n.style.strokeDasharray=`${L[i]}`,n.style.strokeDashoffset="",n.style.opacity="",n.style.animationPlayState="",n.classList.add(t);}c$1.forEach(y);let g=false,b=-1;function T(){if(b>=0)return b;let n=r.getBoundingClientRect(),{tStart:i,tEnd:h}=c({top:n.top,height:n.height},he(),it(),et,tt);return q(b$3(he(),i,h,D))}return {destroy(){r.classList.remove(s),c$1.forEach(n=>{n.classList.remove(t),n.style.removeProperty("--ssd-len"),n.style.animationPlayState="";}),l.remove();},replay(){g=false,b=-1,c$1.forEach(y);},pause(){g=true,c$1.forEach(n=>{n.style.animationPlayState="paused";});},resume(){g&&(g=false,c$1.forEach(n=>{n.style.animationPlayState="running";}));},seek(n){let i=Math.min(1,Math.max(0,n));b=i,g=true,c$1.forEach((h,V)=>{h.classList.remove(t),h.style.strokeDashoffset=u==="reverse"?`${L[V]*i}`:`${L[V]*(1-i)}`,I&&(h.style.opacity=u==="reverse"?`${1-i}`:`${i}`);});},getProgress(){return T()},refresh(){c$1.forEach((n,i)=>{we(n,i),n.style.setProperty("--ssd-len",String(L[i]));});}}}if(Mt())return Ie(Dt());function Ct(){let e=Math.max(1,xt),t=O?e:e*(1+Math.max(0,c$1.length-1)*U),s=0,o=0,w=false;function z(b){let T=true,n=Math.min(1,Math.max(0,b/t));if(O){let i=Math.min(1,Math.max(0,b/e)),h=q(i);N=h,r.style.setProperty("--scroll-draw-progress",String(h)),r.style.clipPath=ie(u==="reverse"?1-h:h),de?.(h),i<1&&(T=false);}else {c$1.forEach((h,V)=>{let Ft=V*U*e,pt=Math.min(1,Math.max(0,(b-Ft)/e));Re(h,V,q(pt),u),pt<1&&(T=false);});let i=q(n);N=i,de?.(i),r.style.setProperty("--scroll-draw-progress",String(i));}if(Q){let i=q(n);for(let h in Q){let V=parseFloat(h);i>=V&&!B.has(V)&&(B.add(V),Q[h]?.());}}return T}function S(b){if(d$2)return;let T=b-s;M||(M=true,Te?.());let n=z(T);if(n&&!v){v=true,z(t),ye?.(),R<(Z==="infinite"?1/0:Z??0)&&(R++,G=setTimeout(()=>{s=performance.now(),M=false,v=false,B.clear(),ve(),E=requestAnimationFrame(S);},Fe));return}n||(E=requestAnimationFrame(S));}function a(){cancelAnimationFrame(E),clearTimeout(G),s=performance.now(),o=0,d$2=false,M=false,v=false,R=0,w=true,N=0,B.clear(),ve(),E=requestAnimationFrame(S);}let l=new IntersectionObserver(b=>{b.forEach(T=>{T.isIntersecting&&!(te&&v)?a():!T.isIntersecting&&!te&&!v&&(cancelAnimationFrame(E),clearTimeout(G),w=false);});},{root:P??null,threshold:je,rootMargin:Xe}),y;function g(){clearTimeout(y),y=setTimeout(()=>c$1.forEach(we),150);}return window.addEventListener("resize",g),window.addEventListener("orientationchange",g),me>0?setTimeout(()=>l.observe(r),me):l.observe(r),{destroy(){cancelAnimationFrame(E),clearTimeout(G),l.disconnect(),window.removeEventListener("resize",g),window.removeEventListener("orientationchange",g),clearTimeout(y);},replay(){R=0,a();},pause(){d$2||!w||(d$2=true,o=performance.now()-s,cancelAnimationFrame(E));},resume(){d$2&&(d$2=false,w=true,s=performance.now()-o,E=requestAnimationFrame(S));},seek(b){let T=Math.min(1,Math.max(0,b));N=T,d$2=true,o=T*t,s=performance.now()-o,cancelAnimationFrame(E),z(o);},getProgress(){return N},refresh(){clearTimeout(y),c$1.forEach(we);}}}if(Ye)return Ie(Ct());lt();function ut(){if(d$2||!fe)return;let e=performance.now(),t=he();if(!_&&pe===false&&t===nt){Ve(t);return}_=false,nt=t;let s=D;if(pe!==false){let a=e-ot,l=a>0?Math.abs(t-(ke<0?t:ke))/a:0;s=D*Math.max(.2,1+l*(typeof pe=="number"?pe:1)*.04);}ke=t,ot=e;let o=Oe?xe===-1||t>=xe?"forward":"reverse":u;xe=t;let w=A-$,z=true,S=w===0?0:(t-$)/w;if(isNaN(le)||(le<=0&&S>0?Qe?.():le>0&&S<=0&&Ke?.(),le<1&&S>=1?Ze?.():le>=1&&S<1&&Je?.()),le=S,O){let a=ft(0,b$3(t,$,A,s));N=a,r.style.setProperty("--scroll-draw-progress",String(a));let l=o==="reverse"?1-a:a;r.style.clipPath=ie(l),de?.(a),!M&&b$3(t,$,A,s)>0&&(M=true,Te?.()),a>=1&&!v?(v=true,ye?.(),R<(Z==="infinite"?1/0:Z??0)&&(R++,G=setTimeout(()=>{ge=-1,ae=[],M=false,v=false,ve();},Fe))):a<1&&!te&&(v=false),Ve(t);return}if(c$1.forEach((a,l)=>{let y=l*$e*w,g=ft(l,b$3(t,$+y,A+y,s));Re(a,l,g,o),l===0&&(N=g,de?.(g),r.style.setProperty("--scroll-draw-progress",String(g))),g<1&&(z=false);}),Q){let a=q(b$3(t,$,A,s));for(let l in Q){let y=parseFloat(l);a>=y&&!B.has(y)&&(B.add(y),Q[l]?.());}}!M&&b$3(t,$,A,s)>0&&(M=true,Te?.()),z&&!v?(v=true,ye?.(),R<(Z==="infinite"?1/0:Z??0)&&(R++,G=setTimeout(()=>{ge=-1,ae=[],M=false,v=false,B.clear(),ve(),_=true;},Fe))):!z&&!te&&(v=false),Ve(t);}function ze(e){return e>=A&&e<rt}function Ve(e){Ae||ze(e)?E=requestAnimationFrame(ut):fe=false;}function We(){return Ae||ze(he())}let fe=false;function Pe(){fe||(fe=true,E=requestAnimationFrame(function(){ut();}));}function Le(){fe=false,cancelAnimationFrame(E);}let qe=new IntersectionObserver(e=>{e.forEach(t=>{Ae=t.isIntersecting,Ae&&!d$2?(_=true,Pe()):fe&&!d$2&&ze(he())||Le();});},{root:P??null,threshold:je,rootMargin:Xe});function mt(){c$1.forEach(we),lt(),_=true;}let Me;function be(){clearTimeout(Me),Me=setTimeout(mt,150);}window.addEventListener("resize",be),window.addEventListener("orientationchange",be);let Ot=d$1([r],be);return me>0?setTimeout(()=>qe.observe(r),me):qe.observe(r),Ie({destroy(){cancelAnimationFrame(E),clearTimeout(G),Le(),qe.disconnect(),Ot(),window.removeEventListener("resize",be),window.removeEventListener("orientationchange",be),clearTimeout(Me),st();},replay(){ge=-1,ae=[],xe=-1,ke=-1,M=false,v=false,R=0,d$2=false,N=0,B.clear(),clearTimeout(G),ve(),_=true,We()&&Pe();},pause(){d$2=true,Le();},resume(){d$2&&(d$2=false,_=true,We()&&Pe());},seek(e){let t=Math.min(1,Math.max(0,e));N=t,ge=t,ae=[],d$2=true,Le(),Lt(t,u),_=true;},getProgress(){return N},refresh(){clearTimeout(Me),mt(),We()&&!d$2&&Pe();}},()=>({tStart:$,tEnd:A}))}export{Et as a,er as b};
@@ -1 +0,0 @@
1
- import {a as a$1}from'./chunk-4DOJSIEQ.mjs';function w(t="top bottom"){let e=t.trim();if(/^\d+(\.\d+)?%$/.test(e))return {element:"top",viewport:e};let[n="top",o="bottom"]=e.split(/\s+/).filter(Boolean);return {element:n,viewport:o}}function b(t,e,n,o){switch(o){case "top":return t+n;case "center":return t+n+e/2;case "bottom":return t+n+e;default:return t+n}}function l(t,e){if(/^\d+(\.\d+)?%$/.test(t))return e*(parseFloat(t)/100);switch(t){case "top":return 0;case "center":return e/2;case "bottom":return e;default:return e}}function v(t,e,n,o){return n===e?0:a$1((t-e)/(n-e)*o,0,1)}function E(t,e,n,o,r){let u=b(t.top,t.height,e,o.element)-l(o.viewport,n),i=b(t.top,t.height,e,r.element)-l(r.viewport,n);return {tStart:u,tEnd:i}}var s,c=new Set,d=new WeakMap,m=new Map,a=t=>{let e=t.getBoundingClientRect();return e.width+" "+e.height};function p(t){let e=new Set;for(let n of t)for(;n&&n!==document.body;n=n.parentElement)for(let o=n;o;o=o.previousElementSibling)e.add(o);return e}function x(t,e){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let n=()=>e();s??(s=new ResizeObserver(r=>{let u=false;for(let{target:i}of r)d.get(i)!==a(i)&&(u=true),d.set(i,"");u&&c.forEach(i=>i());})),c.add(n);let o=p(t);return [document.body,document.documentElement].forEach(r=>r&&o.add(r)),o.forEach(r=>{d.has(r)||d.set(r,a(r)),m.set(r,(m.get(r)??0)+1),s.observe(r);}),()=>{c.delete(n)&&(o.forEach(r=>{let u=(m.get(r)??1)-1;if(u)return void m.set(r,u);m.delete(r),s?.unobserve(r);}),c.size||(s?.disconnect(),s=void 0));}}export{w as a,v as b,E as c,x as d};
@@ -1 +0,0 @@
1
- function f({tension:n=2.5,friction:a=2.2}={}){return t=>1-Math.cos(t*Math.PI*n)*Math.pow(1-t,a)}function M({bounces:n=3,decay:a=.5}={}){let t=Math.max(1,Math.round(n)),o=Math.max(.01,Math.min(.99,a)),c=Math.sqrt(o),u=0,m=[];for(let r=0;r<t;r++){let e=Math.pow(c,r);m.push(e),u+=e;}let s=[0],h=0;for(let r=0;r<t;r++)h+=m[r]/u,s.push(h);return r=>{if(r<=0)return 0;if(r>=1)return 1;for(let e=0;e<t;e++)if(r<=s[e+1]){let i=(r-s[e])/(s[e+1]-s[e]);if(e===0)return i*(2-i);let b=1-Math.pow(o,e);return b+(1-b)*(2*i-1)*(2*i-1)}return 1}}function p({amplitude:n=1,period:a=.4}={}){let t=Math.max(1,n),o=Math.max(.1,a),c=t<=1?o/4:o/(2*Math.PI)*Math.asin(1/t);return u=>u<=0?0:u>=1?1:t*Math.pow(2,-10*u)*Math.sin((u-c)*(2*Math.PI)/o)+1}var l={linear:n=>n,"ease-in":n=>n*n,"ease-out":n=>n*(2-n),"ease-in-out":n=>n<.5?2*n*n:-1+(4-2*n)*n,spring:n=>1-Math.cos(n*Math.PI*2.5)*Math.pow(1-n,2.2),bounce:M(),elastic:p()};export{f as a,M as b,p as c,l as d};
@@ -1 +0,0 @@
1
- import {a}from'./chunk-2PYLM3E7.mjs';import {a as a$1,b as b$1,d as d$1,c}from'./chunk-A4JCC3QQ.mjs';import {d}from'./chunk-DM6EDKWH.mjs';import {a as a$2,b as b$2}from'./chunk-BCV4RAIX.mjs';import {b}from'./chunk-LFSU6LR3.mjs';var P={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function te(t,w){if(typeof window>"u")return P;let u=typeof t=="string"?document.querySelector(t):t;return u?a(w,(m,f)=>K(u,m,f)):(b("scrollCounter: element not found:",t),P)}function K(t,w,u){let{from:m=0,to:f,format:B,easing:h="ease-out",trigger:F={},once:M=true,decimals:x,onComplete:I}=w,z=x!==void 0?e=>e.toFixed(x):B??(e=>String(Math.round(e))),y=typeof h=="function"?h:d[h]??d["ease-out"],G=a$1(F.start||"top 80%"),W=a$1(F.end||"top 20%");if(u)return t.textContent=z(f),I?.(),{...P,getProgress:()=>1};let a=0,c$1=0,L=false,n=0,g=false,o=false,b=-1,s=0,i=0,p=false,v=()=>window.scrollY,Y=()=>window.innerHeight;function O(){let e=t.getBoundingClientRect(),r=c({top:e.top,height:e.height},v(),Y(),G,W);L&&Math.abs(r.tStart-a)<1&&Math.abs(r.tEnd-c$1)<1||(L=true,a=r.tStart,c$1=r.tEnd);}let j=t.style.getPropertyValue("--scroll-draw-progress");function d$2(e){t.textContent=z(m+(f-m)*e),t.style.setProperty("--scroll-draw-progress",String(e));}function S(){if(!g||o)return;let e=b$1(v(),a,c$1,1),r=M?Math.max(b,y(s=Math.max(s,e))):y(e);i=r,d$2(r),r>=1&&!p?(p=true,I?.()):r<1&&!M&&(p=false),n=requestAnimationFrame(S);}O();{s=b$1(v(),a,c$1,1);let e=y(s);i=e,d$2(e);}let R=new IntersectionObserver(e=>{e.forEach(r=>{g=r.isIntersecting,g&&!o?n=requestAnimationFrame(S):cancelAnimationFrame(n);});}),C;function l(){clearTimeout(C),C=setTimeout(O,150);}window.addEventListener("resize",l),window.addEventListener("orientationchange",l);let J=d$1([t],l);R.observe(t),a$2(t,{type:"counter",getProgress:()=>i,getTrigger:()=>({tStart:a,tEnd:c$1})});function q(){o&&(o=false,g&&(n=requestAnimationFrame(S)));}return {destroy(){cancelAnimationFrame(n),R.disconnect(),window.removeEventListener("resize",l),window.removeEventListener("orientationchange",l),J(),clearTimeout(C),t.style.setProperty("--scroll-draw-progress",j),b$2(t);},replay(){b=-1,s=0,p=false,i=0,d$2(0),q();},pause(){o=true,cancelAnimationFrame(n);},resume:q,seek(e){let r=Math.min(1,Math.max(0,e));i=r,b=r,s=0,o=true,cancelAnimationFrame(n),d$2(r);},getProgress(){return i}}}export{te as a};
@@ -1 +0,0 @@
1
- import {a}from'./chunk-2PYLM3E7.mjs';import {a as a$1,d as d$1,c,b as b$2}from'./chunk-A4JCC3QQ.mjs';import {d}from'./chunk-DM6EDKWH.mjs';import {a as a$2,b as b$1}from'./chunk-BCV4RAIX.mjs';import {b}from'./chunk-LFSU6LR3.mjs';function _(e,o){let t=document.createElement("span");t.textContent=o,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 S(e=""){let o=document.createElement("span");return o.setAttribute("aria-hidden","true"),o.textContent=e,o}function G(e){let o=e.textContent??"";return e.textContent="",o.split(/(\s+)/).filter(Boolean).map(t=>{let n=e.appendChild(S(t)),a=/^\s+$/.test(t);return a?n.style.whiteSpace="pre":n.style.display="inline-block",a?null:n}).filter(t=>t!==null)}function ee(e){let o=e.textContent??"";e.textContent="";let t=[],n=null;for(let a of o){let r=S(a),i=a===" ";i?r.style.whiteSpace="pre":(r.style.display="inline-block",t.push(r)),i||a>"\u0DFF"?n=null:n||(n=e.appendChild(S()),n.style.cssText="display:inline-block;white-space:nowrap"),(n??e).appendChild(r);}return t}function j(e){let o=G(e),t=new Map;for(let r of o){let i=r.offsetTop;t.has(i)||t.set(i,[]),t.get(i).push(r);}let n=[],a=Array.from(t.keys()).sort((r,i)=>r-i);for(let r of a){let i=t.get(r),l=S();l.style.display="inline-block",i.forEach((g,w)=>{let h=g.nextElementSibling;l.appendChild(g),w<i.length-1&&h&&h.style.whiteSpace==="pre"&&l.appendChild(h);}),n.push(l);}return e.textContent="",n.forEach((r,i)=>{e.appendChild(r),i<n.length-1&&e.appendChild(document.createTextNode(" "));}),n}function te(e,o,t,n){if(t<=1||n===0)return e;n=Math.min(n,1/t);let a=(t-1)*n,r=o*n,i=r+(1-a);return i<=r?e>=r?1:0:Math.min(1,Math.max(0,(e-r)/(i-r)))}function ne(e,o){let t=[];if(o?.y!==void 0&&t.push(`translateY(${o.y*(1-e)}px)`),o?.x!==void 0&&t.push(`translateX(${o.x*(1-e)}px)`),o?.rotate!==void 0&&t.push(`rotate(${o.rotate*(1-e)}deg)`),o?.scale!==void 0){let n=o.scale+(1-o.scale)*e;t.push(`scale(${n})`);}return t.join(" ")}var F={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function pe(e,o={}){if(typeof window>"u")return F;let t=typeof e=="string"?document.querySelector(e):e;if(!t)return b("scrollText: element not found:",e),F;let n=t;return a(o,(a,r)=>oe(n,a,r))}function oe(e,o,t){let{split:n="words",stagger:a=.04,easing:r="ease-out",from:i={opacity:0,y:24},trigger:l={},once:g=true,onComplete:w}=o,h=typeof r=="function"?r:d[r]??d["ease-out"],U=a$1(l.start||"top 85%"),V=a$1(l.end||"top 40%"),M=e.innerHTML,P=e.textContent??"",u;n==="chars"?u=ee(e):n==="lines"?u=j(e):u=G(e),_(e,P);let X=u.length;function J(s,c){i?.opacity!==void 0&&(s.style.opacity=String(i.opacity+(1-i.opacity)*c));let E=ne(c,i);E&&(s.style.transform=E);}function m(s){e.style.setProperty("--scroll-draw-progress",String(s)),u.forEach((c,E)=>{let Z=h(te(s,E,X,a));J(c,Z);});}if(t)return m(1),w?.(),{...F,destroy:()=>{e.innerHTML=M;},getProgress:()=>1};m(0);let L=0,C=0,p=0,b=false,d$2=false,y=-1,f=0,x=false,O=()=>window.scrollY,K=()=>window.innerHeight;function k(){let s=e.getBoundingClientRect(),c$1=c({top:s.top,height:s.height},O(),K(),U,V);L=c$1.tStart,C=c$1.tEnd;}function v(){if(!b||d$2)return;let s=b$2(O(),L,C,1);g&&(y=Math.max(y,s),s=y),f=s,m(s),s>=1&&!x?(x=true,w?.()):s<1&&!g&&(x=false),p=requestAnimationFrame(v);}k();let z=new IntersectionObserver(s=>{s.forEach(c=>{b=c.isIntersecting,b&&!d$2?p=requestAnimationFrame(v):cancelAnimationFrame(p);});}),H;function T(){clearTimeout(H),H=setTimeout(()=>{if(n==="lines"){let s=f;e.innerHTML=M,u=j(e),_(e,P),m(s);}k();},150);}window.addEventListener("resize",T),window.addEventListener("orientationchange",T);let Q=d$1([e],T);z.observe(e),a$2(e,{type:"text",getProgress:()=>f,getTrigger:()=>({tStart:L,tEnd:C})});function D(){d$2&&(d$2=false,b&&(p=requestAnimationFrame(v)));}return {destroy(){cancelAnimationFrame(p),z.disconnect(),window.removeEventListener("resize",T),window.removeEventListener("orientationchange",T),Q(),clearTimeout(H),e.innerHTML=M,b$1(e);},replay(){y=-1,x=false,f=0,m(0),D();},pause(){d$2=true,cancelAnimationFrame(p);},resume:D,seek(s){let c=Math.min(1,Math.max(0,s));f=c,y=c,d$2=true,cancelAnimationFrame(p),m(c);},getProgress(){return f}}}export{pe as a};
@@ -1 +0,0 @@
1
- import {b,a as a$4}from'./chunk-OJFWQ6CU.mjs';import {a as a$3}from'./chunk-UPWWULKI.mjs';import {a}from'./chunk-2PYLM3E7.mjs';import {a as a$1,b as b$2,d as d$1,c}from'./chunk-A4JCC3QQ.mjs';import {d}from'./chunk-DM6EDKWH.mjs';import {a as a$2,b as b$3}from'./chunk-BCV4RAIX.mjs';import {b as b$1}from'./chunk-LFSU6LR3.mjs';function Ne(t){return t.startsWith("#")||t.startsWith("rgb")||t.startsWith("hsl")}function ve(t){let i=[],l=/([\w]+)\(([^)]*)\)/g,s;for(;(s=l.exec(t))!==null;){let m=[],r=[],c=s[2].trim();if(c)for(let u of c.split(/[\s,]+/)){let o=u.match(/^([-+]?[\d.eE]+)(.*)$/);m.push(o?parseFloat(o[1]):0),r.push(o?o[2]:"");}i.push({fn:s[1],nums:m,units:r});}return i}function Re(t,i,l){let s=ve(t),m=ve(i);return s.length===0||s.length!==m.length?l<1?t:i:s.map((r,c)=>{let u=m[c];return r.fn!==u.fn||r.nums.length!==u.nums.length?l<1?`${r.fn}(${r.nums.map((o,p)=>`${o}${r.units[p]}`).join(", ")})`:`${u.fn}(${u.nums.map((o,p)=>`${o}${u.units[p]}`).join(", ")})`:`${r.fn}(${r.nums.map((o,p)=>`${o+(u.nums[p]-o)*l}${r.units[p]}`).join(", ")})`}).join(" ")}function be(t,i,l){if(typeof t=="number"&&typeof i=="number")return String(t+(i-t)*l);let s=String(t),m=String(i);if(Ne(s))return a$4(s,m,l);if(s.includes("("))return Re(s,m,l);let r=s.match(/^([-+]?[\d.]+)(.*)$/),c=m.match(/^([-+]?[\d.]+)(.*)$/);if(r&&c){let u=parseFloat(r[1]),o=parseFloat(c[1]);return `${u+(o-u)*l}${r[2]||c[2]}`}return l<1?s:m}function Fe(t){return t.replace(/([A-Z])/g,i=>`-${i.toLowerCase()}`)}var ke=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Ie=0,Se="--scroll-draw-progress";function Ve(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var Te={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Ue(t,i){return typeof window>"u"?Te:i.respectReducedMotion===false?we(t,i,false):a(i,(l,s)=>we(t,l,s))}function we(t,i,l){let{props:s,trigger:m={},easing:r="ease-out",speed:c$1=1,once:u=false,axis:o="y",scrollContainer:p,native:Le=true,velocityScale:R=false,triggerElement:Pe,onProgress:J,onComplete:O,onEnter:K,onLeave:Q,onEnterBack:ee,onLeaveBack:te}=i,F=typeof r=="function"?r:d[r]??d["ease-out"],ne=a$1(m.start||"top bottom"),re=a$1(m.end||"bottom top"),k=Pe??t,y=typeof p=="string"?document.querySelector(p):p??null,h=Object.entries(s).map(([e,n])=>({prop:Fe(e),from:Array.isArray(n)?n[0]:"",to:Array.isArray(n)?n[1]:n}));function Me(){let e=window.getComputedStyle(t);for(let n of h)n.from===""&&(n.from=e.getPropertyValue(n.prop).trim()||"0");}function $e(){for(let e of h)t.style.setProperty(e.prop,String(e.to));}let W=new Map;for(let e of [...h.map(n=>n.prop),Se])W.set(e,t.style.getPropertyValue(e));function B(){for(let[e,n]of W)n?t.style.setProperty(e,n):t.style.removeProperty(e);}if(l)return $e(),O?.(),{...Te,destroy:B,getProgress:()=>1};Me();let $=()=>y?o==="x"?y.scrollLeft:y.scrollTop:o==="x"?window.scrollX:window.scrollY,oe=()=>y?o==="x"?y.clientWidth:y.clientHeight:o==="x"?window.innerWidth:window.innerHeight,se=typeof r=="string"?b(r):null;function Ae(){if(!Le||!Ve()||!se||o!=="y"||y||k!==t||u||c$1!==1||J||O||K||Q||ee||te||R!==false||(m.start||"top bottom").trim()!=="top bottom"||(m.end||"bottom top").trim()!=="bottom top")return false;for(let e of h)if(!ke.has(e.prop))return false;return true}function Ce(){let e=`ssd-a-${++Ie}`,n=h.map(a=>`${a.prop}:${a.from}`).join(";"),M=h.map(a=>`${a.prop}:${a.to}`).join(";"),v=document.createElement("style");v.setAttribute("data-ssd-animate",""),v.textContent=`@keyframes ${e}{from{${n}}to{${M}}}.${e}{animation-name:${e};animation-duration:auto;animation-timing-function:${se};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(v),t.classList.add(e);let d=()=>{let a=t.getBoundingClientRect();return c({top:a.top,height:a.height},$(),oe(),ne,re)};a$2(t,{type:"animate",getProgress:()=>f.getProgress(),getTrigger:d});let f={refresh(){},destroy(){t.classList.remove(e),v.remove(),t.style.animationPlayState="",B(),b$3(t);},replay(){t.classList.remove(e),t.offsetWidth,t.classList.add(e);},pause(){t.style.animationPlayState="paused";},resume(){t.style.animationPlayState="";},seek(a){let x=Math.min(1,Math.max(0,a));t.classList.remove(e);for(let z of h)t.style.setProperty(z.prop,be(z.from,z.to,x));},getProgress(){let{tStart:a,tEnd:x}=d();return F(b$2($(),a,x,c$1))}};return f}if(Ae())return Ce();let g=0,E=0,A=0,T=NaN,b$4=false,j=-1,L=0,S=0,I=false,w=NaN,D=-1,ie=0,C=k===t?h:[],ae=false;function le(){let e=t.style,n=C.map(f=>e.getPropertyValue(f.prop)),M=e.transition;C.length&&(e.transition="none"),C.forEach(f=>e.setProperty(f.prop,W.get(f.prop)??""));let v=a$3(k,y,o);C.forEach((f,a)=>e.setProperty(f.prop,n[a])),C.length&&(t.offsetWidth,e.transition=M);let d=c(v,v.scroll,oe(),ne,re);ae&&Math.abs(d.tStart-g)<1&&Math.abs(d.tEnd-E)<1||(ae=true,g=d.tStart,E=d.tEnd);}function V(e){t.style.setProperty(Se,String(e));for(let n of h)t.style.setProperty(n.prop,be(n.from,n.to,e));J?.(e);}function He(e){if(isNaN(w)){w=e;return}w<=0&&e>0?K?.():w>0&&e<=0&&te?.(),w<1&&e>=1?Q?.():w>=1&&e<1&&ee?.(),w=e;}let me=e=>b$2(e,g,E,Math.min(c$1,1));function P(){!A&&!b$4&&me($())!==T&&(A=requestAnimationFrame(ce));}function ce(){if(b$4)return;let e=performance.now(),n=$(),M=c$1;if(R!==false){let a=e-ie,x=a>0?Math.abs(n-(D<0?n:D))/a:0;M=c$1*Math.max(.2,1+x*(typeof R=="number"?R:1)*.04);}D=n,ie=e;let v=E===g?0:(n-g)/(E-g);He(v);let d=b$2(n,g,E,M),f=u?Math.max(j,F(L=Math.max(L,d))):F(d);S=f,V(f),f>=1&&!I?(I=true,O?.()):f<1&&!u&&(I=false),!b$4&&(T=me(n),A=T>0&&T<1?requestAnimationFrame(ce):0);}le(),E===g&&b$1("scrollAnimate: zero-length trigger window, so it never animates. In a sticky stage, set triggerElement.",t),L=b$2($(),g,E,c$1),S=F(L),V(S);function ue(){le(),P();}let _;function H(){clearTimeout(_),_=setTimeout(ue,150);}let fe=y??window;fe.addEventListener("scroll",P,{passive:true}),window.addEventListener("resize",H),window.addEventListener("orientationchange",H);let xe=d$1([k],H);P(),a$2(t,{type:"animate",getProgress:()=>S,getTrigger:()=>({tStart:g,tEnd:E})});function q(){b$4=true,cancelAnimationFrame(A),A=0,T=NaN;}return {destroy(){q(),fe.removeEventListener("scroll",P),window.removeEventListener("resize",H),window.removeEventListener("orientationchange",H),xe(),clearTimeout(_),B(),b$3(t);},replay(){j=-1,L=0,I=false,S=0,b$4=false,V(0),T=0,P();},pause:q,resume(){b$4&&(b$4=false,P());},seek(e){let n=Math.min(1,Math.max(0,e));S=n,j=n,L=0,q(),V(n);},getProgress(){return S},refresh:ue}}export{Ue as a};
@@ -1 +0,0 @@
1
- import {a,d as d$1,c,b as b$2}from'./chunk-A4JCC3QQ.mjs';import {d}from'./chunk-DM6EDKWH.mjs';import {a as a$1}from'./chunk-5PJEKEEP.mjs';import {a as a$2,b as b$1}from'./chunk-BCV4RAIX.mjs';import {b}from'./chunk-LFSU6LR3.mjs';var J={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function ce(m,E={}){if(typeof window>"u")return J;let b$3=typeof m=="string"?document.querySelector(m):m;if(!b$3||b$3.tagName.toLowerCase()!=="video")return b("scrollVideo: <video> element not found:",m),J;let t=b$3,{trigger:P={},easing:T="linear",once:C=false,axis:u="y",preload:K="auto",triggerElement:Q,onReady:I,onComplete:U,onProgress:Z}=E,R=Q??t,f=window.matchMedia("(prefers-reduced-motion: reduce)").matches,V=typeof T=="function"?T:d[T]??d.linear,$=a(P.start||"top top"),ee=a(P.end||"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=K);let q=E.from??0,A=E.to,g=0,p=0,o=0,l=false,n=false,S=-1,w=0,a$3=0,v=false,i=false,O=()=>u==="x"?window.scrollX:window.scrollY,te=()=>u==="x"?window.innerWidth:window.innerHeight;function x(){let e=R.getBoundingClientRect(),r=u==="x"?e.left:e.top,d=u==="x"?e.width:e.height,_=c({top:r,height:d},O(),te(),$,ee);g=_.tStart,p=_.tEnd,i&&p===g&&b("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t);}let h=NaN;function s(e){if(!i)return;let r=A??t.duration??0,d=q+(r-q)*e;d!==h&&(h=d,t.currentTime=d),t.style.setProperty("--scroll-draw-progress",String(e)),Z?.(e);}function y(){if(!l||n||!i||f)return;let e=b$2(O(),g,p,1),r=C?Math.max(S,V(w=Math.max(w,e))):V(e);a$3=r,s(r),r>=1&&!v?(v=true,U?.()):r<1&&!C&&(v=false),o=requestAnimationFrame(y);}function L(){if(i=true,A===void 0&&(A=t.duration),f){s(1),I?.();return}x(),I?.(),n?s(a$3):l&&(o=requestAnimationFrame(y));}t.readyState>=1?L():t.addEventListener("loadedmetadata",L,{once:true}),i||x();let k=f?()=>{}:a$1(e=>{e&&(k(),f=true,cancelAnimationFrame(o),s(1));}),D=new IntersectionObserver(e=>{e.forEach(r=>{l=r.isIntersecting,l&&!n&&i?o=requestAnimationFrame(y):cancelAnimationFrame(o);});}),N;function c$1(){clearTimeout(N),N=setTimeout(x,150);}window.addEventListener("resize",c$1),window.addEventListener("orientationchange",c$1);let re=d$1([R],c$1);D.observe(t),a$2(t,{type:"video",getProgress:()=>a$3,getTrigger:()=>({tStart:g,tEnd:p})});function H(){n&&(n=false,l&&i&&(o=requestAnimationFrame(y)));}return {destroy(){cancelAnimationFrame(o),D.disconnect(),t.removeEventListener("loadedmetadata",L),window.removeEventListener("resize",c$1),window.removeEventListener("orientationchange",c$1),re(),k(),clearTimeout(N),b$1(t);},replay(){S=-1,w=0,v=false,a$3=0,h=NaN,s(0),H();},pause(){n=true,cancelAnimationFrame(o);},resume:H,seek(e){let r=Math.min(1,Math.max(0,e));a$3=r,S=r,w=0,n=true,cancelAnimationFrame(o),h=NaN,s(r);},getProgress(){return a$3}}}export{ce as a};