export function debounce(f, wait = 200) {
    let timeout = undefined;
    return function () {
        const context = this;
        const args = arguments;
        window.clearTimeout(timeout);
        timeout = window.setTimeout(() => f.apply(context, args), wait);
    };
}
