import{r as u,j as c,c as I}from"./app-BeNY_zSm.js";import{d as R,a as j}from"./button-Dge8PO59.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};r.SENTRY_RELEASE={id:"d90f819d28d132ee9ad7641cbed0d6343dd98ccf"}}catch{}})();try{(function(){var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new r.Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="38b2312c-a967-4bb1-80e8-ff7c412c13b7",r._sentryDebugIdIdentifier="sentry-dbid-38b2312c-a967-4bb1-80e8-ff7c412c13b7")})()}catch{}function D(r,e=[]){let a=[];function s(i,l){const t=u.createContext(l);t.displayName=i+"Context";const n=a.length;a=[...a,l];const d=f=>{const{scope:m,children:x,...p}=f,E=m?.[r]?.[n]||t,C=u.useMemo(()=>p,Object.values(p));return c.jsx(E.Provider,{value:C,children:x})};d.displayName=i+"Provider";function P(f,m){const x=m?.[r]?.[n]||t,p=u.useContext(x);if(p)return p;if(l!==void 0)return l;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[d,P]}const o=()=>{const i=a.map(l=>u.createContext(l));return function(t){const n=t?.[r]||i;return u.useMemo(()=>({[`__scope${r}`]:{...t,[r]:n}}),[t,n])}};return o.scopeName=r,[s,M(o,...e)]}function M(...r){const e=r[0];if(r.length===1)return e;const a=()=>{const s=r.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const l=s.reduce((t,{useScope:n,scopeName:d})=>{const f=n(i)[`__scope${d}`];return{...t,...f}},{});return u.useMemo(()=>({[`__scope${e.scopeName}`]:l}),[l])}};return a.scopeName=e.scopeName,a}var T=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],w=T.reduce((r,e)=>{const a=R(`Primitive.${e}`),s=u.forwardRef((o,i)=>{const{asChild:l,...t}=o,n=l?a:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(n,{...t,ref:i})});return s.displayName=`Primitive.${e}`,{...r,[e]:s}},{}),g="Progress",b=100,[A]=D(g),[V,L]=A(g),N=u.forwardRef((r,e)=>{const{__scopeProgress:a,value:s=null,max:o,getValueLabel:i=O,...l}=r;(o||o===0)&&!y(o)&&console.error(k(`${o}`,"Progress"));const t=y(o)?o:b;s!==null&&!h(s,t)&&console.error(G(`${s}`,"Progress"));const n=h(s,t)?s:null,d=v(n)?i(n,t):void 0;return c.jsx(V,{scope:a,value:n,max:t,children:c.jsx(w.div,{"aria-valuemax":t,"aria-valuemin":0,"aria-valuenow":v(n)?n:void 0,"aria-valuetext":d,role:"progressbar","data-state":_(n,t),"data-value":n??void 0,"data-max":t,...l,ref:e})})});N.displayName=g;var $="ProgressIndicator",S=u.forwardRef((r,e)=>{const{__scopeProgress:a,...s}=r,o=L($,a);return c.jsx(w.div,{"data-state":_(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...s,ref:e})});S.displayName=$;function O(r,e){return`${Math.round(r/e*100)}%`}function _(r,e){return r==null?"indeterminate":r===e?"complete":"loading"}function v(r){return typeof r=="number"}function y(r){return v(r)&&!isNaN(r)&&r>0}function h(r,e){return v(r)&&!isNaN(r)&&r<=e&&r>=0}function k(r,e){return`Invalid prop \`max\` of value \`${r}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${b}\`.`}function G(r,e){return`Invalid prop \`value\` of value \`${r}\` supplied to \`${e}\`. The \`value\` prop must be:
  - a positive number
  - less than the value passed to \`max\` (or ${b} if no \`max\` prop is set)
  - \`null\` or \`undefined\` if the progress is indeterminate.

Defaulting to \`null\`.`}var X=N,B=S;function U(r){const e=I.c(12);let a,s,o;e[0]!==r?({className:a,value:o,...s}=r,e[0]=r,e[1]=a,e[2]=s,e[3]=o):(a=e[1],s=e[2],o=e[3]);let i;e[4]!==a?(i=j("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",a),e[4]=a,e[5]=i):i=e[5];const l=`translateX(-${100-(o||0)}%)`;let t;e[6]!==l?(t=c.jsx(B,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:l}}),e[6]=l,e[7]=t):t=e[7];let n;return e[8]!==s||e[9]!==i||e[10]!==t?(n=c.jsx(X,{"data-slot":"progress",className:i,...s,children:t}),e[8]=s,e[9]=i,e[10]=t,e[11]=n):n=e[11],n}export{U as P};
//# sourceMappingURL=progress-JV5TVlXN.js.map
