if (typeof window !== "undefined") { throw new Error("Window global available"); }