{"version":3,"sources":["common/pubsub/pub-sub.ts"],"names":["PubSub","globalThis","console","error"],"mappings":"AAOO,MAAMA,OAGTC,WAAWD,OAEVA,QAA4B,UAAlB,OAAOA,QAClBE,QAAQC,MAAM,8BAA8B,SANnCH,M","file":"pub-sub.js","sourcesContent":["/**\r\n * This is a wrapper around the PubSubJS library.\r\n * It assumes that the PubSubJS library is loaded in the global scope.\r\n * In the future when we get rid of globally loaded PubSubJS, we can change this class to import PubSubJS from a module.\r\n */\r\nexport type pubSubEventCallBack = (topic: string, eventData: TEventData) => void;\r\n\r\nexport const PubSub: {\r\n publish(topic: string, data?: T) : void;\r\n subscribe(topic: string, callBack: pubSubEventCallBack) : void;\r\n} = globalThis.PubSub;\r\n\r\nif (!PubSub || typeof PubSub !== 'object') {\r\n console.error('PubSub library is not loaded');\r\n}"]}