function interval(range = [], options = {}) {
const [min = 0, max = 1] = range;
const {
step = 0.001,
label = null,
value = [min, max],
format = ([start, end]) => `${start} … ${end}`,
updateOnSlide = true,
color,
width,
theme
} = options;
const ele = Inputs.range(range, options);
let container = html`<div></div>`;
ele.addEventListener("input", (evt) => {
evt.stopPropagation();
container.value = ele.value;
if (updateOnSlide) {
container.dispatchEvent(new Event("input", { bubbles: true }));
}
});
ele.addEventListener("change", (evt) => {
evt.stopPropagation();
container.value = ele.value;
container.dispatchEvent(new Event("input", { bubbles: true }));
});
container.appendChild(ele);
container.value = ele.value;
return container;
}