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

  return {
    setters: [],
    execute: function () {
      const __SystemJSRewritingHack = {};
      _recorder_._src_client_reflection_js = _recorder_._src_client_reflection_js || {};
      Object.defineProperty(_recorder_._src_client_reflection_js, "convexHull", {
        get() {
          return convexHull;
        },

        set(thisIsVererySecretVariableName) {
          _export("convexHull", convexHull = thisIsVererySecretVariableName);

          return true;
        },

        enumerable: true,
        configurable: true
      });
      Object.defineProperty(_recorder_._src_client_reflection_js, "_convexHull", {
        get() {
          return _convexHull;
        },

        set(thisIsVererySecretVariableName) {
          _convexHull = thisIsVererySecretVariableName;
          return true;
        },

        enumerable: true,
        configurable: true
      });
      Object.defineProperty(_recorder_._src_client_reflection_js, "iterate", {
        get() {
          return iterate;
        },

        set(thisIsVererySecretVariableName) {
          iterate = thisIsVererySecretVariableName;
          return true;
        },

        enumerable: true,
        configurable: true
      });
      function iterate(obj, options) {
        let result = [];
        try {
          if (obj[Symbol.iterator]) {
            result.push(...Array.from(obj));
          }

          if (options.usePrototype && obj.__proto__) {
            result.push(obj.__proto__);
          }

          const props = Object.getOwnPropertyNames(obj);
          result.push(...props.map(prop => obj[prop]));
        } catch (e) {
          // ignore errors
        }

        return result;
      }

      function _convexHull(root, options, all = new Set()) {

        if (root !== undefined && root !== null && all.size < options.sizeLimit && !all.has(root)) {

          all.add(root);

          iterate(root, options).forEach(ea => {
            _convexHull(ea, options, all);
          });
        }

        return all;
      }

      function convexHull(root, options = {}) {
        return _convexHull(root, Object.assign({
          usePrototype: false,
          sizeLimit: Infinity
        }, options));
      }

      _export("convexHull", convexHull);

      if (self.lively) {
        lively.reflection = { convexHull };
      }
    }
  };
});