UNPKG

@getontime/cli

Version:

Time keeping for live events

2 lines 1.64 kB
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`f14ad0099eab1969fdd065b56af5fdd3cf530de6`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`6c8d6e80-aa49-4631-8c48-a2c9bfe98389`,e._sentryDebugIdIdentifier=`sentry-dbid-6c8d6e80-aa49-4631-8c48-a2c9bfe98389`)}catch{}})();import{t as e}from"./jsx-runtime-BNC90REB.js";import{K as t}from"./constants-8b9Q9Bj6.js";import{n,t as r}from"./useAnimatedProgress-DJlteBY2.js";var i=e();function a(e){let{now:a,complete:o,eventId:s,normalColor:c,warning:l,warningColor:u,danger:d,dangerColor:f,hidden:p,hideOvertime:m,ignoreCssOverride:h,className:g=``}=e,_=100-r(a,o,s),v=d?100-n(d,o):0,y=l?100-v-n(l,o):0,b=a!==null&&a<0&&!m;return(0,i.jsx)(`div`,{className:t([`multiprogress-bar`,p&&`multiprogress-bar--hidden`,h&&`multiprogress-bar--ignore-css-override`,g]),children:a!==null&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(`div`,{className:`multiprogress-bar__bg`,children:[(0,i.jsx)(`div`,{className:`multiprogress-bar__bg-normal`,style:{backgroundColor:c}}),(0,i.jsx)(`div`,{className:`multiprogress-bar__bg-warning`,style:{width:`${y}%`,backgroundColor:u}}),(0,i.jsx)(`div`,{className:t([`multiprogress-bar__bg-danger`,b&&`multiprogress-bar__bg-danger--overtime`]),style:{width:`${v}%`,backgroundColor:b?void 0:f}})]}),(0,i.jsx)(`div`,{className:`multiprogress-bar__indicator`,children:(0,i.jsx)(`div`,{className:`multiprogress-bar__indicator-bar`,style:{width:`${_}%`}})})]})})}export{a as t}; //# sourceMappingURL=MultiPartProgressBar-B4jgVUIf.js.map