1import{S as B,d as F,h as n,i as u,aL as h,t as v,k as z,aH as I,N as d,y as m,aW as P,X as b,F as V,z as L,I as R,aO as D,aP as C,R as s,aS as t,aQ as f}from"./CfwR7KjC.js";import{u as E}from"./B_ZaJEvG.js";const H={wrapper:"w-full flex flex-col gap-2",indicator:{container:{base:"flex flex-row justify-end",width:"min-w-fit",transition:"transition-all"},align:"text-end",width:"w-fit",color:"text-gray-400 dark:text-gray-500",size:{"2xs":"text-xs",xs:"text-xs",sm:"text-sm",md:"text-sm",lg:"text-sm",xl:"text-base","2xl":"text-base"}},progress:{base:"block appearance-none border-none overflow-hidden",width:"w-full [&::-webkit-progress-bar]:w-full",size:{"2xs":"h-px",xs:"h-0.5",sm:"h-1",md:"h-2",lg:"h-3",xl:"h-4","2xl":"h-5"},rounded:"rounded-full [&::-webkit-progress-bar]:rounded-full",track:"[&::-webkit-progress-bar]:bg-gray-200 [&::-webkit-progress-bar]:dark:bg-gray-700 [@supports(selector(&::-moz-progress-bar))]:bg-gray-200 [@supports(selector(&::-moz-progress-bar))]:dark:bg-gray-700",bar:"[&::-webkit-progress-value]:rounded-full [&::-webkit-progress-value]:transition-all [&::-webkit-progress-value]:ease-in-out [&::-moz-progress-bar]:rounded-full",color:"text-{color}-500 dark:text-{color}-400",background:"[&::-webkit-progress-value]:bg-current [&::-moz-progress-bar]:bg-current",indeterminate:{base:"indeterminate:relative",rounded:"indeterminate:after:rounded-full [&:indeterminate::-webkit-progress-value]:rounded-full [&:indeterminate::-moz-progress-bar]:rounded-full"}},steps:{base:"grid grid-cols-1",color:"text-{color}-500 dark:text-{color}-400",size:{"2xs":"text-xs",xs:"text-xs",sm:"text-sm",md:"text-sm",lg:"text-sm",xl:"text-base","2xl":"text-base"}},step:{base:"transition-all opacity-0 truncate row-start-1 col-start-1",align:"text-end",active:"opacity-100",first:"text-gray-500 dark:text-gray-400"},animation:{carousel:"bar-animation-carousel","carousel-inverse":"bar-animation-carousel-inverse",swing:"bar-animation-swing",elastic:"bar-animation-elastic"},default:{color:"primary",size:"md",animation:"carousel"}},i=D(f.ui.strategy,f.ui.progress,H),J=F({inheritAttrs:!1,props:{value:{type:Number,default:null},max:{type:[Number,Array],default:100},indicator:{type:Boolean,default:!1},animation:{type:String,default:()=>i.default.animation,validator(e){return Object.keys(i.animation).includes(e)}},size:{type:String,default:()=>i.default.size,validator(e){return Object.keys(i.progress.size).includes(e)}},color:{type:String,default:()=>i.default.color,validator(e){return f.ui.colors.includes(e)}},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},setup(e){const{ui:a,attrs:y}=E("progress",C(e,"ui"),i,C(e,"class")),x=s(()=>t(a.value.indicator.container.base,a.value.indicator.container.width,a.value.indicator.container.transition)),w=s(()=>t(a.value.indicator.align,a.value.indicator.width,a.value.indicator.color,a.value.indicator.size[e.size])),k=s(()=>{var o;const r=[a.value.progress.base,a.value.progress.width,a.value.progress.size[e.size],a.value.progress.rounded,a.value.progress.track,a.value.progress.bar,(o=a.value.progress.color)==null?void 0:o.replaceAll("{color}",e.color),a.value.progress.background,a.value.progress.indeterminate.base,a.value.progress.indeterminate.rounded];return g.value&&r.push(a.value.animation[e.animation]),t(...r)}),c=s(()=>{var r;return t(a.value.steps.base,(r=a.value.steps.color)==null?void 0:r.replaceAll("{color}",e.color),a.value.steps.size[e.size])}),l=s(()=>t(a.value.step.base,a.value.step.align)),S=s(()=>t(a.value.step.active)),A=s(()=>t(a.value.step.first));function $(r){return r===Number(e.value)}function N(r){return r===0}function j(r){r=Number(r);const o=[l.value];return N(r)&&o.push(A.value),$(r)&&o.push(S.value),o.join(" ")}const g=s(()=>e.value===void 0||e.value===null),M=s(()=>Array.isArray(e.max)),p=s(()=>g.value?null:Array.isArray(e.max)?e.max.length-1:Number(e.max)),O=s(()=>{if(!g.value)switch(!0){case e.value<0:return 0;case e.value>p.value:return 100;default:return e.value/p.value*100}});return{ui:a,attrs:y,indicatorContainerClass:x,indicatorClass:w,progressClass:k,stepsClass:c,stepClasse
1s:j,isIndeterminate:g,isSteps:M,realMax:p,percent:O}}}),Q=["aria-valuemax","aria-valuenow"];function T(e,a,y,x,w,k){return u(),n("div",{class:d(e.ui.wrapper),role:"progressbar"},[e.indicator||e.$slots.indicator?h(e.$slots,"indicator",P(b({key:0},{percent:e.percent})),()=>[e.isSteps?v("",!0):(u(),n("div",{key:0,class:d(e.indicatorContainerClass),style:I({width:`${e.percent}%`})},[z("div",{class:d(e.indicatorClass)},m(Math.round(e.percent))+"% ",3)],6))],!0):v("",!0),z("progress",b({"aria-valuemax":e.realMax,"aria-valuenow":e.value,class:e.progressClass},{value:e.value,max:e.realMax,...e.attrs}),m(e.percent!==void 0?`${Math.round(e.percent)}%`:void 0),17,Q),e.isSteps?(u(),n("div",{key:1,class:d(e.stepsClass)},[(u(!0),n(V,null,L(e.max,(c,l)=>(u(),n("div",{key:l,class:d(e.stepClasses(l))},[h(e.$slots,`step-${l}`,b({ref_for:!0},{step:c}),()=>[R(m(c),1)],!0)],2))),128))],2)):v("",!0)],2)}const X=B(J,[["render",T],["__scopeId","data-v-63bb5bec"]]);export{X as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.