{"version":3,"file":"ProgressBar.DSECTdM4.mjs","names":["l","s","a","u","d","i","p","r","n","o"],"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":"+QAAuS,SAAS,EAAE,EAAE,EAAE,EAAE,CAAC,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,EAAG,CAKrV,SAAwB,EAAE,EAAE,CAAC,IAAI,EAAEA,EAAE,QAAQ,IAAIA,EAAE,OAAO,EAAE,EAAE,cAAc,GAAG,EAAE,QAAQ,KAAK,EAAE,SAAS,KAAK,EAAE,YAAY,KAAK,EAAE,WAAW,IAAI,GAAG,EAAE,OAAO,IAAI,EAAc,EAAE,WAAd,WAAwB,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,GAAG,EAAE,EAAEC,EAAE,IAAI,EAAE,EAAEC,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,GAAGC,EAAE,IAAI,EAAE,EAAEC,EAAE,EAAE,CAAC,KAAK,CAAQ,GAAW,OAAQ,OAAO,MAAM,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,GAAG,IAAI,GAAG,EAAE,KAAK,EAAE,EAAEC,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,CAAC,EAAG,CAAC,OAAOC,MAAM,CAAQ,GAAW,SAAU,UAAU,EAAE,CAAE,EAAE,CAAC,CAAC,EAAEA,MAAM,CAAC,GAAU,GAAW,SAAU,gBAAgB,EAAE,EAAE,GAAG,GAAG,EAAE,KAAK,EAAE,EAAE,IAAI,CAAC,GAAI,EAAE,CAAC,C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