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

  return {
    setters: [],
    execute: function () {
      const __SystemJSRewritingHack = {};
      _recorder_._src_client_reactive_active_expression_rewriting_bidirectional_multi_map_js = _recorder_._src_client_reactive_active_expression_rewriting_bidirectional_multi_map_js || {};
      class BidirectionalMultiMap {

        constructor() {
          this.domainToRange = new Map();
          this.rangeToDomain = new Map();
        }

        associate(left, right) {
          this.getRightsFor(left).add(right);
          this.getLeftsFor(right).add(left);
        }

        remove(left, right) {
          this.getRightsFor(left).delete(right);
          this.getLeftsFor(right).delete(left);
        }

        removeAllRightFor(left) {
          this.getRightsFor(left).forEach(right => this.remove(left, right));
        }

        removeAllLeftFor(right) {
          this.getLeftsFor(right).forEach(left => this.remove(left, right));
        }

        clear() {
          this.domainToRange.clear();
          this.rangeToDomain.clear();
        }

        getRightsFor(left) {
          return this.domainToRange.getOrCreate(left, () => new Set());
        }

        getLeftsFor(right) {
          return this.rangeToDomain.getOrCreate(right, () => new Set());
        }

        getAllLeft() {
          return Array.from(this.domainToRange.keys());
        }

        getAllRight() {
          return Array.from(this.rangeToDomain.keys());
        }

      }

      _export("default", BidirectionalMultiMap);

      Object.defineProperty(_recorder_._src_client_reactive_active_expression_rewriting_bidirectional_multi_map_js, "BidirectionalMultiMap", {
        get() {
          return BidirectionalMultiMap;
        },

        set(thisIsVererySecretVariableName) {
          _export("default", BidirectionalMultiMap = thisIsVererySecretVariableName);

          return true;
        },

        enumerable: true,
        configurable: true
      });
    }
  };
});