import{u as F}from"./vendor-vue-runtime-dom-B2rky8vu.js";import{m as S}from"./vendor-vueform-slider-CCH9_7pb.js";import{u as j}from"./useAppearanceTypography-BBl5RU11.js";import{d as w,e as n,f as m,i as c,x as u,j as M,t as f,F as B,r as P}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{u as o,t as z}from"./vendor-vue-reactivity-CheHbvBM.js";import{t as p,a as d,b as A}from"./vendor-vue-shared-DrzsEcag.js";import"./useAppearanceStore-IzenP-G4.js";import"./vendor-pinia-BSPefQhS.js";import"./vendor-axios-xsH4HHeE.js";import"./vendor-vue3-toastify-DBGjcIyK.js";const D={class:"slider-min-max"},E={class:"slider-min-max-item first"},L={class:"label"},R={class:"label"},$={key:0,class:"custom-marks"},W=w({__name:"Small",props:{field:{}},setup(_){F(a=>({17139267:o(k),"117c7af4":o(h),b1354938:o(b),"075dd774":o(x)}));const{formFieldsColor:x,textColor:b,accentColor:k,containerColor:h}=j(),g=_,{field:s}=z(g),i=(a,l)=>{const e=Number(a);return Number.isFinite(e)?e:l},t=n(()=>i(s.value.min??s.value.minValue,0)),r=n(()=>{const a=i(s.value.max??s.value.maxValue,t.value+100);return a>t.value?a:t.value+1}),v=n(()=>{const a=i(s.value.defaultValue??s.value.default??s.value.value,t.value);return Math.min(r.value,Math.max(t.value,a))}),C=n(()=>{if(s.value.jump)return 1;const a=i(s.value.step,1);return a>0?a:1}),N=n(()=>{var l;return(((l=s.value.scalePoints)==null?void 0:l.trim())||"").split(",").map(e=>Number(e.trim())).filter(e=>!isNaN(e)&&e>=t.value&&e<=r.value)}),V=a=>{const l=Math.max(1,r.value-t.value);return{left:`${(a-t.value)/l*100}%`}},y=a=>{const l=a.toFixed(2);return parseFloat(l).toString()};return(a,l)=>(c(),m("div",{class:d(["slider-wrapper ccb-small-range-field",{jump:o(s).jump}])},[u("div",D,[u("div",E,[u("span",L,p(t.value),1)]),u("div",{class:d(["slider-min-max-item",{done:v.value>=r.value}])},[u("span",R,p(r.value),1)],2)]),M(o(S),{"model-value":r.value,min:t.value,max:r.value,step:C.value,disabled:!0,"show-tooltip":"focus",class:"custom-slider",marks:!0,format:y},null,8,["model-value","min","max","step"]),o(s).scalePoints?(c(),m("div",$,[(c(!0),m(B,null,P(N.value,e=>(c(),m("div",{key:e,class:"mark",style:A(V(e))},[u("div",{class:d(["tick",{"tick-passed":e<=v.value}])},null,2),e!==t.value&&e!==r.value?(c(),m("div",{key:0,class:d(["label",{"label-passed":e<=v.value}])},p(e),3)):f("",!0)],4))),128))])):f("",!0)],2))}});export{W as default};
//# sourceMappingURL=Small-E_F8sE9d.js.map
