System.register([], function (_export, _context) {
  "use strict";

  var EventTarget, __SystemJSRewritingHack;
  _export("default", void 0);
  return {
    setters: [],
    execute: function () {
      __SystemJSRewritingHack = {};
      _recorder_._https__lively_kernel_org_lively4_lively4_ansgar_src_client_reactive_utils_event_target_js = _recorder_._https__lively_kernel_org_lively4_lively4_ansgar_src_client_reactive_utils_event_target_js || {};
      /**
       * A slightly smarter EventTarget class
       */
      _export("default", EventTarget = class EventTarget {
        constructor() {
          this.callbacks = new Map();
        }
        _callbacksFor(type) {
          return this.callbacks.getOrCreate(type, () => new Set());
        }
        addEventListener(type, callback) {
          const callbacks = this._callbacksFor(type);
          callbacks.add(callback);
        }
        removeEventListener(type, callback) {
          const callbacks = this._callbacksFor(type);
          callbacks.delete(callback);
        }
        dispatchEvent(type, ...params) {
          const callbacks = this._callbacksFor(type);
          callbacks.forEach(callback => callback.apply(undefined, params));
        }
        getEventListeners(type) {
          return Array.from(this._callbacksFor(type));
        }
      });
      Object.defineProperty(_recorder_._https__lively_kernel_org_lively4_lively4_ansgar_src_client_reactive_utils_event_target_js, "EventTarget", {
        get() {
          return EventTarget;
        },
        set(thisIsVererySecretVariableName) {
          _export("default", EventTarget = thisIsVererySecretVariableName);
          return true;
        },
        enumerable: true,
        configurable: true
      });
    }
  };
});