import{i as m,s as u,l as p,o as v,m as y,e as h,v as I,u as M,n as g}from"./index-DF5uCdwt.js";const B=m({__name:"AnimatedCounter",props:{value:{},duration:{default:1600},decimals:{default:0},prefix:{default:""},suffix:{default:""},format:{default:"plain"},start:{default:0}},setup(o){const e=o,s=u(e.prefix+e.start.toFixed(e.decimals)+e.suffix),a=u(null);let t=null,i=!1;function l(n){return e.format==="short"?n>=1e6?(n/1e6).toFixed(1)+"M":n>=1e3?(n/1e3).toFixed(1)+"K":n.toFixed(e.decimals):e.format==="currency"?Math.round(n).toLocaleString():n.toFixed(e.decimals)}function c(){if(i)return;i=!0;const n=performance.now(),r=e.start,x=e.value;function f(w){const d=Math.min(1,(w-n)/e.duration),_=1-Math.pow(1-d,3),F=r+(x-r)*_;s.value=e.prefix+l(F)+e.suffix,d<1&&requestAnimationFrame(f)}requestAnimationFrame(f)}return p(()=>{a.value&&("IntersectionObserver"in window?(t=new IntersectionObserver(n=>{n.some(r=>r.isIntersecting)&&(c(),t==null||t.disconnect())},{threshold:.3}),t.observe(a.value)):c())}),v(()=>t==null?void 0:t.disconnect()),(n,r)=>(y(),h("span",{ref_key:"root",ref:a,class:"tabular-nums"},I(s.value),513))}}),O=m({__name:"ScrollReveal",props:{delay:{default:0},threshold:{default:.15},once:{type:Boolean,default:!0},animation:{default:"slide-up"}},setup(o){const e=o,s=u(null),a=u(!1);let t=null;return p(()=>{if(s.value){if(!("IntersectionObserver"in window)){a.value=!0;return}t=new IntersectionObserver(i=>{for(const l of i)l.isIntersecting?(setTimeout(()=>a.value=!0,e.delay),e.once&&(t==null||t.disconnect())):e.once||(a.value=!1)},{threshold:e.threshold}),t.observe(s.value)}}),v(()=>t==null?void 0:t.disconnect()),(i,l)=>(y(),h("div",{ref_key:"root",ref:s,class:g(["transition-all duration-700 ease-out",a.value?"opacity-100 translate-y-0 scale-100":o.animation==="slide-up"?"opacity-0 translate-y-6":o.animation==="slide-down"?"opacity-0 -translate-y-6":o.animation==="scale-in"?"opacity-0 scale-95":"opacity-0"])},[M(i.$slots,"default")],2))}});export{B as _,O as a};
