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

  var CompositeKey, __SystemJSRewritingHack;
  _export("default", void 0);
  return {
    setters: [],
    execute: function () {
      __SystemJSRewritingHack = {};
      _recorder_._https__lively_kernel_org_lively4_lively4_ansgar_src_client_reactive_active_expression_rewriting_composite_key_js = _recorder_._https__lively_kernel_org_lively4_lively4_ansgar_src_client_reactive_active_expression_rewriting_composite_key_js || {};
      _export("default", CompositeKey = class CompositeKey {
        constructor() {
          this._compositeKeyStore = new Map();
          this._compositeKeyStoreReverse = new Map();
        }
        _newMap() {
          return new Map();
        }
        _getByPrimaryKey(obj1) {
          return this._compositeKeyStore.getOrCreate(obj1, this._newMap);
        }
        _get(obj1, obj2) {
          const secondKeyMap = this._getByPrimaryKey(obj1);
          if (!secondKeyMap.has(obj2)) {
            const compKey = {};
            secondKeyMap.set(obj2, compKey);
            this._compositeKeyStoreReverse.set(compKey, [obj1, obj2]);
          }
          return secondKeyMap.get(obj2);
        }
        for(obj1, obj2) {
          return this._get(obj1, obj2);
        }

        /**
         * Reverse operation of @link(for)
         */
        keysFor(compKey) {
          return this._compositeKeyStoreReverse.get(compKey) || [];
        }
        remove(compKey) {
          const [obj1, obj2] = this._compositeKeyStoreReverse.get(compKey);
          const secondKeyMap = this._getByPrimaryKey(obj1);
          secondKeyMap.delete(obj2);
          if (secondKeyMap.size === 0) {
            this._compositeKeyStore.delete(obj1);
          }
          this._compositeKeyStoreReverse.delete(compKey);
        }
        clear() {
          this._compositeKeyStore.clear();
          this._compositeKeyStoreReverse.clear();
        }
      });
      Object.defineProperty(_recorder_._https__lively_kernel_org_lively4_lively4_ansgar_src_client_reactive_active_expression_rewriting_composite_key_js, "CompositeKey", {
        get() {
          return CompositeKey;
        },
        set(thisIsVererySecretVariableName) {
          _export("default", CompositeKey = thisIsVererySecretVariableName);
          return true;
        },
        enumerable: true,
        configurable: true
      });
    }
  };
});