/*!
Copyright (c) 2026 Lenovo SSG BASD. All rights reserved.
@license Proprietary

This software is the confidential and proprietary property of Lenovo SSG BASD.
You shall not disclose such Confidential Information and shall use it only in
accordance with the terms of the license agreement.

--- Build Info ---
Version: 1.1.1
Build Time: 2026/2/26 17:21:00
Build Commit: 81e556ed827e2f043668506dae6fae8dbb9ef395
*/
import{ref as e,computed as t,unref as a,watchEffect as n,watch as o,onMounted as r,openBlock as i,createElementBlock as l,toDisplayString as s,normalizeStyle as u}from"vue";import{useTransition as d,TransitionPresets as p}from"../../node_modules/@vueuse/core/dist/index.js";import './index.css';/* empty css          */import f from"../../_virtual/_plugin-vue_export-helper.js";import m from"../../node_modules/lodash-es/isNumber.js";const c={key:0},y=/* @__PURE__ */f(/* @__PURE__ */Object.assign({name:"GscCountTo"},{__name:"index",props:{startVal:{type:Number,default:0},endVal:{type:Number,default:2021},duration:{type:Number,default:2e3},autoplay:{type:Boolean,default:!0},decimals:{type:Number,default:0,validator:e=>e>=0},inSvg:Boolean,prefix:{type:String,default:""},suffix:{type:String,default:""},separator:{type:String,default:","},decimal:{type:String,default:"."},color:{type:String},useEasing:{type:Boolean,default:!0},transition:{type:String,default:"linear"}},emits:["onStarted","onFinished"],setup(f,{expose:y,emit:v}){const g=f,x=v,S=e(g.startVal),_=e(!1);let b=d(S);const V=t(()=>function(e){if(!e&&0!==e)return"";const{decimals:t,decimal:a,separator:n,suffix:o,prefix:r}=g;e=Number(e).toFixed(t);const i=(e+="").split(".");let l=i[0];const s=i.length>1?a+i[1]:"",u=/(\d+)(\d{3})/;if(n&&!m(n))for(;u.test(l);)l=l.replace(u,`$1${n}$2`);return r+l+s+o}(a(b)));function h(){N(),S.value=g.endVal}function N(){b=d(S,{disabled:_,duration:g.duration,onFinished:()=>x("onFinished"),onStarted:()=>x("onStarted"),...g.useEasing?{transition:p[g.transition]}:{}})}return n(()=>{S.value=g.startVal}),o([()=>g.startVal,()=>g.endVal],()=>{g.autoplay&&h()}),r(()=>{g.autoplay&&h()}),y({reset:function(){S.value=g.startVal,N()}}),(e,t)=>f.inSvg?(i(),l("text",c,s(V.value),1)):(i(),l("span",{key:1,style:u({color:f.color})},s(V.value),5))}}),[["__scopeId","data-v-55fa29ca"]]);export{y as default};