{"version":3,"file":"ProgressBar.BkrdZUmE.mjs","names":["l","s","a","u","d","i","p","r","n","o","__esmMin","init_npm_react_18_3_1","_e","de","init_jsx_runtime","c$1","ce","useInView","motion","useMotionValue","useTransform","animate","init_framer_motion_DhsWWWsN","addPropertyControls","RenderTarget","ControlType","init_framer_BWFVvmND","g","o","f","m","t","c","y","h","b","x","V","C","v","$","R","init_ProgressBar"],"sources":["https:/framerusercontent.com/modules/Dt3Ctnjfi73V1dbLevbe/DUOkVdS60IihGLeEYQWK/ProgressBar.js"],"sourcesContent":["import{jsx as e}from\"react/jsx-runtime\";import{addPropertyControls as t,ControlType as o,RenderTarget as l}from\"framer\";import{motion as r,animate as i,useMotionValue as a,useTransform as n,useInView as d}from\"framer-motion\";import{useState as u,useEffect as p,useRef as s}from\"react\";let m=1e3;function g(e,t,o){return e<t?0:e>o?1:(e-t)/(o-t);}/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 40\n */export default function f(t){let o=l.current()===l.canvas,m=t.radiusIsMixed?`${t.topLeft}px ${t.topRight}px ${t.bottomRight}px ${t.bottomLeft}px`:`${t.radius}px`,f=\"vertical\"==t.direction,c=g(t.value,t.min,t.max),{fill:y,alignment:h,animation:b}=t,x=s(null),V=a(o||!b?1e3*c:0),[C,v]=u(null),$=d(x,{once:!(null==b?void 0:b.replay),amount:\"some\"});function R(){!o&&b&&(C&&C.stop(),v(i(V,1e3*c,b.transition)));}return p(()=>{(null==b?void 0:b.trigger)==\"appear\"&&R();},[]),p(()=>{o||(null==b?void 0:b.trigger)!=\"layerInView\"||($?R():(C&&C.stop(),V.set(0)));},[$]),/*#__PURE__*/e(\"div\",{ref:x,style:{display:\"flex\",flexDirection:\"horizontal\"==t.direction?\"row\":\"column\",justifyContent:h,borderRadius:m,backgroundColor:t.background,overflow:\"hidden\",...t.style},children:/*#__PURE__*/e(r.div,{initial:!1,style:{[f?\"width\":\"height\"]:\"100%\",[f?\"height\":\"width\"]:n(V,e=>`${e/1e3*100}%`),[\"color\"==y.mode?\"backgroundColor\":\"backgroundImage\"]:n(V,e=>{let t=e/1e3;return\"color\"==y.mode?y.color:`linear-gradient(to ${f?\"bottom\":\"right\"}, ${y.startColor} ${\"center\"==h?50+-50/t:\"flex-end\"==h?-100/t+100:0}%, ${y.endColor} ${\"center\"==h?50+50/t:\"flex-start\"==h?100/t:100}%)`;}),borderRadius:t.innerRadius?m:\"0px\"}})});}f.displayName=\"Progress Bar\";let c={trigger:\"layerInView\",replay:!0};t(f,{value:{type:o.Number,defaultValue:80},min:{type:o.Number,defaultValue:0},max:{type:o.Number,defaultValue:100},fill:{type:o.Object,controls:{mode:{type:o.Enum,defaultValue:\"gradient\",options:[\"color\",\"gradient\"],optionTitles:[\"Solid\",\"Gradient\"],displaySegmentedControl:!0},color:{type:o.Color,defaultValue:\"#6019FA\",hidden:e=>\"color\"!=e.mode},startColor:{type:o.Color,defaultValue:\"#6019FA\",hidden:e=>\"gradient\"!=e.mode},endColor:{type:o.Color,defaultValue:\"#00CCFF\",hidden:e=>\"gradient\"!=e.mode}}},background:{type:o.Color,defaultValue:\"#EDEDED\",optional:!0},direction:{type:o.Enum,defaultValue:\"horizontal\",options:[\"horizontal\",\"vertical\"],displaySegmentedControl:!0},alignment:{type:o.Enum,defaultValue:\"flex-start\",options:[\"flex-start\",\"center\",\"flex-end\"],optionIcons:{direction:{horizontal:[\"align-left\",\"align-center\",\"align-right\"],vertical:[\"align-top\",\"align-middle\",\"align-bottom\"]}},displaySegmentedControl:!0},radius:{type:o.FusedNumber,defaultValue:10,toggleKey:\"radiusIsMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"topLeft\",\"topRight\",\"bottomRight\",\"bottomLeft\"],valueLabels:[\"TL\",\"TR\",\"BR\",\"BL\"],min:0},innerRadius:{type:o.Boolean,defaultValue:!0},animation:{type:o.Object,defaultValue:c,optional:!0,icon:\"effect\",controls:{trigger:{type:o.Enum,defaultValue:c.trigger,options:[\"appear\",\"layerInView\"],optionTitles:[\"Appear\",\"Layer in View\"],displaySegmentedControl:!0,segmentedControlDirection:\"vertical\"},replay:{type:o.Boolean,defaultValue:c.replay,hidden:e=>\"layerInView\"!==e.trigger},transition:{type:o.Transition}}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProgressBar\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicHeight\":\"40\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"400\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProgressBar.map"],"mappings":"A,8QAAuS,SAAS2B,EAAE,EAAE,EAAE,EAAE,CAAC,OAAO,EAAE,EAAE,EAAE,EAAEC,EAAE,GAAG,EAAE,IAAIA,EAAE,EAAG,CAKrV,SAAwBC,EAAE,EAAE,CAAC,IAAID,EAAE5B,EAAE,QAAQ,IAAIA,EAAE,OAAO8B,EAAEC,EAAE,cAAc,GAAGA,EAAE,QAAQ,KAAKA,EAAE,SAAS,KAAKA,EAAE,YAAY,KAAKA,EAAE,WAAW,IAAI,GAAGA,EAAE,OAAO,IAAI,EAAcA,EAAE,WAAd,WAAwBC,EAAEL,EAAEI,EAAE,MAAMA,EAAE,IAAIA,EAAE,GAAG,EAAE,CAAC,KAAKE,EAAE,UAAUC,EAAE,UAAUC,GAAGJ,EAAEK,EAAEnC,EAAE,IAAI,EAAEoC,EAAEnC,EAAE0B,GAAG,CAACO,EAAE,IAAIH,EAAE,CAAC,EAAE,CAACM,EAAEC,GAAGpC,EAAE,IAAI,EAAEqC,EAAEpC,EAAEgC,EAAE,CAAC,KAAK,CAAQD,GAAW,OAAQ,OAAO,MAAM,CAAC,EAAE,SAASM,GAAG,CAAC,CAACb,GAAGO,IAAIG,GAAGA,EAAE,KAAK,EAAEC,EAAElC,EAAEgC,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