import{Fragment as m,jsx as d,jsxs as h}from"/static/js/utils/utils.js?v=c676bb123f83b0ed";// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0-or-later
function v(){let t=document.getElementById("bumpscosity-select");if(!t)return;t.classList.add("hidden"),t.setAttribute("aria-hidden","true");let n=[...t.options].map(e=>parseInt(e.value)),l=parseInt(t.value),a=d("div",{tooltip:l.toString(),style:"position: absolute; translateX(-50%)","aria-hidden":"true"}),r=()=>{a.classList.add("show-tooltip")},u=()=>{a.classList.remove("show-tooltip")},s=()=>{var o,c;let e=(c=(o=n[parseInt(i.value)])==null?void 0:o.toString())!=null?c:"50";t.value=e,a.setAttribute("tooltip",e),a.style.left=(1+98*parseInt(i.value)/(n.length-1)).toString()+"%"},i=d("input",{type:"range",min:"0",id:"bumpscosity-slider",max:(n.length-1).toString(),value:n.indexOf(l).toString(),onpointermove:()=>{r(),s()},onpointerleave:u,onfocusin:r,onblur:u,"aria-valuetext":t.value,"aria-valuemin":n[0].toString(),"aria-valuemax":n[n.length-1].toString(),onchange:()=>{let e=parseInt(i.value),o="Willst du die Bumpscosity wirklich auf ".concat(n[e]," setzen? ");e===n.length-1?confirm(o+"Ein so hoher Wert kann katastrophale Folgen haben.")||e--:e===0&&(confirm(o+"Fehlende Bumpscosity kann großes Unbehagen verursachen.")||e++),i.value=e.toString(),s(),i.setAttribute("aria-valuetext",t.value)}}),p=t.parentElement;p.style.position="relative",p.append(h(m,{children:[a,i]})),i.parentElement.setAttribute("for",i.id),s()}v();
// @license-end
//# sourceMappingURL=settings.js.map
