svg-scroll-draw 2.17.0 → 2.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
- "use strict";var SvgScrollDraw=(()=>{var lt=Object.defineProperty;var Ut=Object.getOwnPropertyDescriptor;var Xt=Object.getOwnPropertyNames;var Qt=Object.prototype.hasOwnProperty;var Zt=(e,t)=>{for(var r in t)lt(e,r,{get:t[r],enumerable:!0})},Kt=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Xt(t))!Qt.call(e,i)&&i!==r&&lt(e,i,{get:()=>t[i],enumerable:!(n=Ut(t,i))||n.enumerable});return e};var Jt=e=>Kt(lt({},"__esModule",{value:!0}),e);var br={};Zt(br,{Cinematic:()=>rt,PRESETS:()=>Ze,createBounce:()=>ct,createElastic:()=>ut,createSpring:()=>At,scrollAnimate:()=>Vt,scrollCounter:()=>qt,scrollDraw:()=>Ft,scrollParallax:()=>zt});function At({tension:e=2.5,friction:t=2.2}={}){return r=>1-Math.cos(r*Math.PI*e)*Math.pow(1-r,t)}function ct({bounces:e=3,decay:t=.5}={}){let r=Math.max(1,Math.round(e)),n=Math.max(.01,Math.min(.99,t)),i=Math.sqrt(n),a=0,f=[];for(let p=0;p<r;p++){let x=Math.pow(i,p);f.push(x),a+=x}let m=[0],c=0;for(let p=0;p<r;p++)c+=f[p]/a,m.push(c);return p=>{if(p<=0)return 0;if(p>=1)return 1;for(let x=0;x<r;x++)if(p<=m[x+1]){let I=(p-m[x])/(m[x+1]-m[x]);if(x===0)return I*(2-I);let T=1-Math.pow(n,x);return T+(1-T)*(2*I-1)*(2*I-1)}return 1}}function ut({amplitude:e=1,period:t=.4}={}){let r=Math.max(1,e),n=Math.max(.1,t),i=r<=1?n/4:n/(2*Math.PI)*Math.asin(1/r);return a=>a<=0?0:a>=1?1:r*Math.pow(2,-10*a)*Math.sin((a-i)*(2*Math.PI)/n)+1}var K={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:ct(),elastic:ut()};function Tt(e,t,r){return Math.min(r,Math.max(t,e))}function $e(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return{element:"top",viewport:t};let[r="top",n="bottom"]=t.split(/\s+/).filter(Boolean);return{element:r,viewport:n}}function $t(e,t,r,n){switch(n){case"top":return e+r;case"center":return e+r+t/2;case"bottom":return e+r+t;default:return e+r}}function Mt(e,t){if(/^\d+(\.\d+)?%$/.test(e))return t*(parseFloat(e)/100);switch(e){case"top":return 0;case"center":return t/2;case"bottom":return t;default:return t}}function le(e,t,r,n){return r===t?0:Tt((e-t)/(r-t)*n,0,1)}function Fe(e,t,r,n,i){let a=$t(e.top,e.height,t,n.element)-Mt(n.viewport,r),f=$t(e.top,e.height,t,i.element)-Mt(i.viewport,r);return{tStart:a,tEnd:f}}function Qe(e,t,r){let n=e.getBoundingClientRect(),i=r==="x"?n.width:n.height;return t?{top:r==="x"?n.left-t.getBoundingClientRect().left+t.scrollLeft:n.top-t.getBoundingClientRect().top+t.scrollTop,height:i,scroll:0}:{top:r==="x"?n.left:n.top,height:i,scroll:r==="x"?window.scrollX:window.scrollY}}function Ve(e){let t=e.tagName.toLowerCase();if(t==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),n=parseFloat(e.getAttribute("height")??"0");return 2*(r+n)}if(t==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function Pt(e){let t=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(t)return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)];let 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 n=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return n?[parseInt(n[1]),parseInt(n[2]),parseInt(n[3])]:null}function ze(e,t,r){let n=Pt(e),i=Pt(t);return!n||!i?e:`rgb(${Math.round(n[0]+(i[0]-n[0])*r)},${Math.round(n[1]+(i[1]-n[1])*r)},${Math.round(n[2]+(i[2]-n[2])*r)})`}var Ze={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:!1},reveal:{easing:"ease-out",fade:!0,speed:1.2,once:!0},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:!0,speed:.75},spring:{easing:"spring",speed:1.1}};function j(e,...t){}var er="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",tr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",kt=33;function rr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function nr(e){let t=[];for(let r=0;r<kt;r++){let n=r/(kt-1);t.push(String(Math.round(e(n)*1e5)/1e5))}return`linear(${t.join(",")})`}function Ke(e){switch(e){case"linear":return"linear";case"ease-in":return er;case"ease-out":return tr;case"ease-in-out":return rr()?nr(K["ease-in-out"]):null;default:return null}}var Lt=Symbol.for("svg-scroll-draw.registry");function Ct(){let e=globalThis;return e[Lt]||(e[Lt]=new Map)}function Me(e,t){Ct().set(e,t)}function Pe(e){Ct().delete(e)}var or=0;function sr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Dt(e,t){let r="";try{r=getComputedStyle(e).getPropertyValue(t).trim()}catch{}return r||(e.getAttribute(t)??"").trim()}var It=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function ir(e){if(!!1)return;let t=Dt(e,"stroke");if(!t||t==="none"){j("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!It.has(r)&&!It.has(Dt(e,"fill"))&&j("Element has a fill \u2014 it may obscure the stroke animation.",e)}function ar(e,t,r){let n=document.createElement("div");n.setAttribute("data-svg-scroll-draw-debug",""),n.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function i(){let a=r==="x"?window.scrollX:window.scrollY,f=e-a,m=t-a,c=r==="x";n.innerHTML=`
1
+ "use strict";var SvgScrollDraw=(()=>{var ct=Object.defineProperty;var Xt=Object.getOwnPropertyDescriptor;var Qt=Object.getOwnPropertyNames;var Zt=Object.prototype.hasOwnProperty;var Kt=(e,t)=>{for(var r in t)ct(e,r,{get:t[r],enumerable:!0})},Jt=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Qt(t))!Zt.call(e,i)&&i!==r&&ct(e,i,{get:()=>t[i],enumerable:!(n=Xt(t,i))||n.enumerable});return e};var er=e=>Jt(ct({},"__esModule",{value:!0}),e);var wr={};Kt(wr,{Cinematic:()=>nt,PRESETS:()=>Ke,createBounce:()=>ut,createElastic:()=>mt,createSpring:()=>Tt,scrollAnimate:()=>zt,scrollCounter:()=>Wt,scrollDraw:()=>Nt,scrollParallax:()=>qt});function Tt({tension:e=2.5,friction:t=2.2}={}){return r=>1-Math.cos(r*Math.PI*e)*Math.pow(1-r,t)}function ut({bounces:e=3,decay:t=.5}={}){let r=Math.max(1,Math.round(e)),n=Math.max(.01,Math.min(.99,t)),i=Math.sqrt(n),a=0,f=[];for(let p=0;p<r;p++){let x=Math.pow(i,p);f.push(x),a+=x}let m=[0],c=0;for(let p=0;p<r;p++)c+=f[p]/a,m.push(c);return p=>{if(p<=0)return 0;if(p>=1)return 1;for(let x=0;x<r;x++)if(p<=m[x+1]){let I=(p-m[x])/(m[x+1]-m[x]);if(x===0)return I*(2-I);let T=1-Math.pow(n,x);return T+(1-T)*(2*I-1)*(2*I-1)}return 1}}function mt({amplitude:e=1,period:t=.4}={}){let r=Math.max(1,e),n=Math.max(.1,t),i=r<=1?n/4:n/(2*Math.PI)*Math.asin(1/r);return a=>a<=0?0:a>=1?1:r*Math.pow(2,-10*a)*Math.sin((a-i)*(2*Math.PI)/n)+1}var K={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:ut(),elastic:mt()};function $t(e,t,r){return Math.min(r,Math.max(t,e))}function $e(e="top bottom"){let t=e.trim();if(/^\d+(\.\d+)?%$/.test(t))return{element:"top",viewport:t};let[r="top",n="bottom"]=t.split(/\s+/).filter(Boolean);return{element:r,viewport:n}}function Mt(e,t,r,n){switch(n){case"top":return e+r;case"center":return e+r+t/2;case"bottom":return e+r+t;default:return e+r}}function Pt(e,t){if(/^\d+(\.\d+)?%$/.test(e))return t*(parseFloat(e)/100);switch(e){case"top":return 0;case"center":return t/2;case"bottom":return t;default:return t}}function ie(e,t,r,n){return r===t?0:$t((e-t)/(r-t)*n,0,1)}function Ne(e,t,r,n,i){let a=Mt(e.top,e.height,t,n.element)-Pt(n.viewport,r),f=Mt(e.top,e.height,t,i.element)-Pt(i.viewport,r);return{tStart:a,tEnd:f}}function Ze(e,t,r){let n=e.getBoundingClientRect(),i=r==="x"?n.width:n.height;return t?{top:r==="x"?n.left-t.getBoundingClientRect().left+t.scrollLeft:n.top-t.getBoundingClientRect().top+t.scrollTop,height:i,scroll:0}:{top:r==="x"?n.left:n.top,height:i,scroll:r==="x"?window.scrollX:window.scrollY}}function ze(e){let t=e.tagName.toLowerCase();if(t==="rect"){let r=parseFloat(e.getAttribute("width")??"0"),n=parseFloat(e.getAttribute("height")??"0");return 2*(r+n)}if(t==="circle"){let r=parseFloat(e.getAttribute("r")??"0");return 2*Math.PI*r}return e.getTotalLength()}function kt(e){let t=/^#([a-f\d])([a-f\d])([a-f\d])$/i.exec(e);if(t)return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)];let 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 n=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i.exec(e);return n?[parseInt(n[1]),parseInt(n[2]),parseInt(n[3])]:null}function qe(e,t,r){let n=kt(e),i=kt(t);return!n||!i?e:`rgb(${Math.round(n[0]+(i[0]-n[0])*r)},${Math.round(n[1]+(i[1]-n[1])*r)},${Math.round(n[2]+(i[2]-n[2])*r)})`}var Ke={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:!1},reveal:{easing:"ease-out",fade:!0,speed:1.2,once:!0},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:!0,speed:.75},spring:{easing:"spring",speed:1.1}};function j(e,...t){}var tr="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",rr="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Lt=33;function nr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function or(e){let t=[];for(let r=0;r<Lt;r++){let n=r/(Lt-1);t.push(String(Math.round(e(n)*1e5)/1e5))}return`linear(${t.join(",")})`}function Je(e){switch(e){case"linear":return"linear";case"ease-in":return tr;case"ease-out":return rr;case"ease-in-out":return nr()?or(K["ease-in-out"]):null;default:return null}}var Ct=Symbol.for("svg-scroll-draw.registry");function Dt(){let e=globalThis;return e[Ct]||(e[Ct]=new Map)}function Me(e,t){Dt().set(e,t)}function Pe(e){Dt().delete(e)}var sr=0;function ir(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function It(e,t){let r="";try{r=getComputedStyle(e).getPropertyValue(t).trim()}catch{}return r||(e.getAttribute(t)??"").trim()}var Ot=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function ar(e){if(!!1)return;let t=It(e,"stroke");if(!t||t==="none"){j("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!Ot.has(r)&&!Ot.has(It(e,"fill"))&&j("Element has a fill \u2014 it may obscure the stroke animation.",e)}function lr(e,t,r){let n=document.createElement("div");n.setAttribute("data-svg-scroll-draw-debug",""),n.style.cssText="position:fixed;pointer-events:none;z-index:9999;font-family:monospace;font-size:11px;top:0;left:0;right:0;bottom:0;";function i(){let a=r==="x"?window.scrollX:window.scrollY,f=e-a,m=t-a,c=r==="x";n.innerHTML=`
2
2
  <div style="position:absolute;${c?`left:${f}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${f}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;${c?`left:${m}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${m}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`}return document.body.appendChild(n),window.addEventListener("scroll",i,{passive:!0}),i(),{el:n,destroy(){window.removeEventListener("scroll",i),n.remove()}}}var Ot=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Rt=/[MmLlHhVvCcSsQqTtAaZz]/g;function lr(e,t,r){if(!!1)return;let n=(e.match(Rt)??[]).join("").toUpperCase(),i=(t.match(Rt)??[]).join("").toUpperCase(),a=(e.match(Ot)??[]).length,f=(t.match(Ot)??[]).length;if(n!==i){j(`morphTo: command sequence differs (${n||"\u2205"} \u2192 ${i||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,r);return}a!==f&&j(`morphTo: coordinate count differs (${a} \u2192 ${f}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r)}function mt(e,t,r){let n=(t.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),i=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,a=>{let f=parseFloat(a),m=n[i++]??f;return String(+(f+(m-f)*r).toFixed(4))})}function Je(e,t={}){if(typeof window>"u")return{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...n}=t,i=r?{...Ze[r],...n}:n,a=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:f="path, polyline, line, polygon, rect, circle",speed:m=1,fade:c=!1,easing:p="linear",trigger:x={},stagger:I=0,direction:T="forward",once:J=!1,debug:Ee=!1,axis:S="y",scrollContainer:$,autoReverse:g=!1,delay:E=0,strokeColor:b,strokeWidth:z,fillOpacity:F,waypoints:B,velocityScale:ee=!1,threshold:ge=0,rootMargin:Y="0px",repeat:q=0,repeatDelay:ke=0,morphTo:N,clip:ye,autoplay:Le=!1,duration:Ce=1e3,native:De=!0,onProgress:w,onStart:P,onComplete:ne,onEnter:he,onLeave:Ne,onEnterBack:be,onLeaveBack:xe}=i,te=ye===!0?"left":typeof ye=="string"?ye:!1,me=typeof p=="function"?p:K[p]??K.linear,we=$e(x.start??"top bottom"),He=$e(x.end??"bottom top"),ce=typeof $=="string"?document.querySelector($):$??null,ue=Array.isArray(b)?b[0]:null,U=Array.isArray(b)?b[1]:typeof b=="string"?b:null,X=Array.isArray(z)?z[0]:null,H=Array.isArray(z)?z[1]:typeof z=="number"?z:null,re=Array.isArray(F)?F[0]:null,W=Array.isArray(F)?F[1]:typeof F=="number"?F:null;function ve(o){let l=o*100;switch(te){case"right":return`inset(0 0 0 ${100-l}%)`;case"top":return`inset(0 0 ${100-l}% 0)`;case"bottom":return`inset(${100-l}% 0 0 0)`;case"center":return`circle(${o*150}% at 50% 50%)`;default:return`inset(0 ${100-l}% 0 0)`}}let C=te?[]:Array.from(e.querySelectorAll(f)),A=[],s=[],u=0,oe=0,k=!1,D=!1,O=0,pe=!1,se=-1,G=-1,_=!1,ie=0,Ae=0,Ie,nt=null;function yt(){nt?.destroy(),nt=null}let Oe=new Set,ht=NaN,Re=!0,Be=-1,bt=performance.now(),_e=NaN;function ot(){return ce?S==="x"?ce.scrollLeft:ce.scrollTop:S==="x"?window.scrollX:window.scrollY}function wt(){return ce?S==="x"?ce.clientWidth:ce.clientHeight:S==="x"?window.innerWidth:window.innerHeight}function vt(){let o=Qe(e,ce,S);return Fe(o,o.scroll,wt(),we,He)}function St(){({tStart:u,tEnd:oe}=vt()),Ee&&!1&&(yt(),nt=ar(u,oe,S))}function st(o,l=vt){Me(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:l});let h=o.destroy;return o.destroy=()=>{h.call(o),Pe(e)},o}function Bt(o,l){if(e.style.setProperty("--scroll-draw-progress",String(o)),te){let h=l==="reverse"?1-o:o;e.style.clipPath=ve(h);return}C.forEach((h,Q)=>{h.style.strokeDashoffset=l==="reverse"?`${A[Q]*o}`:`${A[Q]*(1-o)}`,c&&(h.style.opacity=l==="reverse"?`${1-o}`:`${o}`),ue&&U?h.style.stroke=ze(ue,U,o):U&&(h.style.stroke=U),X!==null&&H!==null?h.style.strokeWidth=`${X+(H-X)*o}`:H!==null&&(h.style.strokeWidth=`${H}`),re!==null&&W!==null?h.style.fillOpacity=`${re+(W-re)*o}`:W!==null&&(h.style.fillOpacity=`${W}`),N&&h.tagName.toLowerCase()==="path"&&s[Q]&&h.setAttribute("d",mt(s[Q],N,o))})}function Ge(){if(e.style.setProperty("--scroll-draw-progress","0"),te){e.style.clipPath=ve(0);return}C.forEach((o,l)=>{o.style.strokeDasharray=`${A[l]}`,o.style.strokeDashoffset=T==="reverse"?"0":`${A[l]}`,c?o.style.opacity=T==="reverse"?"1":"0":o.style.opacity="",ue&&(o.style.stroke=ue),X!==null&&(o.style.strokeWidth=`${X}`),re!==null&&(o.style.fillOpacity=`${re}`),N&&o.tagName.toLowerCase()==="path"&&s[l]&&o.setAttribute("d",s[l])})}if(C.forEach(o=>{ir(o);let l=Ve(o);A.push(l);let h=o.tagName.toLowerCase()==="path";h?s.push(o.getAttribute("d")??""):s.push(""),N&&(h?lr(s[s.length-1],N,o):j(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),a?(o.style.strokeDasharray=`${l}`,o.style.strokeDashoffset=T==="reverse"?`${l}`:"0",c&&(o.style.opacity="1"),U&&(o.style.stroke=U),H!==null&&(o.style.strokeWidth=`${H}`),W!==null&&(o.style.fillOpacity=`${W}`),N&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",N)):(o.style.strokeDasharray=`${l}`,o.style.strokeDashoffset=T==="reverse"?"0":`${l}`,c?o.style.opacity=T==="reverse"?"1":"0":o.style.opacity="",ue&&(o.style.stroke=ue),X!==null&&(o.style.strokeWidth=`${X}`),re!==null&&(o.style.fillOpacity=`${re}`))}),te){if(a)return e.style.clipPath=ve(1),ne?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=ve(0)}else if(a)return ne?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let Et=typeof p=="string"?Ke(p):null;function Gt(){return!(De===!1||!sr()||!C.length||!Et||te||S!=="y"||ce||m!==1||I!==0||J||g||ee!==!1||N||B||q||E>0||w||P||ne||he||Ne||be||xe||b!=null||z!=null||F!=null||(x.start??"top bottom").trim()!=="top bottom"||(x.end??"bottom top").trim()!=="bottom top")}function jt(){let o=++or,l=`svg-scroll-draw-${o}`,h=`svg-scroll-draw-host-${o}`,Q=`--svg-scroll-draw-${o}`,Te=T==="reverse"?"0":"var(--ssd-len)",Se=T==="reverse"?"var(--ssd-len)":"0",de=`stroke-dashoffset:${Te};`,v=`stroke-dashoffset:${Se};`;c&&(de+=`opacity:${T==="reverse"?1:0};`,v+=`opacity:${T==="reverse"?0:1};`);let M=document.createElement("style");M.setAttribute("data-svg-scroll-draw",""),M.textContent=`@keyframes ${l}{from{${de}}to{${v}}}.${h}{view-timeline-name:${Q};view-timeline-axis:block;}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${Et};animation-fill-mode:both;animation-timeline:${Q};animation-range:cover 0% cover 100%;}`,document.head.appendChild(M),e.classList.add(h);function Z(d,V){d.style.setProperty("--ssd-len",String(A[V])),d.style.strokeDasharray=`${A[V]}`,d.style.strokeDashoffset="",d.style.opacity="",d.style.animationPlayState="",d.classList.add(l)}C.forEach(Z);let y=!1,L=-1;function R(){if(L>=0)return L;let d=e.getBoundingClientRect(),{tStart:V,tEnd:fe}=Fe({top:d.top,height:d.height},ot(),wt(),we,He);return me(le(ot(),V,fe,m))}return{destroy(){e.classList.remove(h),C.forEach(d=>{d.classList.remove(l),d.style.removeProperty("--ssd-len"),d.style.animationPlayState=""}),M.remove()},replay(){y=!1,L=-1,C.forEach(Z)},pause(){y=!0,C.forEach(d=>{d.style.animationPlayState="paused"})},resume(){y&&(y=!1,C.forEach(d=>{d.style.animationPlayState="running"}))},seek(d){let V=Math.min(1,Math.max(0,d));L=V,y=!0,C.forEach((fe,ae)=>{fe.classList.remove(l),fe.style.strokeDashoffset=T==="reverse"?`${A[ae]*V}`:`${A[ae]*(1-V)}`,c&&(fe.style.opacity=T==="reverse"?`${1-V}`:`${V}`)})},getProgress(){return R()},refresh(){C.forEach((d,V)=>{A[V]=Ve(d),d.style.setProperty("--ssd-len",String(A[V])),d.style.strokeDasharray=`${A[V]}`})}}}if(Gt())return st(jt());function Yt(){let o=Math.max(1,Ce),l=0,h=0,Q=!1;function Te(y){let L=!0;if(te){let R=Math.min(1,Math.max(0,y/o)),d=me(R);ie=d,e.style.setProperty("--scroll-draw-progress",String(d)),e.style.clipPath=ve(T==="reverse"?1-d:d),w?.(d),R<1&&(L=!1)}else C.forEach((R,d)=>{let V=d*I*o,fe=Math.min(1,Math.max(0,(y-V)/o)),ae=me(fe);R.style.strokeDashoffset=T==="reverse"?`${A[d]*ae}`:`${A[d]*(1-ae)}`,c&&(R.style.opacity=T==="reverse"?`${1-ae}`:`${ae}`),ue&&U?R.style.stroke=ze(ue,U,ae):U&&(R.style.stroke=U),X!==null&&H!==null?R.style.strokeWidth=`${X+(H-X)*ae}`:H!==null&&(R.style.strokeWidth=`${H}`),re!==null&&W!==null?R.style.fillOpacity=`${re+(W-re)*ae}`:W!==null&&(R.style.fillOpacity=`${W}`),N&&R.tagName.toLowerCase()==="path"&&s[d]&&R.setAttribute("d",mt(s[d],N,ae)),d===0&&(ie=ae,w?.(ae),e.style.setProperty("--scroll-draw-progress",String(ae))),fe<1&&(L=!1)});if(B){let R=Math.min(1,Math.max(0,y/o)),d=me(R);for(let V in B){let fe=parseFloat(V);d>=fe&&!Oe.has(fe)&&(Oe.add(fe),B[V]?.())}}return L}function Se(y){if(_)return;let L=y-l;D||(D=!0,P?.());let R=Te(L);if(R&&!k){k=!0,Te(o*(1+Math.max(0,C.length-1)*I)),ne?.(),Ae<(q==="infinite"?1/0:q??0)&&(Ae++,Ie=setTimeout(()=>{l=performance.now(),D=!1,k=!1,Oe.clear(),Ge(),O=requestAnimationFrame(Se)},ke));return}R||(O=requestAnimationFrame(Se))}function de(){cancelAnimationFrame(O),clearTimeout(Ie),l=performance.now(),h=0,_=!1,D=!1,k=!1,Ae=0,Q=!0,ie=0,Oe.clear(),Ge(),O=requestAnimationFrame(Se)}let v=new IntersectionObserver(y=>{y.forEach(L=>{L.isIntersecting&&!(J&&k)?de():!L.isIntersecting&&!J&&!k&&(cancelAnimationFrame(O),clearTimeout(Ie),Q=!1)})},{root:ce??null,threshold:ge,rootMargin:Y}),M;function Z(){clearTimeout(M),M=setTimeout(()=>{C.forEach((y,L)=>{A[L]=Ve(y),y.style.strokeDasharray=`${A[L]}`})},150)}return window.addEventListener("resize",Z),window.addEventListener("orientationchange",Z),E>0?setTimeout(()=>v.observe(e),E):v.observe(e),{destroy(){cancelAnimationFrame(O),clearTimeout(Ie),v.disconnect(),window.removeEventListener("resize",Z),window.removeEventListener("orientationchange",Z),clearTimeout(M)},replay(){Ae=0,de()},pause(){_||!Q||(_=!0,h=performance.now()-l,cancelAnimationFrame(O))},resume(){_&&(_=!1,Q=!0,l=performance.now()-h,O=requestAnimationFrame(Se))},seek(y){let L=Math.min(1,Math.max(0,y));ie=L,_=!0,h=L*o,l=performance.now()-h,cancelAnimationFrame(O),Te(h)},getProgress(){return ie},refresh(){clearTimeout(M),C.forEach((y,L)=>{A[L]=Ve(y),y.style.strokeDasharray=`${A[L]}`})}}}if(Le)return st(Yt());St();function je(){if(!pe||_)return;let o=performance.now(),l=ot();if(!Re&&ee===!1&&l===ht){O=requestAnimationFrame(je);return}Re=!1,ht=l;let h=m;if(ee!==!1){let v=o-bt,M=v>0?Math.abs(l-(Be<0?l:Be))/v:0;h=m*Math.max(.2,1+M*(typeof ee=="number"?ee:1)*.04)}Be=l,bt=o;let Q=g?G===-1||l>=G?"forward":"reverse":T;G=l;let Te=oe-u,Se=!0,de=Te===0?0:(l-u)/Te;if(isNaN(_e)||(_e<=0&&de>0?he?.():_e>0&&de<=0&&xe?.(),_e<1&&de>=1?Ne?.():_e>=1&&de<1&&be?.()),_e=de,te){let v=me(le(l,u,oe,h));J&&!g&&(se=Math.max(se,v),v=se),ie=v,e.style.setProperty("--scroll-draw-progress",String(v));let M=Q==="reverse"?1-v:v;e.style.clipPath=ve(M),w?.(v),!D&&le(l,u,oe,h)>0&&(D=!0,P?.()),v>=1&&!k?(k=!0,ne?.(),Ae<(q==="infinite"?1/0:q??0)&&(Ae++,Ie=setTimeout(()=>{se=-1,D=!1,k=!1,e.style.clipPath=ve(0)},ke))):v<1&&!J&&(k=!1),O=requestAnimationFrame(je);return}if(C.forEach((v,M)=>{let Z=M*I*Te,y=me(le(l,u+Z,oe+Z,h));J&&!g&&(se=Math.max(se,y),y=se),ie=y,v.style.strokeDashoffset=Q==="reverse"?`${A[M]*y}`:`${A[M]*(1-y)}`,c&&(v.style.opacity=Q==="reverse"?`${1-y}`:`${y}`),ue&&U?v.style.stroke=ze(ue,U,y):U&&(v.style.stroke=U),X!==null&&H!==null?v.style.strokeWidth=`${X+(H-X)*y}`:H!==null&&(v.style.strokeWidth=`${H}`),re!==null&&W!==null?v.style.fillOpacity=`${re+(W-re)*y}`:W!==null&&(v.style.fillOpacity=`${W}`),N&&v.tagName.toLowerCase()==="path"&&s[M]&&v.setAttribute("d",mt(s[M],N,y)),M===0&&(w?.(y),e.style.setProperty("--scroll-draw-progress",String(y))),y<1&&(Se=!1)}),B){let v=me(le(l,u,oe,h));for(let M in B){let Z=parseFloat(M);v>=Z&&!Oe.has(Z)&&(Oe.add(Z),B[M]?.())}}!D&&le(l,u,oe,h)>0&&(D=!0,P?.()),Se&&!k?(k=!0,ne?.(),Ae<(q==="infinite"?1/0:q??0)&&(Ae++,Ie=setTimeout(()=>{se=-1,D=!1,k=!1,Oe.clear(),Ge(),Re=!0},ke))):!Se&&!J&&(k=!1),O=requestAnimationFrame(je)}let it=!1;function Ye(){it||(it=!0,O=requestAnimationFrame(function(){je()}))}function Ue(){it=!1,cancelAnimationFrame(O)}let at=new IntersectionObserver(o=>{o.forEach(l=>{pe=l.isIntersecting,pe&&!_?(Re=!0,Ye()):Ue()})},{root:ce??null,threshold:ge,rootMargin:Y});function xt(){C.forEach((o,l)=>{A[l]=Ve(o),o.style.strokeDasharray=`${A[l]}`}),St(),Re=!0}let Xe;function qe(){clearTimeout(Xe),Xe=setTimeout(xt,150)}window.addEventListener("resize",qe),window.addEventListener("orientationchange",qe);let We;return typeof ResizeObserver<"u"&&(We=new ResizeObserver(()=>qe()),We.observe(document.body),We.observe(document.documentElement),We.observe(e)),E>0?setTimeout(()=>at.observe(e),E):at.observe(e),st({destroy(){cancelAnimationFrame(O),clearTimeout(Ie),Ue(),at.disconnect(),We?.disconnect(),window.removeEventListener("resize",qe),window.removeEventListener("orientationchange",qe),clearTimeout(Xe),yt()},replay(){se=-1,G=-1,Be=-1,D=!1,k=!1,Ae=0,_=!1,ie=0,Oe.clear(),clearTimeout(Ie),Ge(),Re=!0,pe&&Ye()},pause(){_=!0,Ue()},resume(){_&&(_=!1,Re=!0,pe&&Ye())},seek(o){let l=Math.min(1,Math.max(0,o));ie=l,se=l,_=!0,Ue(),Bt(l,T),Re=!0},getProgress(){return ie},refresh(){clearTimeout(Xe),xt(),pe&&!_&&Ye()}},()=>({tStart:u,tEnd:oe}))}function Ft(e,t){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let n=typeof e=="string"?document.querySelector(e):e;return n?Je(n,t):(j("Container not found:",e),r)}function cr(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Nt(e){let t=[],r=/([\w]+)\(([^)]*)\)/g,n;for(;(n=r.exec(e))!==null;){let i=[],a=[],f=n[2].trim();if(f)for(let m of f.split(/[\s,]+/)){let c=m.match(/^([-+]?[\d.eE]+)(.*)$/);i.push(c?parseFloat(c[1]):0),a.push(c?c[2]:"")}t.push({fn:n[1],nums:i,units:a})}return t}function ur(e,t,r){let n=Nt(e),i=Nt(t);return n.length===0||n.length!==i.length?r<1?e:t:n.map((a,f)=>{let m=i[f];return a.fn!==m.fn||a.nums.length!==m.nums.length?r<1?`${a.fn}(${a.nums.map((c,p)=>`${c}${a.units[p]}`).join(", ")})`:`${m.fn}(${m.nums.map((c,p)=>`${c}${m.units[p]}`).join(", ")})`:`${a.fn}(${a.nums.map((c,p)=>`${c+(m.nums[p]-c)*r}${a.units[p]}`).join(", ")})`}).join(" ")}function Ht(e,t,r){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*r);let n=String(e),i=String(t);if(cr(n))return ze(n,i,r);if(n.includes("("))return ur(n,i,r);let a=n.match(/^([-+]?[\d.]+)(.*)$/),f=i.match(/^([-+]?[\d.]+)(.*)$/);if(a&&f){let m=parseFloat(a[1]),c=parseFloat(f[1]);return`${m+(c-m)*r}${a[2]||f[2]}`}return r<1?n:i}function mr(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var fr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),pr=0,_t="--scroll-draw-progress";function dr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function pt(e,t){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:n,trigger:i={},easing:a="ease-out",speed:f=1,once:m=!1,axis:c="y",scrollContainer:p,native:x=!0,velocityScale:I=!1,respectReducedMotion:T=!0,triggerElement:J,onProgress:Ee,onComplete:S,onEnter:$,onLeave:g,onEnterBack:E,onLeaveBack:b}=t,z=T&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,F=typeof a=="function"?a:K[a]??K["ease-out"],B=$e(i.start??"top bottom"),ee=$e(i.end??"bottom top"),ge=J??e,Y=typeof p=="string"?document.querySelector(p):p??null,q=Object.entries(n).map(([s,u])=>({prop:mr(s),from:Array.isArray(u)?u[0]:"",to:Array.isArray(u)?u[1]:u}));function ke(){let s=window.getComputedStyle(e);for(let u of q)u.from===""&&(u.from=s.getPropertyValue(u.prop).trim()||"0")}function N(){for(let s of q)e.style.setProperty(s.prop,String(s.to))}let ye=new Map;for(let s of[...q.map(u=>u.prop),_t])ye.set(s,e.style.getPropertyValue(s));function Le(){for(let[s,u]of ye)u?e.style.setProperty(s,u):e.style.removeProperty(s)}if(z)return N(),S?.(),{...r,destroy:Le,getProgress:()=>1};ke();let Ce=typeof a=="string"?Ke(a):null;function De(){if(!x||!dr()||!Ce||c!=="y"||Y||ge!==e||m||f!==1||Ee||S||$||g||E||b||I!==!1||(i.start??"top bottom").trim()!=="top bottom"||(i.end??"bottom top").trim()!=="bottom top")return!1;for(let s of q)if(!fr.has(s.prop))return!1;return!0}function w(){let s=`ssd-a-${++pr}`,u=q.map(G=>`${G.prop}:${G.from}`).join(";"),oe=q.map(G=>`${G.prop}:${G.to}`).join(";"),k=document.createElement("style");k.setAttribute("data-ssd-animate",""),k.textContent=`@keyframes ${s}{from{${u}}to{${oe}}}.${s}{animation-name:${s};animation-duration:auto;animation-timing-function:${Ce};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(k),e.classList.add(s);let D=()=>c==="x"?window.scrollX:window.scrollY,O=()=>c==="x"?window.innerWidth:window.innerHeight,pe=()=>{let G=e.getBoundingClientRect();return Fe({top:G.top,height:G.height},D(),O(),B,ee)};Me(e,{type:"animate",getProgress:()=>se.getProgress(),getTrigger:pe});let se={destroy(){e.classList.remove(s),k.remove(),e.style.animationPlayState="",Le(),Pe(e)},replay(){e.classList.remove(s),e.offsetWidth,e.classList.add(s)},pause(){e.style.animationPlayState="paused"},resume(){e.style.animationPlayState=""},seek(G){let _=Math.min(1,Math.max(0,G));e.classList.remove(s);for(let ie of q)e.style.setProperty(ie.prop,Ht(ie.from,ie.to,_))},getProgress(){let{tStart:G,tEnd:_}=pe();return F(le(D(),G,_,f))}};return se}if(De())return w();let P=0,ne=0,he=0,Ne=!1,be=!1,xe=-1,te=0,me=!1,we=NaN,He=-1,ce=0,ue=()=>Y?c==="x"?Y.scrollLeft:Y.scrollTop:c==="x"?window.scrollX:window.scrollY,U=()=>Y?c==="x"?Y.clientWidth:Y.clientHeight:c==="x"?window.innerWidth:window.innerHeight;function X(){let s=Qe(ge,Y,c),u=Fe(s,s.scroll,U(),B,ee);P=u.tStart,ne=u.tEnd}function H(s){e.style.setProperty(_t,String(s));for(let u of q)e.style.setProperty(u.prop,Ht(u.from,u.to,s));Ee?.(s)}function re(s){if(isNaN(we)){we=s;return}we<=0&&s>0?$?.():we>0&&s<=0&&b?.(),we<1&&s>=1?g?.():we>=1&&s<1&&E?.(),we=s}function W(){if(!Ne||be)return;let s=performance.now(),u=ue(),oe=f;if(I!==!1){let O=s-ce,pe=O>0?Math.abs(u-(He<0?u:He))/O:0;oe=f*Math.max(.2,1+pe*(typeof I=="number"?I:1)*.04)}He=u,ce=s;let k=ne===P?0:(u-P)/(ne-P);re(k);let D=F(le(u,P,ne,oe));m&&(xe=Math.max(xe,D),D=xe),te=D,H(D),D>=1&&!me?(me=!0,S?.()):D<1&&!m&&(me=!1),he=requestAnimationFrame(W)}X(),ne===P&&j("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 s=F(le(ue(),P,ne,f));m&&s>0&&(xe=s),te=s,H(s)}let ve=new IntersectionObserver(s=>{s.forEach(u=>{Ne=u.isIntersecting,Ne&&!be?he=requestAnimationFrame(W):cancelAnimationFrame(he)})},{root:Y??null}),C;function A(){clearTimeout(C),C=setTimeout(X,150)}return window.addEventListener("resize",A),window.addEventListener("orientationchange",A),ve.observe(e),Me(e,{type:"animate",getProgress:()=>te,getTrigger:()=>({tStart:P,tEnd:ne})}),{destroy(){cancelAnimationFrame(he),ve.disconnect(),window.removeEventListener("resize",A),window.removeEventListener("orientationchange",A),clearTimeout(C),Le(),Pe(e)},replay(){xe=-1,me=!1,te=0,be=!1,H(0)},pause(){be=!0,cancelAnimationFrame(he)},resume(){be&&(be=!1,Ne&&(he=requestAnimationFrame(W)))},seek(s){let u=Math.min(1,Math.max(0,s));te=u,xe=u,be=!0,cancelAnimationFrame(he),H(u)},getProgress(){return te}}}var et={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Vt(e,t){if(typeof window>"u")return et;let r=typeof e=="string"?document.querySelector(e):e;return r?pt(r,t):(j("scrollAnimate: element not found:",e),et)}function zt(e,t={}){if(typeof window>"u")return et;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return j("scrollParallax: element not found:",e),et;let{speed:n=.3,axis:i="y",easing:a="linear",trigger:f,onProgress:m}=t,c=r.getBoundingClientRect(),p=i==="x"?c.width:c.height,x=n*p;return pt(r,{props:i==="x"?{transform:["translateX(0px)",`translateX(${-x}px)`]}:{transform:["translateY(0px)",`translateY(${-x}px)`]},trigger:f??{start:"top bottom",end:"bottom top"},easing:a,native:!1,onProgress:m})}var dt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function qt(e,t){if(typeof window>"u")return dt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return j("scrollCounter: element not found:",e),dt;let n=r,{from:i=0,to:a,format:f,easing:m="ease-out",trigger:c={},once:p=!0,decimals:x,onComplete:I}=t,T=x!==void 0?w=>w.toFixed(x):f??(w=>String(Math.round(w))),J=typeof m=="function"?m:K[m]??K["ease-out"],Ee=$e(c.start??"top 80%"),S=$e(c.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return n.textContent=T(a),I?.(),dt;let g=0,E=0,b=0,z=!1,F=!1,B=-1,ee=0,ge=!1,Y=()=>window.scrollY,q=()=>window.innerHeight;function ke(){let w=n.getBoundingClientRect(),P=Fe({top:w.top,height:w.height},Y(),q(),Ee,S);g=P.tStart,E=P.tEnd}function N(w){n.textContent=T(i+(a-i)*w),n.style.setProperty("--scroll-draw-progress",String(w))}function ye(){if(!z||F)return;let w=J(le(Y(),g,E,1));p&&(B=Math.max(B,w),w=B),ee=w,N(w),w>=1&&!ge?(ge=!0,I?.()):w<1&&!p&&(ge=!1),b=requestAnimationFrame(ye)}ke();{let w=J(le(Y(),g,E,1));p&&w>0&&(B=w),ee=w,N(w)}let Le=new IntersectionObserver(w=>{w.forEach(P=>{z=P.isIntersecting,z&&!F?b=requestAnimationFrame(ye):cancelAnimationFrame(b)})}),Ce;function De(){clearTimeout(Ce),Ce=setTimeout(ke,150)}return window.addEventListener("resize",De),window.addEventListener("orientationchange",De),Le.observe(n),Me(n,{type:"counter",getProgress:()=>ee,getTrigger:()=>({tStart:g,tEnd:E})}),{destroy(){cancelAnimationFrame(b),Le.disconnect(),window.removeEventListener("resize",De),window.removeEventListener("orientationchange",De),clearTimeout(Ce),Pe(n)},replay(){B=-1,ge=!1,ee=0,F=!1,N(0)},pause(){F=!0,cancelAnimationFrame(b)},resume(){F&&(F=!1,z&&(b=requestAnimationFrame(ye)))},seek(w){let P=Math.min(1,Math.max(0,w));ee=P,B=P,F=!0,cancelAnimationFrame(b),N(P)},getProgress(){return ee}}}var Wt="http://www.w3.org/2000/svg",gr="cinematic-photo",gt=e=>e<0?0:e>1?1:e;function tt(e){let t=parseFloat(e);return Number.isFinite(t)?gt(t/100):0}function yr(e){return K[e]??K.linear}var hr={destroy:()=>{},getProgress:()=>0},rt=class{constructor(t){if(typeof document>"u"){this.mount=null;return}this.mount=typeof t.wrapper=="string"?document.querySelector(t.wrapper):t.wrapper,this.mount||j("Cinematic: wrapper not found:",t.wrapper)}loadStory(t){let r=this.mount;if(typeof window>"u"||!r)return hr;r.style.position="relative",r.style.height=t.totalHeight,r.style.display="block";let n=document.createElement("div");n.setAttribute("data-cinematic-stage",""),n.style.cssText="position:sticky;top:0;height:100vh;width:100%;overflow:hidden;display:block;",r.appendChild(n);let i=[];for(let S of t.scenes){if(S.background){let g=document.createElement("img");g.id=gr,g.src=S.background,g.alt="",g.style.cssText="position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;pointer-events:none;",n.appendChild(g)}let $=S.animations.filter(g=>g.type==="draw");if($.length){let g=document.createElementNS(Wt,"svg");g.setAttribute("viewBox",`0 0 ${t.canvas.width} ${t.canvas.height}`),g.setAttribute("preserveAspectRatio","xMidYMid meet"),g.style.cssText="position:absolute;inset:0;width:100%;height:100%;overflow:visible;",n.appendChild(g);for(let E of $){let b=document.createElementNS(Wt,"path");b.id=E.target.replace(/^#/,""),b.setAttribute("d",E.d),b.setAttribute("fill","none"),b.setAttribute("stroke",E.stroke),b.setAttribute("stroke-width",String(E.strokeWidth)),b.setAttribute("stroke-linecap","round"),b.setAttribute("stroke-linejoin","round");let z=E.length||b.getTotalLength?.()||0;b.style.strokeDasharray=String(z),b.style.strokeDashoffset=String(z),g.appendChild(b),i.push({kind:"draw",el:b,start:tt(E.start),end:tt(E.end),ease:yr(E.easing),length:z})}}for(let g of S.animations){if(g.type!=="fade")continue;let E=n.querySelector(g.target)??document.querySelector(g.target);E&&(E.style.opacity=String(g.from),i.push({kind:"fade",el:E,start:tt(g.start),end:tt(g.end),ease:K["ease-in-out"]??K.linear,from:g.from,to:g.to}))}}let a=0,f=()=>{let S=r.offsetHeight-window.innerHeight;return S<=0?r.getBoundingClientRect().top<=0?1:0:gt(-r.getBoundingClientRect().top/S)},m=S=>{for(let $ of i){let g=$.end-$.start,E=g<=0?S>=$.end?1:0:gt((S-$.start)/g),b=$.ease(E);$.kind==="draw"?$.el.style.strokeDashoffset=String($.length*(1-b)):$.el.style.opacity=String($.from+($.to-$.from)*b)}};if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return m(1),{destroy:()=>{},getProgress:()=>1};let c=0,p=!1,x=!1,I=()=>{a=f(),m(a),p&&(c=requestAnimationFrame(I))},T=()=>{p||(p=!0,c=requestAnimationFrame(I))},J=()=>{p=!1,cancelAnimationFrame(c)},Ee=new IntersectionObserver(S=>{for(let $ of S)x=$.isIntersecting,x?T():J()},{threshold:0});return Ee.observe(n),a=f(),m(a),Me(r,{type:"draw",getProgress:()=>a,getTrigger:()=>{let S=r.getBoundingClientRect().top+window.scrollY;return{tStart:S,tEnd:S+Math.max(0,r.offsetHeight-window.innerHeight)}}}),{destroy(){J(),Ee.disconnect(),Pe(r)},getProgress:()=>a}}};if(typeof HTMLElement<"u"&&typeof customElements<"u"&&!customElements.get("scroll-draw")){class e extends HTMLElement{constructor(){super(...arguments);this.instance=null}connectedCallback(){let n={},i=this.getAttribute("speed"),a=this.getAttribute("easing"),f=this.getAttribute("stagger"),m=this.getAttribute("direction"),c=this.getAttribute("selector");i&&(n.speed=parseFloat(i)),a&&(n.easing=a),f&&(n.stagger=parseFloat(f)),m&&(n.direction=m),c&&(n.selector=c),this.hasAttribute("fade")&&(n.fade=this.getAttribute("fade")!=="false"),this.hasAttribute("once")&&(n.once=this.getAttribute("once")!=="false"),this.instance=Je(this,n)}disconnectedCallback(){this.instance?.destroy(),this.instance=null}}customElements.define("scroll-draw",e)}return Jt(br);})();
3
+ <div style="position:absolute;${c?`left:${m}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${m}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`}return document.body.appendChild(n),window.addEventListener("scroll",i,{passive:!0}),i(),{el:n,destroy(){window.removeEventListener("scroll",i),n.remove()}}}var Rt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Ft=/[MmLlHhVvCcSsQqTtAaZz]/g;function cr(e,t,r){if(!!1)return;let n=(e.match(Ft)??[]).join("").toUpperCase(),i=(t.match(Ft)??[]).join("").toUpperCase(),a=(e.match(Rt)??[]).length,f=(t.match(Rt)??[]).length;if(n!==i){j(`morphTo: command sequence differs (${n||"\u2205"} \u2192 ${i||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,r);return}a!==f&&j(`morphTo: coordinate count differs (${a} \u2192 ${f}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r)}function ft(e,t,r){let n=(t.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),i=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,a=>{let f=parseFloat(a),m=n[i++]??f;return String(+(f+(m-f)*r).toFixed(4))})}function et(e,t={}){if(typeof window>"u")return{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...n}=t,i=r?{...Ke[r],...n}:n,a=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:f="path, polyline, line, polygon, rect, circle",speed:m=1,fade:c=!1,easing:p="linear",trigger:x={},stagger:I=0,direction:T="forward",once:J=!1,debug:Ee=!1,axis:S="y",scrollContainer:$,autoReverse:g=!1,delay:E=0,strokeColor:b,strokeWidth:z,fillOpacity:F,waypoints:G,velocityScale:ee=!1,threshold:de=0,rootMargin:Y="0px",repeat:q=0,repeatDelay:ke=0,morphTo:N,clip:ge,autoplay:Le=!1,duration:Ce=1e3,native:De=!0,onProgress:w,onStart:P,onComplete:ne,onEnter:ye,onLeave:He,onEnterBack:he,onLeaveBack:xe}=i,te=ge===!0?"left":typeof ge=="string"?ge:!1,ce=typeof p=="function"?p:K[p]??K.linear,be=$e(x.start??"top bottom"),_e=$e(x.end??"bottom top"),ae=typeof $=="string"?document.querySelector($):$??null,le=Array.isArray(b)?b[0]:null,U=Array.isArray(b)?b[1]:typeof b=="string"?b:null,X=Array.isArray(z)?z[0]:null,H=Array.isArray(z)?z[1]:typeof z=="number"?z:null,re=Array.isArray(F)?F[0]:null,W=Array.isArray(F)?F[1]:typeof F=="number"?F:null;function we(o){let l=o*100;switch(te){case"right":return`inset(0 0 0 ${100-l}%)`;case"top":return`inset(0 0 ${100-l}% 0)`;case"bottom":return`inset(${100-l}% 0 0 0)`;case"center":return`circle(${o*150}% at 50% 50%)`;default:return`inset(0 ${100-l}% 0 0)`}}let C=te?[]:Array.from(e.querySelectorAll(f)),A=[],s=[],u=0,oe=0,k=!1,D=!1,O=0,fe=!1,ue=-1,B=[],Ie=-1,_=!1,ve=0,Ae=0,Oe,ot=null;function ht(){ot?.destroy(),ot=null}let Re=new Set,bt=NaN,Fe=!0,Ge=-1,wt=performance.now(),Ve=NaN;function st(){return ae?S==="x"?ae.scrollLeft:ae.scrollTop:S==="x"?window.scrollX:window.scrollY}function vt(){return ae?S==="x"?ae.clientWidth:ae.clientHeight:S==="x"?window.innerWidth:window.innerHeight}function St(){let o=Ze(e,ae,S);return Ne(o,o.scroll,vt(),be,_e)}function Et(){({tStart:u,tEnd:oe}=St()),Ee&&!1&&(ht(),ot=lr(u,oe,S))}function it(o,l=St){Me(e,{type:"draw",getProgress:()=>o.getProgress(),getTrigger:l});let h=o.destroy;return o.destroy=()=>{h.call(o),Pe(e)},o}function Gt(o,l){if(e.style.setProperty("--scroll-draw-progress",String(o)),te){let h=l==="reverse"?1-o:o;e.style.clipPath=we(h);return}C.forEach((h,Q)=>{h.style.strokeDashoffset=l==="reverse"?`${A[Q]*o}`:`${A[Q]*(1-o)}`,c&&(h.style.opacity=l==="reverse"?`${1-o}`:`${o}`),le&&U?h.style.stroke=qe(le,U,o):U&&(h.style.stroke=U),X!==null&&H!==null?h.style.strokeWidth=`${X+(H-X)*o}`:H!==null&&(h.style.strokeWidth=`${H}`),re!==null&&W!==null?h.style.fillOpacity=`${re+(W-re)*o}`:W!==null&&(h.style.fillOpacity=`${W}`),N&&h.tagName.toLowerCase()==="path"&&s[Q]&&h.setAttribute("d",ft(s[Q],N,o))})}function je(){if(e.style.setProperty("--scroll-draw-progress","0"),te){e.style.clipPath=we(0);return}C.forEach((o,l)=>{o.style.strokeDasharray=`${A[l]}`,o.style.strokeDashoffset=T==="reverse"?"0":`${A[l]}`,c?o.style.opacity=T==="reverse"?"1":"0":o.style.opacity="",le&&(o.style.stroke=le),X!==null&&(o.style.strokeWidth=`${X}`),re!==null&&(o.style.fillOpacity=`${re}`),N&&o.tagName.toLowerCase()==="path"&&s[l]&&o.setAttribute("d",s[l])})}if(C.forEach(o=>{ar(o);let l=ze(o);A.push(l);let h=o.tagName.toLowerCase()==="path";h?s.push(o.getAttribute("d")??""):s.push(""),N&&(h?cr(s[s.length-1],N,o):j(`morphTo only applies to <path> elements \u2014 ignored on <${o.tagName}>.`,o)),a?(o.style.strokeDasharray=`${l}`,o.style.strokeDashoffset=T==="reverse"?`${l}`:"0",c&&(o.style.opacity="1"),U&&(o.style.stroke=U),H!==null&&(o.style.strokeWidth=`${H}`),W!==null&&(o.style.fillOpacity=`${W}`),N&&o.tagName.toLowerCase()==="path"&&o.setAttribute("d",N)):(o.style.strokeDasharray=`${l}`,o.style.strokeDashoffset=T==="reverse"?"0":`${l}`,c?o.style.opacity=T==="reverse"?"1":"0":o.style.opacity="",le&&(o.style.stroke=le),X!==null&&(o.style.strokeWidth=`${X}`),re!==null&&(o.style.fillOpacity=`${re}`))}),te){if(a)return e.style.clipPath=we(1),ne?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=we(0)}else if(a)return ne?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let xt=typeof p=="string"?Je(p):null;function jt(){return!(De===!1||!ir()||!C.length||!xt||te||S!=="y"||ae||m!==1||I!==0||J||g||ee!==!1||N||G||q||E>0||w||P||ne||ye||He||he||xe||b!=null||z!=null||F!=null||(x.start??"top bottom").trim()!=="top bottom"||(x.end??"bottom top").trim()!=="bottom top")}function Yt(){let o=++sr,l=`svg-scroll-draw-${o}`,h=`svg-scroll-draw-host-${o}`,Q=`--svg-scroll-draw-${o}`,Te=T==="reverse"?"0":"var(--ssd-len)",Se=T==="reverse"?"var(--ssd-len)":"0",pe=`stroke-dashoffset:${Te};`,v=`stroke-dashoffset:${Se};`;c&&(pe+=`opacity:${T==="reverse"?1:0};`,v+=`opacity:${T==="reverse"?0:1};`);let M=document.createElement("style");M.setAttribute("data-svg-scroll-draw",""),M.textContent=`@keyframes ${l}{from{${pe}}to{${v}}}.${h}{view-timeline-name:${Q};view-timeline-axis:block;}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${xt};animation-fill-mode:both;animation-timeline:${Q};animation-range:cover 0% cover 100%;}`,document.head.appendChild(M),e.classList.add(h);function Z(d,V){d.style.setProperty("--ssd-len",String(A[V])),d.style.strokeDasharray=`${A[V]}`,d.style.strokeDashoffset="",d.style.opacity="",d.style.animationPlayState="",d.classList.add(l)}C.forEach(Z);let y=!1,L=-1;function R(){if(L>=0)return L;let d=e.getBoundingClientRect(),{tStart:V,tEnd:me}=Ne({top:d.top,height:d.height},st(),vt(),be,_e);return ce(ie(st(),V,me,m))}return{destroy(){e.classList.remove(h),C.forEach(d=>{d.classList.remove(l),d.style.removeProperty("--ssd-len"),d.style.animationPlayState=""}),M.remove()},replay(){y=!1,L=-1,C.forEach(Z)},pause(){y=!0,C.forEach(d=>{d.style.animationPlayState="paused"})},resume(){y&&(y=!1,C.forEach(d=>{d.style.animationPlayState="running"}))},seek(d){let V=Math.min(1,Math.max(0,d));L=V,y=!0,C.forEach((me,se)=>{me.classList.remove(l),me.style.strokeDashoffset=T==="reverse"?`${A[se]*V}`:`${A[se]*(1-V)}`,c&&(me.style.opacity=T==="reverse"?`${1-V}`:`${V}`)})},getProgress(){return R()},refresh(){C.forEach((d,V)=>{A[V]=ze(d),d.style.setProperty("--ssd-len",String(A[V])),d.style.strokeDasharray=`${A[V]}`})}}}if(jt())return it(Yt());function Ut(){let o=Math.max(1,Ce),l=0,h=0,Q=!1;function Te(y){let L=!0;if(te){let R=Math.min(1,Math.max(0,y/o)),d=ce(R);ve=d,e.style.setProperty("--scroll-draw-progress",String(d)),e.style.clipPath=we(T==="reverse"?1-d:d),w?.(d),R<1&&(L=!1)}else C.forEach((R,d)=>{let V=d*I*o,me=Math.min(1,Math.max(0,(y-V)/o)),se=ce(me);R.style.strokeDashoffset=T==="reverse"?`${A[d]*se}`:`${A[d]*(1-se)}`,c&&(R.style.opacity=T==="reverse"?`${1-se}`:`${se}`),le&&U?R.style.stroke=qe(le,U,se):U&&(R.style.stroke=U),X!==null&&H!==null?R.style.strokeWidth=`${X+(H-X)*se}`:H!==null&&(R.style.strokeWidth=`${H}`),re!==null&&W!==null?R.style.fillOpacity=`${re+(W-re)*se}`:W!==null&&(R.style.fillOpacity=`${W}`),N&&R.tagName.toLowerCase()==="path"&&s[d]&&R.setAttribute("d",ft(s[d],N,se)),d===0&&(ve=se,w?.(se),e.style.setProperty("--scroll-draw-progress",String(se))),me<1&&(L=!1)});if(G){let R=Math.min(1,Math.max(0,y/o)),d=ce(R);for(let V in G){let me=parseFloat(V);d>=me&&!Re.has(me)&&(Re.add(me),G[V]?.())}}return L}function Se(y){if(_)return;let L=y-l;D||(D=!0,P?.());let R=Te(L);if(R&&!k){k=!0,Te(o*(1+Math.max(0,C.length-1)*I)),ne?.(),Ae<(q==="infinite"?1/0:q??0)&&(Ae++,Oe=setTimeout(()=>{l=performance.now(),D=!1,k=!1,Re.clear(),je(),O=requestAnimationFrame(Se)},ke));return}R||(O=requestAnimationFrame(Se))}function pe(){cancelAnimationFrame(O),clearTimeout(Oe),l=performance.now(),h=0,_=!1,D=!1,k=!1,Ae=0,Q=!0,ve=0,Re.clear(),je(),O=requestAnimationFrame(Se)}let v=new IntersectionObserver(y=>{y.forEach(L=>{L.isIntersecting&&!(J&&k)?pe():!L.isIntersecting&&!J&&!k&&(cancelAnimationFrame(O),clearTimeout(Oe),Q=!1)})},{root:ae??null,threshold:de,rootMargin:Y}),M;function Z(){clearTimeout(M),M=setTimeout(()=>{C.forEach((y,L)=>{A[L]=ze(y),y.style.strokeDasharray=`${A[L]}`})},150)}return window.addEventListener("resize",Z),window.addEventListener("orientationchange",Z),E>0?setTimeout(()=>v.observe(e),E):v.observe(e),{destroy(){cancelAnimationFrame(O),clearTimeout(Oe),v.disconnect(),window.removeEventListener("resize",Z),window.removeEventListener("orientationchange",Z),clearTimeout(M)},replay(){Ae=0,pe()},pause(){_||!Q||(_=!0,h=performance.now()-l,cancelAnimationFrame(O))},resume(){_&&(_=!1,Q=!0,l=performance.now()-h,O=requestAnimationFrame(Se))},seek(y){let L=Math.min(1,Math.max(0,y));ve=L,_=!0,h=L*o,l=performance.now()-h,cancelAnimationFrame(O),Te(h)},getProgress(){return ve},refresh(){clearTimeout(M),C.forEach((y,L)=>{A[L]=ze(y),y.style.strokeDasharray=`${A[L]}`})}}}if(Le)return it(Ut());Et();function Ye(){if(!fe||_)return;let o=performance.now(),l=st();if(!Fe&&ee===!1&&l===bt){O=requestAnimationFrame(Ye);return}Fe=!1,bt=l;let h=m;if(ee!==!1){let v=o-wt,M=v>0?Math.abs(l-(Ge<0?l:Ge))/v:0;h=m*Math.max(.2,1+M*(typeof ee=="number"?ee:1)*.04)}Ge=l,wt=o;let Q=g?Ie===-1||l>=Ie?"forward":"reverse":T;Ie=l;let Te=oe-u,Se=!0,pe=Te===0?0:(l-u)/Te;if(isNaN(Ve)||(Ve<=0&&pe>0?ye?.():Ve>0&&pe<=0&&xe?.(),Ve<1&&pe>=1?He?.():Ve>=1&&pe<1&&he?.()),Ve=pe,te){let v=ce(ie(l,u,oe,h));J&&!g&&(ue=Math.max(ue,v),v=ue),ve=v,e.style.setProperty("--scroll-draw-progress",String(v));let M=Q==="reverse"?1-v:v;e.style.clipPath=we(M),w?.(v),!D&&ie(l,u,oe,h)>0&&(D=!0,P?.()),v>=1&&!k?(k=!0,ne?.(),Ae<(q==="infinite"?1/0:q??0)&&(Ae++,Oe=setTimeout(()=>{ue=-1,D=!1,k=!1,e.style.clipPath=we(0)},ke))):v<1&&!J&&(k=!1),O=requestAnimationFrame(Ye);return}if(C.forEach((v,M)=>{let Z=M*I*Te,y=ce(ie(l,u+Z,oe+Z,h));J&&!g&&(y=B[M]=Math.max(B[M]??ue,y)),ve=y,v.style.strokeDashoffset=Q==="reverse"?`${A[M]*y}`:`${A[M]*(1-y)}`,c&&(v.style.opacity=Q==="reverse"?`${1-y}`:`${y}`),le&&U?v.style.stroke=qe(le,U,y):U&&(v.style.stroke=U),X!==null&&H!==null?v.style.strokeWidth=`${X+(H-X)*y}`:H!==null&&(v.style.strokeWidth=`${H}`),re!==null&&W!==null?v.style.fillOpacity=`${re+(W-re)*y}`:W!==null&&(v.style.fillOpacity=`${W}`),N&&v.tagName.toLowerCase()==="path"&&s[M]&&v.setAttribute("d",ft(s[M],N,y)),M===0&&(w?.(y),e.style.setProperty("--scroll-draw-progress",String(y))),y<1&&(Se=!1)}),G){let v=ce(ie(l,u,oe,h));for(let M in G){let Z=parseFloat(M);v>=Z&&!Re.has(Z)&&(Re.add(Z),G[M]?.())}}!D&&ie(l,u,oe,h)>0&&(D=!0,P?.()),Se&&!k?(k=!0,ne?.(),Ae<(q==="infinite"?1/0:q??0)&&(Ae++,Oe=setTimeout(()=>{ue=-1,B=[],D=!1,k=!1,Re.clear(),je(),Fe=!0},ke))):!Se&&!J&&(k=!1),O=requestAnimationFrame(Ye)}let at=!1;function Ue(){at||(at=!0,O=requestAnimationFrame(function(){Ye()}))}function Xe(){at=!1,cancelAnimationFrame(O)}let lt=new IntersectionObserver(o=>{o.forEach(l=>{fe=l.isIntersecting,fe&&!_?(Fe=!0,Ue()):Xe()})},{root:ae??null,threshold:de,rootMargin:Y});function At(){C.forEach((o,l)=>{A[l]=ze(o),o.style.strokeDasharray=`${A[l]}`}),Et(),Fe=!0}let Qe;function We(){clearTimeout(Qe),Qe=setTimeout(At,150)}window.addEventListener("resize",We),window.addEventListener("orientationchange",We);let Be;return typeof ResizeObserver<"u"&&(Be=new ResizeObserver(()=>We()),Be.observe(document.body),Be.observe(document.documentElement),Be.observe(e)),E>0?setTimeout(()=>lt.observe(e),E):lt.observe(e),it({destroy(){cancelAnimationFrame(O),clearTimeout(Oe),Xe(),lt.disconnect(),Be?.disconnect(),window.removeEventListener("resize",We),window.removeEventListener("orientationchange",We),clearTimeout(Qe),ht()},replay(){ue=-1,B=[],Ie=-1,Ge=-1,D=!1,k=!1,Ae=0,_=!1,ve=0,Re.clear(),clearTimeout(Oe),je(),Fe=!0,fe&&Ue()},pause(){_=!0,Xe()},resume(){_&&(_=!1,Fe=!0,fe&&Ue())},seek(o){let l=Math.min(1,Math.max(0,o));ve=l,ue=l,B=[],_=!0,Xe(),Gt(l,T),Fe=!0},getProgress(){return ve},refresh(){clearTimeout(Qe),At(),fe&&!_&&Ue()}},()=>({tStart:u,tEnd:oe}))}function Nt(e,t){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let n=typeof e=="string"?document.querySelector(e):e;return n?et(n,t):(j("Container not found:",e),r)}function ur(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Ht(e){let t=[],r=/([\w]+)\(([^)]*)\)/g,n;for(;(n=r.exec(e))!==null;){let i=[],a=[],f=n[2].trim();if(f)for(let m of f.split(/[\s,]+/)){let c=m.match(/^([-+]?[\d.eE]+)(.*)$/);i.push(c?parseFloat(c[1]):0),a.push(c?c[2]:"")}t.push({fn:n[1],nums:i,units:a})}return t}function mr(e,t,r){let n=Ht(e),i=Ht(t);return n.length===0||n.length!==i.length?r<1?e:t:n.map((a,f)=>{let m=i[f];return a.fn!==m.fn||a.nums.length!==m.nums.length?r<1?`${a.fn}(${a.nums.map((c,p)=>`${c}${a.units[p]}`).join(", ")})`:`${m.fn}(${m.nums.map((c,p)=>`${c}${m.units[p]}`).join(", ")})`:`${a.fn}(${a.nums.map((c,p)=>`${c+(m.nums[p]-c)*r}${a.units[p]}`).join(", ")})`}).join(" ")}function _t(e,t,r){if(typeof e=="number"&&typeof t=="number")return String(e+(t-e)*r);let n=String(e),i=String(t);if(ur(n))return qe(n,i,r);if(n.includes("("))return mr(n,i,r);let a=n.match(/^([-+]?[\d.]+)(.*)$/),f=i.match(/^([-+]?[\d.]+)(.*)$/);if(a&&f){let m=parseFloat(a[1]),c=parseFloat(f[1]);return`${m+(c-m)*r}${a[2]||f[2]}`}return r<1?n:i}function fr(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var pr=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),dr=0,Vt="--scroll-draw-progress";function gr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function dt(e,t){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:n,trigger:i={},easing:a="ease-out",speed:f=1,once:m=!1,axis:c="y",scrollContainer:p,native:x=!0,velocityScale:I=!1,respectReducedMotion:T=!0,triggerElement:J,onProgress:Ee,onComplete:S,onEnter:$,onLeave:g,onEnterBack:E,onLeaveBack:b}=t,z=T&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,F=typeof a=="function"?a:K[a]??K["ease-out"],G=$e(i.start??"top bottom"),ee=$e(i.end??"bottom top"),de=J??e,Y=typeof p=="string"?document.querySelector(p):p??null,q=Object.entries(n).map(([s,u])=>({prop:fr(s),from:Array.isArray(u)?u[0]:"",to:Array.isArray(u)?u[1]:u}));function ke(){let s=window.getComputedStyle(e);for(let u of q)u.from===""&&(u.from=s.getPropertyValue(u.prop).trim()||"0")}function N(){for(let s of q)e.style.setProperty(s.prop,String(s.to))}let ge=new Map;for(let s of[...q.map(u=>u.prop),Vt])ge.set(s,e.style.getPropertyValue(s));function Le(){for(let[s,u]of ge)u?e.style.setProperty(s,u):e.style.removeProperty(s)}if(z)return N(),S?.(),{...r,destroy:Le,getProgress:()=>1};ke();let Ce=typeof a=="string"?Je(a):null;function De(){if(!x||!gr()||!Ce||c!=="y"||Y||de!==e||m||f!==1||Ee||S||$||g||E||b||I!==!1||(i.start??"top bottom").trim()!=="top bottom"||(i.end??"bottom top").trim()!=="bottom top")return!1;for(let s of q)if(!pr.has(s.prop))return!1;return!0}function w(){let s=`ssd-a-${++dr}`,u=q.map(B=>`${B.prop}:${B.from}`).join(";"),oe=q.map(B=>`${B.prop}:${B.to}`).join(";"),k=document.createElement("style");k.setAttribute("data-ssd-animate",""),k.textContent=`@keyframes ${s}{from{${u}}to{${oe}}}.${s}{animation-name:${s};animation-duration:auto;animation-timing-function:${Ce};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(k),e.classList.add(s);let D=()=>c==="x"?window.scrollX:window.scrollY,O=()=>c==="x"?window.innerWidth:window.innerHeight,fe=()=>{let B=e.getBoundingClientRect();return Ne({top:B.top,height:B.height},D(),O(),G,ee)};Me(e,{type:"animate",getProgress:()=>ue.getProgress(),getTrigger:fe});let ue={destroy(){e.classList.remove(s),k.remove(),e.style.animationPlayState="",Le(),Pe(e)},replay(){e.classList.remove(s),e.offsetWidth,e.classList.add(s)},pause(){e.style.animationPlayState="paused"},resume(){e.style.animationPlayState=""},seek(B){let Ie=Math.min(1,Math.max(0,B));e.classList.remove(s);for(let _ of q)e.style.setProperty(_.prop,_t(_.from,_.to,Ie))},getProgress(){let{tStart:B,tEnd:Ie}=fe();return F(ie(D(),B,Ie,f))}};return ue}if(De())return w();let P=0,ne=0,ye=0,He=!1,he=!1,xe=-1,te=0,ce=!1,be=NaN,_e=-1,ae=0,le=()=>Y?c==="x"?Y.scrollLeft:Y.scrollTop:c==="x"?window.scrollX:window.scrollY,U=()=>Y?c==="x"?Y.clientWidth:Y.clientHeight:c==="x"?window.innerWidth:window.innerHeight;function X(){let s=Ze(de,Y,c),u=Ne(s,s.scroll,U(),G,ee);P=u.tStart,ne=u.tEnd}function H(s){e.style.setProperty(Vt,String(s));for(let u of q)e.style.setProperty(u.prop,_t(u.from,u.to,s));Ee?.(s)}function re(s){if(isNaN(be)){be=s;return}be<=0&&s>0?$?.():be>0&&s<=0&&b?.(),be<1&&s>=1?g?.():be>=1&&s<1&&E?.(),be=s}function W(){if(!He||he)return;let s=performance.now(),u=le(),oe=f;if(I!==!1){let O=s-ae,fe=O>0?Math.abs(u-(_e<0?u:_e))/O:0;oe=f*Math.max(.2,1+fe*(typeof I=="number"?I:1)*.04)}_e=u,ae=s;let k=ne===P?0:(u-P)/(ne-P);re(k);let D=F(ie(u,P,ne,oe));m&&(xe=Math.max(xe,D),D=xe),te=D,H(D),D>=1&&!ce?(ce=!0,S?.()):D<1&&!m&&(ce=!1),ye=requestAnimationFrame(W)}X(),ne===P&&j("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 s=F(ie(le(),P,ne,f));m&&s>0&&(xe=s),te=s,H(s)}let we=new IntersectionObserver(s=>{s.forEach(u=>{He=u.isIntersecting,He&&!he?ye=requestAnimationFrame(W):cancelAnimationFrame(ye)})},{root:Y??null}),C;function A(){clearTimeout(C),C=setTimeout(X,150)}return window.addEventListener("resize",A),window.addEventListener("orientationchange",A),we.observe(e),Me(e,{type:"animate",getProgress:()=>te,getTrigger:()=>({tStart:P,tEnd:ne})}),{destroy(){cancelAnimationFrame(ye),we.disconnect(),window.removeEventListener("resize",A),window.removeEventListener("orientationchange",A),clearTimeout(C),Le(),Pe(e)},replay(){xe=-1,ce=!1,te=0,he=!1,H(0)},pause(){he=!0,cancelAnimationFrame(ye)},resume(){he&&(he=!1,He&&(ye=requestAnimationFrame(W)))},seek(s){let u=Math.min(1,Math.max(0,s));te=u,xe=u,he=!0,cancelAnimationFrame(ye),H(u)},getProgress(){return te}}}var tt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function zt(e,t){if(typeof window>"u")return tt;let r=typeof e=="string"?document.querySelector(e):e;return r?dt(r,t):(j("scrollAnimate: element not found:",e),tt)}function qt(e,t={}){if(typeof window>"u")return tt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return j("scrollParallax: element not found:",e),tt;let{speed:n=.3,axis:i="y",easing:a="linear",trigger:f,onProgress:m}=t,c=r.getBoundingClientRect(),p=i==="x"?c.width:c.height,x=n*p;return dt(r,{props:i==="x"?{transform:["translateX(0px)",`translateX(${-x}px)`]}:{transform:["translateY(0px)",`translateY(${-x}px)`]},trigger:f??{start:"top bottom",end:"bottom top"},easing:a,native:!1,onProgress:m})}var gt={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Wt(e,t){if(typeof window>"u")return gt;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return j("scrollCounter: element not found:",e),gt;let n=r,{from:i=0,to:a,format:f,easing:m="ease-out",trigger:c={},once:p=!0,decimals:x,onComplete:I}=t,T=x!==void 0?w=>w.toFixed(x):f??(w=>String(Math.round(w))),J=typeof m=="function"?m:K[m]??K["ease-out"],Ee=$e(c.start??"top 80%"),S=$e(c.end??"top 20%");if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return n.textContent=T(a),I?.(),gt;let g=0,E=0,b=0,z=!1,F=!1,G=-1,ee=0,de=!1,Y=()=>window.scrollY,q=()=>window.innerHeight;function ke(){let w=n.getBoundingClientRect(),P=Ne({top:w.top,height:w.height},Y(),q(),Ee,S);g=P.tStart,E=P.tEnd}function N(w){n.textContent=T(i+(a-i)*w),n.style.setProperty("--scroll-draw-progress",String(w))}function ge(){if(!z||F)return;let w=J(ie(Y(),g,E,1));p&&(G=Math.max(G,w),w=G),ee=w,N(w),w>=1&&!de?(de=!0,I?.()):w<1&&!p&&(de=!1),b=requestAnimationFrame(ge)}ke();{let w=J(ie(Y(),g,E,1));p&&w>0&&(G=w),ee=w,N(w)}let Le=new IntersectionObserver(w=>{w.forEach(P=>{z=P.isIntersecting,z&&!F?b=requestAnimationFrame(ge):cancelAnimationFrame(b)})}),Ce;function De(){clearTimeout(Ce),Ce=setTimeout(ke,150)}return window.addEventListener("resize",De),window.addEventListener("orientationchange",De),Le.observe(n),Me(n,{type:"counter",getProgress:()=>ee,getTrigger:()=>({tStart:g,tEnd:E})}),{destroy(){cancelAnimationFrame(b),Le.disconnect(),window.removeEventListener("resize",De),window.removeEventListener("orientationchange",De),clearTimeout(Ce),Pe(n)},replay(){G=-1,de=!1,ee=0,F=!1,N(0)},pause(){F=!0,cancelAnimationFrame(b)},resume(){F&&(F=!1,z&&(b=requestAnimationFrame(ge)))},seek(w){let P=Math.min(1,Math.max(0,w));ee=P,G=P,F=!0,cancelAnimationFrame(b),N(P)},getProgress(){return ee}}}var Bt="http://www.w3.org/2000/svg",yr="cinematic-photo",yt=e=>e<0?0:e>1?1:e;function rt(e){let t=parseFloat(e);return Number.isFinite(t)?yt(t/100):0}function hr(e){return K[e]??K.linear}var br={destroy:()=>{},getProgress:()=>0},nt=class{constructor(t){if(typeof document>"u"){this.mount=null;return}this.mount=typeof t.wrapper=="string"?document.querySelector(t.wrapper):t.wrapper,this.mount||j("Cinematic: wrapper not found:",t.wrapper)}loadStory(t){let r=this.mount;if(typeof window>"u"||!r)return br;r.style.position="relative",r.style.height=t.totalHeight,r.style.display="block";let n=document.createElement("div");n.setAttribute("data-cinematic-stage",""),n.style.cssText="position:sticky;top:0;height:100vh;width:100%;overflow:hidden;display:block;",r.appendChild(n);let i=[];for(let S of t.scenes){if(S.background){let g=document.createElement("img");g.id=yr,g.src=S.background,g.alt="",g.style.cssText="position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;pointer-events:none;",n.appendChild(g)}let $=S.animations.filter(g=>g.type==="draw");if($.length){let g=document.createElementNS(Bt,"svg");g.setAttribute("viewBox",`0 0 ${t.canvas.width} ${t.canvas.height}`),g.setAttribute("preserveAspectRatio","xMidYMid meet"),g.style.cssText="position:absolute;inset:0;width:100%;height:100%;overflow:visible;",n.appendChild(g);for(let E of $){let b=document.createElementNS(Bt,"path");b.id=E.target.replace(/^#/,""),b.setAttribute("d",E.d),b.setAttribute("fill","none"),b.setAttribute("stroke",E.stroke),b.setAttribute("stroke-width",String(E.strokeWidth)),b.setAttribute("stroke-linecap","round"),b.setAttribute("stroke-linejoin","round");let z=E.length||b.getTotalLength?.()||0;b.style.strokeDasharray=String(z),b.style.strokeDashoffset=String(z),g.appendChild(b),i.push({kind:"draw",el:b,start:rt(E.start),end:rt(E.end),ease:hr(E.easing),length:z})}}for(let g of S.animations){if(g.type!=="fade")continue;let E=n.querySelector(g.target)??document.querySelector(g.target);E&&(E.style.opacity=String(g.from),i.push({kind:"fade",el:E,start:rt(g.start),end:rt(g.end),ease:K["ease-in-out"]??K.linear,from:g.from,to:g.to}))}}let a=0,f=()=>{let S=r.offsetHeight-window.innerHeight;return S<=0?r.getBoundingClientRect().top<=0?1:0:yt(-r.getBoundingClientRect().top/S)},m=S=>{for(let $ of i){let g=$.end-$.start,E=g<=0?S>=$.end?1:0:yt((S-$.start)/g),b=$.ease(E);$.kind==="draw"?$.el.style.strokeDashoffset=String($.length*(1-b)):$.el.style.opacity=String($.from+($.to-$.from)*b)}};if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return m(1),{destroy:()=>{},getProgress:()=>1};let c=0,p=!1,x=!1,I=()=>{a=f(),m(a),p&&(c=requestAnimationFrame(I))},T=()=>{p||(p=!0,c=requestAnimationFrame(I))},J=()=>{p=!1,cancelAnimationFrame(c)},Ee=new IntersectionObserver(S=>{for(let $ of S)x=$.isIntersecting,x?T():J()},{threshold:0});return Ee.observe(n),a=f(),m(a),Me(r,{type:"draw",getProgress:()=>a,getTrigger:()=>{let S=r.getBoundingClientRect().top+window.scrollY;return{tStart:S,tEnd:S+Math.max(0,r.offsetHeight-window.innerHeight)}}}),{destroy(){J(),Ee.disconnect(),Pe(r)},getProgress:()=>a}}};if(typeof HTMLElement<"u"&&typeof customElements<"u"&&!customElements.get("scroll-draw")){class e extends HTMLElement{constructor(){super(...arguments);this.instance=null}connectedCallback(){let n={},i=this.getAttribute("speed"),a=this.getAttribute("easing"),f=this.getAttribute("stagger"),m=this.getAttribute("direction"),c=this.getAttribute("selector");i&&(n.speed=parseFloat(i)),a&&(n.easing=a),f&&(n.stagger=parseFloat(f)),m&&(n.direction=m),c&&(n.selector=c),this.hasAttribute("fade")&&(n.fade=this.getAttribute("fade")!=="false"),this.hasAttribute("once")&&(n.once=this.getAttribute("once")!=="false"),this.instance=et(this,n)}disconnectedCallback(){this.instance?.destroy(),this.instance=null}}customElements.define("scroll-draw",e)}return er(wr);})();
@@ -1 +1 @@
1
- import {b}from'./chunk-WDIHLRZZ.mjs';import {b as b$1}from'./chunk-LFSU6LR3.mjs';function l(r,s){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let o=typeof r=="string"?document.querySelector(r):r;return o?b(o,s):(b$1("Container not found:",r),n)}export{l as a};
1
+ import {b}from'./chunk-LINFV2GK.mjs';import {b as b$1}from'./chunk-LFSU6LR3.mjs';function l(r,s){let n={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return n;let o=typeof r=="string"?document.querySelector(r):r;return o?b(o,s):(b$1("Container not found:",r),n)}export{l as a};
@@ -1 +1 @@
1
- import {a,b}from'./chunk-XSVTHCLO.mjs';import {a as a$3}from'./chunk-JC5BD4RB.mjs';import {a as a$4}from'./chunk-SNCRC6BA.mjs';import {a as a$2}from'./chunk-4MH5SQTH.mjs';import {a as a$1}from'./chunk-QJ4H2HW3.mjs';import {b as b$1}from'./chunk-WDIHLRZZ.mjs';import {defineComponent,ref,h,onMounted,watch,onUnmounted,unref}from'vue';var c=e=>typeof e=="function"?e():unref(e);function r(e,t,n){let o=null,a$1=t(),S=()=>{o?.destroy(),o=e.value?n(e.value,b(a$1,()=>a$1)):null;};onMounted(S),watch(()=>a(a$1=t()),S),onUnmounted(()=>{o?.destroy(),o=null;});}function H(e={}){let t=ref(null);return r(t,()=>c(e),b$1),t}var L=defineComponent({name:"ScrollDraw",props:{selector:{type:String},speed:{type:Number},fade:{type:Boolean},stagger:{type:Number},easing:{type:[String,Function]},direction:{type:String},trigger:{type:Object},onProgress:{type:Function},onStart:{type:Function},onComplete:{type:Function},once:{type:Boolean},debug:{type:Boolean}},setup(e,{slots:t}){let n=ref(null);return r(n,()=>{let o={};return e.selector!=null&&(o.selector=e.selector),e.speed!=null&&(o.speed=e.speed),e.fade!=null&&(o.fade=e.fade),e.stagger!=null&&(o.stagger=e.stagger),e.easing!=null&&(o.easing=e.easing),e.direction!=null&&(o.direction=e.direction),e.trigger!=null&&(o.trigger=e.trigger),e.once!=null&&(o.once=e.once),e.debug!=null&&(o.debug=e.debug),e.onProgress!=null&&(o.onProgress=e.onProgress),e.onStart!=null&&(o.onStart=e.onStart),e.onComplete!=null&&(o.onComplete=e.onComplete),o},b$1),()=>h("div",{ref:n},t.default?.())}});function V(e){let t=ref(null);return r(t,()=>c(e),a$1),t}var A=defineComponent({name:"ScrollAnimate",props:{options:{type:Object,required:true}},setup(e,{slots:t}){let n=ref(null);return r(n,()=>e.options,a$1),()=>h("div",{ref:n},t.default?.())}});function F(e){let t=ref(null);return r(t,()=>c(e),a$2),t}var G=defineComponent({name:"ScrollCounter",props:{to:{type:Number,required:true},from:{type:Number},format:{type:Function},easing:{type:[String,Function]},trigger:{type:Object},once:{type:Boolean},decimals:{type:Number},onComplete:{type:Function}},setup(e){let t=ref(null);return r(t,()=>{let n={to:e.to};return e.from!=null&&(n.from=e.from),e.format!=null&&(n.format=e.format),e.easing!=null&&(n.easing=e.easing),e.trigger!=null&&(n.trigger=e.trigger),e.once!=null&&(n.once=e.once),e.decimals!=null&&(n.decimals=e.decimals),e.onComplete!=null&&(n.onComplete=e.onComplete),n},a$2),()=>h("span",{ref:t})}});function j(e={}){let t=ref(null);return r(t,()=>c(e),a$3),t}var B=defineComponent({name:"ScrollVideo",props:{src:{type:String,required:true},options:{type:Object},muted:{type:Boolean,default:true},playsInline:{type:Boolean,default:true},class:{type:String}},setup(e){let t=ref(null);return r(t,()=>e.options??{},a$3),()=>h("video",{ref:t,src:e.src,muted:e.muted,playsinline:e.playsInline,preload:"auto",class:e.class})}});function N(e={}){let t=ref(null);return r(t,()=>c(e),a$4),t}var P=defineComponent({name:"ScrollText",props:{options:{type:Object},tag:{type:String,default:"p"}},setup(e,{slots:t}){let n=ref(null);return r(n,()=>e.options??{},a$4),()=>h(e.tag,{ref:n},t.default?.())}});export{H as a,L as b,V as c,A as d,F as e,G as f,j as g,B as h,N as i,P as j};
1
+ import {a,b}from'./chunk-XSVTHCLO.mjs';import {a as a$3}from'./chunk-JC5BD4RB.mjs';import {a as a$4}from'./chunk-SNCRC6BA.mjs';import {a as a$2}from'./chunk-4MH5SQTH.mjs';import {a as a$1}from'./chunk-QJ4H2HW3.mjs';import {b as b$1}from'./chunk-LINFV2GK.mjs';import {defineComponent,ref,h,onMounted,watch,onUnmounted,unref}from'vue';var c=e=>typeof e=="function"?e():unref(e);function r(e,t,n){let o=null,a$1=t(),S=()=>{o?.destroy(),o=e.value?n(e.value,b(a$1,()=>a$1)):null;};onMounted(S),watch(()=>a(a$1=t()),S),onUnmounted(()=>{o?.destroy(),o=null;});}function H(e={}){let t=ref(null);return r(t,()=>c(e),b$1),t}var L=defineComponent({name:"ScrollDraw",props:{selector:{type:String},speed:{type:Number},fade:{type:Boolean},stagger:{type:Number},easing:{type:[String,Function]},direction:{type:String},trigger:{type:Object},onProgress:{type:Function},onStart:{type:Function},onComplete:{type:Function},once:{type:Boolean},debug:{type:Boolean}},setup(e,{slots:t}){let n=ref(null);return r(n,()=>{let o={};return e.selector!=null&&(o.selector=e.selector),e.speed!=null&&(o.speed=e.speed),e.fade!=null&&(o.fade=e.fade),e.stagger!=null&&(o.stagger=e.stagger),e.easing!=null&&(o.easing=e.easing),e.direction!=null&&(o.direction=e.direction),e.trigger!=null&&(o.trigger=e.trigger),e.once!=null&&(o.once=e.once),e.debug!=null&&(o.debug=e.debug),e.onProgress!=null&&(o.onProgress=e.onProgress),e.onStart!=null&&(o.onStart=e.onStart),e.onComplete!=null&&(o.onComplete=e.onComplete),o},b$1),()=>h("div",{ref:n},t.default?.())}});function V(e){let t=ref(null);return r(t,()=>c(e),a$1),t}var A=defineComponent({name:"ScrollAnimate",props:{options:{type:Object,required:true}},setup(e,{slots:t}){let n=ref(null);return r(n,()=>e.options,a$1),()=>h("div",{ref:n},t.default?.())}});function F(e){let t=ref(null);return r(t,()=>c(e),a$2),t}var G=defineComponent({name:"ScrollCounter",props:{to:{type:Number,required:true},from:{type:Number},format:{type:Function},easing:{type:[String,Function]},trigger:{type:Object},once:{type:Boolean},decimals:{type:Number},onComplete:{type:Function}},setup(e){let t=ref(null);return r(t,()=>{let n={to:e.to};return e.from!=null&&(n.from=e.from),e.format!=null&&(n.format=e.format),e.easing!=null&&(n.easing=e.easing),e.trigger!=null&&(n.trigger=e.trigger),e.once!=null&&(n.once=e.once),e.decimals!=null&&(n.decimals=e.decimals),e.onComplete!=null&&(n.onComplete=e.onComplete),n},a$2),()=>h("span",{ref:t})}});function j(e={}){let t=ref(null);return r(t,()=>c(e),a$3),t}var B=defineComponent({name:"ScrollVideo",props:{src:{type:String,required:true},options:{type:Object},muted:{type:Boolean,default:true},playsInline:{type:Boolean,default:true},class:{type:String}},setup(e){let t=ref(null);return r(t,()=>e.options??{},a$3),()=>h("video",{ref:t,src:e.src,muted:e.muted,playsinline:e.playsInline,preload:"auto",class:e.class})}});function N(e={}){let t=ref(null);return r(t,()=>c(e),a$4),t}var P=defineComponent({name:"ScrollText",props:{options:{type:Object},tag:{type:String,default:"p"}},setup(e,{slots:t}){let n=ref(null);return r(n,()=>e.options??{},a$4),()=>h(e.tag,{ref:n},t.default?.())}});export{H as a,L as b,V as c,A as d,F as e,G as f,j as g,B as h,N as i,P as j};
@@ -0,0 +1,3 @@
1
+ import {b as b$1,a as a$5}from'./chunk-OJFWQ6CU.mjs';import {a as a$2}from'./chunk-YWKPTYSG.mjs';import {a as a$1}from'./chunk-YZV4Z3EQ.mjs';import {a,c,b as b$3}from'./chunk-PEFR3ZB7.mjs';import {d}from'./chunk-DM6EDKWH.mjs';import {a as a$4,b as b$2}from'./chunk-BCV4RAIX.mjs';import {b,a as a$3}from'./chunk-LFSU6LR3.mjs';var ct={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 Tt=0;function kt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function ut(r,b){let p="";try{p=getComputedStyle(r).getPropertyValue(b).trim();}catch{}return p||(r.getAttribute(b)??"").trim()}var mt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function St(r){if(!a$3)return;let b$1=ut(r,"stroke");if(!b$1||b$1==="none"){b("Element has no stroke \u2014 path will not be visible.",r);return}let p=(r.getAttribute("fill")??"").trim();p&&!mt.has(p)&&!mt.has(ut(r,"fill"))&&b("Element has a fill \u2014 it may obscure the stroke animation.",r);}function At(r,b,p){let E=document.createElement("div");E.setAttribute("data-svg-scroll-draw-debug",""),E.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 R(){let D=p==="x"?window.scrollX:window.scrollY,O=r-D,V=b-D,C=p==="x";E.innerHTML=`
2
+ <div style="position:absolute;${C?`left:${O}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${O}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;${C?`left:${V}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${V}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(E),window.addEventListener("scroll",R,{passive:true}),R(),{el:E,destroy(){window.removeEventListener("scroll",R),E.remove();}}}var pt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,dt=/[MmLlHhVvCcSsQqTtAaZz]/g;function xt(r,b$1,p){if(!a$3)return;let E=(r.match(dt)??[]).join("").toUpperCase(),R=(b$1.match(dt)??[]).join("").toUpperCase(),D=(r.match(pt)??[]).length,O=(b$1.match(pt)??[]).length;if(E!==R){b(`morphTo: command sequence differs (${E||"\u2205"} \u2192 ${R||"\u2205"}). Interpolation is coordinate-for-coordinate, so the result will not reach the target shape. Redraw both paths with the same commands.`,p);return}D!==O&&b(`morphTo: coordinate count differs (${D} \u2192 ${O}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,p);}function Ge(r,b,p){let E=(b.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),R=0;return r.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,D=>{let O=parseFloat(D),V=E[R++]??O;return String(+(O+(V-O)*p).toFixed(4))})}function It(r,b$4={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:p,...E}=b$4,R=p?{...ct[p],...E}:E,D=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:O="path, polyline, line, polygon, rect, circle",speed:V=1,fade:C=false,easing:me="linear",trigger:we={},stagger:be=0,direction:d$1="forward",once:Z=false,debug:yt=false,axis:J="y",scrollContainer:Oe,autoReverse:Ee=false,delay:pe=0,strokeColor:K,strokeWidth:ee,fillOpacity:te,waypoints:re,velocityScale:de=false,threshold:Be=0,rootMargin:_e="0px",repeat:se=0,repeatDelay:Ce=0,morphTo:P,clip:Fe,autoplay:ht=false,duration:gt=1e3,native:vt=true,onProgress:ye,onStart:$e,onComplete:ae,onEnter:Ue,onLeave:je,onEnterBack:Xe,onLeaveBack:Ye}=R,U=Fe===true?"left":typeof Fe=="string"?Fe:false,oe=typeof me=="function"?me:d[me]??d.linear,Qe=a(we.start??"top bottom"),Ze=a(we.end??"bottom top"),H=typeof Oe=="string"?document.querySelector(Oe):Oe??null,I=Array.isArray(K)?K[0]:null,$=Array.isArray(K)?K[1]:typeof K=="string"?K:null,A=Array.isArray(ee)?ee[0]:null,T=Array.isArray(ee)?ee[1]:typeof ee=="number"?ee:null,x=Array.isArray(te)?te[0]:null,k=Array.isArray(te)?te[1]:typeof te=="number"?te:null;function ne(e){let t=e*100;switch(U){case "right":return `inset(0 0 0 ${100-t}%)`;case "top":return `inset(0 0 ${100-t}% 0)`;case "bottom":return `inset(${100-t}% 0 0 0)`;case "center":return `circle(${e*150}% at 50% 50%)`;default:return `inset(0 ${100-t}% 0 0)`}}let m=U?[]:Array.from(r.querySelectorAll(O)),l=[],L=[],z=0,G=0,g=false,F=false,v=0,le=false,j=-1,he=[],Te=-1,w=false,W=0,B=0,X,Ne=null;function Je(){Ne?.destroy(),Ne=null;}let Y=new Set,Ke=NaN,Q=true,ke=-1,et=performance.now(),fe=NaN;function Re(){return H?J==="x"?H.scrollLeft:H.scrollTop:J==="x"?window.scrollX:window.scrollY}function tt(){return H?J==="x"?H.clientWidth:H.clientHeight:J==="x"?window.innerWidth:window.innerHeight}function rt(){let e=a$2(r,H,J);return c(e,e.scroll,tt(),Qe,Ze)}function st(){(({tStart:z,tEnd:G}=rt())),yt&&a$3&&(Je(),Ne=At(z,G,J));}function He(e,t=rt){a$4(r,{type:"draw",getProgress:()=>e.getProgress(),getTrigger:t});let n=e.destroy;return e.destroy=()=>{n.call(e),b$2(r);},e}function wt(e,t){if(r.style.setProperty("--scroll-draw-progress",String(e)),U){let n=t==="reverse"?1-e:e;r.style.clipPath=ne(n);return}m.forEach((n,y)=>{n.style.strokeDashoffset=t==="reverse"?`${l[y]*e}`:`${l[y]*(1-e)}`,C&&(n.style.opacity=t==="reverse"?`${1-e}`:`${e}`),I&&$?n.style.stroke=a$5(I,$,e):$&&(n.style.stroke=$),A!==null&&T!==null?n.style.strokeWidth=`${A+(T-A)*e}`:T!==null&&(n.style.strokeWidth=`${T}`),x!==null&&k!==null?n.style.fillOpacity=`${x+(k-x)*e}`:k!==null&&(n.style.fillOpacity=`${k}`),P&&n.tagName.toLowerCase()==="path"&&L[y]&&n.setAttribute("d",Ge(L[y],P,e));});}function Se(){if(r.style.setProperty("--scroll-draw-progress","0"),U){r.style.clipPath=ne(0);return}m.forEach((e,t)=>{e.style.strokeDasharray=`${l[t]}`,e.style.strokeDashoffset=d$1==="reverse"?"0":`${l[t]}`,C?e.style.opacity=d$1==="reverse"?"1":"0":e.style.opacity="",I&&(e.style.stroke=I),A!==null&&(e.style.strokeWidth=`${A}`),x!==null&&(e.style.fillOpacity=`${x}`),P&&e.tagName.toLowerCase()==="path"&&L[t]&&e.setAttribute("d",L[t]);});}if(m.forEach(e=>{St(e);let t=a$1(e);l.push(t);let n=e.tagName.toLowerCase()==="path";n?L.push(e.getAttribute("d")??""):L.push(""),P&&(n?xt(L[L.length-1],P,e):b(`morphTo only applies to <path> elements \u2014 ignored on <${e.tagName}>.`,e)),D?(e.style.strokeDasharray=`${t}`,e.style.strokeDashoffset=d$1==="reverse"?`${t}`:"0",C&&(e.style.opacity="1"),$&&(e.style.stroke=$),T!==null&&(e.style.strokeWidth=`${T}`),k!==null&&(e.style.fillOpacity=`${k}`),P&&e.tagName.toLowerCase()==="path"&&e.setAttribute("d",P)):(e.style.strokeDasharray=`${t}`,e.style.strokeDashoffset=d$1==="reverse"?"0":`${t}`,C?e.style.opacity=d$1==="reverse"?"1":"0":e.style.opacity="",I&&(e.style.stroke=I),A!==null&&(e.style.strokeWidth=`${A}`),x!==null&&(e.style.fillOpacity=`${x}`));}),U){if(D)return r.style.clipPath=ne(1),ae?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};r.style.clipPath=ne(0);}else if(D)return ae?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let ot=typeof me=="string"?b$1(me):null;function bt(){return !(vt===false||!kt()||!m.length||!ot||U||J!=="y"||H||V!==1||be!==0||Z||Ee||de!==false||P||re||se||pe>0||ye||$e||ae||Ue||je||Xe||Ye||K!=null||ee!=null||te!=null||(we.start??"top bottom").trim()!=="top bottom"||(we.end??"bottom top").trim()!=="bottom top")}function Et(){let e=++Tt,t=`svg-scroll-draw-${e}`,n=`svg-scroll-draw-host-${e}`,y=`--svg-scroll-draw-${e}`,_=d$1==="reverse"?"0":"var(--ssd-len)",q=d$1==="reverse"?"var(--ssd-len)":"0",N=`stroke-dashoffset:${_};`,i=`stroke-dashoffset:${q};`;C&&(N+=`opacity:${d$1==="reverse"?1:0};`,i+=`opacity:${d$1==="reverse"?0:1};`);let a=document.createElement("style");a.setAttribute("data-svg-scroll-draw",""),a.textContent=`@keyframes ${t}{from{${N}}to{${i}}}.${n}{view-timeline-name:${y};view-timeline-axis:block;}.${t}{animation-name:${t};animation-duration:auto;animation-timing-function:${ot};animation-fill-mode:both;animation-timeline:${y};animation-range:cover 0% cover 100%;}`,document.head.appendChild(a),r.classList.add(n);function h(s,u){s.style.setProperty("--ssd-len",String(l[u])),s.style.strokeDasharray=`${l[u]}`,s.style.strokeDashoffset="",s.style.opacity="",s.style.animationPlayState="",s.classList.add(t);}m.forEach(h);let o=false,f=-1;function c$1(){if(f>=0)return f;let s=r.getBoundingClientRect(),{tStart:u,tEnd:M}=c({top:s.top,height:s.height},Re(),tt(),Qe,Ze);return oe(b$3(Re(),u,M,V))}return {destroy(){r.classList.remove(n),m.forEach(s=>{s.classList.remove(t),s.style.removeProperty("--ssd-len"),s.style.animationPlayState="";}),a.remove();},replay(){o=false,f=-1,m.forEach(h);},pause(){o=true,m.forEach(s=>{s.style.animationPlayState="paused";});},resume(){o&&(o=false,m.forEach(s=>{s.style.animationPlayState="running";}));},seek(s){let u=Math.min(1,Math.max(0,s));f=u,o=true,m.forEach((M,S)=>{M.classList.remove(t),M.style.strokeDashoffset=d$1==="reverse"?`${l[S]*u}`:`${l[S]*(1-u)}`,C&&(M.style.opacity=d$1==="reverse"?`${1-u}`:`${u}`);});},getProgress(){return c$1()},refresh(){m.forEach((s,u)=>{l[u]=a$1(s),s.style.setProperty("--ssd-len",String(l[u])),s.style.strokeDasharray=`${l[u]}`;});}}}if(bt())return He(Et());function $t(){let e=Math.max(1,gt),t=0,n=0,y=false;function _(o){let f=true;if(U){let c=Math.min(1,Math.max(0,o/e)),s=oe(c);W=s,r.style.setProperty("--scroll-draw-progress",String(s)),r.style.clipPath=ne(d$1==="reverse"?1-s:s),ye?.(s),c<1&&(f=false);}else m.forEach((c,s)=>{let u=s*be*e,M=Math.min(1,Math.max(0,(o-u)/e)),S=oe(M);c.style.strokeDashoffset=d$1==="reverse"?`${l[s]*S}`:`${l[s]*(1-S)}`,C&&(c.style.opacity=d$1==="reverse"?`${1-S}`:`${S}`),I&&$?c.style.stroke=a$5(I,$,S):$&&(c.style.stroke=$),A!==null&&T!==null?c.style.strokeWidth=`${A+(T-A)*S}`:T!==null&&(c.style.strokeWidth=`${T}`),x!==null&&k!==null?c.style.fillOpacity=`${x+(k-x)*S}`:k!==null&&(c.style.fillOpacity=`${k}`),P&&c.tagName.toLowerCase()==="path"&&L[s]&&c.setAttribute("d",Ge(L[s],P,S)),s===0&&(W=S,ye?.(S),r.style.setProperty("--scroll-draw-progress",String(S))),M<1&&(f=false);});if(re){let c=Math.min(1,Math.max(0,o/e)),s=oe(c);for(let u in re){let M=parseFloat(u);s>=M&&!Y.has(M)&&(Y.add(M),re[u]?.());}}return f}function q(o){if(w)return;let f=o-t;F||(F=true,$e?.());let c=_(f);if(c&&!g){g=true,_(e*(1+Math.max(0,m.length-1)*be)),ae?.(),B<(se==="infinite"?1/0:se??0)&&(B++,X=setTimeout(()=>{t=performance.now(),F=false,g=false,Y.clear(),Se(),v=requestAnimationFrame(q);},Ce));return}c||(v=requestAnimationFrame(q));}function N(){cancelAnimationFrame(v),clearTimeout(X),t=performance.now(),n=0,w=false,F=false,g=false,B=0,y=true,W=0,Y.clear(),Se(),v=requestAnimationFrame(q);}let i=new IntersectionObserver(o=>{o.forEach(f=>{f.isIntersecting&&!(Z&&g)?N():!f.isIntersecting&&!Z&&!g&&(cancelAnimationFrame(v),clearTimeout(X),y=false);});},{root:H??null,threshold:Be,rootMargin:_e}),a;function h(){clearTimeout(a),a=setTimeout(()=>{m.forEach((o,f)=>{l[f]=a$1(o),o.style.strokeDasharray=`${l[f]}`;});},150);}return window.addEventListener("resize",h),window.addEventListener("orientationchange",h),pe>0?setTimeout(()=>i.observe(r),pe):i.observe(r),{destroy(){cancelAnimationFrame(v),clearTimeout(X),i.disconnect(),window.removeEventListener("resize",h),window.removeEventListener("orientationchange",h),clearTimeout(a);},replay(){B=0,N();},pause(){w||!y||(w=true,n=performance.now()-t,cancelAnimationFrame(v));},resume(){w&&(w=false,y=true,t=performance.now()-n,v=requestAnimationFrame(q));},seek(o){let f=Math.min(1,Math.max(0,o));W=f,w=true,n=f*e,t=performance.now()-n,cancelAnimationFrame(v),_(n);},getProgress(){return W},refresh(){clearTimeout(a),m.forEach((o,f)=>{l[f]=a$1(o),o.style.strokeDasharray=`${l[f]}`;});}}}if(ht)return He($t());st();function Ae(){if(!le||w)return;let e=performance.now(),t=Re();if(!Q&&de===false&&t===Ke){v=requestAnimationFrame(Ae);return}Q=false,Ke=t;let n=V;if(de!==false){let i=e-et,a=i>0?Math.abs(t-(ke<0?t:ke))/i:0;n=V*Math.max(.2,1+a*(typeof de=="number"?de:1)*.04);}ke=t,et=e;let y=Ee?Te===-1||t>=Te?"forward":"reverse":d$1;Te=t;let _=G-z,q=true,N=_===0?0:(t-z)/_;if(isNaN(fe)||(fe<=0&&N>0?Ue?.():fe>0&&N<=0&&Ye?.(),fe<1&&N>=1?je?.():fe>=1&&N<1&&Xe?.()),fe=N,U){let i=oe(b$3(t,z,G,n));Z&&!Ee&&(j=Math.max(j,i),i=j),W=i,r.style.setProperty("--scroll-draw-progress",String(i));let a=y==="reverse"?1-i:i;r.style.clipPath=ne(a),ye?.(i),!F&&b$3(t,z,G,n)>0&&(F=true,$e?.()),i>=1&&!g?(g=true,ae?.(),B<(se==="infinite"?1/0:se??0)&&(B++,X=setTimeout(()=>{j=-1,F=false,g=false,r.style.clipPath=ne(0);},Ce))):i<1&&!Z&&(g=false),v=requestAnimationFrame(Ae);return}if(m.forEach((i,a)=>{let h=a*be*_,o=oe(b$3(t,z+h,G+h,n));Z&&!Ee&&(o=he[a]=Math.max(he[a]??j,o)),W=o,i.style.strokeDashoffset=y==="reverse"?`${l[a]*o}`:`${l[a]*(1-o)}`,C&&(i.style.opacity=y==="reverse"?`${1-o}`:`${o}`),I&&$?i.style.stroke=a$5(I,$,o):$&&(i.style.stroke=$),A!==null&&T!==null?i.style.strokeWidth=`${A+(T-A)*o}`:T!==null&&(i.style.strokeWidth=`${T}`),x!==null&&k!==null?i.style.fillOpacity=`${x+(k-x)*o}`:k!==null&&(i.style.fillOpacity=`${k}`),P&&i.tagName.toLowerCase()==="path"&&L[a]&&i.setAttribute("d",Ge(L[a],P,o)),a===0&&(ye?.(o),r.style.setProperty("--scroll-draw-progress",String(o))),o<1&&(q=false);}),re){let i=oe(b$3(t,z,G,n));for(let a in re){let h=parseFloat(a);i>=h&&!Y.has(h)&&(Y.add(h),re[a]?.());}}!F&&b$3(t,z,G,n)>0&&(F=true,$e?.()),q&&!g?(g=true,ae?.(),B<(se==="infinite"?1/0:se??0)&&(B++,X=setTimeout(()=>{j=-1,he=[],F=false,g=false,Y.clear(),Se(),Q=true;},Ce))):!q&&!Z&&(g=false),v=requestAnimationFrame(Ae);}let Ie=false;function xe(){Ie||(Ie=true,v=requestAnimationFrame(function(){Ae();}));}function Pe(){Ie=false,cancelAnimationFrame(v);}let ze=new IntersectionObserver(e=>{e.forEach(t=>{le=t.isIntersecting,le&&!w?(Q=true,xe()):Pe();});},{root:H??null,threshold:Be,rootMargin:_e});function nt(){m.forEach((e,t)=>{l[t]=a$1(e),e.style.strokeDasharray=`${l[t]}`;}),st(),Q=true;}let Le;function ge(){clearTimeout(Le),Le=setTimeout(nt,150);}window.addEventListener("resize",ge),window.addEventListener("orientationchange",ge);let ve;return typeof ResizeObserver<"u"&&(ve=new ResizeObserver(()=>ge()),ve.observe(document.body),ve.observe(document.documentElement),ve.observe(r)),pe>0?setTimeout(()=>ze.observe(r),pe):ze.observe(r),He({destroy(){cancelAnimationFrame(v),clearTimeout(X),Pe(),ze.disconnect(),ve?.disconnect(),window.removeEventListener("resize",ge),window.removeEventListener("orientationchange",ge),clearTimeout(Le),Je();},replay(){j=-1,he=[],Te=-1,ke=-1,F=false,g=false,B=0,w=false,W=0,Y.clear(),clearTimeout(X),Se(),Q=true,le&&xe();},pause(){w=true,Pe();},resume(){w&&(w=false,Q=true,le&&xe());},seek(e){let t=Math.min(1,Math.max(0,e));W=t,j=t,he=[],w=true,Pe(),wt(t,d$1),Q=true;},getProgress(){return W},refresh(){clearTimeout(Le),nt(),le&&!w&&xe();}},()=>({tStart:z,tEnd:G}))}export{ct as a,It as b};
@@ -1,3 +1,3 @@
1
- 'use strict';function _t({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),c=0,m=[];for(let h=0;h<r;h++){let S=Math.pow(o,h);m.push(S),c+=S;}let i=[0],u=0;for(let h=0;h<r;h++)u+=m[h]/c,i.push(u);return h=>{if(h<=0)return 0;if(h>=1)return 1;for(let S=0;S<r;S++)if(h<=i[S+1]){let V=(h-i[S])/(i[S+1]-i[S]);if(S===0)return V*(2-V);let x=1-Math.pow(t,S);return x+(1-x)*(2*V-1)*(2*V-1)}return 1}}function Ht({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 c=>c<=0?0:c>=1?1:r*Math.pow(2,-10*c)*Math.sin((c-o)*(2*Math.PI)/t)+1}var Se={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:_t(),elastic:Ht()};function bt(e,n,r){return Math.min(r,Math.max(n,e))}function De(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 wt(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 vt(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 ne(e,n,r,t){return r===n?0:bt((e-n)/(r-n)*t,0,1)}function Ie(e,n,r,t,o){let c=wt(e.top,e.height,n,t.element)-vt(t.viewport,r),m=wt(e.top,e.height,n,o.element)-vt(o.viewport,r);return {tStart:c,tEnd:m}}function Je(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 Ce(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 Et(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 Oe(e,n,r){let t=Et(e),o=Et(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 St={sketch:{easing:"ease-in",stagger:.1,speed:.9,fade:false},reveal:{easing:"ease-out",fade:true,speed:1.2,once:true},typewriter:{easing:"linear",stagger:.05,speed:1.5},cinematic:{easing:"ease-in-out",fade:true,speed:.75},spring:{easing:"spring",speed:1.1}};var ze=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function fe(e,...n){ze&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var Vt="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",zt="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",xt=33;function Wt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function qt(e){let n=[];for(let r=0;r<xt;r++){let t=r/(xt-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function et(e){switch(e){case "linear":return "linear";case "ease-in":return Vt;case "ease-out":return zt;case "ease-in-out":return Wt()?qt(Se["ease-in-out"]):null;default:return null}}var Tt=Symbol.for("svg-scroll-draw.registry");function $t(){let e=globalThis;return e[Tt]||(e[Tt]=new Map)}function We(e,n){$t().set(e,n);}function qe(e){$t().delete(e);}var Gt=0;function Bt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function At(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var Pt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function jt(e){if(!ze)return;let n=At(e,"stroke");if(!n||n==="none"){fe("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!Pt.has(r)&&!Pt.has(At(e,"fill"))&&fe("Element has a fill \u2014 it may obscure the stroke animation.",e);}function Ut(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 c=r==="x"?window.scrollX:window.scrollY,m=e-c,i=n-c,u=r==="x";t.innerHTML=`
1
+ 'use strict';function Ht({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),c=0,m=[];for(let h=0;h<r;h++){let S=Math.pow(o,h);m.push(S),c+=S;}let i=[0],u=0;for(let h=0;h<r;h++)u+=m[h]/c,i.push(u);return h=>{if(h<=0)return 0;if(h>=1)return 1;for(let S=0;S<r;S++)if(h<=i[S+1]){let V=(h-i[S])/(i[S+1]-i[S]);if(S===0)return V*(2-V);let x=1-Math.pow(t,S);return x+(1-x)*(2*V-1)*(2*V-1)}return 1}}function Vt({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 c=>c<=0?0:c>=1?1:r*Math.pow(2,-10*c)*Math.sin((c-o)*(2*Math.PI)/t)+1}var xe={linear:e=>e,"ease-in":e=>e*e,"ease-out":e=>e*(2-e),"ease-in-out":e=>e<.5?2*e*e:-1+(4-2*e)*e,spring:e=>1-Math.cos(e*Math.PI*2.5)*Math.pow(1-e,2.2),bounce:Ht(),elastic:Vt()};function wt(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 vt(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 Et(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 re(e,n,r,t){return r===n?0:wt((e-n)/(r-n)*t,0,1)}function Ce(e,n,r,t,o){let c=vt(e.top,e.height,n,t.element)-Et(t.viewport,r),m=vt(e.top,e.height,n,o.element)-Et(o.viewport,r);return {tStart:c,tEnd:m}}function et(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 Oe(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 St(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 Re(e,n,r){let t=St(e),o=St(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 xt={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 We=typeof __SVG_SCROLL_DRAW_DEV__<"u"?__SVG_SCROLL_DRAW_DEV__:typeof process<"u"&&typeof process.env<"u"&&process.env.NODE_ENV!=="production";function fe(e,...n){We&&console.warn(`[svg-scroll-draw] ${e}`,...n);}var zt="cubic-bezier(0.333333, 0, 0.666667, 0.333333)",Wt="cubic-bezier(0.333333, 0.666667, 0.666667, 1)",Tt=33;function qt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timing-function: linear(0, 1)")}function Gt(e){let n=[];for(let r=0;r<Tt;r++){let t=r/(Tt-1);n.push(String(Math.round(e(t)*1e5)/1e5));}return `linear(${n.join(",")})`}function tt(e){switch(e){case "linear":return "linear";case "ease-in":return zt;case "ease-out":return Wt;case "ease-in-out":return qt()?Gt(xe["ease-in-out"]):null;default:return null}}var $t=Symbol.for("svg-scroll-draw.registry");function At(){let e=globalThis;return e[$t]||(e[$t]=new Map)}function qe(e,n){At().set(e,n);}function Ge(e){At().delete(e);}var Bt=0;function jt(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")&&CSS.supports("view-timeline-name: --x")}function Pt(e,n){let r="";try{r=getComputedStyle(e).getPropertyValue(n).trim();}catch{}return r||(e.getAttribute(n)??"").trim()}var Mt=new Set(["","none","transparent","rgba(0, 0, 0, 0)"]);function Ut(e){if(!We)return;let n=Pt(e,"stroke");if(!n||n==="none"){fe("Element has no stroke \u2014 path will not be visible.",e);return}let r=(e.getAttribute("fill")??"").trim();r&&!Mt.has(r)&&!Mt.has(Pt(e,"fill"))&&fe("Element has a fill \u2014 it may obscure the stroke animation.",e);}function Xt(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 c=r==="x"?window.scrollX:window.scrollY,m=e-c,i=n-c,u=r==="x";t.innerHTML=`
2
2
  <div style="position:absolute;${u?`left:${m}px;top:0;bottom:0;border-left:2px dashed #22c55e;`:`top:${m}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;${u?`left:${i}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${i}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",o,{passive:true}),o(),{el:t,destroy(){window.removeEventListener("scroll",o),t.remove();}}}var Mt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,kt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Xt(e,n,r){if(!ze)return;let t=(e.match(kt)??[]).join("").toUpperCase(),o=(n.match(kt)??[]).join("").toUpperCase(),c=(e.match(Mt)??[]).length,m=(n.match(Mt)??[]).length;if(t!==o){fe(`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}c!==m&&fe(`morphTo: coordinate count differs (${c} \u2192 ${m}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function at(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,c=>{let m=parseFloat(c),i=t[o++]??m;return String(+(m+(i-m)*r).toFixed(4))})}function lt(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,o=r?{...St[r],...t}:t,c=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:m="path, polyline, line, polygon, rect, circle",speed:i=1,fade:u=false,easing:h="linear",trigger:S={},stagger:V=0,direction:x="forward",once:me=false,debug:Be=false,axis:J="y",scrollContainer:Pe,autoReverse:xe=false,delay:he=0,strokeColor:oe,strokeWidth:pe,fillOpacity:ee,waypoints:se,velocityScale:be=false,threshold:Ne=0,rootMargin:Q="0px",repeat:C=0,repeatDelay:Fe=0,morphTo:z,clip:Me,autoplay:_e=false,duration:je=1e3,native:tt=true,onProgress:Te,onStart:U,onComplete:W,onEnter:ie,onLeave:$e,onEnterBack:ae,onLeaveBack:de}=o,_=Me===true?"left":typeof Me=="string"?Me:false,Z=typeof h=="function"?h:Se[h]??Se.linear,le=De(S.start??"top bottom"),ke=De(S.end??"bottom top"),X=typeof Pe=="string"?document.querySelector(Pe):Pe??null,Y=Array.isArray(oe)?oe[0]:null,O=Array.isArray(oe)?oe[1]:typeof oe=="string"?oe:null,R=Array.isArray(pe)?pe[0]:null,M=Array.isArray(pe)?pe[1]:typeof pe=="number"?pe:null,H=Array.isArray(ee)?ee[0]:null,D=Array.isArray(ee)?ee[1]:typeof ee=="number"?ee:null;function ce(s){let l=s*100;switch(_){case "right":return `inset(0 0 0 ${100-l}%)`;case "top":return `inset(0 0 ${100-l}% 0)`;case "bottom":return `inset(${100-l}% 0 0 0)`;case "center":return `circle(${s*150}% at 50% 50%)`;default:return `inset(0 ${100-l}% 0 0)`}}let T=_?[]:Array.from(e.querySelectorAll(m)),b=[],a=[],f=0,q=0,v=false,$=false,A=0,te=false,G=-1,I=-1,k=false,B=0,ge=0,we,rt=null;function ut(){rt?.destroy(),rt=null;}let ve=new Set,ft=NaN,Ee=true,Ue=-1,mt=performance.now(),Le=NaN;function nt(){return X?J==="x"?X.scrollLeft:X.scrollTop:J==="x"?window.scrollX:window.scrollY}function pt(){return X?J==="x"?X.clientWidth:X.clientHeight:J==="x"?window.innerWidth:window.innerHeight}function dt(){let s=Je(e,X,J);return Ie(s,s.scroll,pt(),le,ke)}function gt(){(({tStart:f,tEnd:q}=dt())),Be&&ze&&(ut(),rt=Ut(f,q,J));}function ot(s,l=dt){We(e,{type:"draw",getProgress:()=>s.getProgress(),getTrigger:l});let g=s.destroy;return s.destroy=()=>{g.call(s),qe(e);},s}function Ot(s,l){if(e.style.setProperty("--scroll-draw-progress",String(s)),_){let g=l==="reverse"?1-s:s;e.style.clipPath=ce(g);return}T.forEach((g,N)=>{g.style.strokeDashoffset=l==="reverse"?`${b[N]*s}`:`${b[N]*(1-s)}`,u&&(g.style.opacity=l==="reverse"?`${1-s}`:`${s}`),Y&&O?g.style.stroke=Oe(Y,O,s):O&&(g.style.stroke=O),R!==null&&M!==null?g.style.strokeWidth=`${R+(M-R)*s}`:M!==null&&(g.style.strokeWidth=`${M}`),H!==null&&D!==null?g.style.fillOpacity=`${H+(D-H)*s}`:D!==null&&(g.style.fillOpacity=`${D}`),z&&g.tagName.toLowerCase()==="path"&&a[N]&&g.setAttribute("d",at(a[N],z,s));});}function Xe(){if(e.style.setProperty("--scroll-draw-progress","0"),_){e.style.clipPath=ce(0);return}T.forEach((s,l)=>{s.style.strokeDasharray=`${b[l]}`,s.style.strokeDashoffset=x==="reverse"?"0":`${b[l]}`,u?s.style.opacity=x==="reverse"?"1":"0":s.style.opacity="",Y&&(s.style.stroke=Y),R!==null&&(s.style.strokeWidth=`${R}`),H!==null&&(s.style.fillOpacity=`${H}`),z&&s.tagName.toLowerCase()==="path"&&a[l]&&s.setAttribute("d",a[l]);});}if(T.forEach(s=>{jt(s);let l=Ce(s);b.push(l);let g=s.tagName.toLowerCase()==="path";g?a.push(s.getAttribute("d")??""):a.push(""),z&&(g?Xt(a[a.length-1],z,s):fe(`morphTo only applies to <path> elements \u2014 ignored on <${s.tagName}>.`,s)),c?(s.style.strokeDasharray=`${l}`,s.style.strokeDashoffset=x==="reverse"?`${l}`:"0",u&&(s.style.opacity="1"),O&&(s.style.stroke=O),M!==null&&(s.style.strokeWidth=`${M}`),D!==null&&(s.style.fillOpacity=`${D}`),z&&s.tagName.toLowerCase()==="path"&&s.setAttribute("d",z)):(s.style.strokeDasharray=`${l}`,s.style.strokeDashoffset=x==="reverse"?"0":`${l}`,u?s.style.opacity=x==="reverse"?"1":"0":s.style.opacity="",Y&&(s.style.stroke=Y),R!==null&&(s.style.strokeWidth=`${R}`),H!==null&&(s.style.fillOpacity=`${H}`));}),_){if(c)return e.style.clipPath=ce(1),W?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=ce(0);}else if(c)return W?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let yt=typeof h=="string"?et(h):null;function Rt(){return !(tt===false||!Bt()||!T.length||!yt||_||J!=="y"||X||i!==1||V!==0||me||xe||be!==false||z||se||C||he>0||Te||U||W||ie||$e||ae||de||oe!=null||pe!=null||ee!=null||(S.start??"top bottom").trim()!=="top bottom"||(S.end??"bottom top").trim()!=="bottom top")}function Nt(){let s=++Gt,l=`svg-scroll-draw-${s}`,g=`svg-scroll-draw-host-${s}`,N=`--svg-scroll-draw-${s}`,ye=x==="reverse"?"0":"var(--ssd-len)",ue=x==="reverse"?"var(--ssd-len)":"0",re=`stroke-dashoffset:${ye};`,y=`stroke-dashoffset:${ue};`;u&&(re+=`opacity:${x==="reverse"?1:0};`,y+=`opacity:${x==="reverse"?0:1};`);let w=document.createElement("style");w.setAttribute("data-svg-scroll-draw",""),w.textContent=`@keyframes ${l}{from{${re}}to{${y}}}.${g}{view-timeline-name:${N};view-timeline-axis:block;}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${yt};animation-fill-mode:both;animation-timeline:${N};animation-range:cover 0% cover 100%;}`,document.head.appendChild(w),e.classList.add(g);function F(p,L){p.style.setProperty("--ssd-len",String(b[L])),p.style.strokeDasharray=`${b[L]}`,p.style.strokeDashoffset="",p.style.opacity="",p.style.animationPlayState="",p.classList.add(l);}T.forEach(F);let d=false,E=-1;function P(){if(E>=0)return E;let p=e.getBoundingClientRect(),{tStart:L,tEnd:K}=Ie({top:p.top,height:p.height},nt(),pt(),le,ke);return Z(ne(nt(),L,K,i))}return {destroy(){e.classList.remove(g),T.forEach(p=>{p.classList.remove(l),p.style.removeProperty("--ssd-len"),p.style.animationPlayState="";}),w.remove();},replay(){d=false,E=-1,T.forEach(F);},pause(){d=true,T.forEach(p=>{p.style.animationPlayState="paused";});},resume(){d&&(d=false,T.forEach(p=>{p.style.animationPlayState="running";}));},seek(p){let L=Math.min(1,Math.max(0,p));E=L,d=true,T.forEach((K,j)=>{K.classList.remove(l),K.style.strokeDashoffset=x==="reverse"?`${b[j]*L}`:`${b[j]*(1-L)}`,u&&(K.style.opacity=x==="reverse"?`${1-L}`:`${L}`);});},getProgress(){return P()},refresh(){T.forEach((p,L)=>{b[L]=Ce(p),p.style.setProperty("--ssd-len",String(b[L])),p.style.strokeDasharray=`${b[L]}`;});}}}if(Rt())return ot(Nt());function Ft(){let s=Math.max(1,je),l=0,g=0,N=false;function ye(d){let E=true;if(_){let P=Math.min(1,Math.max(0,d/s)),p=Z(P);B=p,e.style.setProperty("--scroll-draw-progress",String(p)),e.style.clipPath=ce(x==="reverse"?1-p:p),Te?.(p),P<1&&(E=false);}else T.forEach((P,p)=>{let L=p*V*s,K=Math.min(1,Math.max(0,(d-L)/s)),j=Z(K);P.style.strokeDashoffset=x==="reverse"?`${b[p]*j}`:`${b[p]*(1-j)}`,u&&(P.style.opacity=x==="reverse"?`${1-j}`:`${j}`),Y&&O?P.style.stroke=Oe(Y,O,j):O&&(P.style.stroke=O),R!==null&&M!==null?P.style.strokeWidth=`${R+(M-R)*j}`:M!==null&&(P.style.strokeWidth=`${M}`),H!==null&&D!==null?P.style.fillOpacity=`${H+(D-H)*j}`:D!==null&&(P.style.fillOpacity=`${D}`),z&&P.tagName.toLowerCase()==="path"&&a[p]&&P.setAttribute("d",at(a[p],z,j)),p===0&&(B=j,Te?.(j),e.style.setProperty("--scroll-draw-progress",String(j))),K<1&&(E=false);});if(se){let P=Math.min(1,Math.max(0,d/s)),p=Z(P);for(let L in se){let K=parseFloat(L);p>=K&&!ve.has(K)&&(ve.add(K),se[L]?.());}}return E}function ue(d){if(k)return;let E=d-l;$||($=true,U?.());let P=ye(E);if(P&&!v){v=true,ye(s*(1+Math.max(0,T.length-1)*V)),W?.(),ge<(C==="infinite"?1/0:C??0)&&(ge++,we=setTimeout(()=>{l=performance.now(),$=false,v=false,ve.clear(),Xe(),A=requestAnimationFrame(ue);},Fe));return}P||(A=requestAnimationFrame(ue));}function re(){cancelAnimationFrame(A),clearTimeout(we),l=performance.now(),g=0,k=false,$=false,v=false,ge=0,N=true,B=0,ve.clear(),Xe(),A=requestAnimationFrame(ue);}let y=new IntersectionObserver(d=>{d.forEach(E=>{E.isIntersecting&&!(me&&v)?re():!E.isIntersecting&&!me&&!v&&(cancelAnimationFrame(A),clearTimeout(we),N=false);});},{root:X??null,threshold:Ne,rootMargin:Q}),w;function F(){clearTimeout(w),w=setTimeout(()=>{T.forEach((d,E)=>{b[E]=Ce(d),d.style.strokeDasharray=`${b[E]}`;});},150);}return window.addEventListener("resize",F),window.addEventListener("orientationchange",F),he>0?setTimeout(()=>y.observe(e),he):y.observe(e),{destroy(){cancelAnimationFrame(A),clearTimeout(we),y.disconnect(),window.removeEventListener("resize",F),window.removeEventListener("orientationchange",F),clearTimeout(w);},replay(){ge=0,re();},pause(){k||!N||(k=true,g=performance.now()-l,cancelAnimationFrame(A));},resume(){k&&(k=false,N=true,l=performance.now()-g,A=requestAnimationFrame(ue));},seek(d){let E=Math.min(1,Math.max(0,d));B=E,k=true,g=E*s,l=performance.now()-g,cancelAnimationFrame(A),ye(g);},getProgress(){return B},refresh(){clearTimeout(w),T.forEach((d,E)=>{b[E]=Ce(d),d.style.strokeDasharray=`${b[E]}`;});}}}if(_e)return ot(Ft());gt();function Ye(){if(!te||k)return;let s=performance.now(),l=nt();if(!Ee&&be===false&&l===ft){A=requestAnimationFrame(Ye);return}Ee=false,ft=l;let g=i;if(be!==false){let y=s-mt,w=y>0?Math.abs(l-(Ue<0?l:Ue))/y:0;g=i*Math.max(.2,1+w*(typeof be=="number"?be:1)*.04);}Ue=l,mt=s;let N=xe?I===-1||l>=I?"forward":"reverse":x;I=l;let ye=q-f,ue=true,re=ye===0?0:(l-f)/ye;if(isNaN(Le)||(Le<=0&&re>0?ie?.():Le>0&&re<=0&&de?.(),Le<1&&re>=1?$e?.():Le>=1&&re<1&&ae?.()),Le=re,_){let y=Z(ne(l,f,q,g));me&&!xe&&(G=Math.max(G,y),y=G),B=y,e.style.setProperty("--scroll-draw-progress",String(y));let w=N==="reverse"?1-y:y;e.style.clipPath=ce(w),Te?.(y),!$&&ne(l,f,q,g)>0&&($=true,U?.()),y>=1&&!v?(v=true,W?.(),ge<(C==="infinite"?1/0:C??0)&&(ge++,we=setTimeout(()=>{G=-1,$=false,v=false,e.style.clipPath=ce(0);},Fe))):y<1&&!me&&(v=false),A=requestAnimationFrame(Ye);return}if(T.forEach((y,w)=>{let F=w*V*ye,d=Z(ne(l,f+F,q+F,g));me&&!xe&&(G=Math.max(G,d),d=G),B=d,y.style.strokeDashoffset=N==="reverse"?`${b[w]*d}`:`${b[w]*(1-d)}`,u&&(y.style.opacity=N==="reverse"?`${1-d}`:`${d}`),Y&&O?y.style.stroke=Oe(Y,O,d):O&&(y.style.stroke=O),R!==null&&M!==null?y.style.strokeWidth=`${R+(M-R)*d}`:M!==null&&(y.style.strokeWidth=`${M}`),H!==null&&D!==null?y.style.fillOpacity=`${H+(D-H)*d}`:D!==null&&(y.style.fillOpacity=`${D}`),z&&y.tagName.toLowerCase()==="path"&&a[w]&&y.setAttribute("d",at(a[w],z,d)),w===0&&(Te?.(d),e.style.setProperty("--scroll-draw-progress",String(d))),d<1&&(ue=false);}),se){let y=Z(ne(l,f,q,g));for(let w in se){let F=parseFloat(w);y>=F&&!ve.has(F)&&(ve.add(F),se[w]?.());}}!$&&ne(l,f,q,g)>0&&($=true,U?.()),ue&&!v?(v=true,W?.(),ge<(C==="infinite"?1/0:C??0)&&(ge++,we=setTimeout(()=>{G=-1,$=false,v=false,ve.clear(),Xe(),Ee=true;},Fe))):!ue&&!me&&(v=false),A=requestAnimationFrame(Ye);}let st=false;function Qe(){st||(st=true,A=requestAnimationFrame(function(){Ye();}));}function Ze(){st=false,cancelAnimationFrame(A);}let it=new IntersectionObserver(s=>{s.forEach(l=>{te=l.isIntersecting,te&&!k?(Ee=true,Qe()):Ze();});},{root:X??null,threshold:Ne,rootMargin:Q});function ht(){T.forEach((s,l)=>{b[l]=Ce(s),s.style.strokeDasharray=`${b[l]}`;}),gt(),Ee=true;}let Ke;function He(){clearTimeout(Ke),Ke=setTimeout(ht,150);}window.addEventListener("resize",He),window.addEventListener("orientationchange",He);let Ve;return typeof ResizeObserver<"u"&&(Ve=new ResizeObserver(()=>He()),Ve.observe(document.body),Ve.observe(document.documentElement),Ve.observe(e)),he>0?setTimeout(()=>it.observe(e),he):it.observe(e),ot({destroy(){cancelAnimationFrame(A),clearTimeout(we),Ze(),it.disconnect(),Ve?.disconnect(),window.removeEventListener("resize",He),window.removeEventListener("orientationchange",He),clearTimeout(Ke),ut();},replay(){G=-1,I=-1,Ue=-1,$=false,v=false,ge=0,k=false,B=0,ve.clear(),clearTimeout(we),Xe(),Ee=true,te&&Qe();},pause(){k=true,Ze();},resume(){k&&(k=false,Ee=true,te&&Qe());},seek(s){let l=Math.min(1,Math.max(0,s));B=l,G=l,k=true,Ze(),Ot(l,x),Ee=true;},getProgress(){return B},refresh(){clearTimeout(Ke),ht(),te&&!k&&Qe();}},()=>({tStart:f,tEnd:q}))}function Yt(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Lt(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let o=[],c=[],m=t[2].trim();if(m)for(let i of m.split(/[\s,]+/)){let u=i.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(u?parseFloat(u[1]):0),c.push(u?u[2]:"");}n.push({fn:t[1],nums:o,units:c});}return n}function Qt(e,n,r){let t=Lt(e),o=Lt(n);return t.length===0||t.length!==o.length?r<1?e:n:t.map((c,m)=>{let i=o[m];return c.fn!==i.fn||c.nums.length!==i.nums.length?r<1?`${c.fn}(${c.nums.map((u,h)=>`${u}${c.units[h]}`).join(", ")})`:`${i.fn}(${i.nums.map((u,h)=>`${u}${i.units[h]}`).join(", ")})`:`${c.fn}(${c.nums.map((u,h)=>`${u+(i.nums[h]-u)*r}${c.units[h]}`).join(", ")})`}).join(" ")}function ct(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),o=String(n);if(Yt(t))return Oe(t,o,r);if(t.includes("("))return Qt(t,o,r);let c=t.match(/^([-+]?[\d.]+)(.*)$/),m=o.match(/^([-+]?[\d.]+)(.*)$/);if(c&&m){let i=parseFloat(c[1]),u=parseFloat(m[1]);return `${i+(u-i)*r}${c[2]||m[2]}`}return r<1?t:o}function Zt(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Kt=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),Jt=0,Dt="--scroll-draw-progress";function er(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Re(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:t,trigger:o={},easing:c="ease-out",speed:m=1,once:i=false,axis:u="y",scrollContainer:h,native:S=true,velocityScale:V=false,respectReducedMotion:x=true,triggerElement:me,onProgress:Be,onComplete:J,onEnter:Pe,onLeave:xe,onEnterBack:he,onLeaveBack:oe}=n,pe=x&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,ee=typeof c=="function"?c:Se[c]??Se["ease-out"],se=De(o.start??"top bottom"),be=De(o.end??"bottom top"),Ne=me??e,Q=typeof h=="string"?document.querySelector(h):h??null,C=Object.entries(t).map(([a,f])=>({prop:Zt(a),from:Array.isArray(f)?f[0]:"",to:Array.isArray(f)?f[1]:f}));function Fe(){let a=window.getComputedStyle(e);for(let f of C)f.from===""&&(f.from=a.getPropertyValue(f.prop).trim()||"0");}function z(){for(let a of C)e.style.setProperty(a.prop,String(a.to));}let Me=new Map;for(let a of [...C.map(f=>f.prop),Dt])Me.set(a,e.style.getPropertyValue(a));function _e(){for(let[a,f]of Me)f?e.style.setProperty(a,f):e.style.removeProperty(a);}if(pe)return z(),J?.(),{...r,destroy:_e,getProgress:()=>1};Fe();let je=typeof c=="string"?et(c):null;function tt(){if(!S||!er()||!je||u!=="y"||Q||Ne!==e||i||m!==1||Be||J||Pe||xe||he||oe||V!==false||(o.start??"top bottom").trim()!=="top bottom"||(o.end??"bottom top").trim()!=="bottom top")return false;for(let a of C)if(!Kt.has(a.prop))return false;return true}function Te(){let a=`ssd-a-${++Jt}`,f=C.map(I=>`${I.prop}:${I.from}`).join(";"),q=C.map(I=>`${I.prop}:${I.to}`).join(";"),v=document.createElement("style");v.setAttribute("data-ssd-animate",""),v.textContent=`@keyframes ${a}{from{${f}}to{${q}}}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${je};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(v),e.classList.add(a);let $=()=>u==="x"?window.scrollX:window.scrollY,A=()=>u==="x"?window.innerWidth:window.innerHeight,te=()=>{let I=e.getBoundingClientRect();return Ie({top:I.top,height:I.height},$(),A(),se,be)};We(e,{type:"animate",getProgress:()=>G.getProgress(),getTrigger:te});let G={destroy(){e.classList.remove(a),v.remove(),e.style.animationPlayState="",_e(),qe(e);},replay(){e.classList.remove(a),e.offsetWidth,e.classList.add(a);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(I){let k=Math.min(1,Math.max(0,I));e.classList.remove(a);for(let B of C)e.style.setProperty(B.prop,ct(B.from,B.to,k));},getProgress(){let{tStart:I,tEnd:k}=te();return ee(ne($(),I,k,m))}};return G}if(tt())return Te();let U=0,W=0,ie=0,$e=false,ae=false,de=-1,_=0,Z=false,le=NaN,ke=-1,X=0,Y=()=>Q?u==="x"?Q.scrollLeft:Q.scrollTop:u==="x"?window.scrollX:window.scrollY,O=()=>Q?u==="x"?Q.clientWidth:Q.clientHeight:u==="x"?window.innerWidth:window.innerHeight;function R(){let a=Je(Ne,Q,u),f=Ie(a,a.scroll,O(),se,be);U=f.tStart,W=f.tEnd;}function M(a){e.style.setProperty(Dt,String(a));for(let f of C)e.style.setProperty(f.prop,ct(f.from,f.to,a));Be?.(a);}function H(a){if(isNaN(le)){le=a;return}le<=0&&a>0?Pe?.():le>0&&a<=0&&oe?.(),le<1&&a>=1?xe?.():le>=1&&a<1&&he?.(),le=a;}function D(){if(!$e||ae)return;let a=performance.now(),f=Y(),q=m;if(V!==false){let A=a-X,te=A>0?Math.abs(f-(ke<0?f:ke))/A:0;q=m*Math.max(.2,1+te*(typeof V=="number"?V:1)*.04);}ke=f,X=a;let v=W===U?0:(f-U)/(W-U);H(v);let $=ee(ne(f,U,W,q));i&&(de=Math.max(de,$),$=de),_=$,M($),$>=1&&!Z?(Z=true,J?.()):$<1&&!i&&(Z=false),ie=requestAnimationFrame(D);}R(),W===U&&fe("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 a=ee(ne(Y(),U,W,m));i&&a>0&&(de=a),_=a,M(a);}let ce=new IntersectionObserver(a=>{a.forEach(f=>{$e=f.isIntersecting,$e&&!ae?ie=requestAnimationFrame(D):cancelAnimationFrame(ie);});},{root:Q??null}),T;function b(){clearTimeout(T),T=setTimeout(R,150);}return window.addEventListener("resize",b),window.addEventListener("orientationchange",b),ce.observe(e),We(e,{type:"animate",getProgress:()=>_,getTrigger:()=>({tStart:U,tEnd:W})}),{destroy(){cancelAnimationFrame(ie),ce.disconnect(),window.removeEventListener("resize",b),window.removeEventListener("orientationchange",b),clearTimeout(T),_e(),qe(e);},replay(){de=-1,Z=false,_=0,ae=false,M(0);},pause(){ae=true,cancelAnimationFrame(ie);},resume(){ae&&(ae=false,$e&&(ie=requestAnimationFrame(D)));},seek(a){let f=Math.min(1,Math.max(0,a));_=f,de=f,ae=true,cancelAnimationFrame(ie),M(f);},getProgress(){return _}}}var It={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Ct(e,n={}){if(typeof window>"u")return It;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return fe("scrollParallax: element not found:",e),It;let{speed:t=.3,axis:o="y",easing:c="linear",trigger:m,onProgress:i}=n,u=r.getBoundingClientRect(),h=o==="x"?u.width:u.height,S=t*h;return Re(r,{props:o==="x"?{transform:["translateX(0px)",`translateX(${-S}px)`]}:{transform:["translateY(0px)",`translateY(${-S}px)`]},trigger:m??{start:"top bottom",end:"bottom top"},easing:c,native:false,onProgress:i})}function Ge(e){return e.map(n=>typeof n=="string"?document.querySelector(n):n).filter(n=>n!==null)}var Ae={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Fr(e,n={}){if(typeof window>"u")return Ae;let r=Ge(e).map(t=>lt(t,n));return {destroy(){r.forEach(t=>t.destroy());},replay(){r.forEach(t=>t.replay());},pause(){r.forEach(t=>t.pause());},resume(){r.forEach(t=>t.resume());},seek(t){r.forEach(o=>o.seek(t));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(t=>t.refresh?.());}}}function _r(e,n={}){if(typeof window>"u")return Ae;let r=Ge(e);if(r.length===0)return Ae;let t=0,o=[];function c(i){return lt(r[i],{...n,once:true,onComplete(){n.onComplete?.(),t=Math.min(i+1,r.length-1),t>i&&o[t]?.resume();}})}function m(){r.forEach((i,u)=>{o[u]=c(u);});for(let i=1;i<o.length;i++)o[i].pause();}return m(),{destroy(){o.forEach(i=>i.destroy()),o.length=0;},replay(){o.forEach(i=>i.destroy()),o.length=0,t=0,m();},pause(){o[t]?.pause();},resume(){o[t]?.resume();},seek(i){o[t]?.seek(i);},getProgress(){return o[t]?.getProgress()??0},refresh(){o.forEach(i=>i.refresh?.());}}}function Hr(e,n){if(typeof window>"u")return Ae;let r=Ge(e).map(t=>Re(t,n));return {destroy(){r.forEach(t=>t.destroy());},replay(){r.forEach(t=>t.replay());},pause(){r.forEach(t=>t.pause());},resume(){r.forEach(t=>t.resume());},seek(t){r.forEach(o=>o.seek(t));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(t=>t.refresh?.());}}}function Vr(e,n){if(typeof window>"u")return Ae;let r=Ge(e);if(r.length===0)return Ae;let t=0,o=[];function c(i){return Re(r[i],{...n,once:true,onComplete(){n.onComplete?.(),t=Math.min(i+1,r.length-1),t>i&&o[t]?.resume();}})}function m(){r.forEach((i,u)=>{o[u]=c(u);});for(let i=1;i<o.length;i++)o[i].pause();}return m(),{destroy(){o.forEach(i=>i.destroy()),o.length=0;},replay(){o.forEach(i=>i.destroy()),o.length=0,t=0,m();},pause(){o[t]?.pause();},resume(){o[t]?.resume();},seek(i){o[t]?.seek(i);},getProgress(){return o[t]?.getProgress()??0},refresh(){o.forEach(i=>i.refresh?.());}}}function zr(e,n={}){if(typeof window>"u")return Ae;let r=Ge(e).map(t=>Ct(t,n));return {destroy(){r.forEach(t=>t.destroy());},replay(){r.forEach(t=>t.replay());},pause(){r.forEach(t=>t.pause());},resume(){r.forEach(t=>t.resume());},seek(t){r.forEach(o=>o.seek(t));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(t=>t.refresh?.());}}}exports.scrollAnimateGroup=Hr;exports.scrollAnimateSequence=Vr;exports.scrollDrawGroup=Fr;exports.scrollDrawSequence=_r;exports.scrollParallaxGroup=zr;
3
+ <div style="position:absolute;${u?`left:${i}px;top:0;bottom:0;border-left:2px dashed #ef4444;`:`top:${i}px;left:0;right:0;border-top:2px dashed #ef4444;`}padding:2px 6px;color:#ef4444;background:rgba(0,0,0,.6)">\u25A0 end</div>`;}return document.body.appendChild(t),window.addEventListener("scroll",o,{passive:true}),o(),{el:t,destroy(){window.removeEventListener("scroll",o),t.remove();}}}var kt=/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,Lt=/[MmLlHhVvCcSsQqTtAaZz]/g;function Yt(e,n,r){if(!We)return;let t=(e.match(Lt)??[]).join("").toUpperCase(),o=(n.match(Lt)??[]).join("").toUpperCase(),c=(e.match(kt)??[]).length,m=(n.match(kt)??[]).length;if(t!==o){fe(`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}c!==m&&fe(`morphTo: coordinate count differs (${c} \u2192 ${m}). Extra coordinates are ignored and missing ones hold their start value, so the result will not reach the target shape.`,r);}function lt(e,n,r){let t=(n.match(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g)??[]).map(Number),o=0;return e.replace(/[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g,c=>{let m=parseFloat(c),i=t[o++]??m;return String(+(m+(i-m)*r).toFixed(4))})}function ct(e,n={}){if(typeof window>"u")return {destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};let{preset:r,...t}=n,o=r?{...xt[r],...t}:t,c=window.matchMedia("(prefers-reduced-motion: reduce)").matches,{selector:m="path, polyline, line, polygon, rect, circle",speed:i=1,fade:u=false,easing:h="linear",trigger:S={},stagger:V=0,direction:x="forward",once:me=false,debug:je=false,axis:K="y",scrollContainer:Me,autoReverse:Te=false,delay:he=0,strokeColor:ne,strokeWidth:pe,fillOpacity:J,waypoints:oe,velocityScale:be=false,threshold:Fe=0,rootMargin:X="0px",repeat:C=0,repeatDelay:_e=0,morphTo:z,clip:ke,autoplay:He=false,duration:Ue=1e3,native:rt=true,onProgress:$e,onStart:B,onComplete:W,onEnter:se,onLeave:Ae,onEnterBack:ie,onLeaveBack:de}=o,_=ke===true?"left":typeof ke=="string"?ke:false,Y=typeof h=="function"?h:xe[h]??xe.linear,ae=Ie(S.start??"top bottom"),Le=Ie(S.end??"bottom top"),j=typeof Me=="string"?document.querySelector(Me):Me??null,U=Array.isArray(ne)?ne[0]:null,O=Array.isArray(ne)?ne[1]:typeof ne=="string"?ne:null,R=Array.isArray(pe)?pe[0]:null,M=Array.isArray(pe)?pe[1]:typeof pe=="number"?pe:null,H=Array.isArray(J)?J[0]:null,D=Array.isArray(J)?J[1]:typeof J=="number"?J:null;function le(s){let l=s*100;switch(_){case "right":return `inset(0 0 0 ${100-l}%)`;case "top":return `inset(0 0 ${100-l}% 0)`;case "bottom":return `inset(${100-l}% 0 0 0)`;case "center":return `circle(${s*150}% at 50% 50%)`;default:return `inset(0 ${100-l}% 0 0)`}}let T=_?[]:Array.from(e.querySelectorAll(m)),b=[],a=[],f=0,q=0,v=false,$=false,A=0,ee=false,Q=-1,I=[],we=-1,k=false,ce=0,ge=0,ve,nt=null;function ft(){nt?.destroy(),nt=null;}let Ee=new Set,mt=NaN,Se=true,Xe=-1,pt=performance.now(),De=NaN;function ot(){return j?K==="x"?j.scrollLeft:j.scrollTop:K==="x"?window.scrollX:window.scrollY}function dt(){return j?K==="x"?j.clientWidth:j.clientHeight:K==="x"?window.innerWidth:window.innerHeight}function gt(){let s=et(e,j,K);return Ce(s,s.scroll,dt(),ae,Le)}function yt(){(({tStart:f,tEnd:q}=gt())),je&&We&&(ft(),nt=Xt(f,q,K));}function st(s,l=gt){qe(e,{type:"draw",getProgress:()=>s.getProgress(),getTrigger:l});let g=s.destroy;return s.destroy=()=>{g.call(s),Ge(e);},s}function Rt(s,l){if(e.style.setProperty("--scroll-draw-progress",String(s)),_){let g=l==="reverse"?1-s:s;e.style.clipPath=le(g);return}T.forEach((g,N)=>{g.style.strokeDashoffset=l==="reverse"?`${b[N]*s}`:`${b[N]*(1-s)}`,u&&(g.style.opacity=l==="reverse"?`${1-s}`:`${s}`),U&&O?g.style.stroke=Re(U,O,s):O&&(g.style.stroke=O),R!==null&&M!==null?g.style.strokeWidth=`${R+(M-R)*s}`:M!==null&&(g.style.strokeWidth=`${M}`),H!==null&&D!==null?g.style.fillOpacity=`${H+(D-H)*s}`:D!==null&&(g.style.fillOpacity=`${D}`),z&&g.tagName.toLowerCase()==="path"&&a[N]&&g.setAttribute("d",lt(a[N],z,s));});}function Ye(){if(e.style.setProperty("--scroll-draw-progress","0"),_){e.style.clipPath=le(0);return}T.forEach((s,l)=>{s.style.strokeDasharray=`${b[l]}`,s.style.strokeDashoffset=x==="reverse"?"0":`${b[l]}`,u?s.style.opacity=x==="reverse"?"1":"0":s.style.opacity="",U&&(s.style.stroke=U),R!==null&&(s.style.strokeWidth=`${R}`),H!==null&&(s.style.fillOpacity=`${H}`),z&&s.tagName.toLowerCase()==="path"&&a[l]&&s.setAttribute("d",a[l]);});}if(T.forEach(s=>{Ut(s);let l=Oe(s);b.push(l);let g=s.tagName.toLowerCase()==="path";g?a.push(s.getAttribute("d")??""):a.push(""),z&&(g?Yt(a[a.length-1],z,s):fe(`morphTo only applies to <path> elements \u2014 ignored on <${s.tagName}>.`,s)),c?(s.style.strokeDasharray=`${l}`,s.style.strokeDashoffset=x==="reverse"?`${l}`:"0",u&&(s.style.opacity="1"),O&&(s.style.stroke=O),M!==null&&(s.style.strokeWidth=`${M}`),D!==null&&(s.style.fillOpacity=`${D}`),z&&s.tagName.toLowerCase()==="path"&&s.setAttribute("d",z)):(s.style.strokeDasharray=`${l}`,s.style.strokeDashoffset=x==="reverse"?"0":`${l}`,u?s.style.opacity=x==="reverse"?"1":"0":s.style.opacity="",U&&(s.style.stroke=U),R!==null&&(s.style.strokeWidth=`${R}`),H!==null&&(s.style.fillOpacity=`${H}`));}),_){if(c)return e.style.clipPath=le(1),W?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};e.style.clipPath=le(0);}else if(c)return W?.(),{destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>1};let ht=typeof h=="string"?tt(h):null;function Nt(){return !(rt===false||!jt()||!T.length||!ht||_||K!=="y"||j||i!==1||V!==0||me||Te||be!==false||z||oe||C||he>0||$e||B||W||se||Ae||ie||de||ne!=null||pe!=null||J!=null||(S.start??"top bottom").trim()!=="top bottom"||(S.end??"bottom top").trim()!=="bottom top")}function Ft(){let s=++Bt,l=`svg-scroll-draw-${s}`,g=`svg-scroll-draw-host-${s}`,N=`--svg-scroll-draw-${s}`,ye=x==="reverse"?"0":"var(--ssd-len)",ue=x==="reverse"?"var(--ssd-len)":"0",te=`stroke-dashoffset:${ye};`,y=`stroke-dashoffset:${ue};`;u&&(te+=`opacity:${x==="reverse"?1:0};`,y+=`opacity:${x==="reverse"?0:1};`);let w=document.createElement("style");w.setAttribute("data-svg-scroll-draw",""),w.textContent=`@keyframes ${l}{from{${te}}to{${y}}}.${g}{view-timeline-name:${N};view-timeline-axis:block;}.${l}{animation-name:${l};animation-duration:auto;animation-timing-function:${ht};animation-fill-mode:both;animation-timeline:${N};animation-range:cover 0% cover 100%;}`,document.head.appendChild(w),e.classList.add(g);function F(p,L){p.style.setProperty("--ssd-len",String(b[L])),p.style.strokeDasharray=`${b[L]}`,p.style.strokeDashoffset="",p.style.opacity="",p.style.animationPlayState="",p.classList.add(l);}T.forEach(F);let d=false,E=-1;function P(){if(E>=0)return E;let p=e.getBoundingClientRect(),{tStart:L,tEnd:Z}=Ce({top:p.top,height:p.height},ot(),dt(),ae,Le);return Y(re(ot(),L,Z,i))}return {destroy(){e.classList.remove(g),T.forEach(p=>{p.classList.remove(l),p.style.removeProperty("--ssd-len"),p.style.animationPlayState="";}),w.remove();},replay(){d=false,E=-1,T.forEach(F);},pause(){d=true,T.forEach(p=>{p.style.animationPlayState="paused";});},resume(){d&&(d=false,T.forEach(p=>{p.style.animationPlayState="running";}));},seek(p){let L=Math.min(1,Math.max(0,p));E=L,d=true,T.forEach((Z,G)=>{Z.classList.remove(l),Z.style.strokeDashoffset=x==="reverse"?`${b[G]*L}`:`${b[G]*(1-L)}`,u&&(Z.style.opacity=x==="reverse"?`${1-L}`:`${L}`);});},getProgress(){return P()},refresh(){T.forEach((p,L)=>{b[L]=Oe(p),p.style.setProperty("--ssd-len",String(b[L])),p.style.strokeDasharray=`${b[L]}`;});}}}if(Nt())return st(Ft());function _t(){let s=Math.max(1,Ue),l=0,g=0,N=false;function ye(d){let E=true;if(_){let P=Math.min(1,Math.max(0,d/s)),p=Y(P);ce=p,e.style.setProperty("--scroll-draw-progress",String(p)),e.style.clipPath=le(x==="reverse"?1-p:p),$e?.(p),P<1&&(E=false);}else T.forEach((P,p)=>{let L=p*V*s,Z=Math.min(1,Math.max(0,(d-L)/s)),G=Y(Z);P.style.strokeDashoffset=x==="reverse"?`${b[p]*G}`:`${b[p]*(1-G)}`,u&&(P.style.opacity=x==="reverse"?`${1-G}`:`${G}`),U&&O?P.style.stroke=Re(U,O,G):O&&(P.style.stroke=O),R!==null&&M!==null?P.style.strokeWidth=`${R+(M-R)*G}`:M!==null&&(P.style.strokeWidth=`${M}`),H!==null&&D!==null?P.style.fillOpacity=`${H+(D-H)*G}`:D!==null&&(P.style.fillOpacity=`${D}`),z&&P.tagName.toLowerCase()==="path"&&a[p]&&P.setAttribute("d",lt(a[p],z,G)),p===0&&(ce=G,$e?.(G),e.style.setProperty("--scroll-draw-progress",String(G))),Z<1&&(E=false);});if(oe){let P=Math.min(1,Math.max(0,d/s)),p=Y(P);for(let L in oe){let Z=parseFloat(L);p>=Z&&!Ee.has(Z)&&(Ee.add(Z),oe[L]?.());}}return E}function ue(d){if(k)return;let E=d-l;$||($=true,B?.());let P=ye(E);if(P&&!v){v=true,ye(s*(1+Math.max(0,T.length-1)*V)),W?.(),ge<(C==="infinite"?1/0:C??0)&&(ge++,ve=setTimeout(()=>{l=performance.now(),$=false,v=false,Ee.clear(),Ye(),A=requestAnimationFrame(ue);},_e));return}P||(A=requestAnimationFrame(ue));}function te(){cancelAnimationFrame(A),clearTimeout(ve),l=performance.now(),g=0,k=false,$=false,v=false,ge=0,N=true,ce=0,Ee.clear(),Ye(),A=requestAnimationFrame(ue);}let y=new IntersectionObserver(d=>{d.forEach(E=>{E.isIntersecting&&!(me&&v)?te():!E.isIntersecting&&!me&&!v&&(cancelAnimationFrame(A),clearTimeout(ve),N=false);});},{root:j??null,threshold:Fe,rootMargin:X}),w;function F(){clearTimeout(w),w=setTimeout(()=>{T.forEach((d,E)=>{b[E]=Oe(d),d.style.strokeDasharray=`${b[E]}`;});},150);}return window.addEventListener("resize",F),window.addEventListener("orientationchange",F),he>0?setTimeout(()=>y.observe(e),he):y.observe(e),{destroy(){cancelAnimationFrame(A),clearTimeout(ve),y.disconnect(),window.removeEventListener("resize",F),window.removeEventListener("orientationchange",F),clearTimeout(w);},replay(){ge=0,te();},pause(){k||!N||(k=true,g=performance.now()-l,cancelAnimationFrame(A));},resume(){k&&(k=false,N=true,l=performance.now()-g,A=requestAnimationFrame(ue));},seek(d){let E=Math.min(1,Math.max(0,d));ce=E,k=true,g=E*s,l=performance.now()-g,cancelAnimationFrame(A),ye(g);},getProgress(){return ce},refresh(){clearTimeout(w),T.forEach((d,E)=>{b[E]=Oe(d),d.style.strokeDasharray=`${b[E]}`;});}}}if(He)return st(_t());yt();function Qe(){if(!ee||k)return;let s=performance.now(),l=ot();if(!Se&&be===false&&l===mt){A=requestAnimationFrame(Qe);return}Se=false,mt=l;let g=i;if(be!==false){let y=s-pt,w=y>0?Math.abs(l-(Xe<0?l:Xe))/y:0;g=i*Math.max(.2,1+w*(typeof be=="number"?be:1)*.04);}Xe=l,pt=s;let N=Te?we===-1||l>=we?"forward":"reverse":x;we=l;let ye=q-f,ue=true,te=ye===0?0:(l-f)/ye;if(isNaN(De)||(De<=0&&te>0?se?.():De>0&&te<=0&&de?.(),De<1&&te>=1?Ae?.():De>=1&&te<1&&ie?.()),De=te,_){let y=Y(re(l,f,q,g));me&&!Te&&(Q=Math.max(Q,y),y=Q),ce=y,e.style.setProperty("--scroll-draw-progress",String(y));let w=N==="reverse"?1-y:y;e.style.clipPath=le(w),$e?.(y),!$&&re(l,f,q,g)>0&&($=true,B?.()),y>=1&&!v?(v=true,W?.(),ge<(C==="infinite"?1/0:C??0)&&(ge++,ve=setTimeout(()=>{Q=-1,$=false,v=false,e.style.clipPath=le(0);},_e))):y<1&&!me&&(v=false),A=requestAnimationFrame(Qe);return}if(T.forEach((y,w)=>{let F=w*V*ye,d=Y(re(l,f+F,q+F,g));me&&!Te&&(d=I[w]=Math.max(I[w]??Q,d)),ce=d,y.style.strokeDashoffset=N==="reverse"?`${b[w]*d}`:`${b[w]*(1-d)}`,u&&(y.style.opacity=N==="reverse"?`${1-d}`:`${d}`),U&&O?y.style.stroke=Re(U,O,d):O&&(y.style.stroke=O),R!==null&&M!==null?y.style.strokeWidth=`${R+(M-R)*d}`:M!==null&&(y.style.strokeWidth=`${M}`),H!==null&&D!==null?y.style.fillOpacity=`${H+(D-H)*d}`:D!==null&&(y.style.fillOpacity=`${D}`),z&&y.tagName.toLowerCase()==="path"&&a[w]&&y.setAttribute("d",lt(a[w],z,d)),w===0&&($e?.(d),e.style.setProperty("--scroll-draw-progress",String(d))),d<1&&(ue=false);}),oe){let y=Y(re(l,f,q,g));for(let w in oe){let F=parseFloat(w);y>=F&&!Ee.has(F)&&(Ee.add(F),oe[w]?.());}}!$&&re(l,f,q,g)>0&&($=true,B?.()),ue&&!v?(v=true,W?.(),ge<(C==="infinite"?1/0:C??0)&&(ge++,ve=setTimeout(()=>{Q=-1,I=[],$=false,v=false,Ee.clear(),Ye(),Se=true;},_e))):!ue&&!me&&(v=false),A=requestAnimationFrame(Qe);}let it=false;function Ze(){it||(it=true,A=requestAnimationFrame(function(){Qe();}));}function Ke(){it=false,cancelAnimationFrame(A);}let at=new IntersectionObserver(s=>{s.forEach(l=>{ee=l.isIntersecting,ee&&!k?(Se=true,Ze()):Ke();});},{root:j??null,threshold:Fe,rootMargin:X});function bt(){T.forEach((s,l)=>{b[l]=Oe(s),s.style.strokeDasharray=`${b[l]}`;}),yt(),Se=true;}let Je;function Ve(){clearTimeout(Je),Je=setTimeout(bt,150);}window.addEventListener("resize",Ve),window.addEventListener("orientationchange",Ve);let ze;return typeof ResizeObserver<"u"&&(ze=new ResizeObserver(()=>Ve()),ze.observe(document.body),ze.observe(document.documentElement),ze.observe(e)),he>0?setTimeout(()=>at.observe(e),he):at.observe(e),st({destroy(){cancelAnimationFrame(A),clearTimeout(ve),Ke(),at.disconnect(),ze?.disconnect(),window.removeEventListener("resize",Ve),window.removeEventListener("orientationchange",Ve),clearTimeout(Je),ft();},replay(){Q=-1,I=[],we=-1,Xe=-1,$=false,v=false,ge=0,k=false,ce=0,Ee.clear(),clearTimeout(ve),Ye(),Se=true,ee&&Ze();},pause(){k=true,Ke();},resume(){k&&(k=false,Se=true,ee&&Ze());},seek(s){let l=Math.min(1,Math.max(0,s));ce=l,Q=l,I=[],k=true,Ke(),Rt(l,x),Se=true;},getProgress(){return ce},refresh(){clearTimeout(Je),bt(),ee&&!k&&Ze();}},()=>({tStart:f,tEnd:q}))}function Qt(e){return e.startsWith("#")||e.startsWith("rgb")||e.startsWith("hsl")}function Dt(e){let n=[],r=/([\w]+)\(([^)]*)\)/g,t;for(;(t=r.exec(e))!==null;){let o=[],c=[],m=t[2].trim();if(m)for(let i of m.split(/[\s,]+/)){let u=i.match(/^([-+]?[\d.eE]+)(.*)$/);o.push(u?parseFloat(u[1]):0),c.push(u?u[2]:"");}n.push({fn:t[1],nums:o,units:c});}return n}function Zt(e,n,r){let t=Dt(e),o=Dt(n);return t.length===0||t.length!==o.length?r<1?e:n:t.map((c,m)=>{let i=o[m];return c.fn!==i.fn||c.nums.length!==i.nums.length?r<1?`${c.fn}(${c.nums.map((u,h)=>`${u}${c.units[h]}`).join(", ")})`:`${i.fn}(${i.nums.map((u,h)=>`${u}${i.units[h]}`).join(", ")})`:`${c.fn}(${c.nums.map((u,h)=>`${u+(i.nums[h]-u)*r}${c.units[h]}`).join(", ")})`}).join(" ")}function ut(e,n,r){if(typeof e=="number"&&typeof n=="number")return String(e+(n-e)*r);let t=String(e),o=String(n);if(Qt(t))return Re(t,o,r);if(t.includes("("))return Zt(t,o,r);let c=t.match(/^([-+]?[\d.]+)(.*)$/),m=o.match(/^([-+]?[\d.]+)(.*)$/);if(c&&m){let i=parseFloat(c[1]),u=parseFloat(m[1]);return `${i+(u-i)*r}${c[2]||m[2]}`}return r<1?t:o}function Kt(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}var Jt=new Set(["opacity","transform","background-color","color","filter","scale","translate","rotate"]),er=0,It="--scroll-draw-progress";function tr(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("animation-timeline: view()")}function Ne(e,n){let r={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};if(typeof window>"u")return r;let{props:t,trigger:o={},easing:c="ease-out",speed:m=1,once:i=false,axis:u="y",scrollContainer:h,native:S=true,velocityScale:V=false,respectReducedMotion:x=true,triggerElement:me,onProgress:je,onComplete:K,onEnter:Me,onLeave:Te,onEnterBack:he,onLeaveBack:ne}=n,pe=x&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,J=typeof c=="function"?c:xe[c]??xe["ease-out"],oe=Ie(o.start??"top bottom"),be=Ie(o.end??"bottom top"),Fe=me??e,X=typeof h=="string"?document.querySelector(h):h??null,C=Object.entries(t).map(([a,f])=>({prop:Kt(a),from:Array.isArray(f)?f[0]:"",to:Array.isArray(f)?f[1]:f}));function _e(){let a=window.getComputedStyle(e);for(let f of C)f.from===""&&(f.from=a.getPropertyValue(f.prop).trim()||"0");}function z(){for(let a of C)e.style.setProperty(a.prop,String(a.to));}let ke=new Map;for(let a of [...C.map(f=>f.prop),It])ke.set(a,e.style.getPropertyValue(a));function He(){for(let[a,f]of ke)f?e.style.setProperty(a,f):e.style.removeProperty(a);}if(pe)return z(),K?.(),{...r,destroy:He,getProgress:()=>1};_e();let Ue=typeof c=="string"?tt(c):null;function rt(){if(!S||!tr()||!Ue||u!=="y"||X||Fe!==e||i||m!==1||je||K||Me||Te||he||ne||V!==false||(o.start??"top bottom").trim()!=="top bottom"||(o.end??"bottom top").trim()!=="bottom top")return false;for(let a of C)if(!Jt.has(a.prop))return false;return true}function $e(){let a=`ssd-a-${++er}`,f=C.map(I=>`${I.prop}:${I.from}`).join(";"),q=C.map(I=>`${I.prop}:${I.to}`).join(";"),v=document.createElement("style");v.setAttribute("data-ssd-animate",""),v.textContent=`@keyframes ${a}{from{${f}}to{${q}}}.${a}{animation-name:${a};animation-duration:auto;animation-timing-function:${Ue};animation-fill-mode:both;animation-timeline:view();animation-range:cover 0% cover 100%;}`,document.head.appendChild(v),e.classList.add(a);let $=()=>u==="x"?window.scrollX:window.scrollY,A=()=>u==="x"?window.innerWidth:window.innerHeight,ee=()=>{let I=e.getBoundingClientRect();return Ce({top:I.top,height:I.height},$(),A(),oe,be)};qe(e,{type:"animate",getProgress:()=>Q.getProgress(),getTrigger:ee});let Q={destroy(){e.classList.remove(a),v.remove(),e.style.animationPlayState="",He(),Ge(e);},replay(){e.classList.remove(a),e.offsetWidth,e.classList.add(a);},pause(){e.style.animationPlayState="paused";},resume(){e.style.animationPlayState="";},seek(I){let we=Math.min(1,Math.max(0,I));e.classList.remove(a);for(let k of C)e.style.setProperty(k.prop,ut(k.from,k.to,we));},getProgress(){let{tStart:I,tEnd:we}=ee();return J(re($(),I,we,m))}};return Q}if(rt())return $e();let B=0,W=0,se=0,Ae=false,ie=false,de=-1,_=0,Y=false,ae=NaN,Le=-1,j=0,U=()=>X?u==="x"?X.scrollLeft:X.scrollTop:u==="x"?window.scrollX:window.scrollY,O=()=>X?u==="x"?X.clientWidth:X.clientHeight:u==="x"?window.innerWidth:window.innerHeight;function R(){let a=et(Fe,X,u),f=Ce(a,a.scroll,O(),oe,be);B=f.tStart,W=f.tEnd;}function M(a){e.style.setProperty(It,String(a));for(let f of C)e.style.setProperty(f.prop,ut(f.from,f.to,a));je?.(a);}function H(a){if(isNaN(ae)){ae=a;return}ae<=0&&a>0?Me?.():ae>0&&a<=0&&ne?.(),ae<1&&a>=1?Te?.():ae>=1&&a<1&&he?.(),ae=a;}function D(){if(!Ae||ie)return;let a=performance.now(),f=U(),q=m;if(V!==false){let A=a-j,ee=A>0?Math.abs(f-(Le<0?f:Le))/A:0;q=m*Math.max(.2,1+ee*(typeof V=="number"?V:1)*.04);}Le=f,j=a;let v=W===B?0:(f-B)/(W-B);H(v);let $=J(re(f,B,W,q));i&&(de=Math.max(de,$),$=de),_=$,M($),$>=1&&!Y?(Y=true,K?.()):$<1&&!i&&(Y=false),se=requestAnimationFrame(D);}R(),W===B&&fe("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 a=J(re(U(),B,W,m));i&&a>0&&(de=a),_=a,M(a);}let le=new IntersectionObserver(a=>{a.forEach(f=>{Ae=f.isIntersecting,Ae&&!ie?se=requestAnimationFrame(D):cancelAnimationFrame(se);});},{root:X??null}),T;function b(){clearTimeout(T),T=setTimeout(R,150);}return window.addEventListener("resize",b),window.addEventListener("orientationchange",b),le.observe(e),qe(e,{type:"animate",getProgress:()=>_,getTrigger:()=>({tStart:B,tEnd:W})}),{destroy(){cancelAnimationFrame(se),le.disconnect(),window.removeEventListener("resize",b),window.removeEventListener("orientationchange",b),clearTimeout(T),He(),Ge(e);},replay(){de=-1,Y=false,_=0,ie=false,M(0);},pause(){ie=true,cancelAnimationFrame(se);},resume(){ie&&(ie=false,Ae&&(se=requestAnimationFrame(D)));},seek(a){let f=Math.min(1,Math.max(0,a));_=f,de=f,ie=true,cancelAnimationFrame(se),M(f);},getProgress(){return _}}}var Ct={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function Ot(e,n={}){if(typeof window>"u")return Ct;let r=typeof e=="string"?document.querySelector(e):e;if(!r)return fe("scrollParallax: element not found:",e),Ct;let{speed:t=.3,axis:o="y",easing:c="linear",trigger:m,onProgress:i}=n,u=r.getBoundingClientRect(),h=o==="x"?u.width:u.height,S=t*h;return Ne(r,{props:o==="x"?{transform:["translateX(0px)",`translateX(${-S}px)`]}:{transform:["translateY(0px)",`translateY(${-S}px)`]},trigger:m??{start:"top bottom",end:"bottom top"},easing:c,native:false,onProgress:i})}function Be(e){return e.map(n=>typeof n=="string"?document.querySelector(n):n).filter(n=>n!==null)}var Pe={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function _r(e,n={}){if(typeof window>"u")return Pe;let r=Be(e).map(t=>ct(t,n));return {destroy(){r.forEach(t=>t.destroy());},replay(){r.forEach(t=>t.replay());},pause(){r.forEach(t=>t.pause());},resume(){r.forEach(t=>t.resume());},seek(t){r.forEach(o=>o.seek(t));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(t=>t.refresh?.());}}}function Hr(e,n={}){if(typeof window>"u")return Pe;let r=Be(e);if(r.length===0)return Pe;let t=0,o=[];function c(i){return ct(r[i],{...n,once:true,onComplete(){n.onComplete?.(),t=Math.min(i+1,r.length-1),t>i&&o[t]?.resume();}})}function m(){r.forEach((i,u)=>{o[u]=c(u);});for(let i=1;i<o.length;i++)o[i].pause();}return m(),{destroy(){o.forEach(i=>i.destroy()),o.length=0;},replay(){o.forEach(i=>i.destroy()),o.length=0,t=0,m();},pause(){o[t]?.pause();},resume(){o[t]?.resume();},seek(i){o[t]?.seek(i);},getProgress(){return o[t]?.getProgress()??0},refresh(){o.forEach(i=>i.refresh?.());}}}function Vr(e,n){if(typeof window>"u")return Pe;let r=Be(e).map(t=>Ne(t,n));return {destroy(){r.forEach(t=>t.destroy());},replay(){r.forEach(t=>t.replay());},pause(){r.forEach(t=>t.pause());},resume(){r.forEach(t=>t.resume());},seek(t){r.forEach(o=>o.seek(t));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(t=>t.refresh?.());}}}function zr(e,n){if(typeof window>"u")return Pe;let r=Be(e);if(r.length===0)return Pe;let t=0,o=[];function c(i){return Ne(r[i],{...n,once:true,onComplete(){n.onComplete?.(),t=Math.min(i+1,r.length-1),t>i&&o[t]?.resume();}})}function m(){r.forEach((i,u)=>{o[u]=c(u);});for(let i=1;i<o.length;i++)o[i].pause();}return m(),{destroy(){o.forEach(i=>i.destroy()),o.length=0;},replay(){o.forEach(i=>i.destroy()),o.length=0,t=0,m();},pause(){o[t]?.pause();},resume(){o[t]?.resume();},seek(i){o[t]?.seek(i);},getProgress(){return o[t]?.getProgress()??0},refresh(){o.forEach(i=>i.refresh?.());}}}function Wr(e,n={}){if(typeof window>"u")return Pe;let r=Be(e).map(t=>Ot(t,n));return {destroy(){r.forEach(t=>t.destroy());},replay(){r.forEach(t=>t.replay());},pause(){r.forEach(t=>t.pause());},resume(){r.forEach(t=>t.resume());},seek(t){r.forEach(o=>o.seek(t));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(t=>t.refresh?.());}}}exports.scrollAnimateGroup=Vr;exports.scrollAnimateSequence=zr;exports.scrollDrawGroup=_r;exports.scrollDrawSequence=Hr;exports.scrollParallaxGroup=Wr;
@@ -1 +1 @@
1
- import {b as b$1}from'../chunk-KBFWDHF4.mjs';import {a as a$1}from'../chunk-QJ4H2HW3.mjs';import {b}from'../chunk-WDIHLRZZ.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-PEFR3ZB7.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';function u(s){return s.map(o=>typeof o=="string"?document.querySelector(o):o).filter(o=>o!==null)}var a={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function y(s,o={}){if(typeof window>"u")return a;let r=u(s).map(e=>b(e,o));return {destroy(){r.forEach(e=>e.destroy());},replay(){r.forEach(e=>e.replay());},pause(){r.forEach(e=>e.pause());},resume(){r.forEach(e=>e.resume());},seek(e){r.forEach(n=>n.seek(e));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(e=>e.refresh?.());}}}function E(s,o={}){if(typeof window>"u")return a;let r=u(s);if(r.length===0)return a;let e=0,n=[];function i(t){return b(r[t],{...o,once:true,onComplete(){o.onComplete?.(),e=Math.min(t+1,r.length-1),e>t&&n[e]?.resume();}})}function l(){r.forEach((t,c)=>{n[c]=i(c);});for(let t=1;t<n.length;t++)n[t].pause();}return l(),{destroy(){n.forEach(t=>t.destroy()),n.length=0;},replay(){n.forEach(t=>t.destroy()),n.length=0,e=0,l();},pause(){n[e]?.pause();},resume(){n[e]?.resume();},seek(t){n[e]?.seek(t);},getProgress(){return n[e]?.getProgress()??0},refresh(){n.forEach(t=>t.refresh?.());}}}function d(s,o){if(typeof window>"u")return a;let r=u(s).map(e=>a$1(e,o));return {destroy(){r.forEach(e=>e.destroy());},replay(){r.forEach(e=>e.replay());},pause(){r.forEach(e=>e.pause());},resume(){r.forEach(e=>e.resume());},seek(e){r.forEach(n=>n.seek(e));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(e=>e.refresh?.());}}}function w(s,o){if(typeof window>"u")return a;let r=u(s);if(r.length===0)return a;let e=0,n=[];function i(t){return a$1(r[t],{...o,once:true,onComplete(){o.onComplete?.(),e=Math.min(t+1,r.length-1),e>t&&n[e]?.resume();}})}function l(){r.forEach((t,c)=>{n[c]=i(c);});for(let t=1;t<n.length;t++)n[t].pause();}return l(),{destroy(){n.forEach(t=>t.destroy()),n.length=0;},replay(){n.forEach(t=>t.destroy()),n.length=0,e=0,l();},pause(){n[e]?.pause();},resume(){n[e]?.resume();},seek(t){n[e]?.seek(t);},getProgress(){return n[e]?.getProgress()??0},refresh(){n.forEach(t=>t.refresh?.());}}}function S(s,o={}){if(typeof window>"u")return a;let r=u(s).map(e=>b$1(e,o));return {destroy(){r.forEach(e=>e.destroy());},replay(){r.forEach(e=>e.replay());},pause(){r.forEach(e=>e.pause());},resume(){r.forEach(e=>e.resume());},seek(e){r.forEach(n=>n.seek(e));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(e=>e.refresh?.());}}}export{d as scrollAnimateGroup,w as scrollAnimateSequence,y as scrollDrawGroup,E as scrollDrawSequence,S as scrollParallaxGroup};
1
+ import {b as b$1}from'../chunk-KBFWDHF4.mjs';import {a as a$1}from'../chunk-QJ4H2HW3.mjs';import {b}from'../chunk-LINFV2GK.mjs';import'../chunk-OJFWQ6CU.mjs';import'../chunk-YWKPTYSG.mjs';import'../chunk-YZV4Z3EQ.mjs';import'../chunk-PEFR3ZB7.mjs';import'../chunk-DM6EDKWH.mjs';import'../chunk-4DOJSIEQ.mjs';import'../chunk-BCV4RAIX.mjs';import'../chunk-LFSU6LR3.mjs';function u(s){return s.map(o=>typeof o=="string"?document.querySelector(o):o).filter(o=>o!==null)}var a={destroy:()=>{},replay:()=>{},pause:()=>{},resume:()=>{},seek:()=>{},getProgress:()=>0};function y(s,o={}){if(typeof window>"u")return a;let r=u(s).map(e=>b(e,o));return {destroy(){r.forEach(e=>e.destroy());},replay(){r.forEach(e=>e.replay());},pause(){r.forEach(e=>e.pause());},resume(){r.forEach(e=>e.resume());},seek(e){r.forEach(n=>n.seek(e));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(e=>e.refresh?.());}}}function E(s,o={}){if(typeof window>"u")return a;let r=u(s);if(r.length===0)return a;let e=0,n=[];function i(t){return b(r[t],{...o,once:true,onComplete(){o.onComplete?.(),e=Math.min(t+1,r.length-1),e>t&&n[e]?.resume();}})}function l(){r.forEach((t,c)=>{n[c]=i(c);});for(let t=1;t<n.length;t++)n[t].pause();}return l(),{destroy(){n.forEach(t=>t.destroy()),n.length=0;},replay(){n.forEach(t=>t.destroy()),n.length=0,e=0,l();},pause(){n[e]?.pause();},resume(){n[e]?.resume();},seek(t){n[e]?.seek(t);},getProgress(){return n[e]?.getProgress()??0},refresh(){n.forEach(t=>t.refresh?.());}}}function d(s,o){if(typeof window>"u")return a;let r=u(s).map(e=>a$1(e,o));return {destroy(){r.forEach(e=>e.destroy());},replay(){r.forEach(e=>e.replay());},pause(){r.forEach(e=>e.pause());},resume(){r.forEach(e=>e.resume());},seek(e){r.forEach(n=>n.seek(e));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(e=>e.refresh?.());}}}function w(s,o){if(typeof window>"u")return a;let r=u(s);if(r.length===0)return a;let e=0,n=[];function i(t){return a$1(r[t],{...o,once:true,onComplete(){o.onComplete?.(),e=Math.min(t+1,r.length-1),e>t&&n[e]?.resume();}})}function l(){r.forEach((t,c)=>{n[c]=i(c);});for(let t=1;t<n.length;t++)n[t].pause();}return l(),{destroy(){n.forEach(t=>t.destroy()),n.length=0;},replay(){n.forEach(t=>t.destroy()),n.length=0,e=0,l();},pause(){n[e]?.pause();},resume(){n[e]?.resume();},seek(t){n[e]?.seek(t);},getProgress(){return n[e]?.getProgress()??0},refresh(){n.forEach(t=>t.refresh?.());}}}function S(s,o={}){if(typeof window>"u")return a;let r=u(s).map(e=>b$1(e,o));return {destroy(){r.forEach(e=>e.destroy());},replay(){r.forEach(e=>e.replay());},pause(){r.forEach(e=>e.pause());},resume(){r.forEach(e=>e.resume());},seek(e){r.forEach(n=>n.seek(e));},getProgress(){return r[0]?.getProgress()??0},refresh(){r.forEach(e=>e.refresh?.());}}}export{d as scrollAnimateGroup,w as scrollAnimateSequence,y as scrollDrawGroup,E as scrollDrawSequence,S as scrollParallaxGroup};