type CategoryId = 'necessary' | 'preferences' | 'analytics' | 'marketing'; interface CcConfig { storageKey: string; policyVersion: string; categories: readonly { id: CategoryId; required: boolean }[]; } interface ConsentPayload { policyVersion: string; updatedAt: string; categories: Record; } const EVENT_NAME = 'nexstudio:cookie-consent'; const PANEL_ID = 'nx-cc-dialog'; /** Chrome può usare come `target` un nodo `#text` dentro al `