"enable aexpr";

System.register(["active-expression-rewriting", "reactive-jsx", "utils"], function (_export, _context) {
  "use strict";

  var _aexpr, _getAndCallMember, _setLocal, _getLocal, _traceMember, _getMember, _getGlobal, _setMember, _addSourceLocation, uuid;

  return {
    setters: [function (_activeExpressionRewriting) {
      _aexpr = _activeExpressionRewriting.aexpr;
      _getAndCallMember = _activeExpressionRewriting.getAndCallMember;
      _setLocal = _activeExpressionRewriting.setLocal;
      _getLocal = _activeExpressionRewriting.getLocal;
      _traceMember = _activeExpressionRewriting.traceMember;
      _getMember = _activeExpressionRewriting.getMember;
      _getGlobal = _activeExpressionRewriting.getGlobal;
      _setMember = _activeExpressionRewriting.setMember;
    }, function (_reactiveJsx) {
      _addSourceLocation = _reactiveJsx.addSourceLocation;
    }, function (_utils) {
      uuid = _utils.uuid;
    }],
    execute: function () {
      const __SystemJSRewritingHack = {};
      _recorder_._src_components_halo_Connection_js = _recorder_._src_components_halo_Connection_js || {};
      let _scope = {},
          _scope3 = {};
      _setMember((self.__expressionAnalysisMode__ ? _getGlobal("window") : void 0, window), "allConnections", _getMember((self.__expressionAnalysisMode__ ? _getGlobal("window") : void 0, window), "allConnections") || new (self.__expressionAnalysisMode__ ? _getGlobal("Set") : void 0, Set)());

      if (self.__expressionAnalysisMode__) _traceMember(Object, "defineProperty");
      Object.defineProperty(_getMember((self.__expressionAnalysisMode__ ? _getGlobal("_recorder_") : void 0, _recorder_), "_src_components_halo_Connection_js"), "uuid", {
        get() {
          return self.__expressionAnalysisMode__ ? _getLocal(_scope, "uuid", uuid) : void 0, uuid;
        },

        set(thisIsVererySecretVariableName) {
          let _scope2 = {};
          uuid = (self.__expressionAnalysisMode__ ? _getLocal(_scope2, "thisIsVererySecretVariableName", thisIsVererySecretVariableName) : void 0, thisIsVererySecretVariableName), true ? _setLocal(_scope, "uuid", uuid) : void 0, uuid;
          return true;
        },

        enumerable: true,
        configurable: true
      });
      class Connection {

        static nextId() {
          return (self.__expressionAnalysisMode__ ? _getLocal(_scope, "uuid", uuid) : void 0, uuid)();
          // this._currentId = this._currentId || 1
          // return this._currentId++
        }

        targetIsFunction() {
          try {
            return _getMember(_getMember(this, "target"), _getMember(this, "_targetProperty")) instanceof (self.__expressionAnalysisMode__ ? _getGlobal("Function") : void 0, Function);
          } catch (e) {
            return false;
          }
        }

        constructor(source, sourceProperty, target, targetProperty, isEvent) {
          let _scope4 = {};

          _setMember(this, "id", (self.__expressionAnalysisMode__ ? _traceMember(Connection, "nextId") : void 0, (self.__expressionAnalysisMode__ ? _getLocal(_scope3, "Connection", Connection) : void 0, Connection).nextId()));
          _getAndCallMember(_getMember((self.__expressionAnalysisMode__ ? _getGlobal("window") : void 0, window), "allConnections"), "add", [this]);

          _setMember(this, "target", (self.__expressionAnalysisMode__ ? _getLocal(_scope4, "target", target) : void 0, target));
          _setMember(this, "_targetProperty", (self.__expressionAnalysisMode__ ? _getLocal(_scope4, "targetProperty", targetProperty) : void 0, targetProperty));
          _setMember(this, "source", (self.__expressionAnalysisMode__ ? _getLocal(_scope4, "source", source) : void 0, source));
          _setMember(this, "_sourceProperty", (self.__expressionAnalysisMode__ ? _getLocal(_scope4, "sourceProperty", sourceProperty) : void 0, sourceProperty));
          _setMember(this, "isEvent", (self.__expressionAnalysisMode__ ? _getLocal(_scope4, "isEvent", isEvent) : void 0, isEvent));
          _setMember(this, "isActive", false);
          _setMember(this, "_eventListener", evt => {
            let _scope5 = {};
            return self.__expressionAnalysisMode__ ? _traceMember(this, "connectionFunction") : void 0, this.connectionFunction((self.__expressionAnalysisMode__ ? _getLocal(_scope5, "evt", evt) : void 0, evt));
          });
          _setMember(this, "_targetProperty", (self.__expressionAnalysisMode__ ? _traceMember(this, "cleanProperty") : void 0, this.cleanProperty(_getMember(this, "_targetProperty"))));

          if (self.__expressionAnalysisMode__ ? _getLocal(_scope4, "isEvent", isEvent) : void 0, isEvent) {
            if (self.__expressionAnalysisMode__ ? _traceMember(this, "targetIsFunction") : void 0, this.targetIsFunction()) {
              _setMember(this, "modifyingCode", `(target, event) => {
  target.${_getMember(this, "_targetProperty")}(event);
}`);
            } else {
              _setMember(this, "modifyingCode", `(target, event) => {
  target.${_getMember(this, "_targetProperty")} = event;
}`);
            }

            _setMember(this, "trackingCode", _getMember(this, "_sourceProperty"));
          } else {
            if (self.__expressionAnalysisMode__ ? _traceMember(this, "targetIsFunction") : void 0, this.targetIsFunction()) {
              _setMember(this, "modifyingCode", `(target, sourceValue) => {
  target.${_getMember(this, "_targetProperty")}(sourceValue);
}`);
            } else {
              _setMember(this, "modifyingCode", `(target, sourceValue) => {
  target.${_getMember(this, "_targetProperty")} = sourceValue;
}`);
            }

            _setMember(this, "_sourceProperty", (self.__expressionAnalysisMode__ ? _traceMember(this, "cleanProperty") : void 0, this.cleanProperty(_getMember(this, "_sourceProperty"))));
            _setMember(this, "trackingCode", `(source) => {
  return source.${_getMember(this, "_sourceProperty")};
}`);
          }
          if (self.__expressionAnalysisMode__) _traceMember(this, "makeSavingScript");
          this.makeSavingScript();
        }

        get sourceProperty() {
          return _getMember(this, "_sourceProperty");
        }

        get targetProperty() {
          return _getMember(this, "_targetProperty");
        }

        cleanProperty(property) {
          let _scope6 = {};

          return _getAndCallMember(_getAndCallMember((self.__expressionAnalysisMode__ ? _traceMember(property, "split") : void 0, (self.__expressionAnalysisMode__ ? _getLocal(_scope6, "property", property) : void 0, property).split(".")), "map", [each => {
            let _scope7 = {};
            return self.__expressionAnalysisMode__ ? _traceMember(this, "camelCaseIfNeeded") : void 0, this.camelCaseIfNeeded((self.__expressionAnalysisMode__ ? _getLocal(_scope7, "each", each) : void 0, each));
          }]), "join", ["."]);
        }

        camelCaseIfNeeded(propertyPart) {
          let _scope8 = {};

          if (self.__expressionAnalysisMode__ ? _traceMember(propertyPart, "includes") : void 0, (self.__expressionAnalysisMode__ ? _getLocal(_scope8, "propertyPart", propertyPart) : void 0, propertyPart).includes('-')) {
            return self.__expressionAnalysisMode__ ? _traceMember(propertyPart, "camelCase") : void 0, (self.__expressionAnalysisMode__ ? _getLocal(_scope8, "propertyPart", propertyPart) : void 0, propertyPart).camelCase();
          } else {
            return self.__expressionAnalysisMode__ ? _getLocal(_scope8, "propertyPart", propertyPart) : void 0, propertyPart;
          }
        }

        makeSavingScript() {
          if (_getMember(this, "target")) {
            _setMember(this, "targetId", (self.__expressionAnalysisMode__ ? _traceMember(lively, "ensureID") : void 0, (self.__expressionAnalysisMode__ ? _getGlobal("lively") : void 0, lively).ensureID(_getMember(this, "target"))));
          }
          if (_getMember(this, "source")) {
            _setMember(this, "sourceId", (self.__expressionAnalysisMode__ ? _traceMember(lively, "ensureID") : void 0, (self.__expressionAnalysisMode__ ? _getGlobal("lively") : void 0, lively).ensureID(_getMember(this, "source"))));
          }
          if (_getMember(this, "target") && _getMember(this, "source")) {
            if (self.__expressionAnalysisMode__) _traceMember(this, "saveSerializedConnectionIntoWidget");

            this.saveSerializedConnectionIntoWidget();
          }
        }

        saveSerializedConnectionIntoWidget() {
          let _scope11 = {};

          if (!_getMember(this, "source")) {
            return;
          } // cannot save it...
          const serializedConnections = _getAndCallMember(_getAndCallMember((self.__expressionAnalysisMode__ ? _traceMember(Array, "from") : void 0, (self.__expressionAnalysisMode__ ? _getGlobal("Array") : void 0, Array).from(_getMember((self.__expressionAnalysisMode__ ? _getGlobal("window") : void 0, window), "allConnections"))), "filter", [connection => {
            let _scope9 = {};
            return _getMember((self.__expressionAnalysisMode__ ? _getLocal(_scope9, "connection", connection) : void 0, connection), "source") === _getMember(this, "source");
          }]), "map", [connection => {
            let _scope10 = {};
            return self.__expressionAnalysisMode__ ? _traceMember(connection, "serialize") : void 0, (self.__expressionAnalysisMode__ ? _getLocal(_scope10, "connection", connection) : void 0, connection).serialize();
          }]);
          _getAndCallMember(_getMember(this, "source"), "setJSONAttribute", ['data-connection', (self.__expressionAnalysisMode__ ? _getLocal(_scope11, "serializedConnections", serializedConnections) : void 0, serializedConnections)]);
        }

        serialize() {
          return {
            sourceId: _getMember(this, "sourceId"),
            targetId: _getMember(this, "targetId"),
            sourceProperty: _getMember(this, "_sourceProperty"),
            targetProperty: _getMember(this, "_targetProperty"),
            trackingCode: _getMember(this, "trackingCode"),
            modifyingCode: _getMember(this, "modifyingCode"),
            label: _getMember(this, "label"),
            isEvent: _getMember(this, "isEvent")
          };
        }

        static deserialize(json) {
          let _scope12 = {};
          if (self.__expressionAnalysisMode__) _traceMember(json, "forEach");

          (self.__expressionAnalysisMode__ ? _getLocal(_scope12, "json", json) : void 0, json).forEach(connectionData => {
            let _scope13 = {};
            if (self.__expressionAnalysisMode__) _traceMember(this, "connectionFromExistingData");

            this.connectionFromExistingData((self.__expressionAnalysisMode__ ? _getLocal(_scope13, "connectionData", connectionData) : void 0, connectionData));
          });
        }

        static deserializeFromObjectIfNeeded(object) {
          let _scope14 = {};

          if (_getMember((self.__expressionAnalysisMode__ ? _getLocal(_scope14, "object", object) : void 0, object), "hasAttribute") && (self.__expressionAnalysisMode__ ? _traceMember(object, "hasAttribute") : void 0, (self.__expressionAnalysisMode__ ? _getLocal(_scope14, "object", object) : void 0, object).hasAttribute('data-connection'))) {
            if (self.__expressionAnalysisMode__) _traceMember(this, "deserialize");

            this.deserialize((self.__expressionAnalysisMode__ ? _traceMember(object, "getJSONAttribute") : void 0, (self.__expressionAnalysisMode__ ? _getLocal(_scope14, "object", object) : void 0, object).getJSONAttribute('data-connection')));
          }
        }

        static connectionFromExistingData(config) {
          let _scope15 = {};


          const target = (self.__expressionAnalysisMode__ ? _traceMember(lively, "elementByID") : void 0, (self.__expressionAnalysisMode__ ? _getGlobal("lively") : void 0, lively).elementByID(_getMember((self.__expressionAnalysisMode__ ? _getLocal(_scope15, "config", config) : void 0, config), "targetId")));
          const source = (self.__expressionAnalysisMode__ ? _traceMember(lively, "elementByID") : void 0, (self.__expressionAnalysisMode__ ? _getGlobal("lively") : void 0, lively).elementByID(_getMember((self.__expressionAnalysisMode__ ? _getLocal(_scope15, "config", config) : void 0, config), "sourceId")));
          const undeadConnection = new (self.__expressionAnalysisMode__ ? _getLocal(_scope3, "Connection", Connection) : void 0, Connection)((self.__expressionAnalysisMode__ ? _getLocal(_scope15, "source", source) : void 0, source), _getMember((self.__expressionAnalysisMode__ ? _getLocal(_scope15, "config", config) : void 0, config), "targetProperty"), (self.__expressionAnalysisMode__ ? _getLocal(_scope15, "target", target) : void 0, target), _getMember((self.__expressionAnalysisMode__ ? _getLocal(_scope15, "config", config) : void 0, config), "sourceProperty"), _getMember((self.__expressionAnalysisMode__ ? _getLocal(_scope15, "config", config) : void 0, config), "isEvent"));
          if (self.__expressionAnalysisMode__) _traceMember(undeadConnection, "setModifyingCode");
          (self.__expressionAnalysisMode__ ? _getLocal(_scope15, "undeadConnection", undeadConnection) : void 0, undeadConnection).setModifyingCode(_getMember((self.__expressionAnalysisMode__ ? _getLocal(_scope15, "config", config) : void 0, config), "modifyingCode"));
          if (self.__expressionAnalysisMode__) _traceMember(undeadConnection, "setTrackingCode");
          (self.__expressionAnalysisMode__ ? _getLocal(_scope15, "undeadConnection", undeadConnection) : void 0, undeadConnection).setTrackingCode(_getMember((self.__expressionAnalysisMode__ ? _getLocal(_scope15, "config", config) : void 0, config), "trackingCode"));
          if (self.__expressionAnalysisMode__) _traceMember(undeadConnection, "setLabel");
          (self.__expressionAnalysisMode__ ? _getLocal(_scope15, "undeadConnection", undeadConnection) : void 0, undeadConnection).setLabel(_getMember((self.__expressionAnalysisMode__ ? _getLocal(_scope15, "config", config) : void 0, config), "label"));
          if (self.__expressionAnalysisMode__) _traceMember(undeadConnection, "activate");
          (self.__expressionAnalysisMode__ ? _getLocal(_scope15, "undeadConnection", undeadConnection) : void 0, undeadConnection).activate();
        }

        activate() {

          if (_getMember(this, "isActive")) {
            if (self.__expressionAnalysisMode__) _traceMember(this, "deactivate");

            this.deactivate();
          }

          if (_getMember(this, "isEvent")) {
            if (self.__expressionAnalysisMode__) _traceMember(this, "activateEvent");

            this.activateEvent();
          } else {
            if (self.__expressionAnalysisMode__) _traceMember(this, "activateAexpr");

            this.activateAexpr();
          }
          _setMember(this, "isActive", true);
        }

        async activateEvent() {
          if (_getMember(this, "source")) {
            if (self.__expressionAnalysisMode__) _traceMember(lively, "addEventListener");

            (self.__expressionAnalysisMode__ ? _getGlobal("lively") : void 0, lively).addEventListener('Connections', _getMember(this, "source"), _getMember(this, "trackingCode"), _getMember(this, "_eventListener"));
          }
        }

        async activateAexpr() {
          let _scope16 = {};

          let myFunction = await _getAndCallMember(_getMember(this, "trackingCode"), "boundEval", []);
          _setMember(this, "ae", _aexpr(() => {
            return (self.__expressionAnalysisMode__ ? _getLocal(_scope16, "myFunction", myFunction) : void 0, myFunction)(_getMember(this, "source"));
          }, {
            location: {
              file: 'https://lively-kernel.org/lively4/lively4-leo/src/components/halo/Connection.js',
              end: {
                column: 19,
                line: 178
              },
              start: {
                column: 14,
                line: 178
              },
              source: ''
            },
            sourceCode: "() => myFunction(this.source)"
          }));
          _getAndCallMember(_getMember(this, "ae"), "onChange", [svalue => {
            let _scope17 = {};
            return self.__expressionAnalysisMode__ ? _traceMember(this, "connectionFunction") : void 0, this.connectionFunction((self.__expressionAnalysisMode__ ? _getLocal(_scope17, "svalue", svalue) : void 0, svalue));
          }]);
        }

        getTrackingCode() {
          return _getMember(this, "trackingCode");
        }

        setTrackingCode(string) {
          let _scope18 = {};

          const isActive = _getMember(this, "isActive");
          if (self.__expressionAnalysisMode__ ? _getLocal(_scope18, "isActive", isActive) : void 0, isActive) {
            if (self.__expressionAnalysisMode__) _traceMember(this, "deactivate");
            this.deactivate();
          }
          _setMember(this, "trackingCode", (self.__expressionAnalysisMode__ ? _getLocal(_scope18, "string", string) : void 0, string));
          if (self.__expressionAnalysisMode__) _traceMember(this, "saveSerializedConnectionIntoWidget");
          this.saveSerializedConnectionIntoWidget();
          if (self.__expressionAnalysisMode__ ? _getLocal(_scope18, "isActive", isActive) : void 0, isActive) {
            if (self.__expressionAnalysisMode__) _traceMember(this, "activate");
            this.activate();
          }
        }

        async connectionFunction(sourceValue) {
          let _scope19 = {};

          let myFunction = await _getAndCallMember(_getMember(this, "modifyingCode"), "boundEval", []);
          (self.__expressionAnalysisMode__ ? _getLocal(_scope19, "myFunction", myFunction) : void 0, myFunction)(_getMember(this, "target"), (self.__expressionAnalysisMode__ ? _getLocal(_scope19, "sourceValue", sourceValue) : void 0, sourceValue));
        }

        async drawConnectionLine() {
          let _scope20 = {};
          if (self.__expressionAnalysisMode__) _traceMember(this, "removeConnectionLine");

          this.removeConnectionLine();
          var from = (self.__expressionAnalysisMode__ ? _traceMember(this, "getSource") : void 0, this.getSource());
          var to = (self.__expressionAnalysisMode__ ? _traceMember(this, "getTarget") : void 0, this.getTarget());
          if (!(self.__expressionAnalysisMode__ ? _getLocal(_scope20, "from", from) : void 0, from) || !(self.__expressionAnalysisMode__ ? _getLocal(_scope20, "to", to) : void 0, to)) {
            return;
          }var connector = _addSourceLocation((self.__expressionAnalysisMode__ ? _traceMember(document, "createElement") : void 0, (self.__expressionAnalysisMode__ ? _getGlobal("document") : void 0, document).createElement("lively-connector")), {
            file: 'https://lively-kernel.org/lively4/lively4-leo/src/components/halo/Connection.js',
            end: {
              column: 62,
              line: 205
            },
            start: {
              column: 20,
              line: 205
            }
          });
          if (self.__expressionAnalysisMode__) _traceMember(connector, "setAttribute");
          (self.__expressionAnalysisMode__ ? _getLocal(_scope20, "connector", connector) : void 0, connector).setAttribute("data-lively4-donotpersist", true);
          await _getAndCallMember(_getMember((self.__expressionAnalysisMode__ ? _getGlobal("lively") : void 0, lively), "components"), "openIn", [_getMember((self.__expressionAnalysisMode__ ? _getGlobal("document") : void 0, document), "body"), (self.__expressionAnalysisMode__ ? _getLocal(_scope20, "connector", connector) : void 0, connector)]);
          _setMember(this, "connectionLine", (self.__expressionAnalysisMode__ ? _getLocal(_scope20, "connector", connector) : void 0, connector));

          if (self.__expressionAnalysisMode__) _traceMember(connector, "connectFrom");
          (self.__expressionAnalysisMode__ ? _getLocal(_scope20, "connector", connector) : void 0, connector).connectFrom((self.__expressionAnalysisMode__ ? _getLocal(_scope20, "from", from) : void 0, from));
          if (self.__expressionAnalysisMode__) _traceMember(connector, "connectTo");
          (self.__expressionAnalysisMode__ ? _getLocal(_scope20, "connector", connector) : void 0, connector).connectTo((self.__expressionAnalysisMode__ ? _getLocal(_scope20, "to", to) : void 0, to));
          return self.__expressionAnalysisMode__ ? _getLocal(_scope20, "connector", connector) : void 0, connector;
        }

        async removeConnectionLine() {
          if (_getMember(this, "connectionLine")) {
            _getAndCallMember(_getMember(this, "connectionLine"), "remove", []);
          }
        }

        setActive(shouldBeActive) {
          let _scope21 = {};

          if (self.__expressionAnalysisMode__ ? _getLocal(_scope21, "shouldBeActive", shouldBeActive) : void 0, shouldBeActive) {
            if (self.__expressionAnalysisMode__) _traceMember(this, "activate");

            this.activate();
          } else {
            if (self.__expressionAnalysisMode__) _traceMember(this, "deactivate");

            this.deactivate();
          }
        }

        toggleDirection() {
          let _scope22 = {};
          if (self.__expressionAnalysisMode__) _traceMember(this, "deactivate");

          this.deactivate();
          let oldTarget = _getMember(this, "target");
          _setMember(this, "target", _getMember(this, "source"));
          _setMember(this, "source", (self.__expressionAnalysisMode__ ? _getLocal(_scope22, "oldTarget", oldTarget) : void 0, oldTarget));
          if (self.__expressionAnalysisMode__) _traceMember(this, "saveSerializedConnectionIntoWidget");
          this.saveSerializedConnectionIntoWidget();
          if (self.__expressionAnalysisMode__) _traceMember(this, "activate");
          this.activate();
        }

        copyAndActivate() {
          let _scope23 = {};

          let newConnection = new (self.__expressionAnalysisMode__ ? _getLocal(_scope3, "Connection", Connection) : void 0, Connection)(_getMember(this, "source"), _getMember(this, "sourceProperty"), _getMember(this, "target"), _getMember(this, "_targetProperty"), _getMember(this, "isEvent"));
          if (self.__expressionAnalysisMode__) _traceMember(newConnection, "setModifyingCode");
          (self.__expressionAnalysisMode__ ? _getLocal(_scope23, "newConnection", newConnection) : void 0, newConnection).setModifyingCode(_getMember(this, "modifyingCode"));
          if (self.__expressionAnalysisMode__) _traceMember(newConnection, "activate");
          (self.__expressionAnalysisMode__ ? _getLocal(_scope23, "newConnection", newConnection) : void 0, newConnection).activate();
          return self.__expressionAnalysisMode__ ? _getLocal(_scope23, "newConnection", newConnection) : void 0, newConnection;
        }

        deactivate() {
          _getMember(this, "ae") && _getAndCallMember(_getMember(this, "ae"), "dispose", []);
          if (_getMember(this, "isEvent")) {
            if (self.__expressionAnalysisMode__) _traceMember(lively, "removeEventListener");

            (self.__expressionAnalysisMode__ ? _getGlobal("lively") : void 0, lively).removeEventListener('Connections', _getMember(this, "source"), _getMember(this, "trackingCode"), _getMember(this, "_eventListener"));
          }
          _setMember(this, "isActive", false);
        }

        destroy() {
          if (self.__expressionAnalysisMode__) _traceMember(this, "deactivate");

          this.deactivate();
          _getAndCallMember(_getMember((self.__expressionAnalysisMode__ ? _getGlobal("window") : void 0, window), "allConnections"), "delete", [this]);
        }

        getSource() {
          return _getMember(this, "source");
        }

        setSource(object) {
          let _scope24 = {};

          _setMember(this, "source", (self.__expressionAnalysisMode__ ? _getLocal(_scope24, "object", object) : void 0, object));
        }

        getSourceId() {
          return _getMember(this, "sourceId");
        }

        getTarget() {
          return _getMember(this, "target");
        }

        setTarget(object) {
          let _scope25 = {};

          _setMember(this, "target", (self.__expressionAnalysisMode__ ? _getLocal(_scope25, "object", object) : void 0, object));
        }

        getTargetId() {
          return _getMember(this, "targetId");
        }

        getAexpr() {
          return _getMember(this, "ae");
        }

        getSourceProperty() {
          return _getMember(this, "_sourceProperty");
        }

        setSourceProperty(newProperty) {
          let _scope26 = {};

          _setMember(this, "_sourceProperty", (self.__expressionAnalysisMode__ ? _getLocal(_scope26, "newProperty", newProperty) : void 0, newProperty));
          if (self.__expressionAnalysisMode__) _traceMember(this, "saveSerializedConnectionIntoWidget");
          this.saveSerializedConnectionIntoWidget();
          if (self.__expressionAnalysisMode__) _traceMember(this, "activate");
          this.activate();
        }

        getModifyingCode() {
          return _getMember(this, "modifyingCode");
        }

        setModifyingCode(string) {
          let _scope27 = {};

          _setMember(this, "modifyingCode", (self.__expressionAnalysisMode__ ? _getLocal(_scope27, "string", string) : void 0, string));
          if (self.__expressionAnalysisMode__) _traceMember(this, "saveSerializedConnectionIntoWidget");
          this.saveSerializedConnectionIntoWidget();
        }

        static get allConnections() {
          return _getMember((self.__expressionAnalysisMode__ ? _getGlobal("window") : void 0, window), "allConnections");
        }

        static allConnectionsFor(object) {
          let _scope28 = {};

          let connections = [];
          if (_getMember((self.__expressionAnalysisMode__ ? _getLocal(_scope28, "object", object) : void 0, object), "hasAttribute") && (self.__expressionAnalysisMode__ ? _traceMember(object, "hasAttribute") : void 0, (self.__expressionAnalysisMode__ ? _getLocal(_scope28, "object", object) : void 0, object).hasAttribute('data-lively-id'))) {
            let _scope30 = {};

            let objectId = (self.__expressionAnalysisMode__ ? _traceMember(object, "getAttribute") : void 0, (self.__expressionAnalysisMode__ ? _getLocal(_scope28, "object", object) : void 0, object).getAttribute('data-lively-id'));
            _getAndCallMember(_getMember(this, "allConnections"), "forEach", [connection => {
              let _scope29 = {};

              if (_getMember((self.__expressionAnalysisMode__ ? _getLocal(_scope29, "connection", connection) : void 0, connection), "targetId") == (self.__expressionAnalysisMode__ ? _getLocal(_scope30, "objectId", objectId) : void 0, objectId) || _getMember((self.__expressionAnalysisMode__ ? _getLocal(_scope29, "connection", connection) : void 0, connection), "sourceId") == (self.__expressionAnalysisMode__ ? _getLocal(_scope30, "objectId", objectId) : void 0, objectId)) {
                if (self.__expressionAnalysisMode__) _traceMember(connections, "push");
                (self.__expressionAnalysisMode__ ? _getLocal(_scope28, "connections", connections) : void 0, connections).push((self.__expressionAnalysisMode__ ? _getLocal(_scope29, "connection", connection) : void 0, connection));
              }
            }]);
          }
          return self.__expressionAnalysisMode__ ? _getLocal(_scope28, "connections", connections) : void 0, connections;
        }

        getLabel() {
          return _getMember(this, "_sourceProperty") + "⇨" + _getMember(this, "_targetProperty");
        }

        getFullLabel() {
          try {
            return (self.__expressionAnalysisMode__ ? _traceMember(lively, "elementToCSSName") : void 0, (self.__expressionAnalysisMode__ ? _getGlobal("lively") : void 0, lively).elementToCSSName((self.__expressionAnalysisMode__ ? _traceMember(this, "getSource") : void 0, this.getSource()))) + " " + _getMember(this, "_sourceProperty") + "⇨" + (self.__expressionAnalysisMode__ ? _traceMember(lively, "elementToCSSName") : void 0, (self.__expressionAnalysisMode__ ? _getGlobal("lively") : void 0, lively).elementToCSSName((self.__expressionAnalysisMode__ ? _traceMember(this, "getTarget") : void 0, this.getTarget()))) + " " + _getMember(this, "_targetProperty");
          } catch (e) {
            return self.__expressionAnalysisMode__ ? _traceMember(this, "getLabel") : void 0, this.getLabel();
          }
        }

        setLabel(string) {
          let _scope31 = {};

          _setMember(this, "label", (self.__expressionAnalysisMode__ ? _getLocal(_scope31, "string", string) : void 0, string)); // not used...
        }

      }

      _export("default", Connection);

      if (self.__expressionAnalysisMode__) _traceMember(Object, "defineProperty");
      Object.defineProperty(_getMember((self.__expressionAnalysisMode__ ? _getGlobal("_recorder_") : void 0, _recorder_), "_src_components_halo_Connection_js"), "Connection", {
        get() {
          return self.__expressionAnalysisMode__ ? _getLocal(_scope, "Connection", Connection) : void 0, Connection;
        },

        set(thisIsVererySecretVariableName) {
          let _scope32 = {};
          _export("default", Connection = (self.__expressionAnalysisMode__ ? _getLocal(_scope32, "thisIsVererySecretVariableName", thisIsVererySecretVariableName) : void 0, thisIsVererySecretVariableName)), true ? _setLocal(_scope, "Connection", Connection) : void 0, Connection;
          return true;
        },

        enumerable: true,
        configurable: true
      });
      _getAndCallMember(_getMember((self.__expressionAnalysisMode__ ? _getGlobal("window") : void 0, window), "allConnections"), "forEach", [connection => {
        let _scope33 = {};
        return self.__expressionAnalysisMode__ ? _traceMember(connection, "migrateTo") : void 0, (self.__expressionAnalysisMode__ ? _getLocal(_scope33, "connection", connection) : void 0, connection).migrateTo((self.__expressionAnalysisMode__ ? _getLocal(_scope, "Connection", Connection) : void 0, Connection));
      }]);
    }
  };
});