'use client' import Script from 'next/script' declare global { interface Window { Office?: { onReady: () => Promise<{ host: string | null; platform: string | null }> } } } /** * Office.js nullifies window.history.replaceState and pushState (a legacy * IE10 workaround inside the library) which breaks Next.js's client-side * router. Cache the originals at module load — before