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

  var __SystemJSRewritingHack;
  function indentFromTo(from, to) {
    from.to(to + 1).forEach(line => {
      this.indentLine(line, "smart", true);
    });
  }
  function indentSelections() {
    const selections = this.listSelections();
    selections.forEach(({
      anchor,
      head
    }) => {
      const anchorLine = anchor.line;
      const headLine = head.line;
      const anchorFirst = anchorLine < headLine;
      const fromLine = anchorFirst ? anchorLine : headLine;
      const toLine = anchorFirst ? headLine : anchorLine;
      indentFromTo.call(this, fromLine, toLine);
    });
  }
  _export({
    indentFromTo: indentFromTo,
    indentSelections: indentSelections
  });
  return {
    setters: [],
    execute: function () {
      __SystemJSRewritingHack = {};
      _recorder_._https__lively_kernel_org_lively4_lively4_ansgar_src_components_widgets_code_mirror_utils_js = _recorder_._https__lively_kernel_org_lively4_lively4_ansgar_src_components_widgets_code_mirror_utils_js || {};
      Object.defineProperty(_recorder_._https__lively_kernel_org_lively4_lively4_ansgar_src_components_widgets_code_mirror_utils_js, "indentSelections", {
        get() {
          return indentSelections;
        },
        set(thisIsVererySecretVariableName) {
          _export("indentSelections", indentSelections = thisIsVererySecretVariableName);
          return true;
        },
        enumerable: true,
        configurable: true
      });
      Object.defineProperty(_recorder_._https__lively_kernel_org_lively4_lively4_ansgar_src_components_widgets_code_mirror_utils_js, "indentFromTo", {
        get() {
          return indentFromTo;
        },
        set(thisIsVererySecretVariableName) {
          _export("indentFromTo", indentFromTo = thisIsVererySecretVariableName);
          return true;
        },
        enumerable: true,
        configurable: true
      });
    }
  };
});