import{t as e}from"./react-BDcLiltL.js";import{s as t}from"./utils-B9nbfI1Y.js";var n={windowSize:null,smoothing:.6,showRaw:!0,showSmoothed:!0,showAvgLine:!0,lossScale:`linear`,lrScale:`linear`,gradScale:`linear`,lossOutlierMode:`none`,gradOutlierMode:`none`,lrOutlierMode:`none`},r=e(e=>({availableSteps:0,...n,setAvailableSteps:n=>e(e=>{let r=Math.max(0,Math.round(n));return e.windowSize==null||r<=0?{availableSteps:r}:e.windowSize>=r?{availableSteps:r,windowSize:null}:{availableSteps:r,windowSize:t(Math.round(e.windowSize),1,r)}}),setWindowSize:n=>e(e=>{if(n==null||e.availableSteps<=0)return{windowSize:null};let r=t(Math.round(n),1,e.availableSteps);return{windowSize:r>=e.availableSteps?null:r}}),setSmoothing:n=>e({smoothing:t(n,0,.9)}),setShowRaw:t=>e({showRaw:t}),setShowSmoothed:t=>e({showSmoothed:t}),setShowAvgLine:t=>e({showAvgLine:t}),setLossScale:t=>e({lossScale:t}),setLrScale:t=>e({lrScale:t}),setGradScale:t=>e({gradScale:t}),setLossOutlierMode:t=>e({lossOutlierMode:t}),setGradOutlierMode:t=>e({gradOutlierMode:t}),setLrOutlierMode:t=>e({lrOutlierMode:t}),resetPreferences:()=>e({...n})}));export{r as t};