import { wrap } from './wrap' ; import type { UnknownEvent , AnalyticsEvent } from './wrap' ; export const sendAnalyticsEvent = < K extends UnknownEvent = AnalyticsEvent , T extends K = K > ( event ) => { try { window . postMessage ( wrap ( event ) , window . origin ) ; } catch ( e ) { console . error ( e ) ; } } ;