
/**
 * 由 Fantastic-admin 提供技术支持
 * Powered by Fantastic-admin
 * https://fantastic-admin.hurui.me
 */
  
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vue-ui-digits-BnMqGAhl-qRhJ9sSu.js","./reactivity.esm-bundler-D9OPVc9J.js","./runtime-core.esm-bundler-D-xeQwTN.js","./lib-C-QGo8GG-CvPpiVvZ.js","./rolldown-runtime-Dy4uBu1J-DK3Fl9T5.js","./useConfig-C0V0eG7L-BW30Wel-.js","./_plugin-vue_export-helper-B3ysoDQm-BDNMzG2s.js","./useNestedProp-BYfiWVP8-DbrxFlsg.js","./PackageVersion-BUmadjVO-D-GRfJH2.js"])))=>i.map(i=>d[i]);
import{B as e,C as t,Ct as n,Tt as r,bt as i}from"./reactivity.esm-bundler-D9OPVc9J.js";import{D as a,E as o,Ht as s,Lt as c,O as l,_ as u,b as d,ct as f,g as p,mt as m,o as h,xt as g,y as _}from"./runtime-core.esm-bundler-D-xeQwTN.js";import{t as v}from"./preload-helper-HclGiUj8.js";import{J as y,O as b,xt as x}from"./lib-C-QGo8GG-CvPpiVvZ.js";import{t as S}from"./rolldown-runtime-Dy4uBu1J-DK3Fl9T5.js";import{t as C}from"./useConfig-C0V0eG7L-BW30Wel-.js";import{t as w}from"./useNestedProp-BYfiWVP8-DbrxFlsg.js";import{t as T}from"./usePrefersMotion-BC-CsqR1-Ctsp4D2U.js";var E=S({default:()=>A}),D=[`aria-labelledby`],O=[`id`],k=[`aria-label`],A={__name:`vue-ui-kpi`,props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(S){let E=l(()=>v(()=>import(`./vue-ui-digits-BnMqGAhl-qRhJ9sSu.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url)),{vue_ui_kpi:A}=C(),j=T(),M=S,N=p({get:()=>L(),set:e=>e}),P=c(),F=p(()=>N.value.debug),I=t(y());f(()=>{P[`chart-background`]&&F.value&&console.warn(`VueUiKpi does not support the #chart-background slot.`)});function L(){return w({userConfig:M.config,defaultConfig:A})}s(()=>M.config,e=>{N.value=L(),V()},{deep:!0});let R=t((M.dataset,M.dataset)),z=t(N.value.useAnimation?N.value.animationValueStart:R.value),B=e=>{let t=N.value.animationFrames,n=Math.abs(e-z.value)/t;function r(){z.value<e?z.value=Math.min(z.value+n,e):z.value>e&&(z.value=Math.max(z.value-n,e)),z.value!==e&&requestAnimationFrame(r)}r()};f(()=>{V()});function V(){N.value.useAnimation&&!j.value?(z.value=N.value.animationValueStart,B(M.dataset)):z.value=M.dataset}return s(()=>M.dataset,e=>{N.value.useAnimation&&!j.value?B(e):z.value=e}),(t,s)=>(m(),d(`div`,{class:i(`vue-data-ui-component vue-ui-kpi ${N.value.layoutClass}`),style:n(`background:${N.value.backgroundColor}; ${N.value.layoutCss}`),"aria-labelledby":`kpi-title-${I.value}`},[N.value.title||t.$slots.title?(m(),d(`div`,{key:0,class:i(`vue-ui-kpi-title ${N.value.titleClass}`),style:n(`font-family: ${N.value.fontFamily}; font-size:${N.value.titleFontSize}px; color:${N.value.titleColor}; font-weight:${N.value.titleBold?`bold`:`normal`}; ${N.value.titleCss}`),id:`kpi-title-${I.value}`},[g(t.$slots,`title`,{comment:S.dataset}),o(` `+r(N.value.title),1)],14,O)):_(``,!0),g(t.$slots,`comment-before`,{comment:S.dataset}),u(`div`,{class:i(`vue-ui-kpi-value ${N.value.valueClass}`),style:n(`font-family: ${N.value.fontFamily}; font-size:${N.value.valueFontSize}px; color:${N.value.valueColor}; font-weight:${N.value.valueBold?`bold`:`normal`}; ${N.value.valueCss}`),role:`status`,"aria-live":`polite`,"aria-atomic":`true`,"aria-label":z.value.toFixed(N.value.valueRounding)},[g(t.$slots,`value`,{comment:S.dataset}),N.value.analogDigits.show?(m(),d(`div`,{key:0,style:n({height:N.value.analogDigits.height+`px`})},[a(e(E),{dataset:Number(z.value.toFixed(N.value.valueRounding)),config:{backgroundColor:N.value.backgroundColor,digits:{color:N.value.analogDigits.color,skeletonColor:N.value.analogDigits.skeletonColor}}},null,8,[`dataset`,`config`])],4)):(m(),d(h,{key:1},[o(r(e(x)(N.value.formatter,z.value,e(b)({p:N.value.prefix,v:z.value,s:N.value.suffix,r:N.value.valueRounding}))),1)],64))],14,k),g(t.$slots,`comment-after`,{comment:S.dataset})],14,D))}};export{E as n};