import{u as h}from"./vendor-vue-runtime-dom-B2rky8vu.js";import{m as F}from"./vendor-vueform-slider-CCH9_7pb.js";import{u as M}from"./useAppearanceTypography-BBl5RU11.js";import{d as j,e as m,f as o,i as n,x as u,j as w,t as p,F as P,r as S}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{u as i,t as B}from"./vendor-vue-reactivity-CheHbvBM.js";import{t as f,a as v,b as z}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 A={class:"slider-min-max"},D={class:"slider-min-max-item first"},E={class:"label"},L={class:"label"},R={key:0,class:"custom-marks"},U=j({__name:"MultiPoint",props:{field:{}},setup(x){h(a=>({"25955b64":i(k),"42b8b4d7":i(_),"68cf3fa1":i(b)}));const{textColor:b,accentColor:k,containerColor:_}=M(),g=x,{field:t}=B(g),c=(a,s)=>{const e=Number(a);return Number.isFinite(e)?e:s},l=m(()=>c(t.value.min??t.value.minValue,0)),r=m(()=>{const a=c(t.value.max??t.value.maxValue,l.value+100);return a>l.value?a:l.value+1}),d=m(()=>{const a=c(t.value.defaultValue??t.value.default??t.value.value,l.value);return Math.min(r.value,Math.max(l.value,a))}),N=m(()=>{if(t.value.jump)return 1;const a=c(t.value.step,1);return a>0?a:1}),y=m(()=>{var s;return(((s=t.value.scalePoints)==null?void 0:s.trim())||"").split(",").map(e=>Number(e.trim())).filter(e=>!isNaN(e)&&e>=l.value&&e<=r.value)}),C=a=>{const s=Math.max(1,r.value-l.value);return{left:`${(a-l.value)/s*100}%`}},V=a=>{const s=a.toFixed(2);return parseFloat(s).toString()};return(a,s)=>(n(),o("div",{class:v(["slider-wrapper ccb-multi-point-range-field",{jump:i(t).jump}])},[u("div",A,[u("div",D,[s[0]||(s[0]=u("span",{class:"tick"},null,-1)),u("span",E,f(l.value),1)]),u("div",{class:v(["slider-min-max-item",{done:d.value>=r.value}])},[s[1]||(s[1]=u("span",{class:"tick"},null,-1)),u("span",L,f(r.value),1)],2)]),w(i(F),{"model-value":r.value,min:l.value,max:r.value,step:N.value,disabled:!0,"show-tooltip":"focus",class:"custom-slider",format:V},null,8,["model-value","min","max","step"]),i(t).scalePoints?(n(),o("div",R,[(n(!0),o(P,null,S(y.value,e=>(n(),o("div",{key:e,class:"mark",style:z(C(e))},[e!==l.value&&e!==r.value?(n(),o("div",{key:0,class:v(["tick",{"tick-passed":e<=d.value}])},null,2)):p("",!0),e!==l.value&&e!==r.value?(n(),o("div",{key:1,class:v(["label",{"label-passed":e<=d.value}])},f(e),3)):p("",!0)],4))),128))])):p("",!0)],2))}});export{U as default};
//# sourceMappingURL=MultiPoint-_z0eP2vh.js.map
