import{c as e}from"./security-CTzQb9Ko.js";import{$i as t,Qi as n,a as r}from"./bundle-mjs-lcbR1pPJ.js";import{K as i}from"./dist-C0UdmnhX.js";var a=e(t(),1),o=e(n(),1);function s(e,t=[]){let n=[];function r(t,r){let i=a.createContext(r);i.displayName=t+`Context`;let s=n.length;n=[...n,r];let c=t=>{let{scope:n,children:r,...c}=t,l=n?.[e]?.[s]||i,u=a.useMemo(()=>c,Object.values(c));return(0,o.jsx)(l.Provider,{value:u,children:r})};c.displayName=t+`Provider`;function l(n,o){let c=o?.[e]?.[s]||i,l=a.useContext(c);if(l)return l;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[c,l]}let i=()=>{let t=n.map(e=>a.createContext(e));return function(n){let r=n?.[e]||t;return a.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,c(i,...t)]}function c(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}i();var l=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=r(`Primitive.${t}`),i=a.forwardRef((e,r)=>{let{asChild:i,...a}=e,s=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,o.jsx)(s,{...a,ref:r})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{}),u=`Progress`,d=100,[f,p]=s(u),[m,h]=f(u),g=a.forwardRef((e,t)=>{let{__scopeProgress:n,value:r=null,max:i,getValueLabel:a=y,...s}=e;(i||i===0)&&!S(i)&&console.error(w(`${i}`,`Progress`));let c=S(i)?i:d;r!==null&&!C(r,c)&&console.error(T(`${r}`,`Progress`));let u=C(r,c)?r:null,f=x(u)?a(u,c):void 0;return(0,o.jsx)(m,{scope:n,value:u,max:c,children:(0,o.jsx)(l.div,{"aria-valuemax":c,"aria-valuemin":0,"aria-valuenow":x(u)?u:void 0,"aria-valuetext":f,role:`progressbar`,"data-state":b(u,c),"data-value":u??void 0,"data-max":c,...s,ref:t})})});g.displayName=u;var _=`ProgressIndicator`,v=a.forwardRef((e,t)=>{let{__scopeProgress:n,...r}=e,i=h(_,n);return(0,o.jsx)(l.div,{"data-state":b(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});v.displayName=_;function y(e,t){return`${Math.round(e/t*100)}%`}function b(e,t){return e==null?`indeterminate`:e===t?`complete`:`loading`}function x(e){return typeof e==`number`}function S(e){return x(e)&&!isNaN(e)&&e>0}function C(e,t){return x(e)&&!isNaN(e)&&e<=t&&e>=0}function w(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${d}\`.`}function T(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
  - a positive number
  - less than the value passed to \`max\` (or ${d} if no \`max\` prop is set)
  - \`null\` or \`undefined\` if the progress is indeterminate.

Defaulting to \`null\`.`}var E=g,D=v;export{E as n,D as t};