{"version":3,"sources":["jsdelivr-header.js","/npm/react-native-event-source@1.0.5/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,OCNO,gBAAiB,gBAExB,MAAM,cACJ,WAAA,CAAY,EAAK,EAAQ,CAAC,GACxB,KAAK,IAAc,EACnB,KAAK,QAAc,EACnB,KAAK,YAAc,IAAI,YAAY,EAAK,GACxC,KAAK,UAAc,EACrB,CACA,gBAAA,CAAkB,EAAM,GACtB,KAAK,YAAY,iBAAiB,EAAM,GAUxC,OAJA,KAAK,UAAU,KAAK,CAClB,OALa,KACb,KAAK,eAAe,EAAM,EAAS,EAInB,KAAM,EAAM,SAAU,IAGjC,KAAK,UAAU,KAAK,UAAU,OAAS,EAChD,CACA,kBAAA,GACE,KAAK,UAAU,KAAK,IAClB,EAAS,QAAQ,GAErB,CACA,cAAA,CAAe,EAAM,GACnB,KAAK,YAAY,oBAAoB,EAAM,EAC7C,CACA,KAAA,GACE,KAAK,YAAY,OACnB,iBAGa","file":"/npm/react-native-event-source@1.0.5/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/react-native-event-source@1.0.5/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import EventSource from './EventSource'\n\nclass RNEventSource {\n  constructor(url, options={}) {\n    this.url         = url;\n    this.options     = options;\n    this.eventSource = new EventSource(url, options);\n    this.listeners   = [];\n  }\n  addEventListener (type, listener) {\n    this.eventSource.addEventListener(type, listener)\n\n    const remove = () => {\n      this.removeListener(type, listener);\n    }\n\n    this.listeners.push({\n      remove: remove, type: type, listener: listener\n    });\n\n    return this.listeners[this.listeners.length - 1];\n  }\n  removeAllListeners () {\n    this.listeners.map((listener) => {\n      listener.remove();\n    });\n  }\n  removeListener(type, listener) {\n    this.eventSource.removeEventListener(type, listener);\n  }\n  close () {\n    this.eventSource.close();\n  }\n}\n\nexport default RNEventSource;\n"]}