(message2)
| 1293 | } |
| 1294 | function createHandlers(scheduler2) { |
| 1295 | function remoteUpdates(message2) { |
| 1296 | if (!message2 || !message2.event || !message2.event.id) { |
| 1297 | console.error("Invalid message format:", message2); |
| 1298 | return; |
| 1299 | } |
| 1300 | const { type, event: event2 } = message2; |
| 1301 | if (scheduler2._dp && scheduler2._dp._in_progress[event2.id]) { |
| 1302 | return; |
| 1303 | } |
| 1304 | if (type === "add-event" && scheduler2._dp) { |
| 1305 | for (const id in scheduler2._dp._in_progress) { |
| 1306 | if (scheduler2._dp.getState(id) === "inserted") { |
| 1307 | scheduler2._dp.attachEvent("onFullSync", function() { |
| 1308 | if (!scheduler2.getEvent(event2.id)) { |
| 1309 | processUpdate(type, event2); |
| 1310 | } |
| 1311 | }, { once: true }); |
| 1312 | return; |
| 1313 | } |
| 1314 | } |
| 1315 | } |
| 1316 | processUpdate(type, event2); |
| 1317 | } |
| 1318 | function processUpdate(type, event2) { |
| 1319 | switch (type) { |
| 1320 | case "add-event": |
nothing calls this directly
no test coverage detected