svg-scroll-draw 2.20.1 → 2.21.0

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