svg-scroll-draw 2.20.0 → 2.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/angular/index.cjs +2 -2
- package/dist/angular/index.mjs +1 -1
- package/dist/astro/index.cjs +2 -2
- package/dist/astro/index.mjs +1 -1
- package/dist/cdn/svg-scroll-draw.dev.global.js +6 -3
- package/dist/cdn/svg-scroll-draw.global.js +2 -2
- package/dist/{chunk-VVFGB4RT.mjs → chunk-ECHMYVSK.mjs} +1 -1
- package/dist/{chunk-LQBXJRFY.mjs → chunk-ENACACPZ.mjs} +2 -2
- package/dist/{chunk-6SSA5V7J.mjs → chunk-SMRTRZSD.mjs} +1 -1
- package/dist/group/index.cjs +2 -2
- package/dist/group/index.mjs +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.mjs +1 -1
- package/dist/nuxt/index.cjs +2 -2
- package/dist/nuxt/index.mjs +1 -1
- package/dist/react/index.cjs +2 -2
- package/dist/react/index.mjs +1 -1
- package/dist/solid/index.cjs +2 -2
- package/dist/solid/index.mjs +1 -1
- package/dist/svelte/index.cjs +2 -2
- package/dist/svelte/index.mjs +1 -1
- package/dist/vue/index.cjs +2 -2
- package/dist/vue/index.mjs +1 -1
- package/dist/web-component/index.cjs +2 -2
- package/dist/web-component/index.mjs +1 -1
- package/package.json +1 -1
package/dist/react/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
'use strict';var
|
|
2
|
+
'use strict';var Ir=require('react'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Ir__default=/*#__PURE__*/_interopDefault(Ir);function cr({bounces:e=3,decay:n=.5}={}){let r=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,n)),o=Math.sqrt(t),s=0,a=[];for(let d=0;d<r;d++){let x=Math.pow(o,d);a.push(x),s+=x;}let c=[0],m=0;for(let d=0;d<r;d++)m+=a[d]/s,c.push(m);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let x=0;x<r;x++)if(d<=c[x+1]){let M=(d-c[x])/(c[x+1]-c[x]);if(x===0)return M*(2-M);let P=1-Math.pow(t,x);return P+(1-P)*(2*M-1)*(2*M-1)}return 1}}function ur({amplitude:e=1,period:n=.4}={}){let r=Math.max(1,e),t=Math.max(.1,n),o=r<=1?t/4:t/(2*Math.PI)*Math.asin(1/r);return s=>s<=0?0:s>=1?1:r*Math.pow(2,-10*s)*Math.sin((s-o)*(2*Math.PI)/t)+1}var Z={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:cr(),elastic:ur()};function Pt(e,n,r){return Math.min(r,Math.max(n,e))}function le(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[r="top",t="bottom"]=n.split(/\s+/).filter(Boolean);return {element:r,viewport:t}}function Ct(e,n,r,t){switch(t){case "top":return e+r;case "center":return e+r+n/2;case "bottom":return e+r+n;default:return e+r}}function $t(e,n){if(/^\d+(\.\d+)?%$/.test(e))return n*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return n/2;case "bottom":return n;default:return n}}function ee(e,n,r,t){return r===n?0:Pt((e-n)/(r-n)*t,0,1)}function Me(e,n,r,t,o){let s=Ct(e.top,e.height,n,t.element)-$t(t.viewport,r),a=Ct(e.top,e.height,n,o.element)-$t(o.viewport,r);return {tStart:s,tEnd:a}}function it(e,n,r){let t=e.getBoundingClientRect(),o=r==="x"?t.width:t.height;return n?{top:r==="x"?t.left-n.getBoundingClientRect().left+n.scrollLeft:t.top-n.getBoundingClientRect().top+n.scrollTop,height:o,scroll:0}:{top:r==="x"?t.left:t.top,height:o,scroll:r==="x"?window.scrollX:window.scrollY}}function Ge(e){let n=e.tagName.toLowerCase();if(n==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(r+t)}if(n==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function kt(e){let n=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(n)return [parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)];let r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(r)return [parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)];let t=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return t?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:null}function je(e,n,r){let t=kt(e),o=kt(n);return !t||!o?e:`rgb(${Math.round(t[0]+(o[0]-t[0])*r)},${Math.round(t[1]+(o[1]-t[1])*r)},${Math.round(t[2]+(o[2]-t[2])*r)})`}var Rt={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var Ke=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function ve(e,...n){Ke&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var mr="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",fr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Ot=33;function pr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function dr(e){let n=[];for(let r=0;r<Ot;r++){let t=r/(Ot-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function at(e){switch(e){case "linear":return "linear";case "ease-in":return mr;case "ease-out":return fr;case "ease-in-out":return pr()?dr(Z["ease-in-out"]):null;default:return null}}var It=Symbol.for("svg-scroll-draw.registry");function Nt(){let e=globalThis;return e[It]||(e[It]=new Map)}function Re(e,n){Nt().set(e,n);}function Oe(e){Nt().delete(e);}var Qe,lt=new Set,ct=new WeakMap,Je=new Map,Ft=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function gr(e){let n=new Set;for(let r of e)for(;r&&r!==document.body;r=r.parentElement)for(let t=r;t;t=t.previousElementSibling)n.add(t);return n}function Ne(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>n();Qe??(Qe=new ResizeObserver(o=>{let s=false;for(let{target:a}of o)ct.get(a)!==Ft(a)&&(s=true),ct.set(a,"");s&<.forEach(a=>a());})),lt.add(r);let t=gr(e);return [document.body,document.documentElement].forEach(o=>o&&t.add(o)),t.forEach(o=>{ct.has(o)||ct.set(o,Ft(o)),Je.set(o,(Je.get(o)??0)+1),Qe.observe(o);}),()=>{lt.delete(r)&&(t.forEach(o=>{let s=(Je.get(o)??1)-1;if(s)return void Je.set(o,s);Je.delete(o),Qe?.unobserve(o);}),lt.size||(Qe?.disconnect(),Qe=void 0));}}var yr=0;function hr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Dt(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var Ht=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function br(e){if(!Ke)return;let n=Dt(e,"stroke");if(!n||n==="none"){ve("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!Ht.has(r)&&!Ht.has(Dt(e,"fill"))&&ve("Element has a fill \u2014 it may obscure the stroke animation.",e);}function wr(e,n,r){let t=document.createElement("div");t.setAttribute("data-svg-scroll-draw-debug",""),t.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function o(){let s=r==="x"?window.scrollX:window.scrollY,a=e-s,c=n-s,m=r==="x";t.innerHTML=`
|
|
3
3
|
<div style="position:absolute;${m?`left:${a}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${a}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
|
|
4
|
-
<div style="position:absolute;${m?`left:${c}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${c}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",o,{passive:true}),o(),{el:t,destroy(){window.removeEventListener("scroll",o),t.remove();}}}var Ht=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,zt=/[MmLlHhVvCcSsQqTtAaZz]/g;function wr(e,n,r){if(!Ye)return;let t=(e.match(zt)??[]).join("").toUpperCase(),o=(n.match(zt)??[]).join("").toUpperCase(),s=(e.match(Ht)??[]).length,a=(n.match(Ht)??[]).length;if(t!==o){ve(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${o||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,r);return}s!==a&&ve(`morphTo: coordinate count differs (${s} \u2192 ${a}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function gt(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let a=parseFloat(s),c=t[o++]??a;return String(+(a+(c-a)*r).toFixed(4))})}function Vt(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,o=r?{...kt[r],...t}:t,s=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:a="path, polyline, line, polygon, rect, circle",speed:c=1,fade:m=false,easing:d="linear",trigger:x={},stagger:M=0,direction:P="forward",once:te=false,debug:Ee=false,axis:H="y",scrollContainer:K,autoReverse:z=false,delay:V=0,strokeColor:I,strokeWidth:$,fillOpacity:k,waypoints:h,velocityScale:C=false,threshold:E=0,rootMargin:b="0px",repeat:g=0,repeatDelay:U=0,morphTo:L,clip:_,autoplay:ie=false,duration:he=1e3,native:be=true,onProgress:q,onStart:O,onComplete:f,onEnter:p,onLeave:N,onEnterBack:X,onLeaveBack:Le}=o,T=_===true?"left":typeof _=="string"?_:false,W=typeof d=="function"?d:Z[d]??Z.linear,pe=ce(x.start??"top bottom"),Fe=ce(x.end??"bottom top"),Se=typeof K=="string"?document.querySelector(K):K??null,Pe=Array.isArray(I)?I[0]:null,de=Array.isArray(I)?I[1]:typeof I=="string"?I:null,re=Array.isArray($)?$[0]:null,ue=Array.isArray($)?$[1]:typeof $=="number"?$:null,me=Array.isArray(k)?k[0]:null,ne=Array.isArray(k)?k[1]:typeof k=="number"?k:null;function De(i){let l=i*100;switch(T){case "right":return `inset(0 0 0 ${100-l}%)`;case "top":return `inset(0 0 ${100-l}% 0)`;case "bottom":return `inset(${100-l}% 0 0 0)`;case "center":return `circle(${i*150}% at 50% 50%)`;default:return `inset(0 ${100-l}% 0 0)`}}let B=T?[]:Array.from(e.querySelectorAll(a)),F=[],ge=[],ae=0,Te=0,u=M,v=0,G=false,Y=false,R=0,le=false,we=-1,He=[],fe=-1,Q=false,xe=0,ze=0,Ve,mt=null;function ht(){mt?.destroy(),mt=null;}let _e=new Set,bt=NaN,qe=true,et=-1,wt=performance.now(),We=NaN;function tt(){return Se?H==="x"?Se.scrollLeft:Se.scrollTop:H==="x"?window.scrollX:window.scrollY}function vt(){return Se?H==="x"?Se.clientWidth:Se.clientHeight:H==="x"?window.innerWidth:window.innerHeight}function Et(){let i=it(e,Se,H);return Me(i,i.scroll,vt(),pe,Fe)}function rr(){let i=Te-ae,l=B.length-1,w=Se??document.documentElement,oe=H==="x"?"Width":"Height";if(u=M,M>0&&l>0&&i>0){let Ce=w[`scroll${oe}`]-w[`client${oe}`]-1-ae-i/c;Ce>=0&&(u=Math.min(M,Ce/(l*i)));}v=Te+l*u*i;}function St(){(({tStart:ae,tEnd:Te}=Et())),rr(),Ee&&Ye&&(ht(),mt=br(ae,Te,H));}function ft(i,l=Et){Re(e,{type:"draw",getProgress:()=>i.getProgress(),getTrigger:l});let w=i.destroy;return i.destroy=()=>{w.call(i),Oe(e);},i}function nr(i,l){if(e.style.setProperty("--scroll-draw-progress",String(i)),T){let w=l==="reverse"?1-i:i;e.style.clipPath=De(w);return}B.forEach((w,oe)=>{w.style.strokeDashoffset=l==="reverse"?`${F[oe]*i}`:`${F[oe]*(1-i)}`,m&&(w.style.opacity=l==="reverse"?`${1-i}`:`${i}`),Pe&&de?w.style.stroke=je(Pe,de,i):de&&(w.style.stroke=de),re!==null&&ue!==null?w.style.strokeWidth=`${re+(ue-re)*i}`:ue!==null&&(w.style.strokeWidth=`${ue}`),me!==null&&ne!==null?w.style.fillOpacity=`${me+(ne-me)*i}`:ne!==null&&(w.style.fillOpacity=`${ne}`),L&&w.tagName.toLowerCase()==="path"&&ge[oe]&&w.setAttribute("d",gt(ge[oe],L,i));});}function rt(){if(e.style.setProperty("--scroll-draw-progress","0"),T){e.style.clipPath=De(0);return}B.forEach((i,l)=>{i.style.strokeDasharray=`${F[l]}`,i.style.strokeDashoffset=P==="reverse"?"0":`${F[l]}`,m?i.style.opacity=P==="reverse"?"1":"0":i.style.opacity="",Pe&&(i.style.stroke=Pe),re!==null&&(i.style.strokeWidth=`${re}`),me!==null&&(i.style.fillOpacity=`${me}`),L&&i.tagName.toLowerCase()==="path"&&ge[l]&&i.setAttribute("d",ge[l]);});}if(B.forEach(i=>{hr(i);let l=Ge(i);F.push(l);let w=i.tagName.toLowerCase()==="path";w?ge.push(i.getAttribute("d")??""):ge.push(""),L&&(w?wr(ge[ge.length-1],L,i):ve(`morphTo only applies to <path> elements \u2014 ignored on <${i.tagName}>.`,i)),s?(i.style.strokeDasharray=`${l}`,i.style.strokeDashoffset=P==="reverse"?`${l}`:"0",m&&(i.style.opacity="1"),de&&(i.style.stroke=de),ue!==null&&(i.style.strokeWidth=`${ue}`),ne!==null&&(i.style.fillOpacity=`${ne}`),L&&i.tagName.toLowerCase()==="path"&&i.setAttribute("d",L)):(i.style.strokeDasharray=`${l}`,i.style.strokeDashoffset=P==="reverse"?"0":`${l}`,m?i.style.opacity=P==="reverse"?"1":"0":i.style.opacity="",Pe&&(i.style.stroke=Pe),re!==null&&(i.style.strokeWidth=`${re}`),me!==null&&(i.style.fillOpacity=`${me}`));}),T){if(s)return e.style.clipPath=De(1),f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=De(0);}else if(s)return f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Tt=typeof d=="string"?at(d):null;function or(){return !(be===false||!yr()||!B.length||!Tt||T||H!=="y"||Se||c!==1||M!==0||te||z||C!==false||L||h||g||V>0||q||O||f||p||N||X||Le||I!=null||$!=null||k!=null||(x.start??"top bottom").trim()!=="top bottom"||(x.end??"bottom top").trim()!=="bottom top")}function sr(){let i=++gr,l=`svg-scroll-draw-${i}`,w=`svg-scroll-draw-host-${i}`,oe=`--svg-scroll-draw-${i}`,Ce=P==="reverse"?"0":"var(--ssd-len)",Ie=P==="reverse"?"var(--ssd-len)":"0",ke=`stroke-dashoffset:${Ce};`,A=`stroke-dashoffset:${Ie};`;m&&(ke+=`opacity:${P==="reverse"?1:0};`,A+=`opacity:${P==="reverse"?0:1};`);let D=document.createElement("style");D.setAttribute("data-svg-scroll-draw",""),D.textContent=`@keyframes ${l}{from{${ke}}to{${A}}}.${w}{view-timeline-name:${oe};view-timeline-axis:block;}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${Tt};animation-fill-mode:both;animation-timeline:${oe};animation-range:cover 0% cover 100%;}`,document.head.appendChild(D),e.classList.add(w);function ye(y,se){y.style.setProperty("--ssd-len",String(F[se])),y.style.strokeDasharray=`${F[se]}`,y.style.strokeDashoffset="",y.style.opacity="",y.style.animationPlayState="",y.classList.add(l);}B.forEach(ye);let S=false,j=-1;function J(){if(j>=0)return j;let y=e.getBoundingClientRect(),{tStart:se,tEnd:$e}=Me({top:y.top,height:y.height},tt(),vt(),pe,Fe);return W(ee(tt(),se,$e,c))}return {destroy(){e.classList.remove(w),B.forEach(y=>{y.classList.remove(l),y.style.removeProperty("--ssd-len"),y.style.animationPlayState="";}),D.remove();},replay(){S=false,j=-1,B.forEach(ye);},pause(){S=true,B.forEach(y=>{y.style.animationPlayState="paused";});},resume(){S&&(S=false,B.forEach(y=>{y.style.animationPlayState="running";}));},seek(y){let se=Math.min(1,Math.max(0,y));j=se,S=true,B.forEach(($e,Ae)=>{$e.classList.remove(l),$e.style.strokeDashoffset=P==="reverse"?`${F[Ae]*se}`:`${F[Ae]*(1-se)}`,m&&($e.style.opacity=P==="reverse"?`${1-se}`:`${se}`);});},getProgress(){return J()},refresh(){B.forEach((y,se)=>{F[se]=Ge(y),y.style.setProperty("--ssd-len",String(F[se])),y.style.strokeDasharray=`${F[se]}`;});}}}if(or())return ft(sr());function ir(){let i=Math.max(1,he),l=0,w=0,oe=false;function Ce(S){let j=true;if(T){let J=Math.min(1,Math.max(0,S/i)),y=W(J);xe=y,e.style.setProperty("--scroll-draw-progress",String(y)),e.style.clipPath=De(P==="reverse"?1-y:y),q?.(y),J<1&&(j=false);}else B.forEach((J,y)=>{let se=y*M*i,$e=Math.min(1,Math.max(0,(S-se)/i)),Ae=W($e);J.style.strokeDashoffset=P==="reverse"?`${F[y]*Ae}`:`${F[y]*(1-Ae)}`,m&&(J.style.opacity=P==="reverse"?`${1-Ae}`:`${Ae}`),Pe&&de?J.style.stroke=je(Pe,de,Ae):de&&(J.style.stroke=de),re!==null&&ue!==null?J.style.strokeWidth=`${re+(ue-re)*Ae}`:ue!==null&&(J.style.strokeWidth=`${ue}`),me!==null&&ne!==null?J.style.fillOpacity=`${me+(ne-me)*Ae}`:ne!==null&&(J.style.fillOpacity=`${ne}`),L&&J.tagName.toLowerCase()==="path"&&ge[y]&&J.setAttribute("d",gt(ge[y],L,Ae)),y===0&&(xe=Ae,q?.(Ae),e.style.setProperty("--scroll-draw-progress",String(Ae))),$e<1&&(j=false);});if(h){let J=Math.min(1,Math.max(0,S/i)),y=W(J);for(let se in h){let $e=parseFloat(se);y>=$e&&!_e.has($e)&&(_e.add($e),h[se]?.());}}return j}function Ie(S){if(Q)return;let j=S-l;Y||(Y=true,O?.());let J=Ce(j);if(J&&!G){G=true,Ce(i*(1+Math.max(0,B.length-1)*M)),f?.(),ze<(g==="infinite"?1/0:g??0)&&(ze++,Ve=setTimeout(()=>{l=performance.now(),Y=false,G=false,_e.clear(),rt(),R=requestAnimationFrame(Ie);},U));return}J||(R=requestAnimationFrame(Ie));}function ke(){cancelAnimationFrame(R),clearTimeout(Ve),l=performance.now(),w=0,Q=false,Y=false,G=false,ze=0,oe=true,xe=0,_e.clear(),rt(),R=requestAnimationFrame(Ie);}let A=new IntersectionObserver(S=>{S.forEach(j=>{j.isIntersecting&&!(te&&G)?ke():!j.isIntersecting&&!te&&!G&&(cancelAnimationFrame(R),clearTimeout(Ve),oe=false);});},{root:Se??null,threshold:E,rootMargin:b}),D;function ye(){clearTimeout(D),D=setTimeout(()=>{B.forEach((S,j)=>{F[j]=Ge(S),S.style.strokeDasharray=`${F[j]}`;});},150);}return window.addEventListener("resize",ye),window.addEventListener("orientationchange",ye),V>0?setTimeout(()=>A.observe(e),V):A.observe(e),{destroy(){cancelAnimationFrame(R),clearTimeout(Ve),A.disconnect(),window.removeEventListener("resize",ye),window.removeEventListener("orientationchange",ye),clearTimeout(D);},replay(){ze=0,ke();},pause(){Q||!oe||(Q=true,w=performance.now()-l,cancelAnimationFrame(R));},resume(){Q&&(Q=false,oe=true,l=performance.now()-w,R=requestAnimationFrame(Ie));},seek(S){let j=Math.min(1,Math.max(0,S));xe=j,Q=true,w=j*i,l=performance.now()-w,cancelAnimationFrame(R),Ce(w);},getProgress(){return xe},refresh(){clearTimeout(D),B.forEach((S,j)=>{F[j]=Ge(S),S.style.strokeDasharray=`${F[j]}`;});}}}if(ie)return ft(ir());St();function xt(){if(Q||!Be)return;let i=performance.now(),l=tt();if(!qe&&C===false&&l===bt){pt(l);return}qe=false,bt=l;let w=c;if(C!==false){let A=i-wt,D=A>0?Math.abs(l-(et<0?l:et))/A:0;w=c*Math.max(.2,1+D*(typeof C=="number"?C:1)*.04);}et=l,wt=i;let oe=z?fe===-1||l>=fe?"forward":"reverse":P;fe=l;let Ce=Te-ae,Ie=true,ke=Ce===0?0:(l-ae)/Ce;if(isNaN(We)||(We<=0&&ke>0?p?.():We>0&&ke<=0&&Le?.(),We<1&&ke>=1?N?.():We>=1&&ke<1&&X?.()),We=ke,T){let A=W(ee(l,ae,Te,w));te&&!z&&(we=Math.max(we,A),A=we),xe=A,e.style.setProperty("--scroll-draw-progress",String(A));let D=oe==="reverse"?1-A:A;e.style.clipPath=De(D),q?.(A),!Y&&ee(l,ae,Te,w)>0&&(Y=true,O?.()),A>=1&&!G?(G=true,f?.(),ze<(g==="infinite"?1/0:g??0)&&(ze++,Ve=setTimeout(()=>{we=-1,Y=false,G=false,e.style.clipPath=De(0);},U))):A<1&&!te&&(G=false),pt(l);return}if(B.forEach((A,D)=>{let ye=D*u*Ce,S=W(ee(l,ae+ye,Te+ye,w));te&&!z&&(S=He[D]=Math.max(He[D]??we,S)),A.style.strokeDashoffset=oe==="reverse"?`${F[D]*S}`:`${F[D]*(1-S)}`,m&&(A.style.opacity=oe==="reverse"?`${1-S}`:`${S}`),Pe&&de?A.style.stroke=je(Pe,de,S):de&&(A.style.stroke=de),re!==null&&ue!==null?A.style.strokeWidth=`${re+(ue-re)*S}`:ue!==null&&(A.style.strokeWidth=`${ue}`),me!==null&&ne!==null?A.style.fillOpacity=`${me+(ne-me)*S}`:ne!==null&&(A.style.fillOpacity=`${ne}`),L&&A.tagName.toLowerCase()==="path"&&ge[D]&&A.setAttribute("d",gt(ge[D],L,S)),D===0&&(xe=S,q?.(S),e.style.setProperty("--scroll-draw-progress",String(S))),S<1&&(Ie=false);}),h){let A=W(ee(l,ae,Te,w));for(let D in h){let ye=parseFloat(D);A>=ye&&!_e.has(ye)&&(_e.add(ye),h[D]?.());}}!Y&&ee(l,ae,Te,w)>0&&(Y=true,O?.()),Ie&&!G?(G=true,f?.(),ze<(g==="infinite"?1/0:g??0)&&(ze++,Ve=setTimeout(()=>{we=-1,He=[],Y=false,G=false,_e.clear(),rt(),qe=true;},U))):!Ie&&!te&&(G=false),pt(l);}function At(i){return i>=Te&&i<v}function pt(i){le||At(i)?R=requestAnimationFrame(xt):Be=false;}let Be=false;function nt(){Be||(Be=true,R=requestAnimationFrame(function(){xt();}));}function ot(){Be=false,cancelAnimationFrame(R);}let dt=new IntersectionObserver(i=>{i.forEach(l=>{le=l.isIntersecting,le&&!Q?(qe=true,nt()):Be&&!Q&&At(tt())||ot();});},{root:Se??null,threshold:E,rootMargin:b});function Mt(){B.forEach((i,l)=>{F[l]=Ge(i),i.style.strokeDasharray=`${F[l]}`;}),St(),qe=true;}let st;function Xe(){clearTimeout(st),st=setTimeout(Mt,150);}window.addEventListener("resize",Xe),window.addEventListener("orientationchange",Xe);let ar=Ne([e],Xe);return V>0?setTimeout(()=>dt.observe(e),V):dt.observe(e),ft({destroy(){cancelAnimationFrame(R),clearTimeout(Ve),ot(),dt.disconnect(),ar(),window.removeEventListener("resize",Xe),window.removeEventListener("orientationchange",Xe),clearTimeout(st),ht();},replay(){we=-1,He=[],fe=-1,et=-1,Y=false,G=false,ze=0,Q=false,xe=0,_e.clear(),clearTimeout(Ve),rt(),qe=true,le&&nt();},pause(){Q=true,ot();},resume(){Q&&(Q=false,qe=true,le&&nt());},seek(i){let l=Math.min(1,Math.max(0,i));xe=l,we=l,He=[],Q=true,ot(),nr(l,P),qe=true;},getProgress(){return xe},refresh(){clearTimeout(st),Mt(),le&&!Q&&nt();}},()=>({tStart:ae,tEnd:Te}))}var _t=new WeakMap,vr=0;function qt(e){return JSON.stringify(e,(n,r)=>{if(typeof r=="function")return "\u0192";if(typeof Element<"u"&&r instanceof Element){let t=_t.get(r);return t===void 0&&_t.set(r,t=++vr),`el#${t}`}return r})}function Wt(e,n){let r={...e};for(let t of Object.keys(r))typeof r[t]=="function"&&(r[t]=(...o)=>n()[t]?.(...o));return r}function Er(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=[],s=[],a=t[2].trim();if(a)for(let c of a.split(/[\s,]+/)){let m=c.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(m?parseFloat(m[1]):0),s.push(m?m[2]:"");}n.push({fn:t[1],nums:o,units:s});}return n}function Sr(e,n,r){let t=Bt(e),o=Bt(n);return t.length===0||t.length!==o.length?r<1?e:n:t.map((s,a)=>{let c=o[a];return s.fn!==c.fn||s.nums.length!==c.nums.length?r<1?`${s.fn}(${s.nums.map((m,d)=>`${m}${s.units[d]}`).join(", ")})`:`${c.fn}(${c.nums.map((m,d)=>`${m}${c.units[d]}`).join(", ")})`:`${s.fn}(${s.nums.map((m,d)=>`${m+(c.nums[d]-m)*r}${s.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(Er(t))return je(t,o,r);if(t.includes("("))return Sr(t,o,r);let s=t.match(/^([-+]?[\d.]+)(.*)$/),a=o.match(/^([-+]?[\d.]+)(.*)$/);if(s&&a){let c=parseFloat(s[1]),m=parseFloat(a[1]);return `${c+(m-c)*r}${s[2]||a[2]}`}return r<1?t:o}function Tr(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var xr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Ar=0,jt="--scroll-draw-progress";function Mr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Ut(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:t,trigger:o={},easing:s="ease-out",speed:a=1,once:c=false,axis:m="y",scrollContainer:d,native:x=true,velocityScale:M=false,respectReducedMotion:P=true,triggerElement:te,onProgress:Ee,onComplete:H,onEnter:K,onLeave:z,onEnterBack:V,onLeaveBack:I}=n,$=P&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,k=typeof s=="function"?s:Z[s]??Z["ease-out"],h=ce(o.start??"top bottom"),C=ce(o.end??"bottom top"),E=te??e,b=typeof d=="string"?document.querySelector(d):d??null,g=Object.entries(t).map(([u,v])=>({prop:Tr(u),from:Array.isArray(v)?v[0]:"",to:Array.isArray(v)?v[1]:v}));function U(){let u=window.getComputedStyle(e);for(let v of g)v.from===""&&(v.from=u.getPropertyValue(v.prop).trim()||"0");}function L(){for(let u of g)e.style.setProperty(u.prop,String(u.to));}let _=new Map;for(let u of [...g.map(v=>v.prop),jt])_.set(u,e.style.getPropertyValue(u));function ie(){for(let[u,v]of _)v?e.style.setProperty(u,v):e.style.removeProperty(u);}if($)return L(),H?.(),{...r,destroy:ie,getProgress:()=>1};U();let he=typeof s=="string"?at(s):null;function be(){if(!x||!Mr()||!he||m!=="y"||b||E!==e||c||a!==1||Ee||H||K||z||V||I||M!==false||(o.start??"top bottom").trim()!=="top bottom"||(o.end??"bottom top").trim()!=="bottom top")return false;for(let u of g)if(!xr.has(u.prop))return false;return true}function q(){let u=`ssd-a-${++Ar}`,v=g.map(fe=>`${fe.prop}:${fe.from}`).join(";"),G=g.map(fe=>`${fe.prop}:${fe.to}`).join(";"),Y=document.createElement("style");Y.setAttribute("data-ssd-animate",""),Y.textContent=`@keyframes ${u}{from{${v}}to{${G}}}.${u}{animation-name:${u};animation-duration:auto;animation-timing-function:${he};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(Y),e.classList.add(u);let R=()=>m==="x"?window.scrollX:window.scrollY,le=()=>m==="x"?window.innerWidth:window.innerHeight,we=()=>{let fe=e.getBoundingClientRect();return Me({top:fe.top,height:fe.height},R(),le(),h,C)};Re(e,{type:"animate",getProgress:()=>He.getProgress(),getTrigger:we});let He={refresh(){},destroy(){e.classList.remove(u),Y.remove(),e.style.animationPlayState="",ie(),Oe(e);},replay(){e.classList.remove(u),e.offsetWidth,e.classList.add(u);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(fe){let Q=Math.min(1,Math.max(0,fe));e.classList.remove(u);for(let xe of g)e.style.setProperty(xe.prop,Gt(xe.from,xe.to,Q));},getProgress(){let{tStart:fe,tEnd:Q}=we();return k(ee(R(),fe,Q,a))}};return He}if(be())return q();let O=0,f=0,p=0,N=false,X=false,Le=-1,T=0,W=false,pe=NaN,Fe=-1,Se=0,Pe=()=>b?m==="x"?b.scrollLeft:b.scrollTop:m==="x"?window.scrollX:window.scrollY,de=()=>b?m==="x"?b.clientWidth:b.clientHeight:m==="x"?window.innerWidth:window.innerHeight,re=E===e?g:[],ue=false;function me(){let u=e.style,v=re.map(le=>u.getPropertyValue(le.prop)),G=u.transition;re.length&&(u.transition="none"),re.forEach(le=>u.setProperty(le.prop,_.get(le.prop)??""));let Y=it(E,b,m);re.forEach((le,we)=>u.setProperty(le.prop,v[we])),re.length&&(e.offsetWidth,u.transition=G);let R=Me(Y,Y.scroll,de(),h,C);ue&&Math.abs(R.tStart-O)<1&&Math.abs(R.tEnd-f)<1||(ue=true,O=R.tStart,f=R.tEnd);}function ne(u){e.style.setProperty(jt,String(u));for(let v of g)e.style.setProperty(v.prop,Gt(v.from,v.to,u));Ee?.(u);}function De(u){if(isNaN(pe)){pe=u;return}pe<=0&&u>0?K?.():pe>0&&u<=0&&I?.(),pe<1&&u>=1?z?.():pe>=1&&u<1&&V?.(),pe=u;}function B(){if(!N||X)return;let u=performance.now(),v=Pe(),G=a;if(M!==false){let le=u-Se,we=le>0?Math.abs(v-(Fe<0?v:Fe))/le:0;G=a*Math.max(.2,1+we*(typeof M=="number"?M:1)*.04);}Fe=v,Se=u;let Y=f===O?0:(v-O)/(f-O);De(Y);let R=k(ee(v,O,f,G));c&&(Le=Math.max(Le,R),R=Le),T=R,ne(R),R>=1&&!W?(W=true,H?.()):R<1&&!c&&(W=false),p=requestAnimationFrame(B);}me(),f===O&&ve("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let u=k(ee(Pe(),O,f,a));c&&u>0&&(Le=u),T=u,ne(u);}let F=new IntersectionObserver(u=>{u.forEach(v=>{N=v.isIntersecting,N&&!X?p=requestAnimationFrame(B):cancelAnimationFrame(p);});},{root:b??null}),ge;function ae(){clearTimeout(ge),ge=setTimeout(me,150);}window.addEventListener("resize",ae),window.addEventListener("orientationchange",ae);let Te=Ne([E],ae);return F.observe(e),Re(e,{type:"animate",getProgress:()=>T,getTrigger:()=>({tStart:O,tEnd:f})}),{destroy(){cancelAnimationFrame(p),F.disconnect(),window.removeEventListener("resize",ae),window.removeEventListener("orientationchange",ae),Te(),clearTimeout(ge),ie(),Oe(e);},replay(){Le=-1,W=false,T=0,X=false,ne(0);},pause(){X=true,cancelAnimationFrame(p);},resume(){X&&(X=false,N&&(p=requestAnimationFrame(B)));},seek(u){let v=Math.min(1,Math.max(0,u));T=v,Le=v,X=true,cancelAnimationFrame(p),ne(v);},getProgress(){return T},refresh(){me();}}}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 ve("scrollCounter: element not found:",e),yt;let t=r,{from:o=0,to:s,format:a,easing:c="ease-out",trigger:m={},once:d=true,decimals:x,onComplete:M}=n,P=x!==void 0?f=>f.toFixed(x):a??(f=>String(Math.round(f))),te=typeof c=="function"?c:Z[c]??Z["ease-out"],Ee=ce(m.start??"top 80%"),H=ce(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=P(s),M?.(),yt;let z=0,V=0,I=false,$=0,k=false,h=false,C=-1,E=0,b=false,g=()=>window.scrollY,U=()=>window.innerHeight;function L(){let f=t.getBoundingClientRect(),p=Me({top:f.top,height:f.height},g(),U(),Ee,H);I&&Math.abs(p.tStart-z)<1&&Math.abs(p.tEnd-V)<1||(I=true,z=p.tStart,V=p.tEnd);}function _(f){t.textContent=P(o+(s-o)*f),t.style.setProperty("--scroll-draw-progress",String(f));}function ie(){if(!k||h)return;let f=te(ee(g(),z,V,1));d&&(C=Math.max(C,f),f=C),E=f,_(f),f>=1&&!b?(b=true,M?.()):f<1&&!d&&(b=false),$=requestAnimationFrame(ie);}L();{let f=te(ee(g(),z,V,1));d&&f>0&&(C=f),E=f,_(f);}let he=new IntersectionObserver(f=>{f.forEach(p=>{k=p.isIntersecting,k&&!h?$=requestAnimationFrame(ie):cancelAnimationFrame($);});}),be;function q(){clearTimeout(be),be=setTimeout(L,150);}window.addEventListener("resize",q),window.addEventListener("orientationchange",q);let O=Ne([t],q);return he.observe(t),Re(t,{type:"counter",getProgress:()=>E,getTrigger:()=>({tStart:z,tEnd:V})}),{destroy(){cancelAnimationFrame($),he.disconnect(),window.removeEventListener("resize",q),window.removeEventListener("orientationchange",q),O(),clearTimeout(be),Oe(t);},replay(){C=-1,b=false,E=0,h=false,_(0);},pause(){h=true,cancelAnimationFrame($);},resume(){h&&(h=false,k&&($=requestAnimationFrame(ie)));},seek(f){let p=Math.min(1,Math.max(0,f));E=p,C=p,h=true,cancelAnimationFrame($),_(p);},getProgress(){return E}}}var Yt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Kt(e,n={}){if(typeof window>"u")return Yt;let r=typeof e=="string"?document.querySelector(e):e;if(!r||r.tagName.toLowerCase()!=="video")return ve("scrollVideo: <video> element not found:",e),Yt;let t=r,{trigger:o={},easing:s="linear",once:a=false,axis:c="y",preload:m="auto",triggerElement:d,onReady:x,onComplete:M,onProgress:P}=n,te=d??t,Ee=window.matchMedia("(prefers-reduced-motion: reduce)").matches,H=typeof s=="function"?s:Z[s]??Z.linear,K=ce(o.start??"top top"),z=ce(o.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let V=n.from??0,I=n.to,$=0,k=0,h=0,C=false,E=false,b=-1,g=0,U=false,L=false,_=()=>c==="x"?window.scrollX:window.scrollY,ie=()=>c==="x"?window.innerWidth:window.innerHeight;function he(){let T=te.getBoundingClientRect(),W=c==="x"?T.left:T.top,pe=c==="x"?T.width:T.height,Fe=Me({top:W,height:pe},_(),ie(),K,z);$=Fe.tStart,k=Fe.tEnd,L&&k===$&&ve("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t);}let be=NaN;function q(T){if(!L)return;let W=I??t.duration??0,pe=V+(W-V)*T;pe!==be&&(be=pe,t.currentTime=pe),t.style.setProperty("--scroll-draw-progress",String(T)),P?.(T);}function O(){if(!C||E||!L||Ee)return;let T=H(ee(_(),$,k,1));a&&(b=Math.max(b,T),T=b),g=T,q(T),T>=1&&!U?(U=true,M?.()):T<1&&!a&&(U=false),h=requestAnimationFrame(O);}function f(){if(L=true,I===void 0&&(I=t.duration),Ee){q(1),x?.();return}he(),x?.(),C&&!E&&(h=requestAnimationFrame(O));}t.readyState>=1?f():t.addEventListener("loadedmetadata",f,{once:true}),L||he();let p=new IntersectionObserver(T=>{T.forEach(W=>{C=W.isIntersecting,C&&!E&&L?h=requestAnimationFrame(O):cancelAnimationFrame(h);});}),N;function X(){clearTimeout(N),N=setTimeout(he,150);}window.addEventListener("resize",X),window.addEventListener("orientationchange",X);let Le=Ne([te],X);return p.observe(t),Re(t,{type:"video",getProgress:()=>g,getTrigger:()=>({tStart:$,tEnd:k})}),{destroy(){cancelAnimationFrame(h),p.disconnect(),t.removeEventListener("loadedmetadata",f),window.removeEventListener("resize",X),window.removeEventListener("orientationchange",X),Le(),clearTimeout(N),Oe(t);},replay(){b=-1,U=false,g=0,E=false,be=NaN,q(0);},pause(){E=true,cancelAnimationFrame(h);},resume(){E&&(E=false,C&&L&&(h=requestAnimationFrame(O)));},seek(T){let W=Math.min(1,Math.max(0,T));g=W,b=W,E=true,cancelAnimationFrame(h),be=NaN,q(W);},getProgress(){return g}}}function Zt(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(r)?(t.textContent=r,t.style.whiteSpace="pre"):(t.textContent=r,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(r)?null:t}).filter(r=>r!==null)}function Lr(e){let n=e.textContent??"";return e.textContent="",n.split("").map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=r,r===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),r===" "?null:t}).filter(r=>r!==null)}function Qt(e){let n=Zt(e),r=new Map;for(let s of n){let a=s.offsetTop;r.has(a)||r.set(a,[]),r.get(a).push(s);}let t=[],o=Array.from(r.keys()).sort((s,a)=>s-a);for(let s of o){let a=r.get(s),c=document.createElement("span");c.setAttribute("aria-hidden","true"),c.style.display="inline-block",a.forEach((m,d)=>{let x=m.nextElementSibling;c.appendChild(m),d<a.length-1&&x&&x.style.whiteSpace==="pre"&&c.appendChild(x);}),t.push(c);}return e.textContent="",t.forEach((s,a)=>{e.appendChild(s),a<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function Pr(e,n,r,t){if(r<=1||t===0)return e;let o=(r-1)*t,s=n*t,a=s+(1-o);return a<=s?e>=s?1:0:Math.min(1,Math.max(0,(e-s)/(a-s)))}function Cr(e,n){let r=[];if(n?.y!==void 0&&r.push(`translateY(${n.y*(1-e)}px)`),n?.x!==void 0&&r.push(`translateX(${n.x*(1-e)}px)`),n?.rotate!==void 0&&r.push(`rotate(${n.rotate*(1-e)}deg)`),n?.scale!==void 0){let t=n.scale+(1-n.scale)*e;r.push(`scale(${t})`);}return r.join(" ")||""}var Jt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function er(e,n={}){if(typeof window>"u")return Jt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return ve("scrollText: element not found:",e),Jt;let t=r,{split:o="words",stagger:s=.04,easing:a="ease-out",from:c={opacity:0,y:24},trigger:m={},once:d=true,onComplete:x}=n,M=window.matchMedia("(prefers-reduced-motion: reduce)").matches,P=typeof a=="function"?a:Z[a]??Z["ease-out"],te=ce(m.start??"top 85%"),Ee=ce(m.end??"top 40%"),H=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let K;o==="chars"?K=Lr(t):o==="lines"?K=Qt(t):K=Zt(t);let z=K.length;function V(p,N){c?.opacity!==void 0&&(p.style.opacity=String(c.opacity+(1-c.opacity)*N));let X=Cr(N,c);X&&(p.style.transform=X);}function I(p){t.style.setProperty("--scroll-draw-progress",String(p)),K.forEach((N,X)=>{let Le=P(Pr(p,X,z,s));V(N,Le);});}if(M)return I(1),x?.(),{destroy(){t.innerHTML=H,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};I(0);let $=0,k=0,h=0,C=false,E=false,b=-1,g=0,U=false,L=()=>window.scrollY,_=()=>window.innerHeight;function ie(){let p=t.getBoundingClientRect(),N=Me({top:p.top,height:p.height},L(),_(),te,Ee);$=N.tStart,k=N.tEnd;}function he(){if(!C||E)return;let p=ee(L(),$,k,1);d&&(b=Math.max(b,p),p=b),g=p,I(p),p>=1&&!U?(U=true,x?.()):p<1&&!d&&(U=false),h=requestAnimationFrame(he);}ie();let be=new IntersectionObserver(p=>{p.forEach(N=>{C=N.isIntersecting,C&&!E?h=requestAnimationFrame(he):cancelAnimationFrame(h);});}),q;function O(){clearTimeout(q),q=setTimeout(()=>{if(o==="lines"){let p=g;t.innerHTML=H,t.setAttribute("aria-label",t.textContent??""),K=Qt(t),I(p);}ie();},150);}window.addEventListener("resize",O),window.addEventListener("orientationchange",O);let f=Ne([t],O);return be.observe(t),Re(t,{type:"text",getProgress:()=>g,getTrigger:()=>({tStart:$,tEnd:k})}),{destroy(){cancelAnimationFrame(h),be.disconnect(),window.removeEventListener("resize",O),window.removeEventListener("orientationchange",O),f(),clearTimeout(q),t.innerHTML=H,t.removeAttribute("aria-label"),Oe(t);},replay(){b=-1,U=false,g=0,E=false,I(0);},pause(){E=true,cancelAnimationFrame(h);},resume(){E&&(E=false,C&&(h=requestAnimationFrame(he)));},seek(p){let N=Math.min(1,Math.max(0,p));g=N,b=N,E=true,cancelAnimationFrame(h),I(N);},getProgress(){return g}}}function Rr(e,n={}){let[r,t]=Or.useState(0),o=Or.useRef(n);o.current=n;let s=Or.useRef(-1);return Or.useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){t(1);return}let a=typeof e=="string"?document.querySelector(e):e.current;if(!a)return;let c=a,{axis:m="y",scrollContainer:d,trigger:x={}}=o.current,M=typeof d=="string"?document.querySelector(d):d??null,P=ce(x.start??"top bottom"),te=ce(x.end??"bottom top"),Ee=0,H=0,K=false,z=0;function V(){return M?m==="x"?M.scrollLeft:M.scrollTop:m==="x"?window.scrollX:window.scrollY}function I(){return M?m==="x"?M.clientWidth:M.clientHeight:m==="x"?window.innerWidth:window.innerHeight}function $(){let b=c.getBoundingClientRect(),g=V(),U=m==="x"?b.left:b.top,L=m==="x"?b.width:b.height,_=Me({top:U,height:L},g,I(),P,te);Ee=_.tStart,H=_.tEnd;}function k(){if(!K)return;let{speed:b=1,easing:g="linear",once:U=false}=o.current,L=typeof g=="function"?g:Z[g]??Z.linear,_=ee(V(),Ee,H,b),ie=L(_);U&&(s.current=Math.max(s.current,ie),ie=s.current),t(ie),z=requestAnimationFrame(k);}let h=new IntersectionObserver(b=>{b.forEach(g=>{K=g.isIntersecting,K?z=requestAnimationFrame(k):cancelAnimationFrame(z);});},{root:M??null,threshold:0});$(),h.observe(c);let C;function E(){clearTimeout(C),C=setTimeout($,150);}return window.addEventListener("resize",E),window.addEventListener("orientationchange",E),()=>{cancelAnimationFrame(z),clearTimeout(C),h.disconnect(),window.removeEventListener("resize",E),window.removeEventListener("orientationchange",E);}},[]),r}function Je(e,n,r){let t=Or.useRef(n);t.current=n;let o=qt(n);Or.useEffect(()=>{if(!e.current)return;let s=r(e.current,Wt(t.current,()=>t.current));return ()=>s.destroy()},[o]);}var Nr=/^(data-|aria-)|^(id|role|title|tabIndex|lang|dir|hidden)$/;function Ze(e){let n={},r={};for(let[t,o]of Object.entries(e))(Nr.test(t)?r:n)[t]=o;return [n,r]}function jn({children:e,className:n,style:r,...t}){let o=Or.useRef(null),[s,a]=Ze(t);return Je(o,s,Vt),jsxRuntime.jsx("div",{ref:o,className:n,style:r,...a,children:e})}function Un({children:e,className:n,style:r,...t}){let o=Or.useRef(null),[s,a]=Ze(t);return Je(o,s,Ut),jsxRuntime.jsx("div",{ref:o,className:n,style:r,...a,children:e})}function Xn({className:e,style:n,...r}){let t=Or.useRef(null),[o,s]=Ze(r);return Je(t,o,Xt),jsxRuntime.jsx("span",{ref:t,className:e,style:n,...s})}function Yn({src:e,className:n,style:r,muted:t=true,playsInline:o=true,...s}){let a=Or.useRef(null),[c,m]=Ze(s);return Je(a,c,Kt),jsxRuntime.jsx("video",{...m,ref:a,src:e,className:n,style:r,muted:t,playsInline:o,preload:"auto"})}function Kn({children:e,as:n="p",className:r,style:t,...o}){let s=Or.useRef(null),[a,c]=Ze(o);return Je(s,a,er),Or__default.default.createElement(n,{...c,ref:s,className:r,style:t},e)}exports.ScrollAnimate=Un;exports.ScrollCounter=Xn;exports.ScrollDraw=jn;exports.ScrollText=Kn;exports.ScrollVideo=Yn;exports.useScrollDrawProgress=Rr;
|
|
4
|
+
<div style="position:absolute;${m?`left:${c}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${c}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",o,{passive:true}),o(),{el:t,destroy(){window.removeEventListener("scroll",o),t.remove();}}}var zt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Vt=/[MmLlHhVvCcSsQqTtAaZz]/g;function vr(e,n,r){if(!Ke)return;let t=(e.match(Vt)??[]).join("").toUpperCase(),o=(n.match(Vt)??[]).join("").toUpperCase(),s=(e.match(zt)??[]).length,a=(n.match(zt)??[]).length;if(t!==o){ve(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${o||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,r);return}s!==a&&ve(`morphTo: coordinate count differs (${s} \u2192 ${a}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function ht(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let a=parseFloat(s),c=t[o++]??a;return String(+(a+(c-a)*r).toFixed(4))})}function _t(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,o=r?{...Rt[r],...t}:t,s=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:a="path, polyline, line, polygon, rect, circle",speed:c=1,fade:m=false,easing:d="linear",trigger:x={},stagger:M=0,direction:P="forward",once:te=false,debug:Ee=false,axis:H="y",scrollContainer:K,autoReverse:z=false,delay:V=0,strokeColor:I,strokeWidth:$,fillOpacity:k,waypoints:h,velocityScale:C=false,threshold:E=0,rootMargin:b="0px",repeat:g=0,repeatDelay:U=0,morphTo:L,clip:_,autoplay:ie=false,duration:he=1e3,native:be=true,onProgress:q,onStart:O,onComplete:f,onEnter:p,onLeave:N,onEnterBack:X,onLeaveBack:Le}=o,T=_===true?"left":typeof _=="string"?_:false,W=typeof d=="function"?d:Z[d]??Z.linear,fe=le(x.start??"top bottom"),Fe=le(x.end??"bottom top"),Se=typeof K=="string"?document.querySelector(K):K??null,Pe=Array.isArray(I)?I[0]:null,pe=Array.isArray(I)?I[1]:typeof I=="string"?I:null,re=Array.isArray($)?$[0]:null,ce=Array.isArray($)?$[1]:typeof $=="number"?$:null,ue=Array.isArray(k)?k[0]:null,ne=Array.isArray(k)?k[1]:typeof k=="number"?k:null;function De(i){let l=i*100;switch(T){case "right":return `inset(0 0 0 ${100-l}%)`;case "top":return `inset(0 0 ${100-l}% 0)`;case "bottom":return `inset(${100-l}% 0 0 0)`;case "center":return `circle(${i*150}% at 50% 50%)`;default:return `inset(0 ${100-l}% 0 0)`}}let B=T?[]:Array.from(e.querySelectorAll(a)),F=[],de=[],ae=0,Te=0,u=M,v=0,G=false,Y=false,R=0,ge=false,we=-1,He=[],me=-1,Q=false,xe=0,ze=0,Ve,mt=null;function wt(){mt?.destroy(),mt=null;}let _e=new Set,vt=NaN,qe=true,tt=-1,Et=performance.now(),We=NaN;function Xe(){return Se?H==="x"?Se.scrollLeft:Se.scrollTop:H==="x"?window.scrollX:window.scrollY}function St(){return Se?H==="x"?Se.clientWidth:Se.clientHeight:H==="x"?window.innerWidth:window.innerHeight}function Tt(){let i=it(e,Se,H);return Me(i,i.scroll,St(),fe,Fe)}function nr(){let i=Te-ae,l=B.length-1,w=Se??document.documentElement,oe=H==="x"?"Width":"Height";if(u=M,M>0&&l>0&&i>0){let Ce=w[`scroll${oe}`]-w[`client${oe}`]-1-ae-i/c;Ce>=0&&(u=Math.min(M,Ce/(l*i)));}v=Te+l*u*i;}function xt(){(({tStart:ae,tEnd:Te}=Tt())),nr(),Ee&&Ke&&(wt(),mt=wr(ae,Te,H));}function ft(i,l=Tt){Re(e,{type:"draw",getProgress:()=>i.getProgress(),getTrigger:l});let w=i.destroy;return i.destroy=()=>{w.call(i),Oe(e);},i}function or(i,l){if(e.style.setProperty("--scroll-draw-progress",String(i)),T){let w=l==="reverse"?1-i:i;e.style.clipPath=De(w);return}B.forEach((w,oe)=>{w.style.strokeDashoffset=l==="reverse"?`${F[oe]*i}`:`${F[oe]*(1-i)}`,m&&(w.style.opacity=l==="reverse"?`${1-i}`:`${i}`),Pe&&pe?w.style.stroke=je(Pe,pe,i):pe&&(w.style.stroke=pe),re!==null&&ce!==null?w.style.strokeWidth=`${re+(ce-re)*i}`:ce!==null&&(w.style.strokeWidth=`${ce}`),ue!==null&&ne!==null?w.style.fillOpacity=`${ue+(ne-ue)*i}`:ne!==null&&(w.style.fillOpacity=`${ne}`),L&&w.tagName.toLowerCase()==="path"&&de[oe]&&w.setAttribute("d",ht(de[oe],L,i));});}function rt(){if(e.style.setProperty("--scroll-draw-progress","0"),T){e.style.clipPath=De(0);return}B.forEach((i,l)=>{i.style.strokeDasharray=`${F[l]}`,i.style.strokeDashoffset=P==="reverse"?"0":`${F[l]}`,m?i.style.opacity=P==="reverse"?"1":"0":i.style.opacity="",Pe&&(i.style.stroke=Pe),re!==null&&(i.style.strokeWidth=`${re}`),ue!==null&&(i.style.fillOpacity=`${ue}`),L&&i.tagName.toLowerCase()==="path"&&de[l]&&i.setAttribute("d",de[l]);});}if(B.forEach(i=>{br(i);let l=Ge(i);F.push(l);let w=i.tagName.toLowerCase()==="path";w?de.push(i.getAttribute("d")??""):de.push(""),L&&(w?vr(de[de.length-1],L,i):ve(`morphTo only applies to <path> elements \u2014 ignored on <${i.tagName}>.`,i)),s?(i.style.strokeDasharray=`${l}`,i.style.strokeDashoffset=P==="reverse"?`${l}`:"0",m&&(i.style.opacity="1"),pe&&(i.style.stroke=pe),ce!==null&&(i.style.strokeWidth=`${ce}`),ne!==null&&(i.style.fillOpacity=`${ne}`),L&&i.tagName.toLowerCase()==="path"&&i.setAttribute("d",L)):(i.style.strokeDasharray=`${l}`,i.style.strokeDashoffset=P==="reverse"?"0":`${l}`,m?i.style.opacity=P==="reverse"?"1":"0":i.style.opacity="",Pe&&(i.style.stroke=Pe),re!==null&&(i.style.strokeWidth=`${re}`),ue!==null&&(i.style.fillOpacity=`${ue}`));}),T){if(s)return e.style.clipPath=De(1),f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=De(0);}else if(s)return f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let At=typeof d=="string"?at(d):null;function sr(){return !(be===false||!hr()||!B.length||!At||T||H!=="y"||Se||c!==1||M!==0||te||z||C!==false||L||h||g||V>0||q||O||f||p||N||X||Le||I!=null||$!=null||k!=null||(x.start??"top bottom").trim()!=="top bottom"||(x.end??"bottom top").trim()!=="bottom top")}function ir(){let i=++yr,l=`svg-scroll-draw-${i}`,w=`svg-scroll-draw-host-${i}`,oe=`--svg-scroll-draw-${i}`,Ce=P==="reverse"?"0":"var(--ssd-len)",Ie=P==="reverse"?"var(--ssd-len)":"0",ke=`stroke-dashoffset:${Ce};`,A=`stroke-dashoffset:${Ie};`;m&&(ke+=`opacity:${P==="reverse"?1:0};`,A+=`opacity:${P==="reverse"?0:1};`);let D=document.createElement("style");D.setAttribute("data-svg-scroll-draw",""),D.textContent=`@keyframes ${l}{from{${ke}}to{${A}}}.${w}{view-timeline-name:${oe};view-timeline-axis:block;}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${At};animation-fill-mode:both;animation-timeline:${oe};animation-range:cover 0% cover 100%;}`,document.head.appendChild(D),e.classList.add(w);function ye(y,se){y.style.setProperty("--ssd-len",String(F[se])),y.style.strokeDasharray=`${F[se]}`,y.style.strokeDashoffset="",y.style.opacity="",y.style.animationPlayState="",y.classList.add(l);}B.forEach(ye);let S=false,j=-1;function J(){if(j>=0)return j;let y=e.getBoundingClientRect(),{tStart:se,tEnd:$e}=Me({top:y.top,height:y.height},Xe(),St(),fe,Fe);return W(ee(Xe(),se,$e,c))}return {destroy(){e.classList.remove(w),B.forEach(y=>{y.classList.remove(l),y.style.removeProperty("--ssd-len"),y.style.animationPlayState="";}),D.remove();},replay(){S=false,j=-1,B.forEach(ye);},pause(){S=true,B.forEach(y=>{y.style.animationPlayState="paused";});},resume(){S&&(S=false,B.forEach(y=>{y.style.animationPlayState="running";}));},seek(y){let se=Math.min(1,Math.max(0,y));j=se,S=true,B.forEach(($e,Ae)=>{$e.classList.remove(l),$e.style.strokeDashoffset=P==="reverse"?`${F[Ae]*se}`:`${F[Ae]*(1-se)}`,m&&($e.style.opacity=P==="reverse"?`${1-se}`:`${se}`);});},getProgress(){return J()},refresh(){B.forEach((y,se)=>{F[se]=Ge(y),y.style.setProperty("--ssd-len",String(F[se])),y.style.strokeDasharray=`${F[se]}`;});}}}if(sr())return ft(ir());function ar(){let i=Math.max(1,he),l=0,w=0,oe=false;function Ce(S){let j=true;if(T){let J=Math.min(1,Math.max(0,S/i)),y=W(J);xe=y,e.style.setProperty("--scroll-draw-progress",String(y)),e.style.clipPath=De(P==="reverse"?1-y:y),q?.(y),J<1&&(j=false);}else B.forEach((J,y)=>{let se=y*M*i,$e=Math.min(1,Math.max(0,(S-se)/i)),Ae=W($e);J.style.strokeDashoffset=P==="reverse"?`${F[y]*Ae}`:`${F[y]*(1-Ae)}`,m&&(J.style.opacity=P==="reverse"?`${1-Ae}`:`${Ae}`),Pe&&pe?J.style.stroke=je(Pe,pe,Ae):pe&&(J.style.stroke=pe),re!==null&&ce!==null?J.style.strokeWidth=`${re+(ce-re)*Ae}`:ce!==null&&(J.style.strokeWidth=`${ce}`),ue!==null&&ne!==null?J.style.fillOpacity=`${ue+(ne-ue)*Ae}`:ne!==null&&(J.style.fillOpacity=`${ne}`),L&&J.tagName.toLowerCase()==="path"&&de[y]&&J.setAttribute("d",ht(de[y],L,Ae)),y===0&&(xe=Ae,q?.(Ae),e.style.setProperty("--scroll-draw-progress",String(Ae))),$e<1&&(j=false);});if(h){let J=Math.min(1,Math.max(0,S/i)),y=W(J);for(let se in h){let $e=parseFloat(se);y>=$e&&!_e.has($e)&&(_e.add($e),h[se]?.());}}return j}function Ie(S){if(Q)return;let j=S-l;Y||(Y=true,O?.());let J=Ce(j);if(J&&!G){G=true,Ce(i*(1+Math.max(0,B.length-1)*M)),f?.(),ze<(g==="infinite"?1/0:g??0)&&(ze++,Ve=setTimeout(()=>{l=performance.now(),Y=false,G=false,_e.clear(),rt(),R=requestAnimationFrame(Ie);},U));return}J||(R=requestAnimationFrame(Ie));}function ke(){cancelAnimationFrame(R),clearTimeout(Ve),l=performance.now(),w=0,Q=false,Y=false,G=false,ze=0,oe=true,xe=0,_e.clear(),rt(),R=requestAnimationFrame(Ie);}let A=new IntersectionObserver(S=>{S.forEach(j=>{j.isIntersecting&&!(te&&G)?ke():!j.isIntersecting&&!te&&!G&&(cancelAnimationFrame(R),clearTimeout(Ve),oe=false);});},{root:Se??null,threshold:E,rootMargin:b}),D;function ye(){clearTimeout(D),D=setTimeout(()=>{B.forEach((S,j)=>{F[j]=Ge(S),S.style.strokeDasharray=`${F[j]}`;});},150);}return window.addEventListener("resize",ye),window.addEventListener("orientationchange",ye),V>0?setTimeout(()=>A.observe(e),V):A.observe(e),{destroy(){cancelAnimationFrame(R),clearTimeout(Ve),A.disconnect(),window.removeEventListener("resize",ye),window.removeEventListener("orientationchange",ye),clearTimeout(D);},replay(){ze=0,ke();},pause(){Q||!oe||(Q=true,w=performance.now()-l,cancelAnimationFrame(R));},resume(){Q&&(Q=false,oe=true,l=performance.now()-w,R=requestAnimationFrame(Ie));},seek(S){let j=Math.min(1,Math.max(0,S));xe=j,Q=true,w=j*i,l=performance.now()-w,cancelAnimationFrame(R),Ce(w);},getProgress(){return xe},refresh(){clearTimeout(D),B.forEach((S,j)=>{F[j]=Ge(S),S.style.strokeDasharray=`${F[j]}`;});}}}if(ie)return ft(ar());xt();function Mt(){if(Q||!Be)return;let i=performance.now(),l=Xe();if(!qe&&C===false&&l===vt){dt(l);return}qe=false,vt=l;let w=c;if(C!==false){let A=i-Et,D=A>0?Math.abs(l-(tt<0?l:tt))/A:0;w=c*Math.max(.2,1+D*(typeof C=="number"?C:1)*.04);}tt=l,Et=i;let oe=z?me===-1||l>=me?"forward":"reverse":P;me=l;let Ce=Te-ae,Ie=true,ke=Ce===0?0:(l-ae)/Ce;if(isNaN(We)||(We<=0&&ke>0?p?.():We>0&&ke<=0&&Le?.(),We<1&&ke>=1?N?.():We>=1&&ke<1&&X?.()),We=ke,T){let A=W(ee(l,ae,Te,w));te&&!z&&(we=Math.max(we,A),A=we),xe=A,e.style.setProperty("--scroll-draw-progress",String(A));let D=oe==="reverse"?1-A:A;e.style.clipPath=De(D),q?.(A),!Y&&ee(l,ae,Te,w)>0&&(Y=true,O?.()),A>=1&&!G?(G=true,f?.(),ze<(g==="infinite"?1/0:g??0)&&(ze++,Ve=setTimeout(()=>{we=-1,Y=false,G=false,e.style.clipPath=De(0);},U))):A<1&&!te&&(G=false),dt(l);return}if(B.forEach((A,D)=>{let ye=D*u*Ce,S=W(ee(l,ae+ye,Te+ye,w));te&&!z&&(S=He[D]=Math.max(He[D]??we,S)),A.style.strokeDashoffset=oe==="reverse"?`${F[D]*S}`:`${F[D]*(1-S)}`,m&&(A.style.opacity=oe==="reverse"?`${1-S}`:`${S}`),Pe&&pe?A.style.stroke=je(Pe,pe,S):pe&&(A.style.stroke=pe),re!==null&&ce!==null?A.style.strokeWidth=`${re+(ce-re)*S}`:ce!==null&&(A.style.strokeWidth=`${ce}`),ue!==null&&ne!==null?A.style.fillOpacity=`${ue+(ne-ue)*S}`:ne!==null&&(A.style.fillOpacity=`${ne}`),L&&A.tagName.toLowerCase()==="path"&&de[D]&&A.setAttribute("d",ht(de[D],L,S)),D===0&&(xe=S,q?.(S),e.style.setProperty("--scroll-draw-progress",String(S))),S<1&&(Ie=false);}),h){let A=W(ee(l,ae,Te,w));for(let D in h){let ye=parseFloat(D);A>=ye&&!_e.has(ye)&&(_e.add(ye),h[D]?.());}}!Y&&ee(l,ae,Te,w)>0&&(Y=true,O?.()),Ie&&!G?(G=true,f?.(),ze<(g==="infinite"?1/0:g??0)&&(ze++,Ve=setTimeout(()=>{we=-1,He=[],Y=false,G=false,_e.clear(),rt(),qe=true;},U))):!Ie&&!te&&(G=false),dt(l);}function pt(i){return i>=Te&&i<v}function dt(i){ge||pt(i)?R=requestAnimationFrame(Mt):Be=false;}function gt(){return ge||pt(Xe())}let Be=false;function nt(){Be||(Be=true,R=requestAnimationFrame(function(){Mt();}));}function ot(){Be=false,cancelAnimationFrame(R);}let yt=new IntersectionObserver(i=>{i.forEach(l=>{ge=l.isIntersecting,ge&&!Q?(qe=true,nt()):Be&&!Q&&pt(Xe())||ot();});},{root:Se??null,threshold:E,rootMargin:b});function Lt(){B.forEach((i,l)=>{F[l]=Ge(i),i.style.strokeDasharray=`${F[l]}`;}),xt(),qe=true;}let st;function Ye(){clearTimeout(st),st=setTimeout(Lt,150);}window.addEventListener("resize",Ye),window.addEventListener("orientationchange",Ye);let lr=Ne([e],Ye);return V>0?setTimeout(()=>yt.observe(e),V):yt.observe(e),ft({destroy(){cancelAnimationFrame(R),clearTimeout(Ve),ot(),yt.disconnect(),lr(),window.removeEventListener("resize",Ye),window.removeEventListener("orientationchange",Ye),clearTimeout(st),wt();},replay(){we=-1,He=[],me=-1,tt=-1,Y=false,G=false,ze=0,Q=false,xe=0,_e.clear(),clearTimeout(Ve),rt(),qe=true,gt()&&nt();},pause(){Q=true,ot();},resume(){Q&&(Q=false,qe=true,gt()&&nt());},seek(i){let l=Math.min(1,Math.max(0,i));xe=l,we=l,He=[],Q=true,ot(),or(l,P),qe=true;},getProgress(){return xe},refresh(){clearTimeout(st),Lt(),gt()&&!Q&&nt();}},()=>({tStart:ae,tEnd:Te}))}var qt=new WeakMap,Er=0;function Wt(e){return JSON.stringify(e,(n,r)=>{if(typeof r=="function")return "\u0192";if(typeof Element<"u"&&r instanceof Element){let t=qt.get(r);return t===void 0&&qt.set(r,t=++Er),`el#${t}`}return r})}function Bt(e,n){let r={...e};for(let t of Object.keys(r))typeof r[t]=="function"&&(r[t]=(...o)=>n()[t]?.(...o));return r}function Sr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Gt(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let o=[],s=[],a=t[2].trim();if(a)for(let c of a.split(/[\s,]+/)){let m=c.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(m?parseFloat(m[1]):0),s.push(m?m[2]:"");}n.push({fn:t[1],nums:o,units:s});}return n}function Tr(e,n,r){let t=Gt(e),o=Gt(n);return t.length===0||t.length!==o.length?r<1?e:n:t.map((s,a)=>{let c=o[a];return s.fn!==c.fn||s.nums.length!==c.nums.length?r<1?`${s.fn}(${s.nums.map((m,d)=>`${m}${s.units[d]}`).join(", ")})`:`${c.fn}(${c.nums.map((m,d)=>`${m}${c.units[d]}`).join(", ")})`:`${s.fn}(${s.nums.map((m,d)=>`${m+(c.nums[d]-m)*r}${s.units[d]}`).join(", ")})`}).join(" ")}function jt(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),o=String(n);if(Sr(t))return je(t,o,r);if(t.includes("("))return Tr(t,o,r);let s=t.match(/^([-+]?[\d.]+)(.*)$/),a=o.match(/^([-+]?[\d.]+)(.*)$/);if(s&&a){let c=parseFloat(s[1]),m=parseFloat(a[1]);return `${c+(m-c)*r}${s[2]||a[2]}`}return r<1?t:o}function xr(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Ar=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Mr=0,Ut="--scroll-draw-progress";function Lr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Xt(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:t,trigger:o={},easing:s="ease-out",speed:a=1,once:c=false,axis:m="y",scrollContainer:d,native:x=true,velocityScale:M=false,respectReducedMotion:P=true,triggerElement:te,onProgress:Ee,onComplete:H,onEnter:K,onLeave:z,onEnterBack:V,onLeaveBack:I}=n,$=P&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,k=typeof s=="function"?s:Z[s]??Z["ease-out"],h=le(o.start??"top bottom"),C=le(o.end??"bottom top"),E=te??e,b=typeof d=="string"?document.querySelector(d):d??null,g=Object.entries(t).map(([u,v])=>({prop:xr(u),from:Array.isArray(v)?v[0]:"",to:Array.isArray(v)?v[1]:v}));function U(){let u=window.getComputedStyle(e);for(let v of g)v.from===""&&(v.from=u.getPropertyValue(v.prop).trim()||"0");}function L(){for(let u of g)e.style.setProperty(u.prop,String(u.to));}let _=new Map;for(let u of [...g.map(v=>v.prop),Ut])_.set(u,e.style.getPropertyValue(u));function ie(){for(let[u,v]of _)v?e.style.setProperty(u,v):e.style.removeProperty(u);}if($)return L(),H?.(),{...r,destroy:ie,getProgress:()=>1};U();let he=typeof s=="string"?at(s):null;function be(){if(!x||!Lr()||!he||m!=="y"||b||E!==e||c||a!==1||Ee||H||K||z||V||I||M!==false||(o.start??"top bottom").trim()!=="top bottom"||(o.end??"bottom top").trim()!=="bottom top")return false;for(let u of g)if(!Ar.has(u.prop))return false;return true}function q(){let u=`ssd-a-${++Mr}`,v=g.map(me=>`${me.prop}:${me.from}`).join(";"),G=g.map(me=>`${me.prop}:${me.to}`).join(";"),Y=document.createElement("style");Y.setAttribute("data-ssd-animate",""),Y.textContent=`@keyframes ${u}{from{${v}}to{${G}}}.${u}{animation-name:${u};animation-duration:auto;animation-timing-function:${he};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(Y),e.classList.add(u);let R=()=>m==="x"?window.scrollX:window.scrollY,ge=()=>m==="x"?window.innerWidth:window.innerHeight,we=()=>{let me=e.getBoundingClientRect();return Me({top:me.top,height:me.height},R(),ge(),h,C)};Re(e,{type:"animate",getProgress:()=>He.getProgress(),getTrigger:we});let He={refresh(){},destroy(){e.classList.remove(u),Y.remove(),e.style.animationPlayState="",ie(),Oe(e);},replay(){e.classList.remove(u),e.offsetWidth,e.classList.add(u);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(me){let Q=Math.min(1,Math.max(0,me));e.classList.remove(u);for(let xe of g)e.style.setProperty(xe.prop,jt(xe.from,xe.to,Q));},getProgress(){let{tStart:me,tEnd:Q}=we();return k(ee(R(),me,Q,a))}};return He}if(be())return q();let O=0,f=0,p=0,N=false,X=false,Le=-1,T=0,W=false,fe=NaN,Fe=-1,Se=0,Pe=()=>b?m==="x"?b.scrollLeft:b.scrollTop:m==="x"?window.scrollX:window.scrollY,pe=()=>b?m==="x"?b.clientWidth:b.clientHeight:m==="x"?window.innerWidth:window.innerHeight,re=E===e?g:[],ce=false;function ue(){let u=e.style,v=re.map(ge=>u.getPropertyValue(ge.prop)),G=u.transition;re.length&&(u.transition="none"),re.forEach(ge=>u.setProperty(ge.prop,_.get(ge.prop)??""));let Y=it(E,b,m);re.forEach((ge,we)=>u.setProperty(ge.prop,v[we])),re.length&&(e.offsetWidth,u.transition=G);let R=Me(Y,Y.scroll,pe(),h,C);ce&&Math.abs(R.tStart-O)<1&&Math.abs(R.tEnd-f)<1||(ce=true,O=R.tStart,f=R.tEnd);}function ne(u){e.style.setProperty(Ut,String(u));for(let v of g)e.style.setProperty(v.prop,jt(v.from,v.to,u));Ee?.(u);}function De(u){if(isNaN(fe)){fe=u;return}fe<=0&&u>0?K?.():fe>0&&u<=0&&I?.(),fe<1&&u>=1?z?.():fe>=1&&u<1&&V?.(),fe=u;}function B(){if(!N||X)return;let u=performance.now(),v=Pe(),G=a;if(M!==false){let ge=u-Se,we=ge>0?Math.abs(v-(Fe<0?v:Fe))/ge:0;G=a*Math.max(.2,1+we*(typeof M=="number"?M:1)*.04);}Fe=v,Se=u;let Y=f===O?0:(v-O)/(f-O);De(Y);let R=k(ee(v,O,f,G));c&&(Le=Math.max(Le,R),R=Le),T=R,ne(R),R>=1&&!W?(W=true,H?.()):R<1&&!c&&(W=false),p=requestAnimationFrame(B);}ue(),f===O&&ve("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let u=k(ee(Pe(),O,f,a));c&&u>0&&(Le=u),T=u,ne(u);}let F=new IntersectionObserver(u=>{u.forEach(v=>{N=v.isIntersecting,N&&!X?p=requestAnimationFrame(B):cancelAnimationFrame(p);});},{root:b??null}),de;function ae(){clearTimeout(de),de=setTimeout(ue,150);}window.addEventListener("resize",ae),window.addEventListener("orientationchange",ae);let Te=Ne([E],ae);return F.observe(e),Re(e,{type:"animate",getProgress:()=>T,getTrigger:()=>({tStart:O,tEnd:f})}),{destroy(){cancelAnimationFrame(p),F.disconnect(),window.removeEventListener("resize",ae),window.removeEventListener("orientationchange",ae),Te(),clearTimeout(de),ie(),Oe(e);},replay(){Le=-1,W=false,T=0,X=false,ne(0);},pause(){X=true,cancelAnimationFrame(p);},resume(){X&&(X=false,N&&(p=requestAnimationFrame(B)));},seek(u){let v=Math.min(1,Math.max(0,u));T=v,Le=v,X=true,cancelAnimationFrame(p),ne(v);},getProgress(){return T},refresh(){ue();}}}var bt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Yt(e,n){if(typeof window>"u")return bt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return ve("scrollCounter: element not found:",e),bt;let t=r,{from:o=0,to:s,format:a,easing:c="ease-out",trigger:m={},once:d=true,decimals:x,onComplete:M}=n,P=x!==void 0?f=>f.toFixed(x):a??(f=>String(Math.round(f))),te=typeof c=="function"?c:Z[c]??Z["ease-out"],Ee=le(m.start??"top 80%"),H=le(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=P(s),M?.(),bt;let z=0,V=0,I=false,$=0,k=false,h=false,C=-1,E=0,b=false,g=()=>window.scrollY,U=()=>window.innerHeight;function L(){let f=t.getBoundingClientRect(),p=Me({top:f.top,height:f.height},g(),U(),Ee,H);I&&Math.abs(p.tStart-z)<1&&Math.abs(p.tEnd-V)<1||(I=true,z=p.tStart,V=p.tEnd);}function _(f){t.textContent=P(o+(s-o)*f),t.style.setProperty("--scroll-draw-progress",String(f));}function ie(){if(!k||h)return;let f=te(ee(g(),z,V,1));d&&(C=Math.max(C,f),f=C),E=f,_(f),f>=1&&!b?(b=true,M?.()):f<1&&!d&&(b=false),$=requestAnimationFrame(ie);}L();{let f=te(ee(g(),z,V,1));d&&f>0&&(C=f),E=f,_(f);}let he=new IntersectionObserver(f=>{f.forEach(p=>{k=p.isIntersecting,k&&!h?$=requestAnimationFrame(ie):cancelAnimationFrame($);});}),be;function q(){clearTimeout(be),be=setTimeout(L,150);}window.addEventListener("resize",q),window.addEventListener("orientationchange",q);let O=Ne([t],q);return he.observe(t),Re(t,{type:"counter",getProgress:()=>E,getTrigger:()=>({tStart:z,tEnd:V})}),{destroy(){cancelAnimationFrame($),he.disconnect(),window.removeEventListener("resize",q),window.removeEventListener("orientationchange",q),O(),clearTimeout(be),Oe(t);},replay(){C=-1,b=false,E=0,h=false,_(0);},pause(){h=true,cancelAnimationFrame($);},resume(){h&&(h=false,k&&($=requestAnimationFrame(ie)));},seek(f){let p=Math.min(1,Math.max(0,f));E=p,C=p,h=true,cancelAnimationFrame($),_(p);},getProgress(){return E}}}var Kt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Qt(e,n={}){if(typeof window>"u")return Kt;let r=typeof e=="string"?document.querySelector(e):e;if(!r||r.tagName.toLowerCase()!=="video")return ve("scrollVideo: <video> element not found:",e),Kt;let t=r,{trigger:o={},easing:s="linear",once:a=false,axis:c="y",preload:m="auto",triggerElement:d,onReady:x,onComplete:M,onProgress:P}=n,te=d??t,Ee=window.matchMedia("(prefers-reduced-motion: reduce)").matches,H=typeof s=="function"?s:Z[s]??Z.linear,K=le(o.start??"top top"),z=le(o.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let V=n.from??0,I=n.to,$=0,k=0,h=0,C=false,E=false,b=-1,g=0,U=false,L=false,_=()=>c==="x"?window.scrollX:window.scrollY,ie=()=>c==="x"?window.innerWidth:window.innerHeight;function he(){let T=te.getBoundingClientRect(),W=c==="x"?T.left:T.top,fe=c==="x"?T.width:T.height,Fe=Me({top:W,height:fe},_(),ie(),K,z);$=Fe.tStart,k=Fe.tEnd,L&&k===$&&ve("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t);}let be=NaN;function q(T){if(!L)return;let W=I??t.duration??0,fe=V+(W-V)*T;fe!==be&&(be=fe,t.currentTime=fe),t.style.setProperty("--scroll-draw-progress",String(T)),P?.(T);}function O(){if(!C||E||!L||Ee)return;let T=H(ee(_(),$,k,1));a&&(b=Math.max(b,T),T=b),g=T,q(T),T>=1&&!U?(U=true,M?.()):T<1&&!a&&(U=false),h=requestAnimationFrame(O);}function f(){if(L=true,I===void 0&&(I=t.duration),Ee){q(1),x?.();return}he(),x?.(),C&&!E&&(h=requestAnimationFrame(O));}t.readyState>=1?f():t.addEventListener("loadedmetadata",f,{once:true}),L||he();let p=new IntersectionObserver(T=>{T.forEach(W=>{C=W.isIntersecting,C&&!E&&L?h=requestAnimationFrame(O):cancelAnimationFrame(h);});}),N;function X(){clearTimeout(N),N=setTimeout(he,150);}window.addEventListener("resize",X),window.addEventListener("orientationchange",X);let Le=Ne([te],X);return p.observe(t),Re(t,{type:"video",getProgress:()=>g,getTrigger:()=>({tStart:$,tEnd:k})}),{destroy(){cancelAnimationFrame(h),p.disconnect(),t.removeEventListener("loadedmetadata",f),window.removeEventListener("resize",X),window.removeEventListener("orientationchange",X),Le(),clearTimeout(N),Oe(t);},replay(){b=-1,U=false,g=0,E=false,be=NaN,q(0);},pause(){E=true,cancelAnimationFrame(h);},resume(){E&&(E=false,C&&L&&(h=requestAnimationFrame(O)));},seek(T){let W=Math.min(1,Math.max(0,T));g=W,b=W,E=true,cancelAnimationFrame(h),be=NaN,q(W);},getProgress(){return g}}}function er(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(r)?(t.textContent=r,t.style.whiteSpace="pre"):(t.textContent=r,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(r)?null:t}).filter(r=>r!==null)}function Pr(e){let n=e.textContent??"";return e.textContent="",n.split("").map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=r,r===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),r===" "?null:t}).filter(r=>r!==null)}function Jt(e){let n=er(e),r=new Map;for(let s of n){let a=s.offsetTop;r.has(a)||r.set(a,[]),r.get(a).push(s);}let t=[],o=Array.from(r.keys()).sort((s,a)=>s-a);for(let s of o){let a=r.get(s),c=document.createElement("span");c.setAttribute("aria-hidden","true"),c.style.display="inline-block",a.forEach((m,d)=>{let x=m.nextElementSibling;c.appendChild(m),d<a.length-1&&x&&x.style.whiteSpace==="pre"&&c.appendChild(x);}),t.push(c);}return e.textContent="",t.forEach((s,a)=>{e.appendChild(s),a<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function Cr(e,n,r,t){if(r<=1||t===0)return e;let o=(r-1)*t,s=n*t,a=s+(1-o);return a<=s?e>=s?1:0:Math.min(1,Math.max(0,(e-s)/(a-s)))}function $r(e,n){let r=[];if(n?.y!==void 0&&r.push(`translateY(${n.y*(1-e)}px)`),n?.x!==void 0&&r.push(`translateX(${n.x*(1-e)}px)`),n?.rotate!==void 0&&r.push(`rotate(${n.rotate*(1-e)}deg)`),n?.scale!==void 0){let t=n.scale+(1-n.scale)*e;r.push(`scale(${t})`);}return r.join(" ")||""}var Zt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function tr(e,n={}){if(typeof window>"u")return Zt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return ve("scrollText: element not found:",e),Zt;let t=r,{split:o="words",stagger:s=.04,easing:a="ease-out",from:c={opacity:0,y:24},trigger:m={},once:d=true,onComplete:x}=n,M=window.matchMedia("(prefers-reduced-motion: reduce)").matches,P=typeof a=="function"?a:Z[a]??Z["ease-out"],te=le(m.start??"top 85%"),Ee=le(m.end??"top 40%"),H=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let K;o==="chars"?K=Pr(t):o==="lines"?K=Jt(t):K=er(t);let z=K.length;function V(p,N){c?.opacity!==void 0&&(p.style.opacity=String(c.opacity+(1-c.opacity)*N));let X=$r(N,c);X&&(p.style.transform=X);}function I(p){t.style.setProperty("--scroll-draw-progress",String(p)),K.forEach((N,X)=>{let Le=P(Cr(p,X,z,s));V(N,Le);});}if(M)return I(1),x?.(),{destroy(){t.innerHTML=H,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};I(0);let $=0,k=0,h=0,C=false,E=false,b=-1,g=0,U=false,L=()=>window.scrollY,_=()=>window.innerHeight;function ie(){let p=t.getBoundingClientRect(),N=Me({top:p.top,height:p.height},L(),_(),te,Ee);$=N.tStart,k=N.tEnd;}function he(){if(!C||E)return;let p=ee(L(),$,k,1);d&&(b=Math.max(b,p),p=b),g=p,I(p),p>=1&&!U?(U=true,x?.()):p<1&&!d&&(U=false),h=requestAnimationFrame(he);}ie();let be=new IntersectionObserver(p=>{p.forEach(N=>{C=N.isIntersecting,C&&!E?h=requestAnimationFrame(he):cancelAnimationFrame(h);});}),q;function O(){clearTimeout(q),q=setTimeout(()=>{if(o==="lines"){let p=g;t.innerHTML=H,t.setAttribute("aria-label",t.textContent??""),K=Jt(t),I(p);}ie();},150);}window.addEventListener("resize",O),window.addEventListener("orientationchange",O);let f=Ne([t],O);return be.observe(t),Re(t,{type:"text",getProgress:()=>g,getTrigger:()=>({tStart:$,tEnd:k})}),{destroy(){cancelAnimationFrame(h),be.disconnect(),window.removeEventListener("resize",O),window.removeEventListener("orientationchange",O),f(),clearTimeout(q),t.innerHTML=H,t.removeAttribute("aria-label"),Oe(t);},replay(){b=-1,U=false,g=0,E=false,I(0);},pause(){E=true,cancelAnimationFrame(h);},resume(){E&&(E=false,C&&(h=requestAnimationFrame(he)));},seek(p){let N=Math.min(1,Math.max(0,p));g=N,b=N,E=true,cancelAnimationFrame(h),I(N);},getProgress(){return g}}}function Or(e,n={}){let[r,t]=Ir.useState(0),o=Ir.useRef(n);o.current=n;let s=Ir.useRef(-1);return Ir.useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){t(1);return}let a=typeof e=="string"?document.querySelector(e):e.current;if(!a)return;let c=a,{axis:m="y",scrollContainer:d,trigger:x={}}=o.current,M=typeof d=="string"?document.querySelector(d):d??null,P=le(x.start??"top bottom"),te=le(x.end??"bottom top"),Ee=0,H=0,K=false,z=0;function V(){return M?m==="x"?M.scrollLeft:M.scrollTop:m==="x"?window.scrollX:window.scrollY}function I(){return M?m==="x"?M.clientWidth:M.clientHeight:m==="x"?window.innerWidth:window.innerHeight}function $(){let b=c.getBoundingClientRect(),g=V(),U=m==="x"?b.left:b.top,L=m==="x"?b.width:b.height,_=Me({top:U,height:L},g,I(),P,te);Ee=_.tStart,H=_.tEnd;}function k(){if(!K)return;let{speed:b=1,easing:g="linear",once:U=false}=o.current,L=typeof g=="function"?g:Z[g]??Z.linear,_=ee(V(),Ee,H,b),ie=L(_);U&&(s.current=Math.max(s.current,ie),ie=s.current),t(ie),z=requestAnimationFrame(k);}let h=new IntersectionObserver(b=>{b.forEach(g=>{K=g.isIntersecting,K?z=requestAnimationFrame(k):cancelAnimationFrame(z);});},{root:M??null,threshold:0});$(),h.observe(c);let C;function E(){clearTimeout(C),C=setTimeout($,150);}return window.addEventListener("resize",E),window.addEventListener("orientationchange",E),()=>{cancelAnimationFrame(z),clearTimeout(C),h.disconnect(),window.removeEventListener("resize",E),window.removeEventListener("orientationchange",E);}},[]),r}function Ze(e,n,r){let t=Ir.useRef(n);t.current=n;let o=Wt(n);Ir.useEffect(()=>{if(!e.current)return;let s=r(e.current,Bt(t.current,()=>t.current));return ()=>s.destroy()},[o]);}var Fr=/^(data-|aria-)|^(id|role|title|tabIndex|lang|dir|hidden)$/;function et(e){let n={},r={};for(let[t,o]of Object.entries(e))(Fr.test(t)?r:n)[t]=o;return [n,r]}function Un({children:e,className:n,style:r,...t}){let o=Ir.useRef(null),[s,a]=et(t);return Ze(o,s,_t),jsxRuntime.jsx("div",{ref:o,className:n,style:r,...a,children:e})}function Xn({children:e,className:n,style:r,...t}){let o=Ir.useRef(null),[s,a]=et(t);return Ze(o,s,Xt),jsxRuntime.jsx("div",{ref:o,className:n,style:r,...a,children:e})}function Yn({className:e,style:n,...r}){let t=Ir.useRef(null),[o,s]=et(r);return Ze(t,o,Yt),jsxRuntime.jsx("span",{ref:t,className:e,style:n,...s})}function Kn({src:e,className:n,style:r,muted:t=true,playsInline:o=true,...s}){let a=Ir.useRef(null),[c,m]=et(s);return Ze(a,c,Qt),jsxRuntime.jsx("video",{...m,ref:a,src:e,className:n,style:r,muted:t,playsInline:o,preload:"auto"})}function Qn({children:e,as:n="p",className:r,style:t,...o}){let s=Ir.useRef(null),[a,c]=et(o);return Ze(s,a,tr),Ir__default.default.createElement(n,{...c,ref:s,className:r,style:t},e)}exports.ScrollAnimate=Xn;exports.ScrollCounter=Yn;exports.ScrollDraw=Un;exports.ScrollText=Qn;exports.ScrollVideo=Kn;exports.useScrollDrawProgress=Or;
|
package/dist/react/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {a as a$1,b as b$1}from'../chunk-XSVTHCLO.mjs';import {a as a$4}from'../chunk-7SBTYJGH.mjs';import {a as a$5}from'../chunk-I45LCJUP.mjs';import {a as a$3}from'../chunk-KHQ7OGQK.mjs';import {a as a$2}from'../chunk-BFX2CSQ3.mjs';import {b as b$2}from'../chunk-
|
|
2
|
+
import {a as a$1,b as b$1}from'../chunk-XSVTHCLO.mjs';import {a as a$4}from'../chunk-7SBTYJGH.mjs';import {a as a$5}from'../chunk-I45LCJUP.mjs';import {a as a$3}from'../chunk-KHQ7OGQK.mjs';import {a as a$2}from'../chunk-BFX2CSQ3.mjs';import {b as b$2}from'../chunk-ENACACPZ.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import {a,c,b}from'../chunk-A4JCC3QQ.mjs';import {d as d$1}from'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';import Y,{useState,useRef,useEffect}from'react';import {jsx}from'react/jsx-runtime';function K(n,t={}){let[o,e]=useState(0),r=useRef(t);r.current=t;let s=useRef(-1);return useEffect(()=>{if(typeof window>"u")return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){e(1);return}let i=typeof n=="string"?document.querySelector(n):n.current;if(!i)return;let u=i,{axis:l="y",scrollContainer:E,trigger:h={}}=r.current,a$1=typeof E=="string"?document.querySelector(E):E??null,X=a(h.start??"top bottom"),$=a(h.end??"bottom top"),A=0,C=0,O=false,g=0;function D(){return a$1?l==="x"?a$1.scrollLeft:a$1.scrollTop:l==="x"?window.scrollX:window.scrollY}function B(){return a$1?l==="x"?a$1.clientWidth:a$1.clientHeight:l==="x"?window.innerWidth:window.innerHeight}function N(){let c$1=u.getBoundingClientRect(),p=D(),x=l==="x"?c$1.left:c$1.top,R=l==="x"?c$1.width:c$1.height,y=c({top:x,height:R},p,B(),X,$);A=y.tStart,C=y.tEnd;}function L(){if(!O)return;let{speed:c=1,easing:p="linear",once:x=false}=r.current,R=typeof p=="function"?p:d$1[p]??d$1.linear,y=b(D(),A,C,c),T=R(y);x&&(s.current=Math.max(s.current,T),T=s.current),e(T),g=requestAnimationFrame(L);}let H=new IntersectionObserver(c=>{c.forEach(p=>{O=p.isIntersecting,O?g=requestAnimationFrame(L):cancelAnimationFrame(g);});},{root:a$1??null,threshold:0});N(),H.observe(u);let b$1;function S(){clearTimeout(b$1),b$1=setTimeout(N,150);}return window.addEventListener("resize",S),window.addEventListener("orientationchange",S),()=>{cancelAnimationFrame(g),clearTimeout(b$1),H.disconnect(),window.removeEventListener("resize",S),window.removeEventListener("orientationchange",S);}},[]),o}function d(n,t,o){let e=useRef(t);e.current=t;let r=a$1(t);useEffect(()=>{if(!n.current)return;let s=o(n.current,b$1(e.current,()=>e.current));return ()=>s.destroy()},[r]);}var Z=/^(data-|aria-)|^(id|role|title|tabIndex|lang|dir|hidden)$/;function f(n){let t={},o={};for(let[e,r]of Object.entries(n))(Z.test(e)?o:t)[e]=r;return [t,o]}function pe({children:n,className:t,style:o,...e}){let r=useRef(null),[s,i]=f(e);return d(r,s,b$2),jsx("div",{ref:r,className:t,style:o,...i,children:n})}function ue({children:n,className:t,style:o,...e}){let r=useRef(null),[s,i]=f(e);return d(r,s,a$2),jsx("div",{ref:r,className:t,style:o,...i,children:n})}function me({className:n,style:t,...o}){let e=useRef(null),[r,s]=f(o);return d(e,r,a$3),jsx("span",{ref:e,className:n,style:t,...s})}function de({src:n,className:t,style:o,muted:e=true,playsInline:r=true,...s}){let i=useRef(null),[u,l]=f(s);return d(i,u,a$4),jsx("video",{...l,ref:i,src:n,className:t,style:o,muted:e,playsInline:r,preload:"auto"})}function fe({children:n,as:t="p",className:o,style:e,...r}){let s=useRef(null),[i,u]=f(r);return d(s,i,a$5),Y.createElement(t,{...u,ref:s,className:o,style:e},n)}export{ue as ScrollAnimate,me as ScrollCounter,pe as ScrollDraw,fe as ScrollText,de as ScrollVideo,K as useScrollDrawProgress};
|
package/dist/solid/index.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use strict';var solidJs=require('solid-js');function
|
|
1
|
+
'use strict';var solidJs=require('solid-js');function sr({bounces:e=3,decay:n=.5}={}){let r=Math.max(1,Math.round(e)),t=Math.max(.01,Math.min(.99,n)),i=Math.sqrt(t),s=0,a=[];for(let d=0;d<r;d++){let T=Math.pow(i,d);a.push(T),s+=T;}let u=[0],m=0;for(let d=0;d<r;d++)m+=a[d]/s,u.push(m);return d=>{if(d<=0)return 0;if(d>=1)return 1;for(let T=0;T<r;T++)if(d<=u[T+1]){let R=(d-u[T])/(u[T+1]-u[T]);if(T===0)return R*(2-R);let A=1-Math.pow(t,T);return A+(1-A)*(2*R-1)*(2*R-1)}return 1}}function ir({amplitude:e=1,period:n=.4}={}){let r=Math.max(1,e),t=Math.max(.1,n),i=r<=1?t/4:t/(2*Math.PI)*Math.asin(1/r);return s=>s<=0?0:s>=1?1:r*Math.pow(2,-10*s)*Math.sin((s-i)*(2*Math.PI)/t)+1}var le={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:sr(),elastic:ir()};function Pt(e,n,r){return Math.min(r,Math.max(n,e))}function be(e="top bottom"){let n=e.trim();if(/^\d+(\.\d+)?%$/.test(n))return {element:"top",viewport:n};let[r="top",t="bottom"]=n.split(/\s+/).filter(Boolean);return {element:r,viewport:t}}function kt(e,n,r,t){switch(t){case "top":return e+r;case "center":return e+r+n/2;case "bottom":return e+r+n;default:return e+r}}function Ot(e,n){if(/^\d+(\.\d+)?%$/.test(e))return n*(parseFloat(e)/100);switch(e){case "top":return 0;case "center":return n/2;case "bottom":return n;default:return n}}function ee(e,n,r,t){return r===n?0:Pt((e-n)/(r-n)*t,0,1)}function Ce(e,n,r,t,i){let s=kt(e.top,e.height,n,t.element)-Ot(t.viewport,r),a=kt(e.top,e.height,n,i.element)-Ot(i.viewport,r);return {tStart:s,tEnd:a}}function ot(e,n,r){let t=e.getBoundingClientRect(),i=r==="x"?t.width:t.height;return n?{top:r==="x"?t.left-n.getBoundingClientRect().left+n.scrollLeft:t.top-n.getBoundingClientRect().top+n.scrollTop,height:i,scroll:0}:{top:r==="x"?t.left:t.top,height:i,scroll:r==="x"?window.scrollX:window.scrollY}}function je(e){let n=e.tagName.toLowerCase();if(n==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),t=parseFloat(e.getAttribute("height")??"0");return 2*(r+t)}if(n==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function It(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 Ue(e,n,r){let t=It(e),i=It(n);return !t||!i?e:`rgb(${Math.round(t[0]+(i[0]-t[0])*r)},${Math.round(t[1]+(i[1]-t[1])*r)},${Math.round(t[2]+(i[2]-t[2])*r)})`}var Ft={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var Ke=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function we(e,...n){Ke&&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)",Dt=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<Dt;r++){let t=r/(Dt-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function st(e){switch(e){case "linear":return "linear";case "ease-in":return ar;case "ease-out":return lr;case "ease-in-out":return cr()?ur(le["ease-in-out"]):null;default:return null}}var Rt=Symbol.for("svg-scroll-draw.registry");function Ht(){let e=globalThis;return e[Rt]||(e[Rt]=new Map)}function Oe(e,n){Ht().set(e,n);}function Ie(e){Ht().delete(e);}var Qe,it=new Set,at=new WeakMap,Ze=new Map,Nt=e=>{let n=e.getBoundingClientRect();return n.width+" "+n.height};function mr(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 De(e,n){if(typeof ResizeObserver>"u"||typeof document>"u")return ()=>{};let r=()=>n();Qe??(Qe=new ResizeObserver(i=>{let s=false;for(let{target:a}of i)at.get(a)!==Nt(a)&&(s=true),at.set(a,"");s&&it.forEach(a=>a());})),it.add(r);let t=mr(e);return [document.body,document.documentElement].forEach(i=>i&&t.add(i)),t.forEach(i=>{at.has(i)||at.set(i,Nt(i)),Ze.set(i,(Ze.get(i)??0)+1),Qe.observe(i);}),()=>{it.delete(r)&&(t.forEach(i=>{let s=(Ze.get(i)??1)-1;if(s)return void Ze.set(i,s);Ze.delete(i),Qe?.unobserve(i);}),it.size||(Qe?.disconnect(),Qe=void 0));}}var fr=0;function pr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Vt(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var zt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function dr(e){if(!Ke)return;let n=Vt(e,"stroke");if(!n||n==="none"){we("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!zt.has(r)&&!zt.has(Vt(e,"fill"))&&we("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 i(){let s=r==="x"?window.scrollX:window.scrollY,a=e-s,u=n-s,m=r==="x";t.innerHTML=`
|
|
2
2
|
<div style="position:absolute;${m?`left:${a}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${a}px;left:0;right:0;border-top:2px dashed #22c55e;`}padding:2px 6px;color:#22c55e;background:rgba(0,0,0,.6)">\u25B6 start</div>
|
|
3
|
-
<div style="position:absolute;${m?`left:${u}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${u}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",i,{passive:true}),i(),{el:t,destroy(){window.removeEventListener("scroll",i),t.remove();}}}var zt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,_t=/[MmLlHhVvCcSsQqTtAaZz]/g;function gr(e,n,r){if(!Xe)return;let t=(e.match(_t)??[]).join("").toUpperCase(),i=(n.match(_t)??[]).join("").toUpperCase(),s=(e.match(zt)??[]).length,a=(n.match(zt)??[]).length;if(t!==i){we(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${i||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,r);return}s!==a&&we(`morphTo: coordinate count differs (${s} \u2192 ${a}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function ft(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),i=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let a=parseFloat(s),u=t[i++]??a;return String(+(a+(u-a)*r).toFixed(4))})}function pt(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,i=r?{...It[r],...t}:t,s=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:a="path, polyline, line, polygon, rect, circle",speed:u=1,fade:m=false,easing:d="linear",trigger:T={},stagger:R=0,direction:A="forward",once:re=false,debug:Pe=false,axis:G="y",scrollContainer:ue,autoReverse:ne=false,delay:Y=0,strokeColor:H,strokeWidth:P,fillOpacity:O,waypoints:w,velocityScale:k=false,threshold:x=0,rootMargin:M="0px",repeat:E=0,repeatDelay:oe=0,morphTo:L,clip:se,autoplay:ve=false,duration:ge=1e3,native:ye=true,onProgress:N,onStart:C,onComplete:f,onEnter:p,onLeave:I,onEnterBack:q,onLeaveBack:Me}=i,v=se===true?"left":typeof se=="string"?se:false,V=typeof d=="function"?d:ce[d]??ce.linear,me=be(T.start??"top bottom"),He=be(T.end??"bottom top"),Ee=typeof ue=="string"?document.querySelector(ue):ue??null,Ae=Array.isArray(H)?H[0]:null,fe=Array.isArray(H)?H[1]:typeof H=="string"?H:null,X=Array.isArray(P)?P[0]:null,ie=Array.isArray(P)?P[1]:typeof P=="number"?P:null,ae=Array.isArray(O)?O[0]:null,K=Array.isArray(O)?O[1]:typeof O=="number"?O:null;function Ne(o){let l=o*100;switch(v){case "right":return `inset(0 0 0 ${100-l}%)`;case "top":return `inset(0 0 ${100-l}% 0)`;case "bottom":return `inset(${100-l}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-l}% 0 0)`}}let z=v?[]:Array.from(e.querySelectorAll(a)),F=[],pe=[],J=0,Se=0,c=R,h=0,_=false,B=false,$=0,ee=false,he=-1,Ve=[],le=-1,j=false,Te=0,ze=0,_e,lt=null;function wt(){lt?.destroy(),lt=null;}let We=new Set,vt=NaN,qe=true,Ze=-1,Et=performance.now(),Be=NaN;function Je(){return Ee?G==="x"?Ee.scrollLeft:Ee.scrollTop:G==="x"?window.scrollX:window.scrollY}function St(){return Ee?G==="x"?Ee.clientWidth:Ee.clientHeight:G==="x"?window.innerWidth:window.innerHeight}function Tt(){let o=ot(e,Ee,G);return Ce(o,o.scroll,St(),me,He)}function Zt(){let o=Se-J,l=z.length-1,y=Ee??document.documentElement,Q=G==="x"?"Width":"Height";if(c=R,R>0&&l>0&&o>0){let Le=y[`scroll${Q}`]-y[`client${Q}`]-1-J-o/u;Le>=0&&(c=Math.min(R,Le/(l*o)));}h=Se+l*c*o;}function xt(){(({tStart:J,tEnd:Se}=Tt())),Zt(),Pe&&Xe&&(wt(),lt=dr(J,Se,G));}function ct(o,l=Tt){Oe(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:l});let y=o.destroy;return o.destroy=()=>{y.call(o),Ie(e);},o}function Jt(o,l){if(e.style.setProperty("--scroll-draw-progress",String(o)),v){let y=l==="reverse"?1-o:o;e.style.clipPath=Ne(y);return}z.forEach((y,Q)=>{y.style.strokeDashoffset=l==="reverse"?`${F[Q]*o}`:`${F[Q]*(1-o)}`,m&&(y.style.opacity=l==="reverse"?`${1-o}`:`${o}`),Ae&&fe?y.style.stroke=Ue(Ae,fe,o):fe&&(y.style.stroke=fe),X!==null&&ie!==null?y.style.strokeWidth=`${X+(ie-X)*o}`:ie!==null&&(y.style.strokeWidth=`${ie}`),ae!==null&&K!==null?y.style.fillOpacity=`${ae+(K-ae)*o}`:K!==null&&(y.style.fillOpacity=`${K}`),L&&y.tagName.toLowerCase()==="path"&&pe[Q]&&y.setAttribute("d",ft(pe[Q],L,o));});}function et(){if(e.style.setProperty("--scroll-draw-progress","0"),v){e.style.clipPath=Ne(0);return}z.forEach((o,l)=>{o.style.strokeDasharray=`${F[l]}`,o.style.strokeDashoffset=A==="reverse"?"0":`${F[l]}`,m?o.style.opacity=A==="reverse"?"1":"0":o.style.opacity="",Ae&&(o.style.stroke=Ae),X!==null&&(o.style.strokeWidth=`${X}`),ae!==null&&(o.style.fillOpacity=`${ae}`),L&&o.tagName.toLowerCase()==="path"&&pe[l]&&o.setAttribute("d",pe[l]);});}if(z.forEach(o=>{pr(o);let l=je(o);F.push(l);let y=o.tagName.toLowerCase()==="path";y?pe.push(o.getAttribute("d")??""):pe.push(""),L&&(y?gr(pe[pe.length-1],L,o):we(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),s?(o.style.strokeDasharray=`${l}`,o.style.strokeDashoffset=A==="reverse"?`${l}`:"0",m&&(o.style.opacity="1"),fe&&(o.style.stroke=fe),ie!==null&&(o.style.strokeWidth=`${ie}`),K!==null&&(o.style.fillOpacity=`${K}`),L&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",L)):(o.style.strokeDasharray=`${l}`,o.style.strokeDashoffset=A==="reverse"?"0":`${l}`,m?o.style.opacity=A==="reverse"?"1":"0":o.style.opacity="",Ae&&(o.style.stroke=Ae),X!==null&&(o.style.strokeWidth=`${X}`),ae!==null&&(o.style.fillOpacity=`${ae}`));}),v){if(s)return e.style.clipPath=Ne(1),f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Ne(0);}else if(s)return f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Mt=typeof d=="string"?st(d):null;function er(){return !(ye===false||!fr()||!z.length||!Mt||v||G!=="y"||Ee||u!==1||R!==0||re||ne||k!==false||L||w||E||Y>0||N||C||f||p||I||q||Me||H!=null||P!=null||O!=null||(T.start??"top bottom").trim()!=="top bottom"||(T.end??"bottom top").trim()!=="bottom top")}function tr(){let o=++mr,l=`svg-scroll-draw-${o}`,y=`svg-scroll-draw-host-${o}`,Q=`--svg-scroll-draw-${o}`,Le=A==="reverse"?"0":"var(--ssd-len)",Fe=A==="reverse"?"var(--ssd-len)":"0",ke=`stroke-dashoffset:${Le};`,S=`stroke-dashoffset:${Fe};`;m&&(ke+=`opacity:${A==="reverse"?1:0};`,S+=`opacity:${A==="reverse"?0:1};`);let D=document.createElement("style");D.setAttribute("data-svg-scroll-draw",""),D.textContent=`@keyframes ${l}{from{${ke}}to{${S}}}.${y}{view-timeline-name:${Q};view-timeline-axis:block;}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${Mt};animation-fill-mode:both;animation-timeline:${Q};animation-range:cover 0% cover 100%;}`,document.head.appendChild(D),e.classList.add(y);function de(g,Z){g.style.setProperty("--ssd-len",String(F[Z])),g.style.strokeDasharray=`${F[Z]}`,g.style.strokeDashoffset="",g.style.opacity="",g.style.animationPlayState="",g.classList.add(l);}z.forEach(de);let b=false,W=-1;function U(){if(W>=0)return W;let g=e.getBoundingClientRect(),{tStart:Z,tEnd:$e}=Ce({top:g.top,height:g.height},Je(),St(),me,He);return V(te(Je(),Z,$e,u))}return {destroy(){e.classList.remove(y),z.forEach(g=>{g.classList.remove(l),g.style.removeProperty("--ssd-len"),g.style.animationPlayState="";}),D.remove();},replay(){b=false,W=-1,z.forEach(de);},pause(){b=true,z.forEach(g=>{g.style.animationPlayState="paused";});},resume(){b&&(b=false,z.forEach(g=>{g.style.animationPlayState="running";}));},seek(g){let Z=Math.min(1,Math.max(0,g));W=Z,b=true,z.forEach(($e,xe)=>{$e.classList.remove(l),$e.style.strokeDashoffset=A==="reverse"?`${F[xe]*Z}`:`${F[xe]*(1-Z)}`,m&&($e.style.opacity=A==="reverse"?`${1-Z}`:`${Z}`);});},getProgress(){return U()},refresh(){z.forEach((g,Z)=>{F[Z]=je(g),g.style.setProperty("--ssd-len",String(F[Z])),g.style.strokeDasharray=`${F[Z]}`;});}}}if(er())return ct(tr());function rr(){let o=Math.max(1,ge),l=0,y=0,Q=false;function Le(b){let W=true;if(v){let U=Math.min(1,Math.max(0,b/o)),g=V(U);Te=g,e.style.setProperty("--scroll-draw-progress",String(g)),e.style.clipPath=Ne(A==="reverse"?1-g:g),N?.(g),U<1&&(W=false);}else z.forEach((U,g)=>{let Z=g*R*o,$e=Math.min(1,Math.max(0,(b-Z)/o)),xe=V($e);U.style.strokeDashoffset=A==="reverse"?`${F[g]*xe}`:`${F[g]*(1-xe)}`,m&&(U.style.opacity=A==="reverse"?`${1-xe}`:`${xe}`),Ae&&fe?U.style.stroke=Ue(Ae,fe,xe):fe&&(U.style.stroke=fe),X!==null&&ie!==null?U.style.strokeWidth=`${X+(ie-X)*xe}`:ie!==null&&(U.style.strokeWidth=`${ie}`),ae!==null&&K!==null?U.style.fillOpacity=`${ae+(K-ae)*xe}`:K!==null&&(U.style.fillOpacity=`${K}`),L&&U.tagName.toLowerCase()==="path"&&pe[g]&&U.setAttribute("d",ft(pe[g],L,xe)),g===0&&(Te=xe,N?.(xe),e.style.setProperty("--scroll-draw-progress",String(xe))),$e<1&&(W=false);});if(w){let U=Math.min(1,Math.max(0,b/o)),g=V(U);for(let Z in w){let $e=parseFloat(Z);g>=$e&&!We.has($e)&&(We.add($e),w[Z]?.());}}return W}function Fe(b){if(j)return;let W=b-l;B||(B=true,C?.());let U=Le(W);if(U&&!_){_=true,Le(o*(1+Math.max(0,z.length-1)*R)),f?.(),ze<(E==="infinite"?1/0:E??0)&&(ze++,_e=setTimeout(()=>{l=performance.now(),B=false,_=false,We.clear(),et(),$=requestAnimationFrame(Fe);},oe));return}U||($=requestAnimationFrame(Fe));}function ke(){cancelAnimationFrame($),clearTimeout(_e),l=performance.now(),y=0,j=false,B=false,_=false,ze=0,Q=true,Te=0,We.clear(),et(),$=requestAnimationFrame(Fe);}let S=new IntersectionObserver(b=>{b.forEach(W=>{W.isIntersecting&&!(re&&_)?ke():!W.isIntersecting&&!re&&!_&&(cancelAnimationFrame($),clearTimeout(_e),Q=false);});},{root:Ee??null,threshold:x,rootMargin:M}),D;function de(){clearTimeout(D),D=setTimeout(()=>{z.forEach((b,W)=>{F[W]=je(b),b.style.strokeDasharray=`${F[W]}`;});},150);}return window.addEventListener("resize",de),window.addEventListener("orientationchange",de),Y>0?setTimeout(()=>S.observe(e),Y):S.observe(e),{destroy(){cancelAnimationFrame($),clearTimeout(_e),S.disconnect(),window.removeEventListener("resize",de),window.removeEventListener("orientationchange",de),clearTimeout(D);},replay(){ze=0,ke();},pause(){j||!Q||(j=true,y=performance.now()-l,cancelAnimationFrame($));},resume(){j&&(j=false,Q=true,l=performance.now()-y,$=requestAnimationFrame(Fe));},seek(b){let W=Math.min(1,Math.max(0,b));Te=W,j=true,y=W*o,l=performance.now()-y,cancelAnimationFrame($),Le(y);},getProgress(){return Te},refresh(){clearTimeout(D),z.forEach((b,W)=>{F[W]=je(b),b.style.strokeDasharray=`${F[W]}`;});}}}if(ve)return ct(rr());xt();function At(){if(j||!Ge)return;let o=performance.now(),l=Je();if(!qe&&k===false&&l===vt){ut(l);return}qe=false,vt=l;let y=u;if(k!==false){let S=o-Et,D=S>0?Math.abs(l-(Ze<0?l:Ze))/S:0;y=u*Math.max(.2,1+D*(typeof k=="number"?k:1)*.04);}Ze=l,Et=o;let Q=ne?le===-1||l>=le?"forward":"reverse":A;le=l;let Le=Se-J,Fe=true,ke=Le===0?0:(l-J)/Le;if(isNaN(Be)||(Be<=0&&ke>0?p?.():Be>0&&ke<=0&&Me?.(),Be<1&&ke>=1?I?.():Be>=1&&ke<1&&q?.()),Be=ke,v){let S=V(te(l,J,Se,y));re&&!ne&&(he=Math.max(he,S),S=he),Te=S,e.style.setProperty("--scroll-draw-progress",String(S));let D=Q==="reverse"?1-S:S;e.style.clipPath=Ne(D),N?.(S),!B&&te(l,J,Se,y)>0&&(B=true,C?.()),S>=1&&!_?(_=true,f?.(),ze<(E==="infinite"?1/0:E??0)&&(ze++,_e=setTimeout(()=>{he=-1,B=false,_=false,e.style.clipPath=Ne(0);},oe))):S<1&&!re&&(_=false),ut(l);return}if(z.forEach((S,D)=>{let de=D*c*Le,b=V(te(l,J+de,Se+de,y));re&&!ne&&(b=Ve[D]=Math.max(Ve[D]??he,b)),S.style.strokeDashoffset=Q==="reverse"?`${F[D]*b}`:`${F[D]*(1-b)}`,m&&(S.style.opacity=Q==="reverse"?`${1-b}`:`${b}`),Ae&&fe?S.style.stroke=Ue(Ae,fe,b):fe&&(S.style.stroke=fe),X!==null&&ie!==null?S.style.strokeWidth=`${X+(ie-X)*b}`:ie!==null&&(S.style.strokeWidth=`${ie}`),ae!==null&&K!==null?S.style.fillOpacity=`${ae+(K-ae)*b}`:K!==null&&(S.style.fillOpacity=`${K}`),L&&S.tagName.toLowerCase()==="path"&&pe[D]&&S.setAttribute("d",ft(pe[D],L,b)),D===0&&(Te=b,N?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(Fe=false);}),w){let S=V(te(l,J,Se,y));for(let D in w){let de=parseFloat(D);S>=de&&!We.has(de)&&(We.add(de),w[D]?.());}}!B&&te(l,J,Se,y)>0&&(B=true,C?.()),Fe&&!_?(_=true,f?.(),ze<(E==="infinite"?1/0:E??0)&&(ze++,_e=setTimeout(()=>{he=-1,Ve=[],B=false,_=false,We.clear(),et(),qe=true;},oe))):!Fe&&!re&&(_=false),ut(l);}function Lt(o){return o>=Se&&o<h}function ut(o){ee||Lt(o)?$=requestAnimationFrame(At):Ge=false;}let Ge=false;function tt(){Ge||(Ge=true,$=requestAnimationFrame(function(){At();}));}function rt(){Ge=false,cancelAnimationFrame($);}let mt=new IntersectionObserver(o=>{o.forEach(l=>{ee=l.isIntersecting,ee&&!j?(qe=true,tt()):Ge&&!j&&Lt(Je())||rt();});},{root:Ee??null,threshold:x,rootMargin:M});function $t(){z.forEach((o,l)=>{F[l]=je(o),o.style.strokeDasharray=`${F[l]}`;}),xt(),qe=true;}let nt;function Ye(){clearTimeout(nt),nt=setTimeout($t,150);}window.addEventListener("resize",Ye),window.addEventListener("orientationchange",Ye);let nr=De([e],Ye);return Y>0?setTimeout(()=>mt.observe(e),Y):mt.observe(e),ct({destroy(){cancelAnimationFrame($),clearTimeout(_e),rt(),mt.disconnect(),nr(),window.removeEventListener("resize",Ye),window.removeEventListener("orientationchange",Ye),clearTimeout(nt),wt();},replay(){he=-1,Ve=[],le=-1,Ze=-1,B=false,_=false,ze=0,j=false,Te=0,We.clear(),clearTimeout(_e),et(),qe=true,ee&&tt();},pause(){j=true,rt();},resume(){j&&(j=false,qe=true,ee&&tt());},seek(o){let l=Math.min(1,Math.max(0,o));Te=l,he=l,Ve=[],j=true,rt(),Jt(l,A),qe=true;},getProgress(){return Te},refresh(){clearTimeout(nt),$t(),ee&&!j&&tt();}},()=>({tStart:J,tEnd:Se}))}var Wt=new WeakMap,yr=0;function qt(e){return JSON.stringify(e,(n,r)=>{if(typeof r=="function")return "\u0192";if(typeof Element<"u"&&r instanceof Element){let t=Wt.get(r);return t===void 0&&Wt.set(r,t=++yr),`el#${t}`}return r})}function Bt(e,n){let r={...e};for(let t of Object.keys(r))typeof r[t]=="function"&&(r[t]=(...i)=>n()[t]?.(...i));return r}function hr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Gt(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let i=[],s=[],a=t[2].trim();if(a)for(let u of a.split(/[\s,]+/)){let m=u.match(/^([-+]?[\d.eE]+)(.*)$/);i.push(m?parseFloat(m[1]):0),s.push(m?m[2]:"");}n.push({fn:t[1],nums:i,units:s});}return n}function br(e,n,r){let t=Gt(e),i=Gt(n);return t.length===0||t.length!==i.length?r<1?e:n:t.map((s,a)=>{let u=i[a];return s.fn!==u.fn||s.nums.length!==u.nums.length?r<1?`${s.fn}(${s.nums.map((m,d)=>`${m}${s.units[d]}`).join(", ")})`:`${u.fn}(${u.nums.map((m,d)=>`${m}${u.units[d]}`).join(", ")})`:`${s.fn}(${s.nums.map((m,d)=>`${m+(u.nums[d]-m)*r}${s.units[d]}`).join(", ")})`}).join(" ")}function jt(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),i=String(n);if(hr(t))return Ue(t,i,r);if(t.includes("("))return br(t,i,r);let s=t.match(/^([-+]?[\d.]+)(.*)$/),a=i.match(/^([-+]?[\d.]+)(.*)$/);if(s&&a){let u=parseFloat(s[1]),m=parseFloat(a[1]);return `${u+(m-u)*r}${s[2]||a[2]}`}return r<1?t:i}function wr(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var vr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Er=0,Ut="--scroll-draw-progress";function Sr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function dt(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:t,trigger:i={},easing:s="ease-out",speed:a=1,once:u=false,axis:m="y",scrollContainer:d,native:T=true,velocityScale:R=false,respectReducedMotion:A=true,triggerElement:re,onProgress:Pe,onComplete:G,onEnter:ue,onLeave:ne,onEnterBack:Y,onLeaveBack:H}=n,P=A&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,O=typeof s=="function"?s:ce[s]??ce["ease-out"],w=be(i.start??"top bottom"),k=be(i.end??"bottom top"),x=re??e,M=typeof d=="string"?document.querySelector(d):d??null,E=Object.entries(t).map(([c,h])=>({prop:wr(c),from:Array.isArray(h)?h[0]:"",to:Array.isArray(h)?h[1]:h}));function oe(){let c=window.getComputedStyle(e);for(let h of E)h.from===""&&(h.from=c.getPropertyValue(h.prop).trim()||"0");}function L(){for(let c of E)e.style.setProperty(c.prop,String(c.to));}let se=new Map;for(let c of [...E.map(h=>h.prop),Ut])se.set(c,e.style.getPropertyValue(c));function ve(){for(let[c,h]of se)h?e.style.setProperty(c,h):e.style.removeProperty(c);}if(P)return L(),G?.(),{...r,destroy:ve,getProgress:()=>1};oe();let ge=typeof s=="string"?st(s):null;function ye(){if(!T||!Sr()||!ge||m!=="y"||M||x!==e||u||a!==1||Pe||G||ue||ne||Y||H||R!==false||(i.start??"top bottom").trim()!=="top bottom"||(i.end??"bottom top").trim()!=="bottom top")return false;for(let c of E)if(!vr.has(c.prop))return false;return true}function N(){let c=`ssd-a-${++Er}`,h=E.map(le=>`${le.prop}:${le.from}`).join(";"),_=E.map(le=>`${le.prop}:${le.to}`).join(";"),B=document.createElement("style");B.setAttribute("data-ssd-animate",""),B.textContent=`@keyframes ${c}{from{${h}}to{${_}}}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${ge};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(B),e.classList.add(c);let $=()=>m==="x"?window.scrollX:window.scrollY,ee=()=>m==="x"?window.innerWidth:window.innerHeight,he=()=>{let le=e.getBoundingClientRect();return Ce({top:le.top,height:le.height},$(),ee(),w,k)};Oe(e,{type:"animate",getProgress:()=>Ve.getProgress(),getTrigger:he});let Ve={refresh(){},destroy(){e.classList.remove(c),B.remove(),e.style.animationPlayState="",ve(),Ie(e);},replay(){e.classList.remove(c),e.offsetWidth,e.classList.add(c);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(le){let j=Math.min(1,Math.max(0,le));e.classList.remove(c);for(let Te of E)e.style.setProperty(Te.prop,jt(Te.from,Te.to,j));},getProgress(){let{tStart:le,tEnd:j}=he();return O(te($(),le,j,a))}};return Ve}if(ye())return N();let C=0,f=0,p=0,I=false,q=false,Me=-1,v=0,V=false,me=NaN,He=-1,Ee=0,Ae=()=>M?m==="x"?M.scrollLeft:M.scrollTop:m==="x"?window.scrollX:window.scrollY,fe=()=>M?m==="x"?M.clientWidth:M.clientHeight:m==="x"?window.innerWidth:window.innerHeight,X=x===e?E:[],ie=false;function ae(){let c=e.style,h=X.map(ee=>c.getPropertyValue(ee.prop)),_=c.transition;X.length&&(c.transition="none"),X.forEach(ee=>c.setProperty(ee.prop,se.get(ee.prop)??""));let B=ot(x,M,m);X.forEach((ee,he)=>c.setProperty(ee.prop,h[he])),X.length&&(e.offsetWidth,c.transition=_);let $=Ce(B,B.scroll,fe(),w,k);ie&&Math.abs($.tStart-C)<1&&Math.abs($.tEnd-f)<1||(ie=true,C=$.tStart,f=$.tEnd);}function K(c){e.style.setProperty(Ut,String(c));for(let h of E)e.style.setProperty(h.prop,jt(h.from,h.to,c));Pe?.(c);}function Ne(c){if(isNaN(me)){me=c;return}me<=0&&c>0?ue?.():me>0&&c<=0&&H?.(),me<1&&c>=1?ne?.():me>=1&&c<1&&Y?.(),me=c;}function z(){if(!I||q)return;let c=performance.now(),h=Ae(),_=a;if(R!==false){let ee=c-Ee,he=ee>0?Math.abs(h-(He<0?h:He))/ee:0;_=a*Math.max(.2,1+he*(typeof R=="number"?R:1)*.04);}He=h,Ee=c;let B=f===C?0:(h-C)/(f-C);Ne(B);let $=O(te(h,C,f,_));u&&(Me=Math.max(Me,$),$=Me),v=$,K($),$>=1&&!V?(V=true,G?.()):$<1&&!u&&(V=false),p=requestAnimationFrame(z);}ae(),f===C&&we("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let c=O(te(Ae(),C,f,a));u&&c>0&&(Me=c),v=c,K(c);}let F=new IntersectionObserver(c=>{c.forEach(h=>{I=h.isIntersecting,I&&!q?p=requestAnimationFrame(z):cancelAnimationFrame(p);});},{root:M??null}),pe;function J(){clearTimeout(pe),pe=setTimeout(ae,150);}window.addEventListener("resize",J),window.addEventListener("orientationchange",J);let Se=De([x],J);return F.observe(e),Oe(e,{type:"animate",getProgress:()=>v,getTrigger:()=>({tStart:C,tEnd:f})}),{destroy(){cancelAnimationFrame(p),F.disconnect(),window.removeEventListener("resize",J),window.removeEventListener("orientationchange",J),Se(),clearTimeout(pe),ve(),Ie(e);},replay(){Me=-1,V=false,v=0,q=false,K(0);},pause(){q=true,cancelAnimationFrame(p);},resume(){q&&(q=false,I&&(p=requestAnimationFrame(z)));},seek(c){let h=Math.min(1,Math.max(0,c));v=h,Me=h,q=true,cancelAnimationFrame(p),K(h);},getProgress(){return v},refresh(){ae();}}}var gt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function yt(e,n){if(typeof window>"u")return gt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return we("scrollCounter: element not found:",e),gt;let t=r,{from:i=0,to:s,format:a,easing:u="ease-out",trigger:m={},once:d=true,decimals:T,onComplete:R}=n,A=T!==void 0?f=>f.toFixed(T):a??(f=>String(Math.round(f))),re=typeof u=="function"?u:ce[u]??ce["ease-out"],Pe=be(m.start??"top 80%"),G=be(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=A(s),R?.(),gt;let ne=0,Y=0,H=false,P=0,O=false,w=false,k=-1,x=0,M=false,E=()=>window.scrollY,oe=()=>window.innerHeight;function L(){let f=t.getBoundingClientRect(),p=Ce({top:f.top,height:f.height},E(),oe(),Pe,G);H&&Math.abs(p.tStart-ne)<1&&Math.abs(p.tEnd-Y)<1||(H=true,ne=p.tStart,Y=p.tEnd);}function se(f){t.textContent=A(i+(s-i)*f),t.style.setProperty("--scroll-draw-progress",String(f));}function ve(){if(!O||w)return;let f=re(te(E(),ne,Y,1));d&&(k=Math.max(k,f),f=k),x=f,se(f),f>=1&&!M?(M=true,R?.()):f<1&&!d&&(M=false),P=requestAnimationFrame(ve);}L();{let f=re(te(E(),ne,Y,1));d&&f>0&&(k=f),x=f,se(f);}let ge=new IntersectionObserver(f=>{f.forEach(p=>{O=p.isIntersecting,O&&!w?P=requestAnimationFrame(ve):cancelAnimationFrame(P);});}),ye;function N(){clearTimeout(ye),ye=setTimeout(L,150);}window.addEventListener("resize",N),window.addEventListener("orientationchange",N);let C=De([t],N);return ge.observe(t),Oe(t,{type:"counter",getProgress:()=>x,getTrigger:()=>({tStart:ne,tEnd:Y})}),{destroy(){cancelAnimationFrame(P),ge.disconnect(),window.removeEventListener("resize",N),window.removeEventListener("orientationchange",N),C(),clearTimeout(ye),Ie(t);},replay(){k=-1,M=false,x=0,w=false,se(0);},pause(){w=true,cancelAnimationFrame(P);},resume(){w&&(w=false,O&&(P=requestAnimationFrame(ve)));},seek(f){let p=Math.min(1,Math.max(0,f));x=p,k=p,w=true,cancelAnimationFrame(P),se(p);},getProgress(){return x}}}var Yt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function ht(e,n={}){if(typeof window>"u")return Yt;let r=typeof e=="string"?document.querySelector(e):e;if(!r||r.tagName.toLowerCase()!=="video")return we("scrollVideo: <video> element not found:",e),Yt;let t=r,{trigger:i={},easing:s="linear",once:a=false,axis:u="y",preload:m="auto",triggerElement:d,onReady:T,onComplete:R,onProgress:A}=n,re=d??t,Pe=window.matchMedia("(prefers-reduced-motion: reduce)").matches,G=typeof s=="function"?s:ce[s]??ce.linear,ue=be(i.start??"top top"),ne=be(i.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let Y=n.from??0,H=n.to,P=0,O=0,w=0,k=false,x=false,M=-1,E=0,oe=false,L=false,se=()=>u==="x"?window.scrollX:window.scrollY,ve=()=>u==="x"?window.innerWidth:window.innerHeight;function ge(){let v=re.getBoundingClientRect(),V=u==="x"?v.left:v.top,me=u==="x"?v.width:v.height,He=Ce({top:V,height:me},se(),ve(),ue,ne);P=He.tStart,O=He.tEnd,L&&O===P&&we("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t);}let ye=NaN;function N(v){if(!L)return;let V=H??t.duration??0,me=Y+(V-Y)*v;me!==ye&&(ye=me,t.currentTime=me),t.style.setProperty("--scroll-draw-progress",String(v)),A?.(v);}function C(){if(!k||x||!L||Pe)return;let v=G(te(se(),P,O,1));a&&(M=Math.max(M,v),v=M),E=v,N(v),v>=1&&!oe?(oe=true,R?.()):v<1&&!a&&(oe=false),w=requestAnimationFrame(C);}function f(){if(L=true,H===void 0&&(H=t.duration),Pe){N(1),T?.();return}ge(),T?.(),k&&!x&&(w=requestAnimationFrame(C));}t.readyState>=1?f():t.addEventListener("loadedmetadata",f,{once:true}),L||ge();let p=new IntersectionObserver(v=>{v.forEach(V=>{k=V.isIntersecting,k&&!x&&L?w=requestAnimationFrame(C):cancelAnimationFrame(w);});}),I;function q(){clearTimeout(I),I=setTimeout(ge,150);}window.addEventListener("resize",q),window.addEventListener("orientationchange",q);let Me=De([re],q);return p.observe(t),Oe(t,{type:"video",getProgress:()=>E,getTrigger:()=>({tStart:P,tEnd:O})}),{destroy(){cancelAnimationFrame(w),p.disconnect(),t.removeEventListener("loadedmetadata",f),window.removeEventListener("resize",q),window.removeEventListener("orientationchange",q),Me(),clearTimeout(I),Ie(t);},replay(){M=-1,oe=false,E=0,x=false,ye=NaN,N(0);},pause(){x=true,cancelAnimationFrame(w);},resume(){x&&(x=false,k&&L&&(w=requestAnimationFrame(C)));},seek(v){let V=Math.min(1,Math.max(0,v));E=V,M=V,x=true,cancelAnimationFrame(w),ye=NaN,N(V);},getProgress(){return E}}}function Qt(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(r)?(t.textContent=r,t.style.whiteSpace="pre"):(t.textContent=r,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(r)?null:t}).filter(r=>r!==null)}function Tr(e){let n=e.textContent??"";return e.textContent="",n.split("").map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=r,r===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),r===" "?null:t}).filter(r=>r!==null)}function Xt(e){let n=Qt(e),r=new Map;for(let s of n){let a=s.offsetTop;r.has(a)||r.set(a,[]),r.get(a).push(s);}let t=[],i=Array.from(r.keys()).sort((s,a)=>s-a);for(let s of i){let a=r.get(s),u=document.createElement("span");u.setAttribute("aria-hidden","true"),u.style.display="inline-block",a.forEach((m,d)=>{let T=m.nextElementSibling;u.appendChild(m),d<a.length-1&&T&&T.style.whiteSpace==="pre"&&u.appendChild(T);}),t.push(u);}return e.textContent="",t.forEach((s,a)=>{e.appendChild(s),a<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function xr(e,n,r,t){if(r<=1||t===0)return e;let i=(r-1)*t,s=n*t,a=s+(1-i);return a<=s?e>=s?1:0:Math.min(1,Math.max(0,(e-s)/(a-s)))}function Mr(e,n){let r=[];if(n?.y!==void 0&&r.push(`translateY(${n.y*(1-e)}px)`),n?.x!==void 0&&r.push(`translateX(${n.x*(1-e)}px)`),n?.rotate!==void 0&&r.push(`rotate(${n.rotate*(1-e)}deg)`),n?.scale!==void 0){let t=n.scale+(1-n.scale)*e;r.push(`scale(${t})`);}return r.join(" ")||""}var Kt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function bt(e,n={}){if(typeof window>"u")return Kt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return we("scrollText: element not found:",e),Kt;let t=r,{split:i="words",stagger:s=.04,easing:a="ease-out",from:u={opacity:0,y:24},trigger:m={},once:d=true,onComplete:T}=n,R=window.matchMedia("(prefers-reduced-motion: reduce)").matches,A=typeof a=="function"?a:ce[a]??ce["ease-out"],re=be(m.start??"top 85%"),Pe=be(m.end??"top 40%"),G=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let ue;i==="chars"?ue=Tr(t):i==="lines"?ue=Xt(t):ue=Qt(t);let ne=ue.length;function Y(p,I){u?.opacity!==void 0&&(p.style.opacity=String(u.opacity+(1-u.opacity)*I));let q=Mr(I,u);q&&(p.style.transform=q);}function H(p){t.style.setProperty("--scroll-draw-progress",String(p)),ue.forEach((I,q)=>{let Me=A(xr(p,q,ne,s));Y(I,Me);});}if(R)return H(1),T?.(),{destroy(){t.innerHTML=G,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};H(0);let P=0,O=0,w=0,k=false,x=false,M=-1,E=0,oe=false,L=()=>window.scrollY,se=()=>window.innerHeight;function ve(){let p=t.getBoundingClientRect(),I=Ce({top:p.top,height:p.height},L(),se(),re,Pe);P=I.tStart,O=I.tEnd;}function ge(){if(!k||x)return;let p=te(L(),P,O,1);d&&(M=Math.max(M,p),p=M),E=p,H(p),p>=1&&!oe?(oe=true,T?.()):p<1&&!d&&(oe=false),w=requestAnimationFrame(ge);}ve();let ye=new IntersectionObserver(p=>{p.forEach(I=>{k=I.isIntersecting,k&&!x?w=requestAnimationFrame(ge):cancelAnimationFrame(w);});}),N;function C(){clearTimeout(N),N=setTimeout(()=>{if(i==="lines"){let p=E;t.innerHTML=G,t.setAttribute("aria-label",t.textContent??""),ue=Xt(t),H(p);}ve();},150);}window.addEventListener("resize",C),window.addEventListener("orientationchange",C);let f=De([t],C);return ye.observe(t),Oe(t,{type:"text",getProgress:()=>E,getTrigger:()=>({tStart:P,tEnd:O})}),{destroy(){cancelAnimationFrame(w),ye.disconnect(),window.removeEventListener("resize",C),window.removeEventListener("orientationchange",C),f(),clearTimeout(N),t.innerHTML=G,t.removeAttribute("aria-label"),Ie(t);},replay(){M=-1,oe=false,E=0,x=false,H(0);},pause(){x=true,cancelAnimationFrame(w);},resume(){x&&(x=false,k&&(w=requestAnimationFrame(ge)));},seek(p){let I=Math.min(1,Math.max(0,p));E=I,M=I,x=true,cancelAnimationFrame(w),H(I);},getProgress(){return E}}}function Re(e,n){let r,t,i,s;return solidJs.createEffect(()=>{s=typeof e=="function"?e():e;let a=qt(s);!r||a===i||(i=a,solidJs.untrack(()=>{t?.destroy(),t=n(r,Bt(s,()=>s));}));}),solidJs.onCleanup(()=>{t?.destroy(),t=i=void 0;}),{ref:a=>{r=a;},getInstance:()=>t}}function Dn(e={}){return Re(e,pt).ref}function Rn(e={}){return Re(e,pt)}function Hn(e){return Re(e,dt).ref}function Nn(e){return Re(e,dt)}function Vn(e){return Re(e,yt).ref}function zn(e){return Re(e,yt)}function _n(e={}){return Re(e,ht).ref}function Wn(e={}){return Re(e,ht)}function qn(e={}){return Re(e,bt).ref}function Bn(e={}){return Re(e,bt)}exports.createScrollAnimate=Nn;exports.createScrollCounter=zn;exports.createScrollDraw=Rn;exports.createScrollText=Bn;exports.createScrollVideo=Wn;exports.useScrollAnimate=Hn;exports.useScrollCounter=Vn;exports.useScrollDraw=Dn;exports.useScrollText=qn;exports.useScrollVideo=_n;
|
|
3
|
+
<div style="position:absolute;${m?`left:${u}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${u}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",i,{passive:true}),i(),{el:t,destroy(){window.removeEventListener("scroll",i),t.remove();}}}var _t=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Wt=/[MmLlHhVvCcSsQqTtAaZz]/g;function yr(e,n,r){if(!Ke)return;let t=(e.match(Wt)??[]).join("").toUpperCase(),i=(n.match(Wt)??[]).join("").toUpperCase(),s=(e.match(_t)??[]).length,a=(n.match(_t)??[]).length;if(t!==i){we(`morphTo: command sequence differs (${t||"\u2205"} \u2192 ${i||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,r);return}s!==a&&we(`morphTo: coordinate count differs (${s} \u2192 ${a}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function dt(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),i=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,s=>{let a=parseFloat(s),u=t[i++]??a;return String(+(a+(u-a)*r).toFixed(4))})}function gt(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,i=r?{...Ft[r],...t}:t,s=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:a="path, polyline, line, polygon, rect, circle",speed:u=1,fade:m=false,easing:d="linear",trigger:T={},stagger:R=0,direction:A="forward",once:te=false,debug:Pe=false,axis:G="y",scrollContainer:ce,autoReverse:re=false,delay:Y=0,strokeColor:H,strokeWidth:P,fillOpacity:O,waypoints:w,velocityScale:k=false,threshold:x=0,rootMargin:M="0px",repeat:E=0,repeatDelay:ne=0,morphTo:L,clip:oe,autoplay:ve=false,duration:ge=1e3,native:ye=true,onProgress:N,onStart:C,onComplete:f,onEnter:p,onLeave:I,onEnterBack:q,onLeaveBack:Me}=i,v=oe===true?"left":typeof oe=="string"?oe:false,V=typeof d=="function"?d:le[d]??le.linear,ue=be(T.start??"top bottom"),He=be(T.end??"bottom top"),Ee=typeof ce=="string"?document.querySelector(ce):ce??null,Ae=Array.isArray(H)?H[0]:null,me=Array.isArray(H)?H[1]:typeof H=="string"?H:null,X=Array.isArray(P)?P[0]:null,se=Array.isArray(P)?P[1]:typeof P=="number"?P:null,ie=Array.isArray(O)?O[0]:null,K=Array.isArray(O)?O[1]:typeof O=="number"?O:null;function Ne(o){let l=o*100;switch(v){case "right":return `inset(0 0 0 ${100-l}%)`;case "top":return `inset(0 0 ${100-l}% 0)`;case "bottom":return `inset(${100-l}% 0 0 0)`;case "center":return `circle(${o*150}% at 50% 50%)`;default:return `inset(0 ${100-l}% 0 0)`}}let z=v?[]:Array.from(e.querySelectorAll(a)),F=[],fe=[],J=0,Se=0,c=R,h=0,_=false,B=false,$=0,pe=false,he=-1,Ve=[],ae=-1,j=false,Te=0,ze=0,_e,lt=null;function Et(){lt?.destroy(),lt=null;}let We=new Set,St=NaN,qe=true,Je=-1,Tt=performance.now(),Be=NaN;function Ye(){return Ee?G==="x"?Ee.scrollLeft:Ee.scrollTop:G==="x"?window.scrollX:window.scrollY}function xt(){return Ee?G==="x"?Ee.clientWidth:Ee.clientHeight:G==="x"?window.innerWidth:window.innerHeight}function Mt(){let o=ot(e,Ee,G);return Ce(o,o.scroll,xt(),ue,He)}function Jt(){let o=Se-J,l=z.length-1,y=Ee??document.documentElement,Q=G==="x"?"Width":"Height";if(c=R,R>0&&l>0&&o>0){let Le=y[`scroll${Q}`]-y[`client${Q}`]-1-J-o/u;Le>=0&&(c=Math.min(R,Le/(l*o)));}h=Se+l*c*o;}function At(){(({tStart:J,tEnd:Se}=Mt())),Jt(),Pe&&Ke&&(Et(),lt=gr(J,Se,G));}function ct(o,l=Mt){Oe(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:l});let y=o.destroy;return o.destroy=()=>{y.call(o),Ie(e);},o}function er(o,l){if(e.style.setProperty("--scroll-draw-progress",String(o)),v){let y=l==="reverse"?1-o:o;e.style.clipPath=Ne(y);return}z.forEach((y,Q)=>{y.style.strokeDashoffset=l==="reverse"?`${F[Q]*o}`:`${F[Q]*(1-o)}`,m&&(y.style.opacity=l==="reverse"?`${1-o}`:`${o}`),Ae&&me?y.style.stroke=Ue(Ae,me,o):me&&(y.style.stroke=me),X!==null&&se!==null?y.style.strokeWidth=`${X+(se-X)*o}`:se!==null&&(y.style.strokeWidth=`${se}`),ie!==null&&K!==null?y.style.fillOpacity=`${ie+(K-ie)*o}`:K!==null&&(y.style.fillOpacity=`${K}`),L&&y.tagName.toLowerCase()==="path"&&fe[Q]&&y.setAttribute("d",dt(fe[Q],L,o));});}function et(){if(e.style.setProperty("--scroll-draw-progress","0"),v){e.style.clipPath=Ne(0);return}z.forEach((o,l)=>{o.style.strokeDasharray=`${F[l]}`,o.style.strokeDashoffset=A==="reverse"?"0":`${F[l]}`,m?o.style.opacity=A==="reverse"?"1":"0":o.style.opacity="",Ae&&(o.style.stroke=Ae),X!==null&&(o.style.strokeWidth=`${X}`),ie!==null&&(o.style.fillOpacity=`${ie}`),L&&o.tagName.toLowerCase()==="path"&&fe[l]&&o.setAttribute("d",fe[l]);});}if(z.forEach(o=>{dr(o);let l=je(o);F.push(l);let y=o.tagName.toLowerCase()==="path";y?fe.push(o.getAttribute("d")??""):fe.push(""),L&&(y?yr(fe[fe.length-1],L,o):we(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),s?(o.style.strokeDasharray=`${l}`,o.style.strokeDashoffset=A==="reverse"?`${l}`:"0",m&&(o.style.opacity="1"),me&&(o.style.stroke=me),se!==null&&(o.style.strokeWidth=`${se}`),K!==null&&(o.style.fillOpacity=`${K}`),L&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",L)):(o.style.strokeDasharray=`${l}`,o.style.strokeDashoffset=A==="reverse"?"0":`${l}`,m?o.style.opacity=A==="reverse"?"1":"0":o.style.opacity="",Ae&&(o.style.stroke=Ae),X!==null&&(o.style.strokeWidth=`${X}`),ie!==null&&(o.style.fillOpacity=`${ie}`));}),v){if(s)return e.style.clipPath=Ne(1),f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=Ne(0);}else if(s)return f?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Lt=typeof d=="string"?st(d):null;function tr(){return !(ye===false||!pr()||!z.length||!Lt||v||G!=="y"||Ee||u!==1||R!==0||te||re||k!==false||L||w||E||Y>0||N||C||f||p||I||q||Me||H!=null||P!=null||O!=null||(T.start??"top bottom").trim()!=="top bottom"||(T.end??"bottom top").trim()!=="bottom top")}function rr(){let o=++fr,l=`svg-scroll-draw-${o}`,y=`svg-scroll-draw-host-${o}`,Q=`--svg-scroll-draw-${o}`,Le=A==="reverse"?"0":"var(--ssd-len)",Fe=A==="reverse"?"var(--ssd-len)":"0",ke=`stroke-dashoffset:${Le};`,S=`stroke-dashoffset:${Fe};`;m&&(ke+=`opacity:${A==="reverse"?1:0};`,S+=`opacity:${A==="reverse"?0:1};`);let D=document.createElement("style");D.setAttribute("data-svg-scroll-draw",""),D.textContent=`@keyframes ${l}{from{${ke}}to{${S}}}.${y}{view-timeline-name:${Q};view-timeline-axis:block;}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${Lt};animation-fill-mode:both;animation-timeline:${Q};animation-range:cover 0% cover 100%;}`,document.head.appendChild(D),e.classList.add(y);function de(g,Z){g.style.setProperty("--ssd-len",String(F[Z])),g.style.strokeDasharray=`${F[Z]}`,g.style.strokeDashoffset="",g.style.opacity="",g.style.animationPlayState="",g.classList.add(l);}z.forEach(de);let b=false,W=-1;function U(){if(W>=0)return W;let g=e.getBoundingClientRect(),{tStart:Z,tEnd:$e}=Ce({top:g.top,height:g.height},Ye(),xt(),ue,He);return V(ee(Ye(),Z,$e,u))}return {destroy(){e.classList.remove(y),z.forEach(g=>{g.classList.remove(l),g.style.removeProperty("--ssd-len"),g.style.animationPlayState="";}),D.remove();},replay(){b=false,W=-1,z.forEach(de);},pause(){b=true,z.forEach(g=>{g.style.animationPlayState="paused";});},resume(){b&&(b=false,z.forEach(g=>{g.style.animationPlayState="running";}));},seek(g){let Z=Math.min(1,Math.max(0,g));W=Z,b=true,z.forEach(($e,xe)=>{$e.classList.remove(l),$e.style.strokeDashoffset=A==="reverse"?`${F[xe]*Z}`:`${F[xe]*(1-Z)}`,m&&($e.style.opacity=A==="reverse"?`${1-Z}`:`${Z}`);});},getProgress(){return U()},refresh(){z.forEach((g,Z)=>{F[Z]=je(g),g.style.setProperty("--ssd-len",String(F[Z])),g.style.strokeDasharray=`${F[Z]}`;});}}}if(tr())return ct(rr());function nr(){let o=Math.max(1,ge),l=0,y=0,Q=false;function Le(b){let W=true;if(v){let U=Math.min(1,Math.max(0,b/o)),g=V(U);Te=g,e.style.setProperty("--scroll-draw-progress",String(g)),e.style.clipPath=Ne(A==="reverse"?1-g:g),N?.(g),U<1&&(W=false);}else z.forEach((U,g)=>{let Z=g*R*o,$e=Math.min(1,Math.max(0,(b-Z)/o)),xe=V($e);U.style.strokeDashoffset=A==="reverse"?`${F[g]*xe}`:`${F[g]*(1-xe)}`,m&&(U.style.opacity=A==="reverse"?`${1-xe}`:`${xe}`),Ae&&me?U.style.stroke=Ue(Ae,me,xe):me&&(U.style.stroke=me),X!==null&&se!==null?U.style.strokeWidth=`${X+(se-X)*xe}`:se!==null&&(U.style.strokeWidth=`${se}`),ie!==null&&K!==null?U.style.fillOpacity=`${ie+(K-ie)*xe}`:K!==null&&(U.style.fillOpacity=`${K}`),L&&U.tagName.toLowerCase()==="path"&&fe[g]&&U.setAttribute("d",dt(fe[g],L,xe)),g===0&&(Te=xe,N?.(xe),e.style.setProperty("--scroll-draw-progress",String(xe))),$e<1&&(W=false);});if(w){let U=Math.min(1,Math.max(0,b/o)),g=V(U);for(let Z in w){let $e=parseFloat(Z);g>=$e&&!We.has($e)&&(We.add($e),w[Z]?.());}}return W}function Fe(b){if(j)return;let W=b-l;B||(B=true,C?.());let U=Le(W);if(U&&!_){_=true,Le(o*(1+Math.max(0,z.length-1)*R)),f?.(),ze<(E==="infinite"?1/0:E??0)&&(ze++,_e=setTimeout(()=>{l=performance.now(),B=false,_=false,We.clear(),et(),$=requestAnimationFrame(Fe);},ne));return}U||($=requestAnimationFrame(Fe));}function ke(){cancelAnimationFrame($),clearTimeout(_e),l=performance.now(),y=0,j=false,B=false,_=false,ze=0,Q=true,Te=0,We.clear(),et(),$=requestAnimationFrame(Fe);}let S=new IntersectionObserver(b=>{b.forEach(W=>{W.isIntersecting&&!(te&&_)?ke():!W.isIntersecting&&!te&&!_&&(cancelAnimationFrame($),clearTimeout(_e),Q=false);});},{root:Ee??null,threshold:x,rootMargin:M}),D;function de(){clearTimeout(D),D=setTimeout(()=>{z.forEach((b,W)=>{F[W]=je(b),b.style.strokeDasharray=`${F[W]}`;});},150);}return window.addEventListener("resize",de),window.addEventListener("orientationchange",de),Y>0?setTimeout(()=>S.observe(e),Y):S.observe(e),{destroy(){cancelAnimationFrame($),clearTimeout(_e),S.disconnect(),window.removeEventListener("resize",de),window.removeEventListener("orientationchange",de),clearTimeout(D);},replay(){ze=0,ke();},pause(){j||!Q||(j=true,y=performance.now()-l,cancelAnimationFrame($));},resume(){j&&(j=false,Q=true,l=performance.now()-y,$=requestAnimationFrame(Fe));},seek(b){let W=Math.min(1,Math.max(0,b));Te=W,j=true,y=W*o,l=performance.now()-y,cancelAnimationFrame($),Le(y);},getProgress(){return Te},refresh(){clearTimeout(D),z.forEach((b,W)=>{F[W]=je(b),b.style.strokeDasharray=`${F[W]}`;});}}}if(ve)return ct(nr());At();function $t(){if(j||!Ge)return;let o=performance.now(),l=Ye();if(!qe&&k===false&&l===St){mt(l);return}qe=false,St=l;let y=u;if(k!==false){let S=o-Tt,D=S>0?Math.abs(l-(Je<0?l:Je))/S:0;y=u*Math.max(.2,1+D*(typeof k=="number"?k:1)*.04);}Je=l,Tt=o;let Q=re?ae===-1||l>=ae?"forward":"reverse":A;ae=l;let Le=Se-J,Fe=true,ke=Le===0?0:(l-J)/Le;if(isNaN(Be)||(Be<=0&&ke>0?p?.():Be>0&&ke<=0&&Me?.(),Be<1&&ke>=1?I?.():Be>=1&&ke<1&&q?.()),Be=ke,v){let S=V(ee(l,J,Se,y));te&&!re&&(he=Math.max(he,S),S=he),Te=S,e.style.setProperty("--scroll-draw-progress",String(S));let D=Q==="reverse"?1-S:S;e.style.clipPath=Ne(D),N?.(S),!B&&ee(l,J,Se,y)>0&&(B=true,C?.()),S>=1&&!_?(_=true,f?.(),ze<(E==="infinite"?1/0:E??0)&&(ze++,_e=setTimeout(()=>{he=-1,B=false,_=false,e.style.clipPath=Ne(0);},ne))):S<1&&!te&&(_=false),mt(l);return}if(z.forEach((S,D)=>{let de=D*c*Le,b=V(ee(l,J+de,Se+de,y));te&&!re&&(b=Ve[D]=Math.max(Ve[D]??he,b)),S.style.strokeDashoffset=Q==="reverse"?`${F[D]*b}`:`${F[D]*(1-b)}`,m&&(S.style.opacity=Q==="reverse"?`${1-b}`:`${b}`),Ae&&me?S.style.stroke=Ue(Ae,me,b):me&&(S.style.stroke=me),X!==null&&se!==null?S.style.strokeWidth=`${X+(se-X)*b}`:se!==null&&(S.style.strokeWidth=`${se}`),ie!==null&&K!==null?S.style.fillOpacity=`${ie+(K-ie)*b}`:K!==null&&(S.style.fillOpacity=`${K}`),L&&S.tagName.toLowerCase()==="path"&&fe[D]&&S.setAttribute("d",dt(fe[D],L,b)),D===0&&(Te=b,N?.(b),e.style.setProperty("--scroll-draw-progress",String(b))),b<1&&(Fe=false);}),w){let S=V(ee(l,J,Se,y));for(let D in w){let de=parseFloat(D);S>=de&&!We.has(de)&&(We.add(de),w[D]?.());}}!B&&ee(l,J,Se,y)>0&&(B=true,C?.()),Fe&&!_?(_=true,f?.(),ze<(E==="infinite"?1/0:E??0)&&(ze++,_e=setTimeout(()=>{he=-1,Ve=[],B=false,_=false,We.clear(),et(),qe=true;},ne))):!Fe&&!te&&(_=false),mt(l);}function ut(o){return o>=Se&&o<h}function mt(o){pe||ut(o)?$=requestAnimationFrame($t):Ge=false;}function ft(){return pe||ut(Ye())}let Ge=false;function tt(){Ge||(Ge=true,$=requestAnimationFrame(function(){$t();}));}function rt(){Ge=false,cancelAnimationFrame($);}let pt=new IntersectionObserver(o=>{o.forEach(l=>{pe=l.isIntersecting,pe&&!j?(qe=true,tt()):Ge&&!j&&ut(Ye())||rt();});},{root:Ee??null,threshold:x,rootMargin:M});function Ct(){z.forEach((o,l)=>{F[l]=je(o),o.style.strokeDasharray=`${F[l]}`;}),At(),qe=true;}let nt;function Xe(){clearTimeout(nt),nt=setTimeout(Ct,150);}window.addEventListener("resize",Xe),window.addEventListener("orientationchange",Xe);let or=De([e],Xe);return Y>0?setTimeout(()=>pt.observe(e),Y):pt.observe(e),ct({destroy(){cancelAnimationFrame($),clearTimeout(_e),rt(),pt.disconnect(),or(),window.removeEventListener("resize",Xe),window.removeEventListener("orientationchange",Xe),clearTimeout(nt),Et();},replay(){he=-1,Ve=[],ae=-1,Je=-1,B=false,_=false,ze=0,j=false,Te=0,We.clear(),clearTimeout(_e),et(),qe=true,ft()&&tt();},pause(){j=true,rt();},resume(){j&&(j=false,qe=true,ft()&&tt());},seek(o){let l=Math.min(1,Math.max(0,o));Te=l,he=l,Ve=[],j=true,rt(),er(l,A),qe=true;},getProgress(){return Te},refresh(){clearTimeout(nt),Ct(),ft()&&!j&&tt();}},()=>({tStart:J,tEnd:Se}))}var qt=new WeakMap,hr=0;function Bt(e){return JSON.stringify(e,(n,r)=>{if(typeof r=="function")return "\u0192";if(typeof Element<"u"&&r instanceof Element){let t=qt.get(r);return t===void 0&&qt.set(r,t=++hr),`el#${t}`}return r})}function Gt(e,n){let r={...e};for(let t of Object.keys(r))typeof r[t]=="function"&&(r[t]=(...i)=>n()[t]?.(...i));return r}function br(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function jt(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let i=[],s=[],a=t[2].trim();if(a)for(let u of a.split(/[\s,]+/)){let m=u.match(/^([-+]?[\d.eE]+)(.*)$/);i.push(m?parseFloat(m[1]):0),s.push(m?m[2]:"");}n.push({fn:t[1],nums:i,units:s});}return n}function wr(e,n,r){let t=jt(e),i=jt(n);return t.length===0||t.length!==i.length?r<1?e:n:t.map((s,a)=>{let u=i[a];return s.fn!==u.fn||s.nums.length!==u.nums.length?r<1?`${s.fn}(${s.nums.map((m,d)=>`${m}${s.units[d]}`).join(", ")})`:`${u.fn}(${u.nums.map((m,d)=>`${m}${u.units[d]}`).join(", ")})`:`${s.fn}(${s.nums.map((m,d)=>`${m+(u.nums[d]-m)*r}${s.units[d]}`).join(", ")})`}).join(" ")}function Ut(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),i=String(n);if(br(t))return Ue(t,i,r);if(t.includes("("))return wr(t,i,r);let s=t.match(/^([-+]?[\d.]+)(.*)$/),a=i.match(/^([-+]?[\d.]+)(.*)$/);if(s&&a){let u=parseFloat(s[1]),m=parseFloat(a[1]);return `${u+(m-u)*r}${s[2]||a[2]}`}return r<1?t:i}function vr(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Er=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Sr=0,Yt="--scroll-draw-progress";function Tr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function yt(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:t,trigger:i={},easing:s="ease-out",speed:a=1,once:u=false,axis:m="y",scrollContainer:d,native:T=true,velocityScale:R=false,respectReducedMotion:A=true,triggerElement:te,onProgress:Pe,onComplete:G,onEnter:ce,onLeave:re,onEnterBack:Y,onLeaveBack:H}=n,P=A&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,O=typeof s=="function"?s:le[s]??le["ease-out"],w=be(i.start??"top bottom"),k=be(i.end??"bottom top"),x=te??e,M=typeof d=="string"?document.querySelector(d):d??null,E=Object.entries(t).map(([c,h])=>({prop:vr(c),from:Array.isArray(h)?h[0]:"",to:Array.isArray(h)?h[1]:h}));function ne(){let c=window.getComputedStyle(e);for(let h of E)h.from===""&&(h.from=c.getPropertyValue(h.prop).trim()||"0");}function L(){for(let c of E)e.style.setProperty(c.prop,String(c.to));}let oe=new Map;for(let c of [...E.map(h=>h.prop),Yt])oe.set(c,e.style.getPropertyValue(c));function ve(){for(let[c,h]of oe)h?e.style.setProperty(c,h):e.style.removeProperty(c);}if(P)return L(),G?.(),{...r,destroy:ve,getProgress:()=>1};ne();let ge=typeof s=="string"?st(s):null;function ye(){if(!T||!Tr()||!ge||m!=="y"||M||x!==e||u||a!==1||Pe||G||ce||re||Y||H||R!==false||(i.start??"top bottom").trim()!=="top bottom"||(i.end??"bottom top").trim()!=="bottom top")return false;for(let c of E)if(!Er.has(c.prop))return false;return true}function N(){let c=`ssd-a-${++Sr}`,h=E.map(ae=>`${ae.prop}:${ae.from}`).join(";"),_=E.map(ae=>`${ae.prop}:${ae.to}`).join(";"),B=document.createElement("style");B.setAttribute("data-ssd-animate",""),B.textContent=`@keyframes ${c}{from{${h}}to{${_}}}.${c}{animation-name:${c};animation-duration:auto;animation-timing-function:${ge};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(B),e.classList.add(c);let $=()=>m==="x"?window.scrollX:window.scrollY,pe=()=>m==="x"?window.innerWidth:window.innerHeight,he=()=>{let ae=e.getBoundingClientRect();return Ce({top:ae.top,height:ae.height},$(),pe(),w,k)};Oe(e,{type:"animate",getProgress:()=>Ve.getProgress(),getTrigger:he});let Ve={refresh(){},destroy(){e.classList.remove(c),B.remove(),e.style.animationPlayState="",ve(),Ie(e);},replay(){e.classList.remove(c),e.offsetWidth,e.classList.add(c);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(ae){let j=Math.min(1,Math.max(0,ae));e.classList.remove(c);for(let Te of E)e.style.setProperty(Te.prop,Ut(Te.from,Te.to,j));},getProgress(){let{tStart:ae,tEnd:j}=he();return O(ee($(),ae,j,a))}};return Ve}if(ye())return N();let C=0,f=0,p=0,I=false,q=false,Me=-1,v=0,V=false,ue=NaN,He=-1,Ee=0,Ae=()=>M?m==="x"?M.scrollLeft:M.scrollTop:m==="x"?window.scrollX:window.scrollY,me=()=>M?m==="x"?M.clientWidth:M.clientHeight:m==="x"?window.innerWidth:window.innerHeight,X=x===e?E:[],se=false;function ie(){let c=e.style,h=X.map(pe=>c.getPropertyValue(pe.prop)),_=c.transition;X.length&&(c.transition="none"),X.forEach(pe=>c.setProperty(pe.prop,oe.get(pe.prop)??""));let B=ot(x,M,m);X.forEach((pe,he)=>c.setProperty(pe.prop,h[he])),X.length&&(e.offsetWidth,c.transition=_);let $=Ce(B,B.scroll,me(),w,k);se&&Math.abs($.tStart-C)<1&&Math.abs($.tEnd-f)<1||(se=true,C=$.tStart,f=$.tEnd);}function K(c){e.style.setProperty(Yt,String(c));for(let h of E)e.style.setProperty(h.prop,Ut(h.from,h.to,c));Pe?.(c);}function Ne(c){if(isNaN(ue)){ue=c;return}ue<=0&&c>0?ce?.():ue>0&&c<=0&&H?.(),ue<1&&c>=1?re?.():ue>=1&&c<1&&Y?.(),ue=c;}function z(){if(!I||q)return;let c=performance.now(),h=Ae(),_=a;if(R!==false){let pe=c-Ee,he=pe>0?Math.abs(h-(He<0?h:He))/pe:0;_=a*Math.max(.2,1+he*(typeof R=="number"?R:1)*.04);}He=h,Ee=c;let B=f===C?0:(h-C)/(f-C);Ne(B);let $=O(ee(h,C,f,_));u&&(Me=Math.max(Me,$),$=Me),v=$,K($),$>=1&&!V?(V=true,G?.()):$<1&&!u&&(V=false),p=requestAnimationFrame(z);}ie(),f===C&&we("scrollAnimate: the trigger window has zero length (start and end resolve to the same scroll position), so this element will never animate. If the target is inside a position:sticky stage, measure the trigger from the container that holds the scroll room via `triggerElement`.",e);{let c=O(ee(Ae(),C,f,a));u&&c>0&&(Me=c),v=c,K(c);}let F=new IntersectionObserver(c=>{c.forEach(h=>{I=h.isIntersecting,I&&!q?p=requestAnimationFrame(z):cancelAnimationFrame(p);});},{root:M??null}),fe;function J(){clearTimeout(fe),fe=setTimeout(ie,150);}window.addEventListener("resize",J),window.addEventListener("orientationchange",J);let Se=De([x],J);return F.observe(e),Oe(e,{type:"animate",getProgress:()=>v,getTrigger:()=>({tStart:C,tEnd:f})}),{destroy(){cancelAnimationFrame(p),F.disconnect(),window.removeEventListener("resize",J),window.removeEventListener("orientationchange",J),Se(),clearTimeout(fe),ve(),Ie(e);},replay(){Me=-1,V=false,v=0,q=false,K(0);},pause(){q=true,cancelAnimationFrame(p);},resume(){q&&(q=false,I&&(p=requestAnimationFrame(z)));},seek(c){let h=Math.min(1,Math.max(0,c));v=h,Me=h,q=true,cancelAnimationFrame(p),K(h);},getProgress(){return v},refresh(){ie();}}}var ht={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function bt(e,n){if(typeof window>"u")return ht;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return we("scrollCounter: element not found:",e),ht;let t=r,{from:i=0,to:s,format:a,easing:u="ease-out",trigger:m={},once:d=true,decimals:T,onComplete:R}=n,A=T!==void 0?f=>f.toFixed(T):a??(f=>String(Math.round(f))),te=typeof u=="function"?u:le[u]??le["ease-out"],Pe=be(m.start??"top 80%"),G=be(m.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return t.textContent=A(s),R?.(),ht;let re=0,Y=0,H=false,P=0,O=false,w=false,k=-1,x=0,M=false,E=()=>window.scrollY,ne=()=>window.innerHeight;function L(){let f=t.getBoundingClientRect(),p=Ce({top:f.top,height:f.height},E(),ne(),Pe,G);H&&Math.abs(p.tStart-re)<1&&Math.abs(p.tEnd-Y)<1||(H=true,re=p.tStart,Y=p.tEnd);}function oe(f){t.textContent=A(i+(s-i)*f),t.style.setProperty("--scroll-draw-progress",String(f));}function ve(){if(!O||w)return;let f=te(ee(E(),re,Y,1));d&&(k=Math.max(k,f),f=k),x=f,oe(f),f>=1&&!M?(M=true,R?.()):f<1&&!d&&(M=false),P=requestAnimationFrame(ve);}L();{let f=te(ee(E(),re,Y,1));d&&f>0&&(k=f),x=f,oe(f);}let ge=new IntersectionObserver(f=>{f.forEach(p=>{O=p.isIntersecting,O&&!w?P=requestAnimationFrame(ve):cancelAnimationFrame(P);});}),ye;function N(){clearTimeout(ye),ye=setTimeout(L,150);}window.addEventListener("resize",N),window.addEventListener("orientationchange",N);let C=De([t],N);return ge.observe(t),Oe(t,{type:"counter",getProgress:()=>x,getTrigger:()=>({tStart:re,tEnd:Y})}),{destroy(){cancelAnimationFrame(P),ge.disconnect(),window.removeEventListener("resize",N),window.removeEventListener("orientationchange",N),C(),clearTimeout(ye),Ie(t);},replay(){k=-1,M=false,x=0,w=false,oe(0);},pause(){w=true,cancelAnimationFrame(P);},resume(){w&&(w=false,O&&(P=requestAnimationFrame(ve)));},seek(f){let p=Math.min(1,Math.max(0,f));x=p,k=p,w=true,cancelAnimationFrame(P),oe(p);},getProgress(){return x}}}var Xt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function wt(e,n={}){if(typeof window>"u")return Xt;let r=typeof e=="string"?document.querySelector(e):e;if(!r||r.tagName.toLowerCase()!=="video")return we("scrollVideo: <video> element not found:",e),Xt;let t=r,{trigger:i={},easing:s="linear",once:a=false,axis:u="y",preload:m="auto",triggerElement:d,onReady:T,onComplete:R,onProgress:A}=n,te=d??t,Pe=window.matchMedia("(prefers-reduced-motion: reduce)").matches,G=typeof s=="function"?s:le[s]??le.linear,ce=be(i.start??"top top"),re=be(i.end??"bottom top");t.pause(),t.hasAttribute("preload")||(t.preload=m);let Y=n.from??0,H=n.to,P=0,O=0,w=0,k=false,x=false,M=-1,E=0,ne=false,L=false,oe=()=>u==="x"?window.scrollX:window.scrollY,ve=()=>u==="x"?window.innerWidth:window.innerHeight;function ge(){let v=te.getBoundingClientRect(),V=u==="x"?v.left:v.top,ue=u==="x"?v.width:v.height,He=Ce({top:V,height:ue},oe(),ve(),ce,re);P=He.tStart,O=He.tEnd,L&&O===P&&we("scrollVideo: zero-length trigger window, so it never scrubs. In a sticky stage, set triggerElement.",t);}let ye=NaN;function N(v){if(!L)return;let V=H??t.duration??0,ue=Y+(V-Y)*v;ue!==ye&&(ye=ue,t.currentTime=ue),t.style.setProperty("--scroll-draw-progress",String(v)),A?.(v);}function C(){if(!k||x||!L||Pe)return;let v=G(ee(oe(),P,O,1));a&&(M=Math.max(M,v),v=M),E=v,N(v),v>=1&&!ne?(ne=true,R?.()):v<1&&!a&&(ne=false),w=requestAnimationFrame(C);}function f(){if(L=true,H===void 0&&(H=t.duration),Pe){N(1),T?.();return}ge(),T?.(),k&&!x&&(w=requestAnimationFrame(C));}t.readyState>=1?f():t.addEventListener("loadedmetadata",f,{once:true}),L||ge();let p=new IntersectionObserver(v=>{v.forEach(V=>{k=V.isIntersecting,k&&!x&&L?w=requestAnimationFrame(C):cancelAnimationFrame(w);});}),I;function q(){clearTimeout(I),I=setTimeout(ge,150);}window.addEventListener("resize",q),window.addEventListener("orientationchange",q);let Me=De([te],q);return p.observe(t),Oe(t,{type:"video",getProgress:()=>E,getTrigger:()=>({tStart:P,tEnd:O})}),{destroy(){cancelAnimationFrame(w),p.disconnect(),t.removeEventListener("loadedmetadata",f),window.removeEventListener("resize",q),window.removeEventListener("orientationchange",q),Me(),clearTimeout(I),Ie(t);},replay(){M=-1,ne=false,E=0,x=false,ye=NaN,N(0);},pause(){x=true,cancelAnimationFrame(w);},resume(){x&&(x=false,k&&L&&(w=requestAnimationFrame(C)));},seek(v){let V=Math.min(1,Math.max(0,v));E=V,M=V,x=true,cancelAnimationFrame(w),ye=NaN,N(V);},getProgress(){return E}}}function Zt(e){let n=e.textContent??"";return e.textContent="",n.split(/(\s+)/).filter(Boolean).map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),/^\s+$/.test(r)?(t.textContent=r,t.style.whiteSpace="pre"):(t.textContent=r,t.style.display="inline-block"),e.appendChild(t),/^\s+$/.test(r)?null:t}).filter(r=>r!==null)}function xr(e){let n=e.textContent??"";return e.textContent="",n.split("").map(r=>{let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.textContent=r,r===" "?t.style.whiteSpace="pre":t.style.display="inline-block",e.appendChild(t),r===" "?null:t}).filter(r=>r!==null)}function Kt(e){let n=Zt(e),r=new Map;for(let s of n){let a=s.offsetTop;r.has(a)||r.set(a,[]),r.get(a).push(s);}let t=[],i=Array.from(r.keys()).sort((s,a)=>s-a);for(let s of i){let a=r.get(s),u=document.createElement("span");u.setAttribute("aria-hidden","true"),u.style.display="inline-block",a.forEach((m,d)=>{let T=m.nextElementSibling;u.appendChild(m),d<a.length-1&&T&&T.style.whiteSpace==="pre"&&u.appendChild(T);}),t.push(u);}return e.textContent="",t.forEach((s,a)=>{e.appendChild(s),a<t.length-1&&e.appendChild(document.createTextNode(" "));}),t}function Mr(e,n,r,t){if(r<=1||t===0)return e;let i=(r-1)*t,s=n*t,a=s+(1-i);return a<=s?e>=s?1:0:Math.min(1,Math.max(0,(e-s)/(a-s)))}function Ar(e,n){let r=[];if(n?.y!==void 0&&r.push(`translateY(${n.y*(1-e)}px)`),n?.x!==void 0&&r.push(`translateX(${n.x*(1-e)}px)`),n?.rotate!==void 0&&r.push(`rotate(${n.rotate*(1-e)}deg)`),n?.scale!==void 0){let t=n.scale+(1-n.scale)*e;r.push(`scale(${t})`);}return r.join(" ")||""}var Qt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function vt(e,n={}){if(typeof window>"u")return Qt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return we("scrollText: element not found:",e),Qt;let t=r,{split:i="words",stagger:s=.04,easing:a="ease-out",from:u={opacity:0,y:24},trigger:m={},once:d=true,onComplete:T}=n,R=window.matchMedia("(prefers-reduced-motion: reduce)").matches,A=typeof a=="function"?a:le[a]??le["ease-out"],te=be(m.start??"top 85%"),Pe=be(m.end??"top 40%"),G=t.innerHTML;t.setAttribute("aria-label",t.textContent??"");let ce;i==="chars"?ce=xr(t):i==="lines"?ce=Kt(t):ce=Zt(t);let re=ce.length;function Y(p,I){u?.opacity!==void 0&&(p.style.opacity=String(u.opacity+(1-u.opacity)*I));let q=Ar(I,u);q&&(p.style.transform=q);}function H(p){t.style.setProperty("--scroll-draw-progress",String(p)),ce.forEach((I,q)=>{let Me=A(Mr(p,q,re,s));Y(I,Me);});}if(R)return H(1),T?.(),{destroy(){t.innerHTML=G,t.removeAttribute("aria-label");},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};H(0);let P=0,O=0,w=0,k=false,x=false,M=-1,E=0,ne=false,L=()=>window.scrollY,oe=()=>window.innerHeight;function ve(){let p=t.getBoundingClientRect(),I=Ce({top:p.top,height:p.height},L(),oe(),te,Pe);P=I.tStart,O=I.tEnd;}function ge(){if(!k||x)return;let p=ee(L(),P,O,1);d&&(M=Math.max(M,p),p=M),E=p,H(p),p>=1&&!ne?(ne=true,T?.()):p<1&&!d&&(ne=false),w=requestAnimationFrame(ge);}ve();let ye=new IntersectionObserver(p=>{p.forEach(I=>{k=I.isIntersecting,k&&!x?w=requestAnimationFrame(ge):cancelAnimationFrame(w);});}),N;function C(){clearTimeout(N),N=setTimeout(()=>{if(i==="lines"){let p=E;t.innerHTML=G,t.setAttribute("aria-label",t.textContent??""),ce=Kt(t),H(p);}ve();},150);}window.addEventListener("resize",C),window.addEventListener("orientationchange",C);let f=De([t],C);return ye.observe(t),Oe(t,{type:"text",getProgress:()=>E,getTrigger:()=>({tStart:P,tEnd:O})}),{destroy(){cancelAnimationFrame(w),ye.disconnect(),window.removeEventListener("resize",C),window.removeEventListener("orientationchange",C),f(),clearTimeout(N),t.innerHTML=G,t.removeAttribute("aria-label"),Ie(t);},replay(){M=-1,ne=false,E=0,x=false,H(0);},pause(){x=true,cancelAnimationFrame(w);},resume(){x&&(x=false,k&&(w=requestAnimationFrame(ge)));},seek(p){let I=Math.min(1,Math.max(0,p));E=I,M=I,x=true,cancelAnimationFrame(w),H(I);},getProgress(){return E}}}function Re(e,n){let r,t,i,s;return solidJs.createEffect(()=>{s=typeof e=="function"?e():e;let a=Bt(s);!r||a===i||(i=a,solidJs.untrack(()=>{t?.destroy(),t=n(r,Gt(s,()=>s));}));}),solidJs.onCleanup(()=>{t?.destroy(),t=i=void 0;}),{ref:a=>{r=a;},getInstance:()=>t}}function Rn(e={}){return Re(e,gt).ref}function Hn(e={}){return Re(e,gt)}function Nn(e){return Re(e,yt).ref}function Vn(e){return Re(e,yt)}function zn(e){return Re(e,bt).ref}function _n(e){return Re(e,bt)}function Wn(e={}){return Re(e,wt).ref}function qn(e={}){return Re(e,wt)}function Bn(e={}){return Re(e,vt).ref}function Gn(e={}){return Re(e,vt)}exports.createScrollAnimate=Vn;exports.createScrollCounter=_n;exports.createScrollDraw=Hn;exports.createScrollText=Gn;exports.createScrollVideo=qn;exports.useScrollAnimate=Nn;exports.useScrollCounter=zn;exports.useScrollDraw=Rn;exports.useScrollText=Bn;exports.useScrollVideo=Wn;
|
package/dist/solid/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a,b}from'../chunk-XSVTHCLO.mjs';import {a as a$3}from'../chunk-7SBTYJGH.mjs';import {a as a$4}from'../chunk-I45LCJUP.mjs';import {a as a$2}from'../chunk-KHQ7OGQK.mjs';import {a as a$1}from'../chunk-BFX2CSQ3.mjs';import {b as b$1}from'../chunk-
|
|
1
|
+
import {a,b}from'../chunk-XSVTHCLO.mjs';import {a as a$3}from'../chunk-7SBTYJGH.mjs';import {a as a$4}from'../chunk-I45LCJUP.mjs';import {a as a$2}from'../chunk-KHQ7OGQK.mjs';import {a as a$1}from'../chunk-BFX2CSQ3.mjs';import {b as b$1}from'../chunk-ENACACPZ.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-A4JCC3QQ.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';import {createEffect,onCleanup,untrack}from'solid-js';function o(e,f){let l,t,c,r;return createEffect(()=>{r=typeof e=="function"?e():e;let n=a(r);!l||n===c||(c=n,untrack(()=>{t?.destroy(),t=f(l,b(r,()=>r));}));}),onCleanup(()=>{t?.destroy(),t=c=void 0;}),{ref:n=>{l=n;},getInstance:()=>t}}function D(e={}){return o(e,b$1).ref}function V(e={}){return o(e,b$1)}function C(e){return o(e,a$1).ref}function H(e){return o(e,a$1)}function L(e){return o(e,a$2).ref}function g(e){return o(e,a$2)}function I(e={}){return o(e,a$3).ref}function k(e={}){return o(e,a$3)}function v(e={}){return o(e,a$4).ref}function j(e={}){return o(e,a$4)}export{H as createScrollAnimate,g as createScrollCounter,V as createScrollDraw,j as createScrollText,k as createScrollVideo,C as useScrollAnimate,L as useScrollCounter,D as useScrollDraw,v as useScrollText,I as useScrollVideo};
|