{"version":3,"file":"CircularProgressBar.C8l3vxRb.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/ZWll1fJWgbCHlCe3KGMT/SraWy2OSYUCGJegcsR8n/C3_KUgzte.js","https:/framerusercontent.com/modules/z7b7f0f7rawLOuDZQNaj/yxaXXq5uMC5FI3W7ogLp/CircularProgressBar.js"],"sourcesContent":["// Generated by Framer (6ca5d98)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,useSVGTemplate,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask=\"var(--framer-icon-mask)\";const Base=/*#__PURE__*/forwardRef(function(props,ref){return /*#__PURE__*/_jsx(\"svg\",{...props,ref:ref,children:props.children});});const MotionSVG=motion.create(Base);const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(MotionSVG,{...rest,layoutId:layoutId,ref:ref,children:children}):/*#__PURE__*/_jsx(\"svg\",{...rest,ref:ref,children:children});});const svg='<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 14.25 13.5 L 0 13.5 L 0 9 L 5.25 9 L 5.25 4.5 L 10.5 4.5 L 10.5 0 L 15.75 0 L 15.75 12 C 15.75 12.828 15.078 13.5 14.25 13.5 Z\" fill-opacity=\"var(--1m6trwb, 0)\" fill=\"var(--21h8s6, rgb(0, 0, 0))\" height=\"13.5px\" id=\"OS5KcxGyH\" transform=\"translate(6.75 5.25)\" width=\"15.75px\"/><path d=\"M 0 13.5 L 5.25 13.5 L 5.25 9 L 10.5 9 L 10.5 4.5 L 15.75 4.5 L 15.75 0 L 21 0\" fill=\"transparent\" height=\"13.5px\" id=\"UAaSNmiRO\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--pgex8v, 1.5)\" stroke=\"var(--21h8s6, rgb(0, 0, 0))\" transform=\"translate(1.5 5.25)\" width=\"21px\"/></svg>';const getProps=({alpha,color,height,id,width,width1,...props})=>{return{...props,ezTt3ayMo:color??props.ezTt3ayMo??\"rgb(0, 0, 0)\",lschgej4H:width1??props.lschgej4H??1.5,qxTvv_EBh:alpha??props.qxTvv_EBh};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,ezTt3ayMo,lschgej4H,qxTvv_EBh,...restProps}=getProps(props);const href=useSVGTemplate(\"3233394945\",svg);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-eTEir\",className),layoutId:layoutId,ref:ref,role:\"presentation\",style:{\"--1m6trwb\":qxTvv_EBh,\"--21h8s6\":ezTt3ayMo,\"--pgex8v\":lschgej4H,...style},viewBox:\"0 0 24 24\",children:/*#__PURE__*/_jsx(\"use\",{href:href})});});const css=[`.framer-eTEir { -webkit-mask: ${mask}; aspect-ratio: 1; display: block; mask: ${mask}; width: 24px; }`];/**\n * This is a generated Framer component.\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerVariables {\"ezTt3ayMo\":\"color\",\"lschgej4H\":\"width1\",\"qxTvv_EBh\":\"alpha\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Steps\",\"color\":{\"type\":\"variable\",\"value\":\"21h8s6\"},\"set\":{\"localId\":\"vectorSet/NGVKdicsm\",\"id\":\"NGVKdicsm\",\"moduleId\":\"omX0gWFPqDwhaiWwf6ab\"}}\n * @framerDisableUnlink true\n */const Icon=withCSS(Component,css,\"framer-eTEir\");Icon.displayName=\"Steps\";export default Icon;addPropertyControls(Icon,{ezTt3ayMo:{defaultValue:\"rgb(0, 0, 0)\",hidden:false,title:\"Color\",type:ControlType.Color},lschgej4H:{defaultValue:1.5,displayStepper:true,hidden:false,max:6,min:0,step:.5,title:\"Width\",type:ControlType.Number},qxTvv_EBh:{defaultValue:0,displayStepper:true,hidden:false,max:1,min:0,step:.1,title:\"Alpha\",type:ControlType.Number}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"true\",\"framerVector\":\"{\\\"name\\\":\\\"Steps\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"21h8s6\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/NGVKdicsm\\\",\\\"id\\\":\\\"NGVKdicsm\\\",\\\"moduleId\\\":\\\"omX0gWFPqDwhaiWwf6ab\\\"}}\",\"framerIntrinsicWidth\":\"24\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerImmutableVariables\":\"true\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"24\",\"framerContractVersion\":\"1\",\"framerVariables\":\"{\\\"ezTt3ayMo\\\":\\\"color\\\",\\\"lschgej4H\\\":\\\"width1\\\",\\\"qxTvv_EBh\\\":\\\"alpha\\\"}\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// Animated circular progress bar with number in center, configurable number and percent\nimport{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}from\"framer-motion\";/**\n * Animated Circular Progress Bar with Number\n *\n * @framerIntrinsicWidth 120\n * @framerIntrinsicHeight 120\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function CircularProgressBar(props){const{number=75,percent=80,strokeWidth=10,barColor=\"#0066FF\",trackColor=\"#F3F4F5\",numberColor=\"#131517\",font,animate=true,duration=1.2,style}=props;const size=100;const radius=(size-strokeWidth)/2;const circumference=2*Math.PI*radius;const isStatic=useIsStaticRenderer();const[progress,setProgress]=useState(animate&&!isStatic?0:percent);const requestRef=useRef();const startTime=useRef();const containerRef=useRef(null);const inView=useInView(containerRef,{once:true,margin:\"-20%\"});// Calculate SVG rotation for start angle and direction\nconst rotation=(props.startAngle||0)-90;const directionSign=props.direction===\"counterclockwise\"?-1:1;const dashOffset=directionSign*circumference*(1-progress/100);useEffect(()=>{if(!animate||isStatic){startTransition(()=>setProgress(percent));return;}if(!inView)return;cancelAnimationFrame(requestRef.current);startTime.current=undefined;function animateStep(ts){if(!startTime.current)startTime.current=ts;const elapsed=(ts-startTime.current)/1e3;const t=Math.min(elapsed/duration,1);const val=percent*t;startTransition(()=>setProgress(val));if(t<1){requestRef.current=requestAnimationFrame(animateStep);}else{startTransition(()=>setProgress(percent));}}requestRef.current=requestAnimationFrame(animateStep);return()=>cancelAnimationFrame(requestRef.current);},[percent,animate,duration,isStatic,inView]);return /*#__PURE__*/_jsxs(\"div\",{ref:containerRef,style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",position:\"relative\",...style},children:[/*#__PURE__*/_jsxs(\"svg\",{width:\"100%\",height:\"100%\",viewBox:\"0 0 100 100\",style:{position:\"absolute\",top:0,left:0,transform:`rotate(${rotation}deg)`},preserveAspectRatio:\"xMidYMid meet\",children:[/*#__PURE__*/_jsx(\"circle\",{cx:50,cy:50,r:radius,stroke:trackColor,strokeWidth:strokeWidth,fill:\"none\"}),/*#__PURE__*/_jsx(\"circle\",{cx:50,cy:50,r:radius,stroke:barColor,strokeWidth:strokeWidth,fill:\"none\",strokeDasharray:circumference,strokeDashoffset:dashOffset,strokeLinecap:\"round\",style:{transition:animate&&!isStatic?undefined:\"stroke-dashoffset 0.4s\"}})]}),/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",zIndex:1,width:\"100%\",display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{color:numberColor,display:\"inline-block\",width:\"100%\",textAlign:\"center\",...font},children:/*#__PURE__*/_jsx(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:numberColor,strokeWidth:\"3\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:/*#__PURE__*/_jsx(\"polyline\",{points:\"20 6 10.75 17 4 11.5\"})})}),props.label&&/*#__PURE__*/_jsx(\"span\",{style:{color:props.labelColor,marginTop:4,width:\"100%\",textAlign:\"center\",...props.labelFont},children:props.label})]})]});}addPropertyControls(CircularProgressBar,{number:{type:ControlType.Number,title:\"Number\",defaultValue:75,min:0,max:1e4,step:1},percent:{type:ControlType.Number,title:\"Percent\",defaultValue:80,min:0,max:100,step:1,unit:\"%\"},strokeWidth:{type:ControlType.Number,title:\"Bar Width\",defaultValue:10,min:2,max:40,step:1,unit:\"px\"},barColor:{type:ControlType.Color,title:\"Bar Color\",defaultValue:\"#0066FF\"},trackColor:{type:ControlType.Color,title:\"Track Color\",defaultValue:\"#F3F4F5\"},numberColor:{type:ControlType.Color,title:\"Number Color\",defaultValue:\"#131517\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"32px\",variant:\"Bold\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}},animate:{type:ControlType.Boolean,title:\"Animate\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:1.2,min:.2,max:5,step:.1,unit:\"s\",hidden:({animate})=>!animate},startAngle:{type:ControlType.Number,title:\"Start Angle\",defaultValue:0,min:0,max:360,step:1,unit:\"\\xb0\"},direction:{type:ControlType.Enum,title:\"Direction\",options:[\"clockwise\",\"counterclockwise\"],optionTitles:[\"Clockwise\",\"Counterclockwise\"],defaultValue:\"clockwise\",displaySegmentedControl:true},label:{type:ControlType.String,title:\"Label\",defaultValue:\"\",placeholder:\"Label text...\"},labelFont:{type:ControlType.Font,title:\"Label Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"},hidden:({label})=>!label},labelColor:{type:ControlType.Color,title:\"Label Color\",defaultValue:\"#7B818E\",hidden:({label})=>!label}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CircularProgressBar\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicHeight\":\"120\",\"framerIntrinsicWidth\":\"120\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CircularProgressBar.map"],"mappings":"sUAC2C,IAAqF,IAA4B,CAAoC,EAAK,0BAAgC,EAAkB,EAAW,SAAS,EAAM,EAAI,CAAC,OAAoB,EAAK,MAAM,CAAC,GAAG,EAAU,MAAI,SAAS,EAAM,SAAS,CAAC,EAAG,CAAO,EAAU,EAAO,OAAO,EAAK,CAAO,EAAiB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,WAAS,WAAS,WAAS,GAAG,GAAM,EAAM,OAAO,EAAsB,EAAK,EAAU,CAAC,GAAG,EAAc,WAAa,MAAa,WAAS,CAAC,CAAc,EAAK,MAAM,CAAC,GAAG,EAAS,MAAa,WAAS,CAAC,EAAG,CAAO,EAAI,4sBAAktB,GAAU,CAAC,QAAM,QAAM,SAAO,KAAG,QAAM,SAAO,GAAG,MAAgB,CAAC,GAAG,EAAM,UAAU,GAAO,EAAM,WAAW,eAAe,UAAU,GAAQ,EAAM,WAAW,IAAI,UAAU,GAAO,EAAM,UAAU,EAUliD,EAAK,EAV6jD,EAAiB,SAAS,EAAM,EAAI,CAAC,GAAK,CAAC,QAAM,YAAU,WAAS,UAAQ,YAAU,YAAU,YAAU,GAAG,GAAW,EAAS,EAAM,CAAO,EAAK,EAAe,aAAa,EAAI,CAAC,OAAoB,EAAK,EAAI,CAAC,GAAG,EAAU,UAAU,EAAG,eAAe,EAAU,CAAU,W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