"use strict";
// Polyfill for vitest
//
if (typeof globalThis.AudioWorkletNode === "undefined") {
    globalThis.AudioWorkletNode = class AudioWorkletNode {
    };
}
if (typeof globalThis.localStorage === "undefined") {
    const store = new Map();
    Object.defineProperty(globalThis, "localStorage", {
        value: {
            getItem: (key) => store.get(key) ?? null,
            setItem: (key, value) => store.set(key, value),
            removeItem: (key) => store.delete(key),
            clear: () => store.clear(),
            get length() { return store.size; },
            key: (index) => [...store.keys()][index] ?? null
        }
    });
}
