{"version":3,"file":"CountUp.DolaaT8l.mjs","names":["useRef","useState","startTransition"],"sources":["https:/framerusercontent.com/modules/tqBK6omXyz298OePaiCx/903KurkU8UQhALbqg75r/CountUp.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useInView,animate}from\"framer-motion\";/**\n * Count Up\n *\n * Counts from zero to a number once when scrolled into view.\n *\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 80\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function CountUp(props){const{value=536,decimals=0,prefix=\"\",suffix=\"\",duration=2,color=\"#000000\",font}=props;const ref=useRef(null);const isStatic=useIsStaticRenderer();const inView=useInView(ref,{once:true,amount:.6});const[current,setCurrent]=useState(isStatic?value:0);useEffect(()=>{if(isStatic||!inView)return;const controls=animate(0,value,{duration,ease:[.22,1,.36,1],onUpdate:v=>startTransition(()=>setCurrent(v))});return()=>controls.stop();},[inView,isStatic,value,duration]);const shown=isStatic?value:current;const text=shown.toLocaleString(\"en-US\",{minimumFractionDigits:decimals,maximumFractionDigits:decimals});const finalText=value.toLocaleString(\"en-US\",{minimumFractionDigits:decimals,maximumFractionDigits:decimals});return /*#__PURE__*/_jsxs(\"span\",{ref:ref,\"aria-label\":`${prefix}${finalText}${suffix}`,style:{position:\"relative\",display:\"inline-block\",whiteSpace:\"nowrap\",minWidth:\"max-content\",fontVariantNumeric:\"tabular-nums\",margin:0,color,...font,...props.style},children:[/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{visibility:\"hidden\"},children:`${prefix}${finalText}${suffix}`}),/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{position:\"absolute\",left:0,top:0},children:`${prefix}${text}${suffix}`})]});}addPropertyControls(CountUp,{value:{type:ControlType.Number,title:\"Value\",defaultValue:536,min:0,max:1e8,step:.1},decimals:{type:ControlType.Number,title:\"Decimals\",defaultValue:0,min:0,max:2,step:1,displayStepper:true},prefix:{type:ControlType.String,title:\"Prefix\",defaultValue:\"\"},suffix:{type:ControlType.String,title:\"Suffix\",defaultValue:\"\"},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:2,min:.5,max:5,step:.1,unit:\"s\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000000\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"96px\",variant:\"Extra Bold\",letterSpacing:\"-0.035em\",lineHeight:\"1em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CountUp\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"80\",\"framerIntrinsicWidth\":\"200\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CountUp.map"],"mappings":"sQAUG,SAAwB,EAAQ,EAAM,CAAC,GAAK,CAAC,QAAM,IAAI,WAAS,EAAE,SAAO,GAAG,SAAO,GAAG,WAAS,EAAE,QAAM,UAAU,QAAM,EAAY,EAAIA,EAAO,IAAI,EAAQ,EAAS,EAAoB,EAAQ,EAAO,EAAU,EAAI,CAAC,KAAK,GAAK,OAAO,EAAE,CAAC,EAAO,CAAC,EAAQ,GAAYC,EAAS,EAAS,EAAM,CAAC,EAAE,MAAc,CAAC,GAAG,GAAU,CAAC,EAAO,OAAO,IAAM,EAAS,EAAQ,EAAE,EAAM,CAAC,WAAS,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,SAAS,GAAGC,MAAoB,EAAW,CAAC,CAAC,CAAC,CAAC,EAAE,UAAU,EAAS,KAAK,CAAE,EAAE,CAAC,EAAO,EAAS,EAAM,CAAQ,CAAC,EAAqC,IAAM,GAA7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