svg-scroll-draw 2.25.0 → 2.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/README.md +116 -15
  2. package/dist/angular/index.cjs +3 -3
  3. package/dist/angular/index.d.mts +60 -6
  4. package/dist/angular/index.d.ts +60 -6
  5. package/dist/angular/index.mjs +1 -1
  6. package/dist/astro/index.cjs +2 -2
  7. package/dist/astro/index.d.mts +3 -3
  8. package/dist/astro/index.d.ts +3 -3
  9. package/dist/astro/index.mjs +1 -1
  10. package/dist/cdn/svg-scroll-draw.dev.global.js +69 -31
  11. package/dist/cdn/svg-scroll-draw.global.js +2 -2
  12. package/dist/chunk-5SJE7725.mjs +1 -0
  13. package/dist/{chunk-NX74KN5X.mjs → chunk-5U4JXBHR.mjs} +1 -1
  14. package/dist/chunk-7LDSB4FT.mjs +1 -0
  15. package/dist/chunk-ASCOHQQD.mjs +2 -0
  16. package/dist/chunk-GBFWTY5L.mjs +1 -0
  17. package/dist/chunk-HAGTU5EX.mjs +1 -0
  18. package/dist/chunk-HJTHOZK5.mjs +1 -0
  19. package/dist/chunk-IXR6RML7.mjs +1 -0
  20. package/dist/chunk-KN2YB54Z.mjs +1 -0
  21. package/dist/chunk-NJV6S5LD.mjs +1 -0
  22. package/dist/chunk-UBH4K5YD.mjs +1 -0
  23. package/dist/chunk-UF3MO5XQ.mjs +1 -0
  24. package/dist/chunk-XLXVGQ3P.mjs +3 -0
  25. package/dist/chunk-YOOPMYT6.mjs +1 -0
  26. package/dist/chunk-Z72TVDHY.mjs +1 -0
  27. package/dist/cinematic/index.cjs +2 -2
  28. package/dist/cinematic/index.d.mts +3 -1
  29. package/dist/cinematic/index.d.ts +3 -1
  30. package/dist/cinematic/index.mjs +1 -1
  31. package/dist/{engine-6VsjEwzb.d.ts → engine-Bi2x8-X-.d.mts} +2 -2
  32. package/dist/{engine-BLWKCfxC.d.mts → engine-DAlvk6i0.d.ts} +2 -2
  33. package/dist/frames/index.cjs +1 -1
  34. package/dist/frames/index.d.mts +2 -2
  35. package/dist/frames/index.d.ts +2 -2
  36. package/dist/frames/index.mjs +1 -1
  37. package/dist/group/index.cjs +3 -3
  38. package/dist/group/index.d.mts +3 -3
  39. package/dist/group/index.d.ts +3 -3
  40. package/dist/group/index.mjs +1 -1
  41. package/dist/horizontal/index.cjs +1 -1
  42. package/dist/horizontal/index.d.mts +2 -2
  43. package/dist/horizontal/index.d.ts +2 -2
  44. package/dist/horizontal/index.mjs +1 -1
  45. package/dist/{index-BN8yKeQ3.d.ts → index-BMMZ8aW7.d.mts} +2 -2
  46. package/dist/{index-hSQqLVbg.d.ts → index-CEMsUTEG.d.ts} +3 -3
  47. package/dist/{index-DAiRJgtF.d.mts → index-ClAFxNEp.d.mts} +3 -3
  48. package/dist/{index-DVjblK_4.d.mts → index-MdQ4ti_z.d.ts} +2 -2
  49. package/dist/index.cjs +4 -4
  50. package/dist/index.d.mts +6 -6
  51. package/dist/index.d.ts +6 -6
  52. package/dist/index.mjs +1 -1
  53. package/dist/lenis/index.cjs +1 -1
  54. package/dist/lenis/index.d.mts +15 -16
  55. package/dist/lenis/index.d.ts +15 -16
  56. package/dist/lenis/index.mjs +1 -1
  57. package/dist/nuxt/index.cjs +3 -3
  58. package/dist/nuxt/index.d.mts +4 -3
  59. package/dist/nuxt/index.d.ts +4 -3
  60. package/dist/nuxt/index.mjs +1 -1
  61. package/dist/progress/index.cjs +1 -1
  62. package/dist/progress/index.d.mts +2 -2
  63. package/dist/progress/index.d.ts +2 -2
  64. package/dist/progress/index.mjs +1 -1
  65. package/dist/react/index.cjs +2 -2
  66. package/dist/react/index.d.mts +4 -4
  67. package/dist/react/index.d.ts +4 -4
  68. package/dist/react/index.mjs +1 -1
  69. package/dist/reveal/index.cjs +1 -1
  70. package/dist/reveal/index.d.mts +2 -2
  71. package/dist/reveal/index.d.ts +2 -2
  72. package/dist/reveal/index.mjs +1 -1
  73. package/dist/{scroll-draw-Fzir8hlU.d.mts → scroll-draw-CKZysh22.d.mts} +1 -1
  74. package/dist/{scroll-draw-BsU_Ohmu.d.ts → scroll-draw-DbY8RUJE.d.ts} +1 -1
  75. package/dist/snap/index.cjs +1 -1
  76. package/dist/snap/index.d.mts +2 -2
  77. package/dist/snap/index.d.ts +2 -2
  78. package/dist/snap/index.mjs +1 -1
  79. package/dist/solid/index.cjs +3 -3
  80. package/dist/solid/index.d.mts +40 -4
  81. package/dist/solid/index.d.ts +40 -4
  82. package/dist/solid/index.mjs +1 -1
  83. package/dist/svelte/index.cjs +3 -3
  84. package/dist/svelte/index.d.mts +47 -4
  85. package/dist/svelte/index.d.ts +47 -4
  86. package/dist/svelte/index.mjs +1 -1
  87. package/dist/text/index.cjs +1 -1
  88. package/dist/text/index.d.mts +2 -2
  89. package/dist/text/index.d.ts +2 -2
  90. package/dist/text/index.mjs +1 -1
  91. package/dist/timeline/index.cjs +10 -10
  92. package/dist/timeline/index.d.mts +2 -2
  93. package/dist/timeline/index.d.ts +2 -2
  94. package/dist/timeline/index.mjs +2 -2
  95. package/dist/{types-9bcJdVcg.d.mts → types-iITMwrru.d.mts} +10 -2
  96. package/dist/{types-9bcJdVcg.d.ts → types-iITMwrru.d.ts} +10 -2
  97. package/dist/video/index.cjs +1 -1
  98. package/dist/video/index.d.mts +2 -2
  99. package/dist/video/index.d.ts +2 -2
  100. package/dist/video/index.mjs +1 -1
  101. package/dist/vue/index.cjs +3 -3
  102. package/dist/vue/index.d.mts +4 -7
  103. package/dist/vue/index.d.ts +4 -7
  104. package/dist/vue/index.mjs +1 -1
  105. package/dist/web-component/index.cjs +3 -3
  106. package/dist/web-component/index.mjs +1 -1
  107. package/dist/wrapper-BOHrDnBO.d.mts +8 -0
  108. package/dist/wrapper-Cm7JTIVl.d.ts +8 -0
  109. package/package.json +1 -1
  110. package/dist/chunk-22P4KBPG.mjs +0 -1
  111. package/dist/chunk-32ZCSGFZ.mjs +0 -1
  112. package/dist/chunk-7USW2XFB.mjs +0 -1
  113. package/dist/chunk-7XOFQCQE.mjs +0 -3
  114. package/dist/chunk-BDXWPUBJ.mjs +0 -2
  115. package/dist/chunk-BRV2B2YW.mjs +0 -1
  116. package/dist/chunk-D2BHE4F2.mjs +0 -1
  117. package/dist/chunk-QZKYGS74.mjs +0 -1
  118. package/dist/chunk-THPTANES.mjs +0 -1
  119. package/dist/chunk-U5TKLHGW.mjs +0 -1
  120. package/dist/chunk-V3Z6G5JE.mjs +0 -1
  121. package/dist/chunk-WKOT2MND.mjs +0 -1
  122. package/dist/chunk-XSVTHCLO.mjs +0 -1
@@ -0,0 +1 @@
1
+ import {a as a$4}from'./chunk-NJV6S5LD.mjs';import {a,d,b,c}from'./chunk-KN2YB54Z.mjs';import {a as a$3}from'./chunk-HJTHOZK5.mjs';import {a as a$5}from'./chunk-UF3MO5XQ.mjs';import {a as a$2}from'./chunk-Z72TVDHY.mjs';import {a as a$1}from'./chunk-HAGTU5EX.mjs';import {b as b$1}from'./chunk-XLXVGQ3P.mjs';import {defineComponent,ref,h,onMounted,watch,onUnmounted,unref}from'vue';var u=e=>typeof e=="function"?e():unref(e);function r(e,t,o,s=a){let l=null,i=t(),R=()=>{l?.destroy(),l=e.value?o(e.value,b(i,()=>i),i):null;};onMounted(R),watch(()=>s(i=t()),R),onUnmounted(()=>{l?.destroy(),l=null;});}function I(e={}){let t=ref(null);return r(t,()=>u(e),b$1),t}var C={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},k=[null,Boolean,[Boolean,String],[Boolean,Number]],g=e=>({type:e,default:void 0}),N=defineComponent({name:"ScrollDraw",props:Object.fromEntries(Object.entries(C).map(([e,t])=>[e,t?g(k[t]):null])),setup(e,{slots:t}){let o=ref(null);return r(o,()=>{let s={};for(let l in C){let i=e[l];i!=null&&(s[l]=i);}return s},b$1),()=>h("div",{ref:o},t.default?.())}});function q(e){let t=ref(null);return r(t,()=>u(e),a$1),t}var K=defineComponent({name:"ScrollAnimate",props:{options:{type:Object,required:true}},setup(e,{slots:t}){let o=ref(null);return r(o,()=>e.options,a$1),()=>h("div",{ref:o},t.default?.())}});function P(e){let t=ref(null);return r(t,()=>u(e),a$2),t}var Y=defineComponent({name:"ScrollCounter",props:{to:{type:Number,required:true},from:{type:Number},format:{type:Function},easing:{type:[String,Function]},trigger:{type:Object},once:g(Boolean),decimals:{type:Number},onComplete:{type:Function}},setup(e){let t=ref(null);return r(t,()=>{let o={to:e.to};return e.from!=null&&(o.from=e.from),e.format!=null&&(o.format=e.format),e.easing!=null&&(o.easing=e.easing),e.trigger!=null&&(o.trigger=e.trigger),e.once!=null&&(o.once=e.once),e.decimals!=null&&(o.decimals=e.decimals),e.onComplete!=null&&(o.onComplete=e.onComplete),o},a$2),()=>h("span",{ref:t})}});function _(e={}){let t=ref(null);return r(t,()=>u(e),a$3),t}var W=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=ref(null);return r(t,()=>e.options??{},a$3),()=>h("video",{ref:t,src:e.src,muted:e.muted,playsinline:e.playsInline,preload:"auto",class:e.class})}});function U(e){let t=ref(null);return r(t,()=>u(e),a$4,c),t}var v={frames:0,count:0,trigger:0,easing:0,once:1,axis:0,triggerElement:0,fit:0,concurrency:0,onReady:0,onLoad:0,onComplete:0,onProgress:0},z=defineComponent({name:"ScrollFrames",props:Object.fromEntries(Object.entries(v).map(([e,t])=>[e,t?g(Boolean):e==="frames"?{required:true}:null])),setup(e){let t=ref(null);return r(t,()=>{let o={};for(let s in v){let l=e[s];l!=null&&(o[s]=l);}return o},a$4,c),onMounted(()=>d(t.value)),()=>h("canvas",{ref:t,role:"img"})}});function J(e={}){let t=ref(null);return r(t,()=>u(e),a$5),t}var Q=defineComponent({name:"ScrollText",props:{options:{type:Object},tag:{type:String,default:"p"}},setup(e,{slots:t}){let o=ref(null);return r(o,()=>e.options??{},a$5),()=>h(e.tag,{ref:o},t.default?.())}});export{I as a,N as b,q as c,K as d,P as e,Y as f,_ as g,W as h,U as i,z as j,J as k,Q as l};
@@ -1 +1 @@
1
- import {b}from'./chunk-7XOFQCQE.mjs';import {b as b$1}from'./chunk-LFSU6LR3.mjs';function l(r,s){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let o=typeof r=="string"?document.querySelector(r):r;return o?b(o,s):(b$1("Container not found:",r),n)}export{l as a};
1
+ import {b}from'./chunk-XLXVGQ3P.mjs';import {b as b$1}from'./chunk-LFSU6LR3.mjs';function l(r,s){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let o=typeof r=="string"?document.querySelector(r):r;return o?b(o,s):(b$1("Container not found:",r),n)}export{l as a};
@@ -0,0 +1 @@
1
+ import {e,d as d$1}from'./chunk-IXR6RML7.mjs';function a(e){let r=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(r)return [parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)];let t=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(t)return [parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)];let n=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return n?[parseInt(n[1]),parseInt(n[2]),parseInt(n[3])]:null}function d(e,r,t){let n=a(e),s=a(r);return !n||!s?e:`rgb(${Math.round(n[0]+(s[0]-n[0])*t)},${Math.round(n[1]+(s[1]-n[1])*t)},${Math.round(n[2]+(s[2]-n[2])*t)})`}var c="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",p="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",o=33;function f(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function l(e){let r=[];for(let t=0;t<o;t++){let n=t/(o-1);r.push(String(Math.round(e(n)*1e5)/1e5));}return `linear(${r.join(",")})`}function m(e$1){switch(e$1){case "linear":return "linear";case "ease-in":return c;case "ease-out":return p;case "ease-in-out":return f()?l(d$1["ease-in-out"]):null;default:return e(e$1)?.[1]??null}}export{d as a,m as b};
@@ -0,0 +1,2 @@
1
+ import {a}from'./chunk-YOOPMYT6.mjs';import {e,b as b$2}from'./chunk-NV6YTPHI.mjs';import {f}from'./chunk-IXR6RML7.mjs';import {a as a$2}from'./chunk-5PJEKEEP.mjs';import {a as a$1,b as b$1}from'./chunk-EBU6E26L.mjs';import {b}from'./chunk-LFSU6LR3.mjs';var L="http://www.w3.org/2000/svg",Y="cinematic-photo",O=a=>a<0?0:a>1?1:a;function u(a){let i=parseFloat(a);return Number.isFinite(i)?O(i/100):0}function P(a){return f(a)}var R=a=>({destroy(){},getProgress:()=>a}),D=class{constructor(i){if(typeof document>"u"){this.mount=null;return}this.mount=typeof i.wrapper=="string"?document.querySelector(i.wrapper):i.wrapper,this.mount||b("Cinematic: wrapper not found:",i.wrapper);}loadStory(i){let s=this.mount;if(typeof window>"u"||!s)return R(0);s.style.position="relative",s.style.height=i.totalHeight,s.style.display="block";let l=document.createElement("div");l.setAttribute("data-cinematic-stage",""),l.style.cssText="position:sticky;top:0;height:100vh;width:100%;overflow:hidden;display:block;",s.appendChild(l);let f=[];for(let t of i.scenes){if(t.background){let e=document.createElement("img");e.id=Y,e.src=t.background,e.alt="",e.style.cssText="position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;pointer-events:none;",l.appendChild(e);}let n=t.animations.filter(e=>e.type==="draw");if(n.length){let e=document.createElementNS(L,"svg");e.setAttribute("viewBox",`0 0 ${i.canvas.width} ${i.canvas.height}`),e.setAttribute("preserveAspectRatio","xMidYMid meet"),e.style.cssText="position:absolute;inset:0;width:100%;height:100%;overflow:visible;",l.appendChild(e);for(let o of n){let r=document.createElementNS(L,"path");r.id=o.target.replace(/^#/,""),r.setAttribute("d",o.d),r.setAttribute("fill","none"),r.setAttribute("stroke",o.stroke),r.setAttribute("stroke-width",String(o.strokeWidth)),r.setAttribute("stroke-linecap","round"),r.setAttribute("stroke-linejoin","round");let h=o.length||r.getTotalLength?.()||0;r.style.strokeDasharray=a(h),r.style.strokeDashoffset=String(h),e.appendChild(r),f.push({kind:"draw",el:r,start:u(o.start),end:u(o.end),ease:P(o.easing),length:h});}}for(let e of t.animations){if(e.type!=="fade")continue;let o=l.querySelector(e.target)??document.querySelector(e.target);o&&(o.style.opacity=String(e.from),f.push({kind:"fade",el:o,start:u(e.start),end:u(e.end),ease:P("ease-in-out"),from:e.from,to:e.to}));}}let d=0,c=null;for(let t=s.parentElement;t?.parentElement;t=t.parentElement)if(/[ao]/.test(getComputedStyle(t).overflowY)&&t.scrollHeight>t.clientHeight&&(t!==document.body||/[aoh]/.test(getComputedStyle(t.parentElement).overflowY))){c=t;break}let m=0,p=0,w=()=>{let t=s.getBoundingClientRect().top;m=c?t-c.getBoundingClientRect().top-c.clientTop+c.scrollTop:t+window.scrollY,p=m+Math.max(0,s.offsetHeight-(c?c.clientHeight:window.innerHeight));},b=()=>{let t=c?c.scrollTop:window.scrollY;return p<=m?t>=m?1:0:b$2(t,m,p,1)},g=t=>{for(let n of f){let e=n.end-n.start,o=e<=0?t>=n.end?1:0:O((t-n.start)/e),r=n.ease(o);n.kind==="draw"?n.el.style.strokeDashoffset=String(n.length*(1-r)):n.el.style.opacity=String(n.from+(n.to-n.from)*r);}};if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return g(1),R(1);let S=()=>{d=b(),g(d);};w(),S();let E=e(c||window,[s],b,S,w);a$1(s,{type:"draw",getProgress:()=>d,getTrigger:()=>({tStart:m,tEnd:p})});let v=a$2(t=>{t&&(v(),E.off(),b$1(s),d=1,g(1));});return {destroy(){v(),E.off(),b$1(s);},getProgress:()=>d}}};
2
+ export{D as a};
@@ -0,0 +1 @@
1
+ import {a,e,c,b as b$2}from'./chunk-NV6YTPHI.mjs';import {f}from'./chunk-IXR6RML7.mjs';import {a as a$1}from'./chunk-5PJEKEEP.mjs';import {a as a$2,b as b$1}from'./chunk-EBU6E26L.mjs';import {b}from'./chunk-LFSU6LR3.mjs';var I={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Oe(c){let d=c>1?[0,c-1]:[0],f=[[0,c-1]];for(let n=0;n<f.length;n++){let[l,g]=f[n];if(g-l<2)continue;let x=l+g>>1;d.push(x),f.push([l,x],[x,g]);}return d}function $e(c$1,d){if(typeof window>"u")return I;let f$1=typeof c$1=="string"?document.querySelector(c$1):c$1;if(!f$1||f$1.tagName.toLowerCase()!=="canvas")return b("scrollFrames: <canvas> element not found:",c$1),I;let n=f$1,{frames:l,trigger:g={},easing:x="linear",once:j=false,axis:A="y",fit:ye="cover",triggerElement:be,onReady:ve,onLoad:Me,onComplete:xe,onProgress:Ee}=d||{},h=Array.isArray(l)?l:null,J=d?.count,p=Math.floor(h?Math.min(J??h.length,h.length):J??NaN);if(!(h||typeof l=="function")||!Number.isFinite(p)||p<1)return b("scrollFrames: no frames. Pass `frames` as an array of URLs, or a function with a finite `count` of 1 or more.",n),I;let w=d.concurrency??6;(!Number.isFinite(w)||w<1)&&(b("scrollFrames: `concurrency` must be a finite number of 1 or more; using 6.",d.concurrency),w=6),w=Math.floor(w);let N=n.getContext("2d");if(!N)return b("scrollFrames: the canvas has no 2D context.",n),I;let y=p-1,K=be??n,i=window.matchMedia("(prefers-reduced-motion: reduce)").matches,Fe=f(x),Q=e=>{let t=Fe(e);return t===t?t:0},Re=a(g.start||"top top"),Se=a(g.end||"bottom top"),C=0,P=0,E=false,W=-1,T=0,b$3=0,L=false,a$3=false,V=false,Z=false,$=0,D=-1,O=new Array(p),U=new Uint8Array(p),F=new Set,v=i?[y]:Oe(p),q=0,_=0,ee=false,z=(e,...t)=>{if(e)try{e(...t);}catch(r){typeof reportError=="function"?reportError(r):setTimeout(()=>{throw r});}},te=false,Ae=e=>{let t;try{t=h?h[e]:l(e);}catch(r){t=r;}return typeof t=="string"&&t?t:(te||(te=true,b(`scrollFrames: no URL for frame ${e}; it is skipped for its nearest neighbour.`,t)),null)},re=()=>A==="x"?window.scrollX:window.scrollY,Ce=()=>A==="x"?window.innerWidth:window.innerHeight;function B(){!ee&&_===v.length&&(ee=true,z(Me));}function G(){for(;!a$3&&F.size<w&&q<v.length;){let e=v[q++];U[e]||Pe(e);}}function Pe(e){U[e]=1;let t=Ae(e);if(t===null){_++,queueMicrotask(()=>{a$3||B();});return}let r=new Image,o=false,s=m=>{o||a$3||(o=true,r.onload=r.onerror=null,F.delete(r),m?O[e]=r:b("scrollFrames: a frame failed to load; its nearest neighbour shows instead:",t),_++,G(),k(),B());};F.add(r),r.decoding="async",r.onerror=()=>s(false),r.src=t,typeof r.decode=="function"?r.decode().then(()=>s(true),()=>{r.complete?s(r.naturalWidth>0):r.onload=()=>s(true);}):r.onload=()=>s(true);}function Te(e){for(let t=0;t<=y;t++){if(O[e-t])return e-t;if(O[e+t])return e+t}return -1}function X(){let e=n.clientWidth,t=n.clientHeight;if(!e||!t)return;let r=Math.min(window.devicePixelRatio||1,2),o=Math.round(e*r),s=Math.round(t*r);if(Math.abs(n.width-o)<=1&&Math.abs(n.height-s)<=1)return;n.width=o,n.height=s,D=-1;let m=n.clientWidth,S=n.clientHeight;if(m!==e||S!==t){let M=n.style;m!==e&&S!==t?(M.width=`${e}px`,M.height=`${t}px`):M.aspectRatio=`${e} / ${t}`;}}function k(){let e=Te($);if(e<0||e===D)return;let t=O[e],r=n.width,o=n.height,s=t.naturalWidth||r,m=t.naturalHeight||o,S=(ye==="contain"?Math.min:Math.max)(r/s,o/m),M=s*S,ue=m*S;N.clearRect(0,0,r,o),N.drawImage(t,(r-M)/2,(o-ue)/2,M,ue),D=e,V||(V=true,z(ve));}function H(e){$=Math.min(y,Math.max(0,Math.round(e*y))),n.style.setProperty("--scroll-draw-progress",String(e)),k(),z(Ee,e,$);}function ne(){let e=K.getBoundingClientRect(),t=A==="x"?e.left:e.top,r=A==="x"?e.width:e.height,o=c({top:t,height:r},re(),Ce(),Re,Se);C=o.tStart,P=o.tEnd,P===C&&r>0&&!i&&!Z&&(Z=true,b("scrollFrames: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",n));}let oe=()=>b$2(re(),C,P,1);function Le(){if(i)return;let e=oe(),t=j?Math.max(W,Q(T=Math.max(T,e))):Q(e);b$3=t,H(t),t>=1&&!L?(L=true,z(xe)):t<1&&!j&&(L=false);}function se(){b$3=1,H(1);}X(),i||ne();let R=e(window,[K],oe,Le,()=>{X(),i||ne(),k();}),ie=()=>R.hold(E||i);ie(),i&&se(),G();let ae=typeof ResizeObserver=="function"?new ResizeObserver(()=>{X(),k();}):null;ae?.observe(n);let ce=i?()=>{}:a$1(e=>{e&&(ce(),i=true,R.hold(true),v=v.slice(0,q),U[y]||v.push(y),B(),se(),G());});a$2(n,{type:"frames",getProgress:()=>b$3,getTrigger:()=>({tStart:C,tEnd:P})});function le(){a$3||!E||(E=false,ie());}return {destroy(){if(!a$3){a$3=true,R.off(),ae?.disconnect(),ce();for(let e of F)e.onload=e.onerror=null,e.src="";F.clear(),b$1(n);}},replay(){a$3||(W=-1,T=0,L=false,b$3=0,H(0),le());},pause(){a$3||(E=true,R.hold(true));},resume:le,seek(e){if(a$3)return;let t=Math.min(1,Math.max(0,e===e?e:0));b$3=t,W=t,T=0,E=true,R.hold(true),H(t);},getProgress(){return b$3}}}export{$e as a};
@@ -0,0 +1 @@
1
+ import {b,a as a$4}from'./chunk-7LDSB4FT.mjs';import {a as a$3}from'./chunk-UPWWULKI.mjs';import {a}from'./chunk-2PYLM3E7.mjs';import {a as a$1,e,b as b$1,c}from'./chunk-NV6YTPHI.mjs';import {f}from'./chunk-IXR6RML7.mjs';import {a as a$2,b as b$3}from'./chunk-EBU6E26L.mjs';import {b as b$2}from'./chunk-LFSU6LR3.mjs';function wt(t){return t.startsWith("#")||t.startsWith("rgb")||t.startsWith("hsl")}function ut(t){let i=[],l=/([\w]+)\(([^)]*)\)/g,s;for(;(s=l.exec(t))!==null;){let m=[],o=[],c=s[2].trim();if(c)for(let u of c.split(/[\s,]+/)){let n=u.match(/^([-+]?[\d.eE]+)(.*)$/);m.push(n?parseFloat(n[1]):0),o.push(n?n[2]:"");}i.push({fn:s[1],nums:m,units:o});}return i}function Mt(t,i,l){let s=ut(t),m=ut(i);return s.length===0||s.length!==m.length?l<1?t:i:s.map((o,c)=>{let u=m[c];return o.fn!==u.fn||o.nums.length!==u.nums.length?l<1?`${o.fn}(${o.nums.map((n,p)=>`${n}${o.units[p]}`).join(", ")})`:`${u.fn}(${u.nums.map((n,p)=>`${n}${u.units[p]}`).join(", ")})`:`${o.fn}(${o.nums.map((n,p)=>`${n+(u.nums[p]-n)*l}${o.units[p]}`).join(", ")})`}).join(" ")}function ft(t,i,l){if(typeof t=="number"&&typeof i=="number")return String(t+(i-t)*l);let s=String(t),m=String(i);if(wt(s))return a$4(s,m,l);if(s.includes("("))return Mt(s,m,l);let o=s.match(/^([-+]?[\d.]+)(.*)$/),c=m.match(/^([-+]?[\d.]+)(.*)$/);if(o&&c){let u=parseFloat(o[1]),n=parseFloat(c[1]);return `${u+(n-u)*l}${o[2]||c[2]}`}return l<1?s:m}function Lt(t){return t.replace(/([A-Z])/g,i=>`-${i.toLowerCase()}`)}var $t=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),At=0,pt="--scroll-draw-progress";function Ct(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var dt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Wt(t,i){return typeof window>"u"?dt:i.respectReducedMotion===false?gt(t,i,false):a(i,(l,s)=>gt(t,l,s))}function gt(t,i,l){let{props:s,trigger:m={},easing:o="ease-out",speed:c$1=1,once:u=false,axis:n="y",scrollContainer:p,native:yt=true,velocityScale:H=false,triggerElement:ht,onProgress:G,onComplete:I,onEnter:q,onLeave:U,onEnterBack:X,onLeaveBack:Y}=i,x=f(o,"ease-out"),Z=a$1(m.start||"top bottom"),J=a$1(m.end||"bottom top"),R=ht??t,y=typeof p=="string"?document.querySelector(p):p??null,h=Object.entries(s).map(([e,r])=>({prop:Lt(e),from:Array.isArray(r)?r[0]:"",to:Array.isArray(r)?r[1]:r}));function Et(){let e=window.getComputedStyle(t);for(let r of h)r.from===""&&(r.from=e.getPropertyValue(r.prop).trim()||"0");}function bt(){for(let e of h)t.style.setProperty(e.prop,String(e.to));}let V=new Map;for(let e of [...h.map(r=>r.prop),pt])V.set(e,t.style.getPropertyValue(e));function O(){for(let[e,r]of V)r?t.style.setProperty(e,r):t.style.removeProperty(e);}if(l)return bt(),I?.(),{...dt,destroy:O,getProgress:()=>1};Et();let M=()=>y?n==="x"?y.scrollLeft:y.scrollTop:n==="x"?window.scrollX:window.scrollY,K=()=>y?n==="x"?y.clientWidth:y.clientHeight:n==="x"?window.innerWidth:window.innerHeight,Q=typeof o=="string"?b(o):null;function vt(){if(!yt||!Ct()||!Q||n!=="y"||y||R!==t||u||c$1!==1||G||I||q||U||X||Y||H!==false||(m.start||"top bottom").trim()!=="top bottom"||(m.end||"bottom top").trim()!=="bottom top")return false;for(let e of h)if(!$t.has(e.prop))return false;return true}function St(){let e=`ssd-a-${++At}`,r=h.map(a=>`${a.prop}:${a.from}`).join(";"),w=h.map(a=>`${a.prop}:${a.to}`).join(";"),b=document.createElement("style");b.setAttribute("data-ssd-animate",""),b.textContent=`@keyframes ${e}{from{${r}}to{${w}}}.${e}{animation-name:${e};animation-duration:auto;animation-timing-function:${Q};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(b),t.classList.add(e);let d=()=>{let a=t.getBoundingClientRect();return c({top:a.top,height:a.height},M(),K(),Z,J)};a$2(t,{type:"animate",getProgress:()=>f.getProgress(),getTrigger:d});let f={refresh(){},destroy(){t.classList.remove(e),b.remove(),t.style.animationPlayState="",O(),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 A=Math.min(1,Math.max(0,a));t.classList.remove(e);for(let F of h)t.style.setProperty(F.prop,ft(F.from,F.to,A));},getProgress(){let{tStart:a,tEnd:A}=d();return x(b$1(M(),a,A,c$1))}};return f}if(vt())return St();let g=0,E=0,T=false,W=-1,P=0,v=0,k=false,S=NaN,B=-1,tt=0,L=R===t?h:[],et=false;function rt(){let e=t.style,r=L.map(f=>e.getPropertyValue(f.prop)),w=e.transition;L.length&&(e.transition="none"),L.forEach(f=>e.setProperty(f.prop,V.get(f.prop)??""));let b=a$3(R,y,n);L.forEach((f,a)=>e.setProperty(f.prop,r[a])),L.length&&(t.offsetWidth,e.transition=w);let d=c(b,b.scroll,K(),Z,J);et&&Math.abs(d.tStart-g)<1&&Math.abs(d.tEnd-E)<1||(et=true,g=d.tStart,E=d.tEnd);}function N(e){t.style.setProperty(pt,String(e));for(let r of h)t.style.setProperty(r.prop,ft(r.from,r.to,e));G?.(e);}function Tt(e){if(isNaN(S)){S=e;return}S<=0&&e>0&&q?.(),S<1&&e>=1&&U?.(),S>=1&&e<1&&X?.(),S>0&&e<=0&&Y?.(),S=e;}function Pt(){if(T)return;let e=performance.now(),r=M(),w=c$1;if(H!==false){let a=e-tt,A=a>0?Math.abs(r-(B<0?r:B))/a:0;w=c$1*Math.max(.2,1+A*(typeof H=="number"?H:1)*.04);}B=r,tt=e;let b=E===g?0:(r-g)/(E-g);Tt(b);let d=b$1(r,g,E,w),f=u?Math.max(W,x(P=Math.max(P,d))):x(d);v=f,N(f),f>=1&&!k?(k=true,I?.()):f<1&&!u&&(k=false);}let $=e(y??window,[R],()=>b$1(M(),g,E,Math.min(c$1,1)),Pt,rt);rt(),E===g&&b$2("scrollAnimate: zero-length trigger window, so it never animates. In a sticky stage, set triggerElement.",t),P=b$1(M(),g,E,c$1),v=x(P),N(v),a$2(t,{type:"animate",getProgress:()=>v,getTrigger:()=>({tStart:g,tEnd:E})});function nt(){T=true,$.hold(true);}return {destroy(){T=true,$.off(),O(),b$3(t);},replay(){W=-1,P=0,k=false,v=0,T=false,N(0),$.hold(false);},pause:nt,resume(){T&&(T=false,$.hold(false));},seek(e){let r=Math.min(1,Math.max(0,e));v=r,W=r,P=0,nt(),N(r);},getProgress(){return v},refresh:$.remeasure}}export{Wt as a};
@@ -0,0 +1 @@
1
+ import {a,e,c,b as b$2}from'./chunk-NV6YTPHI.mjs';import {f}from'./chunk-IXR6RML7.mjs';import {a as a$1}from'./chunk-5PJEKEEP.mjs';import {a as a$2,b as b$1}from'./chunk-EBU6E26L.mjs';import {b}from'./chunk-LFSU6LR3.mjs';var W={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function se(c$1,h={}){if(typeof window>"u")return W;let v=typeof c$1=="string"?document.querySelector(c$1):c$1;if(!v||v.tagName.toLowerCase()!=="video")return b("scrollVideo: <video> element not found:",c$1),W;let t=v,{trigger:P={},easing:X="linear",once:C=false,axis:u="y",preload:Y="auto",triggerElement:j,onReady:N,onComplete:J,onProgress:K}=h,V=j??t,a$3=window.matchMedia("(prefers-reduced-motion: reduce)").matches,L=f(X),Q=a(P.start||"top top"),U=a(P.end||"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=Y);let R=h.from??0,y=h.to,m=0,f$1=0,r=false,E=-1,g=0,n=0,p=false,i=false,z=()=>u==="x"?window.scrollX:window.scrollY,Z=()=>u==="x"?window.innerWidth:window.innerHeight;function b$3(){let e=V.getBoundingClientRect(),o=u==="x"?e.left:e.top,d=u==="x"?e.width:e.height,k=c({top:o,height:d},z(),Z(),Q,U);m=k.tStart,f$1=k.tEnd,i&&f$1===m&&b("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t);}let w=NaN;function s(e){if(!i)return;let o=y??t.duration??0,d=R+(o-R)*e;d!==w&&(w=d,t.currentTime=d),t.style.setProperty("--scroll-draw-progress",String(e)),K?.(e);}let A=()=>b$2(z(),m,f$1,1);function $(){if(!i||a$3)return;let e=A(),o=C?Math.max(E,L(g=Math.max(g,e))):L(e);n=o,s(o),o>=1&&!p?(p=true,J?.()):o<1&&!C&&(p=false);}let l=e(window,[V],A,$,b$3),x=()=>l.hold(r||!i||a$3);x();function S(){if(i=true,y===void 0&&(y=t.duration),a$3){s(1),N?.();return}b$3(),N?.(),r?s(n):x();}t.readyState>=1?S():t.addEventListener("loadedmetadata",S,{once:true}),i||b$3();let I=a$3?()=>{}:a$1(e=>{e&&(I(),a$3=true,l.hold(true),s(1));});a$2(t,{type:"video",getProgress:()=>n,getTrigger:()=>({tStart:m,tEnd:f$1})});function O(){r&&(r=false,x());}return {destroy(){l.off(),t.removeEventListener("loadedmetadata",S),I(),b$1(t);},replay(){E=-1,g=0,p=false,n=0,w=NaN,s(0),O();},pause(){r=true,l.hold(true);},resume:O,seek(e){let o=Math.min(1,Math.max(0,e));n=o,E=o,g=0,r=true,l.hold(true),w=NaN,s(o);},getProgress(){return n}}}export{se as a};
@@ -0,0 +1 @@
1
+ import {b}from'./chunk-LFSU6LR3.mjs';function M({tension:e=2.5,friction:o=2.2}={}){return n=>1-Math.cos(n*Math.PI*e)*Math.pow(1-n,o)}function d({bounces:e=3,decay:o=.5}={}){let n=Math.max(1,Math.round(e)),a=Math.max(.01,Math.min(.99,o)),c=Math.sqrt(a),r=0,t=[];for(let i=0;i<n;i++){let s=Math.pow(c,i);t.push(s),r+=s;}let u=[0],m=0;for(let i=0;i<n;i++)m+=t[i]/r,u.push(m);return i=>{if(i<=0)return 0;if(i>=1)return 1;for(let s=0;s<n;s++)if(i<=u[s+1]){let b=(i-u[s])/(u[s+1]-u[s]);if(s===0)return b*(2-b);let p=1-Math.pow(a,s);return p+(1-p)*(2*b-1)*(2*b-1)}return 1}}function w({amplitude:e=1,period:o=.4}={}){let n=Math.max(1,e),a=Math.max(.1,o),c=n<=1?a/4:a/(2*Math.PI)*Math.asin(1/n);return r=>r<=0?0:r>=1?1:n*Math.pow(2,-10*r)*Math.sin((r-c)*(2*Math.PI)/a)+1}var f={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:M(),bounce:d(),elastic:w()};function E(e,o,n,a){let c=(r,t,u)=>((1+3*r-3*t)*u+3*t-6*r)*u*u+3*r*u;return r=>{if(r<=0||r>=1)return +(r>0);let t=r;for(let u=0;u<8;u++)t-=(c(e,n,t)-r)/((3*(1+3*e-3*n)*t+6*n-12*e)*t+3*e);if(!(t>=0&&t<=1&&Math.abs(c(e,n,t)-r)<1e-9))for(let u=0,m=0,i=1;u<30;u++)t=(m+i)/2,c(e,n,t)<r?m=t:i=t;return c(o,a,t)}}function g(e){let o=/^cubic-bezier\((.*)\)$/.exec(e==="ease"?"cubic-bezier(.25,.1,.25,1)":e.trim()),n=o?o[1].split(",").map(parseFloat):[];if(n.length===4&&n.every(Number.isFinite)&&n[0]*(1-n[0])>=0&&n[2]*(1-n[2])>=0)return [E(n[0],n[1],n[2],n[3]),`cubic-bezier(${n})`]}var l=new Set;function S(e,o="linear"){if(typeof e=="function")return e;if(e==null)return f[o];if({}.hasOwnProperty.call(f,e))return f[e];let n=g(String(e));return n?n[0]:(!l.has(e)&&l.add(e)&&b(`Unknown easing ${JSON.stringify(e)}: use a name, cubic-bezier() or a function.`),f[o])}export{M as a,d as b,w as c,f as d,g as e,S as f};
@@ -0,0 +1 @@
1
+ import {b as b$1}from'./chunk-LFSU6LR3.mjs';var f=new WeakMap,a=0;function i(t){return JSON.stringify(t,(r,e)=>{if(typeof e=="function")return "\u0192";if(typeof Element<"u"&&e instanceof Element){let n=f.get(e);return n===void 0&&f.set(e,n=++a),`el#${n}`}return e})}function c(t,r){let e={...t};for(let n of Object.keys(e))typeof e[n]=="function"&&(e[n]=(...o)=>r()[n]?.(...o));return e}var l=1e4;function y(t){let{frames:r,count:e}=t;if(typeof r!="function")return i(t);let n=Number.isFinite(e)?Math.min(Math.max(Math.floor(e),0),l):0,o;try{o=Array.from({length:n},(m,s)=>r(s));}catch{o=["throws"];}return i({...t,frames:o})}function b(t,r="<ScrollFrames>"){if(!t||t.getAttribute("aria-hidden")==="true")return;let e=t.getAttribute("role");e==="presentation"||e==="none"||t.getAttribute("aria-label")||t.getAttribute("aria-labelledby")||b$1(`${r}: the canvas has no aria-label. Say what the frames show, or set aria-hidden="true" if they are decoration.`,t);}export{i as a,c as b,y as c,b as d};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-GBFWTY5L.mjs';import {b}from'./chunk-LFSU6LR3.mjs';function l(m,{triggerElement:e,...a$1},s){let r=e;return typeof e=="string"&&typeof document<"u"&&(r=document.querySelector(e),r||b(`scrollFrames: triggerElement "${e}" matches nothing; measuring the canvas.`)),a(m,{...a$1,frames:s.frames,triggerElement:r??void 0})}export{l as a};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-HAGTU5EX.mjs';import {b}from'./chunk-LFSU6LR3.mjs';var n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function P(e,o){if(typeof window>"u")return n;let r=typeof e=="string"?document.querySelector(e):e;return r?a(r,o):(b("scrollAnimate: element not found:",e),n)}function w(e,o={}){if(typeof window>"u")return n;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return b("scrollParallax: element not found:",e),n;let{speed:m=.3,axis:p="y",easing:f="linear",trigger:g,onProgress:u}=o,i=-m*100,s=r.style,c=!!r.ownerSVGElement,y=s.getPropertyValue("transform-box");c&&s.setProperty("transform-box","fill-box");let l=a(r,{props:p==="x"?{transform:["translateX(0%)",`translateX(${i}%)`]}:{transform:["translateY(0%)",`translateY(${i}%)`]},trigger:g??{start:"top bottom",end:"bottom top"},easing:f,native:false,onProgress:u});return c?{...l,destroy(){l.destroy(),s.setProperty("transform-box",y);}}:l}export{P as a,w as b};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-2PYLM3E7.mjs';import {a as a$1,e,c,b as b$2}from'./chunk-NV6YTPHI.mjs';import {f}from'./chunk-IXR6RML7.mjs';import {a as a$3}from'./chunk-4DOJSIEQ.mjs';import {a as a$2,b as b$1}from'./chunk-EBU6E26L.mjs';import {b}from'./chunk-LFSU6LR3.mjs';function R(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 w(e=""){let o=document.createElement("span");return o.setAttribute("aria-hidden","true"),o.textContent=e,o}function _(e){let o=e.textContent??"";return e.textContent="",o.split(/(\s+)/).filter(Boolean).map(t=>{let n=e.appendChild(w(t)),i=/^\s+$/.test(t);return i?n.style.whiteSpace="pre":n.style.display="inline-block",i?null:n}).filter(t=>t!==null)}function X(e){let o=e.textContent??"";e.textContent="";let t=[],n=null;for(let i of o){let r=w(i),s=i===" ";s?r.style.whiteSpace="pre":(r.style.display="inline-block",t.push(r)),s||i>"\u0DFF"?n=null:n||(n=e.appendChild(w()),n.style.cssText="display:inline-block;white-space:nowrap"),(n??e).appendChild(r);}return t}function W(e){let o=_(e),t=new Map;for(let r of o){let s=r.offsetTop;t.has(s)||t.set(s,[]),t.get(s).push(r);}let n=[],i=Array.from(t.keys()).sort((r,s)=>r-s);for(let r of i){let s=t.get(r),p=w();p.style.display="inline-block",s.forEach((d,m)=>{let f=d.nextElementSibling;p.appendChild(d),m<s.length-1&&f&&f.style.whiteSpace==="pre"&&p.appendChild(f);}),n.push(p);}return e.textContent="",n.forEach((r,s)=>{e.appendChild(r),s<n.length-1&&e.appendChild(document.createTextNode(" "));}),n}function J(e,o,t,n){if(t<=1||n===0)return e;n=Math.min(n,1/t);let i=(t-1)*n,r=o*n,s=r+(1-i);return s<=r?e>=r?1:0:a$3((e-r)/(s-r),0,1)}function K(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 L={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function se(e,o={}){if(typeof window>"u")return L;let t=typeof e=="string"?document.querySelector(e):e;if(!t)return b("scrollText: element not found:",e),L;let n=t;return a(o,(i,r)=>Q(n,i,r))}function Q(e$1,o,t){let{split:n="words",stagger:i=.04,easing:r="ease-out",from:s={opacity:0,y:24},trigger:p={},once:d=true,onComplete:m}=o,f$1=f(r,"ease-out"),j=a$1(p.start||"top 85%"),q=a$1(p.end||"top 40%"),S=e$1.innerHTML,v=e$1.textContent??"",a;n==="chars"?a=X(e$1):n==="lines"?a=W(e$1):a=_(e$1),R(e$1,v);let z=a.length;function F(l,T){s?.opacity!==void 0&&(l.style.opacity=String(s.opacity+(1-s.opacity)*T));let x=K(T,s);x&&(l.style.transform=x);}function c$1(l){e$1.style.setProperty("--scroll-draw-progress",String(l)),a.forEach((T,x)=>{let U=f$1(J(l,x,z,i));F(T,U);});}if(t)return c$1(1),m?.(),{...L,destroy:()=>{e$1.innerHTML=S;},getProgress:()=>1};c$1(0);let b=0,E=0,g=-1,u=0,h=false;function I(){({tStart:b,tEnd:E}=c(e$1.getBoundingClientRect(),window.scrollY,window.innerHeight,j,q));}let C=()=>b$2(window.scrollY,b,E,1);function G(){let l=d?g=Math.max(g,C()):C();u=l,c$1(l),l>=1&&!h?(h=true,m?.()):l<1&&!d&&(h=false);}I();let y=e(window,[e$1],C,G,()=>{n==="lines"&&(e$1.innerHTML=S,a=W(e$1),R(e$1,v),c$1(u)),I();});a$2(e$1,{type:"text",getProgress:()=>u,getTrigger:()=>({tStart:b,tEnd:E})});let P=()=>y.hold(false);return {destroy(){y.off(),e$1.innerHTML=S,b$1(e$1);},replay(){g=-1,h=false,u=0,c$1(0),P();},pause:()=>y.hold(true),resume:P,seek(l){y.hold(true),c$1(u=g=a$3(l,0,1));},getProgress(){return u}}}export{se as a};
@@ -0,0 +1,3 @@
1
+ import {b as b$1,a as a$7}from'./chunk-7LDSB4FT.mjs';import {a as a$2}from'./chunk-UPWWULKI.mjs';import {a as a$5}from'./chunk-XC5NR2MU.mjs';import {a as a$6}from'./chunk-YOOPMYT6.mjs';import {a}from'./chunk-2PYLM3E7.mjs';import {a as a$1,e,c,b as b$3}from'./chunk-NV6YTPHI.mjs';import {f}from'./chunk-IXR6RML7.mjs';import {a as a$4,b as b$2}from'./chunk-EBU6E26L.mjs';import {b,a as a$3}from'./chunk-LFSU6LR3.mjs';var ht={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 Ot=0;function Nt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function vt(r,p){let f="";try{f=getComputedStyle(r).getPropertyValue(p).trim();}catch{}return f||(r.getAttribute(p)??"").trim()}var wt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function Ft(r){if(!a$3)return;let p=vt(r,"stroke");if(!p||p==="none"){b("Element has no stroke \u2014 path will not be visible.",r);return}let f=(r.getAttribute("fill")??"").trim();f&&!wt.has(f)&&!wt.has(vt(r,"fill"))&&b("Element has a fill \u2014 it may obscure the stroke animation.",r);}function Ht(r,p,f){let d=document.createElement("div");d.setAttribute("data-svg-scroll-draw-debug",""),d.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 F=f==="x"?window.scrollX:window.scrollY,A=r-F,M=p-F,H=f==="x";d.innerHTML=`
2
+ <div style="position:absolute;${H?`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;${H?`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(d),window.addEventListener("scroll",x,{passive:true}),x(),{el:d,destroy(){window.removeEventListener("scroll",x),d.remove();}}}var bt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Et=/[MmLlHhVvCcSsQqTtAaZz]/g;function It(r,p,f){if(!a$3)return;let d=(r.match(Et)??[]).join("").toUpperCase(),x=(p.match(Et)??[]).join("").toUpperCase(),F=(r.match(bt)??[]).length,A=(p.match(bt)??[]).length;if(d!==x){b(`morphTo: command sequence differs (${d||"\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}F!==A&&b(`morphTo: coordinate count differs (${F} \u2192 ${A}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,f);}function Rt(r,p,f){let d=(p.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),x=0;return r.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,F=>{let A=parseFloat(F),M=d[x++]??A;return String(+(A+(M-A)*f).toFixed(4))})}function Kt(r,p={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:a(p,(f,d)=>Vt(r,f,d))}function Vt(r,p,f$1){let{preset:d,...x}=p,F=d?{...ht[d],...x}:x,{selector:A="path, polyline, line, polygon, rect, circle",speed:M=1,fade:H=false,easing:xe="linear",trigger:ge={},stagger:q=0,direction:u="forward",once:K=false,debug:Ve=false,axis:W="y",scrollContainer:Ae,autoReverse:Me=false,delay:le=0,strokeColor:B,strokeWidth:_,fillOpacity:j,waypoints:U,velocityScale:fe=false,threshold:St=0,rootMargin:Tt="0px",repeat:ce=0,repeatDelay:We=0,morphTo:L,clip:Pe,autoplay:ze=false,duration:$t=1e3,native:kt=true,onProgress:ue,onStart:he,onComplete:ve,onEnter:Ge,onLeave:qe,onEnterBack:Be,onLeaveBack:_e}=F,D=Pe===true?"left":typeof Pe=="string"?Pe:false,z=f(xe),je=a$1(ge.start||"top bottom"),Ue=a$1(ge.end||"bottom top"),P=typeof Ae=="string"?document.querySelector(Ae):Ae??null,ee=Array.isArray(B)?B[0]:null,te=Array.isArray(B)?B[1]:typeof B=="string"?B:null,X=Array.isArray(_)?_[0]:null,re=Array.isArray(_)?_[1]:typeof _=="number"?_:null,Y=Array.isArray(j)?j[0]:null,se=Array.isArray(j)?j[1]:typeof j=="number"?j:null;function oe(e){let t=e*100;switch(D){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=D?[]:Array.from(r.querySelectorAll(A)),S=[],C=[],w=0,O=0,we=q,Xe=0,Ye=0,k=false,I=false,R=0,Le=-1,be=[],Ee=-1,T=false,N=0,Q=0,Z,De=false,Ce=null;function Qe(){Ce?.destroy(),Ce=null;}let J=new Set,Ze=NaN,ne=true,Se=-1,Je=performance.now(),ie=NaN;function Te(){return P?W==="x"?P.scrollLeft:P.scrollTop:W==="x"?window.scrollX:window.scrollY}function Ke(){return P?W==="x"?P.clientWidth:P.clientHeight:W==="x"?window.innerWidth:window.innerHeight}function et(){let e=a$2(r,P,W);return c(e,e.scroll,Ke(),je,Ue)}function xt(){let e=O-w,t=c$1.length-1,s=P??document.documentElement,n=W==="x"?"Width":"Height";if(we=q,q>0&&t>0&&e>0){let y=s[`scroll${n}`]-s[`client${n}`]-1-w-e/M;y>=0&&(we=Math.min(q,y/(t*e)));}let m=Math.max(0,t)*we*e,b=e/Math.min(M,1);Xe=w+Math.min(0,m,b,m+b),Ye=w+Math.max(0,m,b,m+b);}function tt(){(({tStart:w,tEnd:O}=et())),xt(),Ve&&a$3&&(Qe(),Ce=Ht(w,O,W));}function Oe(e,t=et){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 rt(e,t){return K&&!Me?Math.max(Le,z(be[e]=Math.max(be[e]??0,t))):z(t)}function At(e,t){if(r.style.setProperty("--scroll-draw-progress",String(e)),D){let s=t==="reverse"?1-e:e;r.style.clipPath=oe(s);return}c$1.forEach((s,n)=>Ne(s,n,e,t));}function Ne(e,t,s,n){e.style.strokeDashoffset=n==="reverse"?`${S[t]*s}`:`${S[t]*(1-s)}`,H&&(e.style.opacity=n==="reverse"?`${1-s}`:`${s}`),ee&&te?e.style.stroke=a$7(ee,te,s):te&&(e.style.stroke=te),X!==null&&re!==null?e.style.strokeWidth=`${X+(re-X)*s}`:re!==null&&(e.style.strokeWidth=`${re}`),Y!==null&&se!==null?e.style.fillOpacity=`${Y+(se-Y)*s}`:se!==null&&(e.style.fillOpacity=`${se}`),L&&e.tagName.toLowerCase()==="path"&&C[t]&&e.setAttribute("d",Rt(C[t],L,s));}function Fe(){if(r.style.setProperty("--scroll-draw-progress","0"),D){r.style.clipPath=oe(u==="reverse"?1:0);return}c$1.forEach((e,t)=>{e.style.strokeDasharray=a$6(S[t]),e.style.strokeDashoffset=u==="reverse"?"0":`${S[t]}`,H?e.style.opacity=u==="reverse"?"1":"0":e.style.opacity="",ee&&(e.style.stroke=ee),X!==null&&(e.style.strokeWidth=`${X}`),Y!==null&&(e.style.fillOpacity=`${Y}`),L&&e.tagName.toLowerCase()==="path"&&C[t]&&e.setAttribute("d",C[t]);});}function me(e,t){let s=e.getAttribute("d"),n=a$5(e);if(L&&C[t]){e.setAttribute("d",L);let m=a$5(e);e.setAttribute("d",C[t]),n=Math.max(a$5(e),m),e.setAttribute("d",s);}S[t]=n,e.style.strokeDasharray=a$6(n);}if(c$1.forEach((e,t)=>{Ft(e);let s=e.tagName.toLowerCase()==="path";s?C.push(e.getAttribute("d")??""):C.push(""),me(e,t);let n=S[t];L&&(s?It(C[C.length-1],L,e):b(`morphTo only applies to <path> elements \u2014 ignored on <${e.tagName}>.`,e)),f$1?(e.style.strokeDashoffset=u==="reverse"?`${n}`:"0",H&&(e.style.opacity="1"),te&&(e.style.stroke=te),re!==null&&(e.style.strokeWidth=`${re}`),se!==null&&(e.style.fillOpacity=`${se}`),L&&e.tagName.toLowerCase()==="path"&&e.setAttribute("d",L)):(e.style.strokeDashoffset=u==="reverse"?"0":`${n}`,H?e.style.opacity=u==="reverse"?"1":"0":e.style.opacity="",ee&&(e.style.stroke=ee),X!==null&&(e.style.strokeWidth=`${X}`),Y!==null&&(e.style.fillOpacity=`${Y}`));}),f$1)return D&&(r.style.clipPath=oe(1)),ve?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};D&&(r.style.clipPath=oe(u==="reverse"?1:0));let st=typeof xe=="string"?b$1(xe):null;function Mt(){return !(kt===false||ze||Ve&&a$3||!Nt()||!c$1.length||!st||D||W!=="y"||P||M!==1||q!==0||K||Me||fe!==false||L||U||ce||le>0||ue||he||ve||Ge||qe||Be||_e||B!=null||_!=null||j!=null||(ge.start||"top bottom").trim()!=="top bottom"||(ge.end||"bottom top").trim()!=="bottom top")}function Pt(){let e=++Ot,t=`svg-scroll-draw-${e}`,s=`svg-scroll-draw-host-${e}`,n=`--svg-scroll-draw-${e}`,m=u==="reverse"?"0":"var(--ssd-len)",b=u==="reverse"?"var(--ssd-len)":"0",y=`stroke-dashoffset:${m};`,a=`stroke-dashoffset:${b};`;H&&(y+=`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{${y}}to{${a}}}.${s}{view-timeline-name:${n};view-timeline-axis:block;}.${t}{animation-name:${t};animation-duration:auto;animation-timing-function:${st};animation-fill-mode:both;animation-timeline:${n};animation-range:cover 0% cover 100%;}`,document.head.appendChild(l),r.classList.add(s);function v(o,i){o.style.setProperty("--ssd-len",String(S[i])),o.style.strokeDasharray=a$6(S[i]),o.style.strokeDashoffset="",o.style.opacity="",o.style.animationPlayState="",o.classList.add(t);}c$1.forEach(v);let g=false,E=-1;function $(){if(E>=0)return E;let o=r.getBoundingClientRect(),{tStart:i,tEnd:h}=c({top:o.top,height:o.height},Te(),Ke(),je,Ue);return z(b$3(Te(),i,h,M))}return {destroy(){r.classList.remove(s),c$1.forEach(o=>{o.classList.remove(t),o.style.removeProperty("--ssd-len"),o.style.animationPlayState="";}),l.remove();},replay(){g=false,E=-1,c$1.forEach(v);},pause(){g=true,c$1.forEach(o=>{o.style.animationPlayState="paused";});},resume(){g&&(g=false,c$1.forEach(o=>{o.style.animationPlayState="running";}));},seek(o){let i=Math.min(1,Math.max(0,o));E=i,g=true,c$1.forEach((h,V)=>{h.classList.remove(t),h.style.strokeDashoffset=u==="reverse"?`${S[V]*i}`:`${S[V]*(1-i)}`,H&&(h.style.opacity=u==="reverse"?`${1-i}`:`${i}`);});},getProgress(){return $()},refresh(){c$1.forEach((o,i)=>{me(o,i),o.style.setProperty("--ssd-len",String(S[i]));});}}}if(Mt())return Oe(Pt());function Lt(){let e=Math.max(1,$t),t=D?e:e*(1+Math.max(0,c$1.length-1)*q),s=0,n=0,m=false;function b(E){let $=true,o=Math.min(1,Math.max(0,E/t));if(D){let i=Math.min(1,Math.max(0,E/e)),h=z(i);N=h,r.style.setProperty("--scroll-draw-progress",String(h)),r.style.clipPath=oe(u==="reverse"?1-h:h),ue?.(h),i<1&&($=false);}else {c$1.forEach((h,V)=>{let Ct=V*q*e,lt=Math.min(1,Math.max(0,(E-Ct)/e));Ne(h,V,z(lt),u),lt<1&&($=false);});let i=z(o);N=i,ue?.(i),r.style.setProperty("--scroll-draw-progress",String(i));}if(U){let i=z(o);for(let h in U){let V=parseFloat(h);i>=V&&!J.has(V)&&(J.add(V),U[h]?.());}}return $}function y(E){if(T)return;let $=E-s;I||(I=true,he?.());let o=b($);if(o&&!k){k=true,b(t),ve?.(),Q<(ce==="infinite"?1/0:ce??0)&&(Q++,Z=setTimeout(()=>{s=performance.now(),I=false,k=false,J.clear(),Fe(),R=requestAnimationFrame(y);},We));return}o||(R=requestAnimationFrame(y));}function a(){cancelAnimationFrame(R),clearTimeout(Z),s=performance.now(),n=0,T=false,I=false,k=false,Q=0,m=true,N=0,J.clear(),Fe(),R=requestAnimationFrame(y);}let l=new IntersectionObserver(E=>{E.forEach($=>{$.isIntersecting&&!(K&&k)?a():!$.isIntersecting&&!K&&!k&&(cancelAnimationFrame(R),clearTimeout(Z),m=false);});},{root:P??null,threshold:St,rootMargin:Tt}),v;function g(){clearTimeout(v),v=setTimeout(()=>c$1.forEach(me),150);}return window.addEventListener("resize",g),window.addEventListener("orientationchange",g),le>0?setTimeout(()=>l.observe(r),le):l.observe(r),{destroy(){cancelAnimationFrame(R),clearTimeout(Z),l.disconnect(),window.removeEventListener("resize",g),window.removeEventListener("orientationchange",g),clearTimeout(v);},replay(){Q=0,a();},pause(){T||!m||(T=true,n=performance.now()-s,cancelAnimationFrame(R));},resume(){T&&(T=false,m=true,s=performance.now()-n,R=requestAnimationFrame(y));},seek(E){let $=Math.min(1,Math.max(0,E));N=$,T=true,n=$*t,s=performance.now()-n,cancelAnimationFrame(R),b(n);},getProgress(){return N},refresh(){clearTimeout(v),c$1.forEach(me);}}}if(ze)return Oe(Lt());tt();let ot=()=>b$3(Te(),Xe,Ye,1);function nt(){k=true,ve?.(),Q<(ce==="infinite"?1/0:ce)&&(Q++,Z=setTimeout(()=>{De=true;},We));}function it(){Le=-1,be=[],I=false,k=false,De=false,J.clear(),Fe(),ne=true;}function Dt(){let e=performance.now(),t=Te();if(De&&ot()%1&&it(),!ne&&fe===false&&t===Ze)return;ne=false,Ze=t;let s=M;if(fe!==false){let a=e-Je,l=a>0?Math.abs(t-(Se<0?t:Se))/a:0;s=M*Math.max(.2,1+l*(typeof fe=="number"?fe:1)*.04);}Se=t,Je=e;let n=Me?Ee===-1||t>=Ee?"forward":"reverse":u;Ee=t;let m=O-w,b=true,y=m===0?0:(t-w)/m;if(isNaN(ie)||(ie<=0&&y>0&&Ge?.(),ie<1&&y>=1&&qe?.(),ie>=1&&y<1&&Be?.(),ie>0&&y<=0&&_e?.()),ie=y,D){let a=rt(0,b$3(t,w,O,s));N=a,r.style.setProperty("--scroll-draw-progress",String(a));let l=n==="reverse"?1-a:a;r.style.clipPath=oe(l),ue?.(a),!I&&b$3(t,w,O,s)>0&&(I=true,he?.()),a>=1&&!k?nt():a<1&&!K&&(k=false);return}if(c$1.forEach((a,l)=>{let v=l*we*m,g=rt(l,b$3(t,w+v,O+v,s));Ne(a,l,g,n),l===0&&(N=g,ue?.(g),r.style.setProperty("--scroll-draw-progress",String(g))),g<1&&(b=false);}),U){let a=z(b$3(t,w,O,s));for(let l in U){let v=parseFloat(l);a>=v&&!J.has(v)&&(J.add(v),U[l]?.());}}!I&&b$3(t,w,O,s)>0&&(I=true,he?.()),b&&!k?nt():!b&&!K&&(k=false);}let pe=e(P??window,[r],ot,Dt,()=>{let e=S.join();c$1.forEach(me),tt(),ne=true,S.join()!==e&&de();}),He=le>0;function de(){pe.hold(T||He);}let at;return He&&(at=setTimeout(()=>{He=false,de();},le)),de(),Oe({destroy(){clearTimeout(Z),clearTimeout(at),pe.off(),Qe();},replay(){it(),Ee=-1,Se=-1,Q=0,T=false,N=0,clearTimeout(Z),de();},pause(){T=true,pe.hold(true);},resume(){T&&(T=false,ne=true,de());},seek(e){let t=Math.min(1,Math.max(0,e));N=t,Le=t,be=[],T=true,pe.hold(true),At(t,u),ne=true;},getProgress(){return N},refresh:pe.remeasure},()=>({tStart:w,tEnd:O}))}export{ht as a,Kt as b};
@@ -0,0 +1 @@
1
+ function n(r){return `${r} ${r*2}`}export{n as a};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-2PYLM3E7.mjs';import {a as a$1,b as b$2,e,c}from'./chunk-NV6YTPHI.mjs';import {f}from'./chunk-IXR6RML7.mjs';import {a as a$2,b as b$3}from'./chunk-EBU6E26L.mjs';import {b as b$1}from'./chunk-LFSU6LR3.mjs';var b={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function U(t,p){if(typeof window>"u")return b;let a$1=typeof t=="string"?document.querySelector(t):t;return a$1?a(p,(l,c)=>N(a$1,l,c)):(b$1("scrollCounter: element not found:",t),b)}function N(t,p,a){let{from:l=0,to:c$1,format:F,easing:L="ease-out",trigger:C={},once:S=true,decimals:P,onComplete:v}=p,E=P!==void 0?e=>e.toFixed(P):F??(e=>String(Math.round(e))),f$1=f(L,"ease-out"),V=a$1(C.start||"top 80%"),_=a$1(C.end||"top 20%");if(a)return t.textContent=E(c$1),v?.(),{...b,getProgress:()=>1};let s=0,i=0,M=false,d=-1,o=0,n=0,u=false,h=()=>window.scrollY,q=()=>window.innerHeight;function x(){let e=t.getBoundingClientRect(),r=c({top:e.top,height:e.height},h(),q(),V,_);M&&Math.abs(r.tStart-s)<1&&Math.abs(r.tEnd-i)<1||(M=true,s=r.tStart,i=r.tEnd);}let B=t.style.getPropertyValue("--scroll-draw-progress");function g(e){t.textContent=E(l+(c$1-l)*e),t.style.setProperty("--scroll-draw-progress",String(e));}let T=()=>b$2(h(),s,i,1);function G(){let e=T(),r=S?Math.max(d,f$1(o=Math.max(o,e))):f$1(e);n=r,g(r),r>=1&&!u?(u=true,v?.()):r<1&&!S&&(u=false);}x();{o=b$2(h(),s,i,1);let e=f$1(o);n=e,g(e);}let m=e(window,[t],T,G,x);a$2(t,{type:"counter",getProgress:()=>n,getTrigger:()=>({tStart:s,tEnd:i})});let O=()=>m.hold(false);return {destroy(){m.off(),t.style.setProperty("--scroll-draw-progress",B),b$3(t);},replay(){d=-1,o=0,u=false,n=0,g(0),O();},pause:()=>m.hold(true),resume:O,seek(e){let r=Math.min(1,Math.max(0,e));n=r,d=r,o=0,m.hold(true),g(r);},getProgress(){return n}}}export{U as a};
@@ -1,2 +1,2 @@
1
- 'use strict';function W({tension:e=2.5,friction:n=2.2}={}){return t=>1-Math.cos(t*Math.PI*e)*Math.pow(1-t,n)}function Y({bounces:e=3,decay:n=.5}={}){let t=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,n)),o=Math.sqrt(r),s=0,u=[];for(let d=0;d<t;d++){let m=Math.pow(o,d);u.push(m),s+=m;}let l=[0],g=0;for(let d=0;d<t;d++)g+=u[d]/s,l.push(g);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let m=0;m<t;m++)if(d<=l[m+1]){let b=(d-l[m])/(l[m+1]-l[m]);if(m===0)return b*(2-b);let h=1-Math.pow(r,m);return h+(1-h)*(2*b-1)*(2*b-1)}return 1}}function B({amplitude:e=1,period:n=.4}={}){let t=Math.max(1,e),r=Math.max(.1,n),o=t<=1?r/4:r/(2*Math.PI)*Math.asin(1/t);return s=>s<=0?0:s>=1?1:t*Math.pow(2,-10*s)*Math.sin((s-o)*(2*Math.PI)/r)+1}var A={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:W(),bounce:Y(),elastic:B()};var z=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function T(e,...n){z&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var R=Symbol.for("svg-scroll-draw.registry");function k(){let e=globalThis;return e[R]||(e[R]=new Map)}function C(e,n){k().set(e,n);}function _(e){k().delete(e);}function D(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let n=window.matchMedia("(prefers-reduced-motion: reduce)"),t=o=>e(!!o.matches);if(typeof n.addEventListener=="function")return n.addEventListener("change",t),()=>n.removeEventListener("change",t);let r=n;return r.addListener?.(t),()=>r.removeListener?.(t)}var w,M=new Set,S=new WeakMap,v=new Map,H=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function $(e){let n=new Set;for(let t of e)for(;t&&t!==document.body;t=t.parentElement)for(let r=t;r;r=r.previousElementSibling)n.add(r);return n}function O(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let t=()=>n();w??(w=new ResizeObserver(o=>{let s=false;for(let{target:u}of o)S.get(u)!==H(u)&&(s=true),S.set(u,"");s&&M.forEach(u=>u());})),M.add(t);let r=$(e);return [document.body,document.documentElement].forEach(o=>o&&r.add(o)),r.forEach(o=>{S.has(o)||S.set(o,H(o)),v.set(o,(v.get(o)??0)+1),w.observe(o);}),()=>{M.delete(t)&&(r.forEach(o=>{let s=(v.get(o)??1)-1;if(s)return void v.set(o,s);v.delete(o),w?.unobserve(o);}),M.size||(w?.disconnect(),w=void 0));}}function G(e,n,t,r,o){let s,u=NaN,l,g,d=()=>{s=0,r(),!l&&!s&&(u=t())>0&&u<1&&(s=requestAnimationFrame(d));},m=()=>{!s&&!l&&t()!==u&&(s=requestAnimationFrame(d));},b=c=>{l=c,cancelAnimationFrame(s),s=u=NaN,m();},h=()=>{clearTimeout(g),o(),m();},y=()=>{clearTimeout(g),g=setTimeout(h,150);},E=O(n,y),i=c=>{e[c]("scroll",m,{passive:true}),window[c]("resize",y),window[c]("orientationchange",y);};return i("addEventListener"),m(),{hold:b,remeasure:h,off(){b(true),i("removeEventListener"),E(),clearTimeout(g);}}}function I(e,n,t){return Math.min(t,Math.max(n,e))}function N(e,n,t,r){return t===n?0:I((e-n)/(t-n)*r,0,1)}var P="http://www.w3.org/2000/svg",j="cinematic-photo",q=e=>e<0?0:e>1?1:e;function x(e){let n=parseFloat(e);return Number.isFinite(n)?q(n/100):0}function V(e){return A[e]??A.linear}var F=e=>({destroy(){},getProgress:()=>e}),Q=class{constructor(n){if(typeof document>"u"){this.mount=null;return}this.mount=typeof n.wrapper=="string"?document.querySelector(n.wrapper):n.wrapper,this.mount||T("Cinematic: wrapper not found:",n.wrapper);}loadStory(n){let t=this.mount;if(typeof window>"u"||!t)return F(0);t.style.position="relative",t.style.height=n.totalHeight,t.style.display="block";let r=document.createElement("div");r.setAttribute("data-cinematic-stage",""),r.style.cssText="position:sticky;top:0;height:100vh;width:100%;overflow:hidden;display:block;",t.appendChild(r);let o=[];for(let i of n.scenes){if(i.background){let a=document.createElement("img");a.id=j,a.src=i.background,a.alt="",a.style.cssText="position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;pointer-events:none;",r.appendChild(a);}let c=i.animations.filter(a=>a.type==="draw");if(c.length){let a=document.createElementNS(P,"svg");a.setAttribute("viewBox",`0 0 ${n.canvas.width} ${n.canvas.height}`),a.setAttribute("preserveAspectRatio","xMidYMid meet"),a.style.cssText="position:absolute;inset:0;width:100%;height:100%;overflow:visible;",r.appendChild(a);for(let f of c){let p=document.createElementNS(P,"path");p.id=f.target.replace(/^#/,""),p.setAttribute("d",f.d),p.setAttribute("fill","none"),p.setAttribute("stroke",f.stroke),p.setAttribute("stroke-width",String(f.strokeWidth)),p.setAttribute("stroke-linecap","round"),p.setAttribute("stroke-linejoin","round");let L=f.length||p.getTotalLength?.()||0;p.style.strokeDasharray=String(L),p.style.strokeDashoffset=String(L),a.appendChild(p),o.push({kind:"draw",el:p,start:x(f.start),end:x(f.end),ease:V(f.easing),length:L});}}for(let a of i.animations){if(a.type!=="fade")continue;let f=r.querySelector(a.target)??document.querySelector(a.target);f&&(f.style.opacity=String(a.from),o.push({kind:"fade",el:f,start:x(a.start),end:x(a.end),ease:V("ease-in-out"),from:a.from,to:a.to}));}}let s=0,u=null;for(let i=t.parentElement;i?.parentElement;i=i.parentElement)if(/[ao]/.test(getComputedStyle(i).overflowY)&&i.scrollHeight>i.clientHeight&&(i!==document.body||/[aoh]/.test(getComputedStyle(i.parentElement).overflowY))){u=i;break}let l=0,g=0,d=()=>{let i=t.getBoundingClientRect().top;l=u?i-u.getBoundingClientRect().top-u.clientTop+u.scrollTop:i+window.scrollY,g=l+Math.max(0,t.offsetHeight-(u?u.clientHeight:window.innerHeight));},m=()=>{let i=u?u.scrollTop:window.scrollY;return g<=l?i>=l?1:0:N(i,l,g,1)},b=i=>{for(let c of o){let a=c.end-c.start,f=a<=0?i>=c.end?1:0:q((i-c.start)/a),p=c.ease(f);c.kind==="draw"?c.el.style.strokeDashoffset=String(c.length*(1-p)):c.el.style.opacity=String(c.from+(c.to-c.from)*p);}};if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return b(1),F(1);let h=()=>{s=m(),b(s);};d(),h();let y=G(u||window,[t],m,h,d);C(t,{type:"draw",getProgress:()=>s,getTrigger:()=>({tStart:l,tEnd:g})});let E=D(i=>{i&&(E(),y.off(),_(t),s=1,b(1));});return {destroy(){E(),y.off(),_(t);},getProgress:()=>s}}};
2
- exports.Cinematic=Q;
1
+ 'use strict';var B=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function M(e,...n){B&&console.warn(`[svg-scroll-draw] ${e}`,...n);}function Y({tension:e=2.5,friction:n=2.2}={}){return t=>1-Math.cos(t*Math.PI*e)*Math.pow(1-t,n)}function j({bounces:e=3,decay:n=.5}={}){let t=Math.max(1,Math.round(e)),s=Math.max(.01,Math.min(.99,n)),i=Math.sqrt(s),o=0,r=[];for(let m=0;m<t;m++){let l=Math.pow(i,m);r.push(l),o+=l;}let u=[0],p=0;for(let m=0;m<t;m++)p+=r[m]/o,u.push(p);return m=>{if(m<=0)return 0;if(m>=1)return 1;for(let l=0;l<t;l++)if(m<=u[l+1]){let g=(m-u[l])/(u[l+1]-u[l]);if(l===0)return g*(2-g);let h=1-Math.pow(s,l);return h+(1-h)*(2*g-1)*(2*g-1)}return 1}}function J({amplitude:e=1,period:n=.4}={}){let t=Math.max(1,e),s=Math.max(.1,n),i=t<=1?s/4:s/(2*Math.PI)*Math.asin(1/t);return o=>o<=0?0:o>=1?1:t*Math.pow(2,-10*o)*Math.sin((o-i)*(2*Math.PI)/s)+1}var S={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:Y(),bounce:j(),elastic:J()};function K(e,n,t,s){let i=(o,r,u)=>((1+3*o-3*r)*u+3*r-6*o)*u*u+3*o*u;return o=>{if(o<=0||o>=1)return +(o>0);let r=o;for(let u=0;u<8;u++)r-=(i(e,t,r)-o)/((3*(1+3*e-3*t)*r+6*t-12*e)*r+3*e);if(!(r>=0&&r<=1&&Math.abs(i(e,t,r)-o)<1e-9))for(let u=0,p=0,m=1;u<30;u++)r=(p+m)/2,i(e,t,r)<o?p=r:m=r;return i(n,s,r)}}function U(e){let n=/^cubic-bezier\((.*)\)$/.exec(e==="ease"?"cubic-bezier(.25,.1,.25,1)":e.trim()),t=n?n[1].split(",").map(parseFloat):[];if(t.length===4&&t.every(Number.isFinite)&&t[0]*(1-t[0])>=0&&t[2]*(1-t[2])>=0)return [K(t[0],t[1],t[2],t[3]),`cubic-bezier(${t})`]}var R=new Set;function k(e,n="linear"){if(typeof e=="function")return e;if(e==null)return S[n];if({}.hasOwnProperty.call(S,e))return S[e];let t=U(String(e));return t?t[0]:(!R.has(e)&&R.add(e)&&M(`Unknown easing ${JSON.stringify(e)}: use a name, cubic-bezier() or a function.`),S[n])}function C(e){return `${e} ${e*2}`}var N=Symbol.for("svg-scroll-draw.registry");function O(){let e=globalThis;return e[N]||(e[N]=new Map)}function D(e,n){O().set(e,n);}function T(e){O().delete(e);}function F(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let n=window.matchMedia("(prefers-reduced-motion: reduce)"),t=i=>e(!!i.matches);if(typeof n.addEventListener=="function")return n.addEventListener("change",t),()=>n.removeEventListener("change",t);let s=n;return s.addListener?.(t),()=>s.removeListener?.(t)}var w,L=new Set,x=new WeakMap,v=new Map,H=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function X(e){let n=new Set;for(let t of e)for(;t&&t!==document.body;t=t.parentElement)for(let s=t;s;s=s.previousElementSibling)n.add(s);return n}function P(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let t=()=>n();w??(w=new ResizeObserver(i=>{let o=false;for(let{target:r}of i)x.get(r)!==H(r)&&(o=true),x.set(r,"");o&&L.forEach(r=>r());})),L.add(t);let s=X(e);return [document.body,document.documentElement].forEach(i=>i&&s.add(i)),s.forEach(i=>{x.has(i)||x.set(i,H(i)),v.set(i,(v.get(i)??0)+1),w.observe(i);}),()=>{L.delete(t)&&(s.forEach(i=>{let o=(v.get(i)??1)-1;if(o)return void v.set(i,o);v.delete(i),w?.unobserve(i);}),L.size||(w?.disconnect(),w=void 0));}}function G(e,n,t,s,i){let o,r=NaN,u,p,m=()=>{o=0,s(),!u&&!o&&(r=t())>0&&r<1&&(o=requestAnimationFrame(m));},l=()=>{!o&&!u&&t()!==r&&(o=requestAnimationFrame(m));},g=d=>{u=d,cancelAnimationFrame(o),o=r=NaN,l();},h=()=>{clearTimeout(p),i(),l();},y=()=>{clearTimeout(p),p=setTimeout(h,150);},E=P(n,y),a=d=>{e[d]("scroll",l,{passive:true}),window[d]("resize",y),window[d]("orientationchange",y);};return a("addEventListener"),l(),{hold:g,remeasure:h,off(){g(true),a("removeEventListener"),E(),clearTimeout(p);}}}function I(e,n,t){return Math.min(t,Math.max(n,e))}function V(e,n,t,s){return t===n?0:I((e-n)/(t-n)*s,0,1)}var z="http://www.w3.org/2000/svg",Z="cinematic-photo",W=e=>e<0?0:e>1?1:e;function _(e){let n=parseFloat(e);return Number.isFinite(n)?W(n/100):0}function $(e){return k(e)}var Q=e=>({destroy(){},getProgress:()=>e}),q=class{constructor(n){if(typeof document>"u"){this.mount=null;return}this.mount=typeof n.wrapper=="string"?document.querySelector(n.wrapper):n.wrapper,this.mount||M("Cinematic: wrapper not found:",n.wrapper);}loadStory(n){let t=this.mount;if(typeof window>"u"||!t)return Q(0);t.style.position="relative",t.style.height=n.totalHeight,t.style.display="block";let s=document.createElement("div");s.setAttribute("data-cinematic-stage",""),s.style.cssText="position:sticky;top:0;height:100vh;width:100%;overflow:hidden;display:block;",t.appendChild(s);let i=[];for(let a of n.scenes){if(a.background){let c=document.createElement("img");c.id=Z,c.src=a.background,c.alt="",c.style.cssText="position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;pointer-events:none;",s.appendChild(c);}let d=a.animations.filter(c=>c.type==="draw");if(d.length){let c=document.createElementNS(z,"svg");c.setAttribute("viewBox",`0 0 ${n.canvas.width} ${n.canvas.height}`),c.setAttribute("preserveAspectRatio","xMidYMid meet"),c.style.cssText="position:absolute;inset:0;width:100%;height:100%;overflow:visible;",s.appendChild(c);for(let b of d){let f=document.createElementNS(z,"path");f.id=b.target.replace(/^#/,""),f.setAttribute("d",b.d),f.setAttribute("fill","none"),f.setAttribute("stroke",b.stroke),f.setAttribute("stroke-width",String(b.strokeWidth)),f.setAttribute("stroke-linecap","round"),f.setAttribute("stroke-linejoin","round");let A=b.length||f.getTotalLength?.()||0;f.style.strokeDasharray=C(A),f.style.strokeDashoffset=String(A),c.appendChild(f),i.push({kind:"draw",el:f,start:_(b.start),end:_(b.end),ease:$(b.easing),length:A});}}for(let c of a.animations){if(c.type!=="fade")continue;let b=s.querySelector(c.target)??document.querySelector(c.target);b&&(b.style.opacity=String(c.from),i.push({kind:"fade",el:b,start:_(c.start),end:_(c.end),ease:$("ease-in-out"),from:c.from,to:c.to}));}}let o=0,r=null;for(let a=t.parentElement;a?.parentElement;a=a.parentElement)if(/[ao]/.test(getComputedStyle(a).overflowY)&&a.scrollHeight>a.clientHeight&&(a!==document.body||/[aoh]/.test(getComputedStyle(a.parentElement).overflowY))){r=a;break}let u=0,p=0,m=()=>{let a=t.getBoundingClientRect().top;u=r?a-r.getBoundingClientRect().top-r.clientTop+r.scrollTop:a+window.scrollY,p=u+Math.max(0,t.offsetHeight-(r?r.clientHeight:window.innerHeight));},l=()=>{let a=r?r.scrollTop:window.scrollY;return p<=u?a>=u?1:0:V(a,u,p,1)},g=a=>{for(let d of i){let c=d.end-d.start,b=c<=0?a>=d.end?1:0:W((a-d.start)/c),f=d.ease(b);d.kind==="draw"?d.el.style.strokeDashoffset=String(d.length*(1-f)):d.el.style.opacity=String(d.from+(d.to-d.from)*f);}};if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return g(1),Q(1);let h=()=>{o=l(),g(o);};m(),h();let y=G(r||window,[t],l,h,m);D(t,{type:"draw",getProgress:()=>o,getTrigger:()=>({tStart:u,tEnd:p})});let E=F(a=>{a&&(E(),y.off(),T(t),o=1,g(1));});return {destroy(){E(),y.off(),T(t);},getProgress:()=>o}}};
2
+ exports.Cinematic=q;
@@ -1,4 +1,6 @@
1
- type StoryEasing = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'spring' | 'bounce' | 'elastic';
1
+ import { C as CssEasing } from '../types-iITMwrru.mjs';
2
+
3
+ type StoryEasing = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'spring' | 'bounce' | 'elastic' | CssEasing;
2
4
  /** A traced path that strokes itself on across a scroll range. */
3
5
  interface DrawAnimation {
4
6
  type: 'draw';
@@ -1,4 +1,6 @@
1
- type StoryEasing = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'spring' | 'bounce' | 'elastic';
1
+ import { C as CssEasing } from '../types-iITMwrru.js';
2
+
3
+ type StoryEasing = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'spring' | 'bounce' | 'elastic' | CssEasing;
2
4
  /** A traced path that strokes itself on across a scroll range. */
3
5
  interface DrawAnimation {
4
6
  type: 'draw';
@@ -1 +1 @@
1
- export{a as Cinematic}from'../chunk-BDXWPUBJ.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-THPTANES.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-EBU6E26L.mjs';import'../chunk-LFSU6LR3.mjs';
1
+ export{a as Cinematic}from'../chunk-ASCOHQQD.mjs';import'../chunk-YOOPMYT6.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-IXR6RML7.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-EBU6E26L.mjs';import'../chunk-LFSU6LR3.mjs';
@@ -1,9 +1,9 @@
1
- import { T as TriggerConfig, E as EasingName } from './types-9bcJdVcg.js';
1
+ import { T as TriggerConfig, E as Easing } from './types-iITMwrru.mjs';
2
2
 
3
3
  interface ScrollAnimateOptions {
4
4
  props: Record<string, string | number | [string | number, string | number]>;
5
5
  trigger?: TriggerConfig;
6
- easing?: EasingName | ((t: number) => number);
6
+ easing?: Easing;
7
7
  speed?: number;
8
8
  once?: boolean;
9
9
  axis?: 'x' | 'y';
@@ -1,9 +1,9 @@
1
- import { T as TriggerConfig, E as EasingName } from './types-9bcJdVcg.mjs';
1
+ import { T as TriggerConfig, E as Easing } from './types-iITMwrru.js';
2
2
 
3
3
  interface ScrollAnimateOptions {
4
4
  props: Record<string, string | number | [string | number, string | number]>;
5
5
  trigger?: TriggerConfig;
6
- easing?: EasingName | ((t: number) => number);
6
+ easing?: Easing;
7
7
  speed?: number;
8
8
  once?: boolean;
9
9
  axis?: 'x' | 'y';
@@ -1 +1 @@
1
- 'use strict';function qe({tension:e=2.5,friction:r=2.2}={}){return o=>1-Math.cos(o*Math.PI*e)*Math.pow(1-o,r)}function He({bounces:e=3,decay:r=.5}={}){let o=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,r)),s=Math.sqrt(t),a=0,c=[];for(let l=0;l<o;l++){let d=Math.pow(s,l);c.push(d),a+=d;}let f=[0],p=0;for(let l=0;l<o;l++)p+=c[l]/a,f.push(p);return l=>{if(l<=0)return 0;if(l>=1)return 1;for(let d=0;d<o;d++)if(l<=f[d+1]){let h=(l-f[d])/(f[d+1]-f[d]);if(d===0)return h*(2-h);let M=1-Math.pow(t,d);return M+(1-M)*(2*h-1)*(2*h-1)}return 1}}function Be({amplitude:e=1,period:r=.4}={}){let o=Math.max(1,e),t=Math.max(.1,r),s=o<=1?t/4:t/(2*Math.PI)*Math.asin(1/o);return a=>a<=0?0:a>=1?1:o*Math.pow(2,-10*a)*Math.sin((a-s)*(2*Math.PI)/t)+1}var ie={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:qe(),bounce:He(),elastic:Be()};function Me(e,r,o){return Math.min(o,Math.max(r,e))}function se(e="top bottom"){let r=e.trim();if(/^\d+(\.\d+)?%$/.test(r))return {element:"top",viewport:r};let[o="top",t="bottom"]=r.split(/\s+/).filter(Boolean);return {element:o,viewport:t}}var Re=(e,r)=>e==="top"?0:e==="center"?.5:e==="bottom"?1:r;function xe(e,r,o,t){return e+o+r*Re(t,0)}function Le(e,r){return r*(/^\d+(\.\d+)?%$/.test(e)?parseFloat(e)/100:Re(e,1))}function Se(e,r,o,t){return o===r?0:Me((e-r)/(o-r)*t,0,1)}function _e(e,r,o,t,s){let a=xe(e.top,e.height,r,t.element)-Le(t.viewport,o),c=xe(e.top,e.height,r,s.element)-Le(s.viewport,o);return {tStart:a,tEnd:c}}var Te=Symbol.for("svg-scroll-draw.registry");function Ae(){let e=globalThis;return e[Te]||(e[Te]=new Map)}function Fe(e,r){Ae().set(e,r);}function Oe(e){Ae().delete(e);}var Ue=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function E(e,...r){Ue&&console.warn(`[svg-scroll-draw] ${e}`,...r);}function Ie(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let r=window.matchMedia("(prefers-reduced-motion: reduce)"),o=s=>e(!!s.matches);if(typeof r.addEventListener=="function")return r.addEventListener("change",o),()=>r.removeEventListener("change",o);let t=r;return t.addListener?.(o),()=>t.removeListener?.(o)}var z,H=new Set,B=new WeakMap,k=new Map,Ne=e=>{let r=e.getBoundingClientRect();return r.width+" "+r.height};function Ye(e){let r=new Set;for(let o of e)for(;o&&o!==document.body;o=o.parentElement)for(let t=o;t;t=t.previousElementSibling)r.add(t);return r}function Pe(e,r){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let o=()=>r();z??(z=new ResizeObserver(s=>{let a=false;for(let{target:c}of s)B.get(c)!==Ne(c)&&(a=true),B.set(c,"");a&&H.forEach(c=>c());})),H.add(o);let t=Ye(e);return [document.body,document.documentElement].forEach(s=>s&&t.add(s)),t.forEach(s=>{B.has(s)||B.set(s,Ne(s)),k.set(s,(k.get(s)??0)+1),z.observe(s);}),()=>{H.delete(o)&&(t.forEach(s=>{let a=(k.get(s)??1)-1;if(a)return void k.set(s,a);k.delete(s),z?.unobserve(s);}),H.size||(z?.disconnect(),z=void 0));}}function ze(e,r,o,t,s){let a,c=NaN,f,p,l=()=>{a=0,t(),!f&&!a&&(c=o())>0&&c<1&&(a=requestAnimationFrame(l));},d=()=>{!a&&!f&&o()!==c&&(a=requestAnimationFrame(l));},h=y=>{f=y,cancelAnimationFrame(a),a=c=NaN,d();},M=()=>{clearTimeout(p),s(),d();},F=()=>{clearTimeout(p),p=setTimeout(M,150);},Y=Pe(r,F),b=y=>{e[y]("scroll",d,{passive:true}),window[y]("resize",F),window[y]("orientationchange",F);};return b("addEventListener"),d(),{hold:h,remeasure:M,off(){h(true),b("removeEventListener"),Y(),clearTimeout(p);}}}var U={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Ke(e){let r=e>1?[0,e-1]:[0],o=[[0,e-1]];for(let t=0;t<o.length;t++){let[s,a]=o[t];if(a-s<2)continue;let c=s+a>>1;r.push(c),o.push([s,c],[c,a]);}return r}function mt(e,r){if(typeof window>"u")return U;let o=typeof e=="string"?document.querySelector(e):e;if(!o||o.tagName.toLowerCase()!=="canvas")return E("scrollFrames: <canvas> element not found:",e),U;let t=o,{frames:s,trigger:a={},easing:c="linear",once:f=false,axis:p="y",fit:l="cover",triggerElement:d,onReady:h,onLoad:M,onComplete:F,onProgress:Y}=r||{},b=Array.isArray(s)?s:null,y=r?.count,L=Math.floor(b?Math.min(y??b.length,b.length):y??NaN);if(!(b||typeof s=="function")||!Number.isFinite(L)||L<1)return E("scrollFrames: no frames. Pass `frames` as an array of URLs, or a function with a finite `count` of 1 or more.",t),U;let R=r.concurrency??6;(!Number.isFinite(R)||R<1)&&(E("scrollFrames: `concurrency` must be a finite number of 1 or more; using 6.",r.concurrency),R=6),R=Math.floor(R);let K=t.getContext("2d");if(!K)return E("scrollFrames: the canvas has no 2D context.",t),U;let S=L-1,ae=d??t,w=window.matchMedia("(prefers-reduced-motion: reduce)").matches,ke=typeof c=="function"?c:ie[c]??ie.linear,ue=n=>{let i=ke(n);return i===i?i:0},Ce=se(a.start||"top top"),De=se(a.end||"bottom top"),C=0,D=0,O=false,X=-1,W=0,_=0,G=false,v=false,ce=false,de=false,j=0,J=-1,Q=new Array(L),Z=new Uint8Array(L),I=new Set,T=w?[S]:Ke(L),ee=0,te=0,le=false,V=(n,...i)=>{if(n)try{n(...i);}catch(u){typeof reportError=="function"?reportError(u):setTimeout(()=>{throw u});}},me=false,We=n=>{let i;try{i=b?b[n]:s(n);}catch(u){i=u;}return typeof i=="string"&&i?i:(me||(me=true,E(`scrollFrames: no URL for frame ${n}; it is skipped for its nearest neighbour.`,i)),null)},fe=()=>p==="x"?window.scrollX:window.scrollY,Ge=()=>p==="x"?window.innerWidth:window.innerHeight;function ne(){!le&&te===T.length&&(le=true,V(M));}function re(){for(;!v&&I.size<R&&ee<T.length;){let n=T[ee++];Z[n]||Qe(n);}}function Qe(n){Z[n]=1;let i=We(n);if(i===null){te++,queueMicrotask(()=>{v||ne();});return}let u=new Image,m=false,g=x=>{m||v||(m=true,u.onload=u.onerror=null,I.delete(u),x?Q[n]=u:E("scrollFrames: a frame failed to load; its nearest neighbour shows instead:",i),te++,re(),$(),ne());};I.add(u),u.decoding="async",u.onerror=()=>g(false),u.src=i,typeof u.decode=="function"?u.decode().then(()=>g(true),()=>{u.complete?g(u.naturalWidth>0):u.onload=()=>g(true);}):u.onload=()=>g(true);}function Ve(n){for(let i=0;i<=S;i++){if(Q[n-i])return n-i;if(Q[n+i])return n+i}return -1}function oe(){let n=t.clientWidth,i=t.clientHeight;if(!n||!i)return;let u=Math.min(window.devicePixelRatio||1,2),m=Math.round(n*u),g=Math.round(i*u);if(Math.abs(t.width-m)<=1&&Math.abs(t.height-g)<=1)return;t.width=m,t.height=g,J=-1;let x=t.clientWidth,P=t.clientHeight;if(x!==n||P!==i){let A=t.style;x!==n&&P!==i?(A.width=`${n}px`,A.height=`${i}px`):A.aspectRatio=`${n} / ${i}`;}}function $(){let n=Ve(j);if(n<0||n===J)return;let i=Q[n],u=t.width,m=t.height,g=i.naturalWidth||u,x=i.naturalHeight||m,P=(l==="contain"?Math.min:Math.max)(u/g,m/x),A=g*P,Ee=x*P;K.clearRect(0,0,u,m),K.drawImage(i,(u-A)/2,(m-Ee)/2,A,Ee),J=n,ce||(ce=true,V(h));}function q(n){j=Math.min(S,Math.max(0,Math.round(n*S))),t.style.setProperty("--scroll-draw-progress",String(n)),$(),V(Y,n,j);}function pe(){let n=ae.getBoundingClientRect(),i=p==="x"?n.left:n.top,u=p==="x"?n.width:n.height,m=_e({top:i,height:u},fe(),Ge(),Ce,De);C=m.tStart,D=m.tEnd,D===C&&u>0&&!w&&!de&&(de=true,E("scrollFrames: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t));}let ge=()=>Se(fe(),C,D,1);function $e(){if(w)return;let n=ge(),i=f?Math.max(X,ue(W=Math.max(W,n))):ue(n);_=i,q(i),i>=1&&!G?(G=true,V(F)):i<1&&!f&&(G=false);}function he(){_=1,q(1);}oe(),w||pe();let N=ze(window,[ae],ge,$e,()=>{oe(),w||pe(),$();}),be=()=>N.hold(O||w);be(),w&&he(),re();let we=typeof ResizeObserver=="function"?new ResizeObserver(()=>{oe(),$();}):null;we?.observe(t);let ve=w?()=>{}:Ie(n=>{n&&(ve(),w=true,N.hold(true),T=T.slice(0,ee),Z[S]||T.push(S),ne(),he(),re());});Fe(t,{type:"frames",getProgress:()=>_,getTrigger:()=>({tStart:C,tEnd:D})});function ye(){v||!O||(O=false,be());}return {destroy(){if(!v){v=true,N.off(),we?.disconnect(),ve();for(let n of I)n.onload=n.onerror=null,n.src="";I.clear(),Oe(t);}},replay(){v||(X=-1,W=0,G=false,_=0,q(0),ye());},pause(){v||(O=true,N.hold(true));},resume:ye,seek(n){if(v)return;let i=Math.min(1,Math.max(0,n===n?n:0));_=i,X=i,W=0,O=true,N.hold(true),q(i);},getProgress(){return _}}}exports.scrollFrames=mt;
1
+ 'use strict';var Be=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function h(e,...n){Be&&console.warn(`[svg-scroll-draw] ${e}`,...n);}function Ue({tension:e=2.5,friction:n=2.2}={}){return t=>1-Math.cos(t*Math.PI*e)*Math.pow(1-t,n)}function Ye({bounces:e=3,decay:n=.5}={}){let t=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,n)),a=Math.sqrt(r),s=0,u=[];for(let d=0;d<t;d++){let m=Math.pow(a,d);u.push(m),s+=m;}let l=[0],f=0;for(let d=0;d<t;d++)f+=u[d]/s,l.push(f);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let m=0;m<t;m++)if(d<=l[m+1]){let b=(d-l[m])/(l[m+1]-l[m]);if(m===0)return b*(2-b);let M=1-Math.pow(r,m);return M+(1-M)*(2*b-1)*(2*b-1)}return 1}}function Je({amplitude:e=1,period:n=.4}={}){let t=Math.max(1,e),r=Math.max(.1,n),a=t<=1?r/4:r/(2*Math.PI)*Math.asin(1/t);return s=>s<=0?0:s>=1?1:t*Math.pow(2,-10*s)*Math.sin((s-a)*(2*Math.PI)/r)+1}var H={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:Ue(),bounce:Ye(),elastic:Je()};function Ke(e,n,t,r){let a=(s,u,l)=>((1+3*s-3*u)*l+3*u-6*s)*l*l+3*s*l;return s=>{if(s<=0||s>=1)return +(s>0);let u=s;for(let l=0;l<8;l++)u-=(a(e,t,u)-s)/((3*(1+3*e-3*t)*u+6*t-12*e)*u+3*e);if(!(u>=0&&u<=1&&Math.abs(a(e,t,u)-s)<1e-9))for(let l=0,f=0,d=1;l<30;l++)u=(f+d)/2,a(e,t,u)<s?f=u:d=u;return a(n,r,u)}}function Xe(e){let n=/^cubic-bezier\((.*)\)$/.exec(e==="ease"?"cubic-bezier(.25,.1,.25,1)":e.trim()),t=n?n[1].split(",").map(parseFloat):[];if(t.length===4&&t.every(Number.isFinite)&&t[0]*(1-t[0])>=0&&t[2]*(1-t[2])>=0)return [Ke(t[0],t[1],t[2],t[3]),`cubic-bezier(${t})`]}var Me=new Set;function xe(e,n="linear"){if(typeof e=="function")return e;if(e==null)return H[n];if({}.hasOwnProperty.call(H,e))return H[e];let t=Xe(String(e));return t?t[0]:(!Me.has(e)&&Me.add(e)&&h(`Unknown easing ${JSON.stringify(e)}: use a name, cubic-bezier() or a function.`),H[n])}function Le(e,n,t){return Math.min(t,Math.max(n,e))}function se(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[t="top",r="bottom"]=n.split(/\s+/).filter(Boolean);return {element:t,viewport:r}}var _e=(e,n)=>e==="top"?0:e==="center"?.5:e==="bottom"?1:n;function Re(e,n,t,r){return e+t+n*_e(r,0)}function Se(e,n){return n*(/^\d+(\.\d+)?%$/.test(e)?parseFloat(e)/100:_e(e,1))}function Fe(e,n,t,r){return t===n?0:Le((e-n)/(t-n)*r,0,1)}function Te(e,n,t,r,a){let s=Re(e.top,e.height,n,r.element)-Se(r.viewport,t),u=Re(e.top,e.height,n,a.element)-Se(a.viewport,t);return {tStart:s,tEnd:u}}var Ae=Symbol.for("svg-scroll-draw.registry");function Oe(){let e=globalThis;return e[Ae]||(e[Ae]=new Map)}function ze(e,n){Oe().set(e,n);}function Ne(e){Oe().delete(e);}function Pe(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let n=window.matchMedia("(prefers-reduced-motion: reduce)"),t=a=>e(!!a.matches);if(typeof n.addEventListener=="function")return n.addEventListener("change",t),()=>n.removeEventListener("change",t);let r=n;return r.addListener?.(t),()=>r.removeListener?.(t)}var I,B=new Set,U=new WeakMap,k=new Map,Ie=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function je(e){let n=new Set;for(let t of e)for(;t&&t!==document.body;t=t.parentElement)for(let r=t;r;r=r.previousElementSibling)n.add(r);return n}function ke(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let t=()=>n();I??(I=new ResizeObserver(a=>{let s=false;for(let{target:u}of a)U.get(u)!==Ie(u)&&(s=true),U.set(u,"");s&&B.forEach(u=>u());})),B.add(t);let r=je(e);return [document.body,document.documentElement].forEach(a=>a&&r.add(a)),r.forEach(a=>{U.has(a)||U.set(a,Ie(a)),k.set(a,(k.get(a)??0)+1),I.observe(a);}),()=>{B.delete(t)&&(r.forEach(a=>{let s=(k.get(a)??1)-1;if(s)return void k.set(a,s);k.delete(a),I?.unobserve(a);}),B.size||(I?.disconnect(),I=void 0));}}function Ce(e,n,t,r,a){let s,u=NaN,l,f,d=()=>{s=0,r(),!l&&!s&&(u=t())>0&&u<1&&(s=requestAnimationFrame(d));},m=()=>{!s&&!l&&t()!==u&&(s=requestAnimationFrame(d));},b=E=>{l=E,cancelAnimationFrame(s),s=u=NaN,m();},M=()=>{clearTimeout(f),a(),m();},A=()=>{clearTimeout(f),f=setTimeout(M,150);},J=ke(n,A),w=E=>{e[E]("scroll",m,{passive:true}),window[E]("resize",A),window[E]("orientationchange",A);};return w("addEventListener"),m(),{hold:b,remeasure:M,off(){b(true),w("removeEventListener"),J(),clearTimeout(f);}}}var Y={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Ze(e){let n=e>1?[0,e-1]:[0],t=[[0,e-1]];for(let r=0;r<t.length;r++){let[a,s]=t[r];if(s-a<2)continue;let u=a+s>>1;n.push(u),t.push([a,u],[u,s]);}return n}function bt(e,n){if(typeof window>"u")return Y;let t=typeof e=="string"?document.querySelector(e):e;if(!t||t.tagName.toLowerCase()!=="canvas")return h("scrollFrames: <canvas> element not found:",e),Y;let r=t,{frames:a,trigger:s={},easing:u="linear",once:l=false,axis:f="y",fit:d="cover",triggerElement:m,onReady:b,onLoad:M,onComplete:A,onProgress:J}=n||{},w=Array.isArray(a)?a:null,E=n?.count,L=Math.floor(w?Math.min(E??w.length,w.length):E??NaN);if(!(w||typeof a=="function")||!Number.isFinite(L)||L<1)return h("scrollFrames: no frames. Pass `frames` as an array of URLs, or a function with a finite `count` of 1 or more.",r),Y;let R=n.concurrency??6;(!Number.isFinite(R)||R<1)&&(h("scrollFrames: `concurrency` must be a finite number of 1 or more; using 6.",n.concurrency),R=6),R=Math.floor(R);let K=r.getContext("2d");if(!K)return h("scrollFrames: the canvas has no 2D context.",r),Y;let S=L-1,ae=m??r,v=window.matchMedia("(prefers-reduced-motion: reduce)").matches,De=xe(u),ue=o=>{let i=De(o);return i===i?i:0},We=se(s.start||"top top"),$e=se(s.end||"bottom top"),C=0,D=0,O=false,X=-1,W=0,_=0,$=false,y=false,ce=false,le=false,j=0,Z=-1,Q=new Array(L),ee=new Uint8Array(L),z=new Set,F=v?[S]:Ze(L),te=0,ne=0,de=false,G=(o,...i)=>{if(o)try{o(...i);}catch(c){typeof reportError=="function"?reportError(c):setTimeout(()=>{throw c});}},me=false,Qe=o=>{let i;try{i=w?w[o]:a(o);}catch(c){i=c;}return typeof i=="string"&&i?i:(me||(me=true,h(`scrollFrames: no URL for frame ${o}; it is skipped for its nearest neighbour.`,i)),null)},fe=()=>f==="x"?window.scrollX:window.scrollY,Ge=()=>f==="x"?window.innerWidth:window.innerHeight;function re(){!de&&ne===F.length&&(de=true,G(M));}function oe(){for(;!y&&z.size<R&&te<F.length;){let o=F[te++];ee[o]||Ve(o);}}function Ve(o){ee[o]=1;let i=Qe(o);if(i===null){ne++,queueMicrotask(()=>{y||re();});return}let c=new Image,p=false,g=x=>{p||y||(p=true,c.onload=c.onerror=null,z.delete(c),x?Q[o]=c:h("scrollFrames: a frame failed to load; its nearest neighbour shows instead:",i),ne++,oe(),V(),re());};z.add(c),c.decoding="async",c.onerror=()=>g(false),c.src=i,typeof c.decode=="function"?c.decode().then(()=>g(true),()=>{c.complete?g(c.naturalWidth>0):c.onload=()=>g(true);}):c.onload=()=>g(true);}function qe(o){for(let i=0;i<=S;i++){if(Q[o-i])return o-i;if(Q[o+i])return o+i}return -1}function ie(){let o=r.clientWidth,i=r.clientHeight;if(!o||!i)return;let c=Math.min(window.devicePixelRatio||1,2),p=Math.round(o*c),g=Math.round(i*c);if(Math.abs(r.width-p)<=1&&Math.abs(r.height-g)<=1)return;r.width=p,r.height=g,Z=-1;let x=r.clientWidth,P=r.clientHeight;if(x!==o||P!==i){let T=r.style;x!==o&&P!==i?(T.width=`${o}px`,T.height=`${i}px`):T.aspectRatio=`${o} / ${i}`;}}function V(){let o=qe(j);if(o<0||o===Z)return;let i=Q[o],c=r.width,p=r.height,g=i.naturalWidth||c,x=i.naturalHeight||p,P=(d==="contain"?Math.min:Math.max)(c/g,p/x),T=g*P,Ee=x*P;K.clearRect(0,0,c,p),K.drawImage(i,(c-T)/2,(p-Ee)/2,T,Ee),Z=o,ce||(ce=true,G(b));}function q(o){j=Math.min(S,Math.max(0,Math.round(o*S))),r.style.setProperty("--scroll-draw-progress",String(o)),V(),G(J,o,j);}function pe(){let o=ae.getBoundingClientRect(),i=f==="x"?o.left:o.top,c=f==="x"?o.width:o.height,p=Te({top:i,height:c},fe(),Ge(),We,$e);C=p.tStart,D=p.tEnd,D===C&&c>0&&!v&&!le&&(le=true,h("scrollFrames: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",r));}let ge=()=>Fe(fe(),C,D,1);function He(){if(v)return;let o=ge(),i=l?Math.max(X,ue(W=Math.max(W,o))):ue(o);_=i,q(i),i>=1&&!$?($=true,G(A)):i<1&&!l&&($=false);}function he(){_=1,q(1);}ie(),v||pe();let N=Ce(window,[ae],ge,He,()=>{ie(),v||pe(),V();}),be=()=>N.hold(O||v);be(),v&&he(),oe();let we=typeof ResizeObserver=="function"?new ResizeObserver(()=>{ie(),V();}):null;we?.observe(r);let ve=v?()=>{}:Pe(o=>{o&&(ve(),v=true,N.hold(true),F=F.slice(0,te),ee[S]||F.push(S),re(),he(),oe());});ze(r,{type:"frames",getProgress:()=>_,getTrigger:()=>({tStart:C,tEnd:D})});function ye(){y||!O||(O=false,be());}return {destroy(){if(!y){y=true,N.off(),we?.disconnect(),ve();for(let o of z)o.onload=o.onerror=null,o.src="";z.clear(),Ne(r);}},replay(){y||(X=-1,W=0,$=false,_=0,q(0),ye());},pause(){y||(O=true,N.hold(true));},resume:ye,seek(o){if(y)return;let i=Math.min(1,Math.max(0,o===o?o:0));_=i,X=i,W=0,O=true,N.hold(true),q(i);},getProgress(){return _}}}exports.scrollFrames=bt;
@@ -1,4 +1,4 @@
1
- import { T as TriggerConfig, E as EasingName, S as ScrollDrawInstance } from '../types-9bcJdVcg.mjs';
1
+ import { T as TriggerConfig, E as Easing, S as ScrollDrawInstance } from '../types-iITMwrru.mjs';
2
2
 
3
3
  interface ScrollFramesOptions {
4
4
  /** Image URLs in order, or a function from index (0-based) to URL. */
@@ -6,7 +6,7 @@ interface ScrollFramesOptions {
6
6
  /** Number of frames; required when `frames` is a function, else frames.length. */
7
7
  count?: number;
8
8
  trigger?: TriggerConfig;
9
- easing?: EasingName | ((t: number) => number);
9
+ easing?: Easing;
10
10
  once?: boolean;
11
11
  axis?: 'x' | 'y';
12
12
  /**
@@ -1,4 +1,4 @@
1
- import { T as TriggerConfig, E as EasingName, S as ScrollDrawInstance } from '../types-9bcJdVcg.js';
1
+ import { T as TriggerConfig, E as Easing, S as ScrollDrawInstance } from '../types-iITMwrru.js';
2
2
 
3
3
  interface ScrollFramesOptions {
4
4
  /** Image URLs in order, or a function from index (0-based) to URL. */
@@ -6,7 +6,7 @@ interface ScrollFramesOptions {
6
6
  /** Number of frames; required when `frames` is a function, else frames.length. */
7
7
  count?: number;
8
8
  trigger?: TriggerConfig;
9
- easing?: EasingName | ((t: number) => number);
9
+ easing?: Easing;
10
10
  once?: boolean;
11
11
  axis?: 'x' | 'y';
12
12
  /**
@@ -1 +1 @@
1
- export{a as scrollFrames}from'../chunk-D2BHE4F2.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-THPTANES.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-EBU6E26L.mjs';import'../chunk-LFSU6LR3.mjs';
1
+ export{a as scrollFrames}from'../chunk-GBFWTY5L.mjs';import'../chunk-NV6YTPHI.mjs';import'../chunk-IXR6RML7.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-5PJEKEEP.mjs';import'../chunk-EBU6E26L.mjs';import'../chunk-LFSU6LR3.mjs';
@@ -1,3 +1,3 @@
1
- 'use strict';function or({tension:e=2.5,friction:n=2.2}={}){return r=>1-Math.cos(r*Math.PI*e)*Math.pow(1-r,n)}function sr({bounces:e=3,decay:n=.5}={}){let r=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,n)),o=Math.sqrt(t),a=0,u=[];for(let d=0;d<r;d++){let b=Math.pow(o,d);u.push(b),a+=b;}let i=[0],f=0;for(let d=0;d<r;d++)f+=u[d]/a,i.push(f);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let b=0;b<r;b++)if(d<=i[b+1]){let E=(d-i[b])/(i[b+1]-i[b]);if(b===0)return E*(2-E);let g=1-Math.pow(t,b);return g+(1-g)*(2*E-1)*(2*E-1)}return 1}}function ir({amplitude:e=1,period:n=.4}={}){let r=Math.max(1,e),t=Math.max(.1,n),o=r<=1?t/4:t/(2*Math.PI)*Math.asin(1/r);return a=>a<=0?0:a>=1?1:r*Math.pow(2,-10*a)*Math.sin((a-o)*(2*Math.PI)/t)+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:or(),bounce:sr(),elastic:ir()};function $t(e,n,r){return Math.min(r,Math.max(n,e))}function Ce(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[r="top",t="bottom"]=n.split(/\s+/).filter(Boolean);return {element:r,viewport:t}}var Ct=(e,n)=>e==="top"?0:e==="center"?.5:e==="bottom"?1:n;function kt(e,n,r,t){return e+r+n*Ct(t,0)}function Dt(e,n){return n*(/^\d+(\.\d+)?%$/.test(e)?parseFloat(e)/100:Ct(e,1))}function Q(e,n,r,t){return r===n?0:$t((e-n)/(r-n)*t,0,1)}function Oe(e,n,r,t,o){let a=kt(e.top,e.height,n,t.element)-Dt(t.viewport,r),u=kt(e.top,e.height,n,o.element)-Dt(o.viewport,r);return {tStart:a,tEnd:u}}function Ze(e,n,r){let t=e.getBoundingClientRect(),o=r==="x"?t.width:t.height;return n?{top:r==="x"?t.left-n.getBoundingClientRect().left-n.clientLeft+n.scrollLeft:t.top-n.getBoundingClientRect().top-n.clientTop+n.scrollTop,height:o,scroll:0}:{top:r==="x"?t.left:t.top,height:o,scroll:r==="x"?window.scrollX:window.scrollY}}function Ke(e){let n=parseFloat(e.getAttribute("pathLength")??"");if(n>0)return n;let r=e.tagName.toLowerCase();if(r==="rect"){let t=parseFloat(e.getAttribute("width")??"0"),o=parseFloat(e.getAttribute("height")??"0");return 2*(t+o)}if(r==="circle"){let t=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*t}return e.getTotalLength()}function Ot(e){let n=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(n)return [parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)];let r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(r)return [parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function Je(e,n,r){let t=Ot(e),o=Ot(n);return !t||!o?e:`rgb(${Math.round(t[0]+(o[0]-t[0])*r)},${Math.round(t[1]+(o[1]-t[1])*r)},${Math.round(t[2]+(o[2]-t[2])*r)})`}var It={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var Ie=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function oe(e,...n){Ie&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var ar="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",lr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Rt=33;function cr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function ur(e){let n=[];for(let r=0;r<Rt;r++){let t=r/(Rt-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function et(e){switch(e){case "linear":return "linear";case "ease-in":return ar;case "ease-out":return lr;case "ease-in-out":return cr()?ur(ve["ease-in-out"]):null;default:return null}}var Nt=Symbol.for("svg-scroll-draw.registry");function Ft(){let e=globalThis;return e[Nt]||(e[Nt]=new Map)}function Ge(e,n){Ft().set(e,n);}function We(e){Ft().delete(e);}function Ht(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let n=window.matchMedia("(prefers-reduced-motion: reduce)"),r=o=>e(!!o.matches);if(typeof n.addEventListener=="function")return n.addEventListener("change",r),()=>n.removeEventListener("change",r);let t=n;return t.addListener?.(r),()=>t.removeListener?.(r)}function tt(e,n){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return n(e,true);let r=n(e,false),t=Ht(a=>{if(!a)return;t();let u=(r.getProgress?.()??0)>=1;r.destroy(),r=n(u?{...e,onComplete:void 0}:e,true);}),o={};for(let a of Object.keys(r))o[a]=(...u)=>r[a]?.(...u);return o.destroy=()=>{t(),r.destroy();},o}var ze,rt=new Set,nt=new WeakMap,qe=new Map,_t=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function fr(e){let n=new Set;for(let r of e)for(;r&&r!==document.body;r=r.parentElement)for(let t=r;t;t=t.previousElementSibling)n.add(t);return n}function Vt(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>n();ze??(ze=new ResizeObserver(o=>{let a=false;for(let{target:u}of o)nt.get(u)!==_t(u)&&(a=true),nt.set(u,"");a&&rt.forEach(u=>u());})),rt.add(r);let t=fr(e);return [document.body,document.documentElement].forEach(o=>o&&t.add(o)),t.forEach(o=>{nt.has(o)||nt.set(o,_t(o)),qe.set(o,(qe.get(o)??0)+1),ze.observe(o);}),()=>{rt.delete(r)&&(t.forEach(o=>{let a=(qe.get(o)??1)-1;if(a)return void qe.set(o,a);qe.delete(o),ze?.unobserve(o);}),rt.size||(ze?.disconnect(),ze=void 0));}}function ot(e,n,r,t,o){let a,u=NaN,i,f,d=()=>{a=0,t(),!i&&!a&&(u=r())>0&&u<1&&(a=requestAnimationFrame(d));},b=()=>{!a&&!i&&r()!==u&&(a=requestAnimationFrame(d));},E=U=>{i=U,cancelAnimationFrame(a),a=u=NaN,b();},g=()=>{clearTimeout(f),o(),b();},q=()=>{clearTimeout(f),f=setTimeout(g,150);},ge=Vt(n,q),_=U=>{e[U]("scroll",b,{passive:true}),window[U]("resize",q),window[U]("orientationchange",q);};return _("addEventListener"),b(),{hold:E,remeasure:g,off(){E(true),_("removeEventListener"),ge(),clearTimeout(f);}}}var mr=0;function pr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Gt(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var Wt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function dr(e){if(!Ie)return;let n=Gt(e,"stroke");if(!n||n==="none"){oe("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!Wt.has(r)&&!Wt.has(Gt(e,"fill"))&&oe("Element has a fill \u2014 it may obscure the stroke animation.",e);}function gr(e,n,r){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function o(){let a=r==="x"?window.scrollX:window.scrollY,u=e-a,i=n-a,f=r==="x";t.innerHTML=`
2
- <div style="position:absolute;${f?`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;${f?`left:${i}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${i}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",o,{passive:true}),o(),{el:t,destroy(){window.removeEventListener("scroll",o),t.remove();}}}var zt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,qt=/[MmLlHhVvCcSsQqTtAaZz]/g;function yr(e,n,r){if(!Ie)return;let t=(e.match(qt)??[]).join("").toUpperCase(),o=(n.match(qt)??[]).join("").toUpperCase(),a=(e.match(zt)??[]).length,u=(n.match(zt)??[]).length;if(t!==o){oe(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${o||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,r);return}a!==u&&oe(`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.`,r);}function hr(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,a=>{let u=parseFloat(a),i=t[o++]??u;return String(+(u+(i-u)*r).toFixed(4))})}function dt(e,n={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:tt(n,(r,t)=>br(e,r,t))}function br(e,n,r){let{preset:t,...o}=n,a=t?{...It[t],...o}:o,{selector:u="path, polyline, line, polygon, rect, circle",speed:i=1,fade:f=false,easing:d="linear",trigger:b={},stagger:E=0,direction:g="forward",once:q=false,debug:ge=false,axis:_="y",scrollContainer:U,autoReverse:Pe=false,delay:ye=0,strokeColor:Y,strokeWidth:ee,fillOpacity:te,waypoints:X,velocityScale:R=false,threshold:J=0,rootMargin:st="0px",repeat:we=0,repeatDelay:Ae=0,morphTo:V,clip:se,autoplay:Ne=false,duration:je=1e3,native:it=true,onProgress:Ee,onStart:N,onComplete:G,onEnter:ie,onLeave:Le,onEnterBack:ae,onLeaveBack:re}=a,F=se===true?"left":typeof se=="string"?se:false,D=typeof d=="function"?d:ve[d]??ve.linear,$e=Ce(b.start||"top bottom"),Fe=Ce(b.end||"bottom top"),A=typeof U=="string"?document.querySelector(U):U??null,le=Array.isArray(Y)?Y[0]:null,ce=Array.isArray(Y)?Y[1]:typeof Y=="string"?Y:null,Z=Array.isArray(ee)?ee[0]:null,he=Array.isArray(ee)?ee[1]:typeof ee=="number"?ee:null,ue=Array.isArray(te)?te[0]:null,K=Array.isArray(te)?te[1]:typeof te=="number"?te:null;function fe(s){let c=s*100;switch(F){case "right":return `inset(0 0 0 ${100-c}%)`;case "top":return `inset(0 0 ${100-c}% 0)`;case "bottom":return `inset(${100-c}% 0 0 0)`;case "center":return `circle(${s*150}% at 50% 50%)`;default:return `inset(0 ${100-c}% 0 0)`}}let l=F?[]:Array.from(e.querySelectorAll(u)),m=[],L=[],v=0,S=0,P=E,x=0,be=0,$=false,me=false,pe=0,at=-1,Qe=[],Ue=-1,B=false,ne=0,Se=0,xe,lt=false,ct=null;function yt(){ct?.destroy(),ct=null;}let Me=new Set,ht=NaN,ke=true,Ye=-1,bt=performance.now(),De=NaN;function Xe(){return A?_==="x"?A.scrollLeft:A.scrollTop:_==="x"?window.scrollX:window.scrollY}function vt(){return A?_==="x"?A.clientWidth:A.clientHeight:_==="x"?window.innerWidth:window.innerHeight}function wt(){let s=Ze(e,A,_);return Oe(s,s.scroll,vt(),$e,Fe)}function Zt(){let s=S-v,c=l.length-1,p=A??document.documentElement,h=_==="x"?"Width":"Height";if(P=E,E>0&&c>0&&s>0){let C=p[`scroll${h}`]-p[`client${h}`]-1-v-s/i;C>=0&&(P=Math.min(E,C/(c*s)));}let k=Math.max(0,c)*P*s,W=s/Math.min(i,1);x=v+Math.min(0,k,W,k+W),be=v+Math.max(0,k,W,k+W);}function Et(){(({tStart:v,tEnd:S}=wt())),Zt(),ge&&Ie&&(yt(),ct=gr(v,S,_));}function ut(s,c=wt){Ge(e,{type:"draw",getProgress:()=>s.getProgress(),getTrigger:c});let p=s.destroy;return s.destroy=()=>{p.call(s),We(e);},s}function St(s,c){return q&&!Pe?Math.max(at,D(Qe[s]=Math.max(Qe[s]??0,c))):D(c)}function Kt(s,c){if(e.style.setProperty("--scroll-draw-progress",String(s)),F){let p=c==="reverse"?1-s:s;e.style.clipPath=fe(p);return}l.forEach((p,h)=>ft(p,h,s,c));}function ft(s,c,p,h){s.style.strokeDashoffset=h==="reverse"?`${m[c]*p}`:`${m[c]*(1-p)}`,f&&(s.style.opacity=h==="reverse"?`${1-p}`:`${p}`),le&&ce?s.style.stroke=Je(le,ce,p):ce&&(s.style.stroke=ce),Z!==null&&he!==null?s.style.strokeWidth=`${Z+(he-Z)*p}`:he!==null&&(s.style.strokeWidth=`${he}`),ue!==null&&K!==null?s.style.fillOpacity=`${ue+(K-ue)*p}`:K!==null&&(s.style.fillOpacity=`${K}`),V&&s.tagName.toLowerCase()==="path"&&L[c]&&s.setAttribute("d",hr(L[c],V,p));}function mt(){if(e.style.setProperty("--scroll-draw-progress","0"),F){e.style.clipPath=fe(g==="reverse"?1:0);return}l.forEach((s,c)=>{s.style.strokeDasharray=`${m[c]}`,s.style.strokeDashoffset=g==="reverse"?"0":`${m[c]}`,f?s.style.opacity=g==="reverse"?"1":"0":s.style.opacity="",le&&(s.style.stroke=le),Z!==null&&(s.style.strokeWidth=`${Z}`),ue!==null&&(s.style.fillOpacity=`${ue}`),V&&s.tagName.toLowerCase()==="path"&&L[c]&&s.setAttribute("d",L[c]);});}function He(s,c){let p=s.getAttribute("d"),h=Ke(s);if(V&&L[c]){s.setAttribute("d",V);let k=Ke(s);s.setAttribute("d",L[c]),h=Math.max(Ke(s),k),s.setAttribute("d",p);}m[c]=h,s.style.strokeDasharray=`${h}`;}if(l.forEach((s,c)=>{dr(s);let p=s.tagName.toLowerCase()==="path";p?L.push(s.getAttribute("d")??""):L.push(""),He(s,c);let h=m[c];V&&(p?yr(L[L.length-1],V,s):oe(`morphTo only applies to <path> elements \u2014 ignored on <${s.tagName}>.`,s)),r?(s.style.strokeDashoffset=g==="reverse"?`${h}`:"0",f&&(s.style.opacity="1"),ce&&(s.style.stroke=ce),he!==null&&(s.style.strokeWidth=`${he}`),K!==null&&(s.style.fillOpacity=`${K}`),V&&s.tagName.toLowerCase()==="path"&&s.setAttribute("d",V)):(s.style.strokeDashoffset=g==="reverse"?"0":`${h}`,f?s.style.opacity=g==="reverse"?"1":"0":s.style.opacity="",le&&(s.style.stroke=le),Z!==null&&(s.style.strokeWidth=`${Z}`),ue!==null&&(s.style.fillOpacity=`${ue}`));}),r)return F&&(e.style.clipPath=fe(1)),G?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};F&&(e.style.clipPath=fe(g==="reverse"?1:0));let xt=typeof d=="string"?et(d):null;function Jt(){return !(it===false||Ne||ge&&Ie||!pr()||!l.length||!xt||F||_!=="y"||A||i!==1||E!==0||q||Pe||R!==false||V||X||we||ye>0||Ee||N||G||ie||Le||ae||re||Y!=null||ee!=null||te!=null||(b.start||"top bottom").trim()!=="top bottom"||(b.end||"bottom top").trim()!=="bottom top")}function er(){let s=++mr,c=`svg-scroll-draw-${s}`,p=`svg-scroll-draw-host-${s}`,h=`--svg-scroll-draw-${s}`,k=g==="reverse"?"0":"var(--ssd-len)",W=g==="reverse"?"var(--ssd-len)":"0",C=`stroke-dashoffset:${k};`,M=`stroke-dashoffset:${W};`;f&&(C+=`opacity:${g==="reverse"?1:0};`,M+=`opacity:${g==="reverse"?0:1};`);let T=document.createElement("style");T.setAttribute("data-svg-scroll-draw",""),T.textContent=`@keyframes ${c}{from{${C}}to{${M}}}.${p}{view-timeline-name:${h};view-timeline-axis:block;}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${xt};animation-fill-mode:both;animation-timeline:${h};animation-range:cover 0% cover 100%;}`,document.head.appendChild(T),e.classList.add(p);function H(y,w){y.style.setProperty("--ssd-len",String(m[w])),y.style.strokeDasharray=`${m[w]}`,y.style.strokeDashoffset="",y.style.opacity="",y.style.animationPlayState="",y.classList.add(c);}l.forEach(H);let O=false,z=-1;function j(){if(z>=0)return z;let y=e.getBoundingClientRect(),{tStart:w,tEnd:I}=Oe({top:y.top,height:y.height},Xe(),vt(),$e,Fe);return D(Q(Xe(),w,I,i))}return {destroy(){e.classList.remove(p),l.forEach(y=>{y.classList.remove(c),y.style.removeProperty("--ssd-len"),y.style.animationPlayState="";}),T.remove();},replay(){O=false,z=-1,l.forEach(H);},pause(){O=true,l.forEach(y=>{y.style.animationPlayState="paused";});},resume(){O&&(O=false,l.forEach(y=>{y.style.animationPlayState="running";}));},seek(y){let w=Math.min(1,Math.max(0,y));z=w,O=true,l.forEach((I,de)=>{I.classList.remove(c),I.style.strokeDashoffset=g==="reverse"?`${m[de]*w}`:`${m[de]*(1-w)}`,f&&(I.style.opacity=g==="reverse"?`${1-w}`:`${w}`);});},getProgress(){return j()},refresh(){l.forEach((y,w)=>{He(y,w),y.style.setProperty("--ssd-len",String(m[w]));});}}}if(Jt())return ut(er());function tr(){let s=Math.max(1,je),c=F?s:s*(1+Math.max(0,l.length-1)*E),p=0,h=0,k=false;function W(z){let j=true,y=Math.min(1,Math.max(0,z/c));if(F){let w=Math.min(1,Math.max(0,z/s)),I=D(w);ne=I,e.style.setProperty("--scroll-draw-progress",String(I)),e.style.clipPath=fe(g==="reverse"?1-I:I),Ee?.(I),w<1&&(j=false);}else {l.forEach((I,de)=>{let nr=de*E*s,Lt=Math.min(1,Math.max(0,(z-nr)/s));ft(I,de,D(Lt),g),Lt<1&&(j=false);});let w=D(y);ne=w,Ee?.(w),e.style.setProperty("--scroll-draw-progress",String(w));}if(X){let w=D(y);for(let I in X){let de=parseFloat(I);w>=de&&!Me.has(de)&&(Me.add(de),X[I]?.());}}return j}function C(z){if(B)return;let j=z-p;me||(me=true,N?.());let y=W(j);if(y&&!$){$=true,W(c),G?.(),Se<(we==="infinite"?1/0:we??0)&&(Se++,xe=setTimeout(()=>{p=performance.now(),me=false,$=false,Me.clear(),mt(),pe=requestAnimationFrame(C);},Ae));return}y||(pe=requestAnimationFrame(C));}function M(){cancelAnimationFrame(pe),clearTimeout(xe),p=performance.now(),h=0,B=false,me=false,$=false,Se=0,k=true,ne=0,Me.clear(),mt(),pe=requestAnimationFrame(C);}let T=new IntersectionObserver(z=>{z.forEach(j=>{j.isIntersecting&&!(q&&$)?M():!j.isIntersecting&&!q&&!$&&(cancelAnimationFrame(pe),clearTimeout(xe),k=false);});},{root:A??null,threshold:J,rootMargin:st}),H;function O(){clearTimeout(H),H=setTimeout(()=>l.forEach(He),150);}return window.addEventListener("resize",O),window.addEventListener("orientationchange",O),ye>0?setTimeout(()=>T.observe(e),ye):T.observe(e),{destroy(){cancelAnimationFrame(pe),clearTimeout(xe),T.disconnect(),window.removeEventListener("resize",O),window.removeEventListener("orientationchange",O),clearTimeout(H);},replay(){Se=0,M();},pause(){B||!k||(B=true,h=performance.now()-p,cancelAnimationFrame(pe));},resume(){B&&(B=false,k=true,p=performance.now()-h,pe=requestAnimationFrame(C));},seek(z){let j=Math.min(1,Math.max(0,z));ne=j,B=true,h=j*c,p=performance.now()-h,cancelAnimationFrame(pe),W(h);},getProgress(){return ne},refresh(){clearTimeout(H),l.forEach(He);}}}if(Ne)return ut(tr());Et();let Mt=()=>Q(Xe(),x,be,1);function Tt(){$=true,G?.(),Se<(we==="infinite"?1/0:we)&&(Se++,xe=setTimeout(()=>{lt=true;},Ae));}function Pt(){at=-1,Qe=[],me=false,$=false,lt=false,Me.clear(),mt(),ke=true;}function rr(){let s=performance.now(),c=Xe();if(lt&&Mt()%1&&Pt(),!ke&&R===false&&c===ht)return;ke=false,ht=c;let p=i;if(R!==false){let M=s-bt,T=M>0?Math.abs(c-(Ye<0?c:Ye))/M:0;p=i*Math.max(.2,1+T*(typeof R=="number"?R:1)*.04);}Ye=c,bt=s;let h=Pe?Ue===-1||c>=Ue?"forward":"reverse":g;Ue=c;let k=S-v,W=true,C=k===0?0:(c-v)/k;if(isNaN(De)||(De<=0&&C>0&&ie?.(),De<1&&C>=1&&Le?.(),De>=1&&C<1&&ae?.(),De>0&&C<=0&&re?.()),De=C,F){let M=St(0,Q(c,v,S,p));ne=M,e.style.setProperty("--scroll-draw-progress",String(M));let T=h==="reverse"?1-M:M;e.style.clipPath=fe(T),Ee?.(M),!me&&Q(c,v,S,p)>0&&(me=true,N?.()),M>=1&&!$?Tt():M<1&&!q&&($=false);return}if(l.forEach((M,T)=>{let H=T*P*k,O=St(T,Q(c,v+H,S+H,p));ft(M,T,O,h),T===0&&(ne=O,Ee?.(O),e.style.setProperty("--scroll-draw-progress",String(O))),O<1&&(W=false);}),X){let M=D(Q(c,v,S,p));for(let T in X){let H=parseFloat(T);M>=H&&!Me.has(H)&&(Me.add(H),X[T]?.());}}!me&&Q(c,v,S,p)>0&&(me=true,N?.()),W&&!$?Tt():!W&&!q&&($=false);}let _e=ot(A??window,[e],Mt,rr,()=>{let s=m.join();l.forEach(He),Et(),ke=true,m.join()!==s&&Ve();}),pt=ye>0;function Ve(){_e.hold(B||pt);}let At;return pt&&(At=setTimeout(()=>{pt=false,Ve();},ye)),Ve(),ut({destroy(){clearTimeout(xe),clearTimeout(At),_e.off(),yt();},replay(){Pt(),Ue=-1,Ye=-1,Se=0,B=false,ne=0,clearTimeout(xe),Ve();},pause(){B=true,_e.hold(true);},resume(){B&&(B=false,ke=true,Ve());},seek(s){let c=Math.min(1,Math.max(0,s));ne=c,at=c,Qe=[],B=true,_e.hold(true),Kt(c,g),ke=true;},getProgress(){return ne},refresh:_e.remeasure},()=>({tStart:v,tEnd:S}))}function vr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Bt(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let o=[],a=[],u=t[2].trim();if(u)for(let i of u.split(/[\s,]+/)){let f=i.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(f?parseFloat(f[1]):0),a.push(f?f[2]:"");}n.push({fn:t[1],nums:o,units:a});}return n}function wr(e,n,r){let t=Bt(e),o=Bt(n);return t.length===0||t.length!==o.length?r<1?e:n:t.map((a,u)=>{let i=o[u];return a.fn!==i.fn||a.nums.length!==i.nums.length?r<1?`${a.fn}(${a.nums.map((f,d)=>`${f}${a.units[d]}`).join(", ")})`:`${i.fn}(${i.nums.map((f,d)=>`${f}${i.units[d]}`).join(", ")})`:`${a.fn}(${a.nums.map((f,d)=>`${f+(i.nums[d]-f)*r}${a.units[d]}`).join(", ")})`}).join(" ")}function gt(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),o=String(n);if(vr(t))return Je(t,o,r);if(t.includes("("))return wr(t,o,r);let a=t.match(/^([-+]?[\d.]+)(.*)$/),u=o.match(/^([-+]?[\d.]+)(.*)$/);if(a&&u){let i=parseFloat(a[1]),f=parseFloat(u[1]);return `${i+(f-i)*r}${a[2]||u[2]}`}return r<1?t:o}function Er(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Sr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),xr=0,jt="--scroll-draw-progress";function Mr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var Ut={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Re(e,n){return typeof window>"u"?Ut:n.respectReducedMotion===false?Qt(e,n,false):tt(n,(r,t)=>Qt(e,r,t))}function Qt(e,n,r){let{props:t,trigger:o={},easing:a="ease-out",speed:u=1,once:i=false,axis:f="y",scrollContainer:d,native:b=true,velocityScale:E=false,triggerElement:g,onProgress:q,onComplete:ge,onEnter:_,onLeave:U,onEnterBack:Pe,onLeaveBack:ye}=n,Y=typeof a=="function"?a:ve[a]??ve["ease-out"],ee=Ce(o.start||"top bottom"),te=Ce(o.end||"bottom top"),X=g??e,R=typeof d=="string"?document.querySelector(d):d??null,J=Object.entries(t).map(([l,m])=>({prop:Er(l),from:Array.isArray(m)?m[0]:"",to:Array.isArray(m)?m[1]:m}));function st(){let l=window.getComputedStyle(e);for(let m of J)m.from===""&&(m.from=l.getPropertyValue(m.prop).trim()||"0");}function we(){for(let l of J)e.style.setProperty(l.prop,String(l.to));}let Ae=new Map;for(let l of [...J.map(m=>m.prop),jt])Ae.set(l,e.style.getPropertyValue(l));function V(){for(let[l,m]of Ae)m?e.style.setProperty(l,m):e.style.removeProperty(l);}if(r)return we(),ge?.(),{...Ut,destroy:V,getProgress:()=>1};st();let se=()=>R?f==="x"?R.scrollLeft:R.scrollTop:f==="x"?window.scrollX:window.scrollY,Ne=()=>R?f==="x"?R.clientWidth:R.clientHeight:f==="x"?window.innerWidth:window.innerHeight,je=typeof a=="string"?et(a):null;function it(){if(!b||!Mr()||!je||f!=="y"||R||X!==e||i||u!==1||q||ge||_||U||Pe||ye||E!==false||(o.start||"top bottom").trim()!=="top bottom"||(o.end||"bottom top").trim()!=="bottom top")return false;for(let l of J)if(!Sr.has(l.prop))return false;return true}function Ee(){let l=`ssd-a-${++xr}`,m=J.map(x=>`${x.prop}:${x.from}`).join(";"),L=J.map(x=>`${x.prop}:${x.to}`).join(";"),v=document.createElement("style");v.setAttribute("data-ssd-animate",""),v.textContent=`@keyframes ${l}{from{${m}}to{${L}}}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${je};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(v),e.classList.add(l);let S=()=>{let x=e.getBoundingClientRect();return Oe({top:x.top,height:x.height},se(),Ne(),ee,te)};Ge(e,{type:"animate",getProgress:()=>P.getProgress(),getTrigger:S});let P={refresh(){},destroy(){e.classList.remove(l),v.remove(),e.style.animationPlayState="",V(),We(e);},replay(){e.classList.remove(l),e.offsetWidth,e.classList.add(l);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(x){let be=Math.min(1,Math.max(0,x));e.classList.remove(l);for(let $ of J)e.style.setProperty($.prop,gt($.from,$.to,be));},getProgress(){let{tStart:x,tEnd:be}=S();return Y(Q(se(),x,be,u))}};return P}if(it())return Ee();let N=0,G=0,ie=false,Le=-1,ae=0,re=0,F=false,D=NaN,$e=-1,Fe=0,A=X===e?J:[],le=false;function ce(){let l=e.style,m=A.map(P=>l.getPropertyValue(P.prop)),L=l.transition;A.length&&(l.transition="none"),A.forEach(P=>l.setProperty(P.prop,Ae.get(P.prop)??""));let v=Ze(X,R,f);A.forEach((P,x)=>l.setProperty(P.prop,m[x])),A.length&&(e.offsetWidth,l.transition=L);let S=Oe(v,v.scroll,Ne(),ee,te);le&&Math.abs(S.tStart-N)<1&&Math.abs(S.tEnd-G)<1||(le=true,N=S.tStart,G=S.tEnd);}function Z(l){e.style.setProperty(jt,String(l));for(let m of J)e.style.setProperty(m.prop,gt(m.from,m.to,l));q?.(l);}function he(l){if(isNaN(D)){D=l;return}D<=0&&l>0&&_?.(),D<1&&l>=1&&U?.(),D>=1&&l<1&&Pe?.(),D>0&&l<=0&&ye?.(),D=l;}function ue(){if(ie)return;let l=performance.now(),m=se(),L=u;if(E!==false){let x=l-Fe,be=x>0?Math.abs(m-($e<0?m:$e))/x:0;L=u*Math.max(.2,1+be*(typeof E=="number"?E:1)*.04);}$e=m,Fe=l;let v=G===N?0:(m-N)/(G-N);he(v);let S=Q(m,N,G,L),P=i?Math.max(Le,Y(ae=Math.max(ae,S))):Y(S);re=P,Z(P),P>=1&&!F?(F=true,ge?.()):P<1&&!i&&(F=false);}let K=ot(R??window,[X],()=>Q(se(),N,G,Math.min(u,1)),ue,ce);ce(),G===N&&oe("scrollAnimate: zero-length trigger window, so it never animates. In a sticky stage, set triggerElement.",e),ae=Q(se(),N,G,u),re=Y(ae),Z(re),Ge(e,{type:"animate",getProgress:()=>re,getTrigger:()=>({tStart:N,tEnd:G})});function fe(){ie=true,K.hold(true);}return {destroy(){ie=true,K.off(),V(),We(e);},replay(){Le=-1,ae=0,F=false,re=0,ie=false,Z(0),K.hold(false);},pause:fe,resume(){ie&&(ie=false,K.hold(false));},seek(l){let m=Math.min(1,Math.max(0,l));re=m,Le=m,ae=0,fe(),Z(m);},getProgress(){return re},refresh:K.remeasure}}var Yt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Xt(e,n={}){if(typeof window>"u")return Yt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return oe("scrollParallax: element not found:",e),Yt;let{speed:t=.3,axis:o="y",easing:a="linear",trigger:u,onProgress:i}=n,f=-t*100,d=r.style,b=!!r.ownerSVGElement,E=d.getPropertyValue("transform-box");b&&d.setProperty("transform-box","fill-box");let g=Re(r,{props:o==="x"?{transform:["translateX(0%)",`translateX(${f}%)`]}:{transform:["translateY(0%)",`translateY(${f}%)`]},trigger:u??{start:"top bottom",end:"bottom top"},easing:a,native:false,onProgress:i});return b?{...g,destroy(){g.destroy(),d.setProperty("transform-box",E);}}:g}function Be(e){return e.map(n=>typeof n=="string"?document.querySelector(n):n).filter(n=>n!==null)}var Te={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function bn(e,n={}){if(typeof window>"u")return Te;let r=Be(e).map(t=>dt(t,n));return {destroy(){r.forEach(t=>t.destroy());},replay(){r.forEach(t=>t.replay());},pause(){r.forEach(t=>t.pause());},resume(){r.forEach(t=>t.resume());},seek(t){r.forEach(o=>o.seek(t));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(t=>t.refresh?.());}}}function vn(e,n={}){if(typeof window>"u")return Te;let r=Be(e);if(r.length===0)return Te;let t=0,o=[];function a(i){return dt(r[i],{...n,once:true,onComplete(){n.onComplete?.(),t=Math.min(i+1,r.length-1),t>i&&o[t]?.resume();}})}function u(){r.forEach((i,f)=>{o[f]=a(f);});for(let i=1;i<o.length;i++)o[i].pause();}return u(),{destroy(){o.forEach(i=>i.destroy()),o.length=0;},replay(){o.forEach(i=>i.destroy()),o.length=0,t=0,u();},pause(){o[t]?.pause();},resume(){o[t]?.resume();},seek(i){o[t]?.seek(i);},getProgress(){return o[t]?.getProgress()??0},refresh(){o.forEach(i=>i.refresh?.());}}}function wn(e,n){if(typeof window>"u")return Te;let r=Be(e).map(t=>Re(t,n));return {destroy(){r.forEach(t=>t.destroy());},replay(){r.forEach(t=>t.replay());},pause(){r.forEach(t=>t.pause());},resume(){r.forEach(t=>t.resume());},seek(t){r.forEach(o=>o.seek(t));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(t=>t.refresh?.());}}}function En(e,n){if(typeof window>"u")return Te;let r=Be(e);if(r.length===0)return Te;let t=0,o=[];function a(i){return Re(r[i],{...n,once:true,onComplete(){n.onComplete?.(),t=Math.min(i+1,r.length-1),t>i&&o[t]?.resume();}})}function u(){r.forEach((i,f)=>{o[f]=a(f);});for(let i=1;i<o.length;i++)o[i].pause();}return u(),{destroy(){o.forEach(i=>i.destroy()),o.length=0;},replay(){o.forEach(i=>i.destroy()),o.length=0,t=0,u();},pause(){o[t]?.pause();},resume(){o[t]?.resume();},seek(i){o[t]?.seek(i);},getProgress(){return o[t]?.getProgress()??0},refresh(){o.forEach(i=>i.refresh?.());}}}function Sn(e,n={}){if(typeof window>"u")return Te;let r=Be(e).map(t=>Xt(t,n));return {destroy(){r.forEach(t=>t.destroy());},replay(){r.forEach(t=>t.replay());},pause(){r.forEach(t=>t.pause());},resume(){r.forEach(t=>t.resume());},seek(t){r.forEach(o=>o.seek(t));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(t=>t.refresh?.());}}}exports.scrollAnimateGroup=wn;exports.scrollAnimateSequence=En;exports.scrollDrawGroup=bn;exports.scrollDrawSequence=vn;exports.scrollParallaxGroup=Sn;
1
+ 'use strict';var De=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function K(e,...n){De&&console.warn(`[svg-scroll-draw] ${e}`,...n);}function lr({tension:e=2.5,friction:n=2.2}={}){return t=>1-Math.cos(t*Math.PI*e)*Math.pow(1-t,n)}function ur({bounces:e=3,decay:n=.5}={}){let t=Math.max(1,Math.round(e)),r=Math.max(.01,Math.min(.99,n)),o=Math.sqrt(r),a=0,l=[];for(let d=0;d<t;d++){let b=Math.pow(o,d);l.push(b),a+=b;}let i=[0],f=0;for(let d=0;d<t;d++)f+=l[d]/a,i.push(f);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let b=0;b<t;b++)if(d<=i[b+1]){let w=(d-i[b])/(i[b+1]-i[b]);if(b===0)return w*(2-w);let g=1-Math.pow(r,b);return g+(1-g)*(2*w-1)*(2*w-1)}return 1}}function cr({amplitude:e=1,period:n=.4}={}){let t=Math.max(1,e),r=Math.max(.1,n),o=t<=1?r/4:r/(2*Math.PI)*Math.asin(1/t);return a=>a<=0?0:a>=1?1:t*Math.pow(2,-10*a)*Math.sin((a-o)*(2*Math.PI)/r)+1}var Ce={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:lr(),bounce:ur(),elastic:cr()};function fr(e,n,t,r){let o=(a,l,i)=>((1+3*a-3*l)*i+3*l-6*a)*i*i+3*a*i;return a=>{if(a<=0||a>=1)return +(a>0);let l=a;for(let i=0;i<8;i++)l-=(o(e,t,l)-a)/((3*(1+3*e-3*t)*l+6*t-12*e)*l+3*e);if(!(l>=0&&l<=1&&Math.abs(o(e,t,l)-a)<1e-9))for(let i=0,f=0,d=1;i<30;i++)l=(f+d)/2,o(e,t,l)<a?f=l:d=l;return o(n,r,l)}}function yt(e){let n=/^cubic-bezier\((.*)\)$/.exec(e==="ease"?"cubic-bezier(.25,.1,.25,1)":e.trim()),t=n?n[1].split(",").map(parseFloat):[];if(t.length===4&&t.every(Number.isFinite)&&t[0]*(1-t[0])>=0&&t[2]*(1-t[2])>=0)return [fr(t[0],t[1],t[2],t[3]),`cubic-bezier(${t})`]}var Ct=new Set;function Ze(e,n="linear"){if(typeof e=="function")return e;if(e==null)return Ce[n];if({}.hasOwnProperty.call(Ce,e))return Ce[e];let t=yt(String(e));return t?t[0]:(!Ct.has(e)&&Ct.add(e)&&K(`Unknown easing ${JSON.stringify(e)}: use a name, cubic-bezier() or a function.`),Ce[n])}function Ot(e,n,t){return Math.min(t,Math.max(n,e))}function Oe(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[t="top",r="bottom"]=n.split(/\s+/).filter(Boolean);return {element:t,viewport:r}}var Nt=(e,n)=>e==="top"?0:e==="center"?.5:e==="bottom"?1:n;function It(e,n,t,r){return e+t+n*Nt(r,0)}function Rt(e,n){return n*(/^\d+(\.\d+)?%$/.test(e)?parseFloat(e)/100:Nt(e,1))}function Q(e,n,t,r){return t===n?0:Ot((e-n)/(t-n)*r,0,1)}function Ie(e,n,t,r,o){let a=It(e.top,e.height,n,r.element)-Rt(r.viewport,t),l=It(e.top,e.height,n,o.element)-Rt(o.viewport,t);return {tStart:a,tEnd:l}}function Je(e,n,t){let r=e.getBoundingClientRect(),o=t==="x"?r.width:r.height;return n?{top:t==="x"?r.left-n.getBoundingClientRect().left-n.clientLeft+n.scrollLeft:r.top-n.getBoundingClientRect().top-n.clientTop+n.scrollTop,height:o,scroll:0}:{top:t==="x"?r.left:r.top,height:o,scroll:t==="x"?window.scrollX:window.scrollY}}function Ke(e){let n=parseFloat(e.getAttribute("pathLength")??"");if(n>0)return n;let t=e.tagName.toLowerCase();if(t==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),o=parseFloat(e.getAttribute("height")??"0");return 2*(r+o)}if(t==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function et(e){return `${e} ${e*2}`}function Ft(e){let n=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(n)return [parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)];let t=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(t)return [parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)];let r=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return r?[parseInt(r[1]),parseInt(r[2]),parseInt(r[3])]:null}function tt(e,n,t){let r=Ft(e),o=Ft(n);return !r||!o?e:`rgb(${Math.round(r[0]+(o[0]-r[0])*t)},${Math.round(r[1]+(o[1]-r[1])*t)},${Math.round(r[2]+(o[2]-r[2])*t)})`}var Ht={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 mr="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",pr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",_t=33;function dr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function gr(e){let n=[];for(let t=0;t<_t;t++){let r=t/(_t-1);n.push(String(Math.round(e(r)*1e5)/1e5));}return `linear(${n.join(",")})`}function rt(e){switch(e){case "linear":return "linear";case "ease-in":return mr;case "ease-out":return pr;case "ease-in-out":return dr()?gr(Ce["ease-in-out"]):null;default:return yt(e)?.[1]??null}}var Vt=Symbol.for("svg-scroll-draw.registry");function zt(){let e=globalThis;return e[Vt]||(e[Vt]=new Map)}function ze(e,n){zt().set(e,n);}function Ge(e){zt().delete(e);}function Gt(e){if(typeof window>"u"||typeof window.matchMedia!="function")return ()=>{};let n=window.matchMedia("(prefers-reduced-motion: reduce)"),t=o=>e(!!o.matches);if(typeof n.addEventListener=="function")return n.addEventListener("change",t),()=>n.removeEventListener("change",t);let r=n;return r.addListener?.(t),()=>r.removeListener?.(t)}function nt(e,n){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return n(e,true);let t=n(e,false),r=Gt(a=>{if(!a)return;r();let l=(t.getProgress?.()??0)>=1;t.destroy(),t=n(l?{...e,onComplete:void 0}:e,true);}),o={};for(let a of Object.keys(t))o[a]=(...l)=>t[a]?.(...l);return o.destroy=()=>{r(),t.destroy();},o}var We,ot=new Set,st=new WeakMap,Be=new Map,Wt=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function yr(e){let n=new Set;for(let t of e)for(;t&&t!==document.body;t=t.parentElement)for(let r=t;r;r=r.previousElementSibling)n.add(r);return n}function Bt(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let t=()=>n();We??(We=new ResizeObserver(o=>{let a=false;for(let{target:l}of o)st.get(l)!==Wt(l)&&(a=true),st.set(l,"");a&&ot.forEach(l=>l());})),ot.add(t);let r=yr(e);return [document.body,document.documentElement].forEach(o=>o&&r.add(o)),r.forEach(o=>{st.has(o)||st.set(o,Wt(o)),Be.set(o,(Be.get(o)??0)+1),We.observe(o);}),()=>{ot.delete(t)&&(r.forEach(o=>{let a=(Be.get(o)??1)-1;if(a)return void Be.set(o,a);Be.delete(o),We?.unobserve(o);}),ot.size||(We?.disconnect(),We=void 0));}}function it(e,n,t,r,o){let a,l=NaN,i,f,d=()=>{a=0,r(),!i&&!a&&(l=t())>0&&l<1&&(a=requestAnimationFrame(d));},b=()=>{!a&&!i&&t()!==l&&(a=requestAnimationFrame(d));},w=U=>{i=U,cancelAnimationFrame(a),a=l=NaN,b();},g=()=>{clearTimeout(f),o(),b();},B=()=>{clearTimeout(f),f=setTimeout(g,150);},ge=Bt(n,B),_=U=>{e[U]("scroll",b,{passive:true}),window[U]("resize",B),window[U]("orientationchange",B);};return _("addEventListener"),b(),{hold:w,remeasure:g,off(){w(true),_("removeEventListener"),ge(),clearTimeout(f);}}}var hr=0;function br(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function qt(e,n){let t="";try{t=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return t||(e.getAttribute(n)??"").trim()}var jt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function Er(e){if(!De)return;let n=qt(e,"stroke");if(!n||n==="none"){K("Element has no stroke \u2014 path will not be visible.",e);return}let t=(e.getAttribute("fill")??"").trim();t&&!jt.has(t)&&!jt.has(qt(e,"fill"))&&K("Element has a fill \u2014 it may obscure the stroke animation.",e);}function vr(e,n,t){let r=document.createElement("div");r.setAttribute("data-svg-scroll-draw-debug",""),r.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function o(){let a=t==="x"?window.scrollX:window.scrollY,l=e-a,i=n-a,f=t==="x";r.innerHTML=`
2
+ <div style="position:absolute;${f?`left:${l}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${l}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
3
+ <div style="position:absolute;${f?`left:${i}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${i}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 Qt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Ut=/[MmLlHhVvCcSsQqTtAaZz]/g;function wr(e,n,t){if(!De)return;let r=(e.match(Ut)??[]).join("").toUpperCase(),o=(n.match(Ut)??[]).join("").toUpperCase(),a=(e.match(Qt)??[]).length,l=(n.match(Qt)??[]).length;if(r!==o){K(`morphTo: command sequence differs (${r||"\u2205"} \u2192 ${o||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,t);return}a!==l&&K(`morphTo: coordinate count differs (${a} \u2192 ${l}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,t);}function Sr(e,n,t){let r=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,a=>{let l=parseFloat(a),i=r[o++]??l;return String(+(l+(i-l)*t).toFixed(4))})}function ht(e,n={}){return typeof window>"u"?{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0}:nt(n,(t,r)=>Mr(e,t,r))}function Mr(e,n,t){let{preset:r,...o}=n,a=r?{...Ht[r],...o}:o,{selector:l="path, polyline, line, polygon, rect, circle",speed:i=1,fade:f=false,easing:d="linear",trigger:b={},stagger:w=0,direction:g="forward",once:B=false,debug:ge=false,axis:_="y",scrollContainer:U,autoReverse:xe=false,delay:ye=0,strokeColor:Y,strokeWidth:te,fillOpacity:re,waypoints:X,velocityScale:R=false,threshold:ee=0,rootMargin:at="0px",repeat:Ee=0,repeatDelay:Pe=0,morphTo:V,clip:se,autoplay:Ne=false,duration:je=1e3,native:lt=true,onProgress:ve,onStart:N,onComplete:z,onEnter:ie,onLeave:Ae,onEnterBack:ae,onLeaveBack:ne}=a,F=se===true?"left":typeof se=="string"?se:false,D=Ze(d),Le=Oe(b.start||"top bottom"),Fe=Oe(b.end||"bottom top"),A=typeof U=="string"?document.querySelector(U):U??null,le=Array.isArray(Y)?Y[0]:null,ue=Array.isArray(Y)?Y[1]:typeof Y=="string"?Y:null,Z=Array.isArray(te)?te[0]:null,he=Array.isArray(te)?te[1]:typeof te=="number"?te:null,ce=Array.isArray(re)?re[0]:null,J=Array.isArray(re)?re[1]:typeof re=="number"?re:null;function fe(s){let c=s*100;switch(F){case "right":return `inset(0 0 0 ${100-c}%)`;case "top":return `inset(0 0 ${100-c}% 0)`;case "bottom":return `inset(${100-c}% 0 0 0)`;case "center":return `circle(${s*150}% at 50% 50%)`;default:return `inset(0 ${100-c}% 0 0)`}}let u=F?[]:Array.from(e.querySelectorAll(l)),m=[],L=[],E=0,S=0,P=w,M=0,be=0,$=false,me=false,pe=0,ut=-1,Qe=[],Ue=-1,q=false,oe=0,we=0,Se,ct=false,ft=null;function Et(){ft?.destroy(),ft=null;}let Me=new Set,vt=NaN,$e=true,Ye=-1,wt=performance.now(),ke=NaN;function Xe(){return A?_==="x"?A.scrollLeft:A.scrollTop:_==="x"?window.scrollX:window.scrollY}function St(){return A?_==="x"?A.clientWidth:A.clientHeight:_==="x"?window.innerWidth:window.innerHeight}function Mt(){let s=Je(e,A,_);return Ie(s,s.scroll,St(),Le,Fe)}function tr(){let s=S-E,c=u.length-1,p=A??document.documentElement,h=_==="x"?"Width":"Height";if(P=w,w>0&&c>0&&s>0){let C=p[`scroll${h}`]-p[`client${h}`]-1-E-s/i;C>=0&&(P=Math.min(w,C/(c*s)));}let k=Math.max(0,c)*P*s,G=s/Math.min(i,1);M=E+Math.min(0,k,G,k+G),be=E+Math.max(0,k,G,k+G);}function Tt(){(({tStart:E,tEnd:S}=Mt())),tr(),ge&&De&&(Et(),ft=vr(E,S,_));}function mt(s,c=Mt){ze(e,{type:"draw",getProgress:()=>s.getProgress(),getTrigger:c});let p=s.destroy;return s.destroy=()=>{p.call(s),Ge(e);},s}function xt(s,c){return B&&!xe?Math.max(ut,D(Qe[s]=Math.max(Qe[s]??0,c))):D(c)}function rr(s,c){if(e.style.setProperty("--scroll-draw-progress",String(s)),F){let p=c==="reverse"?1-s:s;e.style.clipPath=fe(p);return}u.forEach((p,h)=>pt(p,h,s,c));}function pt(s,c,p,h){s.style.strokeDashoffset=h==="reverse"?`${m[c]*p}`:`${m[c]*(1-p)}`,f&&(s.style.opacity=h==="reverse"?`${1-p}`:`${p}`),le&&ue?s.style.stroke=tt(le,ue,p):ue&&(s.style.stroke=ue),Z!==null&&he!==null?s.style.strokeWidth=`${Z+(he-Z)*p}`:he!==null&&(s.style.strokeWidth=`${he}`),ce!==null&&J!==null?s.style.fillOpacity=`${ce+(J-ce)*p}`:J!==null&&(s.style.fillOpacity=`${J}`),V&&s.tagName.toLowerCase()==="path"&&L[c]&&s.setAttribute("d",Sr(L[c],V,p));}function dt(){if(e.style.setProperty("--scroll-draw-progress","0"),F){e.style.clipPath=fe(g==="reverse"?1:0);return}u.forEach((s,c)=>{s.style.strokeDasharray=et(m[c]),s.style.strokeDashoffset=g==="reverse"?"0":`${m[c]}`,f?s.style.opacity=g==="reverse"?"1":"0":s.style.opacity="",le&&(s.style.stroke=le),Z!==null&&(s.style.strokeWidth=`${Z}`),ce!==null&&(s.style.fillOpacity=`${ce}`),V&&s.tagName.toLowerCase()==="path"&&L[c]&&s.setAttribute("d",L[c]);});}function He(s,c){let p=s.getAttribute("d"),h=Ke(s);if(V&&L[c]){s.setAttribute("d",V);let k=Ke(s);s.setAttribute("d",L[c]),h=Math.max(Ke(s),k),s.setAttribute("d",p);}m[c]=h,s.style.strokeDasharray=et(h);}if(u.forEach((s,c)=>{Er(s);let p=s.tagName.toLowerCase()==="path";p?L.push(s.getAttribute("d")??""):L.push(""),He(s,c);let h=m[c];V&&(p?wr(L[L.length-1],V,s):K(`morphTo only applies to <path> elements \u2014 ignored on <${s.tagName}>.`,s)),t?(s.style.strokeDashoffset=g==="reverse"?`${h}`:"0",f&&(s.style.opacity="1"),ue&&(s.style.stroke=ue),he!==null&&(s.style.strokeWidth=`${he}`),J!==null&&(s.style.fillOpacity=`${J}`),V&&s.tagName.toLowerCase()==="path"&&s.setAttribute("d",V)):(s.style.strokeDashoffset=g==="reverse"?"0":`${h}`,f?s.style.opacity=g==="reverse"?"1":"0":s.style.opacity="",le&&(s.style.stroke=le),Z!==null&&(s.style.strokeWidth=`${Z}`),ce!==null&&(s.style.fillOpacity=`${ce}`));}),t)return F&&(e.style.clipPath=fe(1)),z?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};F&&(e.style.clipPath=fe(g==="reverse"?1:0));let Pt=typeof d=="string"?rt(d):null;function nr(){return !(lt===false||Ne||ge&&De||!br()||!u.length||!Pt||F||_!=="y"||A||i!==1||w!==0||B||xe||R!==false||V||X||Ee||ye>0||ve||N||z||ie||Ae||ae||ne||Y!=null||te!=null||re!=null||(b.start||"top bottom").trim()!=="top bottom"||(b.end||"bottom top").trim()!=="bottom top")}function or(){let s=++hr,c=`svg-scroll-draw-${s}`,p=`svg-scroll-draw-host-${s}`,h=`--svg-scroll-draw-${s}`,k=g==="reverse"?"0":"var(--ssd-len)",G=g==="reverse"?"var(--ssd-len)":"0",C=`stroke-dashoffset:${k};`,T=`stroke-dashoffset:${G};`;f&&(C+=`opacity:${g==="reverse"?1:0};`,T+=`opacity:${g==="reverse"?0:1};`);let x=document.createElement("style");x.setAttribute("data-svg-scroll-draw",""),x.textContent=`@keyframes ${c}{from{${C}}to{${T}}}.${p}{view-timeline-name:${h};view-timeline-axis:block;}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${Pt};animation-fill-mode:both;animation-timeline:${h};animation-range:cover 0% cover 100%;}`,document.head.appendChild(x),e.classList.add(p);function H(y,v){y.style.setProperty("--ssd-len",String(m[v])),y.style.strokeDasharray=et(m[v]),y.style.strokeDashoffset="",y.style.opacity="",y.style.animationPlayState="",y.classList.add(c);}u.forEach(H);let O=false,W=-1;function j(){if(W>=0)return W;let y=e.getBoundingClientRect(),{tStart:v,tEnd:I}=Ie({top:y.top,height:y.height},Xe(),St(),Le,Fe);return D(Q(Xe(),v,I,i))}return {destroy(){e.classList.remove(p),u.forEach(y=>{y.classList.remove(c),y.style.removeProperty("--ssd-len"),y.style.animationPlayState="";}),x.remove();},replay(){O=false,W=-1,u.forEach(H);},pause(){O=true,u.forEach(y=>{y.style.animationPlayState="paused";});},resume(){O&&(O=false,u.forEach(y=>{y.style.animationPlayState="running";}));},seek(y){let v=Math.min(1,Math.max(0,y));W=v,O=true,u.forEach((I,de)=>{I.classList.remove(c),I.style.strokeDashoffset=g==="reverse"?`${m[de]*v}`:`${m[de]*(1-v)}`,f&&(I.style.opacity=g==="reverse"?`${1-v}`:`${v}`);});},getProgress(){return j()},refresh(){u.forEach((y,v)=>{He(y,v),y.style.setProperty("--ssd-len",String(m[v]));});}}}if(nr())return mt(or());function sr(){let s=Math.max(1,je),c=F?s:s*(1+Math.max(0,u.length-1)*w),p=0,h=0,k=false;function G(W){let j=true,y=Math.min(1,Math.max(0,W/c));if(F){let v=Math.min(1,Math.max(0,W/s)),I=D(v);oe=I,e.style.setProperty("--scroll-draw-progress",String(I)),e.style.clipPath=fe(g==="reverse"?1-I:I),ve?.(I),v<1&&(j=false);}else {u.forEach((I,de)=>{let ar=de*w*s,Dt=Math.min(1,Math.max(0,(W-ar)/s));pt(I,de,D(Dt),g),Dt<1&&(j=false);});let v=D(y);oe=v,ve?.(v),e.style.setProperty("--scroll-draw-progress",String(v));}if(X){let v=D(y);for(let I in X){let de=parseFloat(I);v>=de&&!Me.has(de)&&(Me.add(de),X[I]?.());}}return j}function C(W){if(q)return;let j=W-p;me||(me=true,N?.());let y=G(j);if(y&&!$){$=true,G(c),z?.(),we<(Ee==="infinite"?1/0:Ee??0)&&(we++,Se=setTimeout(()=>{p=performance.now(),me=false,$=false,Me.clear(),dt(),pe=requestAnimationFrame(C);},Pe));return}y||(pe=requestAnimationFrame(C));}function T(){cancelAnimationFrame(pe),clearTimeout(Se),p=performance.now(),h=0,q=false,me=false,$=false,we=0,k=true,oe=0,Me.clear(),dt(),pe=requestAnimationFrame(C);}let x=new IntersectionObserver(W=>{W.forEach(j=>{j.isIntersecting&&!(B&&$)?T():!j.isIntersecting&&!B&&!$&&(cancelAnimationFrame(pe),clearTimeout(Se),k=false);});},{root:A??null,threshold:ee,rootMargin:at}),H;function O(){clearTimeout(H),H=setTimeout(()=>u.forEach(He),150);}return window.addEventListener("resize",O),window.addEventListener("orientationchange",O),ye>0?setTimeout(()=>x.observe(e),ye):x.observe(e),{destroy(){cancelAnimationFrame(pe),clearTimeout(Se),x.disconnect(),window.removeEventListener("resize",O),window.removeEventListener("orientationchange",O),clearTimeout(H);},replay(){we=0,T();},pause(){q||!k||(q=true,h=performance.now()-p,cancelAnimationFrame(pe));},resume(){q&&(q=false,k=true,p=performance.now()-h,pe=requestAnimationFrame(C));},seek(W){let j=Math.min(1,Math.max(0,W));oe=j,q=true,h=j*c,p=performance.now()-h,cancelAnimationFrame(pe),G(h);},getProgress(){return oe},refresh(){clearTimeout(H),u.forEach(He);}}}if(Ne)return mt(sr());Tt();let At=()=>Q(Xe(),M,be,1);function Lt(){$=true,z?.(),we<(Ee==="infinite"?1/0:Ee)&&(we++,Se=setTimeout(()=>{ct=true;},Pe));}function $t(){ut=-1,Qe=[],me=false,$=false,ct=false,Me.clear(),dt(),$e=true;}function ir(){let s=performance.now(),c=Xe();if(ct&&At()%1&&$t(),!$e&&R===false&&c===vt)return;$e=false,vt=c;let p=i;if(R!==false){let T=s-wt,x=T>0?Math.abs(c-(Ye<0?c:Ye))/T:0;p=i*Math.max(.2,1+x*(typeof R=="number"?R:1)*.04);}Ye=c,wt=s;let h=xe?Ue===-1||c>=Ue?"forward":"reverse":g;Ue=c;let k=S-E,G=true,C=k===0?0:(c-E)/k;if(isNaN(ke)||(ke<=0&&C>0&&ie?.(),ke<1&&C>=1&&Ae?.(),ke>=1&&C<1&&ae?.(),ke>0&&C<=0&&ne?.()),ke=C,F){let T=xt(0,Q(c,E,S,p));oe=T,e.style.setProperty("--scroll-draw-progress",String(T));let x=h==="reverse"?1-T:T;e.style.clipPath=fe(x),ve?.(T),!me&&Q(c,E,S,p)>0&&(me=true,N?.()),T>=1&&!$?Lt():T<1&&!B&&($=false);return}if(u.forEach((T,x)=>{let H=x*P*k,O=xt(x,Q(c,E+H,S+H,p));pt(T,x,O,h),x===0&&(oe=O,ve?.(O),e.style.setProperty("--scroll-draw-progress",String(O))),O<1&&(G=false);}),X){let T=D(Q(c,E,S,p));for(let x in X){let H=parseFloat(x);T>=H&&!Me.has(H)&&(Me.add(H),X[x]?.());}}!me&&Q(c,E,S,p)>0&&(me=true,N?.()),G&&!$?Lt():!G&&!B&&($=false);}let _e=it(A??window,[e],At,ir,()=>{let s=m.join();u.forEach(He),Tt(),$e=true,m.join()!==s&&Ve();}),gt=ye>0;function Ve(){_e.hold(q||gt);}let kt;return gt&&(kt=setTimeout(()=>{gt=false,Ve();},ye)),Ve(),mt({destroy(){clearTimeout(Se),clearTimeout(kt),_e.off(),Et();},replay(){$t(),Ue=-1,Ye=-1,we=0,q=false,oe=0,clearTimeout(Se),Ve();},pause(){q=true,_e.hold(true);},resume(){q&&(q=false,$e=true,Ve());},seek(s){let c=Math.min(1,Math.max(0,s));oe=c,ut=c,Qe=[],q=true,_e.hold(true),rr(c,g),$e=true;},getProgress(){return oe},refresh:_e.remeasure},()=>({tStart:E,tEnd:S}))}function Tr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Yt(e){let n=[],t=/([\w]+)\(([^)]*)\)/g,r;for(;(r=t.exec(e))!==null;){let o=[],a=[],l=r[2].trim();if(l)for(let i of l.split(/[\s,]+/)){let f=i.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(f?parseFloat(f[1]):0),a.push(f?f[2]:"");}n.push({fn:r[1],nums:o,units:a});}return n}function xr(e,n,t){let r=Yt(e),o=Yt(n);return r.length===0||r.length!==o.length?t<1?e:n:r.map((a,l)=>{let i=o[l];return a.fn!==i.fn||a.nums.length!==i.nums.length?t<1?`${a.fn}(${a.nums.map((f,d)=>`${f}${a.units[d]}`).join(", ")})`:`${i.fn}(${i.nums.map((f,d)=>`${f}${i.units[d]}`).join(", ")})`:`${a.fn}(${a.nums.map((f,d)=>`${f+(i.nums[d]-f)*t}${a.units[d]}`).join(", ")})`}).join(" ")}function bt(e,n,t){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*t);let r=String(e),o=String(n);if(Tr(r))return tt(r,o,t);if(r.includes("("))return xr(r,o,t);let a=r.match(/^([-+]?[\d.]+)(.*)$/),l=o.match(/^([-+]?[\d.]+)(.*)$/);if(a&&l){let i=parseFloat(a[1]),f=parseFloat(l[1]);return `${i+(f-i)*t}${a[2]||l[2]}`}return t<1?r:o}function Pr(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Ar=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Lr=0,Xt="--scroll-draw-progress";function $r(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}var Jt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Re(e,n){return typeof window>"u"?Jt:n.respectReducedMotion===false?Zt(e,n,false):nt(n,(t,r)=>Zt(e,t,r))}function Zt(e,n,t){let{props:r,trigger:o={},easing:a="ease-out",speed:l=1,once:i=false,axis:f="y",scrollContainer:d,native:b=true,velocityScale:w=false,triggerElement:g,onProgress:B,onComplete:ge,onEnter:_,onLeave:U,onEnterBack:xe,onLeaveBack:ye}=n,Y=Ze(a,"ease-out"),te=Oe(o.start||"top bottom"),re=Oe(o.end||"bottom top"),X=g??e,R=typeof d=="string"?document.querySelector(d):d??null,ee=Object.entries(r).map(([u,m])=>({prop:Pr(u),from:Array.isArray(m)?m[0]:"",to:Array.isArray(m)?m[1]:m}));function at(){let u=window.getComputedStyle(e);for(let m of ee)m.from===""&&(m.from=u.getPropertyValue(m.prop).trim()||"0");}function Ee(){for(let u of ee)e.style.setProperty(u.prop,String(u.to));}let Pe=new Map;for(let u of [...ee.map(m=>m.prop),Xt])Pe.set(u,e.style.getPropertyValue(u));function V(){for(let[u,m]of Pe)m?e.style.setProperty(u,m):e.style.removeProperty(u);}if(t)return Ee(),ge?.(),{...Jt,destroy:V,getProgress:()=>1};at();let se=()=>R?f==="x"?R.scrollLeft:R.scrollTop:f==="x"?window.scrollX:window.scrollY,Ne=()=>R?f==="x"?R.clientWidth:R.clientHeight:f==="x"?window.innerWidth:window.innerHeight,je=typeof a=="string"?rt(a):null;function lt(){if(!b||!$r()||!je||f!=="y"||R||X!==e||i||l!==1||B||ge||_||U||xe||ye||w!==false||(o.start||"top bottom").trim()!=="top bottom"||(o.end||"bottom top").trim()!=="bottom top")return false;for(let u of ee)if(!Ar.has(u.prop))return false;return true}function ve(){let u=`ssd-a-${++Lr}`,m=ee.map(M=>`${M.prop}:${M.from}`).join(";"),L=ee.map(M=>`${M.prop}:${M.to}`).join(";"),E=document.createElement("style");E.setAttribute("data-ssd-animate",""),E.textContent=`@keyframes ${u}{from{${m}}to{${L}}}.${u}{animation-name:${u};animation-duration:auto;animation-timing-function:${je};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(E),e.classList.add(u);let S=()=>{let M=e.getBoundingClientRect();return Ie({top:M.top,height:M.height},se(),Ne(),te,re)};ze(e,{type:"animate",getProgress:()=>P.getProgress(),getTrigger:S});let P={refresh(){},destroy(){e.classList.remove(u),E.remove(),e.style.animationPlayState="",V(),Ge(e);},replay(){e.classList.remove(u),e.offsetWidth,e.classList.add(u);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(M){let be=Math.min(1,Math.max(0,M));e.classList.remove(u);for(let $ of ee)e.style.setProperty($.prop,bt($.from,$.to,be));},getProgress(){let{tStart:M,tEnd:be}=S();return Y(Q(se(),M,be,l))}};return P}if(lt())return ve();let N=0,z=0,ie=false,Ae=-1,ae=0,ne=0,F=false,D=NaN,Le=-1,Fe=0,A=X===e?ee:[],le=false;function ue(){let u=e.style,m=A.map(P=>u.getPropertyValue(P.prop)),L=u.transition;A.length&&(u.transition="none"),A.forEach(P=>u.setProperty(P.prop,Pe.get(P.prop)??""));let E=Je(X,R,f);A.forEach((P,M)=>u.setProperty(P.prop,m[M])),A.length&&(e.offsetWidth,u.transition=L);let S=Ie(E,E.scroll,Ne(),te,re);le&&Math.abs(S.tStart-N)<1&&Math.abs(S.tEnd-z)<1||(le=true,N=S.tStart,z=S.tEnd);}function Z(u){e.style.setProperty(Xt,String(u));for(let m of ee)e.style.setProperty(m.prop,bt(m.from,m.to,u));B?.(u);}function he(u){if(isNaN(D)){D=u;return}D<=0&&u>0&&_?.(),D<1&&u>=1&&U?.(),D>=1&&u<1&&xe?.(),D>0&&u<=0&&ye?.(),D=u;}function ce(){if(ie)return;let u=performance.now(),m=se(),L=l;if(w!==false){let M=u-Fe,be=M>0?Math.abs(m-(Le<0?m:Le))/M:0;L=l*Math.max(.2,1+be*(typeof w=="number"?w:1)*.04);}Le=m,Fe=u;let E=z===N?0:(m-N)/(z-N);he(E);let S=Q(m,N,z,L),P=i?Math.max(Ae,Y(ae=Math.max(ae,S))):Y(S);ne=P,Z(P),P>=1&&!F?(F=true,ge?.()):P<1&&!i&&(F=false);}let J=it(R??window,[X],()=>Q(se(),N,z,Math.min(l,1)),ce,ue);ue(),z===N&&K("scrollAnimate: zero-length trigger window, so it never animates. In a sticky stage, set triggerElement.",e),ae=Q(se(),N,z,l),ne=Y(ae),Z(ne),ze(e,{type:"animate",getProgress:()=>ne,getTrigger:()=>({tStart:N,tEnd:z})});function fe(){ie=true,J.hold(true);}return {destroy(){ie=true,J.off(),V(),Ge(e);},replay(){Ae=-1,ae=0,F=false,ne=0,ie=false,Z(0),J.hold(false);},pause:fe,resume(){ie&&(ie=false,J.hold(false));},seek(u){let m=Math.min(1,Math.max(0,u));ne=m,Ae=m,ae=0,fe(),Z(m);},getProgress(){return ne},refresh:J.remeasure}}var Kt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function er(e,n={}){if(typeof window>"u")return Kt;let t=typeof e=="string"?document.querySelector(e):e;if(!t)return K("scrollParallax: element not found:",e),Kt;let{speed:r=.3,axis:o="y",easing:a="linear",trigger:l,onProgress:i}=n,f=-r*100,d=t.style,b=!!t.ownerSVGElement,w=d.getPropertyValue("transform-box");b&&d.setProperty("transform-box","fill-box");let g=Re(t,{props:o==="x"?{transform:["translateX(0%)",`translateX(${f}%)`]}:{transform:["translateY(0%)",`translateY(${f}%)`]},trigger:l??{start:"top bottom",end:"bottom top"},easing:a,native:false,onProgress:i});return b?{...g,destroy(){g.destroy(),d.setProperty("transform-box",w);}}:g}function qe(e){return e.map(n=>typeof n=="string"?document.querySelector(n):n).filter(n=>n!==null)}var Te={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Pn(e,n={}){if(typeof window>"u")return Te;let t=qe(e).map(r=>ht(r,n));return {destroy(){t.forEach(r=>r.destroy());},replay(){t.forEach(r=>r.replay());},pause(){t.forEach(r=>r.pause());},resume(){t.forEach(r=>r.resume());},seek(r){t.forEach(o=>o.seek(r));},getProgress(){return t[0]?.getProgress()??0},refresh(){t.forEach(r=>r.refresh?.());}}}function An(e,n={}){if(typeof window>"u")return Te;let t=qe(e);if(t.length===0)return Te;let r=0,o=[];function a(i){return ht(t[i],{...n,once:true,onComplete(){n.onComplete?.(),r=Math.min(i+1,t.length-1),r>i&&o[r]?.resume();}})}function l(){t.forEach((i,f)=>{o[f]=a(f);});for(let i=1;i<o.length;i++)o[i].pause();}return l(),{destroy(){o.forEach(i=>i.destroy()),o.length=0;},replay(){o.forEach(i=>i.destroy()),o.length=0,r=0,l();},pause(){o[r]?.pause();},resume(){o[r]?.resume();},seek(i){o[r]?.seek(i);},getProgress(){return o[r]?.getProgress()??0},refresh(){o.forEach(i=>i.refresh?.());}}}function Ln(e,n){if(typeof window>"u")return Te;let t=qe(e).map(r=>Re(r,n));return {destroy(){t.forEach(r=>r.destroy());},replay(){t.forEach(r=>r.replay());},pause(){t.forEach(r=>r.pause());},resume(){t.forEach(r=>r.resume());},seek(r){t.forEach(o=>o.seek(r));},getProgress(){return t[0]?.getProgress()??0},refresh(){t.forEach(r=>r.refresh?.());}}}function $n(e,n){if(typeof window>"u")return Te;let t=qe(e);if(t.length===0)return Te;let r=0,o=[];function a(i){return Re(t[i],{...n,once:true,onComplete(){n.onComplete?.(),r=Math.min(i+1,t.length-1),r>i&&o[r]?.resume();}})}function l(){t.forEach((i,f)=>{o[f]=a(f);});for(let i=1;i<o.length;i++)o[i].pause();}return l(),{destroy(){o.forEach(i=>i.destroy()),o.length=0;},replay(){o.forEach(i=>i.destroy()),o.length=0,r=0,l();},pause(){o[r]?.pause();},resume(){o[r]?.resume();},seek(i){o[r]?.seek(i);},getProgress(){return o[r]?.getProgress()??0},refresh(){o.forEach(i=>i.refresh?.());}}}function kn(e,n={}){if(typeof window>"u")return Te;let t=qe(e).map(r=>er(r,n));return {destroy(){t.forEach(r=>r.destroy());},replay(){t.forEach(r=>r.replay());},pause(){t.forEach(r=>r.pause());},resume(){t.forEach(r=>r.resume());},seek(r){t.forEach(o=>o.seek(r));},getProgress(){return t[0]?.getProgress()??0},refresh(){t.forEach(r=>r.refresh?.());}}}exports.scrollAnimateGroup=Ln;exports.scrollAnimateSequence=$n;exports.scrollDrawGroup=Pn;exports.scrollDrawSequence=An;exports.scrollParallaxGroup=kn;
@@ -1,6 +1,6 @@
1
- import { S as ScrollDrawInstance, a as ScrollDrawOptions } from '../types-9bcJdVcg.mjs';
2
- import { S as ScrollParallaxOptions } from '../index-DAiRJgtF.mjs';
3
- import { S as ScrollAnimateOptions } from '../engine-BLWKCfxC.mjs';
1
+ import { S as ScrollDrawInstance, a as ScrollDrawOptions } from '../types-iITMwrru.mjs';
2
+ import { S as ScrollParallaxOptions } from '../index-ClAFxNEp.mjs';
3
+ import { S as ScrollAnimateOptions } from '../engine-Bi2x8-X-.mjs';
4
4
 
5
5
  /**
6
6
  * Animate multiple SVG containers simultaneously with the same options.