var cov_189vzcngai = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/updates/system-updates.js',
        hash = '2b360f1ff3784018f6f7b3b150143e1b9cb1ebc9',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/updates/system-updates.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/updates/system-updates',['exports', 'aurelia-framework', '../../services/updates-service'], function (exports, _aureliaFramework, _updatesService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SystemUpdates = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var SystemUpdates = exports.SystemUpdates = (_dec = (0, _aureliaFramework.inject)(_updatesService.UpdatesService), _dec(_class = function () {
        function SystemUpdates(updatesService) {
            _classCallCheck(this, SystemUpdates);

            this.updatesService = updatesService;
        }

        SystemUpdates.prototype.attached = function attached() {
            var _this = this;

            this.updatesService.getCurrentVersion().then(function (version) {
                _this.currentVersion = version;
            });
            this.updatesService.getAllPackages().then(function (packages) {
                _this.allPackages = packages;
                _this.newestVersion = _this.allPackages[0].version;
            });
        };

        return SystemUpdates;
    }()) || _class);
});
define('text!views/updates/system-updates.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"components/updates/update-package\"></require>\n    <h4><i class=\"px-nav-icon ion-android-cloud-outline\"></i>${\"Updates\" | t}</h4>\n    <div repeat.for=\"update of allPackages\">\n        <update-package current-version.bind=\"currentVersion\" newest-version.bind=\"newestVersion\" update-package.bind=\"update\"></update-package>\n    </div>\n</template>\n"; });
var cov_1gqtoo6xxs = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/sign-in/sign-in.js',
        hash = 'd51e5d108173ce32c2d069c83c8bde76adf14b57',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/sign-in/sign-in.js',
        statementMap: {
            '0': {
                start: {
                    line: 17,
                    column: 8
                },
                end: {
                    line: 17,
                    column: 25
                }
            },
            '1': {
                start: {
                    line: 18,
                    column: 8
                },
                end: {
                    line: 18,
                    column: 39
                }
            }
        },
        fnMap: {
            '0': {
                name: '(anonymous_0)',
                decl: {
                    start: {
                        line: 16,
                        column: 4
                    },
                    end: {
                        line: 16,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 16,
                        column: 35
                    },
                    end: {
                        line: 19,
                        column: 5
                    }
                },
                line: 16
            }
        },
        branchMap: {},
        s: {
            '0': 0,
            '1': 0
        },
        f: {
            '0': 0
        },
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/sign-in/sign-in',['exports', 'aurelia-framework', 'aurelia-auth', '../../resources/managers/root-manager'], function (exports, _aureliaFramework, _aureliaAuth, _rootManager) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SignIn = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var SignIn = exports.SignIn = (_dec = (0, _aureliaFramework.inject)(_aureliaAuth.AuthService, _rootManager.RootManager), _dec(_class = function () {
        function SignIn(auth, rootManager) {
            _classCallCheck(this, SignIn);

            cov_1gqtoo6xxs.f[0]++;
            cov_1gqtoo6xxs.s[0]++;

            this.auth = auth;
            cov_1gqtoo6xxs.s[1]++;
            this.rootManager = rootManager;
        }

        SignIn.prototype.login = function login() {
            var _this = this;

            return this.auth.login($.param({ username: this.username, password: this.password, grant_type: 'password' })).then(function () {
                _this.rootManager.setRoot('app');
            });
        };

        return SignIn;
    }()) || _class);
});
define('text!views/sign-in/sign-in.html', ['module'], function(module) { module.exports = "<template>\n    <div>\n        <form submit.delegate=\"login()\">\n            <section>\n                <label>${\"Username\" | t}</label>\n                <label>\n                    <input type=\"text\" value.bind=\"username\" required>\n                </label>\n            </section>\n            <section>\n                <label>${\"Password\" | t}</label>\n                <label>\n                    <input type=\"text\" value.bind=\"password\" required>\n                </label>\n            </section>\n            <button type=\"submit\">${\"Sign In\" | t}</button>\n        </form>\n        <a route-href=\"route: forgot-password\"><span>${\"Forgot Password?\" | t}</span></a>\n    </div>\n</template>\n"; });
var cov_1xzi84bnvk = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/settings.js',
        hash = '0064db0edf306c0782042123b961fe383a706a82',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/settings.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/settings',['exports', 'aurelia-framework', '../gateway-state-base', './operator', './boom-nozzle', './pressure-setup', './flow-setup', './navigation-setup', './nh3-setup', './initial-setup'], function (exports, _aureliaFramework, _gatewayStateBase, _operator, _boomNozzle, _pressureSetup, _flowSetup, _navigationSetup, _nh3Setup, _initialSetup) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Settings = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var Settings = exports.Settings = (_dec = (0, _aureliaFramework.inject)(_operator.Operator, _boomNozzle.BoomNozzle, _pressureSetup.PressureSetup, _flowSetup.FlowSetup, _navigationSetup.NavigationSetup, _nh3Setup.Nh3Setup, _initialSetup.InitialSetup), _dec(_class = function (_ref) {
        _inherits(Settings, _ref);

        function Settings(operator, boomNozzle, pressureSetup, flowSetup, navigationSetup, nh3Setup, initialSetup) {
            _classCallCheck(this, Settings);

            for (var _len = arguments.length, rest = Array(_len > 7 ? _len - 7 : 0), _key = 7; _key < _len; _key++) {
                rest[_key - 7] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.widgets = [operator, boomNozzle, pressureSetup, flowSetup, navigationSetup, nh3Setup, initialSetup];
            return _this;
        }

        Settings.prototype.attached = function attached() {
            $('.tree-toggle').each(function () {
                $(this).addClass('ion-chevron-down');
            });

            $('.tree-toggle').click(function () {
                if (!$(this).hasClass('active-tree-toggle')) {
                    var siblingActiveTreeToggle = $(this).closest('.tree').find('.active-tree-toggle');
                    siblingActiveTreeToggle.toggleClass('active-tree-toggle');
                    siblingActiveTreeToggle.toggleClass('ion-chevron-down');
                    siblingActiveTreeToggle.toggleClass('ion-chevron-up');
                    siblingActiveTreeToggle.siblings('ul.tree').toggle(200);
                }

                $(this).toggleClass('ion-chevron-down');
                $(this).toggleClass('ion-chevron-up');
                $(this).parent().children('ul.tree').toggle(200);

                $(this).toggleClass('active-tree-toggle');
            });
            $(function () {
                $('.tree-toggle').parent().children('ul.tree').toggle(200);
            });
        };

        Settings.prototype.taskModeChanged = function taskModeChanged(val) {
            this.editDelta.taskMode = val;
            this.send();
        };

        return Settings;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/settings.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/number-format\"></require>\n    <div class=\"container\">\n        <div class=\"row\">\n            <h1>System Settings</h1>\n        </div>\n    </div>\n    <div class=\"container-fluid system-settings\">\n        <div class=\"well no-padding\">\n            <div>\n                <ul class=\"nav-list nav-list nav-menu-list-style system-settings tree\">\n                    <li repeat.for=\"widget of widgets\" class=\"au-animate root\">\n                        <compose\n                            model.bind=\"widget.model\"\n                            view-model=\"views/settings/${widget.type}\"></compose>\n                    </li>\n                </ul>\n            </div>\n        </div>\n    </div>\n</template>\n"; });
var cov_118otlzzl0 = function () {
  var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/settings-item.js',
      hash = 'f1b913a7eeb3015a47b7ae5b79a3716b21ea6428',
      global = new Function('return this')(),
      gcv = '__coverage__',
      coverageData = {
    path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/settings-item.js',
    statementMap: {},
    fnMap: {},
    branchMap: {},
    s: {},
    f: {},
    b: {},
    _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('views/settings/settings-item',['exports', 'aurelia-framework', '../../resources/value-converters/number-format'], function (exports, _aureliaFramework, _numberFormat) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.SettingsItem = undefined;

  function _initDefineProp(target, property, descriptor, context) {
    if (!descriptor) return;
    Object.defineProperty(target, property, {
      enumerable: descriptor.enumerable,
      configurable: descriptor.configurable,
      writable: descriptor.writable,
      value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
    });
  }

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
    var desc = {};
    Object['ke' + 'ys'](descriptor).forEach(function (key) {
      desc[key] = descriptor[key];
    });
    desc.enumerable = !!desc.enumerable;
    desc.configurable = !!desc.configurable;

    if ('value' in desc || desc.initializer) {
      desc.writable = true;
    }

    desc = decorators.slice().reverse().reduce(function (desc, decorator) {
      return decorator(target, property, desc) || desc;
    }, desc);

    if (context && desc.initializer !== void 0) {
      desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
      desc.initializer = undefined;
    }

    if (desc.initializer === void 0) {
      Object['define' + 'Property'](target, property, desc);
      desc = null;
    }

    return desc;
  }

  function _initializerWarningHelper(descriptor, context) {
    throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
  }

  var _dec, _desc, _value, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10;

  var SettingsItem = exports.SettingsItem = (_dec = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), (_class = function () {
    function SettingsItem() {
      _classCallCheck(this, SettingsItem);

      _initDefineProp(this, 'val', _descriptor, this);

      _initDefineProp(this, 'units', _descriptor2, this);

      _initDefineProp(this, 'label', _descriptor3, this);

      _initDefineProp(this, 'min', _descriptor4, this);

      _initDefineProp(this, 'max', _descriptor5, this);

      _initDefineProp(this, 'step', _descriptor6, this);

      _initDefineProp(this, 'valueConverter', _descriptor7, this);

      _initDefineProp(this, 'disabled', _descriptor8, this);

      _initDefineProp(this, 'readonly', _descriptor9, this);

      _initDefineProp(this, 'prop', _descriptor10, this);
    }

    SettingsItem.prototype.bind = function bind(bindingContext, overrideContext) {
      this.parent = bindingContext;
    };

    SettingsItem.prototype.sendChange = function sendChange() {
      this.parent.sendChange(this.state[this.prop]);
    };

    SettingsItem.prototype.sendDelta = function sendDelta() {
      this.parent.sendChange(this.parent.state[this.prop], this.prop);
    };

    return SettingsItem;
  }(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'val', [_dec], {
    enumerable: true,
    initializer: null
  }), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, 'units', [_aureliaFramework.bindable], {
    enumerable: true,
    initializer: null
  }), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'label', [_aureliaFramework.bindable], {
    enumerable: true,
    initializer: null
  }), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'min', [_aureliaFramework.bindable], {
    enumerable: true,
    initializer: null
  }), _descriptor5 = _applyDecoratedDescriptor(_class.prototype, 'max', [_aureliaFramework.bindable], {
    enumerable: true,
    initializer: null
  }), _descriptor6 = _applyDecoratedDescriptor(_class.prototype, 'step', [_aureliaFramework.bindable], {
    enumerable: true,
    initializer: function initializer() {
      return '0.1';
    }
  }), _descriptor7 = _applyDecoratedDescriptor(_class.prototype, 'valueConverter', [_aureliaFramework.bindable], {
    enumerable: true,
    initializer: function initializer() {
      return _numberFormat.NumberFormatValueConverter;
    }
  }), _descriptor8 = _applyDecoratedDescriptor(_class.prototype, 'disabled', [_aureliaFramework.bindable], {
    enumerable: true,
    initializer: function initializer() {
      return false;
    }
  }), _descriptor9 = _applyDecoratedDescriptor(_class.prototype, 'readonly', [_aureliaFramework.bindable], {
    enumerable: true,
    initializer: function initializer() {
      return false;
    }
  }), _descriptor10 = _applyDecoratedDescriptor(_class.prototype, 'prop', [_aureliaFramework.bindable], {
    enumerable: true,
    initializer: null
  })), _class));
});
define('text!views/settings/settings-item.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/binding-behavior/auto-sync\"></require>\n    <require from=\"resources/value-converters/number-format\"></require>\n    <div class=\"form-group form-group-lg\">\n        <label for=\"p-sensor\" class=\"col-xs-4 control-label\" i18n=\"${label}\">\n            ${label}\n        </label>\n        <div class=\"col-xs-6\">\n            <input inputmode=\"decimal\" pattern=\"[0-9]*\" type=\"text\" readonly.bind=\"readonly\" id=\"p-sensor\" class=\"form-control\" step=\"${step}\"\n                   value.two-way=\"val & updateTrigger:'blur' & autoSync\">\n            </input>\n        </div>\n        <label style=\"text-align: left\" for=\"p-sensor\" class=\"col-xs-2 control-label\" i18n=\"${units}\">\n            ${units}\n        </label>\n    </div>\n</template>\n"; });
var cov_2bza3f97q0 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/settings-dropdown.js',
        hash = '51ab8e012161ab4127c9ef159d9f1d12f7061423',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/settings-dropdown.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/settings-dropdown',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SettingsDropdown = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _desc, _value, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;

    var SettingsDropdown = exports.SettingsDropdown = (_dec = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec2 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), (_class = function () {
        function SettingsDropdown() {
            _classCallCheck(this, SettingsDropdown);

            _initDefineProp(this, 'selected', _descriptor, this);

            _initDefineProp(this, 'disabled', _descriptor2, this);

            _initDefineProp(this, 'options', _descriptor3, this);

            _initDefineProp(this, 'label', _descriptor4, this);

            _initDefineProp(this, 'prop', _descriptor5, this);
        }

        SettingsDropdown.prototype.bind = function bind(bindingContext, overrideContext) {
            this.parent = bindingContext;
        };

        SettingsDropdown.prototype.sendChange = function sendChange(selected) {
            this.parent.sendChange(selected, this.prop);
        };

        return SettingsDropdown;
    }(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'selected', [_dec], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, 'disabled', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return false;
        }
    }), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'options', [_dec2], {
        enumerable: true,
        initializer: function initializer() {
            return [];
        }
    }), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'label', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor5 = _applyDecoratedDescriptor(_class.prototype, 'prop', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class));
});
define('text!views/settings/settings-dropdown.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/binding-behavior/auto-sync\"></require>\n    <div class=\"form-group form-group-lg\">\n        <label i18n=\"${label}\" class=\"col-xs-4 control-label\">\n            Rate-Sync\n        </label>\n        <div class=\"col-xs-6\">\n            <select disabled.bind=\"disabled\" class=\"form-control\" value.bind=\"selected & autoSync\"\n                    change.delegate=\"sendChange(selected)\">\n                <option repeat.for=\"option of options\"\n                        model.bind=\"option.index\">\n                    ${option.label}\n                </option>\n            </select>\n        </div>\n    </div>\n</template>\n"; });
var cov_448289jb7 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/pressure/sensor-setup.js',
        hash = 'fcd8f530a0141efc0c02947436e09f0f71c99f26',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/pressure/sensor-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/pressure/sensor-setup',['exports', 'aurelia-framework', '../../gateway-state-base', 'aurelia-validation', '../../../resources/value-converters/kpaToPsi', '../../../resources/value-converters/mVoltToVolt'], function (exports, _aureliaFramework, _gatewayStateBase, _aureliaValidation, _kpaToPsi, _mVoltToVolt) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SensorSetup = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var SensorSetup = exports.SensorSetup = (_dec = (0, _aureliaFramework.inject)(_kpaToPsi.KpaToPsiValueConverter, _mVoltToVolt.MVoltToVoltValueConverter), _dec(_class = function (_ref) {
        _inherits(SensorSetup, _ref);

        function SensorSetup(kpaToPsiValueConverter, mVoltToVoltValueConverter) {
            _classCallCheck(this, SensorSetup);

            for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
                rest[_key - 2] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'sensor-setup';
            _this.voltString = 'Volts';
            _this.pressureString = 'PSI';
            _this.autoSyncProperties = ['PSensor1MinVolt', 'PSensor1MaxVolt', 'PSensor1MinPressure', 'PSensor1MaxPressure', 'PSensor1Offset', 'PSensor2MinVolt', 'PSensor2MaxVolt', 'PSensor2MinPressure', 'PSensor2MaxPressure', 'PSensor2Offset'];

            _this.kpaToPsiValueConverter = kpaToPsiValueConverter;
            _this.mVoltToVoltValueConverter = mVoltToVoltValueConverter;
            return _this;
        }

        SensorSetup.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
            var rules = _aureliaValidation.ValidationRules.ensure('pSensor1MinVolt').satisfiesRule('numberRange', 0, 5000, this.mVoltToVoltValueConverter.forValidate, '0.0').ensure('pSensor1MaxVolt').satisfiesRule('numberRange', 0, 5000, this.mVoltToVoltValueConverter.forValidate, '0.0').ensure('pSensor1MinPressure').satisfiesRule('numberRange', 0, 344.738, this.kpaToPsiValueConverter.forValidate, '0.00').ensure('pSensor1MaxPressure').satisfiesRule('numberRange', 0, 1723.69, this.kpaToPsiValueConverter.forValidate, '0.00').ensure('pSensor1Offset').satisfiesRule('numberRange', -344.738, 344.738, this.kpaToPsiValueConverter.forValidate, '0.00').ensure('pSensor2MinVolt').satisfiesRule('numberRange', 0, 5000, this.mVoltToVoltValueConverter.forValidate, '0.0').ensure('pSensor2MaxVolt').satisfiesRule('numberRange', 0, 5000, this.mVoltToVoltValueConverter.forValidate, '0.0').ensure('pSensor2MinPressure').satisfiesRule('numberRange', 0, 344.738, this.kpaToPsiValueConverter.forValidate, '0.00').ensure('pSensor2MaxPressure').satisfiesRule('numberRange', 0, 1723.69, this.kpaToPsiValueConverter.forValidate, '0.00').ensure('pSensor2Offset').satisfiesRule('numberRange', -344.738, 344.738, this.kpaToPsiValueConverter.forValidate, '0.00').rules;
            this.controller.addObject(this.state, rules);
        };

        return SensorSetup;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/pressure/sensor-setup.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/mVoltToVolt\"></require>\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\n    <require from=\"views/settings/settings-item\"></require>\n    \n    <li class=\"container-fluid\">\n        <form style=\"background-color: white\" class=\"form-horizontal\">\n\n            <div as-element=\"settings-item\" val.bind=\"state.pSensor1MinVolt | mVoltToVolt:'0.0' & validate\" label=\"Sensor 1 Minimum\"\n                    min=\"0\" max=\"5\" units=\"${voltString}\" prop=\"pSensor1MinVolt\"></div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.pSensor1MaxVolt | mVoltToVolt:'0.0' & validate\" label=\"Sensor 1 Maximum\"\n                    min=\"0\" max=\"5\" units=\"${voltString}\" prop=\"pSensor1MaxVolt\"></div>\n\n            <div as-element=\"settings-item\" step=\".01\" val.bind=\"state.pSensor1MinPressure | kpaToPsi:'0' & validate\" label=\"Sensor 1 Minimum\"\n                    min=\"0\" max=\"3.44\" units=\"${pressureString}\" prop=\"pSensor1MinPressure\"></div>\n\n            <div as-element=\"settings-item\" step=\".01\" val.bind=\"state.pSensor1MaxPressure | kpaToPsi:'0' & validate\" label=\"Sensor 1 Maximum\"\n                    min=\"0\" max=\"17.2\" units=\"${pressureString}\" prop=\"pSensor1MaxPressure\"></div>\n\n            <div as-element=\"settings-item\" step=\".01\" val.bind=\"state.pSensor1Offset | kpaToPsi:'0.00' & validate\" label=\"Sensor 1 Offset\"\n                    units=\"${pressureString}\" prop=\"pSensor1Offset\"></div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.pSensor2MinVolt | mVoltToVolt:'0.0' & validate\" label=\"Sensor 2 Minimum\"\n                    min=\"0\" max=\"5\" units=\"${voltString}\" prop=\"pSensor2MinVolt\"></div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.pSensor2MaxVolt | mVoltToVolt:'0.0' & validate\" label=\"Sensor 2 Maximum\"\n                    min=\"0\" max=\"5\" units=\"${voltString}\" prop=\"pSensor2MaxVolt\"></div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.pSensor2MinPressure | kpaToPsi:'0' & validate\" label=\"Sensor 2 Minimum\"\n                    min=\"0\" max=\"3.44\" step=\".01\" units=\"${pressureString}\" prop=\"pSensor2MinPressure\"></div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.pSensor2MaxPressure | kpaToPsi:'0' & validate\" label=\"Sensor 2 Maximum\"\n                    min=\"0\" max=\"17.24\" step=\".01\" units=\"${pressureString}\" prop=\"pSensor2MaxPressure\"></div>\n\n            <div as-element=\"settings-item\" step=\".01\" val.bind=\"state.pSensor2Offset | kpaToPsi:'0.00' & validate\" label=\"Sensor 2 Offset\"\n                    min=\"-3.34\" max=\"3.44\" step=\".01\" units=\"${pressureString}\" prop=\"pSensor2Offset\"></div>\n        </form>\n    </li>\n\n</template>\n"; });
var cov_1h9hxac1ub = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/pressure/pump-setup.js',
        hash = 'fed8587c342d5903871eaf410f97254c7bf52ef5',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/pressure/pump-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/pressure/pump-setup',['exports', 'aurelia-framework', '../../gateway-state-base', 'aurelia-validation', '../../../resources/value-converters/kpaToPsi'], function (exports, _aureliaFramework, _gatewayStateBase, _aureliaValidation, _kpaToPsi) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PumpSetup = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var PumpSetup = exports.PumpSetup = (_dec = (0, _aureliaFramework.inject)(_kpaToPsi.KpaToPsiValueConverter), _dec(_class = function (_ref) {
        _inherits(PumpSetup, _ref);

        function PumpSetup(kpaToPsiValueConverter) {
            _classCallCheck(this, PumpSetup);

            for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
                rest[_key - 1] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'pump-setup';
            _this.servoTypes = [];
            _this.rxMethods = [];
            _this.recirculationValveOption = [];
            _this.autoSyncProperties = ['ServoType', 'ServoMinimumPercentage', 'ServoMaximumPercentage', 'ServoManualSpeed', 'PumpShutoffLimit', 'PumpPulsesPerRev', 'PumpMaxSpeed', 'PressureRxMethod', 'PumpPressureMax', 'PumpFlowMax', 'PumpDefault', 'PumpRecirculation', 'RecirculationValve', 'CycleBoomValves'];

            _this.kpaToPsiValueConverter = kpaToPsiValueConverter;

            var keyBase = 'systemSettings.pressure.pumpSetup.';
            _this.servoTypes = _this.getTypes(keyBase + 'servoType');
            _this.rxMethods = _this.getTypes(keyBase + 'rxTypes');
            _this.recirculationTypes = _this.getTypes(keyBase + 'recirculationTypes');
            _this.recirculationValveOption = _this.getTypes(keyBase + 'recirculationValveOption');
            _this.cycleBoomOption = _this.getTypes(keyBase + 'cycleBoomValves');
            return _this;
        }

        PumpSetup.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
            var rules = _aureliaValidation.ValidationRules.ensure('servoMinimumPercentage').satisfiesRule('numberRange', 0, 100).ensure('servoMaximumPercentage').satisfiesRule('numberRange', 0, 100).ensure('servoManualSpeed').satisfiesRule('numberRange', 10, 100).ensure('pumpShutoffLimit').satisfiesRule('numberRange', 0, 344.738, this.kpaToPsiValueConverter.forValidate, '0.00').ensure('pumpPulsesPerRev').satisfiesRule('numberRange', 1, 100).ensure('pumpMaxSpeed').satisfiesRule('numberRange', 0, 5000).rules;
            this.controller.addObject(this.state, rules);
        };

        return PumpSetup;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/pressure/pump-setup.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/number-format\"></require>\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\n    <require from=\"views/settings/settings-item\"></require>\n    <require from=\"views/settings/settings-dropdown\"></require>\n    \n    <li class=\"container-fluid\">\n        <form style=\"background-color: white\" class=\"form-horizontal\">\n\n            <settings-dropdown selected.bind=\"state.servoType\"\n                               label=\"systemSettings.pressure.pumpSetup.labels.servoType\"\n                               options.bind=\"servoTypes\" prop=\"servoType\"></settings-dropdown>\n\n            <div as-element=\"settings-item\" val.bind=\"state.servoMinimumPercentage | numberFormat & validate\" step=\"1\"\n                 label=\"systemSettings.pressure.pumpSetup.labels.servoMinimumPercentage\"\n                 units=\"%\" prop=\"servoMinimumPercentage\">\n            </div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.servoMaximumPercentage | numberFormat & validate\" step=\"1\"\n                 label=\"systemSettings.pressure.pumpSetup.labels.servoMaximumPercentage\"\n                 units=\"%\" prop=\"servoMaximumPercentage\">\n            </div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.servoManualSpeed | numberFormat & validate\" step=\"1\"\n                 label=\"systemSettings.pressure.pumpSetup.labels.servoManualSpeed\"\n                 units=\"%\" prop=\"servoManualSpeed\">\n            </div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.pumpShutoffLimit | kpaToPsi:'0.00' & validate\" step=\".01\"\n                 label=\"systemSettings.pressure.pumpSetup.labels.pumpShutoffLimit\"\n                 units=\"units.psi\" prop=\"pumpShutoffLimit\">\n            </div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.pumpPulsesPerRev | numberFormat & validate\" step=\"1\"\n                 label=\"systemSettings.pressure.pumpSetup.labels.pumpPulsesPerRev\" prop=\"pumpPulsesPerRev\">\n            </div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.pumpMaxSpeed | numberFormat & validate\" step=\"1\"\n                 label=\"systemSettings.pressure.pumpSetup.labels.pumpMaxSpeed\"\n                 units=\"units.rpm\" prop=\"pumpMaxSpeed\">\n            </div>\n\n            <settings-dropdown selected.bind=\"state.pressureRxMethod\"\n                               label=\"systemSettings.pressure.pumpSetup.labels.pressureRxMethod\"\n                               options.bind=\"rxMethods\" prop=\"pressureRxMethod\"></settings-dropdown>\n\n            <div as-element=\"settings-item\" val.bind=\"state.pumpPressureMax | numberFormat & validate\" step=\"1\"\n                 label=\"systemSettings.pressure.pumpSetup.labels.pumpPressureMax\"\n                 units=\"units.psi\" prop=\"pumpPressureMax\">\n            </div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.pumpFlowMax | numberFormat & validate\" step=\"1\"\n                 label=\"systemSettings.pressure.pumpSetup.labels.pumpFlowMax\"\n                 units=\"units.galMin\" prop=\"pumpFlowMax\">\n            </div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.pumpDefault | numberFormat & validate\" step=\"1\"\n                 label=\"systemSettings.pressure.pumpSetup.labels.pumpDefault\" options.bind=\"recirculationTypes\"\n                 prop=\"pumpDefault\">\n            </div>\n\n            <settings-dropdown selected.bind=\"state.pumpRecirculation\"\n                               label=\"systemSettings.pressure.pumpSetup.labels.pumpRecirculation\"\n                               options.bind=\"recirculationTypes\" prop=\"pumpRecirculation\"></settings-dropdown>\n\n            <settings-dropdown selected.bind=\"state.recirculationValve\"\n                               label=\"systemSettings.pressure.pumpSetup.labels.recirculationValve\"\n                               options.bind=\"recirculationValveOption\" prop=\"recirculationValve\"></settings-dropdown>\n\n            <settings-dropdown selected.bind=\"state.cycleBoomValves\"\n                               label=\"systemSettings.pressure.pumpSetup.labels.cycleBoomValves\"\n                               options.bind=\"cycleBoomOption\" prop=\"cycleBoomValves\"></settings-dropdown>\n\n        </form>\n    </li>\n\n</template>\n"; });
var cov_267gdc5vkj = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/pressure/control-tuning.js',
        hash = '5a8502665d62170d34c81c050075a8ced80d3f91',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/pressure/control-tuning.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/pressure/control-tuning',['exports', 'aurelia-framework', '../../gateway-state-base', 'aurelia-validation', '../../../resources/value-converters/kpaToPsi', '../../../resources/value-converters/multiplier-format'], function (exports, _aureliaFramework, _gatewayStateBase, _aureliaValidation, _kpaToPsi, _multiplierFormat) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.ControlTuning = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var ControlTuning = exports.ControlTuning = (_dec = (0, _aureliaFramework.inject)(_kpaToPsi.KpaToPsiValueConverter, _multiplierFormat.MultiplierFormatValueConverter), _dec(_class = function (_ref) {
        _inherits(ControlTuning, _ref);

        function ControlTuning(kpaToPsiValueConverter, multiplierFormatValueConverter) {
            _classCallCheck(this, ControlTuning);

            for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
                rest[_key - 2] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'control-tuning';
            _this.mlPerMin = 'ml/min';
            _this.milliseconds = 'milliseconds';
            _this.rateSyncStates = [];
            _this.autoSyncProperties = ['PressureGainP', 'PressureGainI', 'PressureGainD', 'PressureGainK', 'PressureDeadBand', 'PressureServoKick', 'PressureRunHoldDelay', 'RateSyncEnabled'];

            _this.kpaToPsiValueConverter = kpaToPsiValueConverter;
            _this.multiplierFormatValueConverter = multiplierFormatValueConverter;
            _this.rateSyncStates = _this.getTypes('common.enabledOptions');
            return _this;
        }

        ControlTuning.prototype.attached = function attached() {
            var _this2 = this;

            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);

            var curriedSecondsToMillisecondsFormat = function curriedSecondsToMillisecondsFormat(n) {
                return function (m) {
                    return _this2.multiplierFormatValueConverter.forValidate(m, n);
                };
            };
            var validateCalc = curriedSecondsToMillisecondsFormat(1000);

            var validatePsiToKpa = function validatePsiToKpa(n) {
                return function (m) {
                    return _this2.kpaToPsiValueConverter.forValidate(m, n);
                };
            };
            var psiKpaConvert = validatePsiToKpa(4);

            var rules = _aureliaValidation.ValidationRules.ensure('pressureGainK').satisfiesRule('numberRange', 0, 100, null, '0.0').ensure('pressureGainP').satisfiesRule('numberRange', 0, 100, null, '0.0').ensure('pressureGainI').satisfiesRule('numberRange', 0, 100, null, '0.0').ensure('pressureGainD').satisfiesRule('numberRange', 0, 100, null, '0.0').ensure('pressureDeadBand').satisfiesRule('numberRange', 0, 20.69, psiKpaConvert, '0.00').ensure('pressureServoKick').satisfiesRule('numberRange', 0, 100).ensure('pressureRunHoldDelay').satisfiesRule('numberRange', 0, 10000, validateCalc).rules;
            this.controller.addObject(this.state, rules);
        };

        return ControlTuning;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/pressure/control-tuning.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/number-format\"></require>\n    <require from=\"resources/value-converters/multiplier-format\"></require>\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\n    <require from=\"views/settings/settings-item\"></require>\n    <require from=\"views/settings/settings-dropdown\"></require>\n    \n    <li class=\"container-fluid\">\n        <form style=\"background-color: white\" class=\"form-horizontal\">\n\n            <div as-element=\"settings-item\" val.bind=\"state.pressureGainK | numberFormat:'0.0' & validate\" label=\"systemSettings.pressure.controlTuning.labels.pressureGainK\"\n                    min=\"0\" max=\"100\" prop=\"pressureGainK\">\n            </div>\n            <div as-element=\"settings-item\" val.bind=\"state.pressureGainP | numberFormat:'0.0' & validate\" label=\"systemSettings.pressure.controlTuning.labels.pressureGainP\"\n                    min=\"0\" max=\"100\" prop=\"pressureGainP\">\n            </div>\n            <div as-element=\"settings-item\" val.bind=\"state.pressureGainI | numberFormat:'0.0' & validate\" label=\"systemSettings.pressure.controlTuning.labels.pressureGainI\"\n                    min=\"0\" max=\"100\" prop=\"pressureGainI\">\n            </div>\n            <div as-element=\"settings-item\" val.bind=\"state.pressureGainD | numberFormat:'0.0' & validate\" label=\"systemSettings.pressure.controlTuning.labels.pressureGainD\"\n                    min=\"0\" max=\"100\" prop=\"pressureGainD\">\n            </div>\n            <div as-element=\"settings-item\" val.bind=\"state.pressureDeadBand | kpaToPsi:'0.00' & validate\" label=\"systemSettings.pressure.controlTuning.labels.pressureDeadBand\"\n                    units=\"units.psi\" min=\"0\" max=\"100\" step=\".01\" prop=\"pressureDeadBand\">\n            </div>\n            <div as-element=\"settings-item\" val.bind=\"state.pressureServoKick | numberFormat & validate\" label=\"systemSettings.pressure.controlTuning.labels.pressureServoKick\"\n                    units=\"%\" min=\"0\" max=\"100\" step=\"1\" prop=\"pressureServoKick\">\n            </div>\n            <div as-element=\"settings-item\" val.bind=\"state.pressureRunHoldDelay | multiplierFormat:1000:'0.0' & validate\" label=\"systemSettings.pressure.controlTuning.labels.pressureRunHoldDelay\"\n                    units=\"units.sec\" min=\"0\" max=\"10\" step=\".1\" prop=\"pressureRunHoldDelay\">\n            </div>\n            <settings-dropdown selected.bind=\"state.rateSyncEnabled\" label=\"systemSettings.pressure.controlTuning.labels.rateSyncType\"\n                                options.bind=\"rateSyncStates\" prop=\"rateSyncEnabled\"></settings-dropdown>\n        </form>\n    </li>\n\n</template>\n"; });
var cov_j5m9177h8 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/pressure-setup.js',
        hash = '2d1eba6761ba59b46ca51ac4b6d387fd2e46b9db',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/pressure-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/pressure-setup',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PressureSetup = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _desc, _value, _class, _descriptor;

    var PressureSetup = exports.PressureSetup = (_dec = (0, _aureliaFramework.computedFrom)('active'), (_class = function () {
        function PressureSetup() {
            _classCallCheck(this, PressureSetup);

            _initDefineProp(this, 'active', _descriptor, this);

            this.type = 'pressure-setup';

            this.widgets = [{ 'name': 'pump-setup', 'title': ' Pump Setup' }, { 'name': 'sensor-setup', 'title': ' Sensor Setup' }, { 'name': 'control-tuning', 'title': ' Control Tuning' }];
        }

        PressureSetup.prototype.open = function open(widget) {
            if (this.active === widget.name) {
                this.active = '';
            } else {
                this.active = widget.name;
            }
        };

        _createClass(PressureSetup, [{
            key: 'show',
            get: function get() {
                return this.active;
            }
        }]);

        return PressureSetup;
    }(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'active', [_aureliaFramework.observable], {
        enumerable: true,
        initializer: null
    }), _applyDecoratedDescriptor(_class.prototype, 'show', [_dec], Object.getOwnPropertyDescriptor(_class.prototype, 'show'), _class.prototype)), _class));
});
define('text!views/settings/pressure-setup.html', ['module'], function(module) { module.exports = "<template>\n    <div class=\"panel panel-default\">\n        <label class=\"panel-heading tree-toggle nav-header\"> Pressure</label>\n        <ul class=\"panel-body nav nav-list tree\">\n            <li repeat.for=\"widget of widgets\" class=\"au-animate\">\n                <div class=\"panel panel-default\">\n                    <label class=\"panel-heading tree-toggle nav-header\" click.delegate=\"open(widget)\">${widget.title}</label>\n                    <div if.bind=\"show == widget.name\" class=\"panel-body\">\n                        <compose view-model=\"views/settings/pressure/${widget.name}\" class=\"col-md-11\"></compose>\n                    </div>\n                </div>\n            </li>\n        </ul>\n    </div>\n</template>\n"; });
var cov_1cubx6qfi = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/operator/language-units.js',
        hash = '7349a4752bb0192c6c203c0e83dbcf78e9dd14cf',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/operator/language-units.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/operator/language-units',['exports', '../../gateway-state-base'], function (exports, _gatewayStateBase) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.LanguageUnits = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var LanguageUnits = exports.LanguageUnits = function (_ref) {
        _inherits(LanguageUnits, _ref);

        function LanguageUnits() {
            _classCallCheck(this, LanguageUnits);

            for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
                rest[_key] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'language-units';
            _this.languageTypes = [];
            _this.unitTypes = [];
            _this.autoSyncProperties = ['Language', 'UnitsPressure', 'UnitsVolume'];


            var keyBase = 'systemSettings.operator.languageUnits.';

            _this.languageTypes = _this.getTypes(keyBase + 'languageTypes');
            _this.unitPressureTypes = _this.getTypes(keyBase + 'unitPressureTypes');
            _this.unitVolumeTypes = _this.getTypes(keyBase + 'unitVolumeTypes');
            return _this;
        }

        LanguageUnits.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
        };

        return LanguageUnits;
    }((_gatewayStateBase.GatewayStateBase));
});
define('text!views/settings/operator/language-units.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"views/settings/settings-dropdown\"></require>\n    \n    <li class=\"container-fluid\">\n        <form style=\"background-color: white\" class=\"form-horizontal\">\n\n            <settings-dropdown selected.bind=\"state.language\" label=\"systemSettings.operator.languageUnits.labels.language\"\n                               options.bind=\"languageTypes\" prop=\"language\"></settings-dropdown>\n\n            <settings-dropdown selected.bind=\"state.unitsVolume\" label=\"systemSettings.operator.languageUnits.labels.unitsVolume\"\n                               options.bind=\"unitVolumeTypes\" prop=\"unitsVolume\"></settings-dropdown>\n\n            <settings-dropdown selected.bind=\"state.unitsPressure\" label=\"systemSettings.operator.languageUnits.labels.unitsPressure\"\n                               options.bind=\"unitPressureTypes\" prop=\"unitsPressure\"></settings-dropdown>\n        </form>\n    </li>\n\n\n</template>\n"; });
var cov_2qdhswlch8 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/operator/diagnostics.js',
        hash = '41ab052235100cb5182fe6c3453c9ea69d75071f',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/operator/diagnostics.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/operator/diagnostics',['exports', '../../gateway-state-base'], function (exports, _gatewayStateBase) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Diagnostics = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var Diagnostics = exports.Diagnostics = function (_ref) {
        _inherits(Diagnostics, _ref);

        function Diagnostics() {
            _classCallCheck(this, Diagnostics);

            for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
                rest[_key] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'diagnostics';
            _this.name = 'diagnostics';
            _this.autoSyncProperties = ['SystemVoltage', 'ServoCurrent', 'GpsBaudRate', 'HubAppVersion', 'TcSections'];
            return _this;
        }

        Diagnostics.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
        };

        return Diagnostics;
    }((_gatewayStateBase.GatewayStateBase));
});
define('text!views/settings/operator/diagnostics.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"views/settings/settings-item\"></require>\n    <require from=\"resources/value-converters/uintToVersionNumber\"></require>\n    <require from=\"resources/value-converters/number-format\"></require>\n\n    <li class=\"container-fluid\">\n        <form class=\"form-horizontal\">\n            <!--<div readonly=\"true\" as-element=\"settings-item\" val.bind=\"state.hubAppVersion | uintToVersionNumber:' '\"\n         label=\"systemSettings.operator.diagnostics.labels.revisionInformation\">\n    </div>-->\n            <div class=\"form-group form-group-lg\">\n                <label for=\"p-sensor\" class=\"col-xs-4 control-label\" i18n=\"systemSettings.operator.diagnostics.labels.revisionInformation\">\n                    systemSettings.operator.diagnostics.labels.revisionInformation\n                </label>\n                <div class=\"col-xs-6\">\n                    <input type=\"text\" readonly.bind=\"true\" id=\"p-sensor\" class=\"form-control\"\n                           value.two-way=\"state.hubAppVersion | uintToVersionNumber\">\n                    </input>\n                </div>\n            </div>\n            <div readonly=\"true\" as-element=\"settings-item\" val.bind=\"state.systemVoltage | numberFormat:'0.0'\"\n                 label=\"systemSettings.operator.diagnostics.labels.systemVoltage\"\n                 units=\"units.volt\">\n            </div>\n            <div readonly=\"true\" as-element=\"settings-item\" val.bind=\"state.servoCurrent | numberFormat:'0.0'\"\n                 label=\"systemSettings.operator.diagnostics.labels.servoCurrent\"\n                 units=\"units.amp\">\n            </div>\n            <div readonly=\"true\" as-element=\"settings-item\" val.bind=\"state.gpsBaudRate | numberFormat\"\n                 label=\"systemSettings.operator.diagnostics.labels.gpsBaudRate\">\n            </div>\n            <div readonly=\"true\" as-element=\"settings-item\" val.bind=\"state.tcSections | numberFormat\"\n                 label=\"systemSettings.operator.diagnostics.labels.tcSections\">\n            </div>\n        </form>\n    </li>\n\n</template>\n"; });
var cov_2m5dwj0tpw = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/operator/counters.js',
        hash = 'fdd81a28dd580da20b322380a4360ae06ddce6e8',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/operator/counters.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/operator/counters',['exports', '../../gateway-state-base'], function (exports, _gatewayStateBase) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Counters = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var Counters = exports.Counters = function (_ref) {
        _inherits(Counters, _ref);

        function Counters() {
            _classCallCheck(this, Counters);

            for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
                rest[_key] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'counters';
            _this.autoSyncProperties = ['HourMeter', 'ControllerAreaCounter', 'Area1Counter', 'Tank1Counter', 'ControllerVolumeCounter', 'Tank1Rate', 'FlowmeterFrequency'];
            return _this;
        }

        Counters.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
        };

        return Counters;
    }((_gatewayStateBase.GatewayStateBase));
});
define('text!views/settings/operator/counters.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"views/settings/settings-item\"></require>\n    <require from=\"resources/value-converters/number-format\"></require>\n    <require from=\"resources/value-converters/mlToGal\"></require>\n    <require from=\"resources/value-converters/hectaresToAcres\"></require>\n    \n    <li class=\"container-fluid\">\n        <form class=\"form-horizontal\">\n            <div readonly=\"true\" as-element=\"settings-item\" val.bind=\"state.hourMeter | numberFormat:'0.0'\"\n                 label=\"systemSettings.operator.counters.labels.hourMeter\"\n                 units=\"units.hour\">\n            </div>\n            <div readonly=\"true\" as-element=\"settings-item\" val.bind=\"state.controllerAreaCounter | hectaresToAcres:'0.0'\"\n                 label=\"systemSettings.operator.counters.labels.controllerAreaCounter\"\n                 units=\"units.acre\">\n            </div>\n            <div readonly=\"true\" as-element=\"settings-item\" val.bind=\"state.area1Counter | hectaresToAcres:'0.0'\"\n                 label=\"systemSettings.operator.counters.labels.area1Counter\"\n                 units=\"units.acre\">\n            </div>\n            <div readonly=\"true\" as-element=\"settings-item\" val.bind=\"state.controllerVolumeCounter | mlToGal:'0.0'\"\n                 label=\"systemSettings.operator.counters.labels.controllerVolumeCounter\"\n                 units=\"units.gal\">\n            </div>\n            <div readonly=\"true\" as-element=\"settings-item\" val.bind=\"state.tank1Counter | mlToGal:'0.0'\"\n                 label=\"systemSettings.operator.counters.labels.actualVolumeCounter\"\n                 units=\"units.gal\">\n            </div>\n            <div readonly=\"true\" as-element=\"settings-item\" val.bind=\"state.tank1Rate | mlToGal:'0.0'\"\n                 label=\"systemSettings.operator.counters.labels.tank1Rate\"\n                 units=\"units.galMin\">\n            </div>\n            <div readonly=\"true\" as-element=\"settings-item\" val.bind=\"state.flowmeterFrequency\"\n                 label=\"systemSettings.operator.counters.labels.flowmeterFrequency\"\n                 units=\"units.hz\">\n            </div>\n        </form>\n    </li>\n\n</template>\n"; });
var cov_1jr017dm1o = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/operator.js',
        hash = '5be4678f66376d60b394272616ed71b7fbc9c47a',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/operator.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/operator',['exports', 'aurelia-framework', '../gateway-state-base'], function (exports, _aureliaFramework, _gatewayStateBase) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Operator = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _desc, _value, _class, _descriptor;

    var Operator = exports.Operator = (_dec = (0, _aureliaFramework.computedFrom)('active'), (_class = function (_ref) {
        _inherits(Operator, _ref);

        function Operator() {
            _classCallCheck(this, Operator);

            for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
                rest[_key] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _initDefineProp(_this, 'active', _descriptor, _this);

            _this.type = 'operator';
            _this.name = 'operator';

            _this.widgets = [{ 'name': 'counters', 'title': ' Counters' }, { 'name': 'diagnostics', 'title': ' Diagnostics' }, { 'name': 'language-units', 'title': ' Language/Units' }];
            return _this;
        }

        Operator.prototype.open = function open(widget) {
            if (this.active === widget.name) {
                this.active = '';
            } else {
                this.active = widget.name;
            }
        };

        _createClass(Operator, [{
            key: 'show',
            get: function get() {
                return this.active;
            }
        }]);

        return Operator;
    }((_gatewayStateBase.GatewayStateBase)), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'active', [_aureliaFramework.observable], {
        enumerable: true,
        initializer: null
    }), _applyDecoratedDescriptor(_class.prototype, 'show', [_dec], Object.getOwnPropertyDescriptor(_class.prototype, 'show'), _class.prototype)), _class));
});
define('text!views/settings/operator.html', ['module'], function(module) { module.exports = "<template>\n    <div class=\"panel panel-default\">\n        <label class=\"tree-toggle nav-header ion-chevron-down panel-heading\"> Operator</label>\n        <ul class=\"panel-body nav nav-list tree\">\n            <li repeat.for=\"widget of widgets\" class=\"au-animate\">\n                <div class=\"panel panel-default\">\n                    <label class=\"panel-heading tree-toggle nav-header\" click.delegate=\"open(widget)\">${widget.title}</label>\n                    <div if.bind=\"show == widget.name\" class=\"panel-body\">\n                        <compose view-model=\"views/settings/operator/${widget.name}\" class=\"col-md-11\"></compose>\n                    </div>\n                </div>\n            </li>\n        </ul>\n    </div>\n\n</template>\n"; });
var cov_dcwr8lkkn = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/nh3-setup.js',
        hash = '5a09cb97a69e24c364acaad083b9696dec07f026',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/nh3-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/nh3-setup',['exports', 'aurelia-framework', '../gateway-state-base', 'aurelia-validation'], function (exports, _aureliaFramework, _gatewayStateBase, _aureliaValidation) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Nh3Setup = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _desc, _value, _class, _descriptor;

    var Nh3Setup = exports.Nh3Setup = (_dec = (0, _aureliaFramework.computedFrom)('active'), (_class = function (_ref) {
        _inherits(Nh3Setup, _ref);

        function Nh3Setup() {
            _classCallCheck(this, Nh3Setup);

            for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
                rest[_key] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _initDefineProp(_this, 'active', _descriptor, _this);

            _this.type = 'nh3-setup';
            _this.autoSyncProperties = ['Nh3StrainerPressureMax', 'nh3MinimumOutletPressure', 'NH3Cooler'];

            _this.widgets = [];
            _this.coolerTypes = _this.getTypes('systemSettings.nh3.coolerTypes');
            return _this;
        }

        Nh3Setup.prototype.open = function open(widget) {
            if (this.active === widget.name) {
                this.active = '';
            } else {
                this.active = widget.name;
            }
        };

        Nh3Setup.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
            var rules = _aureliaValidation.ValidationRules.ensure('nh3StrainerPressureMax').satisfiesRule('numberRange', 0, 50).ensure('nh3MinimumOutletPressure').satisfiesRule('numberRange', 0, 50).rules;
            this.controller.addObject(this.state, rules);
        };

        _createClass(Nh3Setup, [{
            key: 'show',
            get: function get() {
                return this.active;
            }
        }]);

        return Nh3Setup;
    }((_gatewayStateBase.GatewayStateBase)), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'active', [_aureliaFramework.observable], {
        enumerable: true,
        initializer: null
    }), _applyDecoratedDescriptor(_class.prototype, 'show', [_dec], Object.getOwnPropertyDescriptor(_class.prototype, 'show'), _class.prototype)), _class));
});
define('text!views/settings/nh3-setup.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/number-format\"></require>\n    <require from=\"views/settings/settings-item\"></require>\n    <require from=\"views/settings/settings-dropdown\"></require>\n\n    <div class=\"panel panel-default\">\n        <label class=\"panel-heading tree-toggle nav-header\"> NH3</label>\n        <ul class=\"panel-body nav nav-list tree\">\n            <li repeat.for=\"widget of widgets\" class=\"au-animate\">\n                <div class=\"panel panel-default\">\n                    <label class=\"panel-heading tree-toggle nav-header\" click.delegate=\"open(widget)\">${widget.title}</label>\n                    <div if.bind=\"show == widget.name\" class=\"panel-body\">\n                        <compose view-model=\"views/settings/nh-three/${widget.name}\" class=\"col-md-11\"></compose>\n                    </div>\n                </div>\n            </li>\n            <li class=\"container-fluid\">\n                <form style=\"background-color: white\" class=\"form-horizontal\">\n                    <div as-element=\"settings-item\" val.bind=\"state.nh3StrainerPressureMax | numberFormat:'0.000000' & validate\" step=\"1\"\n                         label=\"systemSettings.nh3.labels.nh3StrainerPressureMax\" prop=\"nh3StrainerPressureMax\">\n                    </div>\n                    <div as-element=\"settings-item\" val.bind=\"state.nh3MinimumOutletPressure | numberFormat:'0.000000' & validate\" step=\"1\"\n                         label=\"systemSettings.nh3.labels.nh3MinimumOutletPressure\" prop=\"nh3MinimumOutletPressure\">\n                    </div>\n                    <settings-dropdown selected.bind=\"state.nH3Cooler\" label=\"systemSettings.nh3.labels.nh3Cooler\"\n                                       options.bind=\"coolerTypes\" prop=\"nH3Cooler\"></settings-dropdown>\n                </form>\n            </li>\n        </ul>\n    </div>\n</template>\n"; });
var cov_19b2vnx6mk = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/nh-three/nh-three.js',
        hash = '5a4ef656b76789be7da2253005317dc2e7c47e04',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/nh-three/nh-three.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/nh-three/nh-three',['exports', '../../gateway-state-base', 'aurelia-validation'], function (exports, _gatewayStateBase, _aureliaValidation) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.NhThree = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var NhThree = exports.NhThree = function (_ref) {
        _inherits(NhThree, _ref);

        function NhThree() {
            _classCallCheck(this, NhThree);

            for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
                rest[_key] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'nh-three';
            _this.autoSyncProperties = ['Nh3StrainerPressureMax', 'nh3MinimumOutletPressure', 'NH3Cooler'];


            _this.coolerTypes = _this.getTypes(keyBase + 'coolerTypes');
            return _this;
        }

        NhThree.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
            var rules = _aureliaValidation.ValidationRules.ensure('nh3StrainerPressureMax').satisfiesRule('numberRange', 0, 50).ensure('nh3MinimumOutletPressure').satisfiesRule('numberRange', 0, 50).rules;
            this.controller.addObject(this.state, rules);
        };

        return NhThree;
    }((_gatewayStateBase.GatewayStateBase));
});
define('text!views/settings/nh-three/nh-three.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/number-format\"></require>\n    <require from=\"views/settings/settings-item\"></require>\n    <require from=\"views/settings/settings-dropdown\"></require>\n\n    <li class=\"container-fluid\">\n        <form style=\"background-color: white\" class=\"form-horizontal\">\n            <div as-element=\"settings-item\" val.bind=\"state.nh3StrainerPressureMax | numberFormat:'0.000000' & validate\" step=\"1\"\n                 label=\"systemSettings.nh3.labels.nh3StrainerPressureMax\" prop=\"nh3StrainerPressureMax\">\n            </div>\n            <div as-element=\"settings-item\" val.bind=\"state.nh3MinimumOutletPressure | numberFormat:'0.000000' & validate\" step=\"1\"\n                 label=\"systemSettings.nh3.labels.nh3MinimumOutletPressure\" prop=\"nh3MinimumOutletPressure\">\n            </div>\n            <div as-element=\"settings-item\" val.bind=\"state.nh3MinimumOutletPressure | numberFormat:'0.000000' & validate\" step=\"1\"\n                 label=\"systemSettings.nh3.labels.nh3MinimumOutletPressure\" prop=\"nh3MinimumOutletPressure\">\n            </div>\n\n            <settings-dropdown selected.bind=\"state.nH3Cooler\" label=\"systemSettings.nh3.labels.nh3Cooler\"\n                               options.bind=\"coolerTypes\" prop=\"nH3Cooler\"></settings-dropdown>\n        </form>\n    </li>\n\n</template>\n"; });
var cov_1jyoscz6e1 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/navigation/vehicle-setup.js',
        hash = 'ebdeb7a42b11bb212ffd376fff226486405ad8c3',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/navigation/vehicle-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/navigation/vehicle-setup',['exports', 'aurelia-framework', '../../gateway-state-base', '../../../resources/value-converters/mmToInches', 'aurelia-validation'], function (exports, _aureliaFramework, _gatewayStateBase, _mmToInches, _aureliaValidation) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.VehicleSetup = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var VehicleSetup = exports.VehicleSetup = (_dec = (0, _aureliaFramework.inject)(_mmToInches.MmToInchesValueConverter), _dec(_class = function (_ref) {
        _inherits(VehicleSetup, _ref);

        function VehicleSetup(mmToInchesValueConverter) {
            _classCallCheck(this, VehicleSetup);

            for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
                rest[_key - 1] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'vehicle-setup';
            _this.autoSyncProperties = ['MachineType', 'BoomType', 'CenterX', 'DrawbarX'];

            _this.mmToInchesValueConverter = mmToInchesValueConverter;

            var keyBase = 'systemSettings.navigation.vehicle.';
            _this.machineTypes = _this.getTypes(keyBase + 'machineTypes');
            _this.boomTypes = _this.getTypes(keyBase + 'boomTypes');
            return _this;
        }

        VehicleSetup.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
            var btmLimit = -32767;
            var topLimit = 32767;
            var rules = _aureliaValidation.ValidationRules.ensure('centerX').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInchesValueConverter.forValidate).ensure('drawbarX').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInchesValueConverter.forValidate).rules;
            this.controller.addObject(this.state, rules);
        };

        return VehicleSetup;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/navigation/vehicle-setup.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/mmToInches\"></require>\n    <require from=\"views/settings/settings-item\"></require>\n    <require from=\"views/settings/settings-dropdown\"></require>\n    \n    <li class=\"container-fluid\">\n        <form style=\"background-color: white\" class=\"form-horizontal\">\n\n            <settings-dropdown selected.bind=\"state.machineType\" label=\"systemSettings.navigation.vehicle.labels.machineType\"\n                                options.bind=\"machineTypes\" prop=\"machineType\"></settings-dropdown>\n\n            <settings-dropdown selected.bind=\"state.boomType\" label=\"systemSettings.navigation.vehicle.labels.boomType\"\n                                options.bind=\"boomTypes\" prop=\"boomType\"></settings-dropdown>\n\n            <div as-element=\"settings-item\" val.bind=\"state.centerX | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.vehicle.labels.centerX\"\n                    units=\"units.in\" prop=\"centerX\">\n            </div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.drawbarX | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.vehicle.labels.drawbarX\"\n                    units=\"units.in\" prop=\"drawbarX\">\n            </div>\n\n        </form>\n    </li>\n\n</template>\n\n"; });
var cov_12s20w540x = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/navigation/overlap-setup.js',
        hash = '36fe66af124e527bf852c8e7dc06720a82f7a9eb',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/navigation/overlap-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/navigation/overlap-setup',['exports', 'aurelia-framework', '../../gateway-state-base', 'aurelia-validation', 'services/spray-session-service', '../../../resources/value-converters/mmToInches', '../../../resources/value-converters/multiplier-format'], function (exports, _aureliaFramework, _gatewayStateBase, _aureliaValidation, _spraySessionService, _mmToInches, _multiplierFormat) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.OverlapSetup = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var OverlapSetup = exports.OverlapSetup = (_dec = (0, _aureliaFramework.inject)(_spraySessionService.SpraySessionService, _mmToInches.MmToInchesValueConverter, _multiplierFormat.MultiplierFormatValueConverter), _dec(_class = function (_ref) {
        _inherits(OverlapSetup, _ref);

        function OverlapSetup(spraySessionService, mmToInchesValueConverter, multiplierFormatValueConverter) {
            _classCallCheck(this, OverlapSetup);

            for (var _len = arguments.length, rest = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
                rest[_key - 3] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'overlap-setup';
            _this.autoSyncProperties = ['OverlapDistance', 'ForwardOverlapDistance', 'BackwardOverlapDistance', 'SidewardOverlapDistance', 'BoundaryDistance', 'BoundaryDistanceF', 'BoundaryDistanceR', 'OverlapRate', 'LookAheadTime', 'LookAheadTimeOff'];

            _this.separableOverlapDistances = spraySessionService.useSeparableOverlapDistances();
            if (_this.separableOverlapDistances) {
                _this.gatewayService.getProperties(['ForwardOverlapDistance', 'BackwardOverlapDistance', 'SidewardOverlapDistance']).then(function (results) {
                    _this.state.forwardOverlapDistance = results[0];
                    _this.state.backwardOverlapDistance = results[1];
                    _this.state.sidewardOverlapDistance = results[2];
                });
            }
            _this.mmToInConverter = mmToInchesValueConverter;
            _this.multiplierFormatValueConverter = multiplierFormatValueConverter;
            return _this;
        }

        OverlapSetup.prototype.attached = function attached() {
            var _this2 = this;

            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
            var curriedSecondsToMillisecondsFormat = function curriedSecondsToMillisecondsFormat(n) {
                return function (m) {
                    return _this2.multiplierFormatValueConverter.forValidate(m, n);
                };
            };
            var validateCalc = curriedSecondsToMillisecondsFormat(1000);

            var rules = _aureliaValidation.ValidationRules.ensure('overlapDistance').satisfiesRule('numberRange', -6350, 6350, this.mmToInConverter.forValidate).ensure('boundaryDistance').satisfiesRule('numberRange', -6350, 6350, this.mmToInConverter.forValidate).ensure('boundaryDistanceF').satisfiesRule('numberRange', -6350, 6350, this.mmToInConverter.forValidate).ensure('boundaryDistanceR').satisfiesRule('numberRange', -6350, 6350, this.mmToInConverter.forValidate).ensure('overlapRate').satisfiesRule('numberRange', 0, 100).ensure('lookAheadTime').satisfiesRule('numberRange', 0, 2000, validateCalc).ensure('lookAheadTimeOff').satisfiesRule('numberRange', 0, 2000, validateCalc).rules;
            this.controller.addObject(this.state, rules);
        };

        return OverlapSetup;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/navigation/overlap-setup.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/number-format\"></require>\n    <require from=\"resources/value-converters/mmToInches\"></require>\n    <require from=\"resources/value-converters/multiplier-format\"></require>\n    <require from=\"views/settings/settings-item\"></require>\n    \n    <li class=\"container-fluid\">\n        <form style=\"background-color: white\" class=\"form-horizontal\">\n\n            <div if.bind=\"!separableOverlapDistances\">\n                <div as-element=\"settings-item\" val.bind=\"state.overlapDistance | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.overlap.overlapDistance\"\n                     units=\"units.in\" prop=\"overlapDistance\">\n                </div>\n            </div>\n            <div if.bind=\"separableOverlapDistances\">\n                <div as-element=\"settings-item\" val.bind=\"state.forwardOverlapDistance | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.overlap.forwardOverlapDistance\"\n                     units=\"units.in\" prop=\"forwardOverlapDistance\">\n                </div>\n                <div as-element=\"settings-item\" val.bind=\"state.backwardOverlapDistance | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.overlap.backwardOverlapDistance\"\n                     units=\"units.in\" prop=\"backwardOverlapDistance\">\n                </div>\n                <div as-element=\"settings-item\" val.bind=\"state.sidewardOverlapDistance | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.overlap.sidewardOverlapDistance\"\n                     units=\"units.in\" prop=\"sidewardOverlapDistance\">\n                </div>\n            </div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.boundaryDistance | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.overlap.boundaryDistance\"\n                 units=\"units.in\" prop=\"boundaryDistance\">\n            </div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.boundaryDistanceF | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.overlap.boundaryDistanceF\"\n                 units=\"units.in\" prop=\"boundaryDistanceF\">\n            </div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.boundaryDistanceR | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.overlap.boundaryDistanceR\"\n                 units=\"units.in\" prop=\"boundaryDistanceR\">\n            </div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.overlapRate | numberFormat & validate\" step=\"1\" label=\"systemSettings.navigation.overlap.overlapRate\"\n                 units=\"%\" prop=\"overlapRate\">\n            </div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.lookAheadTime | numberFormat:'0' & validate\" step=\"0.1\" label=\"systemSettings.navigation.overlap.lookAheadTime\"\n                 units=\"units.ms\" prop=\"lookAheadTime\">\n            </div>\n\n            <!--<div as-element=\"settings-item\" val.bind=\"state.lookAheadTimeOff | numberFormat:'0' & validate\" step=\"0.1\" label=\"systemSettings.navigation.overlap.lookAheadTimeOff\"\n                 units=\"units.ms\" prop=\"lookAheadTimeOff\">\n            </div>-->\n        </form>\n    </li>\n\n</template>\n"; });
var cov_8wckq7jfd = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/navigation/iso-look-ahead.js',
        hash = '3b71ced845f0da9bc456308ea0960dfb12fff91e',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/navigation/iso-look-ahead.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/navigation/iso-look-ahead',['exports', 'aurelia-framework', '../../gateway-state-base', '../../../resources/value-converters/mmToInches'], function (exports, _aureliaFramework, _gatewayStateBase, _mmToInches) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.IsoLookAhead = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var IsoLookAhead = exports.IsoLookAhead = (_dec = (0, _aureliaFramework.inject)(_mmToInches.MmToInchesValueConverter), _dec(_class = function (_ref) {
        _inherits(IsoLookAhead, _ref);

        function IsoLookAhead(mmToInchesValueConverter) {
            _classCallCheck(this, IsoLookAhead);

            for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
                rest[_key - 1] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'iso_look-ahead';
            _this.autoSyncProperties = ['OnLookAheadTime', 'OffLookAheadTime'];

            _this.mmToInchesValueConverter = mmToInchesValueConverter;
            return _this;
        }

        IsoLookAhead.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
        };

        return IsoLookAhead;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/navigation/iso-look-ahead.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/mmToInches\"></require>\n    <require from=\"views/settings/settings-item\"></require>\n    <require from=\"views/settings/settings-dropdown\"></require>\n\n    <li class=\"container-fluid\">\n        <form style=\"background-color: white\" class=\"form-horizontal\">\n\n            <div as-element=\"settings-item\" val.bind=\"state.onLookAheadTime\" step=\"1\" label=\"systemSettings.navigation.isoLookAhead.labels.onLookAhead\"\n                 units=\"units.ms\" prop=\"onLookAheadTime\">\n            </div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.offLookAheadTime\" step=\"1\" label=\"systemSettings.navigation.isoLookAhead.labels.offLookAhead\"\n                 units=\"units.ms\" prop=\"offLookAheadTime\">\n            </div>\n\n        </form>\n    </li>\n\n</template>\n"; });
var cov_1ait5gj7z0 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/navigation/implement-setup.js',
        hash = 'ca5ca02e84c211d9d9e4d0bd5b789d08816eebb4',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/navigation/implement-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/navigation/implement-setup',['exports', 'aurelia-framework', '../../gateway-state-base', '../../../resources/value-converters/mmToInches', 'aurelia-validation'], function (exports, _aureliaFramework, _gatewayStateBase, _mmToInches, _aureliaValidation) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.ImplementSetup = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var ImplementSetup = exports.ImplementSetup = (_dec = (0, _aureliaFramework.inject)(_mmToInches.MmToInchesValueConverter), _dec(_class = function (_ref) {
        _inherits(ImplementSetup, _ref);

        function ImplementSetup(mmToInchesValueConverter) {
            _classCallCheck(this, ImplementSetup);

            for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
                rest[_key - 1] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'implement-setup';
            _this.autoSyncProperties = ['BoomX', 'TrailerX', 'TrailerDbx', 'Trailer2X'];

            _this.mmToInchesValueConverter = mmToInchesValueConverter;
            return _this;
        }

        ImplementSetup.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
            var btmLimit = -32767;
            var topLimit = 32767;
            var rules = _aureliaValidation.ValidationRules.ensure('boomX').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInchesValueConverter.forValidate).ensure('trailerX').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInchesValueConverter.forValidate).ensure('trailerDbx').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInchesValueConverter.forValidate).ensure('trailer2X').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInchesValueConverter.forValidate).rules;
            this.controller.addObject(this.state, rules);
        };

        return ImplementSetup;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/navigation/implement-setup.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/mmToInches\"></require>\n    <require from=\"views/settings/settings-item\"></require>\n    <require from=\"views/settings/settings-dropdown\"></require>\n    \n    <li class=\"container-fluid\">\n        <form style=\"background-color: white\" class=\"form-horizontal\">\n\n            <div as-element=\"settings-item\" val.bind=\"state.boomX | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.implement.labels.boomX\"\n                    units=\"units.in\" prop=\"boomX\">\n            </div>\n                    \n            <div as-element=\"settings-item\" val.bind=\"state.trailerX | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.implement.labels.trailerX\"\n                    units=\"units.in\" prop=\"trailerX\">\n            </div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.trailerDbx | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.implement.labels.trailerDbx\"\n                    units=\"units.in\" prop=\"trailerDbx\">\n            </div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.trailer2X | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.implement.labels.trailer2X\"\n                    units=\"units.in\" prop=\"trailer2X\">\n            </div>\n\n        </form>\n    </li>\n\n</template>\n"; });
var cov_2734nn2hli = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/navigation/gyro-setup.js',
        hash = '60cfbac4d74106085a234dacda37a1d4fd301bfe',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/navigation/gyro-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/navigation/gyro-setup',['exports', '../../gateway-state-base'], function (exports, _gatewayStateBase) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.GyroSetup = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var GyroSetup = exports.GyroSetup = function (_ref) {
        _inherits(GyroSetup, _ref);

        function GyroSetup() {
            _classCallCheck(this, GyroSetup);

            for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
                rest[_key] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'gyro-setup';
            _this.enabledTypes = [];
            _this.autoSyncProperties = ['GyroEnabled', 'ContourEnabled'];

            _this.enabledTypes = _this.getTypes('common.enabledOptions');
            return _this;
        }

        GyroSetup.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
        };

        return GyroSetup;
    }((_gatewayStateBase.GatewayStateBase));
});
define('text!views/settings/navigation/gyro-setup.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"views/settings/settings-dropdown\"></require>\n    \n    <li class=\"container-fluid\">\n        <form style=\"background-color: white\" class=\"form-horizontal\">\n\n            <settings-dropdown selected.bind=\"state.gyroEnabled\" label=\"systemSettings.navigation.gyro.labels.gyroEnabled\"\n                                options.bind=\"enabledTypes\" prop=\"gyroEnabled\"></settings-dropdown>\n\n            <settings-dropdown selected.bind=\"state.contourEnabled\" label=\"systemSettings.navigation.gyro.labels.contourEnabled\"\n                                options.bind=\"enabledTypes\" prop=\"contourEnabled\"></settings-dropdown>\n        </form>\n    </li>\n\n</template>\n"; });
var cov_1z7283pxb1 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/navigation/gps-setup.js',
        hash = '8ea53716c668579be2a3c1966de569ba03bdb28e',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/navigation/gps-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/navigation/gps-setup',['exports', 'aurelia-framework', '../../gateway-state-base', 'aurelia-validation', '../../../resources/value-converters/mmToInches'], function (exports, _aureliaFramework, _gatewayStateBase, _aureliaValidation, _mmToInches) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.GpsSetup = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var GpsSetup = exports.GpsSetup = (_dec = (0, _aureliaFramework.inject)(_mmToInches.MmToInchesValueConverter), _dec(_class = function (_ref) {
        _inherits(GpsSetup, _ref);

        function GpsSetup(mmToInchesValueConverter) {
            _classCallCheck(this, GpsSetup);

            for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
                rest[_key - 1] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'gps-setup';
            _this.autoSyncProperties = ['GpsX', 'GpsY', 'GpsHeight', 'CenterX', 'BoomX', 'GpsSource'];

            _this.mmToInConverter = mmToInchesValueConverter;

            var keyBase = 'systemSettings.navigation.';
            _this.gpsType = _this.getTypes(keyBase + 'gpsType');
            return _this;
        }

        GpsSetup.prototype.attached = function attached() {
            this.setUpSubscriptions(this.autoSyncProperties);
            var btmLimit = -32767;
            var topLimit = 32767;
            var rules = _aureliaValidation.ValidationRules.ensure('gpsX').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInConverter.forValidate).ensure('gpsY').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInConverter.forValidate).ensure('gpsHeight').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInConverter.forValidate).ensure('centerX').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInConverter.forValidate).ensure('boomX').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInConverter.forValidate).rules;
            this.controller.addObject(this.state, rules);
        };

        return GpsSetup;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/navigation/gps-setup.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/mmToInches\"></require>\n    <require from=\"views/settings/settings-item\"></require>\n    <require from=\"views/settings/settings-dropdown\"></require>\n\n    <li class=\"container-fluid\">\n        <form style=\"background-color: white\" class=\"form-horizontal\">\n\n            <div as-element=\"settings-item\" val.bind=\"state.gpsX | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.gps.gpsX\"\n                 units=\"units.in\" prop=\"gpsX\">\n            </div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.gpsY | mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.gps.gpsY\"\n                 units=\"units.in\" prop=\"gpsY\">\n            </div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.gpsHeight| mmToInches & validate\" step=\"1\" label=\"systemSettings.navigation.gps.gpsHeight\"\n                 units=\"units.in\" prop=\"gpsHeight\">\n            </div>\n\n            <!--<div as-element=\"settings-item\" val.bind=\"state.centerX | mmToInches & validate\" step=\"1\"\n                    label=\"systemSettings.navigation.gps.centerX\"\n                    units=\"units.in\" prop=\"centerX\">\n            </div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.boomX | mmToInches & validate\" step=\"1\"\n                    label=\"systemSettings.navigation.gps.boomX\"\n                    units=\"units.in\" prop=\"boomX\">\n            </div>-->\n\n            <settings-dropdown selected.bind=\"state.gpsSource\"\n                               label=\"systemSettings.navigation.gps.gpsSource\"\n                               options.bind=\"gpsType\" prop=\"gpsSource\"></settings-dropdown>\n\n            <div class=\"graphic gps-setup-img\">\n            </div>\n\n        </form>\n    </li>\n\n</template>\n"; });
var cov_1h7wmzx40e = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/navigation/compass-setup.js',
        hash = '0105c9ff00b2b260ddbac06318b25b3c77691659',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/navigation/compass-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/navigation/compass-setup',['exports', 'aurelia-framework', '../../gateway-state-base', 'aurelia-validation', '../../../resources/value-converters/radiansToDegrees'], function (exports, _aureliaFramework, _gatewayStateBase, _aureliaValidation, _radiansToDegrees) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.CompassSetup = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var CompassSetup = exports.CompassSetup = (_dec = (0, _aureliaFramework.inject)(_radiansToDegrees.RadiansToDegreesValueConverter), _dec(_class = function (_ref) {
        _inherits(CompassSetup, _ref);

        function CompassSetup(radiansToDegreesValueConverter) {
            _classCallCheck(this, CompassSetup);

            for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
                rest[_key - 1] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'compass-setup';
            _this.compassEnabledTypes = [];
            _this.compassCalTypes = [];
            _this.autoSyncProperties = ['CompassEnabled', 'CompassCalibration', 'CompassCog', 'CompassOffset'];

            _this.radiansToDegreesValueConverter = radiansToDegreesValueConverter;
            _this.compassCalTypes = _this.getTypes('systemSettings.navigation.compass.compassCalTypes');
            _this.compassEnabledTypes = _this.getTypes('common.enabledOptions');
            return _this;
        }

        CompassSetup.prototype.attached = function attached() {
            this.setUpSubscriptions(this.autoSyncProperties);
            var rules = _aureliaValidation.ValidationRules.ensure('compassCog').satisfiesRule('numberRange', 0, 6.28, this.radiansToDegreesValueConverter.forValidate).ensure('compassOffset').satisfiesRule('numberRange', 0, 6.28, this.radiansToDegreesValueConverter.forValidate).rules;
            this.controller.addObject(this.state, rules);
        };

        return CompassSetup;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/navigation/compass-setup.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/radiansToDegrees\"></require>\n    <require from=\"views/settings/settings-item\"></require>\n    <require from=\"views/settings/settings-dropdown\"></require>\n    <require from=\"resources/value-converters/number-format\"></require>\n    \n    <li class=\"container-fluid\">\n        <form style=\"background-color: white\" class=\"form-horizontal\">\n\n            <settings-dropdown selected.bind=\"state.compassEnabled\" label=\"systemSettings.navigation.compass.labels.compassEnabled\"\n                                options.bind=\"compassEnabledTypes\" prop=\"compassEnabled\"></settings-dropdown>\n\n            <settings-dropdown selected.bind=\"state.compassCalibration\" label=\"systemSettings.navigation.compass.labels.compassCalibration\"\n                                options.bind=\"compassCalTypes\" prop=\"compassCalibration\"></settings-dropdown>\n\n            <div readonly=\"true\" as-element=\"settings-item\" val.bind=\"state.compassCog | radiansToDegrees:'0'\" label=\"systemSettings.navigation.compass.labels.compassCog\"\n                    units=\"units.deg\" disabled=\"true\">\n            </div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.compassOffset | radiansToDegrees:'0' & validate\" step=\"1\" label=\"systemSettings.navigation.compass.labels.compassOffset\"\n                    units=\"units.deg\" prop=\"compassOffset\">\n            </div>\n        </form>\n    </li>\n\n</template>\n"; });
var cov_2rh9pqsmt4 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/navigation-setup.js',
        hash = 'bc88f8f505729debab92a8f231cc0c8704ff851c',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/navigation-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/navigation-setup',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.NavigationSetup = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _desc, _value, _class, _descriptor;

    var NavigationSetup = exports.NavigationSetup = (_dec = (0, _aureliaFramework.computedFrom)('active'), (_class = function () {
        function NavigationSetup() {
            _classCallCheck(this, NavigationSetup);

            _initDefineProp(this, 'active', _descriptor, this);

            this.type = 'navigation-setup';

            this.widgets = [{ 'name': 'vehicle-setup', 'title': ' Vehicle' }, { 'name': 'implement-setup', 'title': ' Implement' }, { 'name': 'iso-look-ahead', 'title': ' ISO Look Ahead' }, { 'name': 'overlap-setup', 'title': ' CapMod Overlap' }, { 'name': 'gps-setup', 'title': ' GPS' }, { 'name': 'compass-setup', 'title': ' Compass' }, { 'name': 'gyro-setup', 'title': ' Gyro' }];
        }

        NavigationSetup.prototype.open = function open(widget) {
            if (this.active === widget.name) {
                this.active = '';
            } else {
                this.active = widget.name;
            }
        };

        _createClass(NavigationSetup, [{
            key: 'show',
            get: function get() {
                return this.active;
            }
        }]);

        return NavigationSetup;
    }(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'active', [_aureliaFramework.observable], {
        enumerable: true,
        initializer: null
    }), _applyDecoratedDescriptor(_class.prototype, 'show', [_dec], Object.getOwnPropertyDescriptor(_class.prototype, 'show'), _class.prototype)), _class));
});
define('text!views/settings/navigation-setup.html', ['module'], function(module) { module.exports = "<template>\n    <div class=\"panel panel-default\">\n        <label class=\"panel-heading tree-toggle nav-header\"> Navigation</label>\n        <ul class=\"panel-body nav nav-list tree\">\n            <li repeat.for=\"widget of widgets\" class=\"au-animate\">\n                <div class=\"panel panel-default\">\n                    <label class=\"panel-heading tree-toggle nav-header\" click.delegate=\"open(widget)\">${widget.title}</label>\n                    <div if.bind=\"show == widget.name\" class=\"panel-body\">\n                        <compose view-model=\"views/settings/navigation/${widget.name}\" class=\"col-md-11\"></compose>\n                    </div>\n                </div>\n            </li>\n        </ul>\n    </div>\n</template>\n"; });
var cov_1xg3qm3v0s = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/initial-setup/vcm-setup.js',
        hash = '0ca168ea938eefd72cfb7ecd250e3949d65d44f6',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/initial-setup/vcm-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/initial-setup/vcm-setup',['exports', 'aurelia-templating-resources', 'aurelia-framework', '../../../services/gateway-service', 'px-owl-carousel'], function (exports, _aureliaTemplatingResources, _aureliaFramework, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.VcmSetup = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    var _dec, _dec2, _dec3, _dec4, _class, _desc, _value, _class2;

    var VcmSetup = exports.VcmSetup = (_dec = (0, _aureliaFramework.inject)(_gatewayService.GatewayService, _aureliaTemplatingResources.BindingSignaler), _dec2 = (0, _aureliaFramework.computedFrom)('state.vcm0ValveBitMap'), _dec3 = (0, _aureliaFramework.computedFrom)('state.vcm1ValveBitMap'), _dec4 = (0, _aureliaFramework.computedFrom)('state.vcm0ValveBitMap', 'state.vcm1ValveBitMap', 'selectedVcm0', 'selectedVcm1'), _dec(_class = (_class2 = function () {
        function VcmSetup(gatewayService, signaler) {
            _classCallCheck(this, VcmSetup);

            this.type = 'vcm-setup';
            this.editDelta = {
                vcm0SerialNumber: []
            };
            this.selectedVcm0 = 0;
            this.selectedVcm1 = null;
            this.pulsingVcm0 = -1;
            this.pulsingVcm1 = -1;
            this.subscribedProperties = ['Vcm0SerialNumber', 'Vcm1SerialNumber', 'VcmCapstanSn', 'Vcm0ModuleNum', 'Vcm0ValveBitMap', 'Vcm1ValveBitMap', 'Vcm0SetupFlag', 'Vcm1SetupFlag'];

            this.signaler = signaler;
            this.gatewayService = gatewayService;
            this.state = this.gatewayService.getState();
        }

        VcmSetup.prototype.attached = function attached() {
            this.gatewayService.subscribe(this.subscribedProperties);
            var vcmCarousel = $('#vcm-selectors');
            vcmCarousel.owlCarousel({
                items: 2,
                dots: false,
                nav: true,
                mouseDrag: false,
                touchDrag: false,
                loop: false,
                navText: ['', ''],
                navClass: ['btn btn-lg bg-dark ion-ios-rewind', 'btn btn-lg bg-dark ion-ios-fastforward'],
                responsive: {
                    0: {
                        items: 1
                    },
                    600: {
                        items: 3
                    },
                    1000: {
                        items: 4
                    }
                }
            });
        };

        VcmSetup.prototype.unbind = function unbind() {
            this.turnOffNozzles();
            this.gatewayService.unsubscribe(this.subscribedProperties);
        };

        VcmSetup.prototype.getValves = function getValves(map) {
            if (map) {
                var count = 0;
                for (var i = 0; i < 15; i++) {
                    if ((map >> i & 1) === 1) {
                        count++;
                    }
                }
                return count;
            }
            return 0;
        };

        VcmSetup.prototype.getOffset0 = function getOffset0(index) {
            var offset = 0;
            if (this.selectedVcm0 === 0) {
                return index + 1;
            }
            for (var i = 0; i < this.selectedVcm0; i++) {
                offset += this.getValves(this.state.vcm0ValveBitMap[i]);
                offset += this.getValves(this.state.vcm1ValveBitMap[i]);
            }
            return offset + index + 1;
        };

        VcmSetup.prototype.getOffset1 = function getOffset1(index) {
            var offset = 0;
            if (this.selectedVcm1 === 0) {
                return index + this.getValves(this.state.vcm0ValveBitMap[0]);
            }
            for (var i = 0; i <= this.selectedVcm1; i++) {
                offset += this.getValves(this.state.vcm0ValveBitMap[i]);
                if (i !== this.selectedVcm1) {
                    offset += this.getValves(this.state.vcm1ValveBitMap[i]);
                }
            }
            return offset + index;
        };

        VcmSetup.prototype.selectVcmFromSubnet0 = function selectVcmFromSubnet0(index) {
            this.turnOffNozzles();
            if (this.selectedVcm0 === index) {
                this.state.vcm0SetupFlag[index] = 0x2;
                this.editDelta.vcm0SetupFlag = this.state.vcm0SetupFlag;
                this.send();
                this.pulsingVcm0 = index;
            } else {
                this.selectedVcm1 = null;
                this.selectedVcm0 = index;
                this.signaler.signal('selected-vcm');
            }
        };

        VcmSetup.prototype.turnOffNozzles = function turnOffNozzles() {
            if (this.selectedVcm0 !== null) {
                this.state.vcm0SetupFlag[this.selectedVcm0] = 0x1;
                this.editDelta.vcm0SetupFlag = this.state.vcm0SetupFlag;
            } else if (this.selectedVcm1 !== null) {
                this.state.vcm1SetupFlag[this.selectedVcm1] = 0x1;
                this.editDelta.vcm1SetupFlag = this.state.vcm1SetupFlag;
            }
            this.pulsingVcm1 = -1;
            this.pulsingVcm0 = -1;
            this.send();
        };

        VcmSetup.prototype.selectVcmFromSubnet1 = function selectVcmFromSubnet1(index) {
            this.turnOffNozzles();
            if (this.selectedVcm1 === index) {
                this.state.vcm1SetupFlag[index] = 0x2;
                this.editDelta.vcm1SetupFlag = this.state.vcm1SetupFlag;
                this.send();
                this.pulsingVcm1 = index;
            } else {
                this.selectedVcm0 = null;
                this.selectedVcm1 = index;
                this.signaler.signal('selected-vcm');
            }
        };

        VcmSetup.prototype.toggle = function toggle(index) {
            this.state.vcm0SetupFlag[index] = 0x4;
            this.editDelta.vcm0SetupFlag = this.state.vcm0SetupFlag;
            this.send();
        };

        VcmSetup.prototype.toggleVcm1 = function toggleVcm1(index) {
            this.state.vcm1SetupFlag[index] = 0x4;
            this.editDelta.vcm1SetupFlag = this.state.vcm1SetupFlag;
            this.send();
        };

        VcmSetup.prototype.swapEnds = function swapEnds() {
            if (this.selectedVcm0 !== null) {
                this.toggle(this.selectedVcm0);
            } else {
                this.toggleVcm1(this.selectedVcm1);
            }
        };

        VcmSetup.prototype.swapVcms = function swapVcms(index) {
            this.state.vcm0SetupFlag[index] = 0x8;
            this.editDelta.vcm0SetupFlag = this.state.vcm0SetupFlag;
            this.send();
        };

        VcmSetup.prototype.send = function send() {
            this.gatewayService.send(this.editDelta);
        };

        VcmSetup.prototype.toggleByte = function toggleByte(value) {
            return value === 1 ? 0 : 1;
        };

        _createClass(VcmSetup, [{
            key: 'vcm0Valves',
            get: function get() {
                return this.state.vcm0ValveBitMap;
            }
        }, {
            key: 'vcm1Valves',
            get: function get() {
                return this.state.vcm1ValveBitMap;
            }
        }, {
            key: 'selectedVcmOrientation',
            get: function get() {
                var x = 0;
                if (this.selectedVcm0 !== null) {
                    if (this.state.vcm0ValveBitMap[this.selectedVcm0] > 32767) {
                        x = 1;
                    }
                    return x;
                }
                if (this.state.vcm1ValveBitMap[this.selectedVcm1] > 32767) {
                    x = 1;
                }
                return x;
            }
        }]);

        return VcmSetup;
    }(), (_applyDecoratedDescriptor(_class2.prototype, 'vcm0Valves', [_dec2], Object.getOwnPropertyDescriptor(_class2.prototype, 'vcm0Valves'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'vcm1Valves', [_dec3], Object.getOwnPropertyDescriptor(_class2.prototype, 'vcm1Valves'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'selectedVcmOrientation', [_dec4], Object.getOwnPropertyDescriptor(_class2.prototype, 'selectedVcmOrientation'), _class2.prototype)), _class2)) || _class);
});
define('text!views/settings/initial-setup/vcm-setup.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"components/graphtab/nozzle-info\"></require>\n    <require from=\"views/settings/initial-setup/vcm-btn\"></require>\n\n    <div id=\"vcm-selectors\" style=\"margin-top: 5rem;\" class=\"owl-carousel\">\n        <div class=\"owl-stage-outer\" repeat.for=\"serialNum of state.vcm0ValveBitMap.length\">\n            <div class=\"owl-stage\" style=\"margin-left: 15px\">\n                <button i18n=\"systemSettings.initial.vcm.labels.swapVcm\" style=\"border-width: 5px; margin-bottom: 10px; margin-left: 30px; margin-right: 30px; display: block\" type=\"button\" class=\"item btn-secondary ${state.vcm1ValveBitMap[$index] != 0 && (selectedVcm0 === $index || selectedVcm1 === $index) ? 'btn-visible' : 'btn-hidden'}\" click.delegate=\"swapVcms($index)\"></button>\n                <div style=\"border-width: 5px; margin-left: 5px; margin-right: 5px; display: block\" type=\"button\" class=\"btn item ${selectedVcm0 === $index ? 'btn-warn' : 'btn-secondary'} ${pulsingVcm0 === $index ? 'btn-primary' : ''} vcm-boom-btn ${state.vcm0ValveBitMap[$index] === 0 ? 'btn-hidden' : 'btn-visible'}\" click.delegate=\"selectVcmFromSubnet0($index)\">\n                    <vcm-btn orientation.bind=\"state.vcm0ValveBitMap[$index]\" vcm=\"A\" label.bind=\"$index + 1\"></vcm-btn>\n                </div>\n                <div style=\"border-width: 5px; margin-top: 10px; margin-left: 5px; margin-right: 5px; display: block\" type=\"button\" class=\"btn item ${selectedVcm1 === $index ? 'btn-warn' : 'btn-secondary'} ${pulsingVcm1 === $index ? 'btn-primary' : ''} vcm-boom-btn ${state.vcm1ValveBitMap[$index] === 0 ? 'btn-hidden' : 'btn-visible'}\" click.delegate=\"selectVcmFromSubnet1($index)\">\n                    <vcm-btn orientation.bind=\"state.vcm1ValveBitMap[$index]\" vcm=\"B\" label.bind=\"$index + 1\"></vcm-btn>\n                </div>\n            </div>\n        </div>\n    </div>\n    <div style=\"height: 150px;\" class=\"tractor-img\">\n    </div>\n    <div style=\"background-color: inherit\" class=\"panel\">\n        <div class=\"panel-body\" style=\"text-align: center\">\n            <div class=\"form-group\">\n                <!--<h1 i18n=\"systemSettings.initial.vcm.labels.selectedVcm\"></h1>-->\n                <div>\n                    <label class=\"label-lg\" i18n=\"systemSettings.initial.vcm.labels.selectedVcm\"></label>\n                </div>                \n                <label class=\"label-md\" for=\"serial-num\" i18n=\"systemSettings.initial.vcm.labels.serialNum\"></label>\n                <span class=\"label-md\" id=\"serial-num\">\n                    ${selectedVcm0 === null ? state.vcm1SerialNumber[selectedVcm1] : state.vcm0SerialNumber[selectedVcm0] }\n                </span>\n            </div>\n            <button i18n=\"systemSettings.initial.vcm.labels.swapEnds\" class=\"btn btn-info\" click.delegate=\"swapEnds()\"></button>\n        </div>\n    </div>\n    <div if.bind=\"vcm0Valves && vcm1Valves\" id=\"valve-bar\" style=\"margin-left: 30px; margin-right: 30px\">\n        <div style=\"position: relative\" class=\"${selectedVcmOrientation === 0 ? 'left-vertical-bar' : 'right-vertical-bar'  & signal:'selected-vcm'}\">\n            <div class=\"dot ${selectedVcmOrientation === 0 ? 'left-dot' : 'right-dot' & signal:'selected-vcm'}\"></div>\n        </div>\n        <hr style=\"margin: auto; background-color: black; width: 100%; height: 6px;\"/>\n        <div>\n            <div style=\"margin-top: -5px; margin-bottom: 50px\" class=\"flex-container space-evenly\">\n                <div repeat.for=\"valve of getValves(state.vcm0ValveBitMap[selectedVcm0])\"\n                     style=\"border-width: 5px\" ref=\"item\" class=\"flex-item subnet-nozzle\">\n                    <div class=\"font-responsive noz-num\">${getOffset0($index) & signal:'selected-vcm'}</div>\n                </div>\n\n                <div repeat.for=\"valve of getValves(state.vcm1ValveBitMap[selectedVcm1])\"\n                     style=\"border-width: 5px\" ref=\"item\" class=\"flex-item subnet-nozzle\">\n                    <div class=\"font-responsive noz-num\">${getOffset1($index) +1 & signal:'selected-vcm'}</div>\n                </div>\n            </div>\n        </div>\n    </div>\n\n</template>\n"; });
var cov_mdw3g0fs7 = function () {
  var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/initial-setup/vcm-menu-item.js',
      hash = '4a9400608370af08d637f1969e4a1509ea0a2f92',
      global = new Function('return this')(),
      gcv = '__coverage__',
      coverageData = {
    path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/initial-setup/vcm-menu-item.js',
    statementMap: {},
    fnMap: {},
    branchMap: {},
    s: {},
    f: {},
    b: {},
    _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('views/settings/initial-setup/vcm-menu-item',['exports'], function (exports) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  var VcmMenuItem = exports.VcmMenuItem = function VcmMenuItem() {
    _classCallCheck(this, VcmMenuItem);

    this.type = 'vcm-menu-item';
  };
});
define('text!views/settings/initial-setup/vcm-menu-item.html', ['module'], function(module) { module.exports = "<template>\n    <div class=\"panel\">\n        <a route-href=\"route: vcm-setup\" class=\" panel-heading btn-link panel-heading nav-header\">VCM-Setup</a>\n    </div>\n</template>\n"; });
var cov_1blz5rlmlr = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/initial-setup/vcm-btn.js',
        hash = '9eee3125b4eb02bf45a5cd6e6b546a53185b30b5',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/initial-setup/vcm-btn.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/initial-setup/vcm-btn',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.VcmBtn = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _desc, _value, _class, _descriptor, _descriptor2, _descriptor3;

    var VcmBtn = exports.VcmBtn = (_class = function VcmBtn() {
        _classCallCheck(this, VcmBtn);

        _initDefineProp(this, 'orientation', _descriptor, this);

        _initDefineProp(this, 'label', _descriptor2, this);

        _initDefineProp(this, 'vcm', _descriptor3, this);
    }, (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'orientation', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, 'label', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'vcm', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class);
});
define('text!views/settings/initial-setup/vcm-btn.html', ['module'], function(module) { module.exports = "<template>\n    <div class=\"${orientation > 32767 ? 'right-vertical-bar-3' : 'left-vertical-bar-3'}\">\n        <label class=\"label-lg\">${vcm}${label}</label>\n    </div>   \n    <hr class=\"vcm-hr\" />\n</template>\n"; });
var cov_194v6xdv96 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/initial-setup/configuration-setup.js',
        hash = '1b2448e5cd7a4c41b62aa0b81c914bd4c30afd52',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/initial-setup/configuration-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/initial-setup/configuration-setup',['exports', 'aurelia-framework', '../../../components/shared/dialogs/confirm-dialog', 'aurelia-dialog', '../../gateway-state-base', 'aurelia-validation', '../../../resources/value-converters/mmToInches', '../../../resources/value-converters/multiplier-format', '../../../services/file-service'], function (exports, _aureliaFramework, _confirmDialog, _aureliaDialog, _gatewayStateBase, _aureliaValidation, _mmToInches, _multiplierFormat, _fileService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.ConfigurationSetup = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var ConfigurationSetup = exports.ConfigurationSetup = (_dec = (0, _aureliaFramework.inject)(_mmToInches.MmToInchesValueConverter, _multiplierFormat.MultiplierFormatValueConverter, _aureliaDialog.DialogService, _fileService.FileService), _dec(_class = function (_ref) {
        _inherits(ConfigurationSetup, _ref);

        function ConfigurationSetup(mmToInchesValueConverter, multiplierFormatValueConverter, dialogService, fileService) {
            _classCallCheck(this, ConfigurationSetup);

            for (var _len = arguments.length, rest = Array(_len > 4 ? _len - 4 : 0), _key = 4; _key < _len; _key++) {
                rest[_key - 4] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'configuration-setup';
            _this.taskModeTypes = [];
            _this.fluidModeTypes = [];
            _this.productModeTypes = [];
            _this.switchTypes = [];
            _this.auxInputTypes = [];
            _this.displaySmoothingTypes = [];
            _this.autoSyncProperties = ['TaskMode', 'FluidMode', 'ProductMode', 'MasterSwitchSource', 'BoomSwitchSource', 'AuxInputPolarity', 'SoftwareRestart', 'VtUpdateRate', 'DisplaySmooth', 'DefaultNozzleSpacing', 'FactoryReset', 'TaskCtrlSectionMax', 'VTSelected', 'TCSelected', 'AuxBoomConfig'];

            _this.fileService = fileService;
            _this.mmToInchesValueConverter = mmToInchesValueConverter;
            _this.multiplierFormatValueConverter = multiplierFormatValueConverter;
            _this.dialogService = dialogService;

            var keyBase = 'systemSettings.initial.configuration.';
            _this.taskModeTypes = _this.getTypes(keyBase + 'taskMode');
            _this.fluidModeTypes = _this.getTypes(keyBase + 'fluidMode');
            _this.productModeTypes = _this.getTypes(keyBase + 'productMode');
            _this.switchTypes = _this.getTypes(keyBase + 'switchSource');
            _this.auxInputTypes = _this.getTypes(keyBase + 'auxInputPolarity');
            _this.displaySmoothingTypes = _this.getTypes('common.enabledOptions');
            _this.vTType = _this.getTypes(keyBase + 'vTType');
            _this.tCType = _this.getTypes(keyBase + 'tCType');
            _this.auxBoomConfigType = _this.getTypes(keyBase + 'auxBoomConfigType');
            return _this;
        }

        ConfigurationSetup.prototype.attached = function attached() {
            this.setUpSubscriptions(this.autoSyncProperties);
            var rules = _aureliaValidation.ValidationRules.ensure('vtUpdateRate').satisfiesRule('numberRange', 100, 1000).ensure('vTSelected').satisfiesRule('numberRange', 0, 10).ensure('tCSelected').satisfiesRule('numberRange', 0, 10).ensure('defaultNozzleSpacing').satisfiesRule('numberRange', 0, 65535, this.mmToInchesValueConverter.forValidate, '0.0').rules;
            this.controller.addObject(this.state, rules);
        };

        ConfigurationSetup.prototype.factoryReset = function factoryReset() {
            this.fileService.clearFileNames();


            this.editDelta.factoryReset = 1;
            this.send();
        };

        ConfigurationSetup.prototype.softwareRestart = function softwareRestart() {
            this.editDelta.softwareRestart = 1;
            this.send();
        };

        ConfigurationSetup.prototype.openConfirmDialog = function openConfirmDialog(propertyName, displayName) {
            var _this2 = this;

            this.dialogService.open({
                viewModel: _confirmDialog.ConfirmDialog,
                model: {
                    val: 1,
                    property: propertyName,
                    displayName: displayName
                },
                lock: false
            }).whenClosed(function (response) {
                if (response.wasCancelled === false) {
                    if (propertyName === 'softwareRestart') {
                        _this2.softwareRestart();
                    } else {
                        _this2.factoryReset();
                    }
                }
            });
        };

        return ConfigurationSetup;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/initial-setup/configuration-setup.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/number-format\"></require>\n    <require from=\"views/settings/settings-item\"></require>\n    <require from=\"views/settings/settings-dropdown\"></require>\n    <require from=\"resources/value-converters/multiplier-format\"></require>\n    <require from=\"resources/value-converters/mmToInches\"></require>\n    \n    <li class=\"container-fluid\">\n        <form style=\"background-color: white\" class=\"form-horizontal\">\n            <settings-dropdown selected.bind=\"state.taskMode\" label=\"systemSettings.initial.configuration.label.taskMode\"\n                               options.bind=\"taskModeTypes\" prop=\"taskMode\"></settings-dropdown>\n\n            <settings-dropdown selected.bind=\"state.fluidMode\" label=\"systemSettings.initial.configuration.label.fluidMode\"\n                               options.bind=\"fluidModeTypes\" prop=\"fluidMode\"></settings-dropdown>\n\n            <settings-dropdown selected.bind=\"state.productMode\" label=\"systemSettings.initial.configuration.label.productMode\"\n                               options.bind=\"productModeTypes\" prop=\"productMode\"></settings-dropdown>\n\n            <settings-dropdown selected.bind=\"state.masterSwitchSource\" label=\"systemSettings.initial.configuration.label.masterSwitchSource\"\n                               options.bind=\"switchTypes\" prop=\"masterSwitchSource\"></settings-dropdown>\n\n            <settings-dropdown selected.bind=\"state.boomSwitchSource\" label=\"systemSettings.initial.configuration.label.boomSwitchSource\"\n                               options.bind=\"switchTypes\" prop=\"boomSwitchSource\"></settings-dropdown>\n\n            <settings-dropdown selected.bind=\"state.auxInputPolarity\" label=\"systemSettings.initial.configuration.label.auxInputPolarity\"\n                               options.bind=\"auxInputTypes\" prop=\"auxInputPolarity\"></settings-dropdown>\n\n            <div as-element=\"settings-item\" val.bind=\"state.vtUpdateRate | numberFormat & validate\" label=\"systemSettings.initial.configuration.label.vtUpdateRate\"\n                 units=\"units.ms\" step=\"1\" prop=\"vtUpdateRate\">\n            </div>\n\n            <settings-dropdown selected.bind=\"state.displaySmooth\" label=\"systemSettings.initial.configuration.label.displaySmooth\"\n                               options.bind=\"displaySmoothingTypes\" prop=\"displaySmooth\"></settings-dropdown>\n\n            <div as-element=\"settings-item\" val.bind=\"state.defaultNozzleSpacing | mmToInches:'0.0' & validate\" label=\"systemSettings.initial.configuration.label.defaultNozzleSpacing\"\n                 units=\"units.in\" prop=\"defaultNozzleSpacing\">\n            </div>\n            <div class=\"form-group form-group-lg\">\n                <label for=\"factory-reset\" class=\"col-xs-4 control-label\" i18n=\"${label}\">\n                    ${label}\n                </label>\n                <div class=\" col-xs-6\">\n                    <button i18n=\"systemSettings.initial.configuration.label.factoryReset\" id=\"factory-reset\"\n                            class=\" btn btn-danger form-control\" click.trigger=\"openConfirmDialog('factoryReset', 'Confirm Factory Reset')\"></button>\n                </div>\n            </div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.taskCtrlSectionMax\" label=\"systemSettings.initial.configuration.label.taskCtrlSectionMax\"\n                 prop=\"taskCtrlSectionMax\">\n            </div>\n\n            <settings-dropdown selected.bind=\"state.vTSelected\" label=\"systemSettings.initial.configuration.label.vTSelected\"\n                               options.bind=\"vTType\" prop=\"vTSelected\"></settings-dropdown>\n\n            <settings-dropdown selected.bind=\"state.tCSelected\" label=\"systemSettings.initial.configuration.label.tCSelected\"\n                               options.bind=\"tCType\" prop=\"tCSelected\"></settings-dropdown>\n\n            <settings-dropdown selected.bind=\"state.auxBoomConfig\" label=\"systemSettings.initial.configuration.label.auxBoomConfig\"\n                               options.bind=\"auxBoomConfigType\" prop=\"auxBoomConfig\"></settings-dropdown>\n\n            <div class=\"form-group form-group-lg\">\n                <label for=\"factory-reset\" class=\"col-xs-4 control-label\" i18n=\"${label}\">\n                    ${label}\n                </label>\n                <div class=\" col-xs-6\">\n                    <button i18n=\"systemSettings.initial.configuration.label.softwareRestart\" id=\"software-restart\"\n                            class=\" btn btn-danger form-control\" click.trigger=\"openConfirmDialog('softwareRestart', 'Confirm Software Restart')\"></button>\n                </div>\n            </div>\n\n        </form>\n    </li>\n\n</template>\n"; });
var cov_6bp1fjvl7 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/initial-setup.js',
        hash = 'da9645009a042be31621bc2bff7e490ae80832da',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/initial-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/initial-setup',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.InitialSetup = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _desc, _value, _class, _descriptor;

    var InitialSetup = exports.InitialSetup = (_dec = (0, _aureliaFramework.computedFrom)('active'), (_class = function () {
        function InitialSetup() {
            _classCallCheck(this, InitialSetup);

            _initDefineProp(this, 'active', _descriptor, this);

            this.type = 'initial-setup';

            this.widgets = [{ 'name': 'configuration-setup', 'title': ' Configuration' }, { 'name': 'vcm-menu-item', 'title': ' VCM Setup' }];
        }

        InitialSetup.prototype.open = function open(widget) {
            if (this.active === widget.name) {
                this.active = '';
            } else {
                this.active = widget.name;
            }
        };

        _createClass(InitialSetup, [{
            key: 'show',
            get: function get() {
                return this.active;
            }
        }]);

        return InitialSetup;
    }(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'active', [_aureliaFramework.observable], {
        enumerable: true,
        initializer: null
    }), _applyDecoratedDescriptor(_class.prototype, 'show', [_dec], Object.getOwnPropertyDescriptor(_class.prototype, 'show'), _class.prototype)), _class));
});
define('text!views/settings/initial-setup.html', ['module'], function(module) { module.exports = "<template>\n    <div class=\"panel panel-default\">\n        <label class=\"panel-heading tree-toggle nav-header\"> Initial Setup</label>\n        <ul class=\"panel-body nav nav-list tree\">\n            <li repeat.for=\"widget of widgets\" class=\"au-animate\">\n                <div class=\"panel panel-default\">\n                    <label class=\"panel-heading tree-toggle nav-header\" click.delegate=\"open(widget)\">${widget.title}</label>\n                    <div if.bind=\"show == widget.name\" class=\"panel-body\">\n                        <compose view-model=\"views/settings/initial-setup/${widget.name}\" class=\"col-md-11\"></compose>\n                    </div>\n                </div>\n            </li>\n        </ul>\n    </div>\n</template>\n"; });
var cov_jzrimt4lt = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/flow/flow-meter-setup.js',
        hash = 'fece7187c13886446a8be02db00db65ca4331485',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/flow/flow-meter-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/flow/flow-meter-setup',['exports', 'aurelia-framework', '../../gateway-state-base', 'aurelia-validation', '../../../resources/value-converters/mlToGal', '../../../resources/value-converters/literToGal', '../../../resources/value-converters/flowmeterCalibration'], function (exports, _aureliaFramework, _gatewayStateBase, _aureliaValidation, _mlToGal, _literToGal, _flowmeterCalibration) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.FlowMeterSetup = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var FlowMeterSetup = exports.FlowMeterSetup = (_dec = (0, _aureliaFramework.inject)(_mlToGal.MlToGalValueConverter, _literToGal.LiterToGalValueConverter, _flowmeterCalibration.FlowmeterCalibrationValueConverter), _dec(_class = function (_ref) {
        _inherits(FlowMeterSetup, _ref);

        function FlowMeterSetup(mlPerMinToGalPerMin, literToGalValueConverter, flowmeterCalibrationValueConverter) {
            _classCallCheck(this, FlowMeterSetup);

            for (var _len = arguments.length, rest = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
                rest[_key - 3] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'flow-meter-setup';
            _this.meterTypes = [];
            _this.presetRateTypes = [];
            _this.autoSyncProperties = ['FlowMeter1Type', 'FlowMeter1Minimum', 'FlowMeter1Calibration', 'FlowMeter1ErrLimit', 'SpecificGravity1', 'FlowMeter2Type', 'FlowMeter2Minimum', 'FlowMeter2Calibration', 'FlowMeter2ErrLimit', 'SpecificGravity2', 'FlowMeterLowRate', 'PresetRateAvg', 'FlowmeterSenseResistor'];

            _this.mlPerMinToGalPerMin = mlPerMinToGalPerMin;
            _this.flowmeterCalibrationValueConverter = flowmeterCalibrationValueConverter;
            _this.meterTypes = _this.getTypes('systemSettings.flow.flowMeterSetup.meterTypes');
            _this.meter2Types = _this.getTypes('systemSettings.flow.flowMeterSetup.meter2Types');
            _this.presetRateTypes = _this.getTypes('systemSettings.flow.flowMeterSetup.presetRateAvgTypes');
            _this.flowmeterSenseResistorTypes = _this.getTypes('systemSettings.flow.flowMeterSetup.flowmeterSensorResistorTypes');
            return _this;
        }

        FlowMeterSetup.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
            var rules = _aureliaValidation.ValidationRules.ensure('flowMeter1Minimum').satisfiesRule('numberRange', 0, 65535, this.mlPerMinToGalPerMin.forValidation).ensure('flowMeter1Calibration').satisfiesRule('numberRange', 0, 26417.1, this.flowmeterCalibrationValueConverter.forValidate).ensure('flowMeter1ErrLimit').satisfiesRule('numberRange', 0, 100).ensure('specificGravity1').satisfiesRule('numberRange', 0.5, 2).ensure('flowMeter2Minimum').satisfiesRule('numberRange', 0, 65535, this.mlPerMinToGalPerMin.forValidate).ensure('flowMeter2Calibration').satisfiesRule('numberRange', 0, 26417.1, this.flowmeterCalibrationValueConverter.forValidate).ensure('flowMeter2ErrLimit').satisfiesRule('numberRange', 0, 100).ensure('specificGravity2').satisfiesRule('numberRange', 0.5, 2).ensure('flowMeterLowRate').satisfiesRule('numberRange', 0, 65535, this.mlPerMinToGalPerMin.forValidate).rules;
            this.controller.addObject(this.state, rules);
        };

        return FlowMeterSetup;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/flow/flow-meter-setup.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/number-format\"></require>\n    <require from=\"resources/value-converters/mlToGal\"></require>\n    <require from=\"resources/value-converters/flowmeterCalibration\"></require>\n    <require from=\"resources/value-converters/literToGal\"></require>\n    <require from=\"views/settings/settings-item\"></require>\n    <require from=\"views/settings/settings-dropdown\"></require>\n\n    <li class=\"container-fluid\">\n        <form style=\"background-color: white\" class=\"form-horizontal\">\n            <settings-dropdown selected.bind=\"state.flowMeter1Type\" label=\"systemSettings.flow.flowMeterSetup.meter1Type\"\n                               options.bind=\"meterTypes\" prop=\"flowMeter1Type\"></settings-dropdown>\n\n            <div as-element=\"settings-item\" val.bind=\"state.flowMeter1Minimum | mlToGal:'0.0' & validate\" label=\"systemSettings.flow.flowMeterSetup.meter1Min\"\n                 min=\"0\" max=\"100\" units=\"units.galMin\" prop=\"flowMeter1Minimum\">\n            </div>\n            <div as-element=\"settings-item\" val.bind=\"state.flowMeter1Calibration | flowmeterCalibration & validate\" label=\"systemSettings.flow.flowMeterSetup.meter1Cal\"\n                 min=\"0\" max=\"100000\" step=\"1\" units=\"units.pulse10PerGal\" prop=\"flowMeter1Calibration\">\n            </div>\n            <div as-element=\"settings-item\" val.bind=\"state.flowMeter1ErrLimit | numberFormat & validate\" step=\"1\" label=\"systemSettings.flow.flowMeterSetup.meter1ErrLim\"\n                 min=\"0\" max=\"100\" units=\"%\" prop=\"flowMeter1ErrLimit\">\n            </div>\n            <div as-element=\"settings-item\" val.bind=\"state.specificGravity1 | numberFormat:'0.00' & validate\" label=\"systemSettings.flow.flowMeterSetup.specificGravity1\"\n                 min=\".5\" max=\"2\" step=\"0.01\" prop=\"specificGravity1\">\n            </div>\n            <settings-dropdown selected.bind=\"state.flowMeter2Type\" label=\"systemSettings.flow.flowMeterSetup.meter2Type\"\n                               options.bind=\"meter2Types\" prop=\"flowMeter2Type\"></settings-dropdown>\n            <div as-element=\"settings-item\" val.bind=\"state.flowMeter2Minimum | mlToGal:'0.0'  & validate\" label=\"systemSettings.flow.flowMeterSetup.meter2Min\"\n                 min=\"0\" max=\"10\" units=\"units.galMin\" prop=\"flowMeter2Minimum\">\n            </div>\n            <div as-element=\"settings-item\" val.bind=\"state.flowMeter2Calibration | flowmeterCalibration & validate\" label=\"systemSettings.flow.flowMeterSetup.meter2Cal\"\n                 min=\"0\" max=\"100000\" step=\"1\" units=\"units.pulse10PerGal\" prop=\"flowMeter2Calibration\">\n            </div>\n            <div as-element=\"settings-item\" val.bind=\"state.flowMeter2ErrLimit | numberFormat  & validate\" label=\"systemSettings.flow.flowMeterSetup.meter2ErrLim\"\n                 min=\"0\" max=\"10\" step=\"1\" units=\"%\" prop=\"flowMeter2ErrLimit\">\n            </div>\n            <div as-element=\"settings-item\" val.bind=\"state.specificGravity2 | numberFormat:'0.00' & validate\" label=\"systemSettings.flow.flowMeterSetup.specificGravity2\"\n                 min=\".5\" max=\"2\" step=\"0.01\" prop=\"specificGravity2\">\n            </div>\n            <div as-element=\"settings-item\" val.bind=\"state.flowMeterLowRate | mlToGal  & validate\" label=\"systemSettings.flow.flowMeterSetup.flowMeterLowRate\"\n                 min=\"0\" max=\"10\" units=\"units.galMin\" prop=\"flowMeterLowRate\">\n            </div>\n            <settings-dropdown selected.bind=\"state.presetRateAvg\" label=\"systemSettings.flow.flowMeterSetup.presetRateAvg\"\n                               options.bind=\"presetRateTypes\" prop=\"presetRateAvg\"></settings-dropdown>\n            <settings-dropdown selected.bind=\"state.flowmeterSenseResistor\" label=\"systemSettings.flow.flowMeterSetup.flowmeterSenseResistor\"\n                               options.bind=\"flowmeterSenseResistorTypes\" prop=\"flowmeterSenseResistor\"></settings-dropdown>\n        </form>\n    </li>\n\n</template>\n"; });
var cov_101st3d863 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/flow/flow-control-tuning.js',
        hash = 'ad88fb297e19690538cd669fb4f30eff749f473c',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/flow/flow-control-tuning.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/flow/flow-control-tuning',['exports', 'aurelia-framework', '../../gateway-state-base', '../../../resources/value-converters/mlToGal', 'aurelia-validation', '../../../resources/value-converters/multiplier-format'], function (exports, _aureliaFramework, _gatewayStateBase, _mlToGal, _aureliaValidation, _multiplierFormat) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.FlowControlTuning = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var FlowControlTuning = exports.FlowControlTuning = (_dec = (0, _aureliaFramework.inject)(_mlToGal.MlToGalValueConverter, _multiplierFormat.MultiplierFormatValueConverter), _dec(_class = function (_ref) {
        _inherits(FlowControlTuning, _ref);

        function FlowControlTuning(mlToGalValueConverter, multiplierFormatValueConverter) {
            _classCallCheck(this, FlowControlTuning);

            for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
                rest[_key - 2] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'flow-control-tuning';
            _this.autoSyncProperties = ['NvRate1GainK', 'NvRate1GainP', 'NvRate1GainI', 'NvRate1GainD', 'NvRate1DeadBand', 'NozzlePwmCycleTime'];

            _this.mlPerMinToGalPerMin = mlToGalValueConverter;
            _this.multiplierFormatValueConverter = multiplierFormatValueConverter;
            return _this;
        }

        FlowControlTuning.prototype.attached = function attached() {
            var _this2 = this;

            var curriedSecondsToDecaSecondsFormat = function curriedSecondsToDecaSecondsFormat(n) {
                return function (m) {
                    return _this2.multiplierFormatValueConverter.forValidate(m, n);
                };
            };
            var validateCalc = curriedSecondsToDecaSecondsFormat(10);
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
            var rules = _aureliaValidation.ValidationRules.ensure('nvRate1GainK').satisfiesRule('numberRange', 0, 100, null, '0.0').ensure('nvRate1GainP').satisfiesRule('numberRange', 0, 100, null, '0.0').ensure('nvRate1GainI').satisfiesRule('numberRange', 0, 100, null, '0.0').ensure('nvRate1GainD').satisfiesRule('numberRange', 0, 100, null, '0.0').ensure('nvRate1DeadBand').satisfiesRule('numberRange', 0, 18927, this.mlPerMinToGalPerMin.forValidate, '0,0').ensure('nozzlePwmCycleTime').satisfiesRule('numberRange', 1, 100, validateCalc).rules;
            this.controller.addObject(this.state, rules);
        };

        return FlowControlTuning;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/flow/flow-control-tuning.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/number-format\"></require>\n    <require from=\"resources/value-converters/multiplier-format\"></require>\n    <require from=\"resources/value-converters/mlToGal\"></require>\n    <require from=\"views/settings/settings-item\"></require>\n\n    <li class=\"container-fluid\">\n        <form style=\"background-color: white\" class=\"form-horizontal\">\n            <div as-element=\"settings-item\" val.bind=\"state.nvRate1GainK | numberFormat:'0.0' & validate\" label=\"systemSettings.flow.controlTuning.nvRate1GainK\"\n                    min=\"0\" max=\"100\" prop=\"nvRate1GainK\">\n            </div>\n            <div as-element=\"settings-item\" val.bind=\"state.nvRate1GainP | numberFormat:'0.0' & validate\" label=\"systemSettings.flow.controlTuning.nvRate1GainP\"\n                    min=\"0\" max=\"100\" prop=\"nvRate1GainP\">\n            </div>\n            <div as-element=\"settings-item\" val.bind=\"state.nvRate1GainI | numberFormat:'0.0' & validate\" label=\"systemSettings.flow.controlTuning.nvRate1GainI\"\n                    min=\"0\" max=\"100\" prop=\"nvRate1GainI\">\n            </div>\n            <div as-element=\"settings-item\" val.bind=\"state.nvRate1GainD | numberFormat:'0.0'  & validate\" label=\"systemSettings.flow.controlTuning.nvRate1GainD\"\n                    min=\"0\" max=\"100\" prop=\"nvRate1GainD\">\n            </div>\n            <div as-element=\"settings-item\" val.bind=\"state.nvRate1DeadBand | mlToGal:'0.0' & validate\" label=\"systemSettings.flow.controlTuning.nvRate1DeadBand\"\n                    min=\"0\" max=\"100\" step=\".01\" units=\"units.galMin\" prop=\"nvRate1DeadBand\">\n            </div>\n            <div as-element=\"settings-item\" val.bind=\"state.nozzlePwmCycleTime | multiplierFormat:10:'0.0' & validate\" label=\"systemSettings.flow.controlTuning.nozzlePwmCycleTime\"\n                    min=\"0\" max=\"100\" units=\"units.sec\" prop=\"nozzlePwmCycleTime\">\n            </div>\n        </form>\n    </li>\n\n</template>\n"; });
var cov_1rkkl1bvpu = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/flow-setup.js',
        hash = 'a865f285fc9328dde39d5915fb0f29ab4455a378',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/flow-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/flow-setup',['exports', 'aurelia-framework', '../gateway-state-base'], function (exports, _aureliaFramework, _gatewayStateBase) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.FlowSetup = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _desc, _value, _class, _descriptor;

    var FlowSetup = exports.FlowSetup = (_dec = (0, _aureliaFramework.computedFrom)('active'), (_class = function (_ref) {
        _inherits(FlowSetup, _ref);

        function FlowSetup() {
            _classCallCheck(this, FlowSetup);

            for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
                rest[_key] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _initDefineProp(_this, 'active', _descriptor, _this);

            _this.type = 'flow-setup';
            _this.displayRateOrDutyCycleOption = [];
            _this.autoSyncProperties = ['DisplayRateOrDutyCycle'];


            _this.widgets = [{ 'name': 'flow-meter-setup', 'title': ' Flowmeter Setup' }, { 'name': 'flow-control-tuning', 'title': ' Control Tuning' }];

            var keyBase = 'systemSettings.flow.';
            _this.displayRateOrDutyCycleOption = _this.getTypes(keyBase + 'dutyCycleOrRateSelectionOption');
            return _this;
        }

        FlowSetup.prototype.open = function open(widget) {
            if (this.active === widget.name) {
                this.active = '';
            } else {
                this.active = widget.name;
            }
        };

        FlowSetup.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
        };

        _createClass(FlowSetup, [{
            key: 'show',
            get: function get() {
                return this.active;
            }
        }]);

        return FlowSetup;
    }((_gatewayStateBase.GatewayStateBase)), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'active', [_aureliaFramework.observable], {
        enumerable: true,
        initializer: null
    }), _applyDecoratedDescriptor(_class.prototype, 'show', [_dec], Object.getOwnPropertyDescriptor(_class.prototype, 'show'), _class.prototype)), _class));
});
define('text!views/settings/flow-setup.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"views/settings/settings-item\"></require>\n    <require from=\"views/settings/settings-dropdown\"></require>\n\n    <div class=\"panel panel-default\">\n        <label class=\"panel panel-heading tree-toggle nav-header\"> Flow</label>\n        <ul class=\"panel-body nav nav-list tree\">\n            <li repeat.for=\"widget of widgets\" class=\"au-animate\">\n                <div class=\"panel panel-default\">\n                    <label class=\"panel-heading tree-toggle nav-header\" click.delegate=\"open(widget)\">${widget.title}</label>\n                    <div if.bind=\"show == widget.name\" class=\"panel-body\">\n                        <compose view-model=\"views/settings/flow/${widget.name}\" class=\"col-md-11\"></compose>\n                    </div>\n                </div>\n            </li>\n            <li>\n\n                <settings-dropdown selected.bind=\"state.displayRateOrDutyCycle\"\n                                   label=\"systemSettings.flow.labels.displayRateOrDutyCycle\"\n                                   options.bind=\"displayRateOrDutyCycleOption\" prop=\"displayRateOrDutyCycle\"></settings-dropdown>\n            </li>\n        </ul>\n    </div>\n</template>\n"; });
var cov_lbxopbng6 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/boom/nozzle-setup.js',
        hash = 'b4be03ede38bec080237e9ded097863822734270',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/boom/nozzle-setup.js',
        statementMap: {
            '0': {
                start: {
                    line: 354,
                    column: 8
                },
                end: {
                    line: 366,
                    column: 11
                }
            },
            '1': {
                start: {
                    line: 362,
                    column: 12
                },
                end: {
                    line: 365,
                    column: 13
                }
            },
            '2': {
                start: {
                    line: 363,
                    column: 27
                },
                end: {
                    line: 363,
                    column: 47
                }
            },
            '3': {
                start: {
                    line: 364,
                    column: 16
                },
                end: {
                    line: 364,
                    column: 67
                }
            },
            '4': {
                start: {
                    line: 376,
                    column: 8
                },
                end: {
                    line: 402,
                    column: 11
                }
            },
            '5': {
                start: {
                    line: 385,
                    column: 12
                },
                end: {
                    line: 401,
                    column: 13
                }
            },
            '6': {
                start: {
                    line: 386,
                    column: 34
                },
                end: {
                    line: 386,
                    column: 61
                }
            },
            '7': {
                start: {
                    line: 387,
                    column: 32
                },
                end: {
                    line: 387,
                    column: 57
                }
            },
            '8': {
                start: {
                    line: 388,
                    column: 24
                },
                end: {
                    line: 388,
                    column: 25
                }
            },
            '9': {
                start: {
                    line: 389,
                    column: 16
                },
                end: {
                    line: 399,
                    column: 17
                }
            },
            '10': {
                start: {
                    line: 390,
                    column: 32
                },
                end: {
                    line: 390,
                    column: 65
                }
            },
            '11': {
                start: {
                    line: 391,
                    column: 28
                },
                end: {
                    line: 391,
                    column: 29
                }
            },
            '12': {
                start: {
                    line: 392,
                    column: 20
                },
                end: {
                    line: 397,
                    column: 21
                }
            },
            '13': {
                start: {
                    line: 393,
                    column: 24
                },
                end: {
                    line: 395,
                    column: 25
                }
            },
            '14': {
                start: {
                    line: 394,
                    column: 28
                },
                end: {
                    line: 394,
                    column: 76
                }
            },
            '15': {
                start: {
                    line: 396,
                    column: 24
                },
                end: {
                    line: 396,
                    column: 31
                }
            },
            '16': {
                start: {
                    line: 398,
                    column: 20
                },
                end: {
                    line: 398,
                    column: 27
                }
            },
            '17': {
                start: {
                    line: 400,
                    column: 16
                },
                end: {
                    line: 400,
                    column: 73
                }
            }
        },
        fnMap: {
            '0': {
                name: '(anonymous_0)',
                decl: {
                    start: {
                        line: 352,
                        column: 4
                    },
                    end: {
                        line: 352,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 352,
                        column: 17
                    },
                    end: {
                        line: 367,
                        column: 5
                    }
                },
                line: 352
            },
            '1': {
                name: '(anonymous_1)',
                decl: {
                    start: {
                        line: 361,
                        column: 22
                    },
                    end: {
                        line: 361,
                        column: 23
                    }
                },
                loc: {
                    start: {
                        line: 361,
                        column: 34
                    },
                    end: {
                        line: 366,
                        column: 9
                    }
                },
                line: 361
            },
            '2': {
                name: '(anonymous_2)',
                decl: {
                    start: {
                        line: 373,
                        column: 4
                    },
                    end: {
                        line: 373,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 373,
                        column: 21
                    },
                    end: {
                        line: 403,
                        column: 5
                    }
                },
                line: 373
            },
            '3': {
                name: '(anonymous_3)',
                decl: {
                    start: {
                        line: 384,
                        column: 22
                    },
                    end: {
                        line: 384,
                        column: 23
                    }
                },
                loc: {
                    start: {
                        line: 384,
                        column: 34
                    },
                    end: {
                        line: 402,
                        column: 9
                    }
                },
                line: 384
            }
        },
        branchMap: {
            '0': {
                loc: {
                    start: {
                        line: 362,
                        column: 12
                    },
                    end: {
                        line: 365,
                        column: 13
                    }
                },
                type: 'if',
                locations: [{
                    start: {
                        line: 362,
                        column: 12
                    },
                    end: {
                        line: 365,
                        column: 13
                    }
                }, {
                    start: {
                        line: 362,
                        column: 12
                    },
                    end: {
                        line: 365,
                        column: 13
                    }
                }],
                line: 362
            },
            '1': {
                loc: {
                    start: {
                        line: 385,
                        column: 12
                    },
                    end: {
                        line: 401,
                        column: 13
                    }
                },
                type: 'if',
                locations: [{
                    start: {
                        line: 385,
                        column: 12
                    },
                    end: {
                        line: 401,
                        column: 13
                    }
                }, {
                    start: {
                        line: 385,
                        column: 12
                    },
                    end: {
                        line: 401,
                        column: 13
                    }
                }],
                line: 385
            },
            '2': {
                loc: {
                    start: {
                        line: 393,
                        column: 24
                    },
                    end: {
                        line: 395,
                        column: 25
                    }
                },
                type: 'if',
                locations: [{
                    start: {
                        line: 393,
                        column: 24
                    },
                    end: {
                        line: 395,
                        column: 25
                    }
                }, {
                    start: {
                        line: 393,
                        column: 24
                    },
                    end: {
                        line: 395,
                        column: 25
                    }
                }],
                line: 393
            }
        },
        s: {
            '0': 0,
            '1': 0,
            '2': 0,
            '3': 0,
            '4': 0,
            '5': 0,
            '6': 0,
            '7': 0,
            '8': 0,
            '9': 0,
            '10': 0,
            '11': 0,
            '12': 0,
            '13': 0,
            '14': 0,
            '15': 0,
            '16': 0,
            '17': 0
        },
        f: {
            '0': 0,
            '1': 0,
            '2': 0,
            '3': 0
        },
        b: {
            '0': [0, 0],
            '1': [0, 0],
            '2': [0, 0]
        },
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/boom/nozzle-setup',['exports', 'aurelia-framework', 'aurelia-dialog', '../../../components/shared/dialogs/save-dialog', '../../../components/shared/dialogs/boom-dialog', '../../../services/gateway-service', '../../../services/file-service'], function (exports, _aureliaFramework, _aureliaDialog, _saveDialog, _boomDialog, _gatewayService, _fileService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.NozzleSetup = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _class, _desc, _value, _class2, _descriptor;

    var NozzleSetup = exports.NozzleSetup = (_dec = (0, _aureliaFramework.inject)(_gatewayService.GatewayService, _aureliaFramework.BindingEngine, _fileService.FileService, _aureliaDialog.DialogService), _dec2 = (0, _aureliaFramework.computedFrom)('rank[nozzleNumber]'), _dec(_class = (_class2 = function () {
        function NozzleSetup(gatewayService, bindingEngine, fileService, dialogService) {
            _classCallCheck(this, NozzleSetup);

            _initDefineProp(this, 'nozzleNumber', _descriptor, this);

            this.widget = 'nozzle-setup';
            this.subscriptions = [];
            this.presetProperties = [];
            this.rank = [];
            this.flowGain = [];
            this.nozzleSize = [];
            this.presetName = 'test';
            this.presetSubscribed = false;
            this.flowMultiplier = 64;
            this.flowFormat = '0.0';
            this.graphHalfScale = '1.0';
            this.graphFullScale = '2.0';
            this.s = 10;
            this.type = 'nozzle-setup';
            this.subscribeProperties = ['NozzleBoomCh', 'NozzleValveSize', 'NozzleAuxCh', 'NozzleVcmCh', 'NozzleVcmIdx', 'NozzleVcmPos', 'VcmSerial', 'Vcm0SerialNumber', 'Preset1NumIndex', 'NozzleForceOn', 'ConnectedToSwathPro'];

            this.gatewayService = gatewayService;
            this.bindingEngine = bindingEngine;
            this.fileService = fileService;
            this.dialogService = dialogService;
            this.state = this.gatewayService.getState();

            this.rankOptions = [{ 'idx': 0, 'val': 'Even' }, { 'idx': 1, 'val': 'Odd' }, { 'idx': 2, 'val': 'Open' }, { 'idx': 3, 'val': 'Closed' }, { 'idx': 4, 'val': 'Fence On' }, { 'idx': 5, 'val': 'Fence Off' }, { 'idx': 6, 'val': 'Boosted Even' }, { 'idx': 7, 'val': 'Boosted Odd' }];
            this.nozzleSizeOptions = [{ 'idx': 1, 'val': '3.0' }, { 'idx': 2, 'val': '4.0' }, { 'idx': 3, 'val': '5.0' }, { 'idx': 4, 'val': '6.0' }, { 'idx': 5, 'val': '8.0' }, { 'idx': 6, 'val': '10.0' }, { 'idx': 7, 'val': '12.5' }, { 'idx': 8, 'val': '15.0' }, { 'idx': 9, 'val': '20.0' }, { 'idx': 10, 'val': '15.0' }];
            if (this.state.connectedToSwathPro) {
                this.flowMultiplier = 1.28;
                this.flowFormat = '0';
                this.graphHalfScale = '50';
                this.graphFullScale = '100';
            }
        }

        NozzleSetup.prototype.attached = function attached() {
            var _this = this;

            this.gatewayService.subscribe(this.subscribeProperties);
            this.nozzleNumber = 0;

            var c = document.getElementById('nozzleCanvas');
            if (this.state.nozzleMax < 50) {
                this.s = 15;
            } else if (this.state.nozzleMax < 100) {
                this.s = 10;
            } else if (this.state.nozzleMax < 150) {
                this.s = 5;
            } else {
                this.s = 0;
            }

            c.addEventListener('mousemove', function (e) {
                var cvs = document.getElementById('nozzleCanvas');
                var rect = cvs.getBoundingClientRect();
                var x = e.clientX - rect.left;
                _this.nozzleNumber = Math.min(Math.max(Math.round((x - 40) / (4.6 + _this.s * 0.655)), 0), _this.state.nozzleMax - 1);
                _this.redraw();
            });

            this.setup();
            this.redraw();
        };

        NozzleSetup.prototype.detached = function detached() {
            if (this.rankSubscription) {
                this.rankSubscription.dispose();
            }

            if (this.flowGainSubscription) {
                this.flowGainSubscription.dispose();
            }

            if (this.nozzleSizeSubscription) {
                this.nozzleSizeSubscription.dispose();
            }

            if (this.presetNameSubscription) {
                this.presetNameSubscription.dispose();
            }

            this.subscriptions.forEach(function (sub) {
                sub.dispose();
            });

            this.gatewayService.unsubscribe(this.presetProperties);
            this.gatewayService.unsubscribe(this.subscribeProperties);
        };

        NozzleSetup.prototype.setup = function setup() {
            var _this2 = this;

            this.setPresetCollections(this.state.preset1NumIndex);
            this.subscriptions.push(this.bindingEngine.propertyObserver(this.state, 'preset1NumIndex').subscribe(function (newValue, oldValue) {
                _this2.setPresetCollections(newValue);
            }));
            this.subscriptions.push(this.bindingEngine.propertyObserver(this.state, 'nozzleForceOn').subscribe(function (newValue, oldValue) {
                _this2.nozzleTest = Array.from(_this2.state.nozzleForceOn, function (x) {
                    return x > 0;
                });
                _this2.redraw();
            }));

            this.nozzleTest = Array.from(this.state.nozzleForceOn, function (x) {
                return x > 0;
            });
        };

        NozzleSetup.prototype.setPresetCollections = function setPresetCollections(presetNum) {
            var _this3 = this;

            this.gatewayService.unsubscribe(this.presetProperties);
            this.presetProperties = ['NozzlePreset' + presetNum + 'Rank', 'NozzlePreset' + presetNum + 'FlowGain', 'NozzlePreset' + presetNum + 'NozzleSize'];
            this.gatewayService.subscribe(this.presetProperties, 'nozzle-setup');

            this.gatewayService.updateCash();

            this.rank = this.state['nozzlePreset' + presetNum + 'Rank'];
            this.flowGain = this.state['nozzlePreset' + presetNum + 'FlowGain'];
            this.nozzleSize = this.state['nozzlePreset' + presetNum + 'NozzleSize'];
            this.presetName = this.state['boomPreset1Number' + (presetNum + 1) + 'Name'];

            if (this.rankSubscription) {
                this.rankSubscription.dispose();
            }
            this.rankSubscription = this.bindingEngine.propertyObserver(this.state, 'nozzlePreset' + presetNum + 'Rank').subscribe(function (newValue, oldValue) {
                _this3.rank = newValue;
            });

            if (this.flowGainSubscription) {
                this.flowGainSubscription.dispose();
            }
            this.flowGainSubscription = this.bindingEngine.propertyObserver(this.state, 'nozzlePreset' + presetNum + 'FlowGain').subscribe(function (newValue, oldValue) {
                _this3.flowGain = newValue;
                _this3.redraw();
            });

            if (this.nozzleSizeSubscription) {
                this.nozzleSizeSubscription.dispose();
            }
            this.nozzleSizeSubscription = this.bindingEngine.propertyObserver(this.state, 'nozzlePreset' + presetNum + 'NozzleSize').subscribe(function (newValue, oldValue) {
                _this3.nozzleSize = newValue;
            });

            if (this.presetNameSubscription) {
                this.presetNameSubscription.dispose();
            }
            this.presetNameSubscription = this.bindingEngine.propertyObserver(this.state, 'boomPreset1Number' + (presetNum + 1) + 'Name').subscribe(function (newValue, oldValue) {
                _this3.presetName = newValue;
            });

            this.redraw();
        };

        NozzleSetup.prototype.sendChange = function sendChange(val, prop) {
            var editDelta = {};
            editDelta[prop] = val;
            this.gatewayService.send(editDelta);
        };

        NozzleSetup.prototype.toggleNozzleTest = function toggleNozzleTest() {
            this.state.nozzleForceOn.splice(this.nozzleNumber, 1, this.nozzleTest[this.nozzleNumber] ? 1 : 0);
            this.redraw();
            this.sendChange(this.state.nozzleForceOn, 'NozzleForceOn');
        };

        NozzleSetup.prototype.rankChanged = function rankChanged() {
            this.sendChange(this.rank, 'NozzlePreset' + this.state.preset1NumIndex + 'Rank');
        };

        NozzleSetup.prototype.nozzleSizeChanged = function nozzleSizeChanged() {
            this.sendChange(this.state.nozzleBoomCh, 'NozzleBoomCh');
        };

        NozzleSetup.prototype.softBoomChanged = function softBoomChanged() {
            this.sendChange(this.nozzleSize, 'NozzlePreset' + this.state.preset1NumIndex + 'NozzleSize');
        };

        NozzleSetup.prototype.flowGainChanged = function flowGainChanged() {
            this.sendChange(this.flowGain, 'NozzlePreset' + this.state.preset1NumIndex + 'FlowGain');
            this.redraw();
        };

        NozzleSetup.prototype.presetNameKeyup = function presetNameKeyup(newName) {
            switch (this.state.preset1NumIndex) {
                case 0:
                    this.state.boomPreset1Number1Name = newName;
                    break;
                case 1:
                    this.state.boomPreset1Number2Name = newName;
                    break;
                case 2:
                    this.state.boomPreset1Number3Name = newName;
                    break;
                case 3:
                    this.state.boomPreset1Number4Name = newName;
                    break;
                case 4:
                    this.state.boomPreset1Number5Name = newName;
                    break;
                default:
                    break;
            }
        };

        NozzleSetup.prototype.presetNameChanged = function presetNameChanged(newName) {
            this.sendChange(newName, 'BoomPreset1Number' + (this.state.preset1NumIndex + 1) + 'Name');
        };

        NozzleSetup.prototype.saveConfig = function saveConfig() {
            var _this4 = this;

            cov_lbxopbng6.f[0]++;
            cov_lbxopbng6.s[0]++;

            this.dialogService.open({
                viewModel: _saveDialog.SaveDialog,
                model: {
                    val: 1,
                    displayName: 'Save as config file using name:'
                },
                lock: false
            }).whenClosed(function (response) {
                cov_lbxopbng6.f[1]++;
                cov_lbxopbng6.s[1]++;

                if (response.wasCancelled === false) {
                    cov_lbxopbng6.b[0][0]++;

                    var name = (cov_lbxopbng6.s[2]++, response.output.name);
                    cov_lbxopbng6.s[3]++;
                    _this4.fileService.saveConfig(_this4.presetName, name);
                } else {
                    cov_lbxopbng6.b[0][1]++;
                }
            });
        };

        NozzleSetup.prototype.openBoomConfig = function openBoomConfig() {
            var _this5 = this;

            cov_lbxopbng6.f[2]++;
            cov_lbxopbng6.s[4]++;

            this.dialogService.open({
                viewModel: _boomDialog.BoomDialog,
                model: {
                    val: 1,
                    displayName: 'Soft Boom Setup',
                    nozzleChannles: this.state.nozzleBoomCh
                },
                lock: false
            }).whenClosed(function (response) {
                cov_lbxopbng6.f[3]++;
                cov_lbxopbng6.s[5]++;

                if (response.wasCancelled === false) {
                    cov_lbxopbng6.b[1][0]++;

                    var startPoints = (cov_lbxopbng6.s[6]++, response.output.startPoints);
                    var endPoints = (cov_lbxopbng6.s[7]++, response.output.endPoints);
                    var i = (cov_lbxopbng6.s[8]++, 0);
                    cov_lbxopbng6.s[9]++;
                    while (i < startPoints.length) {
                        var count = (cov_lbxopbng6.s[10]++, endPoints[i] - startPoints[i] + 1);
                        var j = (cov_lbxopbng6.s[11]++, 0);
                        cov_lbxopbng6.s[12]++;
                        while (j < count) {
                            cov_lbxopbng6.s[13]++;

                            if (startPoints[i] + j < _this5.state.nozzleBoomCh.length) {
                                cov_lbxopbng6.b[2][0]++;
                                cov_lbxopbng6.s[14]++;

                                _this5.state.nozzleBoomCh[startPoints[i] + j] = i;
                            } else {
                                cov_lbxopbng6.b[2][1]++;
                            }
                            cov_lbxopbng6.s[15]++;
                            j += 1;
                        }
                        cov_lbxopbng6.s[16]++;
                        i += 1;
                    }
                    cov_lbxopbng6.s[17]++;
                    _this5.sendChange(_this5.state.nozzleBoomCh, 'NozzleBoomCh');
                } else {
                    cov_lbxopbng6.b[1][1]++;
                }
            });
        };

        NozzleSetup.prototype.changeNozzle = function changeNozzle(val) {
            this.nozzleNumber += val;
        };

        NozzleSetup.prototype.changeValveSizes = function changeValveSizes() {
            for (var i = 0; i < this.state.nozzleMax; i++) {
                this.state.nozzleValveSize[i] = this.state.nozzleValveSize[this.nozzleNumber];
            }
            this.sendChange(this.state.nozzleValveSize, 'NozzleValveSize');
        };

        NozzleSetup.prototype.changeTipSizes = function changeTipSizes() {
            for (var i = 0; i < this.state.nozzleMax; i++) {
                this.nozzleSize[i] = this.nozzleSize[this.nozzleNumber];
            }
            this.sendChange(this.nozzleSize, 'NozzlePreset' + this.state.preset1NumIndex + 'NozzleSize');
        };

        NozzleSetup.prototype.redraw = function redraw() {
            var c = document.getElementById('nozzleCanvas');
            if (!c) {
                return;
            }
            c.width = this.state.nozzleMax * (this.s + 7) + 80;
            var ctx = c.getContext('2d');
            ctx.beginPath();
            ctx.moveTo(50, 20);
            ctx.lineTo(30, 20);
            ctx.moveTo(40, 20);
            ctx.lineTo(40, c.height - 20);
            ctx.moveTo(30, c.height - 20);
            ctx.lineTo(50, c.height - 20);
            ctx.stroke();
            ctx.fillText('ON', 10, 13);
            ctx.fillText(this.graphFullScale, 10, 25);
            ctx.fillText(this.graphHalfScale, 10, c.height / 2 + 3);
            ctx.fillText('0.0', 10, c.height - 19);
            ctx.fillText('OFF', 10, c.height - 7);

            for (var i = 0; i < this.state.nozzleMax; i++) {
                if (this.flowGain[i] > 0) {
                    ctx.beginPath();
                    ctx.rect(60 + i * (this.s + 7), c.height - 30 - this.flowGain[i] * 100 / 128, this.s + 7, 10);

                    if (this.state.nozzleForceOn[i] > 0) {
                        ctx.fillStyle = 'orange';
                    } else {
                        ctx.fillStyle = i === this.nozzleNumber ? 'yellow' : 'green';
                    }

                    ctx.fill();
                }
            }
        };

        NozzleSetup.prototype.nozzleNumberChanged = function nozzleNumberChanged(newValue, oldValue) {
            if (newValue <= 0) {
                this.nozzleNumber = 0;
            }

            if (newValue >= this.state.nozzleMax) {
                this.nozzleNumber = this.state.nozzleMax - 1;
            }

            this.redraw();
        };

        _createClass(NozzleSetup, [{
            key: 'flowSetVisibleClass',
            get: function get() {
                if (this.rank) {
                    var status = this.rank[this.nozzleNumber];
                    if (status >= 2) {
                        return 'btn-hidden';
                    }
                    return 'btn-visible';
                }
                return 'btn-visible';
            }
        }]);

        return NozzleSetup;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'nozzleNumber', [_aureliaFramework.observable], {
        enumerable: true,
        initializer: function initializer() {
            return 0;
        }
    }), _applyDecoratedDescriptor(_class2.prototype, 'flowSetVisibleClass', [_dec2], Object.getOwnPropertyDescriptor(_class2.prototype, 'flowSetVisibleClass'), _class2.prototype)), _class2)) || _class);
});
define('text!views/settings/boom/nozzle-setup.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"views/settings/settings-item\"></require>\n    <require from=\"views/settings/settings-dropdown\"></require>\n    <require from=\"views/dashboard/boom-nozzle-presets\"></require>\n    <require from=\"resources/value-converters/multiplier-format\"></require>\n    <require from=\"resources/value-converters/number-format\"></require>\n    <require from=\"resources/value-converters/plusone-format\"></require>\n    <require from=\"resources/value-converters/mmToInches\"></require>\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\n\n    <div class=\"container-fluid\">\n        <div class=\"row\" style=\"text-align: center; margin: auto;\">\n            <div class=\"col-xs-4\">\n                <label class=\"control-label\">\n                    Channel ${state.nozzleVcmCh[nozzleNumber] | plusoneFormat}\n                </label>\n            </div>\n            <div class=\"col-xs-4\">\n                <label class=\"control-label\">\n                    VCM ${state.nozzleVcmIdx[nozzleNumber] | plusoneFormat}\n                </label>\n            </div>\n            <div class=\"col-xs-4\">\n                <label class=\"control-label\">\n                    Drop ${state.nozzleVcmPos[nozzleNumber] | plusoneFormat}\n                </label>\n            </div>\n        </div>\n        <div class=\"row\" style=\"text-align: center; margin: auto;\">\n            <div class=\"col-sm-12\" style=\"overflow: auto; overflow-y: hidden;\">\n                <canvas id=\"nozzleCanvas\" style=\"height: 100px; border: 1px solid black;\"></canvas>\n            </div>\n        </div>\n        <div class=\"row\">\n            <div class=\"col-sm-6\">\n                <div style=\"margin: auto; text-align: center;\"><h2>${\"Boom Profile\" | t}</h2></div>\n                <div style=\"padding: 15px;\">\n                    <form style=\"background-color: white\" class=\"form-horizontal\">\n\n                        <div class=\"form-group form-group-lg\">\n                            <label for=\"nozzleNum\" class=\"col-xs-4 control-label\">\n                                ${\"Nozzle Number\" | t}\n                            </label>\n                            <div class=\"col-xs-6\">\n                                <input type=\"number\" id=\"nozzleNum\" class=\"form-control\" step=\"1\" value.bind=\"nozzleNumber | plusoneFormat\" />\n                            </div>\n\n                        </div>\n                        <div class=\"form-group form-group-lg\">\n                            <div class=\"col-xs-4\"></div>\n                            <div class=\"col-xs-3\">\n                                <input type=\"button\" class=\"btn btn-gray form-control\" value=\"<\" click.delegate=\"changeNozzle(-1)\" />\n                            </div>\n                            <div class=\"col-xs-3\">\n                                <input type=\"button\" class=\"btn btn-gray form-control\" value=\">\" click.delegate=\"changeNozzle(1)\" />\n                            </div>\n                        </div>\n                        <div class=\"form-group form-group-lg\">\n                            <label for=\"locY\" class=\"col-xs-4 control-label\">\n                                ${\"L/R Location\" | t}\n                            </label>\n                            <div class=\"col-xs-6\">\n                                <input type=\"number\" id=\"locY\" class=\"form-control\" value.bind=\"state.nozzleLocY[nozzleNumber] | mmToInches\" change.delegate=\"sendChange(state.nozzleLocY, 'NozzleLocY')\" />\n                            </div>\n                            <label style=\"text-align: left\" for=\"locY\" class=\"col-xs-2 control-label\">\n                                ${\"inches\" | t}\n                            </label>\n                        </div>\n                        <div class=\"form-group form-group-lg\">\n                            <label for=\"locX\" class=\"col-xs-4 control-label\">\n                                ${\"Fore/Aft Location\" | t}\n                            </label>\n                            <div class=\"col-xs-6\">\n                                <input type=\"number\" id=\"locX\" class=\"form-control\" value.bind=\"state.nozzleLocX[nozzleNumber] | mmToInches\" change.delegate=\"sendChange(state.nozzleLocX, 'NozzleLocX')\" />\n                            </div>\n                            <label style=\"text-align: left\" for=\"locX\" class=\"col-xs-2 control-label\">\n                                ${\"inches\" | t}\n                            </label>\n                        </div>\n                        <!--<div class=\"form-group form-group-lg\">\n                            <label for=\"vcmSerial\" class=\"col-xs-4 control-label\">\n                                ${\"VCM Serial Num.\" | t}\n                            </label>\n                            <div class=\"col-xs-6\">\n                                <input type=\"text\" readonly=\"readonly\" id=\"vcmSerial\" class=\"form-control\" value.bind=\"state.vcm0SerialNumber[state.nozzleVcmIdx[nozzleNumber]]\" />\n                            </div>\n                        </div>-->\n                        <div class=\"form-group form-group-lg\">\n                            <label for=\"boomSection\" class=\"col-xs-4 control-label\">\n                                ${\"Boom Section\" | t}\n                            </label>\n                            <div class=\"col-xs-6\">\n                                <input type=\"number\" id=\"boomSection\" class=\"form-control\" value.bind=\"state.nozzleBoomCh[nozzleNumber] | plusoneFormat\" change.delegate=\"sendChange(state.nozzleBoomCh, 'NozzleBoomCh')\" />\n                            </div>\n                        </div>\n                        <div class=\"form-group form-group-lg\">\n                            <label for=\"auxSection\" class=\"col-xs-4 control-label\">\n                                ${\"Auxiliary Section\" | t}\n                            </label>\n                            <div class=\"col-xs-6\">\n                                <input type=\"number\" id=\"auxSection\" class=\"form-control\" value.bind=\"state.nozzleAuxCh[nozzleNumber] | plusoneFormat\" change.delegate=\"sendChange(state.nozzleAuxCh, 'NozzleAuxCh')\" />\n                            </div>\n                        </div>\n                        <div class=\"form-group form-group-lg\">\n                            <label for=\"valveSize\" class=\"col-xs-4 control-label\">\n                                ${\"Valve Size\" | t}\n                            </label>\n                            <div class=\"col-xs-6\">\n                                <input type=\"text\" id=\"valveSize\" class=\"form-control\" value.bind=\"state.nozzleValveSize[nozzleNumber] | multiplierFormat:10:'0.0'\" change.delegate=\"sendChange(state.nozzleValveSize, 'NozzleValveSize')\" />\n                            </div>\n                            <div class=\"col-xs-2\">\n                                <input type=\"button\" class=\"btn btn-gray form-control\" value=\"D\" click.delegate=\"changeValveSizes()\" />\n                            </div>\n                        </div>\n                    </form>\n                </div>\n            </div>\n            <div class=\"col-sm-6\">\n                <div style=\"margin: auto; text-align: center;\"><h2>Preset: ${presetName | t}</h2></div>\n                <div style=\"padding: 15px;\">\n                    <form style=\"background-color: white\" class=\"form-horizontal\">\n                        <div class=\"form-group form-group-lg\">\n                            <div class=\"col-xs-4\">\n                                <input type=\"button\" class=\"btn btn-gray form-control\" value=\"Soft Boom\" click.delegate=\"openBoomConfig()\" />\n                            </div>\n                            <div class=\"col-xs-6\">\n                                <input type=\"number\" id=\"flow\" class=\"form-control\" value.bind=\"state.nozzleBoomCh[nozzleNumber] | plusoneFormat\"\n                                       change.delegate=\"softBoomChanged()\" />\n                            </div>\n                        </div>\n                        <div class=\"form-group form-group-lg\">\n                            <label class=\"col-xs-4 control-label\">\n                                ${\"Rank\" | t}\n                            </label>\n                            <div class=\"col-xs-6\">\n                                <select disabled.bind=\"rankDisabled\" class=\"form-control\" value.bind=\"rank[nozzleNumber]\"\n                                        change.delegate=\"rankChanged()\">\n                                    <option repeat.for=\"option of rankOptions\"\n                                            model.bind=\"option.idx\">\n                                        ${option.val}\n                                    </option>\n                                </select>\n                            </div>\n                        </div>\n                        <div class=\"form-group form-group-lg ${flowSetVisibleClass}\">\n                            <label for=\"flow\" class=\"col-xs-4 control-label\">\n                                ${\"Flow Value\" | t}\n                            </label>\n                            <div class=\"col-xs-6\">\n                                <input type=\"number\" id=\"flow\" class=\"form-control\" value.bind=\"flowGain[nozzleNumber] | multiplierFormat:flowMultiplier:flowFormat\"\n                                       change.delegate=\"flowGainChanged()\" />\n                            </div>\n                        </div>\n                        <div class=\"form-group form-group-lg\">\n                            <label for=\"flow\" class=\"col-xs-4 control-label\">\n                                ${\"Tip Size\" | t}\n                            </label>\n                            <div class=\"col-xs-6\">\n                                <input type=\"number\" id=\"flow\" class=\"form-control\" value.bind=\"nozzleSize[nozzleNumber] | multiplierFormat:10:'0.0'\"\n                                       change.delegate=\"nozzleSizeChanged()\" />\n                            </div>\n                            <div class=\"col-xs-2\">\n                                <input type=\"button\" class=\"btn btn-gray form-control\" value=\"D\" click.delegate=\"changeTipSizes()\" />\n                            </div>\n                        </div>\n                        <div class=\"form-group form-group-lg\">\n                            <label for=\"name\" class=\"col-xs-4 control-label\">\n                                ${\"Preset Name\" | t}\n                            </label>\n                            <div class=\"col-xs-6\">\n                                <input type=\"text\" id=\"name\" class=\"form-control\" value.bind=\"presetName\" keyup.delegate=\"presetNameKeyup(presetName)\" change.delegate=\"presetNameChanged(presetName)\" />\n                            </div>\n                        </div>\n                        <br /><br />\n\n                        <div class=\"form-group form-group-lg\">\n                            <label for=\"pressure\" class=\"col-xs-4 control-label\">\n                                ${\"Test Nozzle\" | t}\n                            </label>\n                            <div class=\"col-xs-6\">\n                                <input type=\"checkbox\" class=\"form-control\" checked.bind=\"nozzleTest[nozzleNumber]\" change.delegate=\"toggleNozzleTest()\" />\n                            </div>\n                        </div>\n                        <br /><br />\n                        <div class=\"form-group form-group-lg\">\n                            <div class=\"col-xs-4\"></div>\n                            <div class=\"col-xs-6\">\n                                <input type=\"button\" class=\"btn btn-primary form-control\" value=\"Save To File\" click.delegate=\"saveConfig()\" />\n                            </div>\n                        </div>\n                    </form>\n                </div>\n            </div>\n        </div>\n        <div class=\"row\">\n            <div id=\"presets\" as-element=\"boom-nozzle-presets\" class=\"container-fluid\" style=\"width: 100%;\"></div>\n        </div>\n    </div>\n</template>\n"; });
var cov_1fmz7kntfq = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/boom/nozzle-bounds.js',
        hash = '7e29517ba6debf5be6232f1e06e0bac8d01638c1',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/boom/nozzle-bounds.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/boom/nozzle-bounds',['exports', 'aurelia-framework', '../../gateway-state-base', 'aurelia-validation', '../../../resources/value-converters/kpaToPsi', '../../../resources/value-converters/multiplier-format', 'ramda'], function (exports, _aureliaFramework, _gatewayStateBase, _aureliaValidation, _kpaToPsi, _multiplierFormat, _ramda) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.NozzleBounds = undefined;

    var _ramda2 = _interopRequireDefault(_ramda);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var NozzleBounds = exports.NozzleBounds = (_dec = (0, _aureliaFramework.inject)(_kpaToPsi.KpaToPsiValueConverter, _multiplierFormat.MultiplierFormatValueConverter), _dec(_class = function (_ref) {
        _inherits(NozzleBounds, _ref);

        function NozzleBounds(kpaToPsiValueConverter, multiplierFormatValueConverter) {
            _classCallCheck(this, NozzleBounds);

            for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
                rest[_key - 2] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'nozzle-bounds';
            _this.nozzlePulseTypes = [];
            _this.autoSyncProperties = ['PwmMinimumPercentage', 'PwmMaximumPercentage', 'NozzlePulseFrequencyIndex', 'NozzleShutoffLimit', 'ValveType', 'ValveDiagnosticsEnabled', 'ZeroSpeedSpray'];

            _this.kpaToPsiValueConverter = kpaToPsiValueConverter;
            _this.multiplierFormatValueConverter = multiplierFormatValueConverter;

            var keyBase = 'systemSettings.boomNozzle.nozzleBounds.';

            _this.valveTypes = _this.getTypes(keyBase + 'valveTypes');
            _this.nozzlePulseTypes = _this.getTypes(keyBase + 'nozzlePulseTypes');
            _this.valveDiagnosticsTypes = _this.getTypes(keyBase + 'valveDiagnosticsTypes');
            _this.zeroSpeedSprayTypes = _this.getTypes(keyBase + 'zeroSpeedSprayTypes');
            return _this;
        }

        NozzleBounds.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
            var curryMultiplier = _ramda2.default.partialRight(this.multiplierFormatValueConverter.forValidate, [2]);

            var rules = _aureliaValidation.ValidationRules.ensure('pwmMinimumPercentage').satisfiesRule('numberRange', 0, 200, curryMultiplier).ensure('pwmMaximumPercentage').satisfiesRule('numberRange', 0, 200, curryMultiplier).ensure('nozzleShutoffLimit').satisfiesRule('numberRange', 0, 34.4738, this.kpaToPsiValueConverter.forValidate, '0.0').rules;
            this.controller.addObject(this.state, rules);
        };

        return NozzleBounds;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/boom/nozzle-bounds.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/number-format\"></require>\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\n    <require from=\"resources/value-converters/multiplier-format\"></require>\n    <require from=\"views/settings/settings-item\"></require>\n    <require from=\"views/settings/settings-dropdown\"></require>\n    <li class=\"container-fluid\">\n        <form style=\"background-color: white\" class=\"form-horizontal\">\n\n            <div as-element=\"settings-item\" val.bind=\"state.pwmMinimumPercentage | multiplierFormat:2 & validate\" step=\"1\"\n                 label=\"systemSettings.boomNozzle.nozzleBounds.labels.pwmMinimumPercentage\"\n                 units=\"%\" prop=\"pwmMinimumPercentage\">\n            </div>\n\n            <div as-element=\"settings-item\" val.bind=\"state.pwmMaximumPercentage | multiplierFormat:2 & validate\" step=\"1\"\n                 label=\"systemSettings.boomNozzle.nozzleBounds.labels.pwmMaximumPercentage\"\n                 units=\"%\" prop=\"pwmMaximumPercentage\">\n            </div>\n\n            <settings-dropdown selected.bind=\"state.nozzlePulseFrequencyIndex\" label=\"systemSettings.boomNozzle.nozzleBounds.labels.nozzlePulseFrequencyIndex\"\n                               options.bind=\"nozzlePulseTypes\" prop=\"nozzlePulseFrequencyIndex\"></settings-dropdown>\n\n            <div as-element=\"settings-item\" val.bind=\"state.nozzleShutoffLimit | kpaToPsi:'0.00' & validate\" step=\".01\"\n                 label=\"systemSettings.boomNozzle.nozzleBounds.labels.nozzleShutoffLimit\"\n                 units=\"units.psi\" , prop=\"nozzleShutoffLimit\">\n            </div>\n\n            <settings-dropdown selected.bind=\"state.valveType\" label=\"systemSettings.boomNozzle.nozzleBounds.labels.valveType\"\n                               options.bind=\"valveTypes\" prop=\"valveType\"></settings-dropdown>\n\n            <settings-dropdown selected.bind=\"state.valveDiagnosticsEnabled\" label=\"systemSettings.boomNozzle.nozzleBounds.labels.valveDiagnostics\"\n                               options.bind=\"valveDiagnosticsTypes\" prop=\"valveDiagnosticsEnabled\"></settings-dropdown>\n\n            <settings-dropdown selected.bind=\"state.zeroSpeedSpray\" label=\"systemSettings.boomNozzle.nozzleBounds.labels.zeroSpeedSpray\"\n                               options.bind=\"zeroSpeedSprayTypes\" prop=\"zeroSpeedSpray\"></settings-dropdown>\n        </form>\n    </li>\n</template>\n"; });
var cov_2o60szgi6q = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/boom/boom-sway-setup.js',
        hash = '29523560692b2c33b4f4fcdc795ef2038863d561',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/boom/boom-sway-setup.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/boom/boom-sway-setup',['exports', 'aurelia-framework', '../../gateway-state-base', '../../../resources/value-converters/mmToInches', 'aurelia-validation'], function (exports, _aureliaFramework, _gatewayStateBase, _mmToInches, _aureliaValidation) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.BoomSwaySetup = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var BoomSwaySetup = exports.BoomSwaySetup = (_dec = (0, _aureliaFramework.inject)(_mmToInches.MmToInchesValueConverter), _dec(_class = function (_ref) {
        _inherits(BoomSwaySetup, _ref);

        function BoomSwaySetup(mmToInchesValueConverter) {
            _classCallCheck(this, BoomSwaySetup);

            for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
                rest[_key - 1] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.type = 'boom-sway-setup';
            _this.autoSyncProperties = ['SwayNeutralX', 'SwayForwardX', 'SwayBackwardX', 'SwayHingeY', 'SwayDxGain', 'SwayDdxGain'];

            _this.mmToInchesValueConverter = mmToInchesValueConverter;
            return _this;
        }

        BoomSwaySetup.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
            var btmLimit = 0;
            var topLimit = 2540;
            var rules = _aureliaValidation.ValidationRules.ensure('swayNeutralX').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInchesValueConverter.forValidate).ensure('swayForwardX').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInchesValueConverter.forValidate).ensure('swayBackwardX').satisfiesRule('numberRange', 0, topLimit, this.mmToInchesValueConverter.forValidate).ensure('swayHingeY').satisfiesRule('numberRange', btmLimit, topLimit, this.mmToInchesValueConverter.forValidate).ensure('swayDxGain').satisfiesRule('numberRange', 0, 100, null, '0.0').ensure('swayDdxGain').satisfiesRule('numberRange', 0, 100, null, '0.0').rules;
            this.controller.addObject(this.state, rules);
        };

        return BoomSwaySetup;
    }((_gatewayStateBase.GatewayStateBase))) || _class);
});
define('text!views/settings/boom/boom-sway-setup.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/mmToInches\"></require>\n    <require from=\"views/settings/settings-item\"></require>\n    <require from=\"views/settings/settings-dropdown\"></require>\n    <require from=\"resources/value-converters/number-format\"></require>\n    <li class=\"container-fluid\">\n        <form style=\"background-color: white\" class=\"form-horizontal\">\n\n            <div as-element=\"settings-item\" val.bind=\"state.swayNeutralX | mmToInches & validate\" step=\"1\" \n                    label=\"systemSettings.boomNozzle.boomSway.labels.swayNeutralX\"\n                    units=\"units.in\" prop=\"swayNeutralX\">\n            </div>\n                    \n            <div as-element=\"settings-item\" val.bind=\"state.swayForwardX | mmToInches & validate\" step=\"1\" \n                    label=\"systemSettings.boomNozzle.boomSway.labels.swayForwardX\"\n                    units=\"units.in\" prop=\"swayForwardX\">\n            </div>\n    \n\n            <div as-element=\"settings-item\" val.bind=\"state.swayBackwardX | mmToInches & validate\" step=\"1\" \n                    label=\"systemSettings.boomNozzle.boomSway.labels.swayBackwardX\"\n                    units=\"units.in\" prop=\"swayBackwardX\">\n            </div>\n                    \n            <div as-element=\"settings-item\" val.bind=\"state.swayHingeY | mmToInches & validate\" step=\"1\" \n                    label=\"systemSettings.boomNozzle.boomSway.labels.swayHingeY\"\n                    units=\"units.in\" prop=\"swayHingeY\">\n            </div>\n                    \n            <div as-element=\"settings-item\" val.bind=\"state.swayDxGain | numberFormat:'0.0' & validate\" step=\".1\" \n                    label=\"systemSettings.boomNozzle.boomSway.labels.swayDxGain\" prop=\"swayDxGain\">\n            </div>\n                    \n            <div as-element=\"settings-item\" val.bind=\"state.swayDdxGain | numberFormat:'0.0' & validate\" step=\".1\" \n                    label=\"systemSettings.boomNozzle.boomSway.labels.swayDdxGain\" prop=\"swayDdxGain\">\n            </div>\n                    \n            <div class=\"graphic boom-sway-img\">\n            </div>\n\n        </form>\n    </li>\n</template>\n"; });
var cov_17k2nodhkx = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/boom-nozzle.js',
        hash = '99bad518f6a4adc6039b001fc470c4f6bca5c313',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/settings/boom-nozzle.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/settings/boom-nozzle',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.BoomNozzle = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _desc, _value, _class, _descriptor;

    var BoomNozzle = exports.BoomNozzle = (_dec = (0, _aureliaFramework.computedFrom)('active'), (_class = function () {
        function BoomNozzle() {
            _classCallCheck(this, BoomNozzle);

            _initDefineProp(this, 'active', _descriptor, this);

            this.type = 'boom-nozzle';
            this.name = 'boom-nozzle';

            this.widgets = [{ 'name': 'nozzle-bounds', 'title': ' Nozzle Bounds' }, { 'name': 'nozzle-setup', 'title': ' Nozzle Setup' }, { 'name': 'boom-sway-setup', 'title': ' Boom Sway' }];
        }

        BoomNozzle.prototype.open = function open(widget) {
            if (this.active === widget.name) {
                this.active = '';
            } else {
                this.active = widget.name;
            }
        };

        _createClass(BoomNozzle, [{
            key: 'show',
            get: function get() {
                return this.active;
            }
        }]);

        return BoomNozzle;
    }(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'active', [_aureliaFramework.observable], {
        enumerable: true,
        initializer: null
    }), _applyDecoratedDescriptor(_class.prototype, 'show', [_dec], Object.getOwnPropertyDescriptor(_class.prototype, 'show'), _class.prototype)), _class));
});
define('text!views/settings/boom-nozzle.html', ['module'], function(module) { module.exports = "<template>\n    <div class=\"panel panel-default\">\n        <label class=\"panel-heading tree-toggle nav-header\"> Boom/Nozzle</label>\n        <ul class=\"panel-body nav nav-list tree\">\n            <li repeat.for=\"widget of widgets\" class=\"au-animate\">\n                <div class=\"panel panel-default\">\n                    <label class=\"panel-heading tree-toggle nav-header\" click.delegate=\"open(widget)\">${widget.title}</label>\n                    <div if.bind=\"show == widget.name\" class=\"panel-body\">\n                        <compose view-model=\"views/settings/boom/${widget.name}\" class=\"col-md-11\"></compose>\n                    </div>\n                </div>\n            </li>\n        </ul>\n    </div>\n</template>\n"; });
var cov_ut1hrldj8 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/pid-control-tuning/rate-tuning-controls.js',
        hash = 'ffd8ece8efe068668ace93174c6626b304a94f47',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/pid-control-tuning/rate-tuning-controls.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/pid-control-tuning/rate-tuning-controls',['exports', 'aurelia-framework', 'aurelia-dialog', '../../services/gateway-service', '../../components/shared/dialogs/rate-input-dialog', '../../components/shared/dialogs/psi-input-dialog', '../../resources/value-converters/mlPerHectareToGpa', '../../resources/value-converters/kpaToPsi', '../../components/shared/dialogs/number-input-dialog', '../../components/shared/dialogs/input-dialog'], function (exports, _aureliaFramework, _aureliaDialog, _gatewayService, _rateInputDialog, _psiInputDialog, _mlPerHectareToGpa, _kpaToPsi, _numberInputDialog, _inputDialog) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.RateTuningControls = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    var _dec, _class;

    var RateTuningControls = exports.RateTuningControls = (_dec = (0, _aureliaFramework.inject)(_gatewayService.GatewayService, _aureliaDialog.DialogService, _mlPerHectareToGpa.MlPerHectareToGpaValueConverter, _kpaToPsi.KpaToPsiValueConverter, _inputDialog.InputDialog), _dec(_class = function () {
        function RateTuningControls(gatewayService, dialogService, mlPerHectareToGpaValueConverter, kpaToPsiValueConverter) {
            _classCallCheck(this, RateTuningControls);

            this.subscribedProperties = ['NvRate1GainP', 'NvRate1GainI', 'NvRate1GainD', 'NvRate1GainK', 'NvRate1DeadBand', 'SystemRate1Auto', 'SystemRate1Index', 'SystemRate1Target0', 'SystemRate1Target1', 'SystemRate1Target2'];
            this.editDelta = {};

            this.gatewayService = gatewayService;
            this.mlPerHectareToGpaValueConverter = mlPerHectareToGpaValueConverter;
            this.kpaToPsiValueConverter = kpaToPsiValueConverter;
            this.dialogService = dialogService;
            this.state = this.gatewayService.getState();
        }

        RateTuningControls.prototype.attached = function attached() {
            this.gatewayService.subscribe(this.subscribedProperties, 'rate-tuning-control');
        };

        RateTuningControls.prototype.unbind = function unbind() {
            this.gatewayService.unsubscribe(this.subscribedProperties, 'rate-tuning-control');
        };

        RateTuningControls.prototype.toggleAuto = function toggleAuto() {
            this.editDelta.systemRate1Auto = this.toggleByte(this.state.systemRate1Auto);
            this.gatewayService.send(this.editDelta);
        };

        RateTuningControls.prototype.toggleRTarget = function toggleRTarget(value) {
            this.editDelta.systemRate1Index = value;
            this.gatewayService.send(this.editDelta);
        };

        RateTuningControls.prototype.toggleByte = function toggleByte(value) {
            if (value === 0) {
                return 1;
            }
            return 0;
        };

        RateTuningControls.prototype.bump = function bump(bmpDir) {
            this.editDelta.systemRate1IncDec = bmpDir;
            this.gatewayService.send(this.editDelta);
        };

        RateTuningControls.prototype.openRateDialog = function openRateDialog(propertyName, displayName) {
            var _this = this;

            var validateMlPerHectareToGpa = function validateMlPerHectareToGpa(n) {
                return function (m) {
                    return _this.mlPerHectareToGpaValueConverter.forValidate(m, n);
                };
            };
            var mlPerHectareGpaConvert = validateMlPerHectareToGpa(4).bind(this);

            this.dialogService.open({
                viewModel: _rateInputDialog.RateInputDialog,
                model: {
                    val: this.state[propertyName],
                    min: 0,
                    max: 467696.8699,
                    converter: mlPerHectareGpaConvert,
                    format: '0.0',
                    property: propertyName,
                    displayName: displayName

                },
                lock: false
            }).whenClosed(function (response) {});
        };

        RateTuningControls.prototype.openMlToGalDialog = function openMlToGalDialog(propertyName, displayName) {
            this.dialogService.open({
                viewModel: _inputDialog.InputDialog,
                view: 'components/shared/dialogs/mm-gal-input-dialog.html',
                model: {
                    val: this.state[propertyName],
                    min: 0,
                    max: 18927,
                    format: '0.0',
                    property: propertyName,
                    displayName: displayName

                },
                lock: false
            }).whenClosed(function (response) {});
        };

        RateTuningControls.prototype.openPressureDialog = function openPressureDialog(propertyName, displayName) {
            var _this2 = this;

            var validatePsiToKpa = function validatePsiToKpa(n) {
                return function (m) {
                    return _this2.kpaToPsiValueConverter.forValidate(m, n);
                };
            };
            var psiKpaConvert = validatePsiToKpa(4).bind(this);

            this.dialogService.open({
                viewModel: _psiInputDialog.PsiInputDialog,
                model: {
                    val: this.state[propertyName],
                    min: 0,
                    max: 18927000,
                    converter: psiKpaConvert,
                    format: '0.0',
                    property: propertyName,
                    displayName: displayName

                },
                lock: false
            }).whenClosed(function (response) {});
        };

        RateTuningControls.prototype.openNumberDialog = function openNumberDialog(propertyName, displayName) {
            this.dialogService.open({
                viewModel: _numberInputDialog.NumberInputDialog,
                model: {
                    val: this.state[propertyName],
                    min: 0,
                    max: 100,
                    format: '0.0',
                    property: propertyName,
                    displayName: displayName
                },
                lock: false
            }).whenClosed(function (response) {});
        };

        _createClass(RateTuningControls, [{
            key: 'auto',
            get: function get() {
                return this.state.systemRate1Auto === 1 ? true : false;
            }
        }]);

        return RateTuningControls;
    }()) || _class);
});
define('text!views/pid-control-tuning/rate-tuning-controls.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/number-format\"></require>\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\n    <require from=\"resources/value-converters/mlPerHectareToGpa\"></require>\n    <require from=\"resources/value-converters/mlToGal\"></require>\n\n    <div class=\"container-fluid panel panel-primary\">\n        <div class=\"text-center panel-heading\">Flow Tuning</div>\n        <div class=\"panel-body\">\n            <div class=\"row row-eq-height\">\n                <div class=\"col-xs-2\">\n                    <label for=\"rate-toggle\" class=\" ${auto ? 'switcher-success' : ''} switcher switcher-rounded\">\n                        <input style=\"text-align: center\" type=\"checkbox\" id=\"rate-toggle\" checked.bind=\"auto\" change.delegate=\"toggleAuto()\" name=\"systemRate1Auto\">\n                        <div class=\"switcher-indicator\">\n                            <div class=\"switcher-yes\">A</div>\n                            <div class=\"switcher-no\">M</div>\n                        </div>\n                        Rate\n                    </label>\n                </div>\n\n                <div class=\"col-xs-3 col-lg-offset-1\">\n                    <span class=\"input-group\">\n                        <span class=\"input-group-btn\">\n                            <button class=\"btn ion-minus\" click.delegate=\"bump(-1)\"></button>\n                        </span>\n                        <span if.bind=\"state.systemRate1Index === 0\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openRateDialog('systemRate1Target0', 'Target Rate 1')\">\n                            ${state.systemRate1Target0 | mlPerHectareToGpa:'0.0'}\n                        </span>\n                        <span if.bind=\"state.systemRate1Index === 1\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openRateDialog('systemRate1Target1', 'Target Rate 2')\">\n                            ${state.systemRate1Target1 | mlPerHectareToGpa:'0.0'}\n                        </span>\n                        <span if.bind=\"state.systemRate1Index === 2\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openRateDialog('systemRate1Target1', 'Prescription Target Rate')\">\n                            ${state.systemRate1Target2 | mlPerHectareToGpa:'0.0'}\n                        </span>\n                        <span class=\"input-group-btn\">\n                            <button class=\"btn ion-plus\" click.delegate=\"bump(1)\"></button>\n                        </span>\n                    </span>\n                </div>\n            </div>\n\n            <div class=\"row small-vertical-padding\">\n                <div class=\"col-xs-2\">\n                    <button class=\"btn ${state.systemRate1Index === 0 && state.systemRate1Auto === 0 ? 'btn-primary' : ''} form-control\" click.trigger=\"toggleRTarget(0)\">R1</button>\n                </div>\n                <div class=\"col-xs-2\">\n                    <button class=\"btn ${state.systemRate1Index === 1 && state.systemRate1Auto === 0 ? 'btn-primary' : ''} form-control\" click.trigger=\"toggleRTarget(1)\">R2</button>\n                </div>\n            </div>\n\n            <div class=\"row\">\n                <div class=\"col-xs-2\">\n                    <label class=\"label-top\" for=\"rK\">S-Gain</label>\n                    <span id=\"rK\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openNumberDialog('nvRate1GainK', 'S-Gain')\">\n                        ${state.nvRate1GainK | numberFormat:'0.0'}\n                    </span>\n                </div>\n                <div class=\"col-xs-2\">\n                    <label class=\"label-top\" for=\"db\">DeadBand</label>\n                    <span id=\"db\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openMlToGalDialog('nvRate1DeadBand', 'DeadBand')\">\n                        ${state.nvRate1DeadBand | mlToGal:'0.0'}\n                    </span>\n                </div>\n                <div class=\" col-xs-2\">\n                    <label class=\"label-top\" for=\"p\">P-Gain</label>\n                    <span id=\"p\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openNumberDialog('nvRate1GainP', 'P-Gain')\">\n                        ${state.nvRate1GainP | numberFormat:'0.0'}\n                    </span>\n                </div>\n                <div class=\" col-xs-2\">\n                    <label class=\"label-top\" for=\"i\">I-Gain</label>\n                    <span id=\"i\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openNumberDialog('nvRate1GainI', 'I-Gain')\">\n                        ${state.nvRate1GainI | numberFormat:'0.0'}\n                    </span>\n                </div>\n                <div class=\"col-xs-2\">\n                    <label class=\"label-top\" for=\"d\">D-Gain</label>\n                    <span id=\"d\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openNumberDialog('nvRate1GainD', 'D-Gain')\">\n                        ${state.nvRate1GainD | numberFormat:'0.0'}\n                    </span>\n                </div>\n            </div>\n        </div>\n    </div>\n\n</template>\n"; });
var cov_ou94dm4p6 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/pid-control-tuning/rate-graph.js',
        hash = '8d1e27d173fa2634380a6b338fb4f82c51dadd7e',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/pid-control-tuning/rate-graph.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/pid-control-tuning/rate-graph',['exports', 'aurelia-framework', 'd3'], function (exports, _aureliaFramework, _d) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.RateGraph = undefined;

    var d3 = _interopRequireWildcard(_d);

    function _interopRequireWildcard(obj) {
        if (obj && obj.__esModule) {
            return obj;
        } else {
            var newObj = {};

            if (obj != null) {
                for (var key in obj) {
                    if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
            }

            newObj.default = obj;
            return newObj;
        }
    }

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _desc, _value, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;

    var RateGraph = exports.RateGraph = (_class = function () {
        function RateGraph() {
            _classCallCheck(this, RateGraph);

            _initDefineProp(this, 'id', _descriptor, this);

            _initDefineProp(this, 'dataSource', _descriptor2, this);

            this.numOfYTicks = 8;

            _initDefineProp(this, 'refresh', _descriptor3, this);

            _initDefineProp(this, 'scalePercentage', _descriptor4, this);

            _initDefineProp(this, 'minY', _descriptor5, this);
        }

        RateGraph.prototype.attached = function attached() {
            var _this = this;

            this.rectWidth = 50;

            this.limit = 120 * 1;
            this.duration = 500;

            this.currentSampleIndex = this.dataSource.currentSampleIndex();

            this.now = new Date(this.dataSource.actualValues[this.currentSampleIndex].timeStamp - this.duration);

            this.width = 500;
            this.height = 150;
            this.padding = 100;

            this.groups = {
                target: {
                    value: function value() {
                        var next = _this.dataSource.getLiveTargetRate();

                        if (_this.lastTargetRate && _this.lastTargetRate.value !== next.value) {
                            _this.refreshYAxis(next.value);
                        }
                        _this.lastTargetRate = next;
                        return next;
                    },
                    color: 'blue',
                    data: d3.range(this.limit).map(function () {
                        return { value: 0, timeStamp: new Date() };
                    })

                },
                current: {
                    value: function value() {
                        return _this.dataSource.getLiveRate();
                    },
                    color: 'yellow',
                    data: d3.range(this.limit).map(function () {
                        return { value: 0, timeStamp: new Date() };
                    })

                }
            };

            this.x = d3.scaleTime().domain([this.now - this.limit, this.now - this.duration]).range([0, this.width]);

            this.setYScale(this.dataSource.getLiveTargetRate().value);

            this.line = d3.line().curve(d3.curveLinear).x(function (d, i) {
                var x = _this.x(d.timeStamp);
                if (Number.isNaN(x)) {
                    throw new Error('must be number');
                }
                return x;
            }).y(function (d) {
                var y = _this.yScale(d.value);
                if (Number.isNaN(y)) {
                    throw new Error('must be number');
                }
                return y;
            });

            this.svg = d3.select('#' + this.id).append('svg').attr('width', this.width + 50).attr('height', this.height + 50).attr('class', 'chart graph').append('g').attr('transform', 'translate(50,20)');

            this.yGrid = this.svg.append('g').attr('class', 'grid y').call(this.makeYGridlines().tickSize(-this.width).tickFormat(''));

            this.xGrid = this.svg.append('g').attr('class', 'grid').call(this.xGridAxis = this.makeXGridlines());

            this.axis = this.svg.append('g').attr('class', 'x axis').attr('transform', 'translate(0,' + this.height + ')').call(this.x.axis = d3.axisBottom(this.x));

            this.paths = this.svg.append('g');

            this.recordingOverlay = this.svg.append('rect').attr('fill', 'darkred').attr('fill-opacity', 0.5).attr('x', this.x(this.now)).attr('y', 0).attr('width', 0).attr('height', this.height + 2);

            this.svg.append('rect').attr('fill', '#f6f6f6').attr('x', -50).attr('y', 0).attr('width', 50).attr('height', this.height + 2);

            this.yAxis = d3.axisLeft(this.yScale).ticks(this.numOfYTicks);

            this.svg.append('g').attr('class', 'yaxis').style('background-color', 'blue').call(this.yAxis);

            for (var name in this.groups) {
                var group = this.groups[name];
                var strokeWidth = 2;

                if (name === 'target') {
                    strokeWidth = 3;
                }
                group.path = this.paths.append('path').data([group.data]).style('stroke-width', strokeWidth + 'px').attr('class', 'line ' + name + ' group').style('stroke', group.color);
            }

            this.tick();
        };

        RateGraph.prototype.makeYGridlines = function makeYGridlines() {
            return d3.axisLeft(this.yScale).ticks(this.numOfYTicks).tickSize(-this.width).tickFormat('');
        };

        RateGraph.prototype.makeXGridlines = function makeXGridlines() {
            return d3.axisBottom(this.x).tickSize(this.height).tickFormat('');
        };

        RateGraph.prototype.refreshYAxis = function refreshYAxis(target) {
            if (this.svg) {
                this.setYScale(target);

                var t = d3.transition().duration(750).ease(d3.easeLinear);

                this.svg.select('.yaxis').transition(t).call(this.yAxis.bind(this));
            }
        };

        RateGraph.prototype.setYScale = function setYScale(target) {
            var doubleTargetRate = target + target * this.scalePercentage / 100;
            var minY = 0;
            if (this.minY === null) {
                minY = target - target * (this.scalePercentage / 100);
            }
            var maxY = Math.max(this.dataSource.getLiveRate().value, doubleTargetRate);

            if (this.yScale) {
                this.yScale.domain([minY, maxY]);
                this.yAxis.scale(this.yScale);
                this.yGrid.call(this.makeYGridlines().tickSize(-this.width).tickFormat(''));
            } else {
                this.yScale = d3.scaleLinear().clamp(true).nice(true).domain([minY, maxY]).range([this.height, 0]);
            }
        };

        RateGraph.prototype.setupPaths = function setupPaths() {
            for (var name in this.groups) {
                this.svg.select('.line,.' + name + ',.group').remove();
                var group = this.groups[name];

                if (this.dataSource.isLive()) {
                    this.backFillPath(group, name);
                } else {
                    group.data = [];
                }

                var strokeWidth = 2;

                if (name === 'target') {
                    strokeWidth = 4;
                }

                group.path = this.paths.append('path').data([group.data]).style('stroke-width', strokeWidth + 'px').attr('class', 'line ' + name + ' group').style('stroke', group.color);
            }
        };

        RateGraph.prototype.backFillPath = function backFillPath(group, name) {
            var data = [];
            if (name === 'target') {
                var liveDataStart = this.dataSource.targets.length - this.limit;
                data = this.dataSource.targets.slice(Math.max(liveDataStart, 0), this.dataSource.targets.length - 1);
            } else {
                var _liveDataStart = this.dataSource.actualValues.length - this.limit;
                data = this.dataSource.actualValues.slice(Math.max(_liveDataStart, 0), this.dataSource.actualValues.length - 1);
            }
            group.data = data;
        };

        RateGraph.prototype.tick = function tick() {
            this.currentSampleIndex = this.dataSource.currentSampleIndex();
            this.now = this.dataSource.getCurrentCycleTime();
            if (this.dataSource.needsRefresh()) {
                this.setupPaths();
                if (!this.dataSource.hasRecording()) {
                    this.recordingOverlay.attr('width', 0);
                } else if (!this.dataSource.isLive()) {
                    this.recordingOverlay.attr('fill', 'darkgreen');
                } else if (this.dataSource.isLive()) {
                    this.recordingOverlay.attr('fill', 'darkred');
                }
            }

            for (var name in this.groups) {
                var group = this.groups[name];

                group.data.push(group.value());
                group.path.attr('d', this.line);
            }

            if (this.dataSource.isRecording || this.dataSource.hasRecording()) {
                var x1 = this.x(this.dataSource.getRecordingStartTime());
                var x2 = this.x(this.dataSource.getRecordingEndTime());
                var width = Math.min(x2 - x1, this.width);

                if (this.x.range()[0] <= x1 || this.x.range()[1] >= x2) {
                    this.recordingOverlay.attr('transform', null).transition().duration(this.duration).ease(d3.easeLinear).attr('width', width).attr('x', x1);
                }
            }

            this.x.domain([this.now - (this.limit - 2) * this.duration, this.now - this.duration]);

            this.axis.transition().duration(this.duration).ease(d3.easeLinear).call(this.x.axis);

            this.xGrid.transition().duration(this.duration).ease(d3.easeLinear).call(this.xGridAxis);

            this.paths.attr('transform', null).transition().duration(this.duration).ease(d3.easeLinear).attr('transform', 'translate(' + this.x(this.now - (this.limit - 1) * this.duration) + ')').on('end', this.tick.bind(this));

            for (var _name in this.groups) {
                var _group = this.groups[_name];
                if (_group.data.length > this.limit) {
                    _group.data.shift();
                }
            }

            this.dataSource.nextCycle();
        };

        return RateGraph;
    }(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'id', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, 'dataSource', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'refresh', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'scalePercentage', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return 100;
        }
    }), _descriptor5 = _applyDecoratedDescriptor(_class.prototype, 'minY', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return null;
        }
    })), _class);
});
define('text!views/pid-control-tuning/rate-graph.html', ['module'], function(module) { module.exports = "<template>\n</template>\n"; });
var cov_2rn3lxatr6 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/pid-control-tuning/pressure-tuning-controls.js',
        hash = 'c5f4fbfcd19f6c67a84445d946a6288961d5a6cc',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/pid-control-tuning/pressure-tuning-controls.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/pid-control-tuning/pressure-tuning-controls',['exports', 'aurelia-framework', 'aurelia-dialog', '../../services/gateway-service', '../../components/shared/dialogs/psi-input-dialog', '../../components/shared/dialogs/number-input-dialog', '../../resources/value-converters/kpaToPsi'], function (exports, _aureliaFramework, _aureliaDialog, _gatewayService, _psiInputDialog, _numberInputDialog, _kpaToPsi) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PressureTuningControls = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    var _dec, _class;

    var PressureTuningControls = exports.PressureTuningControls = (_dec = (0, _aureliaFramework.inject)(_gatewayService.GatewayService, _aureliaDialog.DialogService, _kpaToPsi.KpaToPsiValueConverter), _dec(_class = function () {
        function PressureTuningControls(gatewayService, dialogService, kpaToPsiValueConverter) {
            _classCallCheck(this, PressureTuningControls);

            this.subscribedProperties = ['SystemPressure1Auto', 'SystemPressure1IncDec', 'SystemPressure1Target0', 'SystemPressure1Target1', 'SystemPressure1Target2', 'SystemPressure1Index', 'PressureGainP', 'PressureGainI', 'PressureGainD', 'PressureGainK', 'PressureDeadBand', 'RateSyncEnabled'];
            this.editDelta = {};

            this.gatewayService = gatewayService;
            this.kpaToPsiValueConverter = kpaToPsiValueConverter;
            this.dialogService = dialogService;
            this.state = this.gatewayService.getState();
        }

        PressureTuningControls.prototype.attached = function attached() {
            this.gatewayService.subscribe(this.subscribedProperties, 'pressure-tuning-control');
        };

        PressureTuningControls.prototype.unbind = function unbind() {
            this.gatewayService.unsubscribe(this.subscribedProperties, 'pressure-tuning-control');
        };

        PressureTuningControls.prototype.toggleAuto = function toggleAuto() {
            this.editDelta.systemPressure1Auto = this.toggleByte(this.state.systemPressure1Auto);
            this.gatewayService.send(this.editDelta);
        };

        PressureTuningControls.prototype.toggleRateSync = function toggleRateSync() {
            this.editDelta.rateSyncEnabled = this.toggleByte(this.state.rateSyncEnabled);
            this.gatewayService.send(this.editDelta);
        };

        PressureTuningControls.prototype.togglePTarget = function togglePTarget(value) {
            this.editDelta.systemPressure1Index = value;
            this.gatewayService.send(this.editDelta);
        };

        PressureTuningControls.prototype.toggleByte = function toggleByte(value) {
            if (value === 0) {
                return 1;
            }
            return 0;
        };

        PressureTuningControls.prototype.bump = function bump(bmpDir) {
            this.editDelta.systemPressure1IncDec = bmpDir;
            this.gatewayService.send(this.editDelta);
        };

        PressureTuningControls.prototype.openTargetPressureDialog = function openTargetPressureDialog(propertyName, displayName, format, max) {
            var _this = this;

            var validatePsiToKpa = function validatePsiToKpa(n) {
                return function (m) {
                    return _this.kpaToPsiValueConverter.forValidate(m, n);
                };
            };
            var psiKpaConvert = validatePsiToKpa(4).bind(this);

            this.dialogService.open({
                viewModel: _psiInputDialog.PsiInputDialog,
                model: {
                    val: this.state[propertyName],
                    min: 0,
                    max: max || 6894.76,
                    converter: psiKpaConvert,
                    format: format || '0.0',
                    property: propertyName,
                    displayName: displayName

                },
                lock: false
            }).whenClosed(function (response) {});
        };

        PressureTuningControls.prototype.openNumberDialog = function openNumberDialog(propertyName, displayName) {
            this.dialogService.open({
                viewModel: _numberInputDialog.NumberInputDialog,
                model: {
                    val: this.state[propertyName],
                    min: 0,
                    max: 100,
                    format: '0.0',
                    property: propertyName,
                    displayName: displayName
                },
                lock: false
            }).whenClosed(function (response) {});
        };

        _createClass(PressureTuningControls, [{
            key: 'auto',
            get: function get() {
                return this.state.systemPressure1Auto === 0 ? false : true;
            }
        }, {
            key: 'rateSyncEnabled',
            get: function get() {
                return this.state.rateSyncEnabled === 0 ? false : true;
            }
        }]);

        return PressureTuningControls;
    }()) || _class);
});
define('text!views/pid-control-tuning/pressure-tuning-controls.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/binding-behavior/auto-sync\"></require>\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\n    <require from=\"resources/value-converters/number-format\"></require>\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\n    <div class=\"container-fluid panel panel-primary\">\n        <div class=\"text-center panel-heading\">Pressure Tuning</div>\n        <div class=\"panel-body\">\n            <div class=\"row row-eq-height\">\n                <div class=\"col-xs-2\">\n                    <label for=\"a\" class=\" ${auto ? 'switcher-success' : ''} switcher switcher-rounded\">\n                        <input style=\"text-align: center\" type=\"checkbox\" id=\"a\" checked.bind=\"auto\" change.delegate=\"toggleAuto()\" name=\"systemPressure1Auto\" >\n                        <div class=\"switcher-indicator\">\n                            <div class=\"switcher-yes\">A</div>\n                            <div class=\"switcher-no\">M</div>\n                        </div>\n                        Rate\n                    </label>\n                </div>\n\n                <div class=\"col-xs-3 col-lg-offset-1\">\n                    <span class=\"input-group\">\n                        <span class=\"input-group-btn\">\n                            <button class=\"btn ion-minus\" click.delegate=\"bump(-1)\"></button>\n                        </span>\n                        <span if.bind=\"state.systemPressure1Index === 0\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openTargetPressureDialog('systemPressure1Target0', 'Target Pressure 1')\">\n                            ${state.systemPressure1Target0 | kpaToPsi:'0.0'}\n                        </span>\n                        <span if.bind=\"state.systemPressure1Index === 1\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openTargetPressureDialog('systemPressure1Target1', 'Target Pressure 2')\">\n                            ${state.systemPressure1Target1 | kpaToPsi:'0.0'}\n                        </span>\n                        <span if.bind=\"state.systemPressure1Index === 2\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openTargetPressureDialog('systemPressure1Target2', 'Target Pressure 3')\">\n                            ${state.systemPressure1Target2 | kpaToPsi:'0.0'}\n                        </span>\n                        <span class=\"input-group-btn\">\n                            <button class=\"btn ion-plus\" click.delegate=\"bump(1)\"></button>\n                        </span>\n                    </span>\n                </div>\n                <div class=\"col-xs-2\">\n                    <label for=\"rate-sync\" class=\" ${rateSyncEnabled ? 'switcher-success' : ''} switcher switcher-rounded\">\n                        <input style=\"text-align: center\" type=\"checkbox\" id=\"rate-sync\" checked.bind=\"rateSyncEnabled\" change.delegate=\"toggleRateSync()\" name=\"rateSyncEnabled\" >\n                        <div class=\"switcher-indicator\">\n                            <div class=\"switcher-yes\">E</div>\n                            <div class=\"switcher-no\">D</div>\n                        </div>\n                        Rate-Sync\n                    </label>\n                </div>\n            </div>\n            <div class=\"row small-vertical-padding\">\n                <div class=\"col-xs-2\">\n                    <button class=\"btn ${state.systemPressure1Index === 0 && state.systemPressure1Auto === 0 ? 'btn-primary' : ''} form-control\" click.trigger=\"togglePTarget(0)\">P1</button>\n                </div>\n                <div class=\"col-xs-2\">\n                    <button class=\"btn ${state.systemPressure1Index === 1 && state.systemPressure1Auto === 0 ? 'btn-primary' : ''} form-control\" click.trigger=\"togglePTarget(1)\">P2</button>\n                </div>\n            </div>\n            <div class=\"row\">\n      \n                <div class=\"col-xs-2\">\n                    <label class=\"label-top\" for=\"rK\">S-Gain</label>\n                    <span id=\"rK\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openNumberDialog('pressureGainK', 'S-Gain')\">\n                        ${state.pressureGainK | numberFormat:'0.0'}\n                    </span>\n                </div>\n                <div class=\"col-xs-2\">\n                    <label class=\"label-top\" for=\"db\">DeadBand</label>\n                    <span id=\"db\" style=\"text-align: center\" class=\"form-control\" click.trigger=\"openTargetPressureDialog('pressureDeadBand', 'DeadBand', '0.00', 0.2069)\">\n                        ${state.pressureDeadBand | kpaToPsi:'0.00'}\n                    </span>\n                </div>\n                <div class=\" col-xs-2\">\n                    <label class=\"label-top\" for=\"p\">P-Gain</label>\n                    <span style=\"text-align: center\" class=\"form-control\" click.trigger=\"openNumberDialog('pressureGainP', 'P-Gain')\">\n                        ${state.pressureGainP | numberFormat:'0.0'}\n                    </span>\n                </div>\n                <div class=\" col-xs-2\">\n                    <label class=\"label-top\" for=\"i\">I-Gain</label>\n                    <span style=\"text-align: center\" class=\"form-control\" click.trigger=\"openNumberDialog('pressureGainI', 'I-Gain')\">\n                        ${state.pressureGainI | numberFormat:'0.0'}\n                    </span>\n                </div>\n                <div class=\"col-xs-2\">\n                    <label class=\"label-top\" for=\"d\">D-Gain</label>\n                    <span style=\"text-align: center\" class=\"form-control\" click.trigger=\"openNumberDialog('pressureGainD', 'D-Gain')\">\n                        ${state.pressureGainD | numberFormat:'0.0'}\n                    </span>\n                </div>\n            </div>\n        </div>\n    </div>\n</template>\n"; });
var cov_1a8zxd1e20 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/pid-control-tuning/pid-graph-data-source.js',
        hash = '54e02822b41fbf72e5cfb7b736393790a09edc79',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/pid-control-tuning/pid-graph-data-source.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/pid-control-tuning/pid-graph-data-source',['exports', 'file-saver'], function (exports, _fileSaver) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PidGraphDataSource = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var PidGraphDataSource = exports.PidGraphDataSource = function () {
        function PidGraphDataSource() {
            _classCallCheck(this, PidGraphDataSource);

            this.maxSize = 1000;
            this.isRecording = false;
            this.isPlaying = false;
            this.targets = [{ value: 0, timeStamp: new Date(Date.now() - 750) }, { value: 0, timeStamp: new Date(Date.now() - 750) }];
            this.actualValues = [{ value: 0, timeStamp: new Date(Date.now() - 750) }, { value: 0, timeStamp: new Date(Date.now() - 750) }];
            this._recordingStartIndex = 0;
            this._recordingEndIndex = 0;
            this.playbackPositionIndex = 0;
            this.recording = {
                sGain: null,
                pGain: null,
                iGain: null,
                dGain: null,
                actualValues: [],
                targets: []
            };
        }

        PidGraphDataSource.prototype.sampleTarget = function sampleTarget(value) {
            this.targets.push({ value: value, timeStamp: new Date() });
        };

        PidGraphDataSource.prototype.sampleActualValue = function sampleActualValue(value) {
            this.actualValues.push({ value: value, timeStamp: new Date() });
        };

        PidGraphDataSource.prototype.getLiveRate = function getLiveRate() {
            if (this.isPlaying) {
                return this.recording.actualValues[this.playbackPositionIndex];
            }
            var v = this.actualValues[this.actualValues.length - 1];
            if (isNaN(v.value)) {
                throw new Error('must be number');
            }
            return v;
        };

        PidGraphDataSource.prototype.getLiveTargetRate = function getLiveTargetRate() {
            if (this.isPlaying) {
                return this.recording.targets[this.playbackPositionIndex];
            }
            var v = this.targets[this.targets.length - 1];
            if (isNaN(v.value)) {
                throw new Error('must be number');
            }
            return v;
        };

        PidGraphDataSource.prototype.record = function record() {
            this._recordingStartIndex = this.actualValues.length - 1;
            this._recordingEndIndex = this._recordingStartIndex;
            this.isRecording = true;
        };

        PidGraphDataSource.prototype.setPidInfo = function setPidInfo(s, p, i, d, lat, long) {
            this.recording.sGain = s;
            this.recording.pGain = p;
            this.recording.iGain = i;
            this.recording.dGain = d;
            this.recording.latitude = lat;
            this.recording.longitude = long;
            this.recording.startTime = new Date();
        };

        PidGraphDataSource.prototype.play = function play() {
            if (this.isRecording) {
                this._recordingEndIndex = this.actualValues.length - 1;
                this.recording.actualValues = this.actualValues.slice(this._recordingStartIndex, this._recordingEndIndex);
                this.recording.targets = this.targets.slice(this._recordingStartIndex, this._recordingEndIndex);
            }
            if (this.recording.actualValues.length > 0) {
                this.isRecording = false;
                this.isPlaying = true;
                this.needsRedraw = true;
                this.playbackPositionIndex = 0;
            }
        };

        PidGraphDataSource.prototype.stop = function stop() {
            if (!this.isLive()) {
                this.needsRedraw = true;
                if (this.isRecording) {
                    this._recordingEndIndex = this.actualValues.length - 1;
                    this.recording.actualValues = this.actualValues.slice(this._recordingStartIndex, this._recordingEndIndex);
                    this.recording.targets = this.targets.slice(this._recordingStartIndex, this._recordingEndIndex);
                }
                this.isRecording = false;
                this.isPlaying = false;
            }
        };

        PidGraphDataSource.prototype.getPlaybackIndex = function getPlaybackIndex() {
            return this.playbackPositionIndex;
        };

        PidGraphDataSource.prototype.getRecordingStartTime = function getRecordingStartTime() {
            if (this.isRecording) {
                return this.actualValues[this._recordingStartIndex].timeStamp;
            }
            if (!this.recording.actualValues[0]) {
                throw new Error('Cant get Start time of empty recording');
            }
            return this.recording.actualValues[0].timeStamp;
        };

        PidGraphDataSource.prototype.hasRecording = function hasRecording() {
            return this.recording.actualValues.length > 0 && this.recording.targets.length > 0;
        };

        PidGraphDataSource.prototype.getRecordingEndTime = function getRecordingEndTime() {
            if (this.isRecording) {
                return this.actualValues[this._recordingEndIndex].timeStamp;
            }
            return this.recording.actualValues[this.recording.actualValues.length - 1].timeStamp;
        };

        PidGraphDataSource.prototype.currentSampleIndex = function currentSampleIndex() {
            return this.actualValues.length - 1;
        };

        PidGraphDataSource.prototype.nextCycle = function nextCycle() {
            while (this.actualValues.length - 1 >= this.maxSize) {
                this.actualValues.shift();
                if (this.isRecording) {
                    this._recordingStartIndex--;
                    if (this._recordingStartIndex < 0) {
                        throw new Error('recording start index cannot be negative');
                    }
                }
            }

            while (this.targets.length - 1 >= this.maxSize) {
                this.targets.shift();
            }
            this.playbackPositionIndex++;
            if (this.playbackPositionIndex >= this.recording.actualValues.length && this.isPlaying) {
                this.isRecording = false;
                this.isPlaying = false;
                this.needsRedraw = true;
            }

            if (this.isRecording) {
                this._recordingEndIndex = this.actualValues.length - 1;

                var recordingLength = this.getRecordingEndTime() - this.getRecordingStartTime();
                var milliSecondsInMinute = 60000;
                if (recordingLength > milliSecondsInMinute) {
                    this.stop();
                }
            }
        };

        PidGraphDataSource.prototype.getCurrentCycleTime = function getCurrentCycleTime() {
            if (!this.isPlaying) {
                return this.actualValues[this.actualValues.length - 1].timeStamp;
            }
            return this.recording.actualValues[this.playbackPositionIndex].timeStamp;
        };

        PidGraphDataSource.prototype.needsRefresh = function needsRefresh() {
            var needsRedraw = this.needsRedraw;

            if (needsRedraw) {
                this.needsRedraw = false;
            }
            return needsRedraw;
        };

        PidGraphDataSource.prototype.isLive = function isLive() {
            return !this.isPlaying && !this.isRecording;
        };

        PidGraphDataSource.prototype.exportRecordingToCsv = function exportRecordingToCsv(fileName) {
            var _this = this;

            var rowDelimiter = '\r\n';
            var colDelimiter = '"," ';

            if (this.recording) {
                this.stop();
            }
            var csv = '';

            csv += 'Pid-Tuning' + rowDelimiter;
            csv += ['S-Gain', 'P-Gain', 'I-Gain', 'D-Gain', 'Recording-Start'].join() + rowDelimiter;
            csv += [this.recording.sGain, this.recording.pGain, this.recording.iGain, this.recording.dGain, this.recording.actualValues[0].timeStamp].join() + rowDelimiter;
            csv += rowDelimiter;

            csv += ['TimeStamp', 'Target', 'Actual Value'].join() + rowDelimiter;

            this.recording.actualValues.forEach(function (sample, index) {
                csv += [sample.timeStamp, String(parseFloat(_this.recording.targets[index].value.toFixed(2))), String(parseFloat(sample.value.toFixed(2)))].join() + rowDelimiter;
            });
            var blob = new Blob([csv], { type: 'text/csv;charset=utf-8' });
            window.saveAs(blob, fileName + '.csv');
        };

        return PidGraphDataSource;
    }();
});
var cov_2h7l7e5ik8 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/pid-control-tuning/pid-control-tuning.js',
        hash = '07fee9500859047d7270c93ba71314258eea7449',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/pid-control-tuning/pid-control-tuning.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/pid-control-tuning/pid-control-tuning',['exports', 'aurelia-framework', '../../components/shared/dialogs/mph-input-dialog', '../../resources/value-converters/mmPerSecondToMph', '../../services/gateway-service', 'aurelia-dialog', './pid-graph-data-source'], function (exports, _aureliaFramework, _mphInputDialog, _mmPerSecondToMph, _gatewayService, _aureliaDialog, _pidGraphDataSource) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PidControlTuning = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    var _dec, _class;

    var PidControlTuning = exports.PidControlTuning = (_dec = (0, _aureliaFramework.inject)(_gatewayService.GatewayService, _aureliaDialog.DialogService, _aureliaFramework.BindingEngine, _mmPerSecondToMph.MmPerSecondToMphValueConverter), _dec(_class = function () {
        function PidControlTuning(gatewayService, dialogService, bindingEngine, mmPerSecondToMphValueConverter) {
            _classCallCheck(this, PidControlTuning);

            this.subscribedProperties = ['SystemRate', 'SystemRate1Index', 'SystemRate1Target0', 'SystemRate1Target1', 'SystemRate1Target2', 'SystemPressure1', 'SystemPressure1Index', 'SystemPressure1Target0', 'SystemPressure1Target1', 'SystemPressure1Target2', 'TestSpeed', 'GroundSpeed', 'NvRate1GainP', 'NvRate1GainI', 'NvRate1GainD', 'NvRate1GainK', 'PressureGainP', 'PressureGainI', 'PressureGainD', 'PressureGainK', 'GpsLat', 'GpsLong'];
            this.subscriptions = [];

            this.dialogService = dialogService;
            this.bindingEngine = bindingEngine;
            this.rateGraphDataSource = new _pidGraphDataSource.PidGraphDataSource();
            this.pressureGraphDataSource = new _pidGraphDataSource.PidGraphDataSource();
            this.mmPerSecondToMphValueConverter = mmPerSecondToMphValueConverter;
            this.gatewayService = gatewayService;
            this.state = this.gatewayService.getState();
        }

        PidControlTuning.prototype.attached = function attached() {
            var _this = this;

            this.gatewayService.subscribe(this.subscribedProperties, 'pid-control-tuning');
            var recordStoppers = ['NvRate1GainP', 'NvRate1GainI', 'NvRate1GainD', 'NvRate1GainK', 'PressureGainP', 'PressureGainI', 'PressureGainD', 'PressureGainK'];

            recordStoppers.forEach(function (prop) {
                var subscription = _this.bindingEngine.propertyObserver(_this.state, _this.lowerCaseFirstLetter(prop)).subscribe(function () {
                    _this.stop();
                });

                _this.subscriptions.push(subscription);
            });
            setInterval(this.sample.bind(this), 500);
        };

        PidControlTuning.prototype.detached = function detached() {
            this.subscriptions.forEach(function (subscription) {
                subscription.dispose();
            });
        };

        PidControlTuning.prototype.unbind = function unbind() {
            this.gatewayService.unsubscribe(this.subscribedProperties, 'pid-control-tuning');
        };

        PidControlTuning.prototype.lowerCaseFirstLetter = function lowerCaseFirstLetter(string) {
            return string.charAt(0).toLowerCase() + string.slice(1);
        };

        PidControlTuning.prototype.sampleRateTarget = function sampleRateTarget() {
            var mLPerGallon = 3785.41;
            var acrePerHectare = 2.47105;
            var rateTarget = this.getActiveTarget() / mLPerGallon / acrePerHectare;

            this.rateGraphDataSource.sampleTarget(rateTarget);

            return rateTarget;
        };

        PidControlTuning.prototype.sampleCurrentRate = function sampleCurrentRate() {
            var mLPerGallon = 3785.41;
            var acrePerHectare = 2.47105;
            var flowRate = this.state.systemRate / mLPerGallon / acrePerHectare;
            this.rateGraphDataSource.sampleActualValue(flowRate);
            return flowRate;
        };

        PidControlTuning.prototype.samplePressureTarget = function samplePressureTarget() {
            var psiPerKpa = 6.89475729;
            var targetPressure = this.getActivePressureTarget() / psiPerKpa;
            this.pressureGraphDataSource.sampleTarget(targetPressure);
            return targetPressure;
        };

        PidControlTuning.prototype.sampleCurrentPressure = function sampleCurrentPressure() {
            var psiPerKpa = 6.89475729;
            var currentPressure = this.state.systemPressure1 / psiPerKpa;
            this.pressureGraphDataSource.sampleActualValue(currentPressure);
            return currentPressure;
        };

        PidControlTuning.prototype.sample = function sample() {
            this.sampleRateTarget();
            this.samplePressureTarget();
            this.sampleCurrentRate();
            this.sampleCurrentPressure();
        };

        PidControlTuning.prototype.getActiveTarget = function getActiveTarget() {
            return this.state['systemRate1Target' + this.state.systemRate1Index];
        };

        PidControlTuning.prototype.getActivePressureTarget = function getActivePressureTarget() {
            return this.state['systemPressure1Target' + this.state.systemPressure1Index];
        };

        PidControlTuning.prototype.record = function record() {
            this.recording = true;
            var lat = this.state.gpsLat;
            var long = this.state.gpsLong;
            this.rateGraphDataSource.setPidInfo(this.state.nvRate1GainK, this.state.nvRate1GainP, this.state.nvRate1GainI, this.state.nvRate1GainD, lat, long);
            this.pressureGraphDataSource.setPidInfo(this.state.pressureGainK, this.state.pressureGainP, this.state.pressureGainI, this.state.pressureGainD, lat, long);
            this.rateGraphDataSource.record();
            this.pressureGraphDataSource.record();
        };

        PidControlTuning.prototype.stop = function stop() {
            this.recording = false;
            this.rateGraphDataSource.stop();
            this.pressureGraphDataSource.stop();
        };

        PidControlTuning.prototype.play = function play() {
            this.recording = false;
            this.rateGraphDataSource.play();
            this.pressureGraphDataSource.play();
        };

        PidControlTuning.prototype.exportToCsv = function exportToCsv() {
            if (this.recording || this.pressureGraphDataSource.hasRecording() && this.rateGraphDataSource.hasRecording()) {
                this.pressureGraphDataSource.exportRecordingToCsv('pressure-tuning');
                this.rateGraphDataSource.exportRecordingToCsv('rate-tuning');
            }
        };

        PidControlTuning.prototype.openMphDialog = function openMphDialog(propertyName, displayName) {
            this.dialogService.open({
                viewModel: _mphInputDialog.MphInputDialog,
                model: {
                    val: this.state[propertyName],
                    min: 0,

                    max: 44704,
                    converter: this.mmPerSecondToMphValueConverter.forValidate,
                    format: '0.0',
                    property: propertyName,
                    displayName: displayName
                },
                lock: false
            }).whenClosed(function (response) {});
        };

        _createClass(PidControlTuning, [{
            key: 'isPlaying',
            get: function get() {
                return this.pressureGraphDataSource.isPlaying && this.rateGraphDataSource.isPlaying;
            }
        }, {
            key: 'activeTarget',
            get: function get() {
                return this.getActiveTarget();
            }
        }, {
            key: 'currentTime',
            get: function get() {
                return new Date();
            }
        }]);

        return PidControlTuning;
    }()) || _class);
});
define('text!views/pid-control-tuning/pid-control-tuning.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"views/pid-control-tuning/rate-graph\"></require>\n    <require from=\"views/pid-control-tuning/rate-tuning-controls\"></require>\n    <require from=\"views/pid-control-tuning/pressure-tuning-controls\"></require>\n    <require from=\"resources/value-converters/mlPerHectareToGpa\"></require>\n    <require from=\"resources/value-converters/datetime-format\"></require>\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\n    <require from=\"resources/value-converters/mmPerSecondToMph\"></require>\n    <div class=\"container-fluid\">\n        <div class=\"row\" style=\"margin-bottom: 20px; margin-top: 20px\">\n            <div class=\"col-xs-2\">\n                <label>Speed</label>\n                <span class=\"form-control\" style=\"text-align: center\" click.trigger=\"openMphDialog('testSpeed', 'Test Speed')\">\n                    ${state.groundSpeed | mmPerSecondToMph:'0.0'}\n                </span>\n            </div>\n        </div>\n\n        <pressure-tuning-controls>\n        </pressure-tuning-controls>\n        <rate-tuning-controls >\n        </rate-tuning-controls>\n\n        <div style=\"margin-bottom: 100px\"class=\"container-fluid\">\n            <div style=\"display: block\">\n                <div style=\"display: block; position: relative\">\n                    <rate-graph id=\"pressure-graph\" style=\"display: inline\" view-model.ref=\"pressureGraph\" data-source.bind=\"pressureGraphDataSource\" scale-percentage=\"50\"></rate-graph>\n                    <div class=\"pid-display-box \">\n                        <label class=\"label-top\">Pressure</label>\n                        <span>${state.systemPressure1 | kpaToPsi:'0.0' }</span>\n                    </div>\n                </div>\n\n                <div style=\"display: block; position: relative\">\n                    <rate-graph id=\"flow-graph\" style=\"display: inline\" view-model.ref=\"rateGraph\" data-source.bind=\"rateGraphDataSource\" scale-percentage=\"50\"></rate-graph>\n                    <div class=\"pid-display-box \">\n                        <label class=\"label-top\">Flow Rate</label>\n                        <span>${state.systemRate | mlPerHectareToGpa:'0.0' }</span>\n                    </div>\n                </div>\n            </div>\n\n            <div style=\"margin-left: 200px\" class=\"btn-group center-block\" role=\"group\">\n                <button class=\"btn ion-ios-recording\" disabled.bind=\"isPlaying\" style=\"color: red\" click.trigger=\"record()\"> Record</button>\n                <button class=\"btn btn-secondary ion-ios-\" click.delegate=\"stop()\">Stop</button>\n                <button class=\"btn btn-primary ion-ios-play\" click.trigger=\"play()\">Play</button>\n                <button class=\"btn btn-default\" click.delegate=\"exportToCsv()\">Export To Csv</button>\n            </div>\n\n\n            <div style=\"display: inline\" if.bind=\"recording\" class=\"ion-ios-recording\"></div>\n            <label>${currentTime | dateTimeFormat:'mm'} Minutes</label>\n            <label>${currentTime | dateTimeFormat:'ss'} Seconds</label>\n        </div>\n    </div>\n\n</template>\n"; });
var cov_115cmqdysy = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/map/three-web-gl-renderer.js',
        hash = 'ce635250a81e631f13cf201d54e82d3af582412e',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/map/three-web-gl-renderer.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/map/three-web-gl-renderer',['exports', 'aurelia-framework', 'three', 'aurelia-configuration'], function (exports, _aureliaFramework, _three, _aureliaConfiguration) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.ThreeWebGlRenderer = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var _dec, _class;

    var ThreeWebGlRenderer = exports.ThreeWebGlRenderer = (_dec = (0, _aureliaFramework.inject)(_aureliaConfiguration.AureliaConfiguration), _dec(_class = function (_ref) {
        _inherits(ThreeWebGlRenderer, _ref);

        function ThreeWebGlRenderer(config) {
            _classCallCheck(this, ThreeWebGlRenderer);

            var isCloud = config.get('Web').IsCloud;
            return _possibleConstructorReturn(this, _ref.call(this, {
                alpha: 1,
                antialias: true,
                clearColor: 0xbfd7ef,
                logarithmicDepthBuffer: isCloud
            }));
        }

        return ThreeWebGlRenderer;
    }((_three.WebGLRenderer))) || _class);
});
var cov_kd4a54v10 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/map/region.js',
        hash = '1770310c7da9e0b288b7d63e5065c9876131cb1e',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/map/region.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/map/region',['exports', 'three', 'fast64', './color-picker'], function (exports, _three, _fast, _colorPicker) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Region = undefined;

    var THREE = _interopRequireWildcard(_three);

    var _fast2 = _interopRequireDefault(_fast);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _interopRequireWildcard(obj) {
        if (obj && obj.__esModule) {
            return obj;
        } else {
            var newObj = {};

            if (obj != null) {
                for (var key in obj) {
                    if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
            }

            newObj.default = obj;
            return newObj;
        }
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var bytesPerCell = 4;

    var Region = exports.Region = function () {
        function Region(container, x, y, size, resolution, mappingService, debug) {
            _classCallCheck(this, Region);

            this.showErrorLayer = true;

            this.colorPicker = new _colorPicker.ColorPicker();
            this.mappingService = mappingService;
            this.regionX = x;
            this.regionY = y;
            this.resolution = resolution;

            this.divisions = size / resolution;
            this.size = size;
            this.container = container;
            this.debug = debug;
            this.textureData = new Uint8Array(bytesPerCell * this.divisions * this.divisions);
            this.errorTextureData = new Uint8Array(bytesPerCell * this.divisions * this.divisions);
            this.setupGeometry(debug);
            this.loadCoverage();
        }

        Region.prototype.setupGeometry = function setupGeometry() {
            var geometry = new THREE.PlaneBufferGeometry(this.size, this.size, 1, 1);
            this.texture = new THREE.DataTexture(this.textureData, this.divisions, this.divisions, THREE.RGBAFormat, THREE.UnsignedByteType);
            var material = new THREE.MeshBasicMaterial({ transparent: true, map: this.texture, depthWrite: true });
            this.texture.needsUpdate = true;

            this.mesh = new THREE.Mesh(geometry, material);
            this.mesh.lookAt(0, 0, 1);
            this.mesh.position.set(this.size / 2, this.size / 2, 0);
            this.mesh.translateX(this.regionX * this.size);
            this.mesh.translateY(this.regionY * this.size);

            this.errorTexture = new THREE.DataTexture(this.errorTextureData, this.divisions, this.divisions, THREE.RGBAFormat, THREE.UnsignedByteType);

            var errorMaterial = new THREE.MeshBasicMaterial({ transparent: true, map: this.errorTexture, depthWrite: true });
            this.errorTexture.needsUpdate = true;

            this.errorMesh = new THREE.Mesh(geometry, errorMaterial);
            this.errorMesh.lookAt(0, 0, 1);
            this.errorMesh.position.set(this.size / 2, this.size / 2, 1);
            this.errorMesh.translateX(this.regionX * this.size);
            this.errorMesh.translateY(this.regionY * this.size);
            this.errorMesh.translateZ(10);

            this.container.add(this.mesh);
            this.container.add(this.errorMesh);

            if (this.debug) {
                this.loadFont();
                var square = new THREE.Geometry();
                square.vertices.push(new THREE.Vector3(0, 0, 0));
                square.vertices.push(new THREE.Vector3(0, this.size, 0));
                square.vertices.push(new THREE.Vector3(this.size, this.size, 0));
                square.vertices.push(new THREE.Vector3(this.size, 0, 0));
                square.vertices.push(new THREE.Vector3(0, 0, 0));
                this.lineMaterial = new THREE.LineBasicMaterial({ color: 0x00ff00, opacity: 0.5 });
                this.line = new THREE.Line(square, this.lineMaterial);
                this.line.translateX(this.regionX * this.size);
                this.line.translateY(this.regionY * this.size);
                this.line.translateZ(0.5);

                this.container.add(this.line);
            }
        };

        Region.prototype.loadFont = function loadFont() {
            var _this = this;

            var loader = new THREE.FontLoader();
            loader.load('helvetiker_regular.typeface.js', function (res) {
                _this.font = res;
                _this.createText();
            });
        };

        Region.prototype.createText = function createText() {
            var cubeMat = new THREE.MeshLambertMaterial({ color: 0xff3300 });
            this.textGeo = new THREE.TextGeometry('X: ' + this.regionX * this.size + ' Y:' + this.regionY * this.size, {
                font: this.font,
                size: 10000,
                height: 5,
                weight: 'normal'
            });
            this.textGeo.computeBoundingBox();
            this.textGeo.computeVertexNormals();
            this.text = new THREE.Mesh(this.textGeo, cubeMat);
            this.text.translateX(this.regionX * this.size + this.size / 4);
            this.text.translateY(this.regionY * this.size + this.size / 2);
            this.text.translateZ(1000);
            this.container.add(this.text);
        };

        Region.prototype.loadCoverage = function loadCoverage() {
            this.getCoverage(this.regionX * this.size, this.regionY * this.size, this.size);
        };

        Region.prototype.getCoverage = function getCoverage(minX, minY, size) {
            var _this2 = this;

            if (this.mappingService === null) {
                return;
            }
            this.mappingService.getRegionCoverageBytes(minX, minY, minX + size, minY + size, this.resolution).then(function (base64) {

                if (base64 === null) {
                    var tData = new Uint8Array(bytesPerCell * _this2.divisions * _this2.divisions);
                    _this2.convertCoverageDataToTexture(tData);

                    if (_this2.texture) {
                        _this2.texture.needsUpdate = true;
                    }
                } else {

                    var _tData = _fast2.default.decode(base64, { uint8Array: true });

                    _this2.convertCoverageDataToTexture(_tData);

                    if (_this2.texture) {
                        _this2.texture.needsUpdate = true;
                    }
                }
            });

            this.mappingService.getSystemErrors(minX, minY, minX + size, minY + size, this.resolution).then(function (errors) {
                errors.forEach(function (error) {
                    var pos = error.position;
                    var localX = Math.floor(_this2.worldToLocal(pos.x));
                    var localY = Math.floor(_this2.worldToLocal(pos.y));

                    _this2.setErrorColor(localX, localY, _this2.colorPicker.getColorFromErrorType(error.errorType));
                });
            });
        };

        Region.prototype.decodeArray = function decodeArray(base64) {
            return Uint8Array.from((atob(base64), function (c) {
                return c.charCodeAt(0);
            }));
        };

        Region.prototype.convertCoverageDataToTexture = function convertCoverageDataToTexture(data) {
            var _this3 = this;

            data.forEach(function (element, index) {
                if (index % 4 === 0) {
                    var target = 0;
                    target = target * 256 + data[index + 1];
                    target = (target * 256 + data[index + 2]) * 10;
                    var percent = data[index + 3];

                    var alpha = 0;
                    if (target !== 0) {
                        alpha = 1;
                    }

                    _this3.textureData[index + 3] = Math.min(0xFF, 0xFF * alpha);

                    var color = _this3.selectColor(percent, element, target, _this3.mappingService.colorKeySprayed);

                    _this3.textureData[index] = Math.floor(0xFF * color.r);
                    _this3.textureData[index + 1] = Math.floor(0xFF * color.g);
                    _this3.textureData[index + 2] = Math.floor(0xFF * color.b);
                }
            });
        };

        Region.prototype.selectColor = function selectColor(percent, state, target, keyIsSprayedValues) {
            if (state !== 100) {
                return this.colorPicker.getColorFromState(state);
            }
            return this.colorPicker.getMappingColor(percent, target, keyIsSprayedValues);
        };

        Region.prototype.worldToLocal = function worldToLocal(value) {
            value = value % this.size;
            if (value < 0) {
                value += this.size;
            }

            return value / this.resolution;
        };

        Region.prototype.toggleErrorLayer = function toggleErrorLayer() {
            this.errorMesh.material.visible = !this.showErrorLayer;
            this.showErrorLayer = !this.showErrorLayer;
        };

        Region.prototype.setColor = function setColor(x, y, color) {
            var alpha = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;

            var index = bytesPerCell * (x + this.divisions * y);

            this.textureData[index++] = Math.floor(0xFF * color.r);
            this.textureData[index++] = Math.floor(0xFF * color.g);
            this.textureData[index++] = Math.floor(0xFF * color.b);

            if (0xFF * alpha > this.textureData[index]) {
                this.textureData[index] = Math.min(0xFF, 0xFF * alpha);
            }

            if (this.texture) {
                this.texture.needsUpdate = true;
            }
        };

        Region.prototype.setErrorColor = function setErrorColor(x, y, color) {
            var alpha = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;

            var index = bytesPerCell * (x + this.divisions * y);

            this.errorTextureData[index++] = Math.floor(0xFF * color.r);
            this.errorTextureData[index++] = Math.floor(0xFF * color.g);
            this.errorTextureData[index++] = Math.floor(0xFF * color.b);
            this.errorTextureData[index++] = Math.floor(0xFF * alpha);

            if (this.errorTexture) {
                this.errorTexture.needsUpdate = true;
            }
        };

        Region.prototype.addLiveData = function addLiveData(c, keyIsSprayedValues) {
            if (this.resolution > 1) {
                if (c.x % this.resolution !== 0 || c.y % this.resolution !== 0) {
                    return;
                }
            }

            if (c.data === null) {
                return;
            }

            if (c.data.errorCode !== 0) {
                this.addNozzleErrorData({
                    position: {
                        x: c.x,
                        y: c.y
                    },
                    errorCode: c.data.errorCode
                });
            }

            var localX = this.worldToLocal(c.x);
            var localY = this.worldToLocal(c.y);

            this.setColor(localX, localY, this.selectColor(c.data.value / c.data.targetRate * 100, c.data.state, c.data.targetRate, keyIsSprayedValues), 1);
        };

        Region.prototype.addNozzleErrorData = function addNozzleErrorData(error) {
            var localX = Math.floor(this.worldToLocal(error.position.x));
            var localY = Math.floor(this.worldToLocal(error.position.y));
            this.setErrorColor(localX, localY, this.colorPicker.getColorFromNozzleErrorCode(error.errorCode));
        };

        Region.prototype.addSystemErrorData = function addSystemErrorData(error) {
            var localX = Math.floor(this.worldToLocal(error.position.x));
            var localY = Math.floor(this.worldToLocal(error.position.y));
            this.setErrorColor(localX, localY, this.colorPicker.getColorFromErrorType(error.errorType));
        };

        return Region;
    }();
});
var cov_1gzy1t0z76 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/map/marker.js',
        hash = 'e8502ac23327ef1320064a3dfa4f4370fc46fd6c',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/map/marker.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/map/marker',['exports', 'three'], function (exports, _three) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Marker = undefined;

    var THREE = _interopRequireWildcard(_three);

    function _interopRequireWildcard(obj) {
        if (obj && obj.__esModule) {
            return obj;
        } else {
            var newObj = {};

            if (obj != null) {
                for (var key in obj) {
                    if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
            }

            newObj.default = obj;
            return newObj;
        }
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var Marker = exports.Marker = function Marker(container, pinHeadColor) {
        _classCallCheck(this, Marker);

        this.object = new THREE.Object3D();

        container.add(this.object);
        var radius = 500;
        var sphereRadius = 1000;
        var height = 3000;
        var sphereMaterial = new THREE.MeshBasicMaterial({ color: pinHeadColor });
        var coneMaterial = new THREE.MeshBasicMaterial({ color: 0x000000 });

        var cone = new THREE.Mesh(new THREE.ConeBufferGeometry(radius, height, 8, 1, true), coneMaterial);
        cone.position.y = height * 0.5;
        cone.rotation.x = Math.PI;
        var sphere = new THREE.Mesh(new THREE.SphereBufferGeometry(sphereRadius, 16, 8), sphereMaterial);
        sphere.position.y = height * 0.95 + sphereRadius;
        this.object.rotation.x = Math.PI / 2;
        this.object.position.y = 10;
        this.object.add(cone, sphere);
    };
});
var cov_1h85rddsdv = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/map/map.js',
        hash = 'd317395013a7e1ce0014ed82c397114018eee4ae',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/map/map.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/map/map',['exports', 'aurelia-framework', 'three', 'tween', '../../services/mapping-service', '../../services/log-event-service', '../../services/spray-session-service', '../../services/boundary-map-service', '../../services/prescription-map-service', '../../services/gateway-service', 'three-orbitcontrols', './grid', './marker', 'toastr', 'aurelia-i18n', 'aurelia-configuration', './map-view-state', './three-web-gl-renderer', './color-picker', '../../components/shared/dialogs/active-alarms', 'aurelia-dialog'], function (exports, _aureliaFramework, _three, _tween, _mappingService, _logEventService, _spraySessionService, _boundaryMapService, _prescriptionMapService, _gatewayService, _threeOrbitcontrols, _grid, _marker, _toastr, _aureliaI18n, _aureliaConfiguration, _mapViewState, _threeWebGlRenderer, _colorPicker, _activeAlarms, _aureliaDialog) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Map = undefined;

    var THREE = _interopRequireWildcard(_three);

    var _tween2 = _interopRequireDefault(_tween);

    var _threeOrbitcontrols2 = _interopRequireDefault(_threeOrbitcontrols);

    var toastr = _interopRequireWildcard(_toastr);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _interopRequireWildcard(obj) {
        if (obj && obj.__esModule) {
            return obj;
        } else {
            var newObj = {};

            if (obj != null) {
                for (var key in obj) {
                    if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
            }

            newObj.default = obj;
            return newObj;
        }
    }

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _desc, _value, _class2, _descriptor;

    var Map = exports.Map = (_dec = (0, _aureliaFramework.inject)(_mappingService.MappingService, _logEventService.LogEventService, _spraySessionService.SpraySessionService, _boundaryMapService.BoundaryMapService, _prescriptionMapService.PrescriptionMapService, _aureliaI18n.I18N, _aureliaConfiguration.AureliaConfiguration, _mapViewState.MapViewState, _aureliaFramework.BindingEngine, _threeWebGlRenderer.ThreeWebGlRenderer, _gatewayService.GatewayService, _aureliaDialog.DialogService), _dec2 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec3 = (0, _aureliaFramework.computedFrom)('state.hubAlarms'), _dec4 = (0, _aureliaFramework.computedFrom)('mapViewState.showPreview'), _dec5 = (0, _aureliaFramework.computedFrom)('state.zoom'), _dec6 = (0, _aureliaFramework.computedFrom)('state.hubCoreBits', 'state.hubCommBits', 'state.hubSubnetBits', 'state.hubSectBits', 'state.sensBits', 'state.processBits'), _dec(_class = (_class2 = function () {
        function Map(mappingService, logEventService, spraySessionService, boundaryMapService, prescriptionMapService, i18n, config, mapViewState, bindingEngine, threeWebGlRenderer, gatewayService, dialogService) {
            var _this = this;

            _classCallCheck(this, Map);

            _initDefineProp(this, 'state', _descriptor, this);

            this.freeViewMode = false;
            this.isCloud = false;
            this.spraySessionId = null;
            this.fieldSize = 800000;
            this.gridDivisions = 40;
            this.viewportHeight = 300;
            this.boundary = [];
            this.prescription = [];
            this.hideRx = false;
            this.ignoreBoundary = false;
            this.internalPoints = [];
            this.boundaryVertices = [];
            this.errorMarker = {};
            this.groundHeight = -500;
            this.gridHeight = -400;
            this.coverageHeight = 0;
            this.boundaryHeight = 1000;
            this.prescriptionHeight = -200;
            this.locationNull = false;
            this.subscribedProperties = ['ConnectedToSwathPro', 'ColorKeySprayed', 'HubAlarms', 'HubCoreBits', 'HubCommBits', 'HubSubnetBits', 'HubSectBits', 'SensBits', 'ProcessBits', 'Zoom'];
            this.activeColors = _colorPicker.ColorPicker.percentColors;
            this.activeLabels = ['0-70', '70-95', '95-105', '105-160', '160+'];
            this.percentLabels = ['0-70', '70-95', '95-105', '105-160', '160+'];
            this.rateLabels = ['0-5', '5-10', '10-15', '15-20', '20+'];
            this.showGroupOne = true;
            this.showGroupTwo = true;
            this.lastZoomUpdateTime = new Date().getTime();
            this.zoomTaps = 0;
            this.editDelta = {};
            this.showPreview = true;
            this.previewShapes = [];

            this.renderer = threeWebGlRenderer;
            this.bindingEngine = bindingEngine;
            this.mapViewState = mapViewState;
            this.dialogService = dialogService;
            this.observerDisposer = this.bindingEngine.propertyObserver(this.mapViewState, 'viewMode').subscribe(function (newValue, oldValue) {
                _this.mapViewModeChanged(newValue, oldValue);
            });
            this.gatewayService = gatewayService;
            this.gatewayService.getState();

            this.mapViewMode = mapViewState.getViewMode();
            this.bindingEngine = bindingEngine;
            this.mappingService = mappingService;
            this.logEventService = logEventService;
            this.spraySessionService = spraySessionService;
            this.boundaryMapService = boundaryMapService;
            this.prescriptionMapService = prescriptionMapService;
            this.tweenDelay = 500;
            this.i18n = i18n;
            this.config = config;
            this.isCloud = this.config.get('Web').IsCloud;

            this.boundaryMapService.connect(this.receiveBoundaryMap.bind(this), this.addBoundaryPoint.bind(this), this.pruneBoundaryPoint.bind(this), this.clearBoundaryPoints.bind(this)).then(function (status) {
                _this.boundaryPoints = status.boundaryPoints;
                _this.internals = status.internals;
                _this.internalPoints = status.internalPoints;
                _this.drawBoundary();
            });

            this.prescriptionMapService.connect(this.receivePrescriptionMap.bind(this));

            this.clearBoundaryPoints();

            this.colorPicker = new _colorPicker.ColorPicker();
            this.activeColors = this.colorPicker.percentColors;
            this.zoomStatus = 1;
            this.lastUpdate = Date.now();
        }

        Map.prototype.bind = function bind(bindingContext, overrideContext) {
            this.parent = bindingContext;
        };

        Map.prototype.attached = function attached() {
            var _this2 = this;

            this._isDetached = false;
            this.viewportHeight = document.getElementById('map').parentElement.parentElement.parentElement.clientHeight;

            this.camera = new THREE.PerspectiveCamera(50, this.aspectRatio, 1000, 100000000);
            this.camera.position.set(0, 100000, 0);
            this.camera.lookAt(0, 0, 0);

            this.state.zoom = this.gatewayService.getState().zoom;
            if (this.mapViewState.getViewMode() === this.mapViewState.chase) {
                this.chaseView();
            } else {
                this.overheadView();
            }

            this.updateViewport();

            this.scene = new THREE.Scene();
            this.scene.fog = new THREE.Fog(0xbfd7ef, 200000, 1000000);

            this.boundaryMapService.getBoundaryMap().then(function (bmap) {
                _this2.receiveBoundaryMap(bmap);
            });

            this.prescriptionMapService.getCurrentPrescriptionMap().then(function (pMap) {
                _this2.receivePrescriptionMap(pMap);
            });

            this.setupControls();

            this.gatewayService.subscribe(this.subscribedProperties);
            this.connectedToSwathPro = this.state.connectedToSwathPro;

            this.map.appendChild(this.renderer.domElement);
            if (!this.connectedToSwathPro) {
                this.logEventService.connect(this.processError.bind(this));

                this.raycaster = new THREE.Raycaster();

                this.initilizeLandscape();

                if (this.isCloud) {
                    this.configureCloudMap();
                } else {
                    this.configureMap();
                }

                this.mouse = new THREE.Vector2();

                this.renderer.domElement.addEventListener('mousedown', this.onMapClick.bind(this), false);
            }
            this.setColors();
        };

        Map.prototype.deactivate = function deactivate() {
            this.observerDisposer.dispose();
        };

        Map.prototype.detached = function detached() {
            this._isDetached = true;
            this.renderer.dispose();
            this.cancelAnimate();
        };

        Map.prototype.mapViewModeChanged = function mapViewModeChanged(newValue, oldValue) {
            if (newValue === 'chase') {
                this.chaseView();
            } else if (newValue === 'overhead') {
                this.overheadView();
            } else {
                this.fieldView();
            }
        };

        Map.prototype.zoomUpdated = function zoomUpdated(increase) {
            var multiplier = 1;
            var current = new Date().getTime();
            var dif = current - this.lastZoomUpdateTime;
            this.lastZoomUpdateTime = current;
            if (dif < 500) {
                this.zoomTaps++;
                multiplier = this.zoomTaps;
            } else {
                this.zoomTaps = 0;
            }

            this.updateViewport();
            if (increase) {
                this.state.zoom -= 0.1 * multiplier;
                if (this.state.zoom < .3) {
                    this.state.zoom = .3;
                }
                this.editDelta.zoom = this.state.zoom;
                this.send();
            } else {
                this.state.zoom += 0.1 * multiplier;
                this.editDelta.zoom = this.state.zoom;
                this.send();
            }
        };

        Map.prototype.changeColorKey = function changeColorKey() {
            this.editDelta.colorKeySprayed = !this.state.colorKeySprayed;
            this.send();
            this.setColors();
            location.reload();
        };

        Map.prototype.alarmsTapped = function alarmsTapped() {
            this.dialogService.open({
                viewModel: _activeAlarms.ActiveAlarms,
                model: {
                    val: 1,
                    alarms: this.activeAlarmStrings
                },
                lock: false
            }).whenClosed(function (response) {});
        };

        Map.prototype.setColors = function setColors() {
            if (this.state.colorKeySprayed) {
                this.activeColors = this.colorPicker.sprayedColors;
                this.activeLabels = this.rateLabels;
            } else {
                this.activeColors = this.colorPicker.percentColors;
                this.activeLabels = this.percentLabels;
            }
            this.mappingService.colorKeySprayed = this.state.colorKeySprayed;
        };

        Map.prototype.send = function send() {
            this.gatewayService.send(this.editDelta);
            this.editDelta = {};
        };

        Map.prototype.setupControls = function setupControls() {
            this.controls = new _threeOrbitcontrols2.default(this.camera, this.renderer.domElement);

            var centerPosition = this.controls.target.clone();
            centerPosition.y = 0;
            var groundPosition = this.camera.position.clone();
            groundPosition.y = 0;
            var d = centerPosition.distanceTo(groundPosition);

            var origin = new THREE.Vector2(this.controls.target.y, 0);
            var remote = new THREE.Vector2(0, d);
            var angleRadians = Math.atan2(remote.y - origin.y, remote.x - origin.x);
            this.controls.maxPolarAngle = angleRadians;
        };

        Map.prototype.configureMap = function configureMap() {
            var _this3 = this;

            this.spraySessionService.getCurrentSpraySession().then(function (spraySession) {
                _this3.minimumResolution = spraySession.minimumResolution;
                _this3.fieldChunkSize = spraySession.fieldChunkSize;
                _this3.initializeCoverage();
                _this3.mappingService.connect(_this3.processDelta.bind(_this3), _this3.resetCoverage.bind(_this3)).then(function (location) {
                    location = { x: 0, y: 0, heading: 0 };
                    if (location !== null) {
                        _this3.locationNull = false;
                    } else {
                        _this3.locationNull = true;
                    }
                    _this3.initializeTractor(location);
                    _this3.coverage.bufferRegions(location.x / 1000, -location.y / 1000);
                    _this3.livecoverage.bufferRegions(location.x / 1000, -location.y / 1000);
                    _this3.animate();
                });
            });

            this.mappingService.getTweenDelay().then(function (delay) {
                return _this3.tweenDelay = delay;
            });

            this.raycaster = new THREE.Raycaster();
            this.mouse = new THREE.Vector2();

            this.renderer.domElement.addEventListener('mousedown', this.onMapClick.bind(this), false);
        };

        Map.prototype.configureCloudMap = function configureCloudMap() {
            var _this4 = this;

            this.spraySessionService.getCurrentSpraySession().then(function (spraySession) {
                _this4.minimumResolution = spraySession.minimumResolution;
                _this4.fieldChunkSize = spraySession.fieldChunkSize;
                _this4.initializeCoverage();
                _this4.animate();
            });
        };

        Map.prototype.loadSpraySession = function loadSpraySession(spraySession) {
            var _this5 = this;

            this.mappingService.getCoverageBoundingBoxForSpraySessionId(spraySession.spraySessionId).then(function (boundingBox) {
                _this5.minimumResolution = spraySession.minimumResolution;
                _this5.fieldChunkSize = spraySession.fieldChunkSize;
                var xWidth = boundingBox.upperRightCorner.x - boundingBox.lowerLeftCorner.x;
                var yWidth = boundingBox.upperRightCorner.y - boundingBox.lowerLeftCorner.y;

                var centerX = boundingBox.lowerLeftCorner.x + xWidth / 2;
                var centerY = boundingBox.lowerLeftCorner.y + yWidth / 2;
                var lowestRes = 16000;

                var bestAspectAndResolution = {
                    xLayers: 100,
                    yLayers: 100,
                    resolution: 16000,
                    scaleFactor: 1
                };

                for (var res = _this5.minimumResolution; res <= 16000; res *= 2) {
                    var xSide = Math.floor(xWidth / res / (_this5.fieldChunkSize / 1000));
                    var ySide = Math.floor(yWidth / res / (_this5.fieldChunkSize / 1000));

                    if (res < lowestRes & xSide * ySide <= 100) {
                        bestAspectAndResolution.xLayers = xSide;
                        bestAspectAndResolution.yLayers = ySide;
                        bestAspectAndResolution.resolution = res;
                        bestAspectAndResolution.scaleFactor = res / _this5.minimumResolution;
                        break;
                    }
                }

                _this5.landscape.remove(_this5.coverage.object);
                _this5.landscape.remove(_this5.livecoverage.object);

                _this5.coverage = new _grid.Grid(_this5.landscape, _this5.mappingService, bestAspectAndResolution.resolution, _this5.fieldChunkSize * bestAspectAndResolution.scaleFactor, bestAspectAndResolution.xLayers, bestAspectAndResolution.yLayers);
                _this5.livecoverage = new _grid.Grid(_this5.landscape, null, bestAspectAndResolution.resolution, _this5.fieldChunkSize * bestAspectAndResolution.scaleFactor, bestAspectAndResolution.xLayers, bestAspectAndResolution.yLayers);
                _this5.coverage.object.scale.y = -1;
                _this5.livecoverage.object.scale.y = -1;
                _this5.landscape.add(_this5.coverage.object);
                _this5.landscape.add(_this5.livecoverage.object);
                _this5.coverage.loadCoverageFromCenterPoint(centerX, centerY);
                _this5.positionFreeViewCamera({
                    x: centerX,
                    y: centerY
                });
            });
        };

        Map.prototype.positionFreeViewCamera = function positionFreeViewCamera(pos) {
            this.relativeCameraOffset = new THREE.Vector3(0, 1000000, -0.1);

            this.freeViewMode = true;
            if (this.scene && this.scene.fog) {
                this.scene.fog.near = 0.1;
                this.scene.fog.far = 0;
            }

            this.camera.position.set(pos.x, 1000000, -pos.y);
            this.camera.lookAt(new THREE.Vector3(0, -0.1, 0));
            this.controls.target.set(pos.x, 0, -pos.y);
            this.controls.update();

            this.render();
            this.animate();
        };

        Map.prototype.processError = function processError(errorState) {
            if (this.coverage) {
                this.coverage.addLiveErrorData(errorState);
            }
        };

        Map.prototype.processDelta = function processDelta(delta) {
            if (this.locationNull && delta.location !== null) {}

            if (delta.location) {
                this.updatePosition(delta.location);
            }

            if (delta.nozzleLookaheads) {
                this.drawBoom(delta.nozzleLookaheads, false);
            }

            if (delta.nozzleLocations) {
                this.drawBoom(delta.nozzleLocations, false);
            }

            if (delta.coordinates) {
                if (this.livecoverage) {
                    this.livecoverage.addLiveData(delta.coordinates, this.state.colorKeySprayed);
                }
            }

            if (this.boundaryMapService.activeBoundaryChanged) {
                this.boundaryMapService.activeBoundaryChanged = false;
                this.renderBoundaryMap(this.boundaryMap);
            }
        };

        Map.prototype.drawBoom = function drawBoom(positions, lookahead) {
            var _this6 = this;

            var options = lookahead ? { color: 0x00ffff } : { color: 0x000000 };
            var l = positions.length;
            var first = positions[0];
            var last = positions[l - 1];

            if (this.boom) {
                var oldX0 = this.boom.geometry.vertices[0].x;
                var oldZ0 = this.boom.geometry.vertices[0].z;
                var oldX1 = this.boom.geometry.vertices[1].x;
                var oldZ1 = this.boom.geometry.vertices[1].z;

                if (oldX0 !== first.x || oldZ0 !== -first.y) {
                    if (this.boomTweenP1) {
                        this.boomTweenP1.stop();
                    }
                    this.boomTweenP1 = new _tween2.default.Tween(this.boom.geometry.vertices[0]).to({ x: first.x, y: 1000, z: -first.y }, 200).easing(_tween2.default.Easing.Linear.None).onUpdate(function () {
                        _this6.boom.geometry.verticesNeedUpdate = true;
                    }).start();
                }

                if (oldX1 !== last.x || oldZ1 !== -last.y) {
                    if (this.boomTweenP2) {
                        this.boomTweenP2.stop();
                    }
                    this.boomTweenP2 = new _tween2.default.Tween(this.boom.geometry.vertices[1]).to({ x: last.x, y: 1000, z: -last.y }, 200).easing(_tween2.default.Easing.Linear.None).onUpdate(function () {
                        _this6.boom.geometry.verticesNeedUpdate = true;
                    }).start();
                }
                this.boom.geometry.verticesNeedUpdate = true;
            } else {
                var material = new THREE.LineBasicMaterial(options);
                var geometry = new THREE.Geometry();
                geometry.vertices.push(new THREE.Vector3(first.x, 1000, -first.y));
                geometry.vertices.push(new THREE.Vector3(last.x, 1000, -last.y));
                this.boom = new THREE.Line(geometry, material);
                this.boom.frustumCulled = false;
                this.scene.add(this.boom);
            }
        };

        Map.prototype.clearBoundaryPoints = function clearBoundaryPoints() {
            var _this7 = this;

            this.boundaryPoints = [];
            this.internalPoints = [];
            this.internals = [];
            if (this.recordedBoundaryLine) {
                this.scene.remove(this.recordedBoundaryLine);
            }
            if (this.internalBoundaryLines) {
                this.internalBoundaryLines.forEach(function (ibl) {
                    _this7.scene.remove(ibl);
                });
            }
            if (this.vertices) {
                this.vertices.forEach(function (v) {
                    _this7.scene.remove(v);
                });
            }
        };

        Map.prototype.addBoundaryPoint = function addBoundaryPoint(point, internal) {
            if (internal) {
                this.internalPoints.push(point);
            } else {
                this.boundaryPoints.push(point);
            }

            this.drawBoundary();
        };

        Map.prototype.pruneBoundaryPoint = function pruneBoundaryPoint(point, internal) {
            var collection = internal ? this.internalPoints : this.boundaryPoints;
            var len = collection.length;
            for (var i = 0; i < len; i++) {
                if (collection[i].item1 === point.item1 && collection[i].item2 === point.item2) {
                    collection.splice(i, 1);
                    break;
                }
            }

            this.drawBoundary();
        };

        Map.prototype.drawBoundary = function drawBoundary() {
            var _this8 = this;

            if (this.recordedBoundaryLine) {
                this.scene.remove(this.recordedBoundaryLine);
            }
            if (this.internalBoundaryLines) {
                this.internalBoundaryLines.forEach(function (ibl) {
                    _this8.scene.remove(ibl);
                });
            }
            if (this.vertices) {
                this.vertices.forEach(function (v) {
                    _this8.scene.remove(v);
                });
            }
            this.vertices = [];
            this.internalBoundaryLines = [];
            var recordedBoundaryGeometry = new THREE.Geometry();
            var vertexGeometry = new THREE.SphereGeometry(500, 5);
            var vertexMat = new THREE.MeshBasicMaterial({ color: 0xbbaa33 });
            this.boundaryPoints.forEach(function (p) {
                recordedBoundaryGeometry.vertices.push(new THREE.Vector3(p.item1, 1000, -p.item2));
                var sphere = new THREE.Mesh(vertexGeometry, vertexMat);
                sphere.position.x = p.item1;
                sphere.position.y = 1000;
                sphere.position.z = -p.item2;
                _this8.vertices.push(sphere);
                _this8.scene.add(sphere);
            });
            this.recordedBoundaryLine = new THREE.Line(recordedBoundaryGeometry, new THREE.LineDashedMaterial({ color: 0xff55dd }));
            this.scene.add(this.recordedBoundaryLine);

            this.internals.forEach(function (i) {
                var internalBoundaryGeometry = new THREE.Geometry();
                i.forEach(function (p) {
                    internalBoundaryGeometry.vertices.push(new THREE.Vector3(p.item1, 1000, -p.item2));
                });
                var internalBoundaryLine = new THREE.Line(internalBoundaryGeometry, new THREE.LineDashedMaterial({ color: 0x55ddaa, linewidth: 50 }));
                _this8.scene.add(internalBoundaryLine);
                _this8.internalBoundaryLines.push(internalBoundaryLine);
            });

            var internalBoundaryGeometry = new THREE.Geometry();
            this.internalPoints.forEach(function (p) {
                internalBoundaryGeometry.vertices.push(new THREE.Vector3(p.item1, 1000, -p.item2));
            });
            var internalBoundaryLine = new THREE.Line(internalBoundaryGeometry, new THREE.LineDashedMaterial({ color: 0x55ddaa, linewidth: 50 }));
            this.scene.add(internalBoundaryLine);
            this.internalBoundaryLines.push(internalBoundaryLine);
        };

        Map.prototype.overheadView = function overheadView() {
            if (this.scene && this.scene.fog) {
                this.scene.fog.near = 0.1;
                this.scene.fog.far = 0;
            }

            this.relativeCameraOffset = new THREE.Vector3(0, 200000 * this.state.zoom, -0.1);

            if (this.coverage && this.freeViewMode) {
                if (this.scene) {
                    this.scene.add(this.gridHelper);
                }
            }

            this.freeViewMode = false;
            this.mapViewState.setViewMode(this.mapViewState.overhead);
        };

        Map.prototype.fieldView = function fieldView() {
            this.relativeCameraOffset = new THREE.Vector3(0, 1000000, -0.1);
            this.tween.stop();

            this.freeViewMode = true;
            if (this.scene && this.scene.fog) {
                this.scene.fog.near = 0.1;
                this.scene.fog.far = 0;
            }

            this.tractor.updateMatrixWorld();

            var cameraOffset = this.relativeCameraOffset.clone();
            cameraOffset.applyMatrix4(this.tractor.matrixWorld);

            this.camera.position.set(cameraOffset.x, cameraOffset.y, cameraOffset.z);
            this.camera.lookAt(this.tractor.position);
            this.controls.target.set(this.tractor.position.x, this.tractor.position.y, this.tractor.position.z);
            this.controls.update();

            this.render();
        };

        Map.prototype.toggleErrors = function toggleErrors() {
            this.coverage.toggleErrors();
        };

        Map.prototype.chaseView = function chaseView() {
            if (this.scene && this.scene.fog) {
                this.scene.fog.near = 200000;
                this.scene.fog.far = 1000000;
            }

            this.relativeCameraOffset = new THREE.Vector3(0, 45000 * this.state.zoom, -90000 * this.state.zoom);

            if (this.coverage && this.freeViewMode) {
                if (this.scene) {
                    this.scene.add(this.gridHelper);
                }
            }

            this.freeViewMode = false;
            this.mapViewState.setViewMode(this.mapViewState.chase);
        };

        Map.prototype.initilizeLandscape = function initilizeLandscape() {
            var geometry = new THREE.CircleGeometry(24000000);
            geometry.rotateX(-Math.PI / 2);
            var material = new THREE.MeshBasicMaterial({ color: 0xdedab4, depthWrite: false });
            var circle = new THREE.Mesh(geometry, material);
            circle.translateY(-400);
            this.scene.add(circle);
        };

        Map.prototype.initializeCoverage = function initializeCoverage() {
            if (this.landscape) {
                this.scene.remove(this.landscape);
            }

            this.landscape = new THREE.Object3D();
            this.landscape.rotateX(-Math.PI / 2);
            this.landscape.rotateZ(Math.PI);
            this.landscape.translateY(-0.2);
            this.landscape.scale.x = -1;
            this.livecoverage = new _grid.Grid(this.landscape, null, this.minimumResolution, this.fieldChunkSize);
            this.coverage = new _grid.Grid(this.landscape, this.mappingService, this.minimumResolution, this.fieldChunkSize);
            this.livecoverage.object.scale.y = -1;
            this.coverage.object.scale.y = -1;
            this.landscape.add(this.coverage.object);
            this.landscape.add(this.livecoverage.object);
            this.scene.add(this.landscape);
        };

        Map.prototype.initializeTractor = function initializeTractor(location) {
            var _this9 = this;

            this.index = 0;
            var loader = new THREE.ObjectLoader();

            this.tractor = new THREE.Object3D();
            this.tractor.position.y = 1;
            this.tractor.position.x = location.x;
            this.tractor.position.z = -location.y;
            this.tractor.rotateY(Math.PI);
            this.tractor.rotation.y = location.heading;
            this.scene.add(this.tractor);

            loader.load('tractor.json', function (object) {
                var materialObj = new THREE.MeshBasicMaterial({
                    color: '#333333',
                    overdraw: 0.5
                });

                object.traverse(function (child) {
                    if (child instanceof THREE.Mesh) {
                        child.material = materialObj;
                    }
                });

                object.scale.set(1000, 1000, 1000);
                _this9.tractor.add(object);
            });
        };

        Map.prototype.initializeGrid = function initializeGrid(position) {
            this.gridHelper = new THREE.GridHelper(this.fieldSize, this.gridDivisions, 0xdbbe8f, 0xdbbe8f);
            this.gridHelper.position.x = position.x;
            this.gridHelper.position.z = -position.y;

            this.gridHelper.translateY(0.1);
            this.scene.add(this.gridHelper);
        };

        Map.prototype.positionGrid = function positionGrid(position) {
            var gridY = Math.floor(position.y / (this.fieldSize / this.gridDivisions));
            var gridX = Math.floor(position.x / (this.fieldSize / this.gridDivisions));

            if (this.prevGridX !== gridX || this.prevGridY !== gridY) {
                if (gridX < this.prevGridX) {
                    this.gridHelper.position.x -= this.fieldSize / this.gridDivisions;
                } else if (gridX > this.prevGridX) {
                    this.gridHelper.position.x += this.fieldSize / this.gridDivisions;
                }
                if (gridY > this.prevGridY) {
                    this.gridHelper.position.z -= this.fieldSize / this.gridDivisions;
                } else if (gridY < this.prevGridY) {
                    this.gridHelper.position.z += this.fieldSize / this.gridDivisions;
                }
                this.prevGridX = gridX;
                this.prevGridY = gridY;
            }
        };

        Map.prototype.updatePosition = function updatePosition(currentPosition) {
            var _this10 = this;

            if (!this.tractor) {
                return;
            }
            if (this.index === 0) {
                this.initializeGrid(currentPosition);
            }
            this.index++;
            this.positionGrid(currentPosition);

            if (this.coverage) {
                this.coverage.bufferRegions(currentPosition.x, currentPosition.y);
                this.livecoverage.bufferRegions(currentPosition.x, currentPosition.y);
            }

            var position = {
                x: this.tractor.position.x,
                y: this.tractor.position.y,
                z: this.tractor.position.z,
                heading: this.tractor.rotation.y
            };
            var finalPosition = {
                x: currentPosition.x,
                y: 1,
                z: -currentPosition.y,
                heading: currentPosition.heading
            };

            if (position.heading - finalPosition.heading > Math.PI) {
                finalPosition.heading += Math.PI * 2;
            }
            if (position.heading - finalPosition.heading < -1 * Math.PI) {
                finalPosition.heading -= Math.PI * 2;
            }

            if (this.tween) {
                this.tween.stop();
            }

            this.tween = new _tween2.default.Tween(position).to(finalPosition, this.tweenDelay).easing(_tween2.default.Easing.Linear.None).onUpdate(function () {
                _this10.tractor.position.set(position.x, position.y, position.z);
                _this10.tractor.rotation.y = position.heading;

                if (_this10.tractor.rotation.y >= Math.PI * 2) {
                    _this10.tractor.rotation.y -= Math.PI * 2;
                    position.heading -= Math.PI * 2;
                }
                if (_this10.tractor.rotation.y < 0) {
                    _this10.tractor.rotation.y += Math.PI * 2;
                    position.heading += Math.PI * 2;
                }

                if (!_this10.freeViewMode) {
                    _this10.tractor.updateMatrixWorld();

                    var cameraOffset = _this10.relativeCameraOffset.clone();
                    cameraOffset.applyMatrix4(_this10.tractor.matrixWorld);

                    _this10.camera.position.set(cameraOffset.x, cameraOffset.y, cameraOffset.z);
                    _this10.camera.lookAt(_this10.tractor.position);
                }
            }).start();
        };

        Map.prototype.onMapClick = function onMapClick(event) {
            var _this11 = this;

            this.mouse.x = event.offsetX / this.renderer.domElement.clientWidth * 2 - 1;
            this.mouse.y = -(event.offsetY / this.renderer.domElement.clientHeight) * 2 + 1;

            this.raycaster.setFromCamera(this.mouse, this.camera);

            var intersects = this.raycaster.intersectObjects(this.landscape.children, true);
            if (intersects.length > 0) {
                var intersect = intersects[0];
                var intersectPosX = Math.floor(intersect.point.x);
                var intersectPosY = Math.floor(-intersect.point.z);

                this.mappingService.getClosestError(intersectPosX, intersectPosY).then(function (error) {
                    if (error) {
                        if (_this11.sprayNozzleErrorMarker) {
                            _this11.landscape.remove(_this11.sprayNozzleErrorMarker.object);
                            toastr.clear();
                        }
                        if (_this11.systemErrorMarker) {
                            _this11.landscape.remove(_this11.systemErrorMarker.object);
                            toastr.clear();
                        }

                        var sprayNozzleError = error.sprayNozzleError;
                        var systemError = error.systemError;

                        if (sprayNozzleError) {
                            var key = 'nozzleErrorCodes.' + sprayNozzleError.errorCode;
                            var sprayNozzleErrorDescription = _this11.i18n.tr(key);
                            toastr.warning('ErrorCode: ' + sprayNozzleError.errorCode + '<br>' + 'Description:' + sprayNozzleErrorDescription + '<br>' + 'Position:' + sprayNozzleError.position.x + ' ' + sprayNozzleError.position.y + '<br>' + 'ErrorType: ' + sprayNozzleError.errorType + '<br>', 'SprayNozzleError', {
                                positionClass: 'toast-top-center',
                                timeOut: 5000,
                                extendedTimeOut: 3000
                            });
                            _this11.sprayNozzleErrorMarker = new _marker.Marker(_this11.landscape, 0xf4ab43);
                            _this11.sprayNozzleErrorMarker.object.translateX(sprayNozzleError.position.x);
                            _this11.sprayNozzleErrorMarker.object.translateZ(sprayNozzleError.position.y);
                        }

                        if (systemError) {
                            var systemErrorDescription = systemError.description;
                            toastr.error('ErrorCode: ' + systemError.errorCode + '<br>' + 'Description:' + systemErrorDescription + '<br>' + 'Position:' + systemError.position.x + ' ' + systemError.position.y + '<br>' + 'ErrorType: ' + systemError.errorType + '<br>', 'SystemError', {
                                positionClass: 'toast-top-right',
                                timeOut: 5000,
                                extendedTimeOut: 3000
                            });
                            _this11.systemErrorMarker = new _marker.Marker(_this11.landscape, 0xe46050);
                            _this11.systemErrorMarker.object.translateX(systemError.position.x);
                            _this11.systemErrorMarker.object.translateZ(systemError.position.y);
                        }
                    }
                });
            }
        };

        Map.prototype.animate = function animate() {
            if (this._isDetached) {
                return;
            }
            if (this.zoomLevel !== this.camera.position.y) {
                this.zoomLevel = this.camera.position.y;
                if (this.freeViewMode && this.coverage) {
                    this.coverage.updateZoomLevel(this.zoomLevel, this.camera.position.x, this.camera.position.z);
                }
            }

            this.animationFrameRequestId = window.requestAnimationFrame(this.animate.bind(this));
            _tween2.default.update();

            if (this.freeViewMode) {
                this.controls.update();
            }

            this.updateViewport();
            this.render();
        };

        Map.prototype.cancelAnimate = function cancelAnimate() {
            if (this.animationFrameRequestId) {
                window.cancelAnimationFrame(this.animationFrameRequestId);
                this.animationFrameRequestId = null;
            }
        };

        Map.prototype.render = function render() {
            this.raycaster.setFromCamera(this.mouse, this.camera);
            this.renderer.render(this.scene, this.camera);
        };

        Map.prototype.updateViewport = function updateViewport() {
            if (this.map === null) {
                throw new Error('map must be defined');
            }
            var viewportWidth = this.map.clientWidth;
            var viewportHeight = this.map.clientHeight;

            if (viewportHeight < 300) {
                this.showGroupOne = false;
            } else {
                this.showGroupOne = true;
            }

            if (viewportHeight < 150) {
                this.showGroupTwo = false;
            } else {
                this.showGroupTwo = true;
            }

            if (viewportWidth !== this.lastViewportWidth || viewportHeight !== this.lastViewportHeight) {
                this.renderer.setSize(viewportWidth, viewportHeight);
                this.lastViewportHeight = viewportHeight;
                this.lastViewportWidth = viewportWidth;
                this.camera.aspect = viewportWidth / viewportHeight;
                this.camera.updateProjectionMatrix();
            }
        };

        Map.prototype.receiveBoundaryMap = function receiveBoundaryMap(map) {
            this.boundaryMap = map;
            this.renderBoundaryMap(map);
        };

        Map.prototype.receivePrescriptionMap = function receivePrescriptionMap(map) {
            this.renderPrescriptionMap(map);
        };

        Map.prototype.renderBoundaryMap = function renderBoundaryMap(boundaryMap) {
            var _this12 = this;

            var regions = boundaryMap.regions;
            var activeBoundary = -1;
            var paths = boundaryMap.paths;
            paths.forEach(function (path, index) {
                if (path === _this12.boundaryMapService.activeBoundary) {
                    activeBoundary = index;
                }
            });
            this.parent.selectedBoundaryMaps = boundaryMap.paths;
            this.boundary.forEach(function (shape) {
                _this12.scene.remove(shape);
            });
            this.boundary = [];

            if (regions) {
                regions.forEach(function (region, index) {
                    if (activeBoundary === index) {
                        _this12.renderBoundary(region.boundary, _this12.boundary, 0x14f200);
                    } else if (region.sprayType === 1) {
                        _this12.renderBoundary(region.boundary, _this12.boundary, 0x97b0c9);
                    } else {
                        _this12.renderBoundary(region.boundary, _this12.boundary, 0x000000);
                    }

                    region.holes.forEach(function (hole) {
                        _this12.renderBoundary(hole, _this12.boundary, 0x666666);
                    });
                });
                this.previewShapes.forEach(function (mesh) {
                    _this12.scene.remove(mesh);
                });
                this.previewShapes = [];
                if (this.showPreview) {
                    regions.forEach(function (region, index) {
                        if (region.sprayType === 0) {
                            _this12.renderPreview(region.boundary, 0x0fd93e, .7, 900);
                        } else if (region.sprayType === 1) {
                            _this12.renderPreview(region.boundary, 0x8f8e8c, .9, 950);
                        } else {
                            _this12.renderPreview(region.boundary, 0x0fd93e, 1, 975);
                        }
                    });
                }
            }
        };

        Map.prototype.renderPrescriptionMap = function renderPrescriptionMap(prescription) {
            var _this13 = this;

            this.prescription.forEach(function (shape) {
                _this13.scene.remove(shape);
            });
            this.prescription = [];

            if (prescription) {
                this.parent.selectedPrescriptionMap = prescription.path;
                var max = 0;

                prescription.regions.forEach(function (region) {
                    max = Math.max(max, region.value);
                });
                prescription.regions.forEach(function (region) {
                    _this13.renderBoundary(region.boundary, _this13.prescription, 0x998844);
                    _this13.renderShape(region.boundary, region.holes, _this13.prescription, 0x998844, region.value / (2 * max));
                    region.holes.forEach(function (hole) {
                        _this13.renderBoundary(hole, _this13.prescription, 0xcccccc);
                    });
                });
            }
        };

        Map.prototype.renderBoundary = function renderBoundary(sprayPath, collection, color) {
            var _this14 = this;

            var vectors = [];
            sprayPath.coordinates.forEach(function (p) {
                vectors.push(new THREE.Vector3(p.x, p.y, _this14.boundaryHeight));
            });
            var geometry = new THREE.BufferGeometry().setFromPoints(vectors);
            var material = new THREE.LineBasicMaterial({ color: color, linewidth: 2 });
            var line = new THREE.Line(geometry, material);
            line.rotateX(-Math.PI / 2);
            this.scene.add(line);
            collection.push(line);
        };

        Map.prototype.renderPreview = function renderPreview(boundary, color, alpha, height) {
            var vectors = [];
            var coordinates = boundary.coordinates;
            coordinates.forEach(function (p) {
                vectors.push(new THREE.Vector3(p.x, p.y));
            });
            var shape = new THREE.Shape();
            shape.moveTo(coordinates[0].x, coordinates[0].y);
            for (var i = 1; i < coordinates.length; i++) {
                shape.lineTo(coordinates[i].x, coordinates[i].y);
            }

            var geometry = new THREE.ShapeGeometry(shape);
            var material = new THREE.MeshBasicMaterial({ color: color, opacity: alpha, transparent: true, depthWrite: false });
            var mesh = new THREE.Mesh(geometry, material);

            mesh.rotateX(-Math.PI / 2);
            mesh.translateZ(height);
            this.previewShapes.push(mesh);
            this.scene.add(mesh);
        };

        Map.prototype.renderShape = function renderShape(boundary, holes, collection, color, alpha) {
            var vectors = [];
            var coordinates = boundary.coordinates;
            coordinates.forEach(function (p) {
                vectors.push(new THREE.Vector2(p.x, p.y));
            });
            var shape = new THREE.Shape();
            shape.moveTo(coordinates[0].x, coordinates[0].y);
            for (var i = 1; i < coordinates.length; i++) {
                shape.lineTo(coordinates[i].x, coordinates[i].y);
            }

            if (holes) {
                holes.forEach(function (h) {
                    var hole = new THREE.Path();
                    hole.moveTo(h.coordinates[0].x, h.coordinates[0].y);
                    for (var _i = 1; _i < h.coordinates.length; _i++) {
                        hole.lineTo(h.coordinates[_i].x, h.coordinates[_i].y);
                    }
                    shape.holes.push(hole);
                });
            }

            var geometry = new THREE.ShapeGeometry(shape);
            var material = new THREE.MeshBasicMaterial({ color: color, opacity: alpha, transparent: true, depthWrite: false });
            var mesh = new THREE.Mesh(geometry, material);

            mesh.rotateX(-Math.PI / 2);
            mesh.translateZ(this.prescriptionHeight);
            collection.push(mesh);
            this.scene.add(mesh);
        };

        Map.prototype.toggleRx = function toggleRx() {
            var _this15 = this;

            if (this.hideRx) {
                this.prescription.forEach(function (shape) {
                    _this15.scene.remove(shape);
                });
            } else {
                this.prescription.forEach(function (shape) {
                    _this15.scene.add(shape);
                });
            }
        };

        Map.prototype.toggleBoundary = function toggleBoundary() {
            this.mappingService.ignoreBoundary(this.ignoreBoundary);
        };

        Map.prototype.resetCoverage = function resetCoverage() {
            location.reload();
        };

        _createClass(Map, [{
            key: 'systemAlarms',
            get: function get() {
                var status = this.state.hubAlarms;
                if (status) {
                    return this.state.hubAlarms;
                }
                return ['No Alarms'];
            }
        }, {
            key: 'showingMapPreview',
            get: function get() {
                this.showPreview = this.mapViewState.showPreview;
                if (this.boundaryMap) {
                    this.renderBoundaryMap(this.boundaryMap);
                }
                return '';
            }
        }, {
            key: 'setZoom',
            get: function get() {
                if (this.mapViewState.getViewMode() === this.mapViewState.chase) {
                    this.chaseView();
                } else {
                    this.overheadView();
                }
                return '';
            }
        }, {
            key: 'activeAlarms',
            get: function get() {
                var newAlarms = [];
                if (this.state.hubCoreBits !== undefined) {
                    var errorTags = [this.state.hubCoreBits, this.state.hubCommBits, this.state.hubSubnetBits, this.state.hubSectBits, this.state.sensBits, this.state.processBits];
                    var keys = ['hubCore.', 'hubComm.', 'hubSubnet.', 'hubSect.', 'sens.', 'process.'];
                    for (var i = 0; i < errorTags.length; i++) {
                        var key = keys[i];
                        for (var k = 0; k < 32; k++) {
                            var bit = errorTags[i] >> k & 1;
                            if (bit === 1) {
                                newAlarms.push(this.i18n.tr('alarmCodes.' + key + k));
                            }
                        }
                    }
                }
                this.activeAlarmStrings = newAlarms;
                if (newAlarms.length > 0) {
                    return 'btn-visible';
                }
                return 'btn-hidden';
            }
        }]);

        return Map;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'state', [_dec2], {
        enumerable: true,
        initializer: function initializer() {
            return {};
        }
    }), _applyDecoratedDescriptor(_class2.prototype, 'systemAlarms', [_dec3], Object.getOwnPropertyDescriptor(_class2.prototype, 'systemAlarms'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'showingMapPreview', [_dec4], Object.getOwnPropertyDescriptor(_class2.prototype, 'showingMapPreview'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'setZoom', [_dec5], Object.getOwnPropertyDescriptor(_class2.prototype, 'setZoom'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'activeAlarms', [_dec6], Object.getOwnPropertyDescriptor(_class2.prototype, 'activeAlarms'), _class2.prototype)), _class2)) || _class);
});
define('text!views/map/map.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/number-format\"></require>\n    <require from=\"resources/value-converters/mmPerSecondToMph\"></require>\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\n    <require from=\"resources/value-converters/mlPerHectareToGpa\"></require>\n    <require from=\"resources/value-converters/radiansToDegrees\"></require>\n    <require from=\"resources/value-converters/dutyCycle\"></require>\n    <require from=\"views/dashboard/system-status\"></require>\n    <require from=\"views/dashboard/gauge\"></require>\n    <require from=\"views/dashboard/gauge-display\"></require>\n\n\n    <div class=\"${showingMapPreview}\" id=\"map\" element.ref=\"map\" style=\"border: 1px solid green; height: 100%\">\n        <gauge-display  if.bind=\"showGroupTwo\" isCloud.bind=\"isCloud\">\n\n        </gauge-display>\n        <div if.bind=\"showGroupOne\" horizontal layout class=\"color-bar\" click.trigger=\"changeColorKey()\">\n            <div class=\"color-box\" style=\"background-color: ${activeColors[0]}\">${activeLabels[0]}</div>\n            <div class=\"color-box\" style=\"background-color: ${activeColors[1]}\">${activeLabels[1]}</div>\n            <div class=\"color-box\" style=\"background-color: ${activeColors[2]}\">${activeLabels[2]}</div>\n            <div class=\"color-box\" style=\"background-color: ${activeColors[3]}\">${activeLabels[3]}</div>\n            <div class=\"color-box\" style=\"background-color: ${activeColors[4]}\">${activeLabels[4]}</div>\n        </div>\n        <div if.bind=\"showGroupOne\" class=\"lower-right-map\">\n            <div>\n                <button class=\"map-zoom ${setZoom}\" click.delegate=\"zoomUpdated(true)\">+</button>\n            </div>\n            <div>\n                <button class=\"map-zoom\" click.delegate=\"zoomUpdated(false)\">-</button>\n            </div>\n            <div class=\"${activeAlarms}\">\n                <div class=\"alarm-banner\" style=\"overflow: hidden;\" click.delegate=\"alarmsTapped()\">\n                    <img src=\"../../assets/ios-alert-outline.svg\" width=\"22\" style=\"padding-bottom: 3px;\" />\n                    <label style=\"padding: 4px;\">Active Alarms</label>\n                </div>\n            </div>\n        </div>\n\n        <div class=\"stats\" element.ref=\"statsElement\"></div>\n        <div class=\"leftPanel\" style=\"margin-bottom:40px\">\n            <div if.bind=\"prescription.length > 0\">\n                <input id=\"hide-rx\" type=\"checkbox\" checked.bind=\"hideRx\" change.delegate=\"toggleRx()\" />\n                <label for=\"hide-rx\">${\"Hide Rx\" | t}</label><br />\n            </div>\n            <!--<div if.bind=\"boundary.length > 0\">\n                <input id=\"ignore-boundary\" type=\"checkbox\" checked.bind=\"ignoreBoundary\" change.delegate=\"toggleBoundary()\" />\n                <label for=\"ignore-boundary\">${\"Ignore Boundary\" | t}</label><br />\n            </div>-->\n        </div>\n    </div>\n        \n</template>\n"; });
var cov_1mdm67hanb = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/map/map-view-state.js',
        hash = 'e6179f855fe06092bfae7ef0df383e6db9dcfb0b',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/map/map-view-state.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/map/map-view-state',['exports'], function (exports) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var MapViewState = exports.MapViewState = function () {
        function MapViewState() {
            _classCallCheck(this, MapViewState);

            this.viewMode = 'chase';
            this.chase = 'chase';
            this.overhead = 'overhead';
            this.toolbarVisible = false;
            this.graphVisible = true;
            this.graphWasVisible = true;
            this.showPreview = false;
        }

        MapViewState.prototype.toggleGraph = function toggleGraph() {
            this.graphVisible = !this.graphVisible;
            this.toolbarVisible = false;
        };

        MapViewState.prototype.toggleToolbar = function toggleToolbar() {
            if (!this.toolbarVisible) {
                this.graphWasVisible = this.graphVisible;
                this.graphVisible = false;
            } else {
                this.graphVisible = this.graphWasVisible;
            }
            this.toolbarVisible = !this.toolbarVisible;
        };

        MapViewState.prototype.setViewMode = function setViewMode(mode) {
            this.viewMode = mode;
        };

        MapViewState.prototype.getViewMode = function getViewMode() {
            return this.viewMode;
        };

        return MapViewState;
    }();
});
var cov_1j5kaptt6m = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/map/grid.js',
        hash = '4bd0fffe04d2b83dfda589e5376093f1ffd2fb29',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/map/grid.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/map/grid',['exports', 'three', './region'], function (exports, _three, _region) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Grid = undefined;

    var THREE = _interopRequireWildcard(_three);

    function _interopRequireWildcard(obj) {
        if (obj && obj.__esModule) {
            return obj;
        } else {
            var newObj = {};

            if (obj != null) {
                for (var key in obj) {
                    if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
            }

            newObj.default = obj;
            return newObj;
        }
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var Grid = exports.Grid = function () {
        function Grid(container, mappingService, minimumResolution) {
            var regionDensity = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 64000;
            var xLayers = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
            var yLayers = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;

            _classCallCheck(this, Grid);

            this.regions = [];
            this.regionDensity = 64000;
            this.freeViewMode = false;
            this.gridLayers = 3;
            this.object = new THREE.Object3D();
            this.debug = false;
            this.minimumResolution = 500;
            this.bufferFactor = 8;

            this.xLayers = xLayers;
            this.yLayers = yLayers;

            container.add(this.object);
            this.mappingService = mappingService;
            this.minimumResolution = minimumResolution;
            this.regionDensity = regionDensity;
        }

        Grid.prototype.enableFreeViewMode = function enableFreeViewMode(zoom, x, y) {
            this.freeViewMode = true;
            this.initializeFreeViewRegions(zoom, x, y);
        };

        Grid.prototype.disableFreeViewMode = function disableFreeViewMode() {
            var _this = this;

            this.freeViewMode = false;
            this.regions.forEach(function (r) {
                _this.object.remove(r.mesh);
                if (_this.debug) {
                    _this.object.remove(r.line);
                }
            });
            this.regions = [];
            this.prevX = null;
        };

        Grid.prototype.updateZoomLevel = function updateZoomLevel(zoom, x, y) {
            if (this.freeViewMode) {
                var regionSize = this.getFreeViewRegionSize(zoom);
                if (regionSize !== this.regions[0].size) {
                    this.initializeFreeViewRegions(zoom, x, y);
                }
            }
        };

        Grid.prototype.bufferRegions = function bufferRegions(x, y) {
            var _this2 = this;

            var regionX = Math.floor(x / this.regionDensity);
            var regionY = Math.floor(y / this.regionDensity);

            if (this.prevX !== regionX || this.prevY !== regionY) {
                var currentRegions = [];
                for (var i = 0; i <= this.xLayers; i++) {
                    var di = i > 0 ? -this.bufferFactor : this.bufferFactor;
                    for (var j = 0; j <= this.yLayers; j++) {
                        var dj = j > 0 ? -this.bufferFactor : this.bufferFactor;
                        for (var ii = this.bufferFactor; ii >= di; ii -= 1) {
                            var _loop = function _loop(jj) {
                                var regionLocation = { x: regionX + i * ii, y: regionY + j * jj };
                                currentRegions.push(regionLocation);

                                var existingRegion = _this2.regions.find(function (r) {
                                    return r.regionX === regionLocation.x && r.regionY === regionLocation.y;
                                });
                                if (!existingRegion) {
                                    var region = new _region.Region(_this2.object, regionLocation.x, regionLocation.y, _this2.regionDensity, _this2.minimumResolution, _this2.mappingService, _this2.debug);
                                    _this2.regions.push(region);
                                }
                            };

                            for (var jj = this.bufferFactor; jj >= dj; jj -= 1) {
                                _loop(jj);
                            }
                        }
                    }
                }

                var oldRegions = this.regions.filter(function (r) {
                    return !currentRegions.some(function (c) {
                        return c.x === r.regionX && c.y === r.regionY;
                    });
                });
                oldRegions.forEach(function (r) {
                    _this2.object.remove(r.mesh);
                    _this2.object.remove(r.errorMesh);
                    if (_this2.debug) {
                        _this2.object.remove(r.line);
                        _this2.object.remove(r.text);
                    }
                    var index = _this2.regions.indexOf(r);
                    _this2.regions.splice(index, 1);
                });
            }

            this.prevX = regionX;
            this.prevY = regionY;
            this.prevMode = this.viewMode;
        };

        Grid.prototype.loadCoverageFromCenterPoint = function loadCoverageFromCenterPoint(centerX, centerY) {
            var _this3 = this;

            var xstart = Math.ceil(this.xLayers / 2);
            var ystart = Math.ceil(this.yLayers / 2);

            var regionX = Math.floor(centerX / this.regionDensity);
            var regionY = Math.floor(centerY / this.regionDensity);

            for (var i = -xstart; i <= xstart; i++) {
                var _loop2 = function _loop2(j) {
                    var regionLocation = { x: regionX + i, y: regionY + j };

                    var existingRegion = _this3.regions.find(function (r) {
                        return r.regionX === regionLocation.x && r.regionY === regionLocation.y;
                    });
                    if (!existingRegion) {
                        var region = new _region.Region(_this3.object, regionLocation.x, regionLocation.y, _this3.regionDensity, _this3.minimumResolution, _this3.mappingService, _this3.debug);
                        _this3.regions.push(region);
                    }
                };

                for (var j = -ystart; j <= ystart; j++) {
                    _loop2(j);
                }
            }
        };

        Grid.prototype.loadRegion = function loadRegion(x, y) {
            var regionX = Math.floor(x / this.regionDensity);
            var regionY = Math.floor(y / this.regionDensity);
            var region = new _region.Region(this.object, regionX, regionY, this.regionDensity, this.minimumResolution, this.mappingService, this.debug);
            this.regions.push(region);
        };

        Grid.prototype.toggleErrors = function toggleErrors() {
            this.regions.forEach(function (region) {
                region.toggleErrorLayer();
            });
        };

        Grid.prototype.addLiveData = function addLiveData(coordinates, keyIsSprayedValues) {
            var _this4 = this;

            coordinates.forEach(function (c) {
                var region = _this4.getRegion(c.x, c.y);

                if (region) {
                    region.addLiveData(c, keyIsSprayedValues);
                }
            });
        };

        Grid.prototype.addLiveErrorData = function addLiveErrorData(error) {
            var region = this.getRegion(error.position.x, error.position.y);

            if (region) {
                var isSprayNozzleError = !error.errorType || error.errorType === 0;

                if (isSprayNozzleError) {
                    region.addNozzleErrorData(error);
                } else {
                    var r = this.getRegion(error.position.x, error.position.y);
                    r.addSystemErrorData(error);
                }
            }
        };

        Grid.prototype.getRegion = function getRegion(x, y) {
            var regionSize = this.regionDensity;
            if (this.freeViewMode) {
                regionSize = this.regions[0].size;
            }
            var regionX = Math.floor(x / regionSize);
            var regionY = Math.floor(y / regionSize);
            return this.regions.find(function (r) {
                return r.regionX === regionX && r.regionY === regionY;
            });
        };

        return Grid;
    }();
});
var cov_182v1l5fx6 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/map/color-picker.js',
        hash = '2d0fc91d6c7b78032d8b64c3576c36bdb6f8f03b',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/map/color-picker.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/map/color-picker',['exports', 'three', '../../resources/value-converters/mlPerHectareToGpa'], function (exports, _three, _mlPerHectareToGpa) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.ColorPicker = undefined;

    var THREE = _interopRequireWildcard(_three);

    function _interopRequireWildcard(obj) {
        if (obj && obj.__esModule) {
            return obj;
        } else {
            var newObj = {};

            if (obj != null) {
                for (var key in obj) {
                    if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
            }

            newObj.default = obj;
            return newObj;
        }
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var ColorPicker = exports.ColorPicker = function () {
        function ColorPicker() {
            _classCallCheck(this, ColorPicker);

            this.Dirt = new THREE.Color(0xdedab4);
            this.RegionDebug = new THREE.Color(0xff3333);
            this.percentColors = ['#00A0FF', '#068D77', '#53ae47', '#FAC910', '#F7742D'];
            this.sprayedColors = ['#98ed8c', '#71d164', '#53ae47', '#38942c', '#15590c'];
            this.converter = new _mlPerHectareToGpa.MlPerHectareToGpaValueConverter();
        }

        ColorPicker.prototype.getColorFromState = function getColorFromState(state) {
            switch (state) {
                case 101:
                    return new THREE.Color(0xff7f27);
                case 110:
                    return new THREE.Color(0x7092be);
                case 200:
                    return new THREE.Color(0xff0000);
                default:
                    return new THREE.Color(0x53ae47);
            }
        };

        ColorPicker.prototype.getMappingColor = function getMappingColor(percentOfTarget, target, keyIsSprayedValues) {
            if (keyIsSprayedValues) {
                return this.getColorFromSprayValue(percentOfTarget, target);
            }
            return this.getColorFromSprayPercent(percentOfTarget);
        };

        ColorPicker.prototype.getColorFromSprayPercent = function getColorFromSprayPercent(percentOfTarget) {
            if (percentOfTarget <= 70) {
                return new THREE.Color(this.percentColors[0]);
            } else if (percentOfTarget <= 95) {
                return new THREE.Color(this.percentColors[1]);
            } else if (percentOfTarget <= 105) {
                return new THREE.Color(this.percentColors[2]);
            } else if (percentOfTarget <= 160) {
                return new THREE.Color(this.percentColors[3]);
            }
            return new THREE.Color(this.percentColors[4]);
        };

        ColorPicker.prototype.getColorFromSprayValue = function getColorFromSprayValue(percentOfTarget, target) {
            var sprayed = this.converter.toView(target) * percentOfTarget / 100;
            if (sprayed <= 5) {
                return new THREE.Color(this.sprayedColors[0]);
            } else if (sprayed <= 10) {
                return new THREE.Color(this.sprayedColors[1]);
            } else if (sprayed <= 15) {
                return new THREE.Color(this.sprayedColors[2]);
            } else if (sprayed <= 20) {
                return new THREE.Color(this.sprayedColors[3]);
            }
            return new THREE.Color(this.sprayedColors[4]);
        };

        ColorPicker.prototype.getColorFromNozzleErrorCode = function getColorFromNozzleErrorCode(errorCode) {
            if (errorCode >= 10) {
                return new THREE.Color(0x22ffff);
            } else if (errorCode >= 5) {
                return new THREE.Color(0xaa5566);
            }
            return new THREE.Color(0xff0033);
        };

        ColorPicker.prototype.getColorFromErrorType = function getColorFromErrorType(errorType) {
            switch (errorType) {
                case 1:
                    return new THREE.Color(0x22ffff);
                case 2:
                    return new THREE.Color(0xaa5566);
                case 3:
                    return new THREE.Color(0xac55ee);
                default:
                    return new THREE.Color(0xaa5ddd);
            }
        };

        ColorPicker.prototype.getAlphaFromState = function getAlphaFromState(state) {
            switch (state) {
                case 100:
                case 101:
                    return 0.5;
                case 200:
                    return 1;
                default:
                    return 0;
            }
        };

        return ColorPicker;
    }();
});
var cov_2h33ey8f20 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/gateway-state-base.js',
        hash = '916a184b75ddee90722ead746375abb216e018cc',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/gateway-state-base.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/gateway-state-base',['exports', 'aurelia-framework', 'numeral', 'aurelia-i18n', '../services/gateway-service', '../components/shared/bootstrap-form-renderer', 'aurelia-validation', 'ramda'], function (exports, _aureliaFramework, _numeral, _aureliaI18n, _gatewayService, _bootstrapFormRenderer, _aureliaValidation, _ramda) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.GatewayStateBase = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    var R = _interopRequireWildcard(_ramda);

    function _interopRequireWildcard(obj) {
        if (obj && obj.__esModule) {
            return obj;
        } else {
            var newObj = {};

            if (obj != null) {
                for (var key in obj) {
                    if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
            }

            newObj.default = obj;
            return newObj;
        }
    }

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _class, _desc, _value, _class2, _descriptor;

    var GatewayStateBase = exports.GatewayStateBase = (_dec = (0, _aureliaFramework.inject)(_gatewayService.GatewayService, _aureliaI18n.I18N, _aureliaFramework.NewInstance.of(_aureliaValidation.ValidationController), _aureliaFramework.BindingEngine), _dec2 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec(_class = (_class2 = function () {
        function GatewayStateBase(gatewayService, i18N, controller, bindingEngine) {
            _classCallCheck(this, GatewayStateBase);

            this.editDelta = {};
            this._needsSync = [];

            _initDefineProp(this, 'state', _descriptor, this);

            this.editDelta = {};
            this.autoSyncProperties = [];
            this.subscribeProperties = [];
            this.subscriptions = [];

            this.i18n = i18N;
            this.gatewayService = gatewayService;
            this.getGatewayServiceState();

            this.bindingEngine = bindingEngine;

            this.controller = controller;
            this.controller.addRenderer(new _bootstrapFormRenderer.BootstrapFormRenderer());
            this.controller.validateTrigger = _aureliaValidation.validateTrigger.changeOrBlur;
            this.customRulesInit();
        }

        GatewayStateBase.prototype.setUpSubscriptions = function setUpSubscriptions(properties) {
            var _this = this;

            this.autoSyncProperties = properties;
            this.gatewayService.subscribe(properties, 'gateway-state-base [auto-sync]');
            properties.forEach(function (prop) {
                var p = _this.lowerCaseFirstLetter(prop);
                var propFunc = R.partialRight(_this.setDelta, [p]).bind(_this);

                var subscription = _this.bindingEngine.propertyObserver(_this.state, p).subscribe(function (newValue, oldValue) {
                    var delta = propFunc(newValue, oldValue);
                    if (delta) {
                        _this.sendDeltaToGateway(delta);
                        _this._needsSync = [];
                    }
                });
                _this.subscriptions.push(subscription);
            });
        };

        GatewayStateBase.prototype.subscribe = function subscribe(properties) {
            this.subscribedProperties = properties;
            this.gatewayService.subscribe(properties, 'gateway-state-base');
        };

        GatewayStateBase.prototype.lowerCaseFirstLetter = function lowerCaseFirstLetter(string) {
            return string.charAt(0).toLowerCase() + string.slice(1);
        };

        GatewayStateBase.prototype.bind = function bind() {};

        GatewayStateBase.prototype.activate = function activate() {
            this.getGatewayServiceState();
        };

        GatewayStateBase.prototype.attached = function attached() {};

        GatewayStateBase.prototype.detached = function detached() {
            this.subscriptions.forEach(function (subscription) {
                subscription.dispose();
            });
        };

        GatewayStateBase.prototype.unbind = function unbind() {
            this.gatewayService.unsubscribe(this.autoSyncProperties, 'gateway-state-base [auto-sync]');
            this.gatewayService.unsubscribe(this.subscribeProperties, 'gateway-state-base');
        };

        GatewayStateBase.prototype.customRulesInit = function customRulesInit() {
            _aureliaValidation.ValidationRules.customRule('numberRange', function (value, obj, min, max, displayMin, displayMax) {
                return value === null || value === undefined || value >= min && value <= max;
            }, '${$displayName} must be a number between ${$config.displayMin} and ${$config.displayMax}.', function (min, max, converter, format) {
                if (converter) {
                    min = converter(min);
                    max = converter(max);
                }
                if (!format) {
                    format = '0';
                }
                var displayMin = (0, _numeral2.default)(min).format(format);
                var displayMax = (0, _numeral2.default)(max).format(format);

                return { min: min, max: max, displayMin: displayMin, displayMax: displayMax };
            });
        };

        GatewayStateBase.prototype.send = function send() {
            var _this2 = this;

            this.controller.validate().then(function (result) {
                if (result.valid) {
                    _this2.gatewayService.send(_this2.editDelta);

                    _this2.editDelta = {};
                }
            });
        };

        GatewayStateBase.prototype.sendDeltaToGateway = function sendDeltaToGateway(editDelta) {
            var _this3 = this;

            var propName = Object.keys(editDelta)[0];
            this.controller.validate({ object: this.state, propertyName: propName }).then(function (result) {
                if (isNaN(editDelta[propName])) {
                    throw new Error('Cant Send value that is' + NaN);
                }
                if (result.valid) {
                    _this3.gatewayService.send(editDelta);
                }
            });
        };

        GatewayStateBase.prototype.getGatewayServiceState = function getGatewayServiceState() {
            this.state = this.gatewayService.getState();
        };

        GatewayStateBase.prototype.sendChange = function sendChange(val, prop) {
            this.editDelta[prop] = val;
            this.send();
        };

        GatewayStateBase.prototype.setDelta = function setDelta(newValue, oldValue, prop) {
            if (this._needsSync.includes(prop)) {
                var editDelta = {};
                editDelta[prop] = newValue;
                return editDelta;
            }
            return null;
        };

        GatewayStateBase.prototype.toggleByte = function toggleByte(value) {
            if (value === 0) {
                return 1;
            }
            return 0;
        };

        GatewayStateBase.prototype.getTypes = function getTypes(typeKey) {
            var i = 0;
            var types = [];
            var rateTypesKey = typeKey + '.';
            var rateType = '';
            while (!rateType.includes(rateTypesKey)) {
                rateType = this.i18n.tr(rateTypesKey + i);
                var end = rateType.includes(rateTypesKey);
                if (!end) {
                    types.push({ index: i, label: rateType });
                }
                i++;
            }
            return types;
        };

        return GatewayStateBase;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'state', [_dec2], {
        enumerable: true,
        initializer: function initializer() {
            return {};
        }
    })), _class2)) || _class);
});
var cov_195cyjupoo = function () {
  var path = "/opt/atlassian/pipelines/agent/build/Web/src/views/forgot-password/forgot-password.js",
      hash = "3c08d22e066b4a9e94232b5d0a3232089ca674a8",
      global = new Function('return this')(),
      gcv = "__coverage__",
      coverageData = {
    path: "/opt/atlassian/pipelines/agent/build/Web/src/views/forgot-password/forgot-password.js",
    statementMap: {
      "0": {
        start: {
          line: 9,
          column: 8
        },
        end: {
          line: 9,
          column: 110
        }
      }
    },
    fnMap: {
      "0": {
        name: "(anonymous_0)",
        decl: {
          start: {
            line: 8,
            column: 4
          },
          end: {
            line: 8,
            column: 5
          }
        },
        loc: {
          start: {
            line: 8,
            column: 18
          },
          end: {
            line: 10,
            column: 5
          }
        },
        line: 8
      }
    },
    branchMap: {},
    s: {
      "0": 0
    },
    f: {
      "0": 0
    },
    b: {},
    _coverageSchema: "332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('views/forgot-password/forgot-password',["exports"], function (exports) {
  "use strict";

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  var ForgotPassword = exports.ForgotPassword = function ForgotPassword() {
    _classCallCheck(this, ForgotPassword);

    cov_195cyjupoo.f[0]++;
    cov_195cyjupoo.s[0]++;

    this.message = "Please don't forget your password because this feature has not been implemented yet.";
  };
});
define('text!views/forgot-password/forgot-password.html', ['module'], function(module) { module.exports = "<template>\n    <div>\n        ${message | t}\n    </div>\n</template>\n"; });
var cov_8narh19h = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/filetransfer/filetransfer.js',
        hash = 'bea52219a97f8c3d0eb4d6cf1b8b80aafedbe824',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/filetransfer/filetransfer.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/filetransfer/filetransfer',['exports', 'aurelia-framework', '../../services/file-service', '../../services/gateway-service'], function (exports, _aureliaFramework, _fileService, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Filetransfer = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    var _dec, _dec2, _class, _desc, _value, _class2;

    var Filetransfer = exports.Filetransfer = (_dec = (0, _aureliaFramework.inject)(_fileService.FileService, _gatewayService.GatewayService), _dec2 = (0, _aureliaFramework.computedFrom)('fileService.directionToSystem'), _dec(_class = (_class2 = function () {
        function Filetransfer(fileService, gatewayService) {
            _classCallCheck(this, Filetransfer);

            this.fileService = fileService;
            this.gatewayService = gatewayService;
            this.getSystemFiles();
            this.checkUsb();
            setInterval(this.checkUsb.bind(this), 5000);
        }

        Filetransfer.prototype.attached = function attached() {
            this.state = this.gatewayService.getState();
            this.names = this.state.presetNames;
            for (var i = 0; i < this.names.length; i++) {
                var n = this.names[i];
                if (n !== 'Undefined') {
                    this.fileService.updatePresets(this.names[i] + '.cfg', i);
                }
            }
        };

        Filetransfer.prototype.checkUsb = function checkUsb() {
            var _this = this;

            this.fileService.usbAvailable().then(function (response) {
                if (_this.usbAvailable !== response) {
                    if (response) {
                        _this.fileService.getUsbFiles().then(function (result) {
                            _this.fileService.rootUsbFolder = result.path;
                            _this.fileService.usbDevice = result.device;
                            _this.usbFiles = result;
                            _this.fileService.selectFolder(result);
                        });
                    } else {
                        _this.usbFiles = [];
                    }
                }
                _this.usbAvailable = response;
            });
            if (this.fileService.filesChanged) {
                this.getSystemFiles();
                this.fileService.filesChanged = false;
            }
        };

        Filetransfer.prototype.getSystemFiles = function getSystemFiles() {
            var _this2 = this;

            this.fileService.getSystemFiles().then(function (response) {
                _this2.fileService.rootSystemFolder = response.path;
                _this2.fileService.systemDevice = response.device;
                _this2.systemFiles = response;
                _this2.fileService.selectFolder(response);
            });
        };

        Filetransfer.prototype.transferToSystem = function transferToSystem() {
            if (this.fileService.directionToSystem === true) {
                this.fileService.transferToSystem();
            } else {
                this.fileService.transferToUsb();
            }
        };

        Filetransfer.prototype.transferToUsb = function transferToUsb() {
            this.fileService.transferToUsb();
        };

        _createClass(Filetransfer, [{
            key: 'currentTransferDirection',
            get: function get() {
                if (this.fileService.directionToSystem === true) {
                    return '<<';
                }
                return '>>';
            }
        }]);

        return Filetransfer;
    }(), (_applyDecoratedDescriptor(_class2.prototype, 'currentTransferDirection', [_dec2], Object.getOwnPropertyDescriptor(_class2.prototype, 'currentTransferDirection'), _class2.prototype)), _class2)) || _class);
});
define('text!views/filetransfer/filetransfer.html', ['module'], function(module) { module.exports = "<template>\n\n    <require from=\"../../components/filetransfer/system-folder\"></require>\n\n    <h4><i class=\"px-nav-icon ion-usb\"></i>${\"File Transfer\" | t}</h4>\n    <div class=\"row\">\n        <div class=\"col-xs-6 file-transfer-pane\">\n            <system-folder folder.bind=\"systemFiles\" collapsed.bind=\"false\" draggable.bind=\"false\" deletable.bind=\"true\"></system-folder>\n        </div>\n        <div class=\"col-xs-1 h-100 transfer-btn-container\">\n            <a class=\"btn transfer-btn btn-sm\" click.trigger=\"transferToSystem($event)\">  ${currentTransferDirection}  </a>\n            <!--<a class=\"btn btn-sm transfer-btn\" click.trigger=\"transferToUsb($event)\">  >>  </a>-->\n        </div>\n        <div class=\"col-xs-5 file-transfer-pane\">\n            <system-folder folder.bind=\"usbFiles\" unavailable.bind=\"!usbAvailable\" collapsed.bind=\"false\" draggable.bind=\"false\" deletable.bind=\"false\"></system-folder>\n        </div>\n    </div>\n    \n</template>\n"; });
var cov_1cj6z2ldaq = function () {
  var path = "/opt/atlassian/pipelines/agent/build/Web/src/views/error/error-404.js",
      hash = "5dca4256d01c506616c7d12bb49920fa6c71ac9c",
      global = new Function('return this')(),
      gcv = "__coverage__",
      coverageData = {
    path: "/opt/atlassian/pipelines/agent/build/Web/src/views/error/error-404.js",
    statementMap: {},
    fnMap: {},
    branchMap: {},
    s: {},
    f: {},
    b: {},
    _coverageSchema: "332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('views/error/error-404',["exports"], function (exports) {
  "use strict";

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  var Error404 = exports.Error404 = function Error404() {
    _classCallCheck(this, Error404);
  };
});
define('text!views/error/error-404.html', ['module'], function(module) { module.exports = "<template>\n    <h1>\n        <strong>${\"404\" | t}</strong>\n    </h1>\n    <h3>\n        ${\"NOT FOUND\" | t}\n    </h3>\n</template>\n"; });
var cov_261vff9cdg = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/debug/debug.js',
        hash = '2f23b16682c01824cdd61e6c1549b4db6bd3ece7',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/debug/debug.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/debug/debug',['exports', 'aurelia-framework', '../../services/gateway-service'], function (exports, _aureliaFramework, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Debug = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var Debug = exports.Debug = (_dec = (0, _aureliaFramework.inject)(_gatewayService.GatewayService), _dec(_class = function () {
        function Debug(gatewayService) {
            _classCallCheck(this, Debug);

            this.requests = [];

            this.gatewayService = gatewayService;
        }

        Debug.prototype.bind = function bind() {
            var _this = this;

            this.gatewayService.getActiveBroadcastRequests().then(function (requests) {
                _this.requests = requests;
            });

            this.gatewayService.registerDebugCallbacks(this.handleBroadcastMaxExceededEvent.bind(this), this.handleBroadcastRequestSent.bind(this), this.handleBroadcastResponseReceived.bind(this), this.handleBroadcastsCleared.bind(this));

            this.gatewayService.enableDebug(true);
        };

        Debug.prototype.clearRequests = function clearRequests() {
            this.requests = [];
            this.overflow = [];
            this.showOverflow = false;
        };

        Debug.prototype.attached = function attached() {};

        Debug.prototype.unbind = function unbind() {
            this.gatewayService.enableDebug(false);
        };

        Debug.prototype.handleBroadcastMaxExceededEvent = function handleBroadcastMaxExceededEvent(requests) {
            this.showOverflow = true;
            this.overflow = [];
            this.overflow = requests;
        };

        Debug.prototype.handleBroadcastRequestSent = function handleBroadcastRequestSent(request) {
            var found = false;
            for (var i = 0; i < this.requests.length; i++) {
                if (this.requests[i].header.id === request.header.id) {
                    this.requests[i] = request;
                    found = true;
                    break;
                }
            }

            if (!found) {
                this.requests.push(request);
            }

            this.requests = this.requests.slice(0);
        };

        Debug.prototype.handleBroadcastResponseReceived = function handleBroadcastResponseReceived(response) {
            this.requests.forEach(function (request) {
                if (request.header.id === response.header.id) {
                    request.response = response;
                }
            });
        };

        Debug.prototype.handleBroadcastsCleared = function handleBroadcastsCleared() {
            this.clearRequests();
        };

        return Debug;
    }()) || _class);
});
define('text!views/debug/debug.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"./broadcast-request\"></require>\n    <h4>Debug.</h4>\n    <div repeat.for=\"request of requests\">\n        <broadcast-request request.bind=\"request\"></broadcast-request>\n    </div>\n    <div if.bind=\"showOverflow\">\n        <h2>Overflow</h2>\n        <div repeat.for=\"over of overflow\">\n            <broadcast-request request.bind=\"over\"></broadcast-request>\n        </div>\n    </div>\n    <br/><br/>\n</template>\n"; });
var cov_s5cwquu9z = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/test-speed.js',
        hash = 'b4f76ed7c585c6764280bca0cfc0df8820aa02fd',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/test-speed.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/test-speed',['exports', 'aurelia-framework', 'aurelia-dialog', '../../services/gateway-service', '../../resources/value-converters/mmPerSecondToMph', 'aurelia-validation', '../../components/shared/dialog-bootstrap-renderer'], function (exports, _aureliaFramework, _aureliaDialog, _gatewayService, _mmPerSecondToMph, _aureliaValidation, _dialogBootstrapRenderer) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.TestSpeed = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var TestSpeed = exports.TestSpeed = (_dec = (0, _aureliaFramework.inject)(_gatewayService.GatewayService, _aureliaDialog.DialogController, _aureliaValidation.ValidationController, _aureliaFramework.BindingEngine, _mmPerSecondToMph.MmPerSecondToMphValueConverter), _dec(_class = function () {
        function TestSpeed(gatewayService, dialogController, validationController, bindingEngine, mmPerSecondToMphValueConverter) {
            _classCallCheck(this, TestSpeed);

            this.subscribedProperties = ['TestSpeed'];
            this.editDelta = {};

            this.gatewayService = gatewayService;
            this.dialogController = dialogController;
            this.validationController = validationController;
            this.bootstrapFormRenderer = new _dialogBootstrapRenderer.BootstrapFormRenderer();
            this.validationController.addRenderer(this.bootstrapFormRenderer);
            this.bindingEngine = bindingEngine;
            this.mmPerSecondToMphValueConverter = mmPerSecondToMphValueConverter;

            this.state = this.gatewayService.getState();
        }

        TestSpeed.prototype.attached = function attached() {
            var _this = this;

            this.gatewayService.subscribe(this.subscribedProperties);
            this.testSpeed = this.state.testSpeed;
            this.subscription = this.bindingEngine.propertyObserver(this.state, 'testSpeed').subscribe(function (newValue, oldValue) {
                _this.testSpeed = newValue;
            });

            _aureliaValidation.ValidationRules.ensure('testSpeed').satisfiesRule('numRange', 0, 194704, this.mmPerSecondToMphValueConverter.forValidate, '0.0').on(this);
        };

        TestSpeed.prototype.unbind = function unbind() {
            this.gatewayService.unsubscribe(this.subscribedProperties);
        };

        TestSpeed.prototype.detached = function detached() {
            this.subscription.dispose();
        };

        TestSpeed.prototype.ok = function ok() {
            var _this2 = this;

            this.editDelta.testSpeed = this.testSpeed;
            this.validationController.validate().then(function (result) {
                if (result.valid) {
                    _this2.gatewayService.send(_this2.editDelta);

                    _this2.editDelta = {};
                    _this2.dialogController.close();
                }
            });
        };

        TestSpeed.prototype.cancel = function cancel() {
            this.dialogController.close();
        };

        TestSpeed.prototype.deactivate = function deactivate() {
            this.validationController.reset();
            this.validationController.removeRenderer(this.bootstrapFormRenderer);
        };

        return TestSpeed;
    }()) || _class);
});
define('text!views/dashboard/test-speed.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/mmPerSecondToMph\"></require>\n    <div class=\"operation-popover\" style=\"width: 30rem;\">\n        <div class=\"form-group\">\n            <div style=\"text-align: center\">\n                <label for=\"t-speed\" class=\"control-label\">Test Speed</label>\n            </div>\n            <div>\n                <input id=\"t-speed\"  step=\".1\" value.bind=\"testSpeed | mmPerSecondToMph:'0.0'& updateTrigger:'blur' & validateOnChange\" \n                       class=\"operations-dark form-control form-control-lg input-lg\"/>\n            </div>\n        </div>\n        <div style=\"padding-top: 16px\">\n            <button class=\"btn btn-lg btn-danger dialog-btn\"click.trigger=\"cancel()\">Cancel</button>\n            <button class=\"btn btn-lg btn-primary dialog-btn\"click.trigger=\"ok(person)\">Ok</button>\n        </div>\n    </div>\n</template>\n"; });
var cov_10exq1ogza = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/tank-meter.js',
        hash = '933bf6ae9de6fb42451ed4830327095d54732262',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/tank-meter.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/tank-meter',['exports', '../gateway-state-base'], function (exports, _gatewayStateBase) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.TankMeter = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var TankMeter = exports.TankMeter = function (_ref) {
        _inherits(TankMeter, _ref);

        function TankMeter() {
            _classCallCheck(this, TankMeter);

            for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
                rest[_key] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.activeClasses = 'ion-checkmark-circled btn-primary';
            _this.inactiveClasses = 'btn-default';
            _this.subscribedProperties = ['Tank1Current', 'Tank1Counter', 'Tank1Lifetime', 'Tank1Rate', 'Tank1CurrentDisplayed', 'Tank1Full', 'Tank1AlarmDisplayed', 'Tank1AlarmPercent', 'Tank1AlarmVolume'];
            return _this;
        }

        TankMeter.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.subscribe(this.subscribedProperties);
        };

        TankMeter.prototype.resetCounter = function resetCounter() {
            this.editDelta.tank1Counter = 0;
            this.send();
        };

        TankMeter.prototype.refillCurrent = function refillCurrent() {
            this.editDelta.tank1Current = this.state.tank1Full;
            this.send();
        };

        TankMeter.prototype.toggleAlarmUnits = function toggleAlarmUnits() {
            this.editDelta.tank1AlarmDisplayed = this.toggleByte(this.state.tank1AlarmDisplayed);
            this.send();
        };

        TankMeter.prototype.activeClass = function activeClass(isActive) {
            return isActive ? this.activeClasses : this.inactiveClasses;
        };

        _createClass(TankMeter, [{
            key: 'currentClasses',
            get: function get() {
                return this.activeClass(this.state.tank1CurrentDisplayed === 0);
            }
        }, {
            key: 'counterClasses',
            get: function get() {
                return this.activeClass(this.state.tank1CurrentDisplayed === 1);
            }
        }, {
            key: 'lifeTimeClasses',
            get: function get() {
                return this.activeClass(this.state.tank1CurrentDisplayed === 2);
            }
        }]);

        return TankMeter;
    }((_gatewayStateBase.GatewayStateBase));
});
define('text!views/dashboard/tank-meter.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"views/dashboard/operation-panel-item\"></require>\n    <require from=\"resources/value-converters/hectaresToAcres\"></require>\n    <require from=\"resources/value-converters/mlToGal\"></require>\n    <require from=\"resources/value-converters/mlPerHectareToGpa\"></require>\n    <require from=\"resources/attributes/focus-bind-break\"></require>\n    <div class=\"operation-popover container-fluid\">\n\n        <div style=\"padding: 2rem\" class=\"container-fluid area-meter\">\n            <div class=\"text-center\" style=\"font-size: large\">Tank Meter(Gallons)</div>\n\n            <div class=\"row equal\">\n                <label class=\" col-xs-5 m-t-3\"\n                       i18n=\"dashboard.areaMeter.capacity\"></label>\n                <input type=\"number\" class=\"col-xs-4 m-t-3 operation-txt\" focus-bind-break.two-way=\"state.tank1Full | mlToGal\"\n                       change.delegate=\"sendChange(state.tank1Full, 'tank1Full')\" />\n            </div>\n\n            <div class=\"row equal\">\n                <button class=\" col-xs-5 m-t-3 btn btn-lg btn-outline\" class.bind=\"currentClasses \"\n                        i18n=\"dashboard.areaMeter.current\" click.delegate=\"sendChange(0, 'tank1CurrentDisplayed')\"></button>\n                <input type=\"number\" class=\"col-xs-4 m-t-3 operation-txt\" focus-bind-break.two-way=\"state.tank1Current | mlToGal\"\n                       change.delegate=\"sendChange(state.tank1Current, 'tank1Current')\" />\n                <div class=\"col-xs-3 m-t-3\">\n                    <button click.delegate=\"refillCurrent()\" type=\"button\" class=\"btn btn-primary btn-sm\" i18n=\"dashboard.tankMeter.refill\">Reset</button>\n                </div>\n            </div>\n\n            <div class=\"row equal\">\n                <button class=\"col-xs-5 m-t-3 btn btn-lg btn-outline\" class.bind=\"counterClasses\"\n                        i18n=\"dashboard.areaMeter.counter\" click.delegate=\"sendChange(1, 'tank1CurrentDisplayed')\"></button>\n                <input type=\"number\" class=\"col-xs-4 m-t-3 operation-txt\" focus-bind-break.bind=\"state.tank1Counter | mlToGal\"\n                       change.delegate=\"sendChange(state.tank1Counter, 'tank1Counter')\" />\n                <div class=\"col-xs-3 m-t-3\">\n                    <button click.delegate=\"resetCounter()\" type=\"button\" class=\"btn btn-primary btn-sm\" i18n=\"dashboard.areaMeter.reset\">Reset</button>\n                </div>\n            </div>\n\n            <div class=\"row equal\">\n                <label class=\"col-xs-5 m-t-3\"\n                       i18n=\"dashboard.areaMeter.lifetime\"></label>\n                <input readonly type=\"number\" class=\"col-xs-4 m-t-3 operation-txt\" focus-bind-break.bind=\"state.tank1Lifetime | mlToGal\"\n                       change.delegate=\"sendChange(state.tank1Lifetime, 'tank1Lifetime')\" />\n            </div>\n\n            <div if.bind=\"state.tank1AlarmDisplayed === 1\" class=\"row equal\">\n                <label class=\"col-xs-5 m-t-3\"\n                       i18n=\"dashboard.tankMeter.alarm\"></label>\n                <input type=\"number\" class=\"col-xs-4 m-t-3 operation-txt\" focus-bind-break.bind=\"state.tank1AlarmPercent\"\n                       change.delegate=\"sendChange(state.tank1AlarmPercent, 'tank1AlarmPercent')\" />\n                <div class=\"col-xs-3 m-t-3\">\n                    <button click.delegate=\"toggleAlarmUnits()\" type=\"button\" class=\"btn btn-primary btn-sm\" i18n=\"%\">%</button>\n                </div>\n            </div>\n\n            <div if.bind=\"state.tank1AlarmDisplayed === 0\" class=\"row equal\">\n                <label class=\"col-xs-5 m-t-3\"\n                       i18n=\"dashboard.tankMeter.alarm\"></label>\n\n                <input type=\"number\" class=\"col-xs-4 m-t-3 operation-txt\" focus-bind-break.bind=\"state.tank1AlarmVolume | mlToGal\"\n                       change.delegate=\"sendChange(state.tank1AlarmVolume, 'tank1AlarmVolume')\" />\n                <div class=\"col-xs-3 m-t-3\">\n                    <button click.delegate=\"toggleAlarmUnits()\" type=\"button\" class=\"btn btn-primary btn-sm\" i18n=\"dashboard.tankMeter.volume\">Reset</button>\n                </div>\n            </div>\n\n            <operation-panel-item val.bind=\"state.tank1Rate | mlPerHectareToGpa\" label=\"dashboard.tankMeter.flowRate\">\n            </operation-panel-item>\n        </div>\n    </div>\n</template>\n"; });
var cov_2nyob3lqw1 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/system-status.js',
        hash = 'f5d6e3ba5101a1a731e498dcb95b8b6bdfc70efa',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/system-status.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/system-status',['exports', 'aurelia-framework', '../gateway-state-base'], function (exports, _aureliaFramework, _gatewayStateBase) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SystemStatus = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    var _dec, _dec2, _desc, _value, _class;

    var SystemStatus = exports.SystemStatus = (_dec = (0, _aureliaFramework.computedFrom)('state.servoType', 'state.taskMode'), _dec2 = (0, _aureliaFramework.computedFrom)('state.masterSwitchSource'), (_class = function (_ref) {
        _inherits(SystemStatus, _ref);

        function SystemStatus() {
            _classCallCheck(this, SystemStatus);

            for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
                rest[_key] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.subscribedProperties = ['Pump', 'Boom', 'TurnComp', 'OverlapComp', 'KeyFob', 'ServoType', 'TaskMode', 'MasterSwitchSource'];
            return _this;
        }

        SystemStatus.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.subscribe(this.subscribedProperties);
        };

        SystemStatus.prototype.toggleSwitch = function toggleSwitch(val, prop) {
            this.editDelta[prop] = this.toggleByte(val);
            this.send();
        };

        _createClass(SystemStatus, [{
            key: 'pinPointControlsPump',
            get: function get() {
                return (this.state.servoType === 0 || this.state.servoType === 1) && this.state.taskMode > 0;
            }
        }, {
            key: 'masterBoomSwitchOnScreen',
            get: function get() {
                return this.state.masterSwitchSource === 2;
            }
        }]);

        return SystemStatus;
    }((_gatewayStateBase.GatewayStateBase)), (_applyDecoratedDescriptor(_class.prototype, 'pinPointControlsPump', [_dec], Object.getOwnPropertyDescriptor(_class.prototype, 'pinPointControlsPump'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'masterBoomSwitchOnScreen', [_dec2], Object.getOwnPropertyDescriptor(_class.prototype, 'masterBoomSwitchOnScreen'), _class.prototype)), _class));
});
define('text!views/dashboard/system-status.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/bitToStatus\"></require>\n    <div style=\"width: 30rem;\" class=\"operation-popover\">\n        <div class=\"container-fluid\" style=\"padding-bottom: 11px\">\n            <div>\n                <div colspan=\"2\" class=\"text-center\" style=\"font-size: 2rem; padding-top: 16px\">System Status</div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-xs-6 m-t-3\" style=\"font-size: 2rem\">Pump</div>\n                <div class=\"col-xs-6 m-t-3\"  style=\"text-align: center\">\n                    <div if.bind=\"!pinPointControlsPump\" class=\"operation-txt\">\n                        ${state.pump | bitToStatus }\n                    </div>\n                    <button if.bind=\"pinPointControlsPump\" class.bind=\"state.pump == 0 ? 'operation-bdr-error' : ''\" \n                            class=\"btn btn-lg operations-btn\" click.delegate=\"toggleSwitch(state.pump, 'pump')\">\n                        ${state.pump | bitToStatus }\n                    </button>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-xs-6 m-t-3\" style=\"font-size: 2rem\">Boom</div>\n\n                <div class=\"col-xs-6 m-t-3\"  style=\"text-align: center\">\n                    <div if.bind=\"!masterBoomSwitchOnScreen\" class=\"operation-txt\">\n                        ${state.boom | bitToStatus }\n                    </div>\n                    <button if.bind=\"masterBoomSwitchOnScreen\" class.bind=\"state.boom == 0 ? 'operation-bdr-error' : ''\"\n                            class=\"btn btn-lg operations-btn\" click.delegate=\"toggleSwitch(state.boom, 'boom')\">\n                        ${state.boom | bitToStatus }\n                    </button>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-xs-6 m-t-3\" style=\"font-size: 2rem\">Overlap</div>\n                <div class=\"col-xs-6 m-t-3\"  style=\"text-align: center\">\n                    <button class.bind=\"state.overlapComp == 0 ? 'operation-bdr-error' : ''\"\n                            class=\"btn btn-lg operations-btn\" click.delegate=\"toggleSwitch(state.overlapComp, 'overlapComp')\">\n                        ${state.overlapComp | bitToStatus }\n                    </button>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-xs-6 m-t-3\" style=\"font-size: 2rem\">Turn</div>\n                <div class=\"col-xs-6 m-t-3\" style=\"text-align: center\">\n                    <button class=\"btn btn-lg operations-btn\" class.bind=\"state.turnComp == 0 ? 'operation-bdr-error' : ''\" \n                            click.delegate=\"toggleSwitch(state.turnComp, 'turnComp')\">\n                        ${state.turnComp | bitToStatus }\n                    </button>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-xs-6 m-t-3\" style=\"font-size: 2rem\">Key Fob</div>\n                <div class=\"col-xs-6 m-t-3\" style=\"text-align: center\">\n                    <button class=\"btn btn-lg operations-btn\" class.bind=\"state.keyFob == 0 ? 'operation-bdr-error' : ''\"\n                            click.delegate=\"toggleSwitch(state.keyFob, 'keyFob')\">\n                        ${state.keyFob | bitToStatus }\n                    </button>\n                </div>\n            </div>\n        </div>\n    </div>\n</template>\n"; });
define('text!views/dashboard/system-status-popover.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"views/dashboard/system-status\"></require>\n    <slot name=\"popoverTarget\">\n        <button class=\"btn btn-block btn-default\" \n                popover=\"template-selector: #sys-status-template; placement: bottom\">Custom popover (custom attribute)</button>\n    </slot>\n    <div id=\"sys-status-template\">\n        <div class=\"popover\" role=\"tooltip\">\n            <div class=\"arrow\"></div>\n            <h3 class=\"popover-title\"></h3>\n            <div>Some custom html</div>\n            <system-status></system-status>\n        </div>\n    </div>\n</template>\n"; });
var cov_1e7m2s7szm = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/soft-boom-switches.js',
        hash = '421cdefe39363428d2694daec7c83b779e09109a',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/soft-boom-switches.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/soft-boom-switches',['exports', 'aurelia-framework', '../../services/gateway-service'], function (exports, _aureliaFramework, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SoftBoomSwitches = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    var _dec, _dec2, _class, _desc, _value, _class2;

    var SoftBoomSwitches = exports.SoftBoomSwitches = (_dec = (0, _aureliaFramework.inject)(_gatewayService.GatewayService), _dec2 = (0, _aureliaFramework.computedFrom)('state.softBoom1Switch'), _dec(_class = (_class2 = function () {
        function SoftBoomSwitches(gatewayService) {
            _classCallCheck(this, SoftBoomSwitches);

            this.subscribeProperties = ['SoftBoom1Switch'];

            this.gatewayService = gatewayService;
            this.editDelta = {
                boomStatusBits: []
            };
            this.state = this.gatewayService.getState();
        }

        SoftBoomSwitches.prototype.attached = function attached() {
            this.gatewayService.subscribe(this.subscribeProperties, 'soft-boom-switches');
        };

        SoftBoomSwitches.prototype.unbind = function unbind() {
            this.gatewayService.unsubscribe(this.subscribeProperties, 'soft-boom-switches');
        };

        SoftBoomSwitches.prototype.toggle = function toggle(index) {
            this.editDelta.softBoom1Switch = this.state.softBoom1Switch.slice();
            this.editDelta.softBoom1Switch.splice(index, 1, this.toggleByte(this.editDelta.softBoom1Switch[index]));
            this.send();
        };

        SoftBoomSwitches.prototype.toggleByte = function toggleByte(value) {
            return value === 1 ? 0 : 1;
        };

        SoftBoomSwitches.prototype.send = function send() {
            this.gatewayService.send(this.editDelta);
        };

        _createClass(SoftBoomSwitches, [{
            key: 'boomSwitches',
            get: function get() {
                return this.state.softBoom1Switch;
            }
        }]);

        return SoftBoomSwitches;
    }(), (_applyDecoratedDescriptor(_class2.prototype, 'boomSwitches', [_dec2], Object.getOwnPropertyDescriptor(_class2.prototype, 'boomSwitches'), _class2.prototype)), _class2)) || _class);
});
define('text!views/dashboard/soft-boom-switches.html', ['module'], function(module) { module.exports = "<template>\n    <div style=\"font-size: 34px; color: red; text-align: center\" if.bind=\"!boomSwitches\">\n        Loading...\n    </div>\n    <div if.bind=\"boomSwitches\" class=\"btn-toolbar boom-btn-toolbar\" role=\"group\" style=\"width: 100%\">\n        <button repeat.for=\"sectionByte of state.softBoom1Switch.length\"\n                style=\"border-width: 5px\" type=\"button\" ref=\"item\" class=\"btn ${state.softBoom1Switch[$index] ? 'btn-primary' : 'btn-secondary'} boom-btn\" click.delegate=\"toggle($index)\">\n            ${$index + 1}\n        </button>\n    </div>\n</template>\n"; });
var cov_k7lebk117 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/save-recording.js',
        hash = 'e6d196df2f134ad301496a8581d8b140fc9a4ede',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/save-recording.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/save-recording',['exports', 'aurelia-framework', 'aurelia-dialog'], function (exports, _aureliaFramework, _aureliaDialog) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SaveRecording = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var SaveRecording = exports.SaveRecording = (_dec = (0, _aureliaFramework.inject)(_aureliaDialog.DialogController), _dec(_class = function () {
        function SaveRecording(dialogController) {
            _classCallCheck(this, SaveRecording);

            this.boundaryType = 0;

            this.controller = dialogController;
        }

        SaveRecording.prototype.activate = function activate(model) {
            this.name = model.name;
            this.mapName = model.mapName;
            if (this.mapName === "Create New") {
                this.isNew = true;
            } else {
                this.isNew = false;
            }
        };

        SaveRecording.prototype.setType = function setType(boundaryType) {
            this.boundaryType = document.getElementById("boundaryIgnoreOptions").selectedIndex;
        };

        SaveRecording.prototype.unbind = function unbind() {};

        SaveRecording.prototype.save = function save() {
            this.save = true;
        };

        return SaveRecording;
    }()) || _class);
});
define('text!views/dashboard/save-recording.html', ['module'], function(module) { module.exports = "<template>\n    <div style=\"width: 50rem;\" class=\"operation-popover\">\n        <div class=\"container-fluid\" style=\"padding-bottom: 11px\">\n            <div if.bind=\"isNew\">\n                <div>\n                    <div class=\"text-center\" style=\"font-size: 2rem; padding-top: 16px\">Boundary Map Name</div>\n                </div>\n                <br />\n                <div class=\"row form-group\">\n                    <div class=\"col-xs-12\">\n                        <input id=\"left-input\" step=\"1\" value.bind=\"mapName\"\n                               class=\"operations-dark form-control form-control-lg input-lg\" type=\"text\">\n                    </div>\n                </div>\n            </div>\n\n            <div>\n                <div class=\"text-center\" style=\"font-size: 2rem; padding-top: 16px\">Boundary Name</div>\n            </div>\n            <br />\n            <div class=\"row form-group\">\n                <div class=\"col-xs-12\">\n                    <input id=\"left-input\" step=\"1\" value.bind=\"name\"\n                           class=\"operations-dark form-control form-control-lg input-lg\" type=\"text\">\n                </div>\n            </div>\n            <div class=\"row form-group dashboard-dropdown\" style=\"width:200px; margin: 0 auto;\">\n                <label >${\"Boundary Type\" | t}</label><br />\n                <select value.bind=\"selectedValue\" change.delegate=\"setType(selectedValue)\" class=\"form-control\" id=\"boundaryIgnoreOptions\" style=\"margin-bottom:15px\">\n                    <option bind:value=\"0\">Spray</option>\n                    <option bind:value=\"1\">No Spray</option>\n                    <option bind:value=\"2\">Spray Island</option>\n                </select>\n            </div>\n            <ux-dialog-footer>\n                <button click.trigger=\"controller.ok({aName: name, aMap: mapName, type: boundaryType}) \" class=\"btn btn-primary btn-lg\">Save</button>\n                <button click.trigger=\"controller.cancel()\" class=\"btn btn-default btn-lg\">Cancel</button>\n            </ux-dialog-footer>\n        </div>\n    </div>\n</template>\n"; });
var cov_1xo14a5cxm = function () {
  var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/recorder-settings.js',
      hash = '90c9a847f26a08f9330a6abcf2cef6f9945f80c5',
      global = new Function('return this')(),
      gcv = '__coverage__',
      coverageData = {
    path: '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/recorder-settings.js',
    statementMap: {},
    fnMap: {},
    branchMap: {},
    s: {},
    f: {},
    b: {},
    _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('views/dashboard/recorder-settings',['exports', 'aurelia-framework', 'aurelia-dialog'], function (exports, _aureliaFramework, _aureliaDialog) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.RecorderSettings = undefined;

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  var _dec, _class;

  var RecorderSettings = exports.RecorderSettings = (_dec = (0, _aureliaFramework.inject)(_aureliaDialog.DialogController), _dec(_class = function () {
    function RecorderSettings(dialogController) {
      _classCallCheck(this, RecorderSettings);

      this.controller = dialogController;
    }

    RecorderSettings.prototype.activate = function activate(settings) {
      this.settings = settings;
    };

    return RecorderSettings;
  }()) || _class);
});
define('text!views/dashboard/recorder-settings.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/mmToInches\"></require>\n    <div style=\"width: 50rem;\" class=\"operation-popover\">\n        <div class=\"container-fluid\" style=\"padding-bottom: 11px\">\n            <div>\n                <div colspan=\"2\" class=\"text-center\" style=\"font-size: 2rem; padding-top: 16px\">Recorder Settings</div>\n            </div>\n            <br />\n            <div class=\"row form-group\">\n                <div class=\"col-xs-5\">\n                    <label for=\"left-input\">Left Setpoint</label>\n                </div>\n                <div class=\"col-xs-4\">\n                    <input id=\"left-input\" step=\"1\" value.bind=\"settings.leftSetpoint | mmToInches & updateTrigger:'blur'\"\n                           class=\"operations-dark form-control form-control-lg input-lg\" type=\"number\" name=\"leftSetpoint\">\n                </div>\n                <div class=\"col-xs-3\">\n                    <span>Inches</span>\n                </div>\n            </div>\n            <div class=\"row form-group\">\n                <div class=\"col-xs-5\">\n                    <label for=\"right-input\">Right Setpoint</label>\n                </div>\n                <div class=\"col-xs-4\">\n                    <input id=\"right-input\" min=\"0\" step=\"1\" value.bind=\"settings.rightSetpoint | mmToInches & updateTrigger:'blur'\"\n                           class=\"operations-dark form-control form-control-lg input-lg\" type=\"number\" name=\"rightSetpoint\">\n                </div>\n                <div class=\"col-xs-3\">\n                    <span>Inches</span>\n                </div>\n            </div>\n            <ux-dialog-footer>\n                <button click.trigger=\"controller.ok(settings)\" class=\"btn btn-primary btn-lg\">Ok</button>\n                <button click.trigger=\"controller.cancel()\" class=\"btn btn-default btn-lg\">Cancel</button>\n            </ux-dialog-footer>\n        </div>\n    </div>\n</template>\n"; });
var cov_14cqbu0d0x = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/rate-control.js',
        hash = '6a71a4d33fbc19d0ccb2583d6a777dd50a1fabbe',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/rate-control.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/rate-control',['exports', 'aurelia-framework', '../gateway-state-base'], function (exports, _aureliaFramework, _gatewayStateBase) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.RateControl = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    var _dec, _dec2, _dec3, _desc, _value, _class;

    var RateControl = exports.RateControl = (_dec = (0, _aureliaFramework.computedFrom)('state.systemRate1Index', 'state.systemRate1Auto'), _dec2 = (0, _aureliaFramework.computedFrom)('state.systemRate1Index', 'state.systemRate1Auto'), _dec3 = (0, _aureliaFramework.computedFrom)('state.systemRate1Index', 'state.systemRate1Auto'), (_class = function (_ref) {
        _inherits(RateControl, _ref);

        function RateControl() {
            _classCallCheck(this, RateControl);

            for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
                rest[_key] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.manualControl = false;
            _this.manualRateActive = true;
            _this.noPulse = 3;
            _this.valveOff = 4;
            _this.showPWM = false;
            _this.autoSyncProperties = ['SystemRate1Target0', 'SystemRate1Target1', 'SystemRate1Target2', 'SystemRate1MChange', 'SystemRate1TChange', 'SystemRate', 'SystemRate1NozzleDc', 'SystemRate1ErrorFm', 'SystemRate1Index', 'SystemRate1IncDec', 'SystemRate1Auto', 'FluidMode', 'systemPressure1PumpDuty'];
            return _this;
        }

        RateControl.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            this.setUpSubscriptions(this.autoSyncProperties);
            if (this.state.fluidMode === this.noPulse || this.state.fluidMode === this.valveOff) {
                this.showPWM = true;
            }
        };

        RateControl.prototype.setSelectedRate = function setSelectedRate(index) {
            this.editDelta.systemRate1Index = index;
            this.editDelta.systemRate1Auto = 1;
            this.send();
        };

        RateControl.prototype.toggleManualRate = function toggleManualRate() {
            this.editDelta.systemRate1Auto = 0;
            this.send();
        };

        RateControl.prototype.bumpValueChanged = function bumpValueChanged(bumpValue) {
            this.state.systemRate1TChange = bumpValue;
        };

        RateControl.prototype.bump = function bump(bmpDir) {
            this.editDelta.systemRate1IncDec = bmpDir;
            this.send();
        };

        RateControl.prototype.toggleByte = function toggleByte(value) {
            if (value === 0) {
                return 1;
            }
            return 0;
        };

        RateControl.prototype.setTargetRate = function setTargetRate(bmpDir) {
            if (bmpDir > 0) {
                this.state['systemRate1Target' + this.state.systemRate1Index] = this.getActiveTarget() + this.state.systemRate1TChange;
            } else {
                var newRate = this.getActiveTarget() - this.state.systemRate1TChange;
                this.state['systemRate1Target' + this.state.systemRate1Index] = newRate > 0 ? newRate : 0;
            }
        };

        RateControl.prototype.getActiveTarget = function getActiveTarget() {
            return this.state['systemRate1Target' + this.state.systemRate1Index];
        };

        _createClass(RateControl, [{
            key: 'rate1Class',
            get: function get() {
                return this.state.systemRate1Index === 0 && this.state.systemRate1Auto ? 'btn-primary' : 'btn-secondary';
            }
        }, {
            key: 'rate2Class',
            get: function get() {
                return this.state.systemRate1Index === 1 && this.state.systemRate1Auto ? 'btn-primary' : 'btn-secondary';
            }
        }, {
            key: 'pxRateClass',
            get: function get() {
                return this.state.systemRate1Index === 2 && this.state.systemRate1Auto ? 'btn-primary' : 'btn-secondary';
            }
        }]);

        return RateControl;
    }((_gatewayStateBase.GatewayStateBase)), (_applyDecoratedDescriptor(_class.prototype, 'rate1Class', [_dec], Object.getOwnPropertyDescriptor(_class.prototype, 'rate1Class'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'rate2Class', [_dec2], Object.getOwnPropertyDescriptor(_class.prototype, 'rate2Class'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'pxRateClass', [_dec3], Object.getOwnPropertyDescriptor(_class.prototype, 'pxRateClass'), _class.prototype)), _class));
});
define('text!views/dashboard/rate-control.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/number-format\"></require>\n    <require from=\"resources/value-converters/mlPerHectareToGpa\"></require>\n    <require from=\"resources/binding-behavior/auto-sync\"></require>\n    <div class=\"operation-popover\" style=\"height: 100%;\">\n        <div class=\"container-fluid\">\n            <div class=\"row\">\n                <div class=\"col-md-6 container-fluid\">\n                    <div class=\"form-group row\">\n                        <div class=\"col-xs-6\">\n                            <button type=\"button\" id=\"p1\" class=\"form-control-lg btn btn-lg\" class.bind=\"rate1Class\" click.capture=\"setSelectedRate(0)\">R1</button>\n                        </div>\n                        <div class=\"col-xs-6\">\n                            <input id=\"r1-input\" min=\"0\" step=\"0.1\" oninput=\"validity.valid||(value='0.0');\"\n                                   value.bind=\"state.systemRate1Target0 | mlPerHectareToGpa:'0.0' & updateTrigger:'blur' & autoSync\"\n                                   class=\"operations-dark form-control form-control-lg input-lg\" type=\"number\" name=\"systemRate1Target0\">\n                        </div>\n\n                    </div>\n                    <div class=\"form-group row\">\n                        <div class=\"col-xs-6\">\n                            <button type=\"button\" id=\"p2\" class=\"form-control-lg btn btn-lg\" class.bind=\"rate2Class\" click.capture=\"setSelectedRate(1)\">R2</button>\n                        </div>\n                        <div class=\"col-xs-6\">\n                            <input id=\"r2-input\" min=\"0\" step=\"0.1\" oninput=\"validity.valid||(value='0.0')\" ;\n                                   value.bind=\"state.systemRate1Target1 | mlPerHectareToGpa:'0.0'  & updateTrigger:'blur' & autoSync\"\n                                   class=\"operations-dark form-control form-control-lg input-lg\" type=\"number\" name=\"systemRate1Target1\">\n                        </div>\n\n                    </div>\n                    <div class=\"form-group row\">\n                        <div class=\"col-xs-6\">\n                            <button type=\"button\" id=\"rx\" class=\"form-control-lg btn btn-lg btn-secondary\" class.bind=\"pxRateClass\" click.capture=\"setSelectedRate(2)\">Rx</button>\n                        </div>\n                        <div class=\"col-xs-6\">\n                            <div id=\"rx-input\" value.bind=\"state.systemRate1Target2 | mlPerHectareToGpa:'0.0'\"\n                                 class=\"operations-dark operations-dark-text-xl\">${state.systemRate1Target2 | mlPerHectareToGpa:'0.0'}</div>\n                        </div>\n                    </div>\n                </div>\n                <div class=\"w-100 d-none d-md-block\"></div>\n                <div class=\"col-md-6\">\n                    <div id=\"manual-control\" class=\"container-fluid manual-control-offset\">\n                        <div class=\"form-group row\">\n                            <div class=\"col-xs-offset-4 col-xs-6 col-md-6\">\n                                <button class=\"btn btn-lg form-control form-control-lg input-lg ${state.systemRate1Auto ?  'btn-secondary': 'btn-primary'}\" click.capture=\"toggleManualRate()\">\n                                    M\n                                </button>\n                            </div>\n                        </div>\n                        <div class=\"form-group row\">\n                            <div class=\"col-xs-6 col-xs-offset-4\">\n                                <button class=\"form-control-lg btn btn-lg btn-primary ion-arrow-up-a\" click.capture=\"bump(1)\"></button>\n                            </div>\n                        </div>\n                        <div class=\"form-group row ${!state.systemRate1Auto ? 'collapse' : ''}\">\n                            <label style=\"margin-right:.4em; font-size: large; text-align: right; padding-top: 5px; margin-bottom: 0;\" class=\"col-xs-1\" for=\"m-input\">Bump</label>\n                            <div class=\"col-xs-6\" style=\"margin-left: 1.8em\">\n                                <input id=\"m-input\" value.bind=\"state.systemRate1TChange | mlPerHectareToGpa:'0.0' & updateTrigger:'blur' & autoSync\" step=\"0.1\"\n                                       class=\"operations-dark form-control form-control-lg input-lg\" type=\"number\" name=\"systemRate1TChange\">\n                            </div>\n                        </div>\n                        <div class=\"form-group row\">\n                            <div class=\"col-xs-6 col-xs-offset-4\">\n                                <button class=\"form-control-lg btn btn-lg btn-primary ion-arrow-down-a\" click.capture=\"bump(-1)\"></button>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </div>\n        <hr />\n        <div>\n            <span style=\"font-size: x-large\"> FlowMeter Error %</span>\n            <span class=\"operations-dark operations-dark-text-xl\">${state.systemRate1ErrorFm}</span>\n        </div>\n        <div if.bind=\"showPWM\">\n            <div>\n                <span style=\"font-size: x-large\" i18n=\"dashboard.pressureControl.systemPressure1PumpDuty\"></span>\n                <span class=\"operations-dark operations-dark-text-xl\">${state.systemPressure1PumpDuty}</span>\n            </div>\n        </div>\n        <div else>\n            <div>\n                <span style=\"font-size: x-large\" i18n=\"dashboard.pressureControl.systemRate1NozzleDc\"></span>\n                <span class=\"operations-dark operations-dark-text-xl\">${state.systemRate1NozzleDc}</span>\n            </div>\n        </div>\n    </div>\n</template>\n"; });
define('text!views/dashboard/pressure-control2.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/number-format\"></require>\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\n    <require from=\"resources/binding-behavior/auto-sync\"></require>\n    <div class=\"operation-popover\" style=\"height: 100%;\">\n        <div class=\"container-fluid\">\n            <div class=\"row\">\n                <div class=\"col-md-6 container-fluid\">\n                    <div class=\"form-group row\">\n                        <div class=\"col-xs-6\">\n                            <button type=\"button\" id=\"p1\" class=\"form-control-lg btn btn-lg ${state.systemPressure1Index === 0 && state.systemPressure1Auto ? 'btn-primary' : 'btn-secondary'}\" click.delegate=\"setSelectedRate(0)\">P1</button>\n                        </div>\n                        <div class=\"col-xs-6\">\n                            <input id=\"r1-input\" min=\"0\" step=\"0.1\" name=\"systemPressure1Target0\" value.bind=\"state.systemPressure1Target0 | kpaToPsi:'0.0' & updateTrigger:'blur' & autoSync\" class=\"operations-dark form-control form-control-lg input-lg\" type=\"number\">\n                        </div>\n\n                    </div>\n                    <div class=\"form-group row\">\n                        <div class=\"col-xs-6\">\n                            <button type=\"button\" id=\"p2\" class=\"form-control-lg btn btn-lg ${state.systemPressure1Index  === 1 && state.systemPressure1Auto? 'btn-primary' : 'btn-secondary'}\" click.delegate=\"setSelectedRate(1)\">P2</button>\n                        </div>\n                        <div class=\"col-xs-6\">\n                            <input id=\"r2-input\" min=\"0\" step=\"0.1\" name=\"systemPressure1Target1\" value.bind=\"state.systemPressure1Target1 | kpaToPsi:'0.0' & updateTrigger:'blur' & autoSync\"  class=\"operations-dark form-control form-control-lg input-lg\" type=\"number\">\n                        </div>\n\n                    </div>\n                    <div class=\"form-group row\">\n                        <div class=\"col-xs-6\">\n                            <button type=\"button\" id=\"rx\" class=\"${state.systemPressure1Index === 2 && state.systemPressure1Auto ? 'btn-primary' : 'btn-secondary'} form-control-lg btn btn-lg btn-secondary\" click.delegate=\"setSelectedRate(2)\">Rx</button>\n                        </div>\n                        <div class=\"col-xs-6\">\n                            <div id=\"rx-input\" value.bind=\"state.systemPressure1Target2 | kpaToPsi:'0.0'\" class=\"operations-dark operations-dark-text-xl\">${state.systemPressure1Target2 | kpaToPsi:'0.0'}</div>\n                        </div>\n                    </div>\n                </div>\n                <div class=\"w-100 d-none d-md-block\"></div>\n                <div class=\"col-md-6\">\n                    <div id=\"manual-control\" class=\"container-fluid manual-control-offset\">\n                        <div class=\"form-group row\">\n                            <div class=\"col-xs-offset-4 col-xs-6 col-md-6\">\n                                <button class=\"btn btn-lg form-control form-control-lg input-lg ${state.systemPressure1Auto ?  'btn-secondary': 'btn-primary'}\" click.delegate=\"toggleManualRate()\">\n                                    M\n                                </button>\n                            </div>\n                        </div>\n                        <div class=\"form-group row\">\n                            <div class=\"col-xs-6 col-xs-offset-4\">\n                                <button class=\"form-control-lg btn btn-lg btn-primary ion-arrow-up-a\" click.delegate=\"bump(1)\"></button>\n                            </div>\n                        </div>\n                        <div class=\"form-group row\" >\n                            <label style=\"margin-right:.4em; font-size: large; text-align: right; padding-top: 5px; margin-bottom: 0;\" class=\"col-xs-1\" for=\"m-input\">Bump</label>\n                            <div class=\"col-xs-6\" style=\"margin-left: 1.8em\">\n                                <input id=\"m-input\" name=\"systemPressure1TChange\" value.bind=\"state.systemPressure1TChange | kpaToPsi:'0.0'  & updateTrigger:'blur' & autoSync\" step=\"0.1\" class=\"operations-dark form-control form-control-lg input-lg\" type=\"number\">\n                            </div>\n                        </div>\n                        <div class=\"form-group row\">\n                            <div class=\"col-xs-6 col-xs-offset-4\">\n                                <button class=\"form-control-lg btn btn-lg btn-primary ion-arrow-down-a\" click.delegate=\"bump(-1)\"></button>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </div>\n        <hr />\n        <div>\n            <span style=\"font-size: x-large\" i18n=\"dashboard.pressureControl.systemPressure1PumpDuty\"></span>\n            <span class=\"operations-dark operations-dark-text-xl\">${state.systemPressure1PumpDuty}</span>\n        </div>\n        <div>\n            <span style=\"font-size: x-large\" i18n=\"dashboard.pressureControl.systemPressure1Sparge\"></span>\n            <span class=\"operations-dark operations-dark-text-xl\">${state.systemPressure1Sparge}</span>\n        </div>\n    </div>\n</template>\n"; });
var cov_2byt3tgyl2 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/pressure-control.js',
        hash = '494500511f200a8fb95a187cb9cdf7b08dc27adc',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/pressure-control.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/pressure-control',['exports', '../gateway-state-base'], function (exports, _gatewayStateBase) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PressureControl = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var PressureControl = exports.PressureControl = function (_ref) {
        _inherits(PressureControl, _ref);

        function PressureControl() {
            _classCallCheck(this, PressureControl);

            for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
                rest[_key] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.autoSyncProperties = ['SystemPressure1Index', 'SystemPressure1TChange', 'SystemPressure1Target0', 'SystemPressure1Target1', 'SystemPressure1Target2', 'SystemPressure1Auto', 'SystemPressure1PumpDuty', 'SystemPressure1IncDec', 'SystemPressure1Sparge', 'SystemRate1ErrorFm', 'SystemRate1NozzleDc', 'TaskMode', 'FluidMode'];
            _this.externalRate = 0;
            _this.sharpShooter = 0;
            _this.showNozzleAndFlowError = false;

            _this.setUpSubscriptions(_this.autoSyncProperties);
            return _this;
        }

        PressureControl.prototype.attached = function attached() {
            _ref.prototype.attached.call(this);
            if (this.state.taskMode === this.externalRate && this.state.fluidMode === this.sharpShooter) {
                this.showNozzleAndFlowError = true;
            }
        };

        PressureControl.prototype.setSelectedRate = function setSelectedRate(index) {
            this.editDelta.systemPressure1Index = index;
            this.editDelta.systemPressure1Auto = 1;
            this.send();
        };

        PressureControl.prototype.toggleManualRate = function toggleManualRate() {
            this.editDelta.systemPressure1Auto = this.toggleByte(this.state.systemPressure1Auto);
            this.send();
        };

        PressureControl.prototype.bumpValueChanged = function bumpValueChanged(bumpValue) {
            this.editDelta.systemPressure1TChange = bumpValue;
            this.send();
        };

        PressureControl.prototype.bump = function bump(bmpDir) {
            this.editDelta.systemPressure1IncDec = bmpDir;
            this.send();
        };

        PressureControl.prototype.getActiveTarget = function getActiveTarget() {
            return this.state['systemPressure1Target' + this.state.systemPressure1Index];
        };

        return PressureControl;
    }((_gatewayStateBase.GatewayStateBase));
});
define('text!views/dashboard/pressure-control.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/number-format\"></require>\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\n    <require from=\"resources/binding-behavior/auto-sync\"></require>\n    <div class=\"operation-popover\" style=\"height: 100%;\">\n        <div class=\"container-fluid\">\n            <div class=\"row\">\n                <div class=\"col-md-6 container-fluid\">\n                    <div class=\"form-group row\">\n                        <div class=\"col-xs-6\">\n                            <button type=\"button\" id=\"p1\" class=\"form-control-lg btn btn-lg ${state.systemPressure1Index === 0 && state.systemPressure1Auto ? 'btn-primary' : 'btn-secondary'}\" click.delegate=\"setSelectedRate(0)\">P1</button>\n                        </div>\n                        <div class=\"col-xs-6\">\n                            <input id=\"r1-input\" min=\"0\" step=\"0.1\" name=\"systemPressure1Target0\" value.bind=\"state.systemPressure1Target0 | kpaToPsi:'0.0' & updateTrigger:'blur' & autoSync\" class=\"operations-dark form-control form-control-lg input-lg\" type=\"number\">\n                        </div>\n\n                    </div>\n                    <div class=\"form-group row\">\n                        <div class=\"col-xs-6\">\n                            <button type=\"button\" id=\"p2\" class=\"form-control-lg btn btn-lg ${state.systemPressure1Index  === 1 && state.systemPressure1Auto? 'btn-primary' : 'btn-secondary'}\" click.delegate=\"setSelectedRate(1)\">P2</button>\n                        </div>\n                        <div class=\"col-xs-6\">\n                            <input id=\"r2-input\" min=\"0\" step=\"0.1\" name=\"systemPressure1Target1\" value.bind=\"state.systemPressure1Target1 | kpaToPsi:'0.0' & updateTrigger:'blur' & autoSync\" class=\"operations-dark form-control form-control-lg input-lg\" type=\"number\">\n                        </div>\n\n                    </div>\n                    <div class=\"form-group row\">\n                        <div class=\"col-xs-6\">\n                            <button type=\"button\" id=\"rx\" class=\"${state.systemPressure1Index === 2 && state.systemPressure1Auto ? 'btn-primary' : 'btn-secondary'} form-control-lg btn btn-lg btn-secondary\" click.delegate=\"setSelectedRate(2)\">Rx</button>\n                        </div>\n                        <div class=\"col-xs-6\">\n                            <div id=\"rx-input\" class=\"operations-dark operations-dark-text-xl\">${state.systemPressure1Target2 | kpaToPsi:'0.0'}</div>\n                        </div>\n                    </div>\n                </div>\n                <div class=\"w-100 d-none d-md-block\"></div>\n                <div class=\"col-md-6\">\n                    <div id=\"manual-control\" class=\"container-fluid manual-control-offset\">\n                        <div class=\"form-group row\">\n                            <div class=\"col-xs-offset-4 col-xs-6 col-md-6\">\n                                <button class=\"btn btn-lg form-control form-control-lg input-lg ${state.systemPressure1Auto ?  'btn-secondary': 'btn-primary'}\" click.delegate=\"toggleManualRate()\">\n                                    M\n                                </button>\n                            </div>\n                        </div>\n                        <div class=\"form-group row\">\n                            <div class=\"col-xs-6 col-xs-offset-4\">\n                                <button class=\"form-control-lg btn btn-lg btn-primary ion-arrow-up-a\" click.delegate=\"bump(1)\"></button>\n                            </div>\n                        </div>\n                        <div class=\"form-group row ${state.systemPressure1Auto ?  'btn-visible': 'btn-hidden'}\">\n                            <label style=\"margin-right:.4em; font-size: large; text-align: right; padding-top: 5px; margin-bottom: 0;\" class=\"col-xs-1\" for=\"m-input\">Bump</label>\n                            <div class=\"col-xs-6\" style=\"margin-left: 1.8em\">\n                                <input id=\"m-input\" name=\"systemPressure1TChange\" value.bind=\"state.systemPressure1TChange | kpaToPsi:'0.0'  & updateTrigger:'blur' & autoSync\" step=\"0.1\" class=\"operations-dark form-control form-control-lg input-lg\" type=\"number\">\n                            </div>\n                        </div>\n                        <div class=\"form-group row\">\n                            <div class=\"col-xs-6 col-xs-offset-4\">\n                                <button class=\"form-control-lg btn btn-lg btn-primary ion-arrow-down-a\" click.delegate=\"bump(-1)\"></button>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </div>\n        <hr />\n        <div if.bind=\"showNozzleAndFlowError\">\n            <div>\n                <span style=\"font-size: x-large\" i18n=\"dashboard.pressureControl.systemRate1ErrorFm\"></span>\n                <span class=\"operations-dark operations-dark-text-xl\">${state.systemRate1ErrorFm}</span>\n            </div>\n            <div>\n                <span style=\"font-size: x-large\" i18n=\"dashboard.pressureControl.systemRate1NozzleDc\"></span>\n                <span class=\"operations-dark operations-dark-text-xl\">${state.systemRate1NozzleDc}</span>\n            </div>\n        </div>\n        <div else>\n            <div>\n                <span style=\"font-size: x-large\" i18n=\"dashboard.pressureControl.systemPressure1PumpDuty\"></span>\n                <span class=\"operations-dark operations-dark-text-xl\">${state.systemPressure1PumpDuty}</span>\n            </div>\n            <div>\n                <span style=\"font-size: x-large\" i18n=\"dashboard.pressureControl.systemPressure1Sparge\"></span>\n                <span class=\"operations-dark operations-dark-text-xl\">${state.systemPressure1Sparge}</span>\n            </div>\n        </div>\n    </div>\n</template>\n"; });
var cov_2gt6e6spg = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/popover-element.js',
        hash = 'ca7a76a7cd58c6546c9b23827ecf34f5a7de3d18',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/popover-element.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/popover-element',['exports', 'aurelia-framework', 'px-popover'], function (exports, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PopoverElement = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9;

    var PopoverElement = exports.PopoverElement = (_dec = (0, _aureliaFramework.customElement)('popover-element'), _dec(_class = (_class2 = function () {
        function PopoverElement() {
            _classCallCheck(this, PopoverElement);

            _initDefineProp(this, 'animation', _descriptor, this);

            _initDefineProp(this, 'container', _descriptor2, this);

            _initDefineProp(this, 'delay', _descriptor3, this);

            _initDefineProp(this, 'html', _descriptor4, this);

            _initDefineProp(this, 'placement', _descriptor5, this);

            _initDefineProp(this, 'selector', _descriptor6, this);

            _initDefineProp(this, 'title', _descriptor7, this);

            _initDefineProp(this, 'trigger', _descriptor8, this);

            _initDefineProp(this, 'viewport', _descriptor9, this);
        }

        PopoverElement.prototype.attached = function attached() {
            if (!this.title) {
                throw new Error('title must be defined');
            }
            $(this.target.firstElementChild).popover({
                animation: this.animation,
                container: this.container,
                delay: this.delay,
                html: this.html,
                placement: this.placement,
                selector: this.selector,
                template: this.template.firstElementChild.outerHTML,
                title: this.title,
                trigger: this.trigger,
                viewport: this.viewport
            });
        };

        return PopoverElement;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'animation', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return true;
        }
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'container', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return false;
        }
    }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'delay', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return 0;
        }
    }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'html', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return false;
        }
    }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, 'placement', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return 'left';
        }
    }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, 'selector', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return false;
        }
    }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, 'title', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return 'placeholder title';
        }
    }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, 'trigger', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return 'click';
        }
    }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, 'viewport', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return { selector: 'body', padding: 0 };
        }
    })), _class2)) || _class);
});
define('text!views/dashboard/popover-element.html', ['module'], function(module) { module.exports = "<template>\n    <div ref=\"target\">\n        <slot name=\"popoverTarget\">\n            <button class=\"btn btn-block btn-default\">Default popover (custom element)</button>\n        </slot>\n    </div>\n    <div ref=\"template\">\n        <slot name=\"popoverTemplate\">\n            <div class=\"popover\" role=\"tooltip\">\n                <div class=\"arrow\"></div>\n                <h3 class=\"popover-title\"></h3>\n                <div class=\"popover-content\"></div>\n            </div>\n        </slot>\n    </div>\n</template>\n"; });
var cov_iyoeqvogl = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/operation-panel-item.js',
        hash = '5b82faf8866a57ef3d108359bc67a6971f6833b7',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/operation-panel-item.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/operation-panel-item',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.OperationPanelItem = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _desc, _value, _class, _descriptor, _descriptor2, _descriptor3;

    var OperationPanelItem = exports.OperationPanelItem = (_class = function OperationPanelItem() {
        _classCallCheck(this, OperationPanelItem);

        _initDefineProp(this, 'val', _descriptor, this);

        _initDefineProp(this, 'label', _descriptor2, this);

        _initDefineProp(this, 'reset', _descriptor3, this);
    }, (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'val', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, 'label', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'reset', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class);
});
define('text!views/dashboard/operation-panel-item.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/hectaresToAcres\"></require>\n    <div class=\"row equal\">\n        <label class=\"col-xs-5 m-t-3\" style=\"font-size: 1.8rem\" i18n=\"${label}\"></label>\n        <div class=\"col-xs-4 m-t-3 operation-txt\">${val | hectaresToAcres:'0.0'}</div>\n    </div>\n</template>\n"; });
var cov_jg8y5ra4l = function () {
  var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/gauge.js',
      hash = '6193db0feee11b8aa52a62eb5aa47479d1bcc816',
      global = new Function('return this')(),
      gcv = '__coverage__',
      coverageData = {
    path: '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/gauge.js',
    statementMap: {},
    fnMap: {},
    branchMap: {},
    s: {},
    f: {},
    b: {},
    _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('views/dashboard/gauge',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.Gauge = undefined;

  function _initDefineProp(target, property, descriptor, context) {
    if (!descriptor) return;
    Object.defineProperty(target, property, {
      enumerable: descriptor.enumerable,
      configurable: descriptor.configurable,
      writable: descriptor.writable,
      value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
    });
  }

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
    var desc = {};
    Object['ke' + 'ys'](descriptor).forEach(function (key) {
      desc[key] = descriptor[key];
    });
    desc.enumerable = !!desc.enumerable;
    desc.configurable = !!desc.configurable;

    if ('value' in desc || desc.initializer) {
      desc.writable = true;
    }

    desc = decorators.slice().reverse().reduce(function (desc, decorator) {
      return decorator(target, property, desc) || desc;
    }, desc);

    if (context && desc.initializer !== void 0) {
      desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
      desc.initializer = undefined;
    }

    if (desc.initializer === void 0) {
      Object['define' + 'Property'](target, property, desc);
      desc = null;
    }

    return desc;
  }

  function _initializerWarningHelper(descriptor, context) {
    throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
  }

  var _desc, _value, _class, _descriptor;

  var Gauge = exports.Gauge = (_class = function Gauge() {
    _classCallCheck(this, Gauge);

    _initDefineProp(this, 'classes', _descriptor, this);
  }, (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'classes', [_aureliaFramework.bindable], {
    enumerable: true,
    initializer: null
  })), _class);
});
define('text!views/dashboard/gauge.html', ['module'], function(module) { module.exports = "<template>\n    <div style=\"position: relative\">\n        <label for=\"psi-btn\" class=\"gauge-label-box\">\n            <div class=\"gauge-label\">\n                <slot name=\"label\">\n                </slot>\n            </div>\n        </label>\n        <button id=\"psi-btn\" class=\"bg-dark operations-btn-dark operation-bdr-success ${classes} btn-circle btn-xl\">\n            <slot name=\"reading\">\n            </slot>\n        </button>\n    </div>\n</template>\n"; });
var cov_2djrkdv05t = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/gauge-display.js',
        hash = 'ea08321ebe0f4a35758b32b75e52378433204a31',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/gauge-display.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/gauge-display',['exports', 'aurelia-framework', 'aurelia-dialog', '../../services/gateway-service', './system-status', './rate-control', './pressure-control', './test-speed', './area-meter', './tank-meter', '../../resources/value-converters/mlPerHectareToGpa'], function (exports, _aureliaFramework, _aureliaDialog, _gatewayService, _systemStatus, _rateControl, _pressureControl, _testSpeed, _areaMeter, _tankMeter, _mlPerHectareToGpa) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.GaugeDisplay = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _class, _desc, _value, _class2, _descriptor, _descriptor2;

    var GaugeDisplay = exports.GaugeDisplay = (_dec = (0, _aureliaFramework.inject)(_aureliaDialog.DialogService, _gatewayService.GatewayService, _mlPerHectareToGpa.MlPerHectareToGpaValueConverter, _rateControl.RateControl), _dec2 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec3 = (0, _aureliaFramework.computedFrom)('state.tank1AlarmDisplayed', 'state.tank1AlarmPercent', 'state.tank1AlarmVolume', 'state.tank1Current', 'state.Tank1Full'), _dec4 = (0, _aureliaFramework.computedFrom)('state.systemRate1Color', 'state.taskMode'), _dec5 = (0, _aureliaFramework.computedFrom)('state.testSpeed'), _dec6 = (0, _aureliaFramework.computedFrom)('state.systemPressure1Color', 'state.fluidMode'), _dec7 = (0, _aureliaFramework.computedFrom)('state.systemStatusColor'), _dec8 = (0, _aureliaFramework.computedFrom)('state.pumpRecirculation'), _dec9 = (0, _aureliaFramework.computedFrom)('state.recirculationValve'), _dec10 = (0, _aureliaFramework.computedFrom)('state.startupDone'), _dec11 = (0, _aureliaFramework.computedFrom)('state.displayRateOrDutyCycle'), _dec12 = (0, _aureliaFramework.computedFrom)('state.displayRateOrDutyCycle', 'state.systemRate1NozzleDc'), _dec(_class = (_class2 = function () {
        function GaugeDisplay(dialogService, gatewayService, mlPerHectareToGpaValueConverter) {
            _classCallCheck(this, GaugeDisplay);

            _initDefineProp(this, 'state', _descriptor, this);

            this.editDelta = {};
            this.settingProps = ['StartupDone'];
            this.valveState = 0;
            this.subscribedProperties = ['GroundSpeed', 'TestSpeed', 'SystemPressure1', 'SystemRate', 'TaskMode', 'FluidMode', 'SystemRateIndex', 'SystemRateAuto', 'SystemRateTarget0', 'SystemRateTarget1', 'SystemRateTarget2', 'SystemPressure1Color', 'SystemRate1Color', 'Area1Current', 'Area1Counter', 'Area1Lifetime', 'Area1CurrentDisplayed', 'Tank1Current', 'Tank1Counter', 'Tank1Lifetime', 'Tank1CurrentDisplayed', 'SystemStatusCurrent', 'SystemStatusColor', 'PumpRecirculation', 'RecirculationValve', 'StartupDone', 'DisplayRateOrDutyCycle', 'SystemRate1NozzleDc', 'Tank1AlarmDisplayed', 'Tank1AlarmPercent', 'Tank1AlarmVolume', 'Tank1Full'];

            _initDefineProp(this, 'isCloud', _descriptor2, this);

            this.gatewayService = gatewayService;
            this.dialogService = dialogService;

            this.recirculationIsEnabled = false;

            this.getGatewayServiceState();

            window.setInterval(this.connectionLoop, 1000, this);

            this.mlPerHectareToGpaValueConverter = mlPerHectareToGpaValueConverter;
        }

        GaugeDisplay.prototype.connectionLoop = function connectionLoop(self) {
            self.gatewayService.getProperties(self.settingProps).then(function (results) {
                var connected = results[0];
                self.state.startupDone = connected;
            });
        };

        GaugeDisplay.prototype.attached = function attached() {
            this.gatewayService.subscribe(this.subscribedProperties, 'gauge-display');
        };

        GaugeDisplay.prototype.detached = function detached() {
            this.dialogService.closeAll();
        };

        GaugeDisplay.prototype.unbind = function unbind() {
            this.gatewayService.unsubscribe(this.subscribedProperties, 'gauge-display');
        };

        GaugeDisplay.prototype.send = function send() {
            this.gatewayService.send(this.editDelta);

            this.editDelta = {};
        };

        GaugeDisplay.prototype.getGatewayServiceState = function getGatewayServiceState() {
            this.state = this.gatewayService.getState();
        };

        GaugeDisplay.prototype.openSystemStatus = function openSystemStatus() {
            this.dialogService.open({ viewModel: _systemStatus.SystemStatus, lock: false }).whenClosed(function (response) {});
        };

        GaugeDisplay.prototype.openRateControl = function openRateControl() {
            if (this.state.taskMode !== 0) {
                this.dialogService.open({ viewModel: _rateControl.RateControl, lock: false }).whenClosed(function (response) {});
            }
        };

        GaugeDisplay.prototype.openPressureControl = function openPressureControl() {
            if (this.state.fluidMode === 0 || this.state.fluidMode === 1 || this.state.fluidMode === 2) {
                this.dialogService.open({ viewModel: _pressureControl.PressureControl, lock: false }).whenClosed(function (response) {});
            }
        };

        GaugeDisplay.prototype.openTestSpeed = function openTestSpeed() {
            this.dialogService.open({ viewModel: _testSpeed.TestSpeed, lock: false, overlayDismiss: true }).whenClosed(function (response) {});
        };

        GaugeDisplay.prototype.openAreaMeter = function openAreaMeter() {
            this.dialogService.open({ viewModel: _areaMeter.AreaMeter, lock: false }).whenClosed(function (response) {});
        };

        GaugeDisplay.prototype.openTankMeter = function openTankMeter() {
            this.dialogService.open({ viewModel: _tankMeter.TankMeter, lock: false }).whenClosed(function (response) {});
        };

        GaugeDisplay.prototype.recirculationTapped = function recirculationTapped() {
            var rt = this.valveState;
            if (rt === 0) {
                this.editDelta = { recirculationValve: 1 };
            } else {
                this.editDelta = { recirculationValve: 0 };
            }
            this.send();
        };

        GaugeDisplay.prototype.getActiveTarget = function getActiveTarget() {
            return this.state['systemRateTarget' + this.state.systemRateIndex];
        };

        _createClass(GaugeDisplay, [{
            key: 'tankLevelClass',
            get: function get() {
                var alarmLevel = this.state.tank1AlarmVolume;
                if (this.state.tank1AlarmDisplayed === 1) {
                    alarmLevel = this.state.tank1Full * this.state.tank1AlarmPercent / 100;
                }
                if (alarmLevel > this.state.tank1Current) {
                    return 'operation-bdr-warn';
                }

                return 'operation-bdr-success';
            }
        }, {
            key: 'rateControlClass',
            get: function get() {
                var rateColor = this.state.systemRate1Color;
                if (this.state) {
                    if (this.state.taskMode === 0) {
                        return 'operation-bdr-off';
                    }
                    if (rateColor === 0) {
                        return 'operation-bdr-success';
                    } else if (rateColor === 1) {
                        return 'operation-bdr-error';
                    } else if (rateColor === 2) {
                        return 'operation-bdr-warn';
                    } else if (rateColor === 3) {
                        return 'operation-bdr-disabled';
                    }
                }
                return 'operation-bdr-off';
            }
        }, {
            key: 'testSpeedClass',
            get: function get() {
                var testSpeed = this.state.testSpeed;
                if (this.state) {
                    if (testSpeed > 0) {
                        return 'operation-bdr-warn';
                    }
                }
                return 'operation-bdr-success';
            }
        }, {
            key: 'currentTankDisplayed',
            get: function get() {
                var displayIndex = this.state.tank1CurrentDisplayed;
                switch (displayIndex) {
                    case 0:
                        return this.state.tank1Current;
                    case 1:
                        return this.state.tank1Counter;
                    case 2:
                        return this.state.tank1Lifetime;
                    default:
                        return this.state.tank1Current;
                }
            }
        }, {
            key: 'currentAreaDisplayed',
            get: function get() {
                var displayIndex = this.state.area1CurrentDisplayed;
                switch (displayIndex) {
                    case 0:
                        return this.state.area1Current;
                    case 1:
                        return this.state.area1Counter;
                    case 2:
                        return this.state.area1Lifetime;
                    default:
                        return this.state.area1Current;
                }
            }
        }, {
            key: 'pressureControlClass',
            get: function get() {
                var pressure1Color = this.state.systemPressure1Color;
                if (this.state) {
                    if (this.state.fluidMode === 3 || this.state.fluidMode === 4) {
                        return 'operation-bdr-off';
                    }
                    switch (pressure1Color) {
                        case 0:
                            return 'operation-bdr-success';
                        case 1:
                            return 'operation-bdr-error';
                        case 2:
                            return 'operation-bdr-warn';
                        case 3:
                            return 'operation-bdr-disabled';
                        default:
                            return 'operation-bdr-off';
                    }
                }
                return 'operation-bdr-off';
            }
        }, {
            key: 'systemStatusClass',
            get: function get() {
                var color = this.state.systemStatusColor;
                if (this.state) {
                    if (color === 0) {
                        return 'operation-bdr-success';
                    } else if (color === 1) {
                        return 'operation-bdr-error';
                    } else if (color === 2) {
                        return 'operation-bdr-warn';
                    } else if (color === 3) {
                        return 'operation-bdr-disabled';
                    }
                }
                return 'operation-bdr-off';
            }
        }, {
            key: 'systemRecirculationClass',
            get: function get() {
                var status = this.state.pumpRecirculation;
                if (this.state) {
                    if (status === 0) {
                        return 'btn-hidden';
                    }
                    return 'btn-visible';
                }
                return 'btn-hidden';
            }
        }, {
            key: 'recirculationValveStatus',
            get: function get() {
                var valve = this.state.recirculationValve;
                this.valveState = valve;
                if (this.state) {
                    if (valve === 0) {
                        return 'operation-bdr-success';
                    }
                    return 'operation-bdr-warn';
                }
                return 'operation-bdr-off';
            }
        }, {
            key: 'systemConnected',
            get: function get() {
                var status = this.state.startupDone;
                if (status) {
                    if (status === 1) {
                        return 'btn-hidden';
                    }
                    return 'btn-visible';
                }
                return 'btn-visible';
            }
        }, {
            key: 'flowLabel',
            get: function get() {
                if (this.state.displayRateOrDutyCycle === 0) {
                    return 'GPA';
                }
                return 'DC';
            }
        }, {
            key: 'flowValue',
            get: function get() {
                if (this.state.systemRate && this.state.displayRateOrDutyCycle === 0) {
                    return this.mlPerHectareToGpaValueConverter.toView(this.state.systemRate, '0.0');
                }
                return this.state.systemRate1NozzleDc;
            }
        }]);

        return GaugeDisplay;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'state', [_dec2], {
        enumerable: true,
        initializer: function initializer() {
            return {};
        }
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'isCloud', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _applyDecoratedDescriptor(_class2.prototype, 'tankLevelClass', [_dec3], Object.getOwnPropertyDescriptor(_class2.prototype, 'tankLevelClass'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'rateControlClass', [_dec4], Object.getOwnPropertyDescriptor(_class2.prototype, 'rateControlClass'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'testSpeedClass', [_dec5], Object.getOwnPropertyDescriptor(_class2.prototype, 'testSpeedClass'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'pressureControlClass', [_dec6], Object.getOwnPropertyDescriptor(_class2.prototype, 'pressureControlClass'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'systemStatusClass', [_dec7], Object.getOwnPropertyDescriptor(_class2.prototype, 'systemStatusClass'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'systemRecirculationClass', [_dec8], Object.getOwnPropertyDescriptor(_class2.prototype, 'systemRecirculationClass'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'recirculationValveStatus', [_dec9], Object.getOwnPropertyDescriptor(_class2.prototype, 'recirculationValveStatus'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'systemConnected', [_dec10], Object.getOwnPropertyDescriptor(_class2.prototype, 'systemConnected'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'flowLabel', [_dec11], Object.getOwnPropertyDescriptor(_class2.prototype, 'flowLabel'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'flowValue', [_dec12], Object.getOwnPropertyDescriptor(_class2.prototype, 'flowValue'), _class2.prototype)), _class2)) || _class);
});
define('text!views/dashboard/gauge-display.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"views/dashboard/gauge\"></require>\n    <require from=\"resources/value-converters/mlToGal\"></require>\n    <require from=\"resources/value-converters/mlPerHectareToGpa\"></require>\n    <require from=\"resources/value-converters/hectaresToAcres\"></require>\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\n    <require from=\"resources/value-converters/mmPerSecondToMph\"></require>\n    <require from=\"resources/value-converters/bitToStatus\"></require>\n    <require from=\"views/dashboard/rate-control\"></require>\n\n    <div if.bind=\"!isCloud\" class=\"interactive-panel-left\">\n        <div class=\"row\">\n            <div class=\"col-sm-12\">\n                <gauge classes.bind=\"rateControlClass\" click.delegate=\"openRateControl()\">\n                    <span slot=\"label\">${flowLabel}</span>\n                    <span slot=\"reading\"> ${flowValue}</span>\n                </gauge>\n                <gauge classes.bind=\"pressureControlClass\" click.delegate=\"openPressureControl()\">\n                    <span slot=\"label\">${\"PSI\" | t}</span>\n                    <span slot=\"reading\"> ${state.systemPressure1 | kpaToPsi }</span>\n                </gauge>\n                <gauge classes.bind=\"testSpeedClass\" click.delegate=\"openTestSpeed()\">\n                    <span slot=\"label\">${\"MPH\" | t}</span>\n                    <span slot=\"reading\"> ${state.groundSpeed | mmPerSecondToMph }</span>\n                </gauge>\n            </div>\n        </div>\n    </div>\n\n    <div if.bind=\"!isCloud\" class=\"interactive-panel\">\n        <div class=\"row\">\n            <div class=\"col-sm-12\">\n                <gauge classes.bind=\"systemStatusClass\" click.delegate=\"openSystemStatus()\">\n                    <span slot=\"label\">${\"System Status\" | t}</span>\n                    <span slot=\"reading\">  ${state.systemStatusCurrent | bitToStatus } </span>\n                </gauge>\n                <gauge click.delegate=\"openAreaMeter()\">\n                    <span style=\"word-spacing: 100vw\" slot=\"label\">${\"Area Meter\" | t}</span>\n                    <span slot=\"reading\">${currentAreaDisplayed | hectaresToAcres:'0.0'}</span>\n                </gauge>\n                <gauge classes.bind=\"tankLevelClass\" click.delegate=\"openTankMeter()\">\n                    <span style=\"word-spacing: 100vw\" slot=\"label\">${\"Tank Meter\" | t}</span>\n                    <span slot=\"reading\">${currentTankDisplayed | mlToGal:'0.0'}</span>\n                </gauge>\n            </div>\n        </div>\n    </div>\n\n    <button click.delegate=\"recirculationTapped()\" class=\"recirculation-icon ${recirculationValveStatus} ${systemRecirculationClass}\">\n        <img src=\"../assets/recirculationIcon.png\" width=\"22\">\n        <slot name=\"reading\">\n        </slot>\n    </button>\n\n    <button class=\"disconnect-icon btn-red ${systemConnected}\">\n        <span slot=\"reading\">Disconnected!</span>\n        <slot name=\"reading\">\n        </slot>\n    </button>\n\n</template>\n"; });
var cov_23miv6xzt6 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/dashboard.js',
        hash = '4ea8013bdd27fc991f6dad2786024d2ee9da6fe6',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/dashboard.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/dashboard',['exports', 'aurelia-framework', '../../services/file-service', '../../services/gateway-service', '../../services/mapping-service', '../../services/spray-session-service', '../../services/log-event-service', '../map/map-view-state', 'px-owl-carousel'], function (exports, _aureliaFramework, _fileService, _gatewayService, _mappingService, _spraySessionService, _logEventService, _mapViewState) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Dashboard = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _class, _desc, _value, _class2, _descriptor;

    var Dashboard = exports.Dashboard = (_dec = (0, _aureliaFramework.inject)(_fileService.FileService, _gatewayService.GatewayService, _mappingService.MappingService, _spraySessionService.SpraySessionService, _logEventService.LogEventService, _aureliaFramework.BindingEngine, _mapViewState.MapViewState), _dec2 = (0, _aureliaFramework.computedFrom)('mapViewState.graphVisible', 'mapViewState.toolbarVisible'), _dec(_class = (_class2 = function () {
        function Dashboard(fileService, gatewayService, mappingService, spraySessionService, logEventService, bindingEngine, mapViewState) {
            _classCallCheck(this, Dashboard);

            _initDefineProp(this, 'state', _descriptor, this);

            this.editDelta = {};
            this.lastSystemError = {};
            this.showErrors = true;
            this.subscribeProperties = ['ConnectedToSwathPro', 'HubAlarms'];
            this.graphVisible = true;
            this.toolbarVisible = false;

            this.bindingEngine = bindingEngine;
            this.fileService = fileService;
            this.gatewayService = gatewayService;
            this.mappingService = mappingService;
            this.spraySessionService = spraySessionService;
            this.logEventService = logEventService;
            this.mapViewState = mapViewState;

            this.getGatewayServiceState();
            this.getLastError();
            document.body.style.overflow = "hidden";
        }

        Dashboard.prototype.send = function send() {
            this.gatewayService.send(this.editDelta);

            this.editDelta = {};
        };

        Dashboard.prototype.attached = function attached() {
            var _this = this;

            this.gatewayService.subscribe(this.subscribeProperties, 'dashboard');

            this.subscription = this.bindingEngine.propertyObserver(this.state, 'boomSwitchSource').subscribe(function (newValue, oldValue) {
                _this.boomSwitchSourceChanged(newValue, oldValue);
            });

            this.boomCarousel = $('#boom-carousel').owlCarousel({
                items: 1,
                mouseDrag: false,
                touchDrag: true
            });

            this.gatewayService.getState();
        };

        Dashboard.prototype.unbind = function unbind() {
            this.gatewayService.unsubscribe(this.subscribeProperties, 'dashboard');
        };

        Dashboard.prototype.detached = function detached() {
            this.subscription.dispose();
            $('#graph-tab').owlCarousel('destroy');
            $('#boom-carousel').owlCarousel('destroy');
        };

        Dashboard.prototype.boomSwitchSourceChanged = function boomSwitchSourceChanged(newValue, oldValue) {
            $('#boom-carousel').owlCarousel('destroy');
            $('#boom-carousel').owlCarousel({
                items: 1,
                mouseDrag: false,
                touchDrag: true
            });
        };

        Dashboard.prototype.getGatewayServiceState = function getGatewayServiceState() {
            this.state = this.gatewayService.getState();
        };

        Dashboard.prototype.getLastError = function getLastError() {
            this.logEventService.connect();
            this.lastSystemError = this.logEventService.getLastError();
        };

        Dashboard.prototype.toggleErrors = function toggleErrors() {
            this.map.toggleErrors();
        };

        Dashboard.prototype.toggleGraph = function toggleGraph() {
            this.mapViewState.toggleGraph();
        };

        Dashboard.prototype.elementResized = function elementResized(detail) {
            console.log("width=" + detail.width);
        };

        Dashboard.prototype.boundaryDistanceChanged = function boundaryDistanceChanged(dist) {
            this.editDelta.boundaryDistance = dist;
            this.send();
        };

        Dashboard.prototype.overlapDistanceChanged = function overlapDistanceChanged(dist) {
            this.editDelta.overlapDistance = dist;
            this.send();
        };

        Dashboard.prototype.lookaheadChanged = function lookaheadChanged(val) {
            this.editDelta.lookAheadTime = val;
            this.send();
        };

        _createClass(Dashboard, [{
            key: 'showBar',
            get: function get() {
                this.graphVisible = this.mapViewState.graphVisible;
                this.toolbarVisible = this.mapViewState.toolbarVisible;
                return '';
            }
        }]);

        return Dashboard;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'state', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return {
                boomSwitchSource: 2
            };
        }
    }), _applyDecoratedDescriptor(_class2.prototype, 'showBar', [_dec2], Object.getOwnPropertyDescriptor(_class2.prototype, 'showBar'), _class2.prototype)), _class2)) || _class);
});
define('text!views/dashboard/dashboard.html', ['module'], function(module) { module.exports = "<template view-cache=\"*\">\n    <require from=\"components/graphtab/nozzle-info\"></require>\n    <require from=\"components/graphtab/pressure-chart\"></require>\n    <require from=\"components/graphtab/duty-chart\"></require>\n    <require from=\"views/dashboard/soft-boom-switches\"></require>\n    <require from=\"views/dashboard/boom-nozzle-presets\"></require>\n    <require from=\"views/dashboard/boundary-map-recorder\"></require>\n    <require from=\"resources/value-converters/number-format\"></require>\n    <require from=\"../map/map\"></require>\n    <require from=\"components/shared/toolbar\"></require>\n    <div class=\"base-container ${showBar}\">\n        <!--<div class=\"test-h\">\n        <p>header (sized to content)</p>\n    </div>\n    <div class=\"test-c\">\n        <p>content (fills remaining space)</p>\n    </div>-->\n        <!--<div class=\"dashboard-container\">\n\n    </div>-->\n        <div if.bind=\"toolbarVisible\" id=\"toolbar-container\">\n            <toolbar id=\"toolbar\"></toolbar>\n        </div>\n        <div class=\"dashboard-map-container\" resizeable resize.trigger=\"elementResized($event.detail)\">\n            <div class=\"dashboard-map\">\n                <map view-model.ref=\"map\" state.bind=\"state\"></map>\n            </div>\n        </div>\n        <div>\n            <button click.delegate=\"toggleGraph()\" class=\"btn-primary\" style=\"width: 100%\">^</button>\n        </div>\n        <div if.bind=\"graphVisible\" class=\"dashboard-graph-container\">\n            <div >\n                <div>\n                    <div id=\"boom-carousel\" class=\"owl-carousel owl-centered dashboard-carousel\">\n                        <div id=\"presets\" class=\"container-fluid\" style=\"width: 100%;\">\n                            <boom-nozzle-presets rownumber=\"1\"></boom-nozzle-presets>\n                        </div>\n                        <div if.bind=\"state.connectedToSwathPro\" class=\"container-fluid\" style=\"width: 100%;\">\n                            <boom-nozzle-presets rowNumber=\"2\"></boom-nozzle-presets>\n                        </div>\n                        <div if.bind=\"!state.connectedToSwathPro\" id=\"recorder\" as-element=\"boundary-map-recorder\" class=\"container-fluid\" style=\"width: 100%;\"></div>\n                    </div>\n                </div>\n                <div class=\"row\">\n                    <nozzle-info state.bind=\"state\"></nozzle-info>\n                </div>\n            </div>\n        </div>        \n    </div>    \n</template>\n"; });
var cov_1ub1foo1xu = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/cloud-dashboard.js',
        hash = '61b3fa29a99eb2eb83a61bee4cda76d461c9a6fc',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/cloud-dashboard.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/cloud-dashboard',['exports', 'aurelia-framework', '../../services/spray-session-service', '../../services/file-service', '../../services/mapping-service'], function (exports, _aureliaFramework, _spraySessionService, _fileService, _mappingService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.CloudDashboard = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var CloudDashboard = exports.CloudDashboard = (_dec = (0, _aureliaFramework.inject)(_spraySessionService.SpraySessionService, _fileService.FileService, _mappingService.MappingService), _dec(_class = function () {
        function CloudDashboard(spraySessionService, fileService, mappingService) {
            _classCallCheck(this, CloudDashboard);

            this.selectedSpraySession = null;

            this.fileService = fileService;
            this.spraySessionService = spraySessionService;
            this.mappingService = mappingService;
            this.getSpraySessions();
            this.getBoundaryMaps();
        }

        CloudDashboard.prototype.activate = function activate(params) {
            this.machineCode = params.machineId;
        };

        CloudDashboard.prototype.getBoundaryMaps = function getBoundaryMaps() {
            var _this = this;

            this.fileService.getBoundaryMaps().then(function (response) {
                return _this.boundaryMaps = response;
            });
        };

        CloudDashboard.prototype.boundaryMapChanged = function boundaryMapChanged(changedValue) {
            var _this2 = this;

            this.fileService.getAppliedAsMaps(changedValue).then(function (response) {
                return _this2.appliedAsMaps = response;
            });
            this.mappingService.sendBoundaryMap(this.selectedBoundaryMap);
        };

        CloudDashboard.prototype.getSpraySessions = function getSpraySessions() {
            var _this3 = this;

            this.spraySessionService.getSpraySessions().then(function (response) {
                return _this3.spraySessions = response;
            });
        };

        CloudDashboard.prototype.spraySessionChanged = function spraySessionChanged(spraySession) {
            var _this4 = this;

            if (spraySession) {
                this.spraySessionService.sendSpraySession(spraySession.spraySessionId).then(function () {
                    return _this4.map.loadSpraySession(spraySession);
                });
            }
        };

        return CloudDashboard;
    }()) || _class);
});
define('text!views/dashboard/cloud-dashboard.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"../map/map\"></require>\n    <div class=\"row\">\n        <div class=\"col-sm-12\">\n            <div class=\"pull-left dashboard-dropdown\">\n                <label for=\"spray_session\">${\"SpraySession\" | t}</label>\n                <select value.bind=\"selectedSpraySession\" change.delegate=\"spraySessionChanged(selectedSpraySession)\" class=\"form-control\" id=\"spray_session\">\n                    <option model.bind=\"null\">${\"Choose\" | t}...</option>\n                    <option repeat.for=\"session of spraySessions\" model.bind=\"session\">\n                        ${session.spraySessionId}\n                    </option>\n                </select>\n            </div>\n        </div>\n    </div>\n    <div>\n        <div class=\"row dashboard-map-cloud\">\n            <div class=\"col-sm-12\">\n                <map view-model.ref=\"map\" state.bind=\"state\" session.bind=\"selectedSpraySession\" ></map>\n            </div>\n        </div>\n    </div>\n</template>\n"; });
var cov_2buuf7l8nk = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/boundary-map-recorder.js',
        hash = '7255e1ff79ef9a17b0d2828b0d7784cc97d0f00c',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/boundary-map-recorder.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/boundary-map-recorder',['exports', 'aurelia-framework', 'moment', '../../services/boundary-map-service', '../../services/gateway-service', './recorder-settings', './save-recording', 'aurelia-dialog'], function (exports, _aureliaFramework, _moment, _boundaryMapService, _gatewayService, _recorderSettings, _saveRecording, _aureliaDialog) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.BoundaryMapRecorder = undefined;

    var _moment2 = _interopRequireDefault(_moment);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    var _dec, _dec2, _class, _desc, _value, _class2;

    var BoundaryMapRecorder = exports.BoundaryMapRecorder = (_dec = (0, _aureliaFramework.inject)(_boundaryMapService.BoundaryMapService, _gatewayService.GatewayService, _aureliaDialog.DialogService), _dec2 = (0, _aureliaFramework.computedFrom)('status'), _dec(_class = (_class2 = function () {
        function BoundaryMapRecorder(boundaryMapService, gatewayService, dialogService) {
            _classCallCheck(this, BoundaryMapRecorder);

            this.status = 'OFF';
            this.side = 1;
            this.settingProps = ['LeftSetpoint', 'RightSetpoint'];

            this.boundaryMapService = boundaryMapService;
            this.gatewayService = gatewayService;
            this.dialogService = dialogService;
        }

        BoundaryMapRecorder.prototype.attached = function attached() {
            var _this = this;

            this.gatewayService.getProperties(this.settingProps).then(function (results) {
                _this.settings = { leftSetpoint: results[0], rightSetpoint: results[1] };
            });

            this.boundaryMapService.connect(null, this.addPoint.bind(this), this.prunePoint.bind(this), this.clearBoundary.bind(this)).then(function (status) {
                _this.status = status.status;
                _this.side = status.side;
                _this.recordInternal = status.internal;
                _this.saveEnabled = status.saveEnabled;
                _this.leftSetpoint = state.leftSetpoint;
                _this.rightSetpoint = state.rightSetpoint;
                _this.points = status.boundaryPoints.length;
                status.internals.forEach(function (i) {
                    _this.points += i.length;
                });
                _this.points += status.internalPoints.length;
            });
        };

        BoundaryMapRecorder.prototype.openSettings = function openSettings() {
            var _this2 = this;

            this.dialogService.open({ viewModel: _recorderSettings.RecorderSettings, model: { leftSetpoint: this.settings.leftSetpoint, rightSetpoint: this.settings.rightSetpoint }, lock: false }).whenClosed(function (response) {
                if (!response.wasCancelled) {
                    _this2.settings = response.output;
                    _this2.gatewayService.send(response.output);
                }
            });
        };

        BoundaryMapRecorder.prototype.unbind = function unbind() {};

        BoundaryMapRecorder.prototype.addPoint = function addPoint(point, internal) {
            this.points += 1;
        };

        BoundaryMapRecorder.prototype.prunePoint = function prunePoint(point, internal) {
            this.points -= 1;
        };

        BoundaryMapRecorder.prototype.clearBoundary = function clearBoundary() {
            this.points = 0;
        };

        BoundaryMapRecorder.prototype.record = function record() {
            this.boundaryMapService.recordBoundary();
            this.status = 'ON';
            this.saveEnabled = true;
        };

        BoundaryMapRecorder.prototype.pause = function pause() {
            this.boundaryMapService.pauseBoundary();
            this.status = 'PAUSED';
        };

        BoundaryMapRecorder.prototype.save = function save() {
            var _this3 = this;

            this.boundaryMapService.getBoundaryMap().then(function (aResponse) {
                if (aResponse) {
                    _this3.dialogService.open({ viewModel: _saveRecording.SaveRecording, model: { name: (0, _moment2.default)().format('MMMM Do YYYY, h:mm:ss a'), mapName: aResponse.boundaryGroup.name }, lock: false }).whenClosed(function (response) {
                        if (!response.wasCancelled) {
                            _this3.boundaryMapService.saveBoundary(response.output.aName, response.output.aMap, response.output.type);
                            _this3.status = 'OFF';
                        }
                    });
                }
            });
        };

        BoundaryMapRecorder.prototype.discard = function discard() {
            this.boundaryMapService.discardBoundary();
            this.status = 'OFF';
            this.clearBoundary();
            this.saveEnabled = false;
        };

        BoundaryMapRecorder.prototype.internal = function internal() {
            this.recordInternal = !this.recordInternal;
            this.boundaryMapService.setRecordInternal(this.recordInternal);
        };

        BoundaryMapRecorder.prototype.setSide = function setSide(side) {
            this.side = side;
            this.boundaryMapService.setBoundaryRecorderSide(side);
        };

        _createClass(BoundaryMapRecorder, [{
            key: 'statusCss',
            get: function get() {
                if (this.status === 'ON') {
                    return 'text-success';
                }
                if (this.status === 'PAUSED') {
                    return 'text-warning';
                }
                return 'text-danger';
            }
        }]);

        return BoundaryMapRecorder;
    }(), (_applyDecoratedDescriptor(_class2.prototype, 'statusCss', [_dec2], Object.getOwnPropertyDescriptor(_class2.prototype, 'statusCss'), _class2.prototype)), _class2)) || _class);
});
define('text!views/dashboard/boundary-map-recorder.html', ['module'], function(module) { module.exports = "<template>\n    <div class=\"container-fluid\">\n        <table align=\"center\">\n            <tr class=\"text-primary\">\n                <td style=\"padding: 5px; width: 50px\">\n                    <img height=\"40em\" src=\"../assets/left${side == 0 ? '' : '_blank'}.png\" alt=\"${'Left Bound' | t}\" click.delegate=\"setSide(0)\" />\n                </td>\n\n                <td style=\"padding: 5px;\">\n                    <span class=\"operations-btn-dark ${statusCss}\" style=\"padding: 5px;\">${status | t}</span>\n                </td>\n\n                <!--<td style=\"padding: 5px;\">\n                    <input type=\"button\" class=\"btn boom-btn btn-default ${recordInternal ? 'border border-success' : ''} btn-lg\" value=\"${'Internal' | t}\" click.delegate=\"internal()\" />\n                </td>-->\n\n                <td style=\"padding: 5px;\">\n                    <input type=\"button\" if.bind=\"status !== 'ON'\" class=\"btn boom-btn btn-danger btn-lg\" value=\"${'Record' | t}\" click.delegate=\"record()\" />\n                    <input type=\"button\" if.bind=\"status === 'ON'\" class=\"btn boom-btn btn-warning btn-lg\" value=\"${'Pause' | t}\" click.delegate=\"pause()\" />\n                </td>\n\n                <td style=\"padding: 5px;\">\n                    <input type=\"button\" disabled.bind=\"!saveEnabled\" class=\"btn boom-btn btn-default btn-lg\" value=\"${'Save' | t}\" click.delegate=\"save()\" />\n                </td>\n\n                <td style=\"padding: 5px;\">\n                    <input type=\"button\" disabled.bind=\"!saveEnabled\" class=\"btn boom-btn btn-default btn-lg\" value=\"${'Discard' | t}\" click.delegate=\"discard()\" />\n                </td>\n\n                <td style=\"padding: 5px;\">\n                    <span class=\"btn boom-btn btn-lg ion-android-more-vertical\" click.delegate=\"openSettings()\"></span>\n                </td>\n\n                <td style=\"padding: 5px; width: 50px\">\n                    <img height=\"40em\" src=\"../assets/right${side == 1 ? '' : '_blank'}.png\" alt=\"${'Right Bound' | t}\" click.delegate=\"setSide(1)\" />\n                </td>\n\n            </tr>\n        </table>\n    </div>\n    \n</template>\n"; });
var cov_247wxnfsh0 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/boom-nozzle-presets.js',
        hash = 'f8abb6e6f75137aefacc53cd83dc5e840fdc4c51',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/boom-nozzle-presets.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/boom-nozzle-presets',['exports', 'aurelia-framework', '../../services/gateway-service', 'aurelia-i18n'], function (exports, _aureliaFramework, _gatewayService, _aureliaI18n) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.BoomNozzlePresets = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _class, _desc, _value, _class2, _descriptor;

    var BoomNozzlePresets = exports.BoomNozzlePresets = (_dec = (0, _aureliaFramework.inject)(_gatewayService.GatewayService, _aureliaI18n.I18N), _dec2 = (0, _aureliaFramework.computedFrom)('state.preset1NozzleSizeIndex'), _dec(_class = (_class2 = function () {
        function BoomNozzlePresets(gatewayService, i18N) {
            _classCallCheck(this, BoomNozzlePresets);

            _initDefineProp(this, 'rownumber', _descriptor, this);

            this.settingProps = ['BoomPreset1Number1Name', 'BoomPreset1Number2Name', 'BoomPreset1Number3Name', 'BoomPreset1Number4Name', 'BoomPreset1Number5Name', 'BoomPreset1Number6Name', 'BoomPreset1Number7Name', 'BoomPreset1Number8Name', 'BoomPreset1Number9Name', 'BoomPreset1Number10Name', 'ConnectedToSwathPro'];
            this.subscribeProperties = ['Preset1NozzleSizeIndex'];
            this.editDelta = {};
            this.nozzleSizeLookup = [{
                label: 'Custom',
                index: 0,
                classes: 'btn-silver'
            }, {
                label: '3.0',
                index: 1,
                classes: 'btn-blue'
            }, {
                label: '4.0',
                index: 2,
                classes: 'btn-red'
            }, {
                label: '5.0',
                index: 3,
                classes: 'btn-brown'
            }, {
                label: '6.0',
                index: 4,
                classes: 'btn-gray'
            }, {
                label: '8.0',
                index: 5,
                classes: 'btn-white'
            }, {
                label: '10.0',
                index: 6,
                classes: 'btn-silver'
            }, {
                label: '12.5',
                index: 7,
                classes: 'btn-silver'
            }, {
                label: '15.0',
                index: 8,
                classes: 'btn-silver'
            }];

            this.gatewayService = gatewayService;
            this.i18N = i18N;
            this.state = this.gatewayService.getState();
        }

        BoomNozzlePresets.prototype.attached = function attached() {
            var _this = this;

            this.gatewayService.subscribe(this.subscribeProperties, 'boom-nozzle-presets');
            this.state = this.gatewayService.getState();
            this.gatewayService.getProperties(this.settingProps).then(function (results) {
                _this.state.boomPreset1Number1Name = results[0];
                _this.state.boomPreset1Number2Name = results[1];
                _this.state.boomPreset1Number3Name = results[2];
                _this.state.boomPreset1Number4Name = results[3];
                _this.state.boomPreset1Number5Name = results[4];
                _this.state.boomPreset1Number6Name = results[5];
                _this.state.boomPreset1Number7Name = results[6];
                _this.state.boomPreset1Number8Name = results[7];
                _this.state.boomPreset1Number9Name = results[8];
                _this.state.boomPreset1Number10Name = results[9];
            });
            this.isFirstRow = this.rownumber === '1';
        };

        BoomNozzlePresets.prototype.unbind = function unbind() {
            this.gatewayService.unsubscribe(this.subscribeProperties, 'boom-nozzle-presets');
        };

        BoomNozzlePresets.prototype.setBoomPreset = function setBoomPreset(index) {
            this.editDelta.preset1NumIndex = index;
            this.gatewayService.send(this.editDelta);
        };

        BoomNozzlePresets.prototype.setBoomPreset = function setBoomPreset(index) {
            this.editDelta.preset1NumIndex = index;
            this.gatewayService.send(this.editDelta);
        };

        BoomNozzlePresets.prototype.nextNozzleSize = function nextNozzleSize() {
            var _this2 = this;

            var current = this.nozzleSizeLookup.find(function (element) {
                return element.index === _this2.state.preset1NozzleSizeIndex;
            });
            var next = current.index + 1;
            if (next === this.nozzleSizeLookup.length) {
                next = 0;
            }
            var found = this.nozzleSizeLookup.find(function (element) {
                return element.index === next;
            });
            this.editDelta.preset1NozzleSizeIndex = found.index;
            this.gatewayService.send(this.editDelta);
        };

        _createClass(BoomNozzlePresets, [{
            key: 'selectedNozzleSize',
            get: function get() {
                var _this3 = this;

                if (typeof this.state.preset1NozzleSizeIndex !== 'undefined') {
                    var found = this.nozzleSizeLookup.find(function (element) {
                        return _this3.state.preset1NozzleSizeIndex === element.index;
                    });
                    return found.label ? found.label : 'NONE';
                }
                return 'NONE';
            }
        }, {
            key: 'selectedNozzleColor',
            get: function get() {
                var _this4 = this;

                if (typeof this.state.preset1NozzleSizeIndex !== 'undefined') {
                    var found = this.nozzleSizeLookup.find(function (element) {
                        return _this4.state.preset1NozzleSizeIndex === element.index;
                    });
                    return found.classes ? found.classes : '';
                }
                return '';
            }
        }]);

        return BoomNozzlePresets;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'rownumber', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _applyDecoratedDescriptor(_class2.prototype, 'selectedNozzleSize', [_dec2], Object.getOwnPropertyDescriptor(_class2.prototype, 'selectedNozzleSize'), _class2.prototype)), _class2)) || _class);
});
define('text!views/dashboard/boom-nozzle-presets.html', ['module'], function(module) { module.exports = "<template>\n    <div>        \n        <div if.bind=\"isFirstRow\" class=\"boom-btn-toolbar\" role=\"group\" style=\"width: 100%; padding-top: 5px;\">\n            <div if.bind=\"!state.connectedToSwathPro\">\n                <label class=\"bg-dark label label-md\" i18n=\"dashboard.boomNozzle.nozzleSize\" for=\"nozzle-btn\"></label>\n            </div>\n            <button class=\"boom-btn btn-lg\" click.delegate=\"nextNozzleSize()\" id=\"nozzle-btn\" class.bind=\"selectedNozzleColor\">\n                ${selectedNozzleSize}\n            </button>\n            <button class=\"btn boom-btn\" class.bind=\"state.preset1NumIndex === 0 ? 'btn-primary' : 'btn-secondary'\"\n                    click.delegate=\"setBoomPreset(0)\">\n                ${state.boomPreset1Number1Name}\n            </button>\n            <button class=\"btn boom-btn\" class.bind=\"state.preset1NumIndex === 1 ? 'btn-primary' : 'btn-secondary'\"\n                    click.delegate=\"setBoomPreset(1)\">\n                ${state.boomPreset1Number2Name}\n            </button>\n            <button class=\"btn boom-btn\" class.bind=\"state.preset1NumIndex === 2 ? 'btn-primary' : 'btn-secondary'\"\n                    click.delegate=\"setBoomPreset(2)\">\n                ${state.boomPreset1Number3Name}\n            </button>\n            <button class=\"btn boom-btn\" class.bind=\"state.preset1NumIndex === 3 ? 'btn-primary' : 'btn-secondary'\"\n                    click.delegate=\"setBoomPreset(3)\">\n                ${state.boomPreset1Number4Name}\n            </button>\n            <button class=\"btn boom-btn\" class.bind=\"state.preset1NumIndex === 4 ? 'btn-primary' : 'btn-secondary'\"\n                    click.delegate=\"setBoomPreset(4)\">\n                ${state.boomPreset1Number5Name}\n            </button>\n        </div>\n        <div else class=\"boom-btn-toolbar\" role=\"group\" style=\"width: 100%; padding-top: 5px;\">\n            <button class=\"btn boom-btn\" class.bind=\"state.preset1NumIndex === 5 ? 'btn-primary' : 'btn-secondary'\"\n                    click.delegate=\"setBoomPreset(5)\">\n                ${state.boomPreset1Number6Name}\n            </button>\n            <button class=\"btn boom-btn\" class.bind=\"state.preset1NumIndex === 6 ? 'btn-primary' : 'btn-secondary'\"\n                    click.delegate=\"setBoomPreset(6)\">\n                ${state.boomPreset1Number7Name}\n            </button>\n            <button class=\"btn boom-btn\" class.bind=\"state.preset1NumIndex === 7 ? 'btn-primary' : 'btn-secondary'\"\n                    click.delegate=\"setBoomPreset(7)\">\n                ${state.boomPreset1Number8Name}\n            </button>\n            <button class=\"btn boom-btn\" class.bind=\"state.preset1NumIndex === 8 ? 'btn-primary' : 'btn-secondary'\"\n                    click.delegate=\"setBoomPreset(8)\">\n                ${state.boomPreset1Number9Name}\n            </button>\n            <button class=\"btn boom-btn\" class.bind=\"state.preset1NumIndex === 9 ? 'btn-primary' : 'btn-secondary'\"\n                    click.delegate=\"setBoomPreset(9)\">\n                ${state.boomPreset1Number10Name}\n            </button>\n        </div>\n    </div>\n</template>\n"; });
var cov_28b6g20etv = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/area-meter.js',
        hash = '4d0f5dc67d47c7e7a949b500cc2b442ae55d157d',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/views/dashboard/area-meter.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('views/dashboard/area-meter',['exports', '../gateway-state-base'], function (exports, _gatewayStateBase) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.AreaMeter = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var AreaMeter = exports.AreaMeter = function (_ref) {
        _inherits(AreaMeter, _ref);

        function AreaMeter() {
            _classCallCheck(this, AreaMeter);

            for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {
                rest[_key] = arguments[_key];
            }

            var _this = _possibleConstructorReturn(this, _ref.call.apply(_ref, [this].concat(rest)));

            _this.activeClasses = 'ion-checkmark-circled btn-primary';
            _this.inactiveClasses = 'btn-default';

            _this.subscribe(['Area1Current', 'Area1Bounded', 'Area1Sprayable', 'Area1Unsprayed', 'Area1Counter', 'Area1Lifetime', 'Area1Counter', 'Area1CurrentDisplayed']);
            return _this;
        }

        AreaMeter.prototype.resetCounter = function resetCounter() {
            this.editDelta.area1Counter = 0;
            this.send();
        };

        AreaMeter.prototype.resetCurrent = function resetCurrent() {
            this.editDelta.area1Current = 0;
            this.send();
        };

        AreaMeter.prototype.activeClass = function activeClass(isActive) {
            return isActive ? this.activeClasses : this.inactiveClasses;
        };

        _createClass(AreaMeter, [{
            key: 'currentClasses',
            get: function get() {
                return this.activeClass(this.state.area1CurrentDisplayed === 0);
            }
        }, {
            key: 'counterClasses',
            get: function get() {
                return this.activeClass(this.state.area1CurrentDisplayed === 1);
            }
        }, {
            key: 'lifeTimeClasses',
            get: function get() {
                return this.activeClass(this.state.area1CurrentDisplayed === 2);
            }
        }]);

        return AreaMeter;
    }((_gatewayStateBase.GatewayStateBase));
});
define('text!views/dashboard/area-meter.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"views/dashboard/operation-panel-item\"></require>\n    <require from=\"resources/value-converters/hectaresToAcres\"></require>\n    <require from=\"resources/value-converters/sqMmToAcres\"></require>\n    <require from=\"resources/attributes/focus-bind-break\"></require>\n    <div class=\"operation-popover container-fluid\">\n\n        <div style=\"padding: 2rem\" class=\"container-fluid area-meter\">\n            <div class=\"text-center\" style=\"font-size: large\">Area Meter(Acres)</div>\n\n            <div class=\"row equal\">\n                <button class=\" col-xs-5 m-t-3 btn btn-lg btn-outline\" class.bind=\"currentClasses \" \n                        i18n=\"dashboard.areaMeter.current\" click.delegate=\"sendChange(0, 'area1CurrentDisplayed')\"></button>\n                <input type=\"number\" class=\"col-xs-4 m-t-3 operation-txt\" focus-bind-break.two-way=\"state.area1Current | hectaresToAcres:'0.0'\"\n                       change.delegate=\"sendChange(state.area1Current, 'area1Current')\"/>\n                <div class=\"col-xs-3 m-t-3\">\n                    <button click.delegate=\"resetCurrent()\" type=\"button\" class=\"btn btn-primary btn-sm\" i18n=\"dashboard.areaMeter.reset\">Reset</button>\n                </div>\n            </div>\n\n            <div class=\"row equal\">\n                <button class=\"col-xs-5 m-t-3 btn btn-lg btn-outline\" class.bind=\"counterClasses\" \n                        i18n=\"dashboard.areaMeter.counter\" click.delegate=\"sendChange(1, 'area1CurrentDisplayed')\"></button>\n                <input type=\"number\" class=\"col-xs-4 m-t-3 operation-txt\" focus-bind-break.bind=\"state.area1Counter | hectaresToAcres:'0.0'\"\n                       change.delegate=\"sendChange(state.area1Counter, 'area1Counter')\"/>\n                <div class=\"col-xs-3 m-t-3\">\n                    <button click.delegate=\"resetCounter()\" type=\"button\" class=\"btn btn-primary btn-sm\" i18n=\"dashboard.areaMeter.reset\">Reset</button>\n                </div>\n            </div>\n\n        </div>\n        <div style=\"padding: 2rem\" class=\"container-fluid\">\n            <operation-panel-item val.bind=\"state.area1Lifetime | hectaresToAcres:'0.0'\" label=\"dashboard.areaMeter.lifetime\">\n            </operation-panel-item>\n\n            <operation-panel-item val.bind=\"state.area1Bounded | sqMmToAcres\" label=\"dashboard.areaMeter.area1Bounded\">\n            </operation-panel-item>\n\n            <operation-panel-item val.bind=\"state.area1Sprayable | sqMmToAcres\" label=\"dashboard.areaMeter.area1Sprayable\">\n            </operation-panel-item>\n\n            <operation-panel-item val.bind=\"state.area1Unsprayed | sqMmToAcres\" label=\"dashboard.areaMeter.area1Unsprayed\">\n            </operation-panel-item>\n\n        </div>\n    </div>\n</template>\n"; });
var cov_wdfpkpt9y = function () {
  var path = '/opt/atlassian/pipelines/agent/build/Web/src/services/updates-service.js',
      hash = '088fdd13d36eae0b5042374c0484a38b3606defe',
      global = new Function('return this')(),
      gcv = '__coverage__',
      coverageData = {
    path: '/opt/atlassian/pipelines/agent/build/Web/src/services/updates-service.js',
    statementMap: {},
    fnMap: {},
    branchMap: {},
    s: {},
    f: {},
    b: {},
    _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('services/updates-service',['exports', 'aurelia-framework', '../clients/updates-client'], function (exports, _aureliaFramework, _updatesClient) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.UpdatesService = undefined;

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  var _dec, _class;

  var UpdatesService = exports.UpdatesService = (_dec = (0, _aureliaFramework.inject)(_updatesClient.UpdatesClient), _dec(_class = function () {
    function UpdatesService(client) {
      _classCallCheck(this, UpdatesService);

      this.client = client;
    }

    UpdatesService.prototype.connect = function connect(callback) {
      this.client.connect(callback);
    };

    UpdatesService.prototype.subscribe = function subscribe(callback) {
      this.client.subscribe(callback);
    };

    UpdatesService.prototype.getCurrentVersion = function getCurrentVersion() {
      return this.client.getCurrentVersion();
    };

    UpdatesService.prototype.isUpdateAvailable = function isUpdateAvailable() {
      return this.client.isUpdateAvailable();
    };

    UpdatesService.prototype.getAllPackages = function getAllPackages() {
      return this.client.getAllPackages();
    };

    UpdatesService.prototype.getDownloadSize = function getDownloadSize(version) {
      return this.client.getDownloadSize(version);
    };

    UpdatesService.prototype.downloadUpdate = function downloadUpdate(version) {
      this.client.downloadUpdate(version);
    };

    UpdatesService.prototype.installUpdate = function installUpdate(update, current) {
      this.client.installUpdate(update, current);
    };

    UpdatesService.prototype.checkIfDownloaded = function checkIfDownloaded(version) {
      return this.client.checkIfDownloaded(version);
    };

    return UpdatesService;
  }()) || _class);
});
var cov_p3p8xtt4e = function () {
  var path = '/opt/atlassian/pipelines/agent/build/Web/src/services/test-service.js',
      hash = '6fb5cb4c14dbb9fa7fd85699ba7001dff1760eb5',
      global = new Function('return this')(),
      gcv = '__coverage__',
      coverageData = {
    path: '/opt/atlassian/pipelines/agent/build/Web/src/services/test-service.js',
    statementMap: {
      '0': {
        start: {
          line: 15,
          column: 8
        },
        end: {
          line: 15,
          column: 25
        }
      },
      '1': {
        start: {
          line: 23,
          column: 17
        },
        end: {
          line: 23,
          column: 38
        }
      },
      '2': {
        start: {
          line: 30,
          column: 8
        },
        end: {
          line: 30,
          column: 43
        }
      },
      '3': {
        start: {
          line: 39,
          column: 8
        },
        end: {
          line: 39,
          column: 51
        }
      }
    },
    fnMap: {
      '0': {
        name: '(anonymous_0)',
        decl: {
          start: {
            line: 14,
            column: 4
          },
          end: {
            line: 14,
            column: 5
          }
        },
        loc: {
          start: {
            line: 14,
            column: 22
          },
          end: {
            line: 16,
            column: 5
          }
        },
        line: 14
      },
      '1': {
        name: '(anonymous_1)',
        decl: {
          start: {
            line: 23,
            column: 12
          },
          end: {
            line: 23,
            column: 13
          }
        },
        loc: {
          start: {
            line: 23,
            column: 17
          },
          end: {
            line: 23,
            column: 38
          }
        },
        line: 23
      },
      '2': {
        name: '(anonymous_2)',
        decl: {
          start: {
            line: 29,
            column: 4
          },
          end: {
            line: 29,
            column: 5
          }
        },
        loc: {
          start: {
            line: 29,
            column: 16
          },
          end: {
            line: 31,
            column: 5
          }
        },
        line: 29
      },
      '3': {
        name: '(anonymous_3)',
        decl: {
          start: {
            line: 38,
            column: 4
          },
          end: {
            line: 38,
            column: 5
          }
        },
        loc: {
          start: {
            line: 38,
            column: 18
          },
          end: {
            line: 40,
            column: 5
          }
        },
        line: 38
      }
    },
    branchMap: {
      '0': {
        loc: {
          start: {
            line: 23,
            column: 29
          },
          end: {
            line: 23,
            column: 36
          }
        },
        type: 'binary-expr',
        locations: [{
          start: {
            line: 23,
            column: 29
          },
          end: {
            line: 23,
            column: 30
          }
        }, {
          start: {
            line: 23,
            column: 34
          },
          end: {
            line: 23,
            column: 36
          }
        }],
        line: 23
      }
    },
    s: {
      '0': 0,
      '1': 0,
      '2': 0,
      '3': 0
    },
    f: {
      '0': 0,
      '1': 0,
      '2': 0,
      '3': 0
    },
    b: {
      '0': [0, 0]
    },
    _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('services/test-service',['exports', 'aurelia-framework', '../resources/clients/json-client'], function (exports, _aureliaFramework, _jsonClient) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.TestService = undefined;

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  var _dec, _class;

  var TestService = exports.TestService = (_dec = (0, _aureliaFramework.inject)(_jsonClient.JsonClient), _dec(_class = function () {
    function TestService(json) {
      _classCallCheck(this, TestService);

      this.route = function (r) {
        cov_p3p8xtt4e.f[1]++;
        cov_p3p8xtt4e.s[1]++;
        return '/api/test' + ((cov_p3p8xtt4e.b[0][0]++, r) || (cov_p3p8xtt4e.b[0][1]++, ''));
      };

      cov_p3p8xtt4e.f[0]++;
      cov_p3p8xtt4e.s[0]++;

      this.json = json;
    }

    TestService.prototype.getValues = function getValues() {
      cov_p3p8xtt4e.f[2]++;
      cov_p3p8xtt4e.s[2]++;

      return this.json.get(this.route());
    };

    TestService.prototype.getNoAuth = function getNoAuth(id) {
      cov_p3p8xtt4e.f[3]++;
      cov_p3p8xtt4e.s[3]++;

      return this.json.get(this.route('/' + id));
    };

    return TestService;
  }()) || _class);
});
var cov_h7zyfhf87 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/services/spray-session-service.js',
        hash = 'd9d152a54191e18b5c5efb942c253dc5d34f2fa7',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/services/spray-session-service.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('services/spray-session-service',['exports', 'aurelia-framework', '../clients/spray-session-client'], function (exports, _aureliaFramework, _spraySessionClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SpraySessionService = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var SpraySessionService = exports.SpraySessionService = (_dec = (0, _aureliaFramework.inject)(_spraySessionClient.SpraySessionClient), _dec(_class = function () {
        function SpraySessionService(client) {
            _classCallCheck(this, SpraySessionService);

            this.client = client;
        }

        SpraySessionService.prototype.getCurrentSpraySession = function getCurrentSpraySession() {
            return this.client.getCurrentSpraySession();
        };

        SpraySessionService.prototype.getSpraySessions = function getSpraySessions() {
            return this.client.getAllSpraySessions();
        };

        SpraySessionService.prototype.getBoundaryGroups = function getBoundaryGroups() {
            return this.client.getBoundaryGroups();
        };

        SpraySessionService.prototype.sendSpraySession = function sendSpraySession(spraySessionId) {
            return this.client.setSpraySession(spraySessionId);
        };

        SpraySessionService.prototype.setBoundaryMapCallback = function setBoundaryMapCallback(callback) {
            this.boundaryMapCallback = callback;
        };

        SpraySessionService.prototype.renderBoundayMap = function renderBoundayMap(boundaryMap) {
            if (this.boundaryMapCallback) {
                this.boundaryMapCallback(boundaryMap);
            }
        };

        SpraySessionService.prototype.sendBoundaryMaps = function sendBoundaryMaps(paths, groupName) {
            this.client.sendBoundaryMaps(paths, groupName);
        };

        SpraySessionService.prototype.getCurrentSpraySession = function getCurrentSpraySession() {
            return this.client.getCurrentSpraySession();
        };

        SpraySessionService.prototype.setPrescriptionMap = function setPrescriptionMap(path) {
            if (path === '') {
                path = null;
            }
            this.client.setPrescriptionMap(path);
        };

        SpraySessionService.prototype.useSeparableOverlapDistances = function useSeparableOverlapDistances() {
            return this.client.useSeparableOverlapDistances();
        };

        return SpraySessionService;
    }()) || _class);
});
var cov_oqqxbjr06 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/services/prescription-map-service.js',
        hash = '3a8c29293765ddc3957cda19a55907ef3ba00585',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/services/prescription-map-service.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('services/prescription-map-service',['exports', 'aurelia-framework', '../clients/prescription-map-client'], function (exports, _aureliaFramework, _prescriptionMapClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PrescriptionMapService = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var PrescriptionMapService = exports.PrescriptionMapService = (_dec = (0, _aureliaFramework.inject)(_prescriptionMapClient.PrescriptionMapClient), _dec(_class = function () {
        function PrescriptionMapService(client) {
            _classCallCheck(this, PrescriptionMapService);

            this.client = client;
        }

        PrescriptionMapService.prototype.connect = function connect(callback) {
            return this.client.connect(callback);
        };

        PrescriptionMapService.prototype.getCurrentPrescriptionMap = function getCurrentPrescriptionMap() {
            return this.client.getCurrentPrescriptionMap();
        };

        return PrescriptionMapService;
    }()) || _class);
});
var cov_jrxeqv1dy = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/services/mapping-service.js',
        hash = '603189df1b9636d827b70b55315e7f9a96503d4f',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/services/mapping-service.js',
        statementMap: {
            '0': {
                start: {
                    line: 16,
                    column: 8
                },
                end: {
                    line: 16,
                    column: 29
                }
            },
            '1': {
                start: {
                    line: 128,
                    column: 8
                },
                end: {
                    line: 128,
                    column: 43
                }
            },
            '2': {
                start: {
                    line: 147,
                    column: 8
                },
                end: {
                    line: 147,
                    column: 50
                }
            }
        },
        fnMap: {
            '0': {
                name: '(anonymous_0)',
                decl: {
                    start: {
                        line: 15,
                        column: 4
                    },
                    end: {
                        line: 15,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 15,
                        column: 24
                    },
                    end: {
                        line: 17,
                        column: 5
                    }
                },
                line: 15
            },
            '1': {
                name: '(anonymous_1)',
                decl: {
                    start: {
                        line: 127,
                        column: 4
                    },
                    end: {
                        line: 127,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 127,
                        column: 20
                    },
                    end: {
                        line: 129,
                        column: 5
                    }
                },
                line: 127
            },
            '2': {
                name: '(anonymous_2)',
                decl: {
                    start: {
                        line: 146,
                        column: 4
                    },
                    end: {
                        line: 146,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 146,
                        column: 27
                    },
                    end: {
                        line: 148,
                        column: 5
                    }
                },
                line: 146
            }
        },
        branchMap: {},
        s: {
            '0': 0,
            '1': 0,
            '2': 0
        },
        f: {
            '0': 0,
            '1': 0,
            '2': 0
        },
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('services/mapping-service',['exports', 'aurelia-framework', '../clients/mapping-client'], function (exports, _aureliaFramework, _mappingClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.MappingService = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var MappingService = exports.MappingService = (_dec = (0, _aureliaFramework.inject)(_mappingClient.MappingClient), _dec(_class = function () {
        function MappingService(client) {
            _classCallCheck(this, MappingService);

            this.colorKeySprayed = false;
            cov_jrxeqv1dy.f[0]++;
            cov_jrxeqv1dy.s[0]++;

            this.client = client;
        }

        MappingService.prototype.connect = function connect(callback, clearCallback) {
            return this.client.connect(callback, clearCallback).then(function (data) {
                return data;
            });
        };

        MappingService.prototype.getRegionCoverageBytes = function getRegionCoverageBytes(blX, blY, trX, trY, resolution) {
            return this.client.getRegionCoverageBytes(blX, blY, trX, trY, resolution);
        };

        MappingService.prototype.getSystemErrors = function getSystemErrors(blX, blY, trX, trY, resolution) {
            return this.client.getSystemErrors(blX, blY, trX, trY, resolution);
        };

        MappingService.prototype.setBoundaryMapCallback = function setBoundaryMapCallback(callback) {
            this.boundaryMapCallback = callback;
        };

        MappingService.prototype.setPrescriptionMapCallback = function setPrescriptionMapCallback(callback) {
            this.prescriptionMapCallback = callback;
        };

        MappingService.prototype.renderBoundayMap = function renderBoundayMap(boundaryMap) {
            if (this.boundaryMapCallback) {
                this.boundaryMapCallback(boundaryMap);
            }
        };

        MappingService.prototype.renderPrescriptionMap = function renderPrescriptionMap(prescriptionMap) {
            if (this.prescriptionMapCallback) {
                this.prescriptionMapCallback(prescriptionMap);
            }
        };

        MappingService.prototype.setPrescriptionUnits = function setPrescriptionUnits(units) {
            this.client.setPrescriptionUnits(units);
        };

        MappingService.prototype.getCoverageBoundingBoxForSpraySessionId = function getCoverageBoundingBoxForSpraySessionId(spraySessionId) {
            return this.client.getCoverageBoundingBoxForSpraySessionId(spraySessionId);
        };

        MappingService.prototype.getTweenDelay = function getTweenDelay() {
            cov_jrxeqv1dy.f[1]++;
            cov_jrxeqv1dy.s[1]++;

            return this.client.getTweenDelay();
        };

        MappingService.prototype.getClosestError = function getClosestError(x, y) {
            return this.client.getClosestError(x, y);
        };

        MappingService.prototype.getMinimumResolution = function getMinimumResolution() {
            cov_jrxeqv1dy.f[2]++;
            cov_jrxeqv1dy.s[2]++;

            return this.client.getMinimumResolution();
        };

        MappingService.prototype.ignoreBoundary = function ignoreBoundary(ignore) {
            this.client.ignoreBoundary(ignore);
        };

        return MappingService;
    }()) || _class);
});
var cov_1tacg4grlj = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/services/log-event-service.js',
        hash = '209bb83804623e1fbb622d38ee8eb07982c24f03',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/services/log-event-service.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('services/log-event-service',['exports', 'aurelia-framework', '../clients/log-event-client'], function (exports, _aureliaFramework, _logEventClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.LogEventService = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var LogEventService = exports.LogEventService = (_dec = (0, _aureliaFramework.inject)(_logEventClient.LogEventClient), _dec(_class = function () {
        function LogEventService(logEventClient) {
            _classCallCheck(this, LogEventService);

            this.gatewaySystemError = [];
            this.nozzleErrors = [];
            this.lastError = {};

            this.logEventClient = logEventClient;
        }

        LogEventService.prototype.addSystemError = function addSystemError(systemError) {
            this.gatewaySystemError.push(systemError);
            $.extend(this.lastError, systemError);
        };

        LogEventService.prototype.addNozzleError = function addNozzleError(nozzleError) {
            this.nozzleErrors.push(nozzleError);
        };

        LogEventService.prototype.getLastError = function getLastError() {
            return this.lastError;
        };

        LogEventService.prototype.connect = function connect(callback) {
            var _this = this;

            return this.logEventClient.connect(function (errorState) {
                for (var prop in errorState.gateWaySystemErrors) {
                    if (errorState.gateWaySystemErrors.hasOwnProperty(prop)) {
                        _this.addSystemError(errorState.gateWaySystemErrors[prop]);
                    }
                }
            }, callback, function (nozzleError) {
                _this.addNozzleError(nozzleError);
            });
        };

        return LogEventService;
    }()) || _class);
});
var cov_25qje42pns = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/services/gateway-service.js',
        hash = 'de06ad85989128f88ae6bc46cd1dee3d4a407cbb',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/services/gateway-service.js',
        statementMap: {
            '0': {
                start: {
                    line: 17,
                    column: 8
                },
                end: {
                    line: 17,
                    column: 29
                }
            },
            '1': {
                start: {
                    line: 18,
                    column: 8
                },
                end: {
                    line: 18,
                    column: 61
                }
            },
            '2': {
                start: {
                    line: 18,
                    column: 37
                },
                end: {
                    line: 18,
                    column: 59
                }
            },
            '3': {
                start: {
                    line: 26,
                    column: 8
                },
                end: {
                    line: 26,
                    column: 26
                }
            },
            '4': {
                start: {
                    line: 34,
                    column: 8
                },
                end: {
                    line: 34,
                    column: 61
                }
            },
            '5': {
                start: {
                    line: 34,
                    column: 37
                },
                end: {
                    line: 34,
                    column: 59
                }
            },
            '6': {
                start: {
                    line: 54,
                    column: 24
                },
                end: {
                    line: 54,
                    column: 109
                }
            },
            '7': {
                start: {
                    line: 55,
                    column: 8
                },
                end: {
                    line: 55,
                    column: 35
                }
            },
            '8': {
                start: {
                    line: 56,
                    column: 8
                },
                end: {
                    line: 56,
                    column: 36
                }
            },
            '9': {
                start: {
                    line: 66,
                    column: 8
                },
                end: {
                    line: 66,
                    column: 36
                }
            },
            '10': {
                start: {
                    line: 76,
                    column: 8
                },
                end: {
                    line: 76,
                    column: 53
                }
            },
            '11': {
                start: {
                    line: 86,
                    column: 8
                },
                end: {
                    line: 86,
                    column: 55
                }
            }
        },
        fnMap: {
            '0': {
                name: '(anonymous_0)',
                decl: {
                    start: {
                        line: 16,
                        column: 4
                    },
                    end: {
                        line: 16,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 16,
                        column: 24
                    },
                    end: {
                        line: 19,
                        column: 5
                    }
                },
                line: 16
            },
            '1': {
                name: '(anonymous_1)',
                decl: {
                    start: {
                        line: 18,
                        column: 28
                    },
                    end: {
                        line: 18,
                        column: 29
                    }
                },
                loc: {
                    start: {
                        line: 18,
                        column: 37
                    },
                    end: {
                        line: 18,
                        column: 59
                    }
                },
                line: 18
            },
            '2': {
                name: '(anonymous_2)',
                decl: {
                    start: {
                        line: 25,
                        column: 4
                    },
                    end: {
                        line: 25,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 25,
                        column: 15
                    },
                    end: {
                        line: 27,
                        column: 5
                    }
                },
                line: 25
            },
            '3': {
                name: '(anonymous_3)',
                decl: {
                    start: {
                        line: 33,
                        column: 4
                    },
                    end: {
                        line: 33,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 33,
                        column: 17
                    },
                    end: {
                        line: 35,
                        column: 5
                    }
                },
                line: 33
            },
            '4': {
                name: '(anonymous_4)',
                decl: {
                    start: {
                        line: 34,
                        column: 28
                    },
                    end: {
                        line: 34,
                        column: 29
                    }
                },
                loc: {
                    start: {
                        line: 34,
                        column: 37
                    },
                    end: {
                        line: 34,
                        column: 59
                    }
                },
                line: 34
            },
            '5': {
                name: '(anonymous_5)',
                decl: {
                    start: {
                        line: 52,
                        column: 4
                    },
                    end: {
                        line: 52,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 52,
                        column: 20
                    },
                    end: {
                        line: 57,
                        column: 5
                    }
                },
                line: 52
            },
            '6': {
                name: '(anonymous_6)',
                decl: {
                    start: {
                        line: 64,
                        column: 4
                    },
                    end: {
                        line: 64,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 64,
                        column: 22
                    },
                    end: {
                        line: 67,
                        column: 5
                    }
                },
                line: 64
            },
            '7': {
                name: '(anonymous_7)',
                decl: {
                    start: {
                        line: 75,
                        column: 4
                    },
                    end: {
                        line: 75,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 75,
                        column: 37
                    },
                    end: {
                        line: 77,
                        column: 5
                    }
                },
                line: 75
            },
            '8': {
                name: '(anonymous_8)',
                decl: {
                    start: {
                        line: 85,
                        column: 4
                    },
                    end: {
                        line: 85,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 85,
                        column: 39
                    },
                    end: {
                        line: 87,
                        column: 5
                    }
                },
                line: 85
            }
        },
        branchMap: {},
        s: {
            '0': 0,
            '1': 0,
            '2': 0,
            '3': 0,
            '4': 0,
            '5': 0,
            '6': 0,
            '7': 0,
            '8': 0,
            '9': 0,
            '10': 0,
            '11': 0
        },
        f: {
            '0': 0,
            '1': 0,
            '2': 0,
            '3': 0,
            '4': 0,
            '5': 0,
            '6': 0,
            '7': 0,
            '8': 0
        },
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('services/gateway-service',['exports', 'aurelia-framework', '../clients/gateway-client', 'ramda'], function (exports, _aureliaFramework, _gatewayClient, _ramda) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.GatewayService = undefined;

    var R = _interopRequireWildcard(_ramda);

    function _interopRequireWildcard(obj) {
        if (obj && obj.__esModule) {
            return obj;
        } else {
            var newObj = {};

            if (obj != null) {
                for (var key in obj) {
                    if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
            }

            newObj.default = obj;
            return newObj;
        }
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var GatewayService = exports.GatewayService = (_dec = (0, _aureliaFramework.inject)(_gatewayClient.GatewayClient), _dec(_class = function () {
        function GatewayService(client) {
            var _this = this;

            _classCallCheck(this, GatewayService);

            this.state = {};
            cov_25qje42pns.f[0]++;
            cov_25qje42pns.s[0]++;

            this.client = client;
            cov_25qje42pns.s[1]++;
            this.client.connect(function (state) {
                cov_25qje42pns.f[1]++;
                cov_25qje42pns.s[2]++;
                return _this.applyDelta(state);
            });
        }

        GatewayService.prototype.getState = function getState() {
            cov_25qje42pns.f[2]++;
            cov_25qje42pns.s[3]++;

            return this.state;
        };

        GatewayService.prototype.updateCash = function updateCash() {
            var _this2 = this;

            cov_25qje42pns.f[3]++;
            cov_25qje42pns.s[4]++;

            this.client.connect(function (state) {
                cov_25qje42pns.f[4]++;
                cov_25qje42pns.s[5]++;
                return _this2.applyDelta(state);
            });
        };

        GatewayService.prototype.getProperties = function getProperties(props) {
            return this.client.getProperties(props);
        };

        GatewayService.prototype.send = function send(editDelta) {
            cov_25qje42pns.f[5]++;

            var editState = (cov_25qje42pns.s[6]++, R.pickBy(R.compose(R.not, R.isNil), R.pickBy(R.compose(R.not, R.isEmpty), editDelta)));
            cov_25qje42pns.s[7]++;
            this.applyDelta(editState);
            cov_25qje42pns.s[8]++;
            this.client.send(editState);
        };

        GatewayService.prototype.applyDelta = function applyDelta(delta) {
            cov_25qje42pns.f[6]++;
            cov_25qje42pns.s[9]++;

            $.extend(this.state, delta);
        };

        GatewayService.prototype.subscribe = function subscribe(properties, component) {
            cov_25qje42pns.f[7]++;
            cov_25qje42pns.s[10]++;

            this.client.subscribe(properties, component);
        };

        GatewayService.prototype.unsubscribe = function unsubscribe(properties, component) {
            cov_25qje42pns.f[8]++;
            cov_25qje42pns.s[11]++;

            this.client.unsubscribe(properties, component);
        };

        GatewayService.prototype.registerDebugCallbacks = function registerDebugCallbacks(maxExceededCallback, requestSentCallback, responseReceivedCallback, broadcastsClearedCallback) {
            this.client.registerDebugCallbacks(maxExceededCallback, requestSentCallback, responseReceivedCallback, broadcastsClearedCallback);
        };

        GatewayService.prototype.enableDebug = function enableDebug(enabled) {
            this.client.enableDebug(enabled);
        };

        GatewayService.prototype.getActiveBroadcastRequests = function getActiveBroadcastRequests() {
            return this.client.getActiveBroadcastRequests();
        };

        return GatewayService;
    }()) || _class);
});
var cov_i29ni3gr4 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/services/file-service.js',
        hash = 'a3b89b37d40c6383f37e3c5643233647fc434cd6',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/services/file-service.js',
        statementMap: {
            '0': {
                start: {
                    line: 150,
                    column: 17
                },
                end: {
                    line: 150,
                    column: 39
                }
            }
        },
        fnMap: {
            '0': {
                name: '(anonymous_0)',
                decl: {
                    start: {
                        line: 150,
                        column: 12
                    },
                    end: {
                        line: 150,
                        column: 13
                    }
                },
                loc: {
                    start: {
                        line: 150,
                        column: 17
                    },
                    end: {
                        line: 150,
                        column: 39
                    }
                },
                line: 150
            }
        },
        branchMap: {
            '0': {
                loc: {
                    start: {
                        line: 150,
                        column: 30
                    },
                    end: {
                        line: 150,
                        column: 37
                    }
                },
                type: 'binary-expr',
                locations: [{
                    start: {
                        line: 150,
                        column: 30
                    },
                    end: {
                        line: 150,
                        column: 31
                    }
                }, {
                    start: {
                        line: 150,
                        column: 35
                    },
                    end: {
                        line: 150,
                        column: 37
                    }
                }],
                line: 150
            }
        },
        s: {
            '0': 0
        },
        f: {
            '0': 0
        },
        b: {
            '0': [0, 0]
        },
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('services/file-service',['exports', 'aurelia-framework', '../resources/clients/json-client'], function (exports, _aureliaFramework, _jsonClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.FileService = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var FileService = exports.FileService = (_dec = (0, _aureliaFramework.inject)(_jsonClient.JsonClient), _dec(_class = function () {
        function FileService(json) {
            _classCallCheck(this, FileService);

            this.filesChanged = false;
            this.presetNames = ['', '', '', '', '', '', '', '', '', ''];
            this.rootSystemFolder = '';
            this.rootUsbFolder = '';
            this.systemDevice = '';
            this.usbDevice = '';
            this.activeUsbFilePath = '';
            this.activeSystemFilePath = '';
            this.activeSystemFolder = '';
            this.activeSystemFolderName = '';
            this.activeUsbFolder = '';
            this.activeUsbFolderName = '';
            this.activeSystemStack = [];
            this.activeUsbStack = [];
            this.pathOfFolderUpdated = '';
            this.directionToSystem = true;

            this.route = function (r) {
                cov_i29ni3gr4.f[0]++;
                cov_i29ni3gr4.s[0]++;
                return '/api/files' + ((cov_i29ni3gr4.b[0][0]++, r) || (cov_i29ni3gr4.b[0][1]++, ''));
            };

            this.json = json;
        }

        FileService.prototype.updatePresets = function updatePresets(fileName, presetNumber) {
            var newNames = [];
            for (var i = 0; i < this.presetNames.length; i++) {
                if (i === presetNumber) {
                    newNames.push(fileName);
                } else {
                    newNames.push(this.presetNames[i]);
                }
            }
            this.presetNames = newNames;
        };

        FileService.prototype.selectFolder = function selectFolder(folder) {
            if (folder.device === this.systemDevice) {
                this.activeSystemFolder = folder.path;
                this.activeSystemFolderName = folder.name;
                this.activeSystemFilePath = '';
                this.activeSystemStack.push(folder.path);

                this.activeUsbFilePath = '';
                this.activeUsbFolder = this.activeUsbStack[this.activeUsbStack.length - 1];
                this.directionToSystem = false;
            } else {
                this.activeUsbFolder = folder.path;
                this.activeUsbFolderName = folder.name;
                this.activeUsbFilePath = '';
                this.activeUsbStack.push(folder.path);

                this.activeSystemFilePath = '';
                this.activeSystemFolder = this.activeSystemStack[this.activeSystemStack.length - 1];
                this.directionToSystem = true;
            }
        };

        FileService.prototype.popFolder = function popFolder(folder) {
            if (folder.device === this.systemDevice) {
                this.popHelper(this.activeSystemStack, folder.path);
                if (this.activeSystemStack.length > 0) {
                    this.activeSystemFolder = this.activeSystemStack[this.activeSystemStack.length - 1];
                } else {
                    this.activeSystemFolder = this.rootSystemFolder;
                }
            } else {
                this.popHelper(this.activeUsbStack, folder.path);
                if (this.activeUsbStack.length > 0) {
                    this.activeUsbFolder = this.activeUsbStack[this.activeUsbStack.length - 1];
                } else {
                    this.activeUsbFolder = this.rootUsbFolder;
                }
            }
        };

        FileService.prototype.popHelper = function popHelper(stack, folderPath) {
            for (var i = stack.length - 1; i >= 0; i--) {
                if (stack[i].includes(folderPath)) {
                    stack.splice(i, 1);
                }
            }
        };

        FileService.prototype.selectFile = function selectFile(file) {
            if (file.device !== this.systemDevice) {
                this.activeUsbFilePath = file.path;
                this.activeSystemFilePath = '';
                this.activeUsbFolder = '';
                this.activeSystemFolder = this.activeSystemStack[this.activeSystemStack.length - 1];
                this.directionToSystem = true;
            } else {
                this.activeSystemFilePath = file.path;
                this.activeUsbFilePath = '';
                this.activeSystemFolder = '';
                this.activeUsbFolder = this.activeUsbStack[this.activeUsbStack.length - 1];
                this.directionToSystem = false;
            }
        };

        FileService.prototype.getSystemFiles = function getSystemFiles() {
            this.files = this.json.get(this.route('/system'));
            return this.files;
        };

        FileService.prototype.getUsbFiles = function getUsbFiles() {
            return this.json.get(this.route('/usb'));
        };

        FileService.prototype.getFolderFiles = function getFolderFiles(folderName, folderPath, device) {
            var _this = this;

            return this.json.post(this.route('/folder'), { FolderName: folderName, FolderPath: folderPath, Device: device }).then(function (response) {
                _this.updatedFolder = response;
                _this.pathOfFolderUpdated = response.path;
            });
        };

        FileService.prototype.usbAvailable = function usbAvailable() {
            return this.json.get(this.route('/usb-available'));
        };

        FileService.prototype.getBoundaryMaps = function getBoundaryMaps() {
            return this.json.get(this.route('/boundary-maps'));
        };

        FileService.prototype.getPrescriptionMaps = function getPrescriptionMaps() {
            return this.json.get(this.route('/prescription-maps'));
        };

        FileService.prototype.getAppliedAsMaps = function getAppliedAsMaps(boundaryMap) {
            return this.json.post(this.route('/applied-as-maps'), boundaryMap);
        };

        FileService.prototype.transferFile = function transferFile(fromPath, toPath, fromDevice, toDevice) {
            return this.json.post(this.route('/transfer-file'), { FromPath: fromPath, ToPath: toPath, FromDevice: fromDevice, ToDevice: toDevice });
        };

        FileService.prototype.transferFolder = function transferFolder(fromPath, toPath, fromDevice, toDevice) {
            return this.json.post(this.route('/transfer-folder'), { FromPath: fromPath, ToPath: toPath, FromDevice: fromDevice, ToDevice: toDevice });
        };

        FileService.prototype.transferToSystem = function transferToSystem() {
            var _this2 = this;

            var fromPath = this.activeUsbFilePath;
            if (fromPath === '') {
                fromPath = this.activeUsbFolder;
                this.transferFolder(fromPath, this.activeSystemFolder, this.usbDevice, this.systemDevice).then(function (response) {
                    _this2.getFolderFiles(_this2.activeSystemFolderName, _this2.activeSystemFolder, _this2.systemDevice);
                });
            } else {
                this.transferFile(fromPath, this.activeSystemFolder, this.usbDevice, this.systemDevice).then(function (response) {
                    _this2.getFolderFiles(_this2.activeSystemFolderName, _this2.activeSystemFolder, _this2.systemDevice);
                });
            }
        };

        FileService.prototype.transferToUsb = function transferToUsb() {
            var _this3 = this;

            var fromPath = this.activeSystemFilePath;
            if (fromPath === '') {
                fromPath = this.activeSystemFolder;
                this.transferFolder(fromPath, this.activeUsbFolder, this.systemDevice, this.usbDevice).then(function (response) {
                    _this3.getFolderFiles(_this3.activeUsbFolderName, _this3.activeUsbFolder, _this3.usbDevice);
                });
            } else {
                this.transferFile(fromPath, this.activeUsbFolder, this.systemDevice, this.usbDevice).then(function (response) {
                    _this3.getFolderFiles(_this3.activeUsbFolderName, _this3.activeUsbFolder, _this3.usbDevice);
                });
            }
        };

        FileService.prototype.deleteFolder = function deleteFolder(folder) {
            this.popFolder(folder);
            return this.json.post(this.route('/delete-folder'), folder.path);
        };

        FileService.prototype.deleteFile = function deleteFile(path) {
            return this.json.post(this.route('/delete-file'), path);
        };

        FileService.prototype.sendFile = function sendFile(path, preset) {
            this.presetsChanged = true;
            return this.json.post(this.route('/send-file'), { Path: path, Preset: preset });
        };

        FileService.prototype.clearFileNames = function clearFileNames() {
            return this.json.post(this.route('/clear-file-names'), {});
        };

        FileService.prototype.updateClear = function updateClear() {
            var newNames = [];
            for (var i = 0; i < this.presetNames.length; i++) {
                newNames.push('Undef');
            }
            this.presetNames = newNames;
            this.presetsChanged = true;
        };

        FileService.prototype.saveConfig = function saveConfig(presetName, newFileName) {
            return this.json.post(this.route('/save-config'), { PresetName: presetName, FileName: newFileName });
        };

        return FileService;
    }()) || _class);
});
var cov_2628wi4akr = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/services/boundary-map-service.js',
        hash = '25f27e06c297e84a075e748210d528e5c5fd0462',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/services/boundary-map-service.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('services/boundary-map-service',['exports', 'aurelia-framework', '../clients/boundary-map-client'], function (exports, _aureliaFramework, _boundaryMapClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.BoundaryMapService = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var BoundaryMapService = exports.BoundaryMapService = (_dec = (0, _aureliaFramework.inject)(_boundaryMapClient.BoundaryMapClient), _dec(_class = function () {
        function BoundaryMapService(client) {
            _classCallCheck(this, BoundaryMapService);

            this.activeBoundary = '';
            this.activeBoundaryChanged = false;

            this.client = client;
        }

        BoundaryMapService.prototype.connect = function connect(callback, addBoundaryPointCallBack, pruneBoundaryPointCallBack, clearBoundaryPointsCallBack) {
            return this.client.connect(callback, addBoundaryPointCallBack, pruneBoundaryPointCallBack, clearBoundaryPointsCallBack);
        };

        BoundaryMapService.prototype.registerBoundaryMapCreatedCallback = function registerBoundaryMapCreatedCallback(callback) {
            this.client.registerBoundaryMapCreatedCallback(callback);
        };

        BoundaryMapService.prototype.getBoundaryMap = function getBoundaryMap() {
            return this.client.getCurrentBoundaryMap();
        };

        BoundaryMapService.prototype.updateBoundary = function updateBoundary(path, sprayType, remove, group) {
            this.client.updateBoundary(path, sprayType, remove, group);
        };

        BoundaryMapService.prototype.getRecordedBoundaryPoints = function getRecordedBoundaryPoints() {
            return this.client.getRecordedBoundaryPoints();
        };

        BoundaryMapService.prototype.getRecordedInternalPoints = function getRecordedInternalPoints() {
            return this.client.getRecordedInternalPoints();
        };

        BoundaryMapService.prototype.getBoundaryRecorderStatus = function getBoundaryRecorderStatus() {
            return this.client.getBoundaryRecorderStatus();
        };

        BoundaryMapService.prototype.setBoundaryRecorderSide = function setBoundaryRecorderSide(side) {
            this.client.setBoundaryRecorderSide(side);
        };

        BoundaryMapService.prototype.setRecordInternal = function setRecordInternal(flag) {
            this.client.setRecordInternal(flag);
        };

        BoundaryMapService.prototype.recordBoundary = function recordBoundary() {
            this.client.recordBoundary();
        };

        BoundaryMapService.prototype.pauseBoundary = function pauseBoundary() {
            this.client.pauseBoundary();
        };

        BoundaryMapService.prototype.saveBoundary = function saveBoundary(name, mapName, type) {
            this.client.saveBoundary(name, mapName, type);
        };

        BoundaryMapService.prototype.discardBoundary = function discardBoundary() {
            this.client.discardBoundary();
        };

        return BoundaryMapService;
    }()) || _class);
});
var cov_161jokdsf2 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/services/auth-service-helper.js',
        hash = 'f307c7e6912200cd1e5494a851dad35c6675c533',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/services/auth-service-helper.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('services/auth-service-helper',['exports', 'aurelia-framework', 'aurelia-open-id-connect', 'aurelia-configuration'], function (exports, _aureliaFramework, _aureliaOpenIdConnect, _aureliaConfiguration) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.AuthServiceHelper = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var authLogger = _aureliaFramework.LogManager.getLogger('auth-service-helper');

    var AuthServiceHelper = exports.AuthServiceHelper = (_dec = (0, _aureliaFramework.inject)(_aureliaOpenIdConnect.OpenIdConnect, _aureliaConfiguration.AureliaConfiguration), _dec(_class = function () {
        function AuthServiceHelper(openIdConnect, appConfig) {
            var _this = this;

            _classCallCheck(this, AuthServiceHelper);

            this.appConfig = appConfig;
            this.openIdConnect = openIdConnect;
            this.openIdConnect.observeUser(function (user) {
                if (typeof user === 'undefined' || user === null) {
                    return;
                }
                if (user.expired) {
                    _this.loginSilent().catch(function (error) {
                        authLogger.error(error);
                        _this.openIdConnect.login();
                    });
                } else {
                    _this.user = user;
                }

                _this.openIdConnect.userManager.events.addAccessTokenExpiring(function () {
                    _this.openIdConnect.userManager.clearStaleState();
                    authLogger.info('token expiring in ... ' + _this.user.expires_in + ' seconds');
                });

                _this.openIdConnect.userManager.events.addAccessTokenExpired(function () {
                    _this.openIdConnect.userManager.clearStaleState();
                    authLogger.info('token expired...');
                });

                _this.openIdConnect.userManager.events.addSilentRenewError(function () {
                    _this.openIdConnect.userManager.clearStaleState();
                    _this.user = null;
                    authLogger.info('automatic silent renew of access token has failed...');
                    _this.loginSilent().catch(function (error) {
                        authLogger.error(error);
                        _this.openIdConnect.login();
                    });
                });

                _this.openIdConnect.userManager.events.addUserSignedOut(function () {
                    _this.openIdConnect.userManager.removeUser();
                    _this.openIdConnect.userManager.clearStaleState();
                    _this.user = null;
                    _this.openIdConnect.login();
                    authLogger.info('users sign-in status at the OP has changed...');
                });
            });
        }

        AuthServiceHelper.prototype.isAdmin = function isAdmin() {
            var isCloud = this.appConfig.get('Web.IsCloud');

            if (!isCloud) {
                return true;
            }
            var profile = this.user.profile;

            if (profile.role !== null && profile.role instanceof Array) {
                return profile.role.some(function (r) {
                    return r === 'SystemAdministrator';
                });
            } else if (profile.role !== null) {
                return profile.role === 'SystemAdministrator';
            }
            return false;
        };

        AuthServiceHelper.prototype.getAccessToken = function getAccessToken() {
            return this.user.access_token;
        };

        AuthServiceHelper.prototype.getUser = function getUser() {
            return this.user;
        };

        AuthServiceHelper.prototype.loginSilent = function loginSilent() {
            return this.openIdConnect.loginSilent();
        };

        AuthServiceHelper.prototype.login = function login() {
            this.openIdConnect.login();
        };

        AuthServiceHelper.prototype.logout = function logout() {
            this.openIdConnect.logout();
        };

        return AuthServiceHelper;
    }()) || _class);
});
var cov_278no603hv = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/uintToVersionNumber.js',
        hash = '3d9c30e6862581cce0c778d259847ee144e0ff99',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/uintToVersionNumber.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/uintToVersionNumber',['exports'], function (exports) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var UintToVersionNumberValueConverter = exports.UintToVersionNumberValueConverter = function () {
        function UintToVersionNumberValueConverter() {
            _classCallCheck(this, UintToVersionNumberValueConverter);
        }

        UintToVersionNumberValueConverter.prototype.toView = function toView(value) {
            var byteArray = [0, 0, 0, 0];

            for (var index = 3; index >= 0; index--) {
                var byte = value & 0xff;
                byteArray[index] = byte;
                value = (value - byte) / 256;
            }
            return '' + parseInt(byteArray[1], 10) + '.' + parseInt(byteArray[2], 10) + '.' + parseInt(byteArray[3], 10);
        };

        UintToVersionNumberValueConverter.prototype.fromView = function fromView(value) {
            return value;
        };

        UintToVersionNumberValueConverter.prototype.forValidate = function forValidate(value) {
            return value;
        };

        return UintToVersionNumberValueConverter;
    }();
});
var cov_asqyw2qns = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/sqMmToAcres.js',
        hash = '5c5fcb043559a00d28b832b7aef6353eafc74ef6',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/sqMmToAcres.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/sqMmToAcres',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SqMmToAcresValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var SqMmToAcresValueConverter = exports.SqMmToAcresValueConverter = function () {
        function SqMmToAcresValueConverter() {
            _classCallCheck(this, SqMmToAcresValueConverter);
        }

        SqMmToAcresValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0';
            }
            var sqMmPerAcre = 4046856422.4;
            var txtValue = (0, _numeral2.default)(value / sqMmPerAcre).format(format);
            return txtValue;
        };

        SqMmToAcresValueConverter.prototype.fromView = function fromView(value) {
            var sqMmPerAcre = 4046856422.4;
            var num = (0, _numeral2.default)(value).value();
            var val = (0, _numeral2.default)(num * sqMmPerAcre).value();
            return val;
        };

        return SqMmToAcresValueConverter;
    }();
});
var cov_26sc0xghi8 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/radiansToDegrees.js',
        hash = 'f0b64bd646d954b6ad86cd1169f2fc5dbab0a241',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/radiansToDegrees.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/radiansToDegrees',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.RadiansToDegreesValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var RadiansToDegreesValueConverter = exports.RadiansToDegreesValueConverter = function () {
        function RadiansToDegreesValueConverter() {
            _classCallCheck(this, RadiansToDegreesValueConverter);
        }

        RadiansToDegreesValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0.0';
            }
            return (0, _numeral2.default)(value * 180 / Math.PI).format(format);
        };

        RadiansToDegreesValueConverter.prototype.fromView = function fromView(value) {
            return (0, _numeral2.default)(value * Math.PI / 180).value();
        };

        RadiansToDegreesValueConverter.prototype.forValidate = function forValidate(value) {
            return (0, _numeral2.default)(value * 180 / Math.PI).value();
        };

        return RadiansToDegreesValueConverter;
    }();
});
var cov_1beiumiyit = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/plusone-format.js',
        hash = '04a63c29300ac872a67e1edc8a26eac9e7093fba',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/plusone-format.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/plusone-format',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PlusoneFormatValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var PlusoneFormatValueConverter = exports.PlusoneFormatValueConverter = function () {
        function PlusoneFormatValueConverter() {
            _classCallCheck(this, PlusoneFormatValueConverter);
        }

        PlusoneFormatValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0';
            }
            var txtValue = (0, _numeral2.default)(value + 1).format(format);
            return txtValue;
        };

        PlusoneFormatValueConverter.prototype.fromView = function fromView(value) {
            var num = (0, _numeral2.default)(value).value();
            var val = (0, _numeral2.default)(num - 1).value();
            return val;
        };

        PlusoneFormatValueConverter.prototype.forValidate = function forValidate(value) {
            var val = (0, _numeral2.default)(value + 1).value();
            return val;
        };

        return PlusoneFormatValueConverter;
    }();
});
var cov_1ha6ulpvkb = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/number-format.js',
        hash = '4159e02776fb61c9889cd2ff77c6db0e41113fca',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/number-format.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/number-format',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.NumberFormatValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var NumberFormatValueConverter = exports.NumberFormatValueConverter = function () {
        function NumberFormatValueConverter() {
            _classCallCheck(this, NumberFormatValueConverter);
        }

        NumberFormatValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0';
            }
            var val = (0, _numeral2.default)(value).format(format);
            return val;
        };

        NumberFormatValueConverter.prototype.fromView = function fromView(value) {
            var numValue = (0, _numeral2.default)(value).value();
            return numValue;
        };

        return NumberFormatValueConverter;
    }();
});
var cov_17x0umxzsc = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/multiplier-format.js',
        hash = '77bad025ee0cabd4469c5973e53022fde32d21dd',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/multiplier-format.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/multiplier-format',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.MultiplierFormatValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var MultiplierFormatValueConverter = exports.MultiplierFormatValueConverter = function () {
        function MultiplierFormatValueConverter() {
            _classCallCheck(this, MultiplierFormatValueConverter);
        }

        MultiplierFormatValueConverter.prototype.toView = function toView(value, divisor, format) {
            if (!format) {
                format = '0';
            }
            var txtValue = (0, _numeral2.default)(value / divisor).format(format);
            return txtValue;
        };

        MultiplierFormatValueConverter.prototype.fromView = function fromView(value, multiplier) {
            var num = (0, _numeral2.default)(value).value();
            var val = (0, _numeral2.default)(num * multiplier).value();
            return val;
        };

        MultiplierFormatValueConverter.prototype.forValidate = function forValidate(value, divisor) {
            var val = (0, _numeral2.default)(value / divisor).value();
            return val;
        };

        return MultiplierFormatValueConverter;
    }();
});
var cov_7ak1mehc7 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/mmToInches.js',
        hash = '9ac8e9f118e4c631479a3a1e5d8c14c6e989a5c7',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/mmToInches.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/mmToInches',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.MmToInchesValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var MmToInchesValueConverter = exports.MmToInchesValueConverter = function () {
        function MmToInchesValueConverter() {
            _classCallCheck(this, MmToInchesValueConverter);
        }

        MmToInchesValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0';
            }
            var mmPerInch = 25.4;
            var txtValue = (0, _numeral2.default)(value / mmPerInch).format(format);
            return txtValue;
        };

        MmToInchesValueConverter.prototype.fromView = function fromView(value) {
            var mmPerInch = 25.4;
            var num = (0, _numeral2.default)(value).value();
            var val = (0, _numeral2.default)(num * mmPerInch).value();
            return val;
        };

        MmToInchesValueConverter.prototype.forValidate = function forValidate(value) {
            var mmPerInch = 25.4;
            var num = (0, _numeral2.default)(value / mmPerInch).value();
            return num;
        };

        return MmToInchesValueConverter;
    }();
});
var cov_1b4iop6gy7 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/mmPerSecondToMph.js',
        hash = '74f2cb78d872dc4599cabb5bfa186a42bf2fd95c',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/mmPerSecondToMph.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/mmPerSecondToMph',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.MmPerSecondToMphValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var MmPerSecondToMphValueConverter = exports.MmPerSecondToMphValueConverter = function () {
        function MmPerSecondToMphValueConverter() {
            _classCallCheck(this, MmPerSecondToMphValueConverter);
        }

        MmPerSecondToMphValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0.0';
            }

            var mmPerMile = 1609340;
            var secondsPerHour = 3600;
            return (0, _numeral2.default)(value * secondsPerHour / mmPerMile).format(format);
        };

        MmPerSecondToMphValueConverter.prototype.fromView = function fromView(value) {
            var mmPerMile = 1609340;
            var secondsPerHour = 3600;
            return (0, _numeral2.default)(value / secondsPerHour * mmPerMile).value();
        };

        MmPerSecondToMphValueConverter.prototype.forValidate = function forValidate(value) {
            var mmPerMile = 1609340;
            var secondsPerHour = 3600;
            return (0, _numeral2.default)(value * secondsPerHour / mmPerMile).value();
        };

        return MmPerSecondToMphValueConverter;
    }();
});
var cov_wsaa706vl = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/mlToGal.js',
        hash = 'bcc37b05025f211cbcfff644ac649852598efedd',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/mlToGal.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/mlToGal',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.MlToGalValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var MlToGalValueConverter = exports.MlToGalValueConverter = function () {
        function MlToGalValueConverter() {
            _classCallCheck(this, MlToGalValueConverter);
        }

        MlToGalValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0';
            }
            var galPerMl = 0.0002641721;
            var txtValue = (0, _numeral2.default)(value * galPerMl).format(format);
            return txtValue;
        };

        MlToGalValueConverter.prototype.fromView = function fromView(value) {
            var galPerMl = 0.0002641721;
            var num = (0, _numeral2.default)(value).value();
            var val = Math.floor((0, _numeral2.default)(num / galPerMl).value());
            return val;
        };

        MlToGalValueConverter.prototype.forValidate = function forValidate(value) {
            var galPerMl = 0.0002641721;
            var num = (0, _numeral2.default)(value * galPerMl).value();
            return num;
        };

        return MlToGalValueConverter;
    }();
});
var cov_1u9a09s9ye = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/mlPerHectareToGpa.js',
        hash = 'b86424280e0c6b521bf25a9d997fff67af8949dd',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/mlPerHectareToGpa.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/mlPerHectareToGpa',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.MlPerHectareToGpaValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var MlPerHectareToGpaValueConverter = exports.MlPerHectareToGpaValueConverter = function () {
        function MlPerHectareToGpaValueConverter() {
            _classCallCheck(this, MlPerHectareToGpaValueConverter);
        }

        MlPerHectareToGpaValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0';
            }
            var mLPerGallon = 3785.41;
            var acrePerHectare = 2.47105;
            var txtValue = (0, _numeral2.default)(value / mLPerGallon / acrePerHectare).format(format);
            return txtValue;
        };

        MlPerHectareToGpaValueConverter.prototype.fromView = function fromView(value) {
            var mLPerGallon = 3785.41;
            var acrePerHectare = 2.47105;
            var num = (0, _numeral2.default)(value).value();
            var val = (0, _numeral2.default)(num * mLPerGallon * acrePerHectare).value();
            return val;
        };

        MlPerHectareToGpaValueConverter.prototype.forValidate = function forValidate(value) {
            var mLPerGallon = 3785.41;
            var acrePerHectare = 2.47105;
            var num = (0, _numeral2.default)(value / mLPerGallon / acrePerHectare).value();
            return num;
        };

        return MlPerHectareToGpaValueConverter;
    }();
});
var cov_1j7n7ryoh7 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/mVoltToVolt.js',
        hash = '3749466b025c4a0930bf58e444b3d74a181b01a8',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/mVoltToVolt.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/mVoltToVolt',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.MVoltToVoltValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var MVoltToVoltValueConverter = exports.MVoltToVoltValueConverter = function () {
        function MVoltToVoltValueConverter() {
            _classCallCheck(this, MVoltToVoltValueConverter);
        }

        MVoltToVoltValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0';
            }
            var mvoltsPerVolt = 1000;
            var txtValue = (0, _numeral2.default)(value).divide(mvoltsPerVolt).format(format);
            return txtValue;
        };

        MVoltToVoltValueConverter.prototype.fromView = function fromView(value) {
            var mvoltsPerVolt = 1000;
            var num = (0, _numeral2.default)(value).value();
            var val = (0, _numeral2.default)(num).multiply(mvoltsPerVolt).value();
            return val;
        };

        MVoltToVoltValueConverter.prototype.forValidate = function forValidate(value) {
            var mvoltsPerVolt = 1000;
            var num = (0, _numeral2.default)(value).divide(mvoltsPerVolt).value();
            return num;
        };

        return MVoltToVoltValueConverter;
    }();
});
var cov_czzyspgjh = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/literToGal.js',
        hash = '14ab6ef470dfcbcffc78d24b99cfe135fd893635',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/literToGal.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/literToGal',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.LiterToGalValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var LiterToGalValueConverter = exports.LiterToGalValueConverter = function () {
        function LiterToGalValueConverter() {
            _classCallCheck(this, LiterToGalValueConverter);
        }

        LiterToGalValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0';
            }
            var litersPerGallon = 0.264172;
            var txtValue = (0, _numeral2.default)(value).divide(litersPerGallon).format(format);
            return txtValue;
        };

        LiterToGalValueConverter.prototype.fromView = function fromView(value) {
            var litersPerGallon = 0.264172;
            var num = (0, _numeral2.default)(value).value();
            var val = (0, _numeral2.default)(num).multiply(litersPerGallon).value();
            return val;
        };

        LiterToGalValueConverter.prototype.forValidation = function forValidation(value) {
            var litersPerGallon = 3.78541;
            var num = (0, _numeral2.default)(value / litersPerGallon).value();
            return num;
        };

        return LiterToGalValueConverter;
    }();
});
var cov_fd23xb68r = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/kpaToPsi.js',
        hash = 'ea9e07d95a909a2f72ff721e35ec52a6538ff17a',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/kpaToPsi.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/kpaToPsi',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.KpaToPsiValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var KpaToPsiValueConverter = exports.KpaToPsiValueConverter = function () {
        function KpaToPsiValueConverter() {
            _classCallCheck(this, KpaToPsiValueConverter);
        }

        KpaToPsiValueConverter.prototype.toView = function toView(value, format) {
            if (isNaN(value)) {
                return '-';
            }
            if (!format) {
                format = '0.0';
            }
            var psiPerKpa = 6.89475729;
            return (0, _numeral2.default)(value).divide(psiPerKpa).format(format);
        };

        KpaToPsiValueConverter.prototype.fromView = function fromView(value) {
            var psiPerKpa = 6.89475729;
            return (0, _numeral2.default)(value).multiply(psiPerKpa).value();
        };

        KpaToPsiValueConverter.prototype.forValidate = function forValidate(value) {
            var psiPerKpa = 6.89475729;
            return (0, _numeral2.default)(value).divide(psiPerKpa).value();
        };

        return KpaToPsiValueConverter;
    }();
});
var cov_6951xwnts = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/hectaresToAcres.js',
        hash = 'cff69b24c06b9ffd397894db73f648ab90777475',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/hectaresToAcres.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/hectaresToAcres',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.HectaresToAcresValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var HectaresToAcresValueConverter = exports.HectaresToAcresValueConverter = function () {
        function HectaresToAcresValueConverter() {
            _classCallCheck(this, HectaresToAcresValueConverter);
        }

        HectaresToAcresValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0';
            }
            var acresPerHectare = 2.47105;
            var txtValue = (0, _numeral2.default)(value * acresPerHectare).format(format);
            return txtValue;
        };

        HectaresToAcresValueConverter.prototype.fromView = function fromView(value) {
            var acresPerHectare = 2.47105;
            var num = (0, _numeral2.default)(value).value();
            var val = (0, _numeral2.default)(num / acresPerHectare).value();
            return val;
        };

        HectaresToAcresValueConverter.prototype.forValidation = function forValidation(value) {
            var acresPerHectare = 2.47105;
            var num = (0, _numeral2.default)(value * acresPerHectare).value();
            return num;
        };

        return HectaresToAcresValueConverter;
    }();
});
var cov_2ri2b033mi = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/flowmeterCalibration.js',
        hash = '26f37da6e4c4378cd7aa7978f90252183761972b',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/flowmeterCalibration.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/flowmeterCalibration',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.FlowmeterCalibrationValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var FlowmeterCalibrationValueConverter = exports.FlowmeterCalibrationValueConverter = function () {
        function FlowmeterCalibrationValueConverter() {
            _classCallCheck(this, FlowmeterCalibrationValueConverter);

            this.conversion = 3.78544119317;
        }

        FlowmeterCalibrationValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0';
            }

            return (0, _numeral2.default)(value).multiply(this.conversion).format(format);
        };

        FlowmeterCalibrationValueConverter.prototype.fromView = function fromView(value) {
            return (0, _numeral2.default)(value).divide(this.conversion).value();
        };

        FlowmeterCalibrationValueConverter.prototype.forValidate = function forValidate(value) {
            var validationConversion = 3.78544119317;
            var val = (0, _numeral2.default)(value).multiply(validationConversion).value();

            return val;
        };

        return FlowmeterCalibrationValueConverter;
    }();
});
var cov_k1zo4ty1d = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/dutyCycle.js',
        hash = '50256dfd45db7fb6694815de91cf30d413e475f8',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/dutyCycle.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/dutyCycle',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.DutyCycleValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var DutyCycleValueConverter = exports.DutyCycleValueConverter = function () {
        function DutyCycleValueConverter() {
            _classCallCheck(this, DutyCycleValueConverter);
        }

        DutyCycleValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0';
            }
            return (0, _numeral2.default)(100 * value / 200).format(format);
        };

        return DutyCycleValueConverter;
    }();
});
var cov_1ffy98zae4 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/datetime-format.js',
        hash = '3cf66488a69060b76b0fa76dec15e22a636339f1',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/datetime-format.js',
        statementMap: {
            '0': {
                start: {
                    line: 14,
                    column: 8
                },
                end: {
                    line: 16,
                    column: 9
                }
            },
            '1': {
                start: {
                    line: 15,
                    column: 12
                },
                end: {
                    line: 15,
                    column: 48
                }
            },
            '2': {
                start: {
                    line: 18,
                    column: 8
                },
                end: {
                    line: 18,
                    column: 20
                }
            }
        },
        fnMap: {
            '0': {
                name: '(anonymous_0)',
                decl: {
                    start: {
                        line: 13,
                        column: 4
                    },
                    end: {
                        line: 13,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 13,
                        column: 26
                    },
                    end: {
                        line: 19,
                        column: 5
                    }
                },
                line: 13
            }
        },
        branchMap: {
            '0': {
                loc: {
                    start: {
                        line: 14,
                        column: 8
                    },
                    end: {
                        line: 16,
                        column: 9
                    }
                },
                type: 'if',
                locations: [{
                    start: {
                        line: 14,
                        column: 8
                    },
                    end: {
                        line: 16,
                        column: 9
                    }
                }, {
                    start: {
                        line: 14,
                        column: 8
                    },
                    end: {
                        line: 16,
                        column: 9
                    }
                }],
                line: 14
            }
        },
        s: {
            '0': 0,
            '1': 0,
            '2': 0
        },
        f: {
            '0': 0
        },
        b: {
            '0': [0, 0]
        },
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/datetime-format',['exports', 'moment'], function (exports, _moment) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.DateTimeFormatValueConverter = undefined;

    var _moment2 = _interopRequireDefault(_moment);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var DateTimeFormatValueConverter = exports.DateTimeFormatValueConverter = function () {
        function DateTimeFormatValueConverter() {
            _classCallCheck(this, DateTimeFormatValueConverter);
        }

        DateTimeFormatValueConverter.prototype.toView = function toView(value, format) {
            cov_1ffy98zae4.f[0]++;
            cov_1ffy98zae4.s[0]++;

            if (value) {
                cov_1ffy98zae4.b[0][0]++;
                cov_1ffy98zae4.s[1]++;

                return (0, _moment2.default)(value).format(format);
            } else {
                cov_1ffy98zae4.b[0][1]++;
            }

            cov_1ffy98zae4.s[2]++;
            return null;
        };

        return DateTimeFormatValueConverter;
    }();
});
var cov_w7svqmaj6 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/bytesToKilobytes.js',
        hash = 'b9333e0dcc61cf400e6fb60d0397e3a25989038c',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/bytesToKilobytes.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/bytesToKilobytes',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.BytesToKilobytesValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var BytesToKilobytesValueConverter = exports.BytesToKilobytesValueConverter = function () {
        function BytesToKilobytesValueConverter() {
            _classCallCheck(this, BytesToKilobytesValueConverter);
        }

        BytesToKilobytesValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0,0';
            }
            var bytesPerKilobyte = 1024;
            return (0, _numeral2.default)(value / bytesPerKilobyte).format(format);
        };

        return BytesToKilobytesValueConverter;
    }();
});
var cov_z03djeru5 = function () {
  var path = '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/bitToStatus.js',
      hash = 'c74aa6460e5a9f695319fda37b8d4a47a92de0e2',
      global = new Function('return this')(),
      gcv = '__coverage__',
      coverageData = {
    path: '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/bitToStatus.js',
    statementMap: {},
    fnMap: {},
    branchMap: {},
    s: {},
    f: {},
    b: {},
    _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('resources/value-converters/bitToStatus',['exports'], function (exports) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  var BitToStatusValueConverter = exports.BitToStatusValueConverter = function () {
    function BitToStatusValueConverter() {
      _classCallCheck(this, BitToStatusValueConverter);
    }

    BitToStatusValueConverter.prototype.toView = function toView(value) {
      return value === 1 ? 'ON' : 'OFF';
    };

    return BitToStatusValueConverter;
  }();
});
var cov_1c8p6b9rpa = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/barToPsi.js',
        hash = '469af7f9e42a82eb203fafc0145ccc26a33250d6',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/resources/value-converters/barToPsi.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/value-converters/barToPsi',['exports', 'numeral'], function (exports, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.BarToPsiValueConverter = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var BarToPsiValueConverter = exports.BarToPsiValueConverter = function () {
        function BarToPsiValueConverter() {
            _classCallCheck(this, BarToPsiValueConverter);
        }

        BarToPsiValueConverter.prototype.toView = function toView(value, format) {
            if (!format) {
                format = '0.0';
            }
            var psiPerBar = 0.0689475729;
            return (0, _numeral2.default)(value).divide(psiPerBar).format(format);
        };

        BarToPsiValueConverter.prototype.fromView = function fromView(value) {
            var psiPerBar = 0.0689475729;
            return (0, _numeral2.default)(value).multiply(psiPerBar).value();
        };

        BarToPsiValueConverter.prototype.forValidate = function forValidate(value) {
            var psiPerBar = 0.0689475729;
            return (0, _numeral2.default)(value).divide(psiPerBar).value();
        };

        return BarToPsiValueConverter;
    }();
});
var cov_xcn8u973q = function () {
  var path = '/opt/atlassian/pipelines/agent/build/Web/src/resources/managers/root-manager.js',
      hash = 'cefba1636a5ebc4ec6c85e6bfaefd40bdd2237cc',
      global = new Function('return this')(),
      gcv = '__coverage__',
      coverageData = {
    path: '/opt/atlassian/pipelines/agent/build/Web/src/resources/managers/root-manager.js',
    statementMap: {
      '0': {
        start: {
          line: 16,
          column: 8
        },
        end: {
          line: 16,
          column: 31
        }
      },
      '1': {
        start: {
          line: 17,
          column: 8
        },
        end: {
          line: 17,
          column: 29
        }
      },
      '2': {
        start: {
          line: 26,
          column: 8
        },
        end: {
          line: 26,
          column: 69
        }
      },
      '3': {
        start: {
          line: 27,
          column: 8
        },
        end: {
          line: 27,
          column: 28
        }
      },
      '4': {
        start: {
          line: 28,
          column: 8
        },
        end: {
          line: 28,
          column: 33
        }
      },
      '5': {
        start: {
          line: 30,
          column: 8
        },
        end: {
          line: 30,
          column: 35
        }
      }
    },
    fnMap: {
      '0': {
        name: '(anonymous_0)',
        decl: {
          start: {
            line: 15,
            column: 4
          },
          end: {
            line: 15,
            column: 5
          }
        },
        loc: {
          start: {
            line: 15,
            column: 33
          },
          end: {
            line: 18,
            column: 5
          }
        },
        line: 15
      },
      '1': {
        name: '(anonymous_1)',
        decl: {
          start: {
            line: 25,
            column: 4
          },
          end: {
            line: 25,
            column: 5
          }
        },
        loc: {
          start: {
            line: 25,
            column: 18
          },
          end: {
            line: 31,
            column: 5
          }
        },
        line: 25
      }
    },
    branchMap: {},
    s: {
      '0': 0,
      '1': 0,
      '2': 0,
      '3': 0,
      '4': 0,
      '5': 0
    },
    f: {
      '0': 0,
      '1': 0
    },
    b: {},
    _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('resources/managers/root-manager',['exports', 'aurelia-framework', 'aurelia-router'], function (exports, _aureliaFramework, _aureliaRouter) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.RootManager = undefined;

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  var _dec, _class;

  var RootManager = exports.RootManager = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.Aurelia, _aureliaRouter.Router), _dec(_class = function () {
    function RootManager(aurelia, router) {
      _classCallCheck(this, RootManager);

      cov_xcn8u973q.f[0]++;
      cov_xcn8u973q.s[0]++;

      this.aurelia = aurelia;
      cov_xcn8u973q.s[1]++;
      this.router = router;
    }

    RootManager.prototype.setRoot = function setRoot(root) {
      cov_xcn8u973q.f[1]++;
      cov_xcn8u973q.s[2]++;

      this.router.navigate('/', { replace: true, trigger: false });
      cov_xcn8u973q.s[3]++;
      this.router.reset();
      cov_xcn8u973q.s[4]++;
      this.router.deactivate();

      cov_xcn8u973q.s[5]++;
      this.aurelia.setRoot(root);
    };

    return RootManager;
  }()) || _class);
});
define('resources/index',["exports"], function (exports) {
  "use strict";

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.configure = configure;
  function configure(config) {}
});
var cov_3guloj45p = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/resources/clients/json-client.js',
        hash = '5532ef46915617a509452a1f4ff090f05643d81a',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/resources/clients/json-client.js',
        statementMap: {
            '0': {
                start: {
                    line: 16,
                    column: 8
                },
                end: {
                    line: 16,
                    column: 25
                }
            },
            '1': {
                start: {
                    line: 25,
                    column: 8
                },
                end: {
                    line: 25,
                    column: 37
                }
            },
            '2': {
                start: {
                    line: 35,
                    column: 22
                },
                end: {
                    line: 38,
                    column: 9
                }
            },
            '3': {
                start: {
                    line: 40,
                    column: 8
                },
                end: {
                    line: 40,
                    column: 40
                }
            },
            '4': {
                start: {
                    line: 50,
                    column: 22
                },
                end: {
                    line: 53,
                    column: 9
                }
            },
            '5': {
                start: {
                    line: 55,
                    column: 8
                },
                end: {
                    line: 55,
                    column: 40
                }
            },
            '6': {
                start: {
                    line: 65,
                    column: 22
                },
                end: {
                    line: 68,
                    column: 9
                }
            },
            '7': {
                start: {
                    line: 70,
                    column: 8
                },
                end: {
                    line: 70,
                    column: 40
                }
            },
            '8': {
                start: {
                    line: 80,
                    column: 8
                },
                end: {
                    line: 84,
                    column: 10
                }
            },
            '9': {
                start: {
                    line: 82,
                    column: 16
                },
                end: {
                    line: 82,
                    column: 39
                }
            }
        },
        fnMap: {
            '0': {
                name: '(anonymous_0)',
                decl: {
                    start: {
                        line: 15,
                        column: 4
                    },
                    end: {
                        line: 15,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 15,
                        column: 22
                    },
                    end: {
                        line: 17,
                        column: 5
                    }
                },
                line: 15
            },
            '1': {
                name: '(anonymous_1)',
                decl: {
                    start: {
                        line: 24,
                        column: 4
                    },
                    end: {
                        line: 24,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 24,
                        column: 13
                    },
                    end: {
                        line: 26,
                        column: 5
                    }
                },
                line: 24
            },
            '2': {
                name: '(anonymous_2)',
                decl: {
                    start: {
                        line: 34,
                        column: 4
                    },
                    end: {
                        line: 34,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 34,
                        column: 23
                    },
                    end: {
                        line: 41,
                        column: 5
                    }
                },
                line: 34
            },
            '3': {
                name: '(anonymous_3)',
                decl: {
                    start: {
                        line: 49,
                        column: 4
                    },
                    end: {
                        line: 49,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 49,
                        column: 22
                    },
                    end: {
                        line: 56,
                        column: 5
                    }
                },
                line: 49
            },
            '4': {
                name: '(anonymous_4)',
                decl: {
                    start: {
                        line: 64,
                        column: 4
                    },
                    end: {
                        line: 64,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 64,
                        column: 32
                    },
                    end: {
                        line: 71,
                        column: 5
                    }
                },
                line: 64
            },
            '5': {
                name: '(anonymous_5)',
                decl: {
                    start: {
                        line: 79,
                        column: 4
                    },
                    end: {
                        line: 79,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 79,
                        column: 24
                    },
                    end: {
                        line: 85,
                        column: 5
                    }
                },
                line: 79
            },
            '6': {
                name: '(anonymous_6)',
                decl: {
                    start: {
                        line: 81,
                        column: 12
                    },
                    end: {
                        line: 81,
                        column: 13
                    }
                },
                loc: {
                    start: {
                        line: 81,
                        column: 24
                    },
                    end: {
                        line: 83,
                        column: 13
                    }
                },
                line: 81
            }
        },
        branchMap: {
            '0': {
                loc: {
                    start: {
                        line: 64,
                        column: 16
                    },
                    end: {
                        line: 64,
                        column: 30
                    }
                },
                type: 'default-arg',
                locations: [{
                    start: {
                        line: 64,
                        column: 26
                    },
                    end: {
                        line: 64,
                        column: 30
                    }
                }],
                line: 64
            },
            '1': {
                loc: {
                    start: {
                        line: 67,
                        column: 18
                    },
                    end: {
                        line: 67,
                        column: 48
                    }
                },
                type: 'cond-expr',
                locations: [{
                    start: {
                        line: 67,
                        column: 28
                    },
                    end: {
                        line: 67,
                        column: 41
                    }
                }, {
                    start: {
                        line: 67,
                        column: 44
                    },
                    end: {
                        line: 67,
                        column: 48
                    }
                }],
                line: 67
            }
        },
        s: {
            '0': 0,
            '1': 0,
            '2': 0,
            '3': 0,
            '4': 0,
            '5': 0,
            '6': 0,
            '7': 0,
            '8': 0,
            '9': 0
        },
        f: {
            '0': 0,
            '1': 0,
            '2': 0,
            '3': 0,
            '4': 0,
            '5': 0,
            '6': 0
        },
        b: {
            '0': [0],
            '1': [0, 0]
        },
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/clients/json-client',['exports', 'aurelia-framework', 'aurelia-fetch-client'], function (exports, _aureliaFramework, _aureliaFetchClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.JsonClient = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var JsonClient = exports.JsonClient = (_dec = (0, _aureliaFramework.inject)(_aureliaFetchClient.HttpClient), _dec(_class = function () {
        function JsonClient(http) {
            _classCallCheck(this, JsonClient);

            cov_3guloj45p.f[0]++;
            cov_3guloj45p.s[0]++;

            this.http = http;
        }

        JsonClient.prototype.get = function get(url) {
            cov_3guloj45p.f[1]++;
            cov_3guloj45p.s[1]++;

            return this.fetch(url, null);
        };

        JsonClient.prototype.post = function post(url, content) {
            cov_3guloj45p.f[2]++;

            var options = (cov_3guloj45p.s[2]++, {
                method: 'post',
                body: (0, _aureliaFetchClient.json)(content)
            });

            cov_3guloj45p.s[3]++;
            return this.fetch(url, options);
        };

        JsonClient.prototype.put = function put(url, content) {
            cov_3guloj45p.f[3]++;

            var options = (cov_3guloj45p.s[4]++, {
                method: 'put',
                body: (0, _aureliaFetchClient.json)(content)
            });

            cov_3guloj45p.s[5]++;
            return this.fetch(url, options);
        };

        JsonClient.prototype.delete = function _delete(url) {
            var content = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (cov_3guloj45p.b[0][0]++, null);
            cov_3guloj45p.f[4]++;

            var options = (cov_3guloj45p.s[6]++, {
                method: 'delete',
                body: content ? (cov_3guloj45p.b[1][0]++, (0, _aureliaFetchClient.json)(content)) : (cov_3guloj45p.b[1][1]++, null)
            });

            cov_3guloj45p.s[7]++;
            return this.fetch(url, options);
        };

        JsonClient.prototype.fetch = function fetch(url, options) {
            cov_3guloj45p.f[5]++;
            cov_3guloj45p.s[8]++;

            return this.http.fetch(url, options).then(function (response) {
                cov_3guloj45p.f[6]++;
                cov_3guloj45p.s[9]++;

                return response.json();
            });
        };

        return JsonClient;
    }()) || _class);
});
var cov_2ndd93fz04 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/resources/binding-behavior/auto-sync.js',
        hash = '00e1574b8b664c079feb385d19d4cd6e3db43454',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/resources/binding-behavior/auto-sync.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/binding-behavior/auto-sync',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.AutoSyncBindingBehavior = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var autoSyncLogger = _aureliaFramework.LogManager.getLogger('auto-sync');

    var AutoSyncBindingBehavior = exports.AutoSyncBindingBehavior = function () {
        function AutoSyncBindingBehavior() {
            _classCallCheck(this, AutoSyncBindingBehavior);
        }

        AutoSyncBindingBehavior.prototype.bind = function bind(binding, scope) {
            var cancellable = {
                originalUpdateSource: binding.updateSource,
                originalUpdateTarget: binding.updateTarget
            };

            binding.updateSource = function (val) {
                var propertyName = void 0;
                if (scope.bindingContext.prop) {
                    propertyName = scope.bindingContext.prop;
                } else {
                    propertyName = binding.target.name;
                }
                if (scope.bindingContext._needsSync) {
                    scope.bindingContext._needsSync.push(propertyName);
                } else if (scope.bindingContext.parent._needsSync) {
                    scope.bindingContext.parent._needsSync.push(propertyName);
                } else {
                    throw new Error('binding context or parent binding context requires _needsSync array');
                }

                cancellable.originalUpdateSource.call(binding, val);
            };

            binding.updateTarget = function (val) {
                if (!isNaN(val)) {
                    cancellable.originalUpdateTarget.call(binding, val);
                } else {
                    var s = scope;
                    autoSyncLogger.warn('value must be a number for ' + s.bindingContext.prop);
                }
            };

            binding.cancellable = cancellable;
        };

        AutoSyncBindingBehavior.prototype.unbind = function unbind(binding, scope) {
            binding.updateSource = binding.cancellable.originalUpdateSource;
            binding.updateTarget = binding.cancellable.originalUpdateTarget;
            binding.cancellable = null;
        };

        return AutoSyncBindingBehavior;
    }();
});
var cov_2m74vdsdqn = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/resources/attributes/focus-bind-break.js',
        hash = 'fd67aaa74b016f609986136294ba20dacf86a8f3',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/resources/attributes/focus-bind-break.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('resources/attributes/focus-bind-break',['exports', 'aurelia-framework', 'numeral'], function (exports, _aureliaFramework, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.FocusBindBreak = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _dec2, _class;

    var FocusBindBreak = exports.FocusBindBreak = (_dec = (0, _aureliaFramework.customAttribute)('focus-bind-break', _aureliaFramework.bindingMode.twoWay), _dec2 = (0, _aureliaFramework.inject)(_aureliaFramework.DOM.Element, _aureliaFramework.TaskQueue), _dec(_class = _dec2(_class = function () {
        function FocusBindBreak(input, taskQueue) {
            var _this = this;

            _classCallCheck(this, FocusBindBreak);

            this.format = '0.0';

            this.change = function () {
                if (_this.input.value === '') {
                    _this.value = null;
                    return;
                }

                var number = _this.getNumber(_this.input.value);
                if (isNaN(number)) {
                    _this.valueChanged();
                } else {
                    var s = (0, _numeral2.default)(number).format(_this.format);
                    _this.input.value = s;
                    _this.value = number;
                    _this.input.blur();
                }
            };

            this.input = input;
            this.taskQueue = taskQueue;
            this.focusListener = function (e) {
                return _this.focused = true;
            };
            this.blurListener = function (e) {
                if (document.activeElement !== _this.input) {
                    _this.focused = false;
                }
            };
        }

        FocusBindBreak.prototype.valueChanged = function valueChanged() {
            if (!this.focused) {
                var number = (0, _numeral2.default)(this.value).value();
                if (isNaN(number)) {
                    this.input.value = '';
                } else {
                    this.input.value = (0, _numeral2.default)(number).format(this.format);
                }
            }
        };

        FocusBindBreak.prototype.getNumber = function getNumber(value) {
            var number = parseFloat(value);
            return !isNaN(number) && isFinite(value) ? number : NaN;
        };

        FocusBindBreak.prototype.focusedChanged = function focusedChanged(newValue) {
            if (newValue) {
                this.giveFocus();
            } else {
                this.input.blur();
            }
        };

        FocusBindBreak.prototype.giveFocus = function giveFocus() {
            var _this2 = this;

            this.taskQueue.queueMicroTask(function () {
                if (_this2.focused) {
                    _this2.input.focus();
                }
            });
        };

        FocusBindBreak.prototype.attached = function attached() {
            this.valueChanged();
            this.input.addEventListener('change', this.change);
            this.input.addEventListener('focus', this.focusListener);
            this.input.addEventListener('blur', this.blurListener);
        };

        FocusBindBreak.prototype.detached = function detached() {
            this.input.removeEventListener('change', this.change);
            this.input.removeEventListener('focus', this.focusListener);
            this.input.removeEventListener('blur', this.blurListener);
        };

        return FocusBindBreak;
    }()) || _class) || _class);
});
var cov_2dwc2snl7i = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/oidc-config.js',
        hash = '5c5898fb573df262f50b445d89545b16ada0dbaf',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/oidc-config.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('oidc-config',['exports', 'oidc-client'], function (exports, _oidcClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });

    var appHost = 'http://10.1.1.10:9000';

    var oidcConfig = {
        loginRedirectRoute: '/',
        logoutRedirectRoute: '/dashboard',
        unauthorizedRedirectRoute: '/home',
        userManagerSettings: {
            accessTokenExpiringNotificationTime: 1,

            authority: 'http://localhost:5000',

            automaticSilentRenew: true,

            monitorSession: true,
            checkSessionInterval: 2000,

            client_id: 'cloud-app',

            filterProtocolClaims: true,
            loadUserInfo: true,
            post_logout_redirect_uri: appHost + '/signout-oidc',
            redirect_uri: appHost + '/signin-oidc',
            response_type: 'id_token token',
            scope: 'openid email profile api1',

            silentRequestTimeout: 10000,
            silent_redirect_uri: appHost + '/signin-oidc',
            userStore: new _oidcClient.WebStorageStateStore({
                prefix: 'oidc',
                store: window.localStorage
            })
        }
    };
    exports.default = oidcConfig;
});
define('main',['exports', './environment', 'aurelia-configuration', 'aurelia-router', 'i18next-xhr-backend', './oidc-config', 'aurelia-framework', 'aurelia-logging-console', 'stats', 'jquery'], function (exports, _environment, _aureliaConfiguration, _aureliaRouter, _i18nextXhrBackend, _oidcConfig, _aureliaFramework, _aureliaLoggingConsole) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.configure = configure;

    var _environment2 = _interopRequireDefault(_environment);

    var _i18nextXhrBackend2 = _interopRequireDefault(_i18nextXhrBackend);

    var _oidcConfig2 = _interopRequireDefault(_oidcConfig);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function configure(aurelia) {
        var container = aurelia.container;
        var aureliaConfig = container.get(_aureliaConfiguration.AureliaConfiguration);

        aurelia.use.standardConfiguration().globalResources(['views/dashboard/popover-element', 'components/shared/select2']).feature('resources').plugin('aurelia-configuration', function (config) {
            config.setEnvironments({
                development: ['10.1.1.10:9000'],
                production: ['demeter-dev.azurewebsites.net']
            });

            config.setConfig('config.json');
        }).plugin('aurelia-open-id-connect', function () {
            var webConfig = aureliaConfig.get('Web');
            var idSrvrConfig = aureliaConfig.get('IdentityProvider');

            _oidcConfig2.default.appHost = webConfig.AppUrl;

            _oidcConfig2.default.userManagerSettings.authority = idSrvrConfig.AuthorityUrl;
            _oidcConfig2.default.userManagerSettings.post_logout_redirect_uri = idSrvrConfig.PostLogoutRedirectUrl;
            _oidcConfig2.default.userManagerSettings.redirect_uri = idSrvrConfig.RedirectUri;
            _oidcConfig2.default.userManagerSettings.silent_redirect_uri = idSrvrConfig.SilentRedirectUrl;
            _oidcConfig2.default.userManagerSettings.silentRequestTimeout = idSrvrConfig.SilentRequestTimeout;
            return _oidcConfig2.default;
        }).plugin('aurelia-i18n', function (instance) {
            instance.i18next.use(_i18nextXhrBackend2.default);

            return instance.setup({
                backend: {
                    loadPath: '/api/translations/{{lng}}/{{ns}}'
                },
                lng: 'en',
                attributes: ['translate', 'i18n'],
                fallbackLng: 'en',
                debug: false,
                ns: ['translation'],
                defaultNS: 'translation'
            }).then(function () {
                aurelia.container.get(_aureliaRouter.Router).transformTitle = function (title) {
                    return instance.tr(title);
                };
            });
        }).plugin('aurelia-validation').plugin('aurelia-dialog', function (cfg) {
            cfg.useCSS('');
        });

        _aureliaFramework.LogManager.addAppender(new _aureliaLoggingConsole.ConsoleAppender());
        _aureliaFramework.LogManager.setLevel(_environment2.default.debug ? _aureliaFramework.LogManager.logLevel.debug : _aureliaFramework.LogManager.logLevel.error);

        if (_environment2.default.testing) {
            aurelia.use.plugin('aurelia-testing');
        }

        aurelia.start().then(function () {
            aurelia.setRoot('app');
        });
    }
});
var cov_1bhbb4dh99 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/logout.js',
        hash = '3813ac299c2e1d3a802b019ffebbc8e1358fb5e7',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/logout.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('logout',['exports', 'aurelia-auth', 'aurelia-framework'], function (exports, _aureliaAuth, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Logout = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var Logout = exports.Logout = (_dec = (0, _aureliaFramework.inject)(_aureliaAuth.AuthService, _aureliaAuth.Authentication), _dec(_class = function () {
        function Logout(authService, authentication) {
            _classCallCheck(this, Logout);

            this.authService = authService;
            this.authentication = authentication;
        }

        Logout.prototype.activate = function activate() {
            var idToken = this.authentication.getToken('aurelia_token');
            this.authService.logout('http://localhost:5000/connect/endsession?id_token_hint=' + idToken + 'post_logout_redirect_uri' + ' http://localhost:5002').then(function (response) {}).catch(function (err) {});
        };

        return Logout;
    }()) || _class);
});
define('text!logout.html', ['module'], function(module) { module.exports = "<template>\n    <section class=\"au-animate\">\n    \n    </section>\n</template>\n"; });
var cov_1kui76jps3 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/login.js',
        hash = 'e9d9952e2e8a739695be661150bf4d73583acdfd',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/login.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('login',['exports', 'aurelia-auth', 'aurelia-framework'], function (exports, _aureliaAuth, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Login = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var Login = exports.Login = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.Aurelia, _aureliaAuth.AuthService), _dec(_class = function () {
        function Login(aurelia, auth) {
            _classCallCheck(this, Login);

            this.heading = 'Login';

            this.auth = auth;
            this.aurelia = aurelia;
        }

        Login.prototype.authenticate = function authenticate(name) {
            var _this = this;

            return this.auth.authenticate(name, false, null).then(function (response) {
                _this.auth.setToken(response.id_token);
            }).catch(function (err) {});
        };

        return Login;
    }()) || _class);
});
define('text!login.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"./components/shared/login-footer\"></require>\n    <require from=\"./components/shared/login-header\"></require>\n\n    <login-header></login-header>\n    <div>\n        <h1>${message}</h1>\n    </div>\n    <h2 class=\"text-center\">Log in</h2>\n    <button class=\"btn btn-block btn-facebook\" click.delegate=\"authenticate('identSrv', true)\">\n        <i class=\"ion-social-facebook\"></i> Sign in with IdentityServer\n    </button>\n    <router-view></router-view>\n    <login-footer></login-footer>\n</template>\n"; });
var cov_2jhuxg6lx4 = function () {
  var path = '/opt/atlassian/pipelines/agent/build/Web/src/layouts/default.js',
      hash = '8da36ad47562c6261c410100bb1833a81fe01612',
      global = new Function('return this')(),
      gcv = '__coverage__',
      coverageData = {
    path: '/opt/atlassian/pipelines/agent/build/Web/src/layouts/default.js',
    statementMap: {},
    fnMap: {},
    branchMap: {},
    s: {},
    f: {},
    b: {},
    _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('layouts/default',['exports', 'px-navbar'], function (exports) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.Default = undefined;

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  var Default = exports.Default = function Default() {
    _classCallCheck(this, Default);
  };
});
define('text!layouts/default.html', ['module'], function(module) { module.exports = "<template>\n    <!-- Components -->\n    <require from=\"px/css/bootstrap.min.css\"></require>\n    <require from=\"px/css/pixeladmin.min.css\"></require>\n    <require from=\"px/css/widgets.min.css\"></require>\n    <require from=\"px/css/themes/candy-green.min.css\"></require>\n    <require from=\"px/ionicons/css/ionicons.min.css\"></require>\n    <require from=\"../components/shared/app-nav\"></require>\n    <require from=\"../app.css\"></require>\n    <require from=\"../components/shared/app-header\"></require>\n    <require from=\"../components/shared/app-footer\"></require>\n    <require from=\"../layouts/default\"></require>\n    <nav as-element=\"app-nav\" class=\"px-nav px-nav-right\" id=\"px-nav-base-right\">\n    </nav>\n    <nav class=\"navbar px-navbar\">\n        <app-header></app-header>\n    </nav>\n    <div class=\"px-content\">\n        <slot></slot>\n    </div>\n</template>\n"; });
define('text!layouts/basic.html', ['module'], function(module) { module.exports = "<template>\n    <slot></slot>\n</template>\n"; });
var cov_2o3z9apnqg = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/home.js',
        hash = '31dfd3d49b6bfd5c57351c29c00d458541101856',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/home.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('home',['exports', 'aurelia-framework', 'aurelia-open-id-connect'], function (exports, _aureliaFramework, _aureliaOpenIdConnect) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Home = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var Home = exports.Home = (_dec = (0, _aureliaFramework.inject)(_aureliaOpenIdConnect.OpenIdConnect), _dec(_class = function () {
        function Home(openIdConnect) {
            _classCallCheck(this, Home);

            this.openIdConnect = openIdConnect;
        }

        Home.prototype.attached = function attached() {
            var _this = this;

            this.openIdConnect.getUser().then(function (user) {
                if (user) {
                    _this.user = user.profile;
                    _this.message = 'Hello ' + _this.user.name;
                } else {
                    _this.message = 'Not Logged In';
                }
            });
        };

        return Home;
    }()) || _class);
});
define('text!home.html', ['module'], function(module) { module.exports = "<template>\n    ${message}\n</template>\n"; });
var cov_lo01iwvrx = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/fetch-config.js',
        hash = '4ba4dc25e279d2351b7234801dd1aa5627e53941',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/fetch-config.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('fetch-config',['exports', 'aurelia-dependency-injection', 'aurelia-fetch-client', 'aurelia-open-id-connect'], function (exports, _aureliaDependencyInjection, _aureliaFetchClient, _aureliaOpenIdConnect) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.FetchConfig = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var FetchConfig = exports.FetchConfig = (_dec = (0, _aureliaDependencyInjection.inject)(_aureliaFetchClient.HttpClient, _aureliaOpenIdConnect.OpenIdConnect), _dec(_class = function () {
        function FetchConfig(httpClient, openIdConnect) {
            _classCallCheck(this, FetchConfig);

            this.httpClient = httpClient;
            this.openIdConnect = openIdConnect;
        }

        FetchConfig.prototype.configure = function configure() {
            var _this = this;

            var loggedInUser = null;
            this.openIdConnect.getUser().then(function (user) {
                loggedInUser = user;
                _this.httpClient.configure(function (httpConfig) {
                    httpConfig.withDefaults({
                        headers: {
                            'Accept': 'application/json'
                        }
                    }).withInterceptor(_this.tokenInterceptor(loggedInUser));
                });
            });
        };

        FetchConfig.prototype.tokenInterceptor = function tokenInterceptor(loggedInUser) {
            return {
                request: function request(_request) {
                    if (loggedInUser) {
                        _request.headers.append('Authorization', 'Bearer ' + loggedInUser.access_token);
                    }
                    return _request;
                }
            };
        };

        return FetchConfig;
    }()) || _class);
});
var cov_v6j2v9plq = function () {
  var path = "/opt/atlassian/pipelines/agent/build/Web/src/environment.js",
      hash = "37a4502213f2dfa826682df5a2276cf685baa070",
      global = new Function('return this')(),
      gcv = "__coverage__",
      coverageData = {
    path: "/opt/atlassian/pipelines/agent/build/Web/src/environment.js",
    statementMap: {},
    fnMap: {},
    branchMap: {},
    s: {},
    f: {},
    b: {},
    _coverageSchema: "332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('environment',["exports"], function (exports) {
  "use strict";

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = {
    debug: true,
    testing: true
  };
});
define('configs/login-router-configuration',['exports', 'aurelia-framework', 'aurelia-router'], function (exports, _aureliaFramework, _aureliaRouter) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.default = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var _default = (_dec = (0, _aureliaFramework.inject)(_aureliaRouter.Router), _dec(_class = function () {
        function _default(router) {
            _classCallCheck(this, _default);

            this.router = router;
        }

        _default.prototype.configure = function configure() {
            this.router.configure(function (config) {
                config.title = 'Demeter';

                config.map([{ route: ['', 'sign-in'], name: 'sign-in', moduleId: './views/sign-in/sign-in', nav: true }, { route: 'forgot-password', name: 'forgot-password', moduleId: './views/forgot-password/forgot-password', nav: true }]);

                config.mapUnknownRoutes('./views/sign-in/sign-in');
            });
        };

        return _default;
    }()) || _class);

    exports.default = _default;
});
define('configs/auth-configuration',['exports'], function (exports) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });

    var authConfig = {
        httpInterceptor: true,
        baseUrl: '/',
        loginRoute: '#/login',
        loginUrl: '/api/authorize/token',
        loginRedirect: null,
        logoutRedirect: '#/login',
        profileUrl: '/api/authorize/me',
        tokenRoot: false,
        tokenName: 'token',
        tokenPrefix: 'aurelia',
        responseTokenProp: 'access_token',
        authHeader: 'Authorization',
        authToken: 'Bearer',
        withCredentials: true,
        platform: 'browser',
        storage: 'localStorage',
        providers: {

            identSrv: {
                name: 'identSrv',
                url: 'Token/Exchange',
                authorizationEndpoint: 'http://localhost:5000/connect/authorize',

                redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host,
                scope: ['api1'],

                responseType: 'code',

                scopePrefix: '',
                scopeDelimiter: ' ',
                requiredUrlParams: ['scope', 'nonce'],
                optionalUrlParams: ['display', 'state'],
                state: function state() {
                    var val = ((Date.now() + Math.random()) * Math.random()).toString().replace('.', '');
                    return encodeURIComponent(val);
                },
                display: 'popup',
                type: '2.0',
                clientId: 'cloud-app',

                nonce: function nonce() {
                    var val = ((Date.now() + Math.random()) * Math.random()).toString().replace('.', '');
                    return encodeURIComponent(val);
                },
                popupOptions: { width: 452, height: 633 }
            }
        }
    };

    exports.default = authConfig;
});
define('configs/app-router-configuration',['exports', 'aurelia-framework', 'aurelia-router', 'aurelia-configuration', 'aurelia-open-id-connect'], function (exports, _aureliaFramework, _aureliaRouter, _aureliaConfiguration, _aureliaOpenIdConnect) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.default = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var _default = (_dec = (0, _aureliaFramework.inject)(_aureliaRouter.Router, _aureliaConfiguration.AureliaConfiguration, _aureliaOpenIdConnect.OpenIdConnect), _dec(_class = function () {
        function _default(router, appConfig, openIdConnect) {
            _classCallCheck(this, _default);

            this.router = router;
            this.appConfig = appConfig;
            this.openIdConnect = openIdConnect;
        }

        _default.prototype.configure = function configure() {
            var _this = this;

            var isCloud = this.appConfig.get('Web').IsCloud;
            this.router.configure(function (config) {
                config.options.pushState = true;
                config.title = 'Demeter';

                var dashboardRoutes = ['dashboard'];
                if (!isCloud) {
                    dashboardRoutes.push('');
                }

                var routes = [{
                    route: dashboardRoutes,
                    name: 'dashboard',
                    moduleId: isCloud ? './views/dashboard/cloud-dashboard' : './views/dashboard/dashboard',
                    layoutView: 'layouts/default.html',
                    nav: true,
                    settings: isCloud ? {
                        roles: [_aureliaOpenIdConnect.OpenIdConnectRoles.Authenticated]
                    } : null
                }, {
                    route: 'filetransfer',
                    name: 'filetransfer',
                    moduleId: './views/filetransfer/filetransfer',
                    layoutView: 'layouts/default.html',
                    nav: true,
                    settings: isCloud ? {
                        roles: [_aureliaOpenIdConnect.OpenIdConnectRoles.Authenticated]
                    } : null
                }, {
                    route: 'logs',
                    name: 'logs',
                    moduleId: './views/logs/logs',
                    layoutView: 'layouts/default.html',
                    nav: true,
                    settings: isCloud ? {
                        roles: [_aureliaOpenIdConnect.OpenIdConnectRoles.Authenticated]
                    } : null
                }, {
                    route: 'updates',
                    name: 'updates',
                    moduleId: './views/updates/system-updates',
                    layoutView: 'layouts/default.html',
                    nav: true,
                    settings: isCloud ? {
                        roles: [_aureliaOpenIdConnect.OpenIdConnectRoles.Authenticated]
                    } : null
                }, {
                    route: 'settings',
                    name: 'settings',
                    moduleId: './views/settings/settings',
                    layoutView: 'layouts/default.html'
                }, {
                    route: 'vcm-setup',
                    name: 'vcm-setup',
                    moduleId: './views/settings/initial-setup/vcm-setup',
                    layoutView: 'layouts/default.html'
                }, {
                    route: 'pid-control-tuning',
                    name: 'pid-control-tuning',
                    moduleId: './views/pid-control-tuning/pid-control-tuning',
                    layoutView: 'layouts/default.html'
                }, {
                    route: 'debug',
                    name: 'debug',
                    moduleId: './views/debug/debug',
                    layoutView: 'layouts/default.html',
                    nav: true,
                    settings: isCloud ? {
                        roles: [_aureliaOpenIdConnect.OpenIdConnectRoles.Authenticated]
                    } : null
                }];

                if (isCloud) {
                    routes.push({
                        route: ['', 'home'],
                        name: 'home',
                        moduleId: './home',
                        layoutView: 'layouts/default.html',
                        nav: false
                    });
                }

                config.map(routes);

                config.mapUnknownRoutes({
                    moduleId: './views/error/error-404',
                    layoutView: 'layouts/basic.html'
                });

                _this.openIdConnect.configure(config);
            });
        };

        return _default;
    }()) || _class);

    exports.default = _default;
});
var cov_2c0mk89s02 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/updates/update-package.js',
        hash = 'e30e4e47c80022b7fe603aaa0f04964aaa420641',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/updates/update-package.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/updates/update-package',['exports', 'aurelia-framework', '../../services/updates-service'], function (exports, _aureliaFramework, _updatesService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.UpdatePackage = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3;

    var UpdatePackage = exports.UpdatePackage = (_dec = (0, _aureliaFramework.inject)(_updatesService.UpdatesService), _dec(_class = (_class2 = function () {
        function UpdatePackage(updatesService) {
            _classCallCheck(this, UpdatePackage);

            _initDefineProp(this, 'updatePackage', _descriptor, this);

            _initDefineProp(this, 'currentVersion', _descriptor2, this);

            _initDefineProp(this, 'newestVersion', _descriptor3, this);

            this.updatesService = updatesService;
            var installSeconds = 30;
            this.installLength = 10 * installSeconds;
        }

        UpdatePackage.prototype.attached = function attached() {
            var _this = this;

            if (this.isCurrent || this.isNewest) {
                this.panelOpen = true;
            }
            this.updatesService.connect(this.processDownloadProgress.bind(this));
            this.updatesService.checkIfDownloaded(this.updatePackage.version).then(function (downloaded) {
                _this.downloadComplete = downloaded;
                if (!downloaded) {
                    _this.getDownloadSize(_this.updatePackage.version);
                }
            });
        };

        UpdatePackage.prototype.togglePanel = function togglePanel() {
            this.panelOpen = !this.panelOpen;
        };

        UpdatePackage.prototype.getDownloadSize = function getDownloadSize() {
            var _this2 = this;

            this.updatesService.getDownloadSize(this.updatePackage.version).then(function (size) {
                _this2.downloadSize = size;
            });
        };

        UpdatePackage.prototype.downloadUpdate = function downloadUpdate() {
            this.downloading = true;
            this.updatesService.downloadUpdate(this.updatePackage.version);
        };

        UpdatePackage.prototype.processDownloadProgress = function processDownloadProgress(version, bytes) {
            if (version === this.updatePackage.version) {
                this.bytesTransferred = bytes;
                this.downloading = true;
            }
        };

        UpdatePackage.prototype.installUpdate = function installUpdate() {
            this.installing = true;
            this.updatesService.installUpdate(this.updatePackage.version, this.currentVersion);
            this.installProgress = 0;
            this.downloadSize = 0;
            this.downloading = false;
            this.installProgressTimer = setInterval(this.updateInstallProgress.bind(this), 100);
        };

        UpdatePackage.prototype.updateInstallProgress = function updateInstallProgress() {
            this.installProgress += 1;
            if (this.installProgress === this.installLength) {
                clearInterval(this.installProgressTimer);
            }
        };

        UpdatePackage.prototype.downloadProgressPercent = function downloadProgressPercent() {
            var percent = this.downloadSize > 0 ? Math.round(100 * this.bytesTransferred / this.downloadSize) : 0;
            this.downloadComplete = this.bytesTransferred === this.downloadSize;
            this.downloading = !this.downloadComplete;
            return percent;
        };

        UpdatePackage.prototype.installProgressPercent = function installProgressPercent() {
            var percent = 100 * this.installProgress / this.installLength;
            this.installComplete = this.installProgress === this.installLength;
            if (this.installComplete) {
                location.reload();
            }

            return percent;
        };

        _createClass(UpdatePackage, [{
            key: 'downloadProgressStyle',
            get: function get() {
                return {
                    width: this.downloadProgressPercent() + '%'
                };
            }
        }, {
            key: 'installProgressStyle',
            get: function get() {
                return {
                    width: this.installProgressPercent() + '%'
                };
            }
        }, {
            key: 'isCurrent',
            get: function get() {
                return this.currentVersion === this.updatePackage.version;
            }
        }, {
            key: 'isNew',
            get: function get() {
                return this.currentVersion < this.updatePackage.version;
            }
        }, {
            key: 'isNewest',
            get: function get() {
                return this.updatePackage.version === this.newestVersion;
            }
        }]);

        return UpdatePackage;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'updatePackage', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'currentVersion', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'newestVersion', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class2)) || _class);
});
define('text!components/updates/update-package.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/bytesToKilobytes\"></require>\n    <require from=\"resources/value-converters/datetime-format\"></require>\n    <div class=\"panel ${isCurrent ? 'panel-success' : isNew ? 'panel-primary' : 'panel-default'}\">\n        <a click.delegate=\"togglePanel()\">\n            <div if.bind=\"!updatePackage.fromFileSystem\" class=\"panel-heading\" style=\"cursor: pointer\">\n                ${updatePackage.version} - ${updatePackage.date | dateTimeFormat:'MMMM Do YYYY'}\n            </div>\n            <div if.bind=\"updatePackage.fromFileSystem\" class=\"panel-heading\" style=\"cursor: pointer\">\n                ${updatePackage.version}\n            </div>\n        </a>\n        <div if.bind=\"panelOpen\">\n            <div if.bind=\"isCurrent || !updatePackage.fromFileSystem\" class=\"panel-body\">\n                <div if.bind=\"isCurrent\">\n                    <p class=\"text-success\">This is your current version</p>\n                </div>\n                <div if.bind=\"!isCurrent\">\n                    <h4>${updatePackage.title}</h4>\n                    <p>${updatePackage.details}</p>\n                </div>\n            </div>\n            <div class=\"panel-footer\" if.bind=\"!isCurrent\">\n                <div if.bind=\"!installing && !downloading && !downloadComplete\">\n                    <button click.delegate=\"downloadUpdate()\" class=\"btn ${isNew ? 'btn-primary' : 'btn-default'}\">${\"Download\" | t} ${downloadSize | bytesToKilobytes} KB</button>\n                </div>\n                <div if.bind=\"downloading\">\n                    <b><p class=\"${isNew ? 'text-primary' : 'text-default'}\">${\"Progress\" |t}: ${bytesTransferred | bytesToKilobytes} KB / ${downloadSize | bytesToKilobytes} KB</p></b>\n                    <div class=\"progress\">\n                        <div style.bind=\"downloadProgressStyle\" class=\"progress-bar ${isNew ? 'progress-bar-primary' : ''} progress-bar-striped\" role=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\"></div>\n                    </div>\n                </div>\n                <div if.bind=\"downloadComplete && !installing\">\n                    <p class=\"text-warning\">This version is ready to install.</p>\n                    <button click.delegate=\"installUpdate()\" class=\"btn btn-warning\">Install</button>\n                </div>\n                <div if.bind=\"installing\">\n                    <b><p class=\"text-warning\">Installing...</p></b>\n                    <div class=\"progress\">\n                        <div style.bind=\"installProgressStyle\" class=\"progress-bar progress-bar-warning progress-bar-striped\" role=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\"></div>\n                    </div>\n                </div>\n                <div if.bind=\"installComplete\">\n                    <p class=\"text-warning\">Installation is complete.  The update will take effect the next time you restart.</p>\n                </div>\n            </div>\n        </div>\n    </div>\n</template>\n"; });
var cov_1ga6lcqldn = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/toolbar.js',
        hash = '2a868a5ec5c7048183480476ff7c217deaf75ffa',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/toolbar.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/toolbar',['exports', 'aurelia-framework', '../../services/file-service', '../../services/spray-session-service', '../../services/mapping-service', '../../services/boundary-map-service', './edit-boundary', 'aurelia-dialog', '../../views/map/map-view-state'], function (exports, _aureliaFramework, _fileService, _spraySessionService, _mappingService, _boundaryMapService, _editBoundary, _aureliaDialog, _mapViewState) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Toolbar = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _class, _desc, _value, _class2, _descriptor;

    var Toolbar = exports.Toolbar = (_dec = (0, _aureliaFramework.inject)(_fileService.FileService, _spraySessionService.SpraySessionService, _mappingService.MappingService, _boundaryMapService.BoundaryMapService, _aureliaDialog.DialogService, _mapViewState.MapViewState), _dec2 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec(_class = (_class2 = function () {
        function Toolbar(fileService, spraySessionService, mappingService, boundaryMapService, dialogService, mapViewState) {
            var _this = this;

            _classCallCheck(this, Toolbar);

            _initDefineProp(this, 'selectedBoundaryMaps', _descriptor, this);

            this.selectOptions = [];
            this.selectedPrescriptionUnit = 'Pounds/Acre';
            this.selectedSpraySession = 'Create New...';
            this.selectedBoundaryGroup = 'Create New...';
            this.boundaryGroups = [];
            this.groupIndex = 0;
            this.newBoundarySelection = 'test';
            this.typeMap = [];
            this.boundaryToEdit = '';
            this.ignoreBoundary = 0;
            this.showPreview = false;
            this.lastUpdate = Date.now();
            this.previewText = "";
            this.prescriptionUnits = ['Gallons/Acre', 'Pounds/Acre'];

            this.fileService = fileService;
            this.spraySessionService = spraySessionService;
            this.mappingService = mappingService;
            this.boundaryMapService = boundaryMapService;
            this.dialogService = dialogService;
            this.mapViewState = mapViewState;
            this.getBoundaryMaps();
            this.getSpraySessions();
            this.getBoundaryGroups();
            this.getPrescriptionMaps();

            this.showPreview = this.mapViewState.showPreview;
            this.setPreviewText();

            this.boundaryMapService.registerBoundaryMapCreatedCallback(function (map) {
                _this.setup();
            });

            this.setup();
            this.boundaryMapService.activeBoundary = this.boundaryToEdit;
        }

        Toolbar.prototype.setup = function setup() {
            var _this2 = this;

            this.selectOptions = [];

            this.fileService.getBoundaryMaps().then(function (response) {
                response.forEach(function (map) {
                    _this2.selectOptions.push({
                        label: map,
                        value: map
                    });
                });
            }, this.boundaryMapService.getBoundaryMap().then(function (aMap) {
                _this2.typeMap = [];
                _this2.currentMap = aMap;
                _this2.groupName = _this2.currentMap.boundaryGroup;
                _this2.selectedBoundaryMaps = _this2.currentMap.paths;
                _this2.regions = _this2.currentMap.regions;
                _this2.regions.forEach(function (sprayType, index) {
                    _this2.typeMap.push({
                        path: _this2.selectedBoundaryMaps[index],
                        type: sprayType.sprayType
                    });
                });
                _this2.changeCallback();
            }));
        };

        Toolbar.prototype.editBoundary = function editBoundary(aBoundary) {
            var _this3 = this;

            if (this.boundaryToEdit === aBoundary.path) {
                this.dialogService.open({ viewModel: _editBoundary.EditBoundary, model: { group: this.groupName, mapName: aBoundary.path, type: aBoundary.type }, lock: false }).whenClosed(function (response) {
                    if (!response.wasCancelled) {
                        _this3.boundaryMapService.updateBoundary(response.output.bName, response.output.type, response.output.del, response.output.aGroup);
                    }
                    _this3.boundaryToEdit = '';
                    _this3.boundaryMapService.activeBoundary = _this3.boundaryToEdit;
                    _this3.boundaryMapService.activeBoundaryChanged = true;
                });
            } else {
                this.boundaryToEdit = aBoundary.path;
                this.boundaryMapService.activeBoundary = this.boundaryToEdit;
                this.boundaryMapService.activeBoundaryChanged = true;
            }
        };

        Toolbar.prototype.boundarySelected = function boundarySelected() {
            var list = document.getElementById("boundary_maps");
            var opt = list.options[list.selectedIndex].text;
            this.selectedBoundaryMaps.push(opt);
            list.selectedIndex = null;
            this.changeCallback();
        };

        Toolbar.prototype.changeCallback = function changeCallback(evt) {
            var _this4 = this;

            this.spraySessionService.getCurrentSpraySession().then(function (response) {
                _this4.selectedBoundaryGroup = response.boundaryGroup.name;
                _this4.spraySessionService.sendBoundaryMaps(_this4.selectedBoundaryMaps, _this4.selectedBoundaryGroup);
            });
        };

        Toolbar.prototype.getBoundaryMaps = function getBoundaryMaps() {
            var _this5 = this;

            this.fileService.getBoundaryMaps().then(function (response) {
                return _this5.boundaryMaps = response;
            });
        };

        Toolbar.prototype.getSpraySessions = function getSpraySessions() {
            var _this6 = this;

            return this.spraySessionService.getSpraySessions().then(function (sessions) {
                _this6.spraySessions = sessions;

                _this6.spraySessionService.getCurrentSpraySession().then(function (current) {
                    _this6.selectedPrescriptionMap = current.prescriptionMapPath;
                    _this6.selectedPrescriptionUnit = current.prescriptionMapUnits;
                    _this6.spraySessions.forEach(function (s) {
                        if (s.spraySessionId === current.spraySessionId) {
                            _this6.selectedBoundaryMaps = s.boundaryMapPaths;
                            _this6.selectedBoundaryGroup = s.boundaryGroup;
                            _this6.selectedSpraySession = s;
                            _this6.boundaryGroups.forEach(function (g, index) {
                                if (g.id === _this6.selectedBoundaryGroup.id) {
                                    _this6.groupIndex = index;
                                }
                            });
                        }
                    });
                });
            });
        };

        Toolbar.prototype.getBoundaryGroups = function getBoundaryGroups() {
            var _this7 = this;

            return this.spraySessionService.getBoundaryGroups().then(function (groups) {
                _this7.boundaryGroups = groups;
            });
        };

        Toolbar.prototype.getPrescriptionMaps = function getPrescriptionMaps() {
            var _this8 = this;

            this.fileService.getPrescriptionMaps().then(function (response) {
                return _this8.prescriptionMaps = response;
            });
        };

        Toolbar.prototype.spraySessionChanged = function spraySessionChanged(spraySession) {
            this.selectedSpraySession = spraySession;
            this.spraySessionService.sendSpraySession(spraySession ? spraySession.spraySessionId : null);
        };

        Toolbar.prototype.boundaryGroupChanged = function boundaryGroupChanged() {
            var _this9 = this;

            this.spraySessionService.getBoundaryGroups().then(function (groups) {
                var list = document.getElementById("boundary_group");
                var opt = list.options[list.selectedIndex].model;

                groups.forEach(function (group) {
                    if (group.name === opt.name) {
                        _this9.spraySessionService.sendBoundaryMaps(group.paths, opt.name);
                    }
                });
            });
        };

        Toolbar.prototype.prescriptionMapChanged = function prescriptionMapChanged(changedValue) {
            this.spraySessionService.setPrescriptionMap(changedValue);
        };

        Toolbar.prototype.prescriptionUnitChanged = function prescriptionUnitChanged(changedValue) {
            this.mappingService.setPrescriptionUnits(changedValue);
        };

        Toolbar.prototype.toggleBoundary = function toggleBoundary(value) {
            this.ignoreBoundary = value;
            if (this.ignoreBoundary === 'True') {
                this.mappingService.ignoreBoundary(true);
            } else {
                this.mappingService.ignoreBoundary(false);
            }
        };

        Toolbar.prototype.togglePreview = function togglePreview() {
            var _this10 = this;

            this.showPreview = !this.showPreview;
            this.mapViewState.showPreview = this.showPreview;
            this.setPreviewText();
            if (this.showPreview) {
                this.lastUpdate = Date.now();
                setTimeout(function () {
                    var newTime = Date.now();
                    var dif = newTime - _this10.lastUpdate;
                    if (dif > 4000) {
                        _this10.showPreview = false;
                        _this10.mapViewState.showPreview = _this10.showPreview;
                    }
                    _this10.setPreviewText();
                }, 5000);
            }
        };

        Toolbar.prototype.setPreviewText = function setPreviewText() {
            if (this.showPreview) {
                this.previewText = "Hide Preview";
            } else {
                this.previewText = "Show Preview";
            }
            var btn = document.getElementById("preview_button");
            if (btn) {
                btn.textContent = this.previewText;
            }
        };

        return Toolbar;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'selectedBoundaryMaps', [_dec2], {
        enumerable: true,
        initializer: function initializer() {
            return [];
        }
    })), _class2)) || _class);
});
define('text!components/shared/toolbar.html', ['module'], function(module) { module.exports = "<template>\n    <!--<require from=\"components/shared/boundary-map-select2\"></require>-->\n    <div class=\"row\" style=\"margin-bottom: 20px\">\n        <div class=\"col-sm-12\">\n            <div class=\"\" style=\"padding-top: 10px; display: flex\">\n                <label for=\"bmaps\" class=\"pull-left\" style=\"margin-right: 10px; margin-top: 5px\">Boundaries</label>\n                <select class=\"form-control\" value.bind=\"newBoundarySelection\" change.delegate=\"boundarySelected()\" id=\"boundary_maps\" style=\"width: 200px\">\n                    <option value=\"\">${\"Select Boundary\" | t}</option>\n                    <option repeat.for=\"map of selectOptions\" value.bind=\"map\">\n                        ${map.label}\n                    </option>\n                </select>\n                <button class=\"pull-left\" value.bind=\"previewText\" click.delegate=\"togglePreview()\" id=\"preview_button\" style=\"margin-left: 10px;\">Show Preview</button>\n            </div>\n            <div class=\"card card-body\" style=\"margin-top: 10px; margin-bottom:10px; display: flex; background-color:white; border-color:lightgray; border:solid; border-width: 1px; flex-wrap: wrap;\">\n                <div repeat.for=\"boundary of typeMap\">\n                    <div>\n                        <button class=\"${boundary.path == boundaryToEdit? 'boundary-selected':''} ${boundary.type == 0? 'boundary-box-spray':''} ${boundary.type == 1? 'boundary-box-no-spray':''} \n                                ${boundary.type == 2? 'boundary-box-island':''}\" \n                                style=\"margin:5px; \" click.delegate=\"editBoundary(boundary)\">\n                            ${boundary.path}\n                        </button>\n                    </div>                    \n                </div>\n            </div>\n            <div class=\"pull-left dashboard-dropdown\">\n                <label for=\"prescription_map\">${\"Prescription Map\" | t}</label>\n                <select value.bind=\"selectedPrescriptionMap\" change.delegate=\"prescriptionMapChanged(selectedPrescriptionMap)\" class=\"form-control\" id=\"prescription_map\">\n                    <option value=\"\">${\"None\" | t}</option>\n                    <option repeat.for=\"map of prescriptionMaps\" model.bind=\"map\">\n                        ${map}\n                    </option>\n                </select>\n            </div>\n            <div class=\"pull-left dashboard-dropdown\">\n                <label for=\"prescription_map\">${\"Units\" | t}</label>\n                <select value.bind=\"selectedPrescriptionUnit\" change.delegate=\"prescriptionUnitChanged(selectedPrescriptionUnit)\" class=\"form-control\" id=\"prescription_unit\">\n                    <option repeat.for=\"unit of prescriptionUnits\" model.bind=\"unit\">\n                        ${unit}\n                    </option>\n                </select>\n            </div>\n            <div class=\"pull-left dashboard-dropdown\">\n                <label for=\"spray_session\">${\"Spray Session\" | t}</label>\n                <select value.bind=\"selectedSpraySession\" change.delegate=\"spraySessionChanged(selectedSpraySession)\" class=\"form-control\" id=\"spray_session\">\n                    <option model.bind=\"null\">${\"Create New\" | t}</option>\n                    <option repeat.for=\"spraySession of spraySessions\" model.bind=\"spraySession\">\n                        ${spraySession.title}\n                    </option>\n                </select>\n            </div>\n            <div class=\"pull-left dashboard-dropdown\">\n                <label for=\"boundary_group\">${\"Boundary Map\" | t}</label>\n                <select change.delegate=\"boundaryGroupChanged()\" class=\"form-control\" id=\"boundary_group\" value.bind=\"boundaryGroups[groupIndex]\">\n                    <!--<option model.bind=\"null\">${\"Create New\" | t}</option>-->\n                    <option repeat.for=\"boundaryGroup of boundaryGroups\" model.bind=\"boundaryGroup\">\n                        ${boundaryGroup.name}\n                    </option>\n                </select>\n            </div>\n            <div class=\"pull-left dashboard-dropdown\">\n                <label for=\"ignore-boundary\">${\"Ignore Boundary\" | t}</label><br />\n                <select value.bind=\"selectedValue\" change.delegate=\"toggleBoundary(selectedValue)\" class=\"form-control\" id=\"boundaryIgnoreOptions\">\n                    <option v-bind:value=\"0\">False</option>\n                    <option v-bind:value=\"1\">True</option>\n                </select>\n            </div>\n        </div>\n\n</template>\n"; });
var cov_cfl6nnzzq = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/select2.js',
        hash = 'e6d6c616ae137b208f4b94ab6ee94ebe361679cf',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/select2.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/select2',['exports', 'aurelia-framework', 'px-select2'], function (exports, _aureliaFramework) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.Select2 = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _dec3, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;

    var Select2 = exports.Select2 = (_dec = (0, _aureliaFramework.customElement)('select2'), _dec2 = (0, _aureliaFramework.inject)(Element), _dec3 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec(_class = _dec2(_class = (_class2 = function () {
        function Select2(element) {
            _classCallCheck(this, Select2);

            _initDefineProp(this, 'name', _descriptor, this);

            _initDefineProp(this, 'selected', _descriptor2, this);

            _initDefineProp(this, 'options', _descriptor3, this);

            _initDefineProp(this, 'placeholder', _descriptor4, this);

            _initDefineProp(this, 'allowClear', _descriptor5, this);

            this.element = element;
        }

        Select2.prototype.attached = function attached() {
            var el = $(this.element).find('select');
            var sel = el.select2({ width: 'resolve' });

            sel.val(this.selected).trigger('change');

            sel.on('change', function (event) {
                if (event.originalEvent) {
                    return;
                }

                var notice = new Event('change', { bubbles: true });
                $(el)[0].dispatchEvent(notice);
            });
        };

        Select2.prototype.detached = function detached() {
            $(this.element).find('select').select2('destroy');
        };

        return Select2;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'name', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return null;
        }
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'selected', [_dec3], {
        enumerable: true,
        initializer: function initializer() {
            return [];
        }
    }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'options', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return {};
        }
    }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'placeholder', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return 'Select Your Boundary Map(s)';
        }
    }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, 'allowClear', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return false;
        }
    })), _class2)) || _class) || _class);
});
define('text!components/shared/select2.html', ['module'], function(module) { module.exports = "<template>\n    <select value.two-way=\"selected\" name.one-way=\"name\" id.one-way=\"name\" \n            class=\"form-control\" multiple data-placeholder.one-way=\"placeholder\" data-allow-clear.one-way=\"allow_clear\" size=\"1\">\n        <option repeat.for=\"option of options\" value.bind=\"option.value\">${option.label}</option>\n    </select>\n</template>\n"; });
var cov_69ed20h13 = function () {
  var path = "/opt/atlassian/pipelines/agent/build/Web/src/components/shared/login-header.js",
      hash = "d7d2adfd80d71081c2f2ad1152c67127f07ef1cd",
      global = new Function('return this')(),
      gcv = "__coverage__",
      coverageData = {
    path: "/opt/atlassian/pipelines/agent/build/Web/src/components/shared/login-header.js",
    statementMap: {},
    fnMap: {},
    branchMap: {},
    s: {},
    f: {},
    b: {},
    _coverageSchema: "332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('components/shared/login-header',["exports"], function (exports) {
  "use strict";

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  var LoginHeader = exports.LoginHeader = function LoginHeader() {
    _classCallCheck(this, LoginHeader);
  };
});
define('text!components/shared/login-header.html', ['module'], function(module) { module.exports = "<template>\n    \n</template>\n"; });
var cov_1owrna1rn5 = function () {
  var path = "/opt/atlassian/pipelines/agent/build/Web/src/components/shared/login-footer.js",
      hash = "493a918dc81d50b004566872ad7b413f4ea97506",
      global = new Function('return this')(),
      gcv = "__coverage__",
      coverageData = {
    path: "/opt/atlassian/pipelines/agent/build/Web/src/components/shared/login-footer.js",
    statementMap: {},
    fnMap: {},
    branchMap: {},
    s: {},
    f: {},
    b: {},
    _coverageSchema: "332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('components/shared/login-footer',["exports"], function (exports) {
  "use strict";

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  var LoginFooter = exports.LoginFooter = function LoginFooter() {
    _classCallCheck(this, LoginFooter);
  };
});
define('text!components/shared/login-footer.html', ['module'], function(module) { module.exports = "<template>\n    \n</template>\n"; });
var cov_2llog5t1wj = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/edit-boundary.js',
        hash = '85a08dd77ccb075039f852c0e2596ae7de0fa98d',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/edit-boundary.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/edit-boundary',['exports', 'aurelia-framework', 'moment', 'aurelia-dialog'], function (exports, _aureliaFramework, _moment, _aureliaDialog) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.EditBoundary = undefined;

    var _moment2 = _interopRequireDefault(_moment);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var EditBoundary = exports.EditBoundary = (_dec = (0, _aureliaFramework.inject)(_aureliaDialog.DialogController), _dec(_class = function () {
        function EditBoundary(dialogController) {
            _classCallCheck(this, EditBoundary);

            this.boundaryType = 'Spray';
            this.types = ['Spray', 'No Spray', 'Spray Island'];
            this.selectedIndex = 0;

            this.controller = dialogController;
        }

        EditBoundary.prototype.activate = function activate(model) {
            this.group = model.group;
            if (this.group.name === 'Create New') {
                this.isNew = true;
                this.group.name = (0, _moment2.default)().format('MMMM Do YYYY, h:mm:ss a');
            } else {
                this.isNew = false;
            }
            this.mapName = model.mapName;
            this.boundaryType = this.types[model.type];
            this.selectedIndex = model.type;

            var list = document.getElementById("editBoundaryOptions");
        };

        EditBoundary.prototype.setType = function setType() {
            this.selectedIndex = document.getElementById("editBoundaryOptions").selectedIndex;
            var n = 1;
        };

        EditBoundary.prototype.unbind = function unbind() {};

        EditBoundary.prototype.save = function save() {
            this.save = true;
        };

        return EditBoundary;
    }()) || _class);
});
define('text!components/shared/edit-boundary.html', ['module'], function(module) { module.exports = "<template>\n    <div style=\"width: 50rem;\" class=\"operation-popover\">\n        <div class=\"container-fluid\" style=\"padding-bottom: 11px\">\n            <div if.bind=\"isNew\">\n                <div>\n                    <div class=\"text-center\" style=\"font-size: 2rem; padding-top: 16px\">Create New Boundary Map</div>\n                </div>\n                <br />\n                <div class=\"row form-group\">\n                    <div class=\"col-xs-12\">\n                        <input id=\"left-input\" step=\"1\" value.bind=\"group.name\"\n                               class=\"operations-dark form-control form-control-lg input-lg\" type=\"text\">\n                    </div>\n                </div>\n            </div>\n\n            <div>\n                <div class=\"text-center\" style=\"font-size: 2rem; padding-top: 16px\">Boundary Name</div>\n            </div>\n            <br />\n            <div class=\"row form-group\">\n                <div class=\"col-xs-12\">\n                    <input id=\"left-input\" step=\"1\" value.bind=\"mapName\"\n                           class=\"operations-dark form-control form-control-lg input-lg\" type=\"text\">\n                </div>\n            </div>\n            <div class=\"row form-group dashboard-dropdown\" style=\"width:200px; margin: 0 auto;\">\n                <label>${\"Boundary Type\" | t}</label><br />\n                <select value.bind=\"boundaryType\" change.delegate=\"setType()\" class=\"form-control\" id=\"editBoundaryOptions\" style=\"margin-bottom:15px\">\n                    <option repeat.for=\"anOption of types\" model.bind=\"anOption\">${anOption}</option>\n                </select>\n            </div>\n            <ux-dialog-footer>\n                <button click.trigger=\"controller.ok({del: false, aGroup: group, bName: mapName, type: selectedIndex}) \" class=\"btn btn-primary btn-lg\" style=\"padding-left:30px; padding-right:30px\">Save</button>\n                <button click.trigger=\"controller.ok({del: true, aGroup: group, bName: mapName, type: selectedIndex}) \" class=\"btn btn-red btn-lg\">Remove</button>\n                <button click.trigger=\"controller.cancel()\" class=\"btn btn-default btn-lg\">Cancel</button>\n            </ux-dialog-footer>\n        </div>\n    </div>\n</template>\n"; });
var cov_yqe5wcpwi = function () {
  var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/dialogs/save-dialog.js',
      hash = '412d19a5d7d38ad37a443078881bedd6f8764b67',
      global = new Function('return this')(),
      gcv = '__coverage__',
      coverageData = {
    path: '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/dialogs/save-dialog.js',
    statementMap: {},
    fnMap: {},
    branchMap: {},
    s: {},
    f: {},
    b: {},
    _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('components/shared/dialogs/save-dialog',['exports', 'aurelia-framework', 'aurelia-dialog'], function (exports, _aureliaFramework, _aureliaDialog) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.SaveDialog = undefined;

  function _initDefineProp(target, property, descriptor, context) {
    if (!descriptor) return;
    Object.defineProperty(target, property, {
      enumerable: descriptor.enumerable,
      configurable: descriptor.configurable,
      writable: descriptor.writable,
      value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
    });
  }

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
    var desc = {};
    Object['ke' + 'ys'](descriptor).forEach(function (key) {
      desc[key] = descriptor[key];
    });
    desc.enumerable = !!desc.enumerable;
    desc.configurable = !!desc.configurable;

    if ('value' in desc || desc.initializer) {
      desc.writable = true;
    }

    desc = decorators.slice().reverse().reduce(function (desc, decorator) {
      return decorator(target, property, desc) || desc;
    }, desc);

    if (context && desc.initializer !== void 0) {
      desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
      desc.initializer = undefined;
    }

    if (desc.initializer === void 0) {
      Object['define' + 'Property'](target, property, desc);
      desc = null;
    }

    return desc;
  }

  function _initializerWarningHelper(descriptor, context) {
    throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
  }

  var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2;

  var SaveDialog = exports.SaveDialog = (_dec = (0, _aureliaFramework.inject)(_aureliaDialog.DialogController), _dec(_class = (_class2 = function () {
    function SaveDialog(dialogController) {
      _classCallCheck(this, SaveDialog);

      _initDefineProp(this, 'val', _descriptor, this);

      _initDefineProp(this, 'fileName', _descriptor2, this);

      this.dialogController = dialogController;
    }

    SaveDialog.prototype.activate = function activate(model) {
      this.info = model;
      this.val = model.val;
      this.displayName = model.displayName;
    };

    SaveDialog.prototype.ok = function ok() {
      this.dialogController.ok({ name: this.fileName });
    };

    SaveDialog.prototype.cancel = function cancel() {
      this.dialogController.close();
    };

    return SaveDialog;
  }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'val', [_aureliaFramework.bindable], {
    enumerable: true,
    initializer: null
  }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'fileName', [_aureliaFramework.bindable], {
    enumerable: true,
    initializer: function initializer() {
      return '';
    }
  })), _class2)) || _class);
});
define('text!components/shared/dialogs/save-dialog.html', ['module'], function(module) { module.exports = "<template>\n    <ux-dialog class=\"file-dialog\">\n        <ux-dialog-body>\n            <div class=\"form-group label-top\">\n                <label style=\"display: block\">${displayName}</label>\n            </div>\n        </ux-dialog-body>\n        <div>\n            <input type=\"text\" id=\"name\" class=\"form-control\" value.bind=\"fileName\"/>\n        </div>\n        <ux-dialog-footer style=\"text-align: center\">\n            <button class=\"btn btn-lg btn-danger dialog-btn\" click.trigger=\"cancel()\">Cancel</button>\n            <button class=\"btn btn-lg btn-primary dialog-btn\" click.trigger=\"ok(person)\">Ok</button>\n        </ux-dialog-footer>\n    </ux-dialog>\n</template>\n"; });
var cov_xd6vq43mb = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/dialogs/rate-input-dialog.js',
        hash = '0e08c68fff6b50e0d214defc020fdde633c28b78',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/dialogs/rate-input-dialog.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/dialogs/rate-input-dialog',['exports', 'aurelia-framework', 'aurelia-dialog', 'numeral', 'aurelia-validation', '../dialog-bootstrap-renderer', '../../../services/gateway-service'], function (exports, _aureliaFramework, _aureliaDialog, _numeral, _aureliaValidation, _dialogBootstrapRenderer, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.RateInputDialog = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3;

    var RateInputDialog = exports.RateInputDialog = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.NewInstance.of(_aureliaValidation.ValidationController), _gatewayService.GatewayService, _aureliaDialog.DialogController), _dec(_class = (_class2 = function () {
        function RateInputDialog(validationController, gatewayService, dialogController) {
            _classCallCheck(this, RateInputDialog);

            this.editDelta = {};

            _initDefineProp(this, 'val', _descriptor, this);

            _initDefineProp(this, 'property', _descriptor2, this);

            _initDefineProp(this, 'converter', _descriptor3, this);

            this.dialogController = dialogController;
            this.gatewayService = gatewayService;
            this.validationController = validationController;
            this.validationController.addRenderer(new _dialogBootstrapRenderer.BootstrapFormRenderer());
            this.customRulesInit();
        }

        RateInputDialog.prototype.activate = function activate(model) {
            this.val = model.val;
            this.converter = model.converter;
            this.property = model.property;
            this.converter = model.converter;
            this.format = model.format;
            this.displayName = model.displayName;
            if (model.max) {
                _aureliaValidation.ValidationRules.ensure('val').satisfiesRule('numberRange', model.min, model.max, this.converter, '0.0').on(this);
            }
        };

        RateInputDialog.prototype.valChanged = function valChanged() {
            this.validationController.validate();
        };

        RateInputDialog.prototype.ok = function ok() {
            var _this = this;

            this.editDelta[this.property] = this.val;
            this.validationController.validate().then(function (result) {
                if (result.valid) {
                    _this.gatewayService.send(_this.editDelta);

                    _this.editDelta = {};
                    _this.dialogController.close();
                }
            });
        };

        RateInputDialog.prototype.cancel = function cancel() {
            this.dialogController.close();
        };

        RateInputDialog.prototype.customRulesInit = function customRulesInit() {
            _aureliaValidation.ValidationRules.customRule('numberRange', function (value, obj, min, max, displayMin, displayMax) {
                return value === null || value === undefined || value >= min && value <= max;
            }, '${$this.property} must be a number between ${$config.displayMin} and ${$config.displayMax}.', function (min, max, converter, format) {
                if (converter) {
                    min = converter(min);
                    max = converter(max);
                }
                if (!format) {
                    format = '0';
                }
                var displayMin = (0, _numeral2.default)(min).format(format);
                var displayMax = (0, _numeral2.default)(max).format(format);

                return { min: min, max: max, displayMin: displayMin, displayMax: displayMax };
            });
        };

        return RateInputDialog;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'val', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'property', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'converter', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class2)) || _class);
});
define('text!components/shared/dialogs/rate-input-dialog.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/mlPerHectareToGpa\"></require>\n    <ux-dialog>\n        <ux-dialog-body>\n            <div class=\"form-group\">\n                <label style=\"display: block\">${displayName}</label>\n                <input attach-focus=\"true\" value.bind=\"val | mlPerHectareToGpa:format & updateTrigger:'blur' & validateManually\">\n\n            </div>\n        </ux-dialog-body>\n        <ux-dialog-footer>\n            <button class=\"btn btn-lg btn-danger dialog-btn\"click.trigger=\"cancel()\">Cancel</button>\n            <button class=\"btn btn-lg btn-primary dialog-btn\"click.trigger=\"ok(person)\">Ok</button>\n        </ux-dialog-footer>\n    </ux-dialog>\n</template>\n"; });
var cov_wix4pck4a = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/dialogs/psi-input-dialog.js',
        hash = '1743a9a960c8f6e93024c611efeadb114de2c7ff',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/dialogs/psi-input-dialog.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/dialogs/psi-input-dialog',['exports', 'aurelia-framework', '../../../resources/value-converters/kpaToPsi', 'aurelia-dialog', 'numeral', 'aurelia-validation', '../dialog-bootstrap-renderer', '../../../services/gateway-service'], function (exports, _aureliaFramework, _kpaToPsi, _aureliaDialog, _numeral, _aureliaValidation, _dialogBootstrapRenderer, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PsiInputDialog = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;

    var PsiInputDialog = exports.PsiInputDialog = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.NewInstance.of(_aureliaValidation.ValidationController), _kpaToPsi.KpaToPsiValueConverter, _gatewayService.GatewayService, _aureliaDialog.DialogController), _dec(_class = (_class2 = function () {
        function PsiInputDialog(validationController, kpaToPsiValueConverter, gatewayService, dialogController) {
            _classCallCheck(this, PsiInputDialog);

            this.editDelta = {};

            _initDefineProp(this, 'val', _descriptor, this);

            _initDefineProp(this, 'property', _descriptor2, this);

            _initDefineProp(this, 'converter', _descriptor3, this);

            _initDefineProp(this, 'displayName', _descriptor4, this);

            this.dialogController = dialogController;
            this.gatewayService = gatewayService;
            this.validationController = validationController;
            this.validationController.addRenderer(new _dialogBootstrapRenderer.BootstrapFormRenderer());
            this.customRulesInit();
            this.kpaToPsiValueConverter = kpaToPsiValueConverter;
        }

        PsiInputDialog.prototype.activate = function activate(model) {
            this.val = model.val;
            this.converter = model.converter;
            this.property = model.property;
            this.converter = model.converter;
            this.format = model.format;
            this.displayName = model.displayName;

            _aureliaValidation.ValidationRules.ensure('val').satisfiesRule('kpaToPsiRange', model.min, model.max, this.converter, '0.0').on(this);
        };

        PsiInputDialog.prototype.valChanged = function valChanged() {
            this.validationController.validate();
        };

        PsiInputDialog.prototype.ok = function ok() {
            var _this = this;

            this.editDelta[this.property] = this.val;
            this.validationController.validate().then(function (result) {
                if (result.valid) {
                    _this.gatewayService.send(_this.editDelta);

                    _this.editDelta = {};
                    _this.dialogController.close();
                }
            });
        };

        PsiInputDialog.prototype.cancel = function cancel() {
            this.dialogController.close();
        };

        PsiInputDialog.prototype.customRulesInit = function customRulesInit() {
            _aureliaValidation.ValidationRules.customRule('kpaToPsiRange', function (value, obj, min, max, displayMin, displayMax) {
                return value === null || value === undefined || value >= min && value <= max;
            }, '${$this.property} must be a number between ${$config.displayMin} and ${$config.displayMax}.', function (min, max, converter, format) {
                if (converter) {
                    min = converter(min);
                    max = converter(max);
                }
                if (!format) {
                    format = '0';
                }
                var displayMin = (0, _numeral2.default)(min).format(format);
                var displayMax = (0, _numeral2.default)(max).format(format);

                return { min: min, max: max, displayMin: displayMin, displayMax: displayMax };
            });
        };

        return PsiInputDialog;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'val', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'property', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'converter', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'displayName', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class2)) || _class);
});
define('text!components/shared/dialogs/psi-input-dialog.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/kpaToPsi\"></require>\n    <require from=\"components/shared/dialogs/dialog-footer.html\"></require>\n    <ux-dialog>\n        <ux-dialog-body>\n            <div class=\"form-group\">\n                <label style=\"display: block\">${displayName}</label>\n                <input attach-focus=\"true\" value.bind=\"val | kpaToPsi:format & updateTrigger:'blur' & validateManually\">\n            </div>\n        </ux-dialog-body>\n        <ux-dialog-footer style=\"text-align: center\">\n            <button class=\"btn btn-lg btn-danger dialog-btn\"click.trigger=\"cancel()\">Cancel</button>\n            <button class=\"btn btn-lg btn-primary dialog-btn\"click.trigger=\"ok(person)\">Ok</button>\n        </ux-dialog-footer>\n    </ux-dialog>\n</template>\n"; });
var cov_z9c3wqvmw = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/dialogs/preset-dialog.js',
        hash = '98f61ca101181dd38ec9a34af0092d8459665fc6',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/dialogs/preset-dialog.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/dialogs/preset-dialog',['exports', 'aurelia-framework', 'aurelia-dialog', '../../../services/gateway-service'], function (exports, _aureliaFramework, _aureliaDialog, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PresetDialog = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3;

    var PresetDialog = exports.PresetDialog = (_dec = (0, _aureliaFramework.inject)(_gatewayService.GatewayService, _aureliaDialog.DialogController), _dec(_class = (_class2 = function () {
        function PresetDialog(gatewayService, dialogController) {
            var _this = this;

            _classCallCheck(this, PresetDialog);

            this.editDelta = {};

            _initDefineProp(this, 'settingProps', _descriptor, this);

            _initDefineProp(this, 'val', _descriptor2, this);

            _initDefineProp(this, 'fileName', _descriptor3, this);

            this.dialogController = dialogController;
            this.gatewayService = gatewayService;

            this.state = this.gatewayService.getState();

            this.gatewayService.getProperties(this.settingProps).then(function (results) {
                _this.state.boomPreset1Number1Name = results[0];
                _this.state.boomPreset1Number2Name = results[1];
                _this.state.boomPreset1Number3Name = results[2];
                _this.state.boomPreset1Number4Name = results[3];
                _this.state.boomPreset1Number5Name = results[4];
                _this.state.boomPreset1Number6Name = results[5];
                _this.state.boomPreset1Number7Name = results[6];
                _this.state.boomPreset1Number8Name = results[7];
                _this.state.boomPreset1Number9Name = results[8];
                _this.state.boomPreset1Number10Name = results[9];

                _this.name1 = _this.state.boomPreset1Number1Name;
                _this.name2 = _this.state.boomPreset1Number2Name;
                _this.name3 = _this.state.boomPreset1Number3Name;
                _this.name4 = _this.state.boomPreset1Number4Name;
                _this.name5 = _this.state.boomPreset1Number5Name;
                _this.name6 = _this.state.boomPreset1Number6Name;
                _this.name7 = _this.state.boomPreset1Number7Name;
                _this.name8 = _this.state.boomPreset1Number8Name;
                _this.name9 = _this.state.boomPreset1Number9Name;
                _this.name10 = _this.state.boomPreset1Number10Name;

                _this.tempLabels = [_this.name1, _this.name2, _this.name3, _this.name4, _this.name5, _this.name6, _this.name7, _this.name8, _this.name9, _this.name10];

                _this.labels = [];

                for (var i = 0; i < _this.tempLabels.length; i++) {
                    if (_this.tempLabels[i] !== null) {
                        _this.labels.push(_this.tempLabels[i]);
                    } else {
                        _this.labels.push('Empty');
                    }
                }

                _this.options = [];
                for (var _i = 0; _i < _this.labels.length; _i++) {
                    var anIndex = _i + 1;
                    _this.options.push({ index: anIndex, label: anIndex + ': ' + _this.labels[_i] });
                }
            });

            this.dropdownLabel = 'Options';
            this.selected = 1;
        }

        PresetDialog.prototype.activate = function activate(model) {
            this.info = model;
            this.val = model.val;
            this.fileName = model.displayName;
            this.displayName = 'Select the configuration to replace:';
        };

        PresetDialog.prototype.ok = function ok() {
            this.dialogController.ok({ preset: this.selected });
        };

        PresetDialog.prototype.cancel = function cancel() {
            this.dialogController.close();
        };

        PresetDialog.prototype.sendChange = function sendChange(selected) {
            this.selected = selected;
        };

        return PresetDialog;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'settingProps', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return ['BoomPreset1Number1Name', 'BoomPreset1Number2Name', 'BoomPreset1Number3Name', 'BoomPreset1Number4Name', 'BoomPreset1Number5Name', 'BoomPreset1Number6Name', 'BoomPreset1Number7Name', 'BoomPreset1Number8Name', 'BoomPreset1Number9Name', 'BoomPreset1Number10Name'];
        }
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'val', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'fileName', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class2)) || _class);
});
define('text!components/shared/dialogs/preset-dialog.html', ['module'], function(module) { module.exports = "<template>\n    <ux-dialog class=\"file-dialog\">\n        <ux-dialog-body>\n            <div class=\"form-group label-top\">\n                <label style=\"display: block\">${fileName}</label>\n            </div>\n        </ux-dialog-body>\n        <div>\n            <label>${displayName}</label>\n        </div>\n        <div>\n            <select value.bind=\"selected\" class=\"form-control\"\n                    change.delegate=\"sendChange(selected)\">\n                <option repeat.for=\"option of options\"\n                        model.bind=\"option.index\">\n                    ${option.label}\n                </option>\n            </select>\n        </div>\n        <ux-dialog-footer style=\"text-align: center\">\n            <button class=\"btn btn-lg btn-danger dialog-btn\" click.trigger=\"cancel()\">Cancel</button>\n            <button class=\"btn btn-lg btn-primary dialog-btn\" click.trigger=\"ok(person)\">Ok</button>\n        </ux-dialog-footer>\n    </ux-dialog>\n</template>\n"; });
var cov_2qkjm0cenf = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/dialogs/number-input-dialog.js',
        hash = 'a705b05487a225c428f8bd8e62251481e046c14b',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/dialogs/number-input-dialog.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/dialogs/number-input-dialog',['exports', 'aurelia-framework', 'aurelia-dialog', 'numeral', 'aurelia-validation', '../dialog-bootstrap-renderer', '../../../services/gateway-service'], function (exports, _aureliaFramework, _aureliaDialog, _numeral, _aureliaValidation, _dialogBootstrapRenderer, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.NumberInputDialog = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;

    var NumberInputDialog = exports.NumberInputDialog = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.NewInstance.of(_aureliaValidation.ValidationController), _gatewayService.GatewayService, _aureliaDialog.DialogController), _dec(_class = (_class2 = function () {
        function NumberInputDialog(validationController, gatewayService, dialogController) {
            _classCallCheck(this, NumberInputDialog);

            this.editDelta = {};

            _initDefineProp(this, 'val', _descriptor, this);

            _initDefineProp(this, 'format', _descriptor2, this);

            _initDefineProp(this, 'property', _descriptor3, this);

            _initDefineProp(this, 'converter', _descriptor4, this);

            this.dialogController = dialogController;
            this.gatewayService = gatewayService;
            this.validationController = validationController;
            this.validationController.addRenderer(new _dialogBootstrapRenderer.BootstrapFormRenderer());
        }

        NumberInputDialog.prototype.activate = function activate(model) {
            this.val = model.val;
            this.converter = model.converter;
            this.property = model.property;
            this.converter = model.converter;
            this.format = model.format;
            this.customRulesInit();
            this.displayName = model.displayName;
            _aureliaValidation.ValidationRules.ensure('val').satisfiesRule('numberRange', model.min, model.max, this.converter, '0.0').on(this);
        };

        NumberInputDialog.prototype.valChanged = function valChanged() {
            this.validationController.validate();
        };

        NumberInputDialog.prototype.ok = function ok() {
            var _this = this;

            this.editDelta[this.property] = this.val;
            this.validationController.validate().then(function (result) {
                if (result.valid) {
                    _this.gatewayService.send(_this.editDelta);

                    _this.editDelta = {};
                    _this.dialogController.close();
                }
            });
        };

        NumberInputDialog.prototype.cancel = function cancel() {
            this.dialogController.close();
        };

        NumberInputDialog.prototype.customRulesInit = function customRulesInit() {
            _aureliaValidation.ValidationRules.customRule('numberRange', function (value, obj, min, max, displayMin, displayMax) {
                return value === null || value === undefined || value >= min && value <= max;
            }, '${$this.property} must be a number between ${$config.displayMin} and ${$config.displayMax}.', function (min, max, converter, format) {
                if (converter) {
                    min = converter(min);
                    max = converter(max);
                }
                if (!format) {
                    format = '0';
                }
                var displayMin = (0, _numeral2.default)(min).format(format);
                var displayMax = (0, _numeral2.default)(max).format(format);

                return { min: min, max: max, displayMin: displayMin, displayMax: displayMax };
            });
        };

        return NumberInputDialog;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'val', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'format', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'property', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'converter', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class2)) || _class);
});
define('text!components/shared/dialogs/number-input-dialog.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/number-format\"></require>\n    <ux-dialog>\n        <ux-dialog-body>\n            <div class=\"form-group\">\n                <label style=\"display: block\">${displayName}</label>\n                <input attach-focus=\"true\" value.bind=\"val | numberFormat:format & updateTrigger:'blur' & validateManually\">\n            </div>\n        </ux-dialog-body>\n        <ux-dialog-footer style=\"text-align: center\">\n            <button class=\"btn btn-lg btn-danger dialog-btn\" click.trigger=\"cancel()\">Cancel</button>\n            <button class=\"btn btn-lg btn-primary dialog-btn\" click.trigger=\"ok(person)\">Ok</button>\n        </ux-dialog-footer>\n    </ux-dialog>\n</template>\n"; });
var cov_16i7vhux9s = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/dialogs/mph-input-dialog.js',
        hash = '6739e821c30923611f51d28fd715b62d482bcc65',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/dialogs/mph-input-dialog.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/dialogs/mph-input-dialog',['exports', 'aurelia-framework', 'aurelia-dialog', 'numeral', 'aurelia-validation', '../dialog-bootstrap-renderer', '../../../services/gateway-service'], function (exports, _aureliaFramework, _aureliaDialog, _numeral, _aureliaValidation, _dialogBootstrapRenderer, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.MphInputDialog = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3;

    var MphInputDialog = exports.MphInputDialog = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.NewInstance.of(_aureliaValidation.ValidationController), _gatewayService.GatewayService, _aureliaDialog.DialogController), _dec(_class = (_class2 = function () {
        function MphInputDialog(validationController, gatewayService, dialogController) {
            _classCallCheck(this, MphInputDialog);

            this.editDelta = {};

            _initDefineProp(this, 'val', _descriptor, this);

            _initDefineProp(this, 'property', _descriptor2, this);

            _initDefineProp(this, 'converter', _descriptor3, this);

            this.dialogController = dialogController;
            this.gatewayService = gatewayService;
            this.validationController = validationController;
            this.validationController.addRenderer(new _dialogBootstrapRenderer.BootstrapFormRenderer());
            this.customRulesInit();
        }

        MphInputDialog.prototype.activate = function activate(model) {
            this.val = model.val;
            this.converter = model.converter;
            this.property = model.property;
            this.displayName = model.displayName;

            _aureliaValidation.ValidationRules.ensure('val').satisfiesRule('numberRange', model.min, model.max, this.converter, '0.0').on(this);
        };

        MphInputDialog.prototype.valChanged = function valChanged() {
            this.validationController.validate();
        };

        MphInputDialog.prototype.ok = function ok() {
            var _this = this;

            this.editDelta[this.property] = this.val;
            this.validationController.validate().then(function (result) {
                if (result.valid) {
                    _this.gatewayService.send(_this.editDelta);

                    _this.editDelta = {};
                    _this.dialogController.close();
                }
            });
        };

        MphInputDialog.prototype.cancel = function cancel() {
            this.dialogController.close();
        };

        MphInputDialog.prototype.customRulesInit = function customRulesInit() {
            _aureliaValidation.ValidationRules.customRule('numberRange', function (value, obj, min, max, displayMin, displayMax) {
                return value === null || value === undefined || value >= min && value <= max;
            }, '${$this.property} must be a number between ${$config.displayMin} and ${$config.displayMax}.', function (min, max, converter, format) {
                if (converter) {
                    min = converter(min);
                    max = converter(max);
                }
                if (!format) {
                    format = '0';
                }
                var displayMin = (0, _numeral2.default)(min).format(format);
                var displayMax = (0, _numeral2.default)(max).format(format);

                return { min: min, max: max, displayMin: displayMin, displayMax: displayMax };
            });
        };

        return MphInputDialog;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'val', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'property', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'converter', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class2)) || _class);
});
define('text!components/shared/dialogs/mph-input-dialog.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/mmPerSecondToMph\"></require>\n    <ux-dialog>\n        <ux-dialog-body>\n            <div class=\"form-group\">\n                <label style=\"display: block\">${displayName}</label>\n                <input attach-focus=\"true\" value.bind=\"val | mmPerSecondToMph:format & updateTrigger:'blur' & validateManually\">\n            </div>\n        </ux-dialog-body>\n        <ux-dialog-footer>\n            <button class=\"btn btn-lg btn-danger dialog-btn\"click.trigger=\"cancel()\">Cancel</button>\n            <button class=\"btn btn-lg btn-primary dialog-btn\"click.trigger=\"ok(person)\">Ok</button>\n        </ux-dialog-footer>\n    </ux-dialog>\n</template>\n"; });
define('text!components/shared/dialogs/mm-gal-input-dialog.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/mlToGal\"></require>\n    <ux-dialog>\n        <ux-dialog-body>\n            <div class=\"form-group\">\n                <label style=\"display: block\">${displayName}</label>\n                <input type=\"number\" attach-focus=\"true\" value.bind=\"val | mlToGal:format & updateTrigger:'blur' & validateManually\">\n            </div>\n        </ux-dialog-body>\n        <ux-dialog-footer>\n            <button class=\"btn btn-lg btn-danger dialog-btn\" click.trigger=\"cancel()\">Cancel</button>\n            <button class=\"btn btn-lg btn-primary dialog-btn\" click.trigger=\"ok(person)\">Ok</button>\n        </ux-dialog-footer>\n    </ux-dialog>\n</template>\n"; });
var cov_18wx7lgzud = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/dialogs/input-dialog.js',
        hash = 'aeb7fe5c4e10d0d2aff887cde7e65176c0d375c5',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/dialogs/input-dialog.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/dialogs/input-dialog',['exports', 'aurelia-framework', '../../../resources/value-converters/mlToGal', 'aurelia-dialog', 'numeral', 'aurelia-validation', '../dialog-bootstrap-renderer', '../../../services/gateway-service'], function (exports, _aureliaFramework, _mlToGal, _aureliaDialog, _numeral, _aureliaValidation, _dialogBootstrapRenderer, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.InputDialog = undefined;

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;

    var InputDialog = exports.InputDialog = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.NewInstance.of(_aureliaValidation.ValidationController), _mlToGal.MlToGalValueConverter, _gatewayService.GatewayService, _aureliaDialog.DialogController), _dec(_class = (_class2 = function () {
        function InputDialog(validationController, mlToGalValueConverter, gatewayService, dialogController) {
            _classCallCheck(this, InputDialog);

            this.editDelta = {};

            _initDefineProp(this, 'val', _descriptor, this);

            _initDefineProp(this, 'property', _descriptor2, this);

            _initDefineProp(this, 'converter', _descriptor3, this);

            _initDefineProp(this, 'converterName', _descriptor4, this);

            _initDefineProp(this, 'displayName', _descriptor5, this);

            this.dialogController = dialogController;
            this.gatewayService = gatewayService;
            this.validationController = validationController;
            this.validationController.addRenderer(new _dialogBootstrapRenderer.BootstrapFormRenderer());
            this.customRulesInit();
            this.mlToGalValueConverter = mlToGalValueConverter;
        }

        InputDialog.prototype.activate = function activate(model) {
            this.val = model.val;
            this.property = model.property;
            this.format = model.format;
            this.min = model.min;
            this.max = model.max;
            this.displayName = model.displayName;
        };

        InputDialog.prototype.created = function created(owningView, myView) {
            var valueConverters = Object.keys(myView.resources.valueConverters);

            this.converterName = valueConverters[0];
            var valueConverter = myView.resources.getValueConverter(this.converterName);

            _aureliaValidation.ValidationRules.ensure('val').satisfiesRule('kpaToPsiRange', this.min, this.max, valueConverter.forValidate, '0.0').on(this);
        };

        InputDialog.prototype.lowerCaseFirstLetter = function lowerCaseFirstLetter(string) {
            return string.charAt(0).toLowerCase() + string.slice(1);
        };

        InputDialog.prototype.valChanged = function valChanged() {
            this.validationController.validate();
        };

        InputDialog.prototype.ok = function ok() {
            var _this = this;

            this.editDelta[this.property] = this.val;
            this.validationController.validate().then(function (result) {
                if (result.valid) {
                    _this.gatewayService.send(_this.editDelta);

                    _this.editDelta = {};
                    _this.dialogController.close();
                }
            });
        };

        InputDialog.prototype.cancel = function cancel() {
            this.dialogController.close();
        };

        InputDialog.prototype.customRulesInit = function customRulesInit() {
            _aureliaValidation.ValidationRules.customRule('kpaToPsiRange', function (value, obj, min, max, displayMin, displayMax) {
                return value === null || value === undefined || value >= min && value <= max;
            }, '${$this.property} must be a number between ${$config.displayMin} and ${$config.displayMax}.', function (min, max, converter, format) {
                if (converter) {
                    min = converter(min);
                    max = converter(max);
                }
                if (!format) {
                    format = '0';
                }
                var displayMin = (0, _numeral2.default)(min).format(format);
                var displayMax = (0, _numeral2.default)(max).format(format);

                return { min: min, max: max, displayMin: displayMin, displayMax: displayMax };
            });
        };

        return InputDialog;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'val', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'property', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'converter', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'converterName', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, 'displayName', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class2)) || _class);
});
define('text!components/shared/dialogs/dialog-footer.html', ['module'], function(module) { module.exports = "<template>\n        <button style=\"width: 45%\" class=\"btn btn-lg btn-danger\"click.trigger=\"$parent.cancel()\">Cancel</button>\n        <button style=\"width: 45%\" class=\"btn btn-lg btn-primary dialog-btn\"click.trigger=\"$parent.ok(person)\">Ok</button>\n</template>\n"; });
var cov_14zzq80wo = function () {
  var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/dialogs/confirm-dialog.js',
      hash = '3e5d8c6f5c9be540a6fd89b2f102830b37a49db4',
      global = new Function('return this')(),
      gcv = '__coverage__',
      coverageData = {
    path: '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/dialogs/confirm-dialog.js',
    statementMap: {},
    fnMap: {},
    branchMap: {},
    s: {},
    f: {},
    b: {},
    _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('components/shared/dialogs/confirm-dialog',['exports', 'aurelia-framework', 'aurelia-dialog', '../../../services/gateway-service'], function (exports, _aureliaFramework, _aureliaDialog, _gatewayService) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.ConfirmDialog = undefined;

  function _initDefineProp(target, property, descriptor, context) {
    if (!descriptor) return;
    Object.defineProperty(target, property, {
      enumerable: descriptor.enumerable,
      configurable: descriptor.configurable,
      writable: descriptor.writable,
      value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
    });
  }

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
    var desc = {};
    Object['ke' + 'ys'](descriptor).forEach(function (key) {
      desc[key] = descriptor[key];
    });
    desc.enumerable = !!desc.enumerable;
    desc.configurable = !!desc.configurable;

    if ('value' in desc || desc.initializer) {
      desc.writable = true;
    }

    desc = decorators.slice().reverse().reduce(function (desc, decorator) {
      return decorator(target, property, desc) || desc;
    }, desc);

    if (context && desc.initializer !== void 0) {
      desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
      desc.initializer = undefined;
    }

    if (desc.initializer === void 0) {
      Object['define' + 'Property'](target, property, desc);
      desc = null;
    }

    return desc;
  }

  function _initializerWarningHelper(descriptor, context) {
    throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
  }

  var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2;

  var ConfirmDialog = exports.ConfirmDialog = (_dec = (0, _aureliaFramework.inject)(_gatewayService.GatewayService, _aureliaDialog.DialogController), _dec(_class = (_class2 = function () {
    function ConfirmDialog(gatewayService, dialogController) {
      _classCallCheck(this, ConfirmDialog);

      this.editDelta = {};

      _initDefineProp(this, 'val', _descriptor, this);

      _initDefineProp(this, 'property', _descriptor2, this);

      this.dialogController = dialogController;
      this.gatewayService = gatewayService;
    }

    ConfirmDialog.prototype.activate = function activate(model) {
      this.val = model.val;
      this.property = model.property;
      this.displayName = model.displayName;
    };

    ConfirmDialog.prototype.ok = function ok() {
      this.dialogController.ok();
    };

    ConfirmDialog.prototype.cancel = function cancel() {
      this.dialogController.close();
    };

    return ConfirmDialog;
  }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'val', [_aureliaFramework.bindable], {
    enumerable: true,
    initializer: null
  }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'property', [_aureliaFramework.bindable], {
    enumerable: true,
    initializer: null
  })), _class2)) || _class);
});
define('text!components/shared/dialogs/confirm-dialog.html', ['module'], function(module) { module.exports = "<template>\n    <ux-dialog>\n        <ux-dialog-body>\n            <div class=\"form-group\">\n                <label style=\"display: block\">${displayName}</label>\n            </div>\n        </ux-dialog-body>\n        <ux-dialog-footer style=\"text-align: center\">\n            <button class=\"btn btn-lg btn-danger dialog-btn\" click.trigger=\"cancel()\">Cancel</button>\n            <button class=\"btn btn-lg btn-primary dialog-btn\" click.trigger=\"ok(person)\">Ok</button>\n        </ux-dialog-footer>\n    </ux-dialog>\n</template>\n"; });
var cov_gko2r9fxd = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/dialogs/boom-dialog.js',
        hash = '247e68037c0dbff807452c5ab397985a68ea9254',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/dialogs/boom-dialog.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/dialogs/boom-dialog',['exports', 'aurelia-framework', 'aurelia-dialog'], function (exports, _aureliaFramework, _aureliaDialog) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.BoomDialog = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;

    var BoomDialog = exports.BoomDialog = (_dec = (0, _aureliaFramework.inject)(_aureliaDialog.DialogController), _dec(_class = (_class2 = function () {
        function BoomDialog(dialogController) {
            _classCallCheck(this, BoomDialog);

            _initDefineProp(this, 'val', _descriptor, this);

            _initDefineProp(this, 'fileName', _descriptor2, this);

            _initDefineProp(this, 'startPoints', _descriptor3, this);

            _initDefineProp(this, 'endPoints', _descriptor4, this);

            this.dialogController = dialogController;
        }

        BoomDialog.prototype.activate = function activate(model) {
            this.info = model;
            this.val = model.val;
            this.displayName = model.displayName;
            this.nozzleChannles = model.nozzleChannles;
        };

        BoomDialog.prototype.add = function add(index) {
            if (this.startPoints.length < this.nozzleChannles.length && this.endPoints[index] < this.nozzleChannles.length) {
                this.startPoints.splice(index + 1, 0, this.endPoints[index] + 1);
                this.endPoints.splice(index + 1, 0, this.endPoints[index] + 1);
                var i = index + 2;
                while (i < this.startPoints.length && this.startPoints[i] <= this.endPoints[i - 1]) {
                    this.startPoints[i] = this.endPoints[i - 1] + 1;
                    if (this.endPoints[i] < this.startPoints[i]) {
                        this.endPoints[i] = this.startPoints[i];
                    }
                    i += 1;
                }
            }
            this.trim();
        };

        BoomDialog.prototype.remove = function remove(index) {
            if (this.startPoints.length > 1) {
                this.startPoints.splice(index, 1);
                this.endPoints.splice(index, 1);
                if (this.startPoints.length > index && index > 0) {
                    this.startPoints[index] = this.endPoints[index - 1] + 1;
                } else if (index === 0) {
                    this.startPoints[index] = 0;
                }
            }
        };

        BoomDialog.prototype.valueChanged = function valueChanged(index) {
            var i = index + 1;
            if (this.endPoints[index] > this.nozzleChannles.length - 1) {
                this.startPoints.splice(index + 1, this.startPoints.length - index);
                this.endPoints.splice(index, this.endPoints.length - index, this.nozzleChannles.length - 1);
            }
            while (i < this.startPoints.length && this.startPoints[i] <= this.endPoints[i - 1]) {
                this.startPoints[i] = this.endPoints[i - 1] + 1;
                if (this.endPoints[i] < this.startPoints[i]) {
                    this.endPoints.splice(i, 1, this.startPoints[i]);
                }
                i += 1;
            }
            this.trim();
        };

        BoomDialog.prototype.trim = function trim() {
            var j = this.endPoints.length;
            while (j > 0) {
                if (this.endPoints[j - 1] > this.nozzleChannles.length - 1) {
                    if (this.endPoints[j - 1] === this.startPoints[j - 1]) {
                        this.startPoints.splice(j + 1, 1);
                        this.endPoints.splice(j - 1, 1);
                        j = j - 1;
                    } else {
                        var newValue = this.endPoints[j - 1] - 1;
                        this.endPoints.splice(j - 1, 1, newValue);
                    }
                } else {
                    j = j - 1;
                }
            }
        };

        BoomDialog.prototype.ok = function ok() {
            this.dialogController.ok({ startPoints: this.startPoints, endPoints: this.endPoints });
        };

        BoomDialog.prototype.cancel = function cancel() {
            this.dialogController.close();
        };

        return BoomDialog;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'val', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'fileName', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return '';
        }
    }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'startPoints', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return [0];
        }
    }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'endPoints', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return [0];
        }
    })), _class2)) || _class);
});
define('text!components/shared/dialogs/boom-dialog.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"resources/value-converters/plusone-format\"></require>\n    <ux-dialog class=\"boom-dialog\">\n        <ux-dialog-body>\n            <div class=\"form-group label-top\">\n                <label style=\"display: block\">${displayName}</label>\n            </div>\n        </ux-dialog-body>\n        <div class=\"form-group form-group-lg\">\n            <label class=\"col-xs-2 control-label\">\n                ${\"Boom\"}\n            </label>\n            <label class=\"col-xs-2 control-label\">\n                ${\"Start\"}\n            </label>\n            <label class=\"col-xs-push-4 control-label\">\n                ${\"End\"}\n            </label>\n        </div>\n        <div repeat.for=\"valve of endPoints\">\n            <div style=\"margin-left: 7px; padding-bottom: 30px\" class=\"form-group form-group-lg\">\n                <label class=\"col-xs-2 control-label\">\n                    ${$index | plusoneFormat}\n                </label>\n                <label class=\"col-xs-2 control-label\">\n                    ${startPoints[$index] | plusoneFormat}\n                </label>\n                <input style=\"margin-right: 15px\" type=\"text\" class=\"col-xs-2\" value.bind=\"endPoints[$index] | plusoneFormat\" change.delegate=\"valueChanged($index)\" />\n                <button class=\"btn-sm col-xs-2 btn-gray\" style=\"margin-right: 5px\" click.trigger=\"add($index)\">+</button>\n                <button class=\"btn-sm col-xs-2 btn-gray ${startPoints.length === 1 ? 'btn-hidden' : 'btn-visible'}\" click.trigger=\"remove($index)\">-</button>\n                <!--<label class=\"col-xs-2 btn-gray control-label\" click.trigger=\"add($index)\">\n                    ${\"+\"}\n                </label>-->\n                <!--<label class=\"col-xs-push-2 control-label ${startPoints.length === 1 ? 'btn-hidden' : 'btn-visible'}\" click.trigger=\"remove($index)\">\n                    ${\"-\"}\n                </label>-->\n            </div>\n        </div>\n        <ux-dialog-footer style=\"text-align: center\">\n            <button class=\"btn btn-lg btn-danger dialog-btn\" click.trigger=\"cancel()\">Cancel</button>\n            <button class=\"btn btn-lg btn-primary dialog-btn\" click.trigger=\"ok(person)\">Ok</button>\n        </ux-dialog-footer>\n    </ux-dialog>\n</template>\n"; });
var cov_2opkjr082n = function () {
  var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/dialogs/active-alarms.js',
      hash = '3453fadeea21603587a5d79d9cd8168a3c898f97',
      global = new Function('return this')(),
      gcv = '__coverage__',
      coverageData = {
    path: '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/dialogs/active-alarms.js',
    statementMap: {},
    fnMap: {},
    branchMap: {},
    s: {},
    f: {},
    b: {},
    _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
  },
      coverage = global[gcv] || (global[gcv] = {});

  if (coverage[path] && coverage[path].hash === hash) {
    return coverage[path];
  }

  coverageData.hash = hash;
  return coverage[path] = coverageData;
}();

define('components/shared/dialogs/active-alarms',['exports', 'aurelia-framework', 'aurelia-dialog'], function (exports, _aureliaFramework, _aureliaDialog) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.ActiveAlarms = undefined;

  function _initDefineProp(target, property, descriptor, context) {
    if (!descriptor) return;
    Object.defineProperty(target, property, {
      enumerable: descriptor.enumerable,
      configurable: descriptor.configurable,
      writable: descriptor.writable,
      value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
    });
  }

  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }

  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
    var desc = {};
    Object['ke' + 'ys'](descriptor).forEach(function (key) {
      desc[key] = descriptor[key];
    });
    desc.enumerable = !!desc.enumerable;
    desc.configurable = !!desc.configurable;

    if ('value' in desc || desc.initializer) {
      desc.writable = true;
    }

    desc = decorators.slice().reverse().reduce(function (desc, decorator) {
      return decorator(target, property, desc) || desc;
    }, desc);

    if (context && desc.initializer !== void 0) {
      desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
      desc.initializer = undefined;
    }

    if (desc.initializer === void 0) {
      Object['define' + 'Property'](target, property, desc);
      desc = null;
    }

    return desc;
  }

  function _initializerWarningHelper(descriptor, context) {
    throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
  }

  var _dec, _class, _desc, _value, _class2, _descriptor;

  var ActiveAlarms = exports.ActiveAlarms = (_dec = (0, _aureliaFramework.inject)(_aureliaDialog.DialogController), _dec(_class = (_class2 = function () {
    function ActiveAlarms(dialogController) {
      _classCallCheck(this, ActiveAlarms);

      _initDefineProp(this, 'alarms', _descriptor, this);

      this.dialogController = dialogController;
    }

    ActiveAlarms.prototype.activate = function activate(model) {
      this.info = model;
      this.alarms = model.alarms;
    };

    ActiveAlarms.prototype.ok = function ok() {
      this.dialogController.ok();
    };

    ActiveAlarms.prototype.sendChange = function sendChange() {};

    return ActiveAlarms;
  }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'alarms', [_aureliaFramework.bindable], {
    enumerable: true,
    initializer: function initializer() {
      return ['One', 'Two', 'Three'];
    }
  })), _class2)) || _class);
});
define('text!components/shared/dialogs/active-alarms.html', ['module'], function(module) { module.exports = "<template>\n    <ux-dialog class=\"alarm-dialog\">\n        <ux-dialog-body>\n            <div class=\"form-group label-top\" style=\"font-size: 18px;\">\n                <label style=\"display: block\">Active Alarms:</label>\n            </div>\n        </ux-dialog-body>\n        <div repeat.for=\"alarmCount of alarms.length\">\n            <div style=\"padding-bottom: 10px;\">\n                <label>${alarms[$index]}</label>\n            </div>\n        </div>\n        <ux-dialog-footer style=\"text-align: center\">\n            <button class=\"btn btn-lg btn-primary dialog-btn\" click.trigger=\"ok(person)\">Ok</button>\n        </ux-dialog-footer>\n    </ux-dialog>\n</template>\n"; });
var cov_1i0vvtbq9n = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/dialog-bootstrap-renderer.js',
        hash = 'ba9e1391a607f9f6b430dbafd5bee488ca2ef531',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/dialog-bootstrap-renderer.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/dialog-bootstrap-renderer',['exports'], function (exports) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var BootstrapFormRenderer = exports.BootstrapFormRenderer = function () {
        function BootstrapFormRenderer() {
            _classCallCheck(this, BootstrapFormRenderer);
        }

        BootstrapFormRenderer.prototype.render = function render(instruction) {
            for (var _iterator = instruction.unrender, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
                var _ref2;

                if (_isArray) {
                    if (_i >= _iterator.length) break;
                    _ref2 = _iterator[_i++];
                } else {
                    _i = _iterator.next();
                    if (_i.done) break;
                    _ref2 = _i.value;
                }

                var _ref5 = _ref2;
                var result = _ref5.result,
                    elements = _ref5.elements;

                for (var _iterator3 = elements, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
                    var _ref6;

                    if (_isArray3) {
                        if (_i3 >= _iterator3.length) break;
                        _ref6 = _iterator3[_i3++];
                    } else {
                        _i3 = _iterator3.next();
                        if (_i3.done) break;
                        _ref6 = _i3.value;
                    }

                    var element = _ref6;

                    this.remove(element, result);
                }
            }

            for (var _iterator2 = instruction.render, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
                var _ref4;

                if (_isArray2) {
                    if (_i2 >= _iterator2.length) break;
                    _ref4 = _iterator2[_i2++];
                } else {
                    _i2 = _iterator2.next();
                    if (_i2.done) break;
                    _ref4 = _i2.value;
                }

                var _ref7 = _ref4;
                var result = _ref7.result,
                    elements = _ref7.elements;

                for (var _iterator4 = elements, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
                    var _ref8;

                    if (_isArray4) {
                        if (_i4 >= _iterator4.length) break;
                        _ref8 = _iterator4[_i4++];
                    } else {
                        _i4 = _iterator4.next();
                        if (_i4.done) break;
                        _ref8 = _i4.value;
                    }

                    var _element = _ref8;

                    this.add(_element, result);
                }
            }
        };

        BootstrapFormRenderer.prototype.add = function add(element, result) {
            var formGroup = element.closest('.form-group');
            if (!formGroup) {
                return;
            }

            if (result.valid) {
                if (!formGroup.classList.contains('has-error')) {
                    formGroup.classList.add('has-success');
                }
            } else {
                formGroup.classList.remove('has-success');
                formGroup.classList.add('has-error');

                var message = document.createElement('span');
                message.className = 'help-block validation-message';
                message.textContent = result.message;
                message.id = 'validation-message-' + result.id;
                formGroup.appendChild(message);
            }
        };

        BootstrapFormRenderer.prototype.remove = function remove(element, result) {
            var formGroup = element.closest('.form-group');
            if (!formGroup) {
                return;
            }

            if (result.valid) {
                if (formGroup.classList.contains('has-success')) {
                    formGroup.classList.remove('has-success');
                }
            } else {
                var message = formGroup.querySelector('#validation-message-' + result.id);
                if (message) {
                    formGroup.removeChild(message);

                    if (formGroup.querySelectorAll('.help-block.validation-message').length === 0) {
                        formGroup.classList.remove('has-error');
                    }
                }
            }
        };

        return BootstrapFormRenderer;
    }();
});
var cov_24c82nfjmf = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/boundary-map-select2.js',
        hash = '342163c5b2af8c6ad8508321a745f4ffa644fbb5',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/boundary-map-select2.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/boundary-map-select2',['exports', 'aurelia-framework', '../../services/file-service', '../../services/spray-session-service', '../../services/boundary-map-service'], function (exports, _aureliaFramework, _fileService, _spraySessionService, _boundaryMapService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.BoundaryMapSelect2 = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _class, _desc, _value, _class2, _descriptor;

    var BoundaryMapSelect2 = exports.BoundaryMapSelect2 = (_dec = (0, _aureliaFramework.inject)(_fileService.FileService, _spraySessionService.SpraySessionService, _boundaryMapService.BoundaryMapService), _dec2 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec(_class = (_class2 = function () {
        function BoundaryMapSelect2(fileService, spraySessionService, boundaryMapService) {
            var _this = this;

            _classCallCheck(this, BoundaryMapSelect2);

            _initDefineProp(this, 'selectedBoundaryMaps', _descriptor, this);

            this.selectOptions = [];
            this.subscriptions = [];

            this.fileService = fileService;
            this.spraySessionService = spraySessionService;
            this.boundaryMapService = boundaryMapService;

            this.boundaryMapService.registerBoundaryMapCreatedCallback(function (map) {
                _this.setup();
            });

            this.setup();
        }

        BoundaryMapSelect2.prototype.setup = function setup() {
            var _this2 = this;

            this.selectedBoundaryMaps = [];
            this.selectOptions = [];
            this.subscriptions = [];

            this.fileService.getBoundaryMaps().then(function (response) {
                response.forEach(function (map) {
                    _this2.selectOptions.push({
                        label: map,
                        value: map
                    });
                });
            }, this.spraySessionService.getCurrentSpraySession().then(function (aResponse) {
                _this2.groupName = aResponse.boundaryGroup.name;
                aResponse.boundaryMapPaths.forEach(function (path) {
                    _this2.selectedBoundaryMaps.push(path);
                });
                _this2.changeCallback(1);
            }));
        };

        BoundaryMapSelect2.prototype.getBoundaryMaps = function getBoundaryMaps() {
            var _this3 = this;

            this.fileService.getBoundaryMaps().then(function (response) {
                response.forEach(function (map) {
                    _this3.selectOptions.push({
                        label: map,
                        value: map
                    });
                });
            });
        };

        BoundaryMapSelect2.prototype.changeCallback = function changeCallback(evt) {
            var _this4 = this;

            this.spraySessionService.getCurrentSpraySession().then(function (response) {
                _this4.groupName = response.boundaryGroup.name;
                _this4.spraySessionService.sendBoundaryMaps(_this4.selectedBoundaryMaps, _this4.groupName);
            });
        };

        return BoundaryMapSelect2;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'selectedBoundaryMaps', [_dec2], {
        enumerable: true,
        initializer: function initializer() {
            return [];
        }
    })), _class2)) || _class);
});
define('text!components/shared/boundary-map-select2.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"components/shared/select2\"></require>\n    <select2 name=\"myCustomSelect\" selected.bind=\"selectedBoundaryMaps\" \n             options.bind=\"selectOptions\" change.delegate=\"changeCallback($event)\"></select2>\n</template>\n"; });
var cov_2aujqg2fhh = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/bootstrap-form-renderer.js',
        hash = 'f255394bcd194811f55ba745d43f797a7ba81504',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/bootstrap-form-renderer.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/bootstrap-form-renderer',['exports'], function (exports) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var BootstrapFormRenderer = exports.BootstrapFormRenderer = function () {
        function BootstrapFormRenderer() {
            _classCallCheck(this, BootstrapFormRenderer);
        }

        BootstrapFormRenderer.prototype.render = function render(instruction) {
            var _this = this;

            var _loop = function _loop() {
                if (_isArray) {
                    if (_i >= _iterator.length) return 'break';
                    _ref2 = _iterator[_i++];
                } else {
                    _i = _iterator.next();
                    if (_i.done) return 'break';
                    _ref2 = _i.value;
                }

                var _ref = _ref2;
                var result = _ref.result,
                    elements = _ref.elements;

                elements.forEach(function (element) {
                    return _this.remove(element, result);
                });
            };

            for (var _iterator = instruction.unrender, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
                var _ref2;

                var _ret = _loop();

                if (_ret === 'break') break;
            }

            var _loop2 = function _loop2() {
                if (_isArray2) {
                    if (_i2 >= _iterator2.length) return 'break';
                    _ref4 = _iterator2[_i2++];
                } else {
                    _i2 = _iterator2.next();
                    if (_i2.done) return 'break';
                    _ref4 = _i2.value;
                }

                var _ref3 = _ref4;
                var result = _ref3.result,
                    elements = _ref3.elements;

                elements.forEach(function (element) {
                    return _this.add(element, result);
                });
            };

            for (var _iterator2 = instruction.render, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
                var _ref4;

                var _ret2 = _loop2();

                if (_ret2 === 'break') break;
            }
        };

        BootstrapFormRenderer.prototype.add = function add(element, result) {
            if (!element.firstElementChild) {
                return;
            }
            var formGroup = element.firstElementChild.closest('.form-group');
            if (!formGroup) {
                return;
            }

            if (result.valid) {
                if (!formGroup.classList.contains('has-error')) {
                    formGroup.classList.add('has-success');
                }
            } else {
                formGroup.classList.remove('has-success');
                formGroup.classList.add('has-error');

                var message = document.createElement('span');
                message.className = 'help-block validation-message';
                message.textContent = result.message;
                message.id = 'validation-message-' + result.id;
                $(formGroup).find('input').parent().append(message);
            }
        };

        BootstrapFormRenderer.prototype.remove = function remove(element, result) {
            if (!element.firstElementChild) {
                return;
            }
            var formGroup = element.firstElementChild.closest('.form-group');
            if (!formGroup) {
                return;
            }

            if (result.valid) {
                if (formGroup.classList.contains('has-success')) {
                    formGroup.classList.remove('has-success');
                }
            } else {
                var message = $(formGroup).find('#validation-message-' + result.id);
                if (message) {
                    message.remove();

                    if (formGroup.querySelectorAll('.help-block.validation-message').length === 0) {
                        formGroup.classList.remove('has-error');
                    }
                }
            }
        };

        return BootstrapFormRenderer;
    }();
});
var cov_5p6odnxwd = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/app-nav.js',
        hash = '8bfe28df2bcd7f582be02a0fc0ad3fb3cf7a79b0',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/app-nav.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/app-nav',['exports', 'aurelia-dependency-injection', 'aurelia-configuration', '../../services/auth-service-helper', '../../services/updates-service', 'px-nav'], function (exports, _aureliaDependencyInjection, _aureliaConfiguration, _authServiceHelper, _updatesService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.AppNav = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    var _dec, _class;

    var AppNav = exports.AppNav = (_dec = (0, _aureliaDependencyInjection.inject)(_authServiceHelper.AuthServiceHelper, _aureliaConfiguration.AureliaConfiguration, _updatesService.UpdatesService), _dec(_class = function () {
        function AppNav(authServiceHelper, appConfig, updatesService) {
            _classCallCheck(this, AppNav);

            this.appConfig = appConfig;
            this.authServiceHelper = authServiceHelper;
            this.updatesService = updatesService;
        }

        AppNav.prototype.attached = function attached() {
            var _this = this;

            this.updatesService.subscribe(this.handleUpdateNotification.bind(this));
            this.updatesService.isUpdateAvailable().then(function (available) {
                _this.updateAvailable = available;
            });
        };

        AppNav.prototype.handleUpdateNotification = function handleUpdateNotification() {
            this.updateAvailable = true;
        };

        AppNav.prototype.attached = function attached() {
            $('.px-nav').pxNav();
        };

        AppNav.prototype.login = function login() {
            this.authServiceHelper.login();
        };

        AppNav.prototype.logout = function logout() {
            this.authServiceHelper.logout();
        };

        _createClass(AppNav, [{
            key: 'isLoggedIn',
            get: function get() {
                var user = this.authServiceHelper.getUser();
                return user !== null && user !== undefined;
            }
        }, {
            key: 'isCloud',
            get: function get() {
                var isCloud = this.appConfig.get('Web').IsCloud;
                return isCloud;
            }
        }]);

        return AppNav;
    }()) || _class);
});
define('text!components/shared/app-nav.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"components/shared/app-footer\"></require>\n    <button type=\"button\" class=\"px-nav-toggle\" data-toggle=\"px-nav\">\n        <span class=\"px-nav-toggle-arrow\"></span>\n        <span class=\"navbar-toggle-icon\"></span>\n        <span class=\"px-nav-toggle-label font-size-11\">${\"HIDE MENU\" | t}</span>\n    </button>\n\n    <ul class=\"px-nav-content\">\n        <li class=\"px-nav-item\">\n            <a route-href=\"route: dashboard\"><i class=\"px-nav-icon ion-ios-pulse-strong\"></i><span class=\"px-nav-label\">${\"Dashboard\" | t}</span></a>\n        </li>\n        <li class=\"px-nav-item px-nav-dropdown\">\n            <!-- Root dropdown -->\n            <a><i class=\"px-nav-icon ion-settings\"></i><span class=\"px-nav-label\">Settings</span></a>\n            <ul class=\"px-nav-dropdown-menu\">\n                <li class=\"px-nav-item\">\n                    <a route-href=\"route: settings\"><i class=\"px-nav-icon ion-ios-list\"></i><span class=\"px-nav-label\"> System Setup</span></a>\n                </li>\n\n                <!--                    <li class=\"px-nav-item\">\n                    <a route-href=\"#\"><i class=\"px-nav-icon ion-navigate\"></i><span class=\"px-nav-label\">Gps Setup</span></a>\n                </li>\n                <li class=\"px-nav-item\">\n                    <a route-href=\"#\"><i class=\"px-nav-icon ion-ios-cog\"></i><span class=\"px-nav-label\"> Boom Sway Setup</span></a>\n                </li>\n                <li class=\"px-nav-item\">\n                    <a route-href=\"#\"><i class=\"px-nav-icon ion-ios-cog\"></i><span class=\"px-nav-label\">Nozzle Setup</span></a>\n                </li>\n                <li class=\"px-nav-item\">\n                    <a route-href=\"#\"><i class=\"px-nav-icon ion-ios-cog\"></i><span class=\"px-nav-label\">Location Setup</span></a>\n                </li>-->\n            </ul>\n        </li>\n        <li class=\"px-nav-item\">\n            <a route-href=\"route: pid-control-tuning\"><i class=\"px-nav-icon ion-arrow-graph-up-right\"></i><span class=\"px-nav-label\">Pid Control Tuning</span></a>\n        </li>\n        <!--            <li class=\"px-nav-item px-nav-dropdown\">\n            $1$ Root dropdown #1#\n            <a route-href=\"#\"><i class=\"px-nav-icon ion-hammer\"></i><span class=\"px-nav-label\">Management</span></a>\n            <ul class=\"px-nav-dropdown-menu\">\n                <li class=\"px-nav-item\">\n                    <a route-href=\"#\"><i class=\"px-nav-icon ion-settings\"></i><span class=\"px-nav-label\">Management Setup</span></a>\n                </li>\n                <li class=\"px-nav-item\">\n                    <a route-href=\"#\"><i class=\"px-nav-icon ion-beaker\"></i><span class=\"px-nav-label\">Product</span></a>\n                </li>\n                <li class=\"px-nav-item\">\n\n                    <a route-href=\"#\"><i class=\"px-nav-icon ion-map\"></i><span class=\"px-nav-label\">Map Preview</span></a>\n                </li>\n                <li class=\"px-nav-item\">\n                    <a route-href=\"#\"><i class=\"px-nav-icon ion-ios-paper\"></i><span class=\"px-nav-label\">Field Notes</span></a>\n                </li>\n            </ul>\n        </li>-->\n        <li class=\"px-nav-item\">\n            <a route-href=\"route: filetransfer\"><i class=\"px-nav-icon ion-usb\"></i><span class=\"px-nav-label\">${\"File Transfer\" | t}</span></a>\n        </li>\n        <li class=\"px-nav-item\">\n            <a route-href=\"route: logs\"><i class=\"px-nav-icon ion-android-list\"></i><span class=\"px-nav-label\">${\"Log\" | t}</span></a>\n        </li>\n        <li if.bind=\"isCloud && !isLoggedIn\" class=\"px-nav-item\">\n            <a click.delegate=\"login()\"><i class=\"px-nav-icon ion-log-in\"></i><span class=\"px-nav-label\">${\"Login\" | t}</span></a>\n        </li>\n        <li if.bind=\"isCloud && isLoggedIn\" class=\"px-nav-item\">\n            <a click.delegate=\"logout()\"><i class=\"px-nav-icon ion-log-out\"></i><span class=\"px-nav-label\">${\"Logout\" | t}</span></a>\n        </li>\n        <li class=\"px-nav-item\">\n            <a route-href=\"route: updates\"><i class=\"px-nav-icon ion-android-cloud-outline\"></i><i if.bind=\"updateAvailable\" class=\"px-notification-icon ion-ios-information\"></i><span class=\"px-nav-label\">${\"Updates\" | t}</span></a>\n        </li>\n        <li class=\"px-nav-item\">\n            <a route-href=\"route: debug\"><i class=\"px-nav-icon ion-code\"></i><span class=\"px-nav-label\">${\"Debug\" | t}</span></a>\n        </li>\n    </ul>\n    <app-footer></app-footer>\n</template>\n"; });
var cov_ynrwjljt8 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/app-header.js',
        hash = 'ed1762e923a574971cf280329545d5f0e7f5aea1',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/app-header.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/app-header',['exports', 'aurelia-framework', 'aurelia-configuration', '../../views/map/map-view-state', 'aurelia-router'], function (exports, _aureliaFramework, _aureliaConfiguration, _mapViewState, _aureliaRouter) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.AppHeader = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var AppHeader = exports.AppHeader = (_dec = (0, _aureliaFramework.inject)(_mapViewState.MapViewState, _aureliaRouter.Router, _aureliaConfiguration.AureliaConfiguration), _dec(_class = function () {
        function AppHeader(mapViewState, router, appConfig) {
            _classCallCheck(this, AppHeader);

            this.mapViewState = mapViewState;
            this.router = router;
            this.appConfig = appConfig;
        }

        AppHeader.prototype.toggleToolbar = function toggleToolbar() {
            this.mapViewState.toggleToolbar();
        };

        AppHeader.prototype.overheadView = function overheadView() {
            this.mapViewState.setViewMode('overhead');
        };

        AppHeader.prototype.fieldView = function fieldView() {
            this.mapViewState.setViewMode('field');
        };

        AppHeader.prototype.chaseView = function chaseView() {
            this.mapViewState.setViewMode('chase');
        };

        AppHeader.prototype.getRoute = function getRoute() {
            return this.router.currentInstruction.config.name;
        };

        AppHeader.prototype.attached = function attached() {
            var appUrl = this.appConfig.get('Web.AppUrl');
            var protocol = window.location.protocol;
            var hostname = window.location.hostname;
            var port = window.location.port;
            var actualUrl = protocol + '//' + hostname + ':' + port;
            if (actualUrl !== appUrl) {
                window.location.assign(appUrl);
            }
        };

        return AppHeader;
    }()) || _class);
});
define('text!components/shared/app-header.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"components/shared/toolbar\"></require>\n        <button type=\"button\" class=\"navbar-toggle collapsed\" data-toggle=\"collapse\" data-target=\"#px-navbar-collapse\" aria-expanded=\"false\">\n            <i class=\"navbar-toggle-icon\"></i>\n        </button>\n        <div style=\"min-height: 50px; padding-top:5px;\" class=\"navbar-header\">\n            <a class=\"mr-1\" route-href=\"route: dashboard\" style=\"padding-top:5px;\">\n                <img height=\"35em\" width=\"auto\" src=\"../assets/CapstanLogo.png\" alt=\"CapstanAG\"/>\n            </a>\n        </div>\n   \n        <div if.bind=\"getRoute() === 'dashboard'\" class=\"navbar-collapse collapse\" id=\"px-navbar-collapse\" aria-expanded=\"false\">\n            <ui class=\"nav navbar-nav\">\n                <li style=\"padding-top: 10px\">\n                    <button class=\"btn btn-primary ion-arrow-down-a\" type=\"button\" click.delegate=\"toggleToolbar()\">\n                        Toolbar\n                    </button>\n\n                </li>\n                <li style=\"padding-top: 10px\">\n                    <button class=\"btn btn-primary ion-eye\" type=\"button\" click.delegate=\"chaseView()\">\n                        Chase\n                    </button>\n                </li>\n                <li style=\"padding-top: 10px\">\n                    <button class=\"btn btn-primary ion-eye\" type=\"button\" click.delegate=\"overheadView()\">\n                        Overhead\n                    </button>\n\n\n                </li>\n                <li style=\"padding-top: 10px\">\n                    <button class=\"btn btn-warning ion-eye\" type=\"button\" click.delegate=\"fieldView()\">\n                        DEBUG\n                    </button>\n                </li>\n            </ui>\n\n        </div>\n</template>\n"; });
var cov_gbyfeyehb = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/app-footer.js',
        hash = '1c24bef3688863584451bb83aad3724f31458782',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/shared/app-footer.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/shared/app-footer',['exports', 'aurelia-framework', '../../services/updates-service'], function (exports, _aureliaFramework, _updatesService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.AppFooter = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var AppFooter = exports.AppFooter = (_dec = (0, _aureliaFramework.inject)(_updatesService.UpdatesService), _dec(_class = function () {
        function AppFooter(updatesService) {
            _classCallCheck(this, AppFooter);

            this.updatesService = updatesService;
        }

        AppFooter.prototype.attached = function attached() {
            var _this = this;

            this.updatesService.getCurrentVersion().then(function (version) {
                _this.currentVersion = version;
            });
        };

        return AppFooter;
    }()) || _class);
});
define('text!components/shared/app-footer.html', ['module'], function(module) { module.exports = "<template>\n    <div class=\"px-footer px-footer-bottom app-footer\">&copy; 2018 - ${\"CapstanAg\" | t} - [${currentVersion}]</div>\n</template>\n"; });
var cov_1kjjqjgt57 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/graphtab/pressure-chart.js',
        hash = '8024981c9af6cb9e7cca4001e94003fa50c51c95',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/graphtab/pressure-chart.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/graphtab/pressure-chart',['exports', 'aurelia-framework', './graphtab', './canvas-element-service', '../../services/gateway-service'], function (exports, _aureliaFramework, _graphtab, _canvasElementService, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PressureChart = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _dec3, _class, _desc, _value, _class2, _descriptor;

    var PressureChart = exports.PressureChart = (_dec = (0, _aureliaFramework.inject)(_canvasElementService.CanvasElementService, _gatewayService.GatewayService), _dec2 = (0, _aureliaFramework.singleton)(), _dec3 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec(_class = _dec2(_class = (_class2 = function (_ref) {
        _inherits(PressureChart, _ref);

        function PressureChart(canvasElementService, gatewayService) {
            _classCallCheck(this, PressureChart);

            var data = {
                labels: [],
                datasets: [{
                    data: [],
                    borderWidth: 0,
                    hoverBackgroundColor: 'rgba(93, 198, 98, 1)',
                    borderColor: 'rgba(217,217,217, 80)'
                }]
            };

            var _this = _possibleConstructorReturn(this, _ref.call(this, gatewayService, data, false, 1));

            _initDefineProp(_this, 'state', _descriptor, _this);

            _this.subscribeProperties = ['BoomAAPressure'];

            _this.gatewayService = gatewayService;
            _this.canvasElementService = canvasElementService;
            _this.canvasElement = _this.canvasElementService.getCanvas('pressure-chart');
            _this.ctx = _this.canvasElementService.get2DContext('pressure-chart');
            return _this;
        }

        PressureChart.prototype.activate = function activate(model) {
            this.state = model.state;
        };

        PressureChart.prototype.attached = function attached() {
            var _this2 = this;

            _ref.prototype.attached.call(this);
            this.gatewayService.subscribe(this.subscribeProperties, 'pressure-chart');
            this.setDataLabels();
            this.subscriptions.push(this.bindingEngine.propertyObserver(this.state, 'boomAAPressure').subscribe(function () {
                _this2.updateChart();
            }));
        };

        PressureChart.prototype.detached = function detached() {
            this.gatewayService.unsubscribe(this.subscribeProperties, 'pressure-chart');
        };

        PressureChart.prototype.getChartData = function getChartData() {
            var _this3 = this;

            var nozzlesAsBoom = [];

            var _loop = function _loop(j) {
                _this3.state.nozzleBoomCh.forEach(function (n) {
                    if (n === j) {
                        nozzlesAsBoom.push(_this3.state.boomAAPressure[j] / _this3.state.pSensor1MaxPressure * 100);
                    }
                });
            };

            for (var j = 0; j <= this.boomCount; j++) {
                _loop(j);
            }
            return nozzlesAsBoom;
        };

        PressureChart.prototype.setDataLabels = function setDataLabels() {
            var boomLabelArray = [];
            for (var i = 0; i < this.state.nozzleMax; i++) {
                boomLabelArray.push('ch' + this.state.nozzleBoomCh[i]);
            }
            this._activeChart.config.data.labels = boomLabelArray;
        };

        PressureChart.prototype.updateChart = function updateChart() {
            var _this4 = this;

            this._activeChart.data.datasets.forEach(function (dataset) {
                dataset.data = _this4.getChartData();
                dataset.backgroundColor = _this4.getChartBackgroundColors();
            });

            this.refreshChart();
        };

        PressureChart.prototype.getChartBackgroundColors = function getChartBackgroundColors() {
            var _this5 = this;

            var nozzleColors = [];

            var _loop2 = function _loop2(j) {
                var color = 'rgb(64, 181, 59)';
                var firstNozzleOnBoom = _this5.state.nozzleBoomCh.findIndex(function (n) {
                    return n === j;
                });
                var lastNozzleOnBoom = j + 1 <= _this5.boomCount ? _this5.state.nozzleBoomCh.findIndex(function (n) {
                    return n === j + 1;
                }) : _this5.state.nozzleMax;
                if (_this5.state.nozzleErrorCode.slice(firstNozzleOnBoom, lastNozzleOnBoom).some(function (n) {
                    return _this5.isFlowError(n);
                })) {
                    color = 'rgb(235,237,28)';
                }
                if (_this5.state.nozzleErrorCode.slice(firstNozzleOnBoom, lastNozzleOnBoom).some(function (n) {
                    return _this5.isElectricalError(n);
                })) {
                    color = 'rgb(238,29,35)';
                }
                _this5.state.nozzleBoomCh.forEach(function (n) {
                    if (n === j) {
                        nozzleColors.push(color);
                    }
                });
            };

            for (var j = 0; j <= this.boomCount; j++) {
                _loop2(j);
            }

            return nozzleColors;
        };

        return PressureChart;
    }((_graphtab.SprayNozzleGraph)), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'state', [_dec3], {
        enumerable: true,
        initializer: null
    })), _class2)) || _class) || _class);
});
define('text!components/graphtab/pressure-chart.html', ['module'], function(module) { module.exports = "<template>\n    <div class=\"dashboard-graph-element\" ref=\"container\"></div>\n</template>\n"; });
var cov_4psbhrfxj = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/graphtab/nozzle-info.js',
        hash = '39b4b7bdf055309fbdc19b22e83dc103021390b5',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/graphtab/nozzle-info.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/graphtab/nozzle-info',['exports', 'aurelia-framework', 'aurelia-i18n', '../../components/graphtab/boom-section-graph', '../../components/graphtab/pressure-chart', '../../components/graphtab/duty-chart', '../../components/graphtab/flow-chart', 'aurelia-event-aggregator', './canvas-element-service', '../../services/gateway-service'], function (exports, _aureliaFramework, _aureliaI18n, _boomSectionGraph, _pressureChart, _dutyChart, _flowChart, _aureliaEventAggregator, _canvasElementService, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.NozzleInfoCustomElement = undefined;

    var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
        return typeof obj;
    } : function (obj) {
        return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
    };

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _dec3, _class, _desc, _value, _class2, _descriptor, _descriptor2;

    var NozzleInfoCustomElement = exports.NozzleInfoCustomElement = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.BindingEngine, _aureliaI18n.I18N, _aureliaEventAggregator.EventAggregator, _canvasElementService.CanvasElementService, _pressureChart.PressureChart, _dutyChart.DutyChart, _flowChart.FlowChart, _gatewayService.GatewayService), _dec2 = (0, _aureliaFramework.singleton)(false), _dec3 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec(_class = _dec2(_class = (_class2 = function () {
        function NozzleInfoCustomElement(bindingEngine, i18n, eventAggregator, canvasElementService, pressureChart, dutyChart, flowChart, gatewayService) {
            _classCallCheck(this, NozzleInfoCustomElement);

            this.selectedNozzle = {};
            this.currentErrorIndex = 0;
            this.nozzleErrors = [];
            this.flowErrorCodes = [1, 2, 3, 4, 5, 9, 11, 12];
            this.electricalErrorCodes = [2, 3, 4];
            this.subscribeProperties = ['NozzleErrorCode', 'boomAAPressure'];
            this.activeChartIndex = 0;
            this.subscriptions = [];

            _initDefineProp(this, 'state', _descriptor, this);

            _initDefineProp(this, 'chartOption', _descriptor2, this);

            this.gatewayService = gatewayService;
            this.bindingEngine = bindingEngine;
            this.i18n = i18n;
            this.ea = eventAggregator;

            this.canvasElementService = canvasElementService;
            this.boomCanvas = this.canvasElementService.getCanvas('boom-chart');
            this.boomCanvas.setAttribute('width', 400);
            this.boomCanvas.setAttribute('height', 10);
            this.boomCtx = this.canvasElementService.get2DContext('boom-chart');

            this.charts = [dutyChart, pressureChart, flowChart];
        }

        NozzleInfoCustomElement.prototype.attached = function attached() {
            var _this = this;

            this.carousel = $('#graph-tab');
            this.gatewayService.subscribe(this.subscribeProperties, 'nozzle-info');
            this.subscriptions.push(this.ea.subscribe('nozzleSelected', function (response) {
                _this.selectedIndex = response.index;
            }));

            this.carousel.owlCarousel({
                items: 1,
                margin: 20,
                mouseDrag: true,
                touchDrag: true,

                dotsContainer: '#owl-dots',
                rtl: $('html').attr('dir') === 'rtl'
            });

            this.carousel.on('changed.owl.carousel', function (event) {
                _this.activeChartIndex = event.item.index;

                if (_this.activeChartIndex !== 1 && typeof _this.selectedIndex !== 'undefined') {
                    _this.charts[_this.activeChartIndex].openTip(0, _this.selectedIndex);
                }
            });

            this.subscriptions.push(this.bindingEngine.propertyObserver(this.state, 'nozzleErrorCode').subscribe(function () {
                _this.updateCharts();
            }));

            this.subscriptions.push(this.bindingEngine.propertyObserver(this.state, 'boomAAPressure').subscribe(function () {
                _this.updateCharts();
            }));

            this.selectedNozzle = this.charts[this.activeChartIndex].getSelectedNozzle();

            var boomSectionData = {
                labels: [],
                datasets: []
            };

            this.boomChart = new _boomSectionGraph.BoomSectionGraph(this.boomCtx, boomSectionData);

            this.errorInterval = setInterval(function () {
                return _this.cycleErrors();
            }, 5000);
        };

        NozzleInfoCustomElement.prototype.detached = function detached() {
            this.gatewayService.unsubscribe(this.subscribeProperties, 'nozzle-info');
            this.subscriptions.forEach(function (subscription) {
                subscription.dispose();
            });
            clearInterval(this.errorInterval);
            clearTimeout(this.errorTimeout);
        };

        NozzleInfoCustomElement.prototype.backError = function backError() {
            this.currentErrorIndex = this.currentErrorIndex === 0 ? this.nozzleErrors.length - 1 : this.currentErrorIndex - 1;
            clearInterval(this.errorInterval);
            clearTimeout(this.errorTimeout);
            this.restartErrorInterval(this);
        };

        NozzleInfoCustomElement.prototype.nextError = function nextError() {
            clearInterval(this.errorInterval);
            clearTimeout(this.errorTimeout);
            this.cycleErrors(this);
            this.restartErrorInterval(this);
        };

        NozzleInfoCustomElement.prototype.cycleErrors = function cycleErrors() {
            var _this2 = this;

            this.currentErrorIndex = this.currentErrorIndex < this.nozzleErrors.length - 1 ? this.currentErrorIndex + 1 : 0;
            if (this.nozzleErrors.some(function (e) {
                return e.index === _this2.selectedNozzle;
            })) {
                $.extend(this.selectedNozzle, this.nozzleErrors[this.currentErrorIndex]);
            } else {
                clearInterval(this.errorInterval);
                clearTimeout(this.errorTimeout);
                this.errorTimeout = setTimeout(function () {
                    return _this2.restartErrorInterval(_this2);
                }, 5000);
            }
            if (this.activeChartIndex !== 1 && typeof this.selectedNozzle.index !== 'undefined') {
                this.charts[this.activeChartIndex].openTip(0, this.selectedNozzle.index);
            }
        };

        NozzleInfoCustomElement.prototype.updateCharts = function updateCharts() {
            this.nozzleErrors = [];
            for (var i = 0; i < this.state.nozzleMax; i++) {
                if (this.state.nozzleErrorCode[i] !== 15) {
                    this.nozzleErrors.push({ index: i });
                }
            }

            this.boomChart.options.scales.xAxes[0].ticks.max = this.state.nozzleMax;
            var newBoomSectionData = this.getBoomSectionData();
            if (this.boomChart.data.datasets !== newBoomSectionData) {
                this.boomChart.data.datasets = newBoomSectionData;
                this.boomChart.update();
            }
        };

        NozzleInfoCustomElement.prototype.getChartLabel = function getChartLabel() {
            if (this.chartOption === 'psi') {
                return 'Pressure';
            }
            if (this.chartOption === 'duty') {
                return 'Duty Cycle';
            }
            if (this.chartOption === 'flow') {
                return 'Flow Rate';
            }
        };

        NozzleInfoCustomElement.prototype.getChartBackgroundColors = function getChartBackgroundColors() {
            var _this3 = this;

            if (this.chartOption === 'psi') {
                var _ret = function () {
                    var nozzleColors = [];

                    var _loop = function _loop(j) {
                        var color = 'rgb(64, 181, 59)';
                        var firstNozzleOnBoom = _this3.state.nozzleBoomCh.findIndex(function (n) {
                            return n === j;
                        });
                        var lastNozzleOnBoom = j + 1 <= _this3.boomCount ? _this3.state.nozzleBoomCh.findIndex(function (n) {
                            return n === j + 1;
                        }) : _this3.state.nozzleMax;
                        if (_this3.state.nozzleErrorCode.slice(firstNozzleOnBoom, lastNozzleOnBoom).some(function (n) {
                            return _this3.isFlowError(n);
                        })) {
                            color = 'rgb(235,237,28)';
                        }
                        if (_this3.state.nozzleErrorCode.slice(firstNozzleOnBoom, lastNozzleOnBoom).some(function (n) {
                            return _this3.isElectricalError(n);
                        })) {
                            color = 'rgb(238,29,35)';
                        }
                        _this3.state.nozzleBoomCh.forEach(function (n) {
                            if (n === j) {
                                nozzleColors.push(color);
                            }
                        });
                    };

                    for (var j = 0; j <= _this3.boomCount; j++) {
                        _loop(j);
                    }

                    return {
                        v: nozzleColors
                    };
                }();

                if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
            }

            return this.state.nozzleErrorCode.map(function (n) {
                if (_this3.electricalErrorCodes.some(function (e) {
                    return e === n;
                })) {
                    return 'rgb(238,29,35)';
                }
                if (_this3.flowErrorCodes.some(function (e) {
                    return e === n;
                })) {
                    return 'rgb(235,237,28)';
                }
                return 'rgb(63, 140, 211)';
            });
        };

        NozzleInfoCustomElement.prototype.getBoomSectionData = function getBoomSectionData() {
            var _this4 = this;

            this.boomCount = this.state.nozzleBoomCh[this.state.nozzleMax - 1];
            var boomSections = [];

            var _loop2 = function _loop2(j) {
                var color = 'rgb(64, 181, 59)';

                var firstNozzleOnBoom = _this4.state.nozzleBoomCh.findIndex(function (n) {
                    return n === j;
                });
                var lastNozzleOnBoom = j + 1 <= _this4.boomCount ? _this4.state.nozzleBoomCh.findIndex(function (n) {
                    return n === j + 1;
                }) : _this4.state.nozzleMax;
                if (_this4.state.nozzleErrorCode.slice(firstNozzleOnBoom, lastNozzleOnBoom).some(function (n) {
                    return _this4.isFlowError(n);
                })) {
                    color = 'rgb(235,237,28)';
                }
                if (_this4.state.nozzleErrorCode.slice(firstNozzleOnBoom, lastNozzleOnBoom).some(function (n) {
                    return _this4.isElectricalError(n);
                })) {
                    color = 'rgb(238,29,35)';
                }

                if (_this4.state.nozzleAADutyCycle.slice(firstNozzleOnBoom, lastNozzleOnBoom).every(function (n) {
                    return n === 0;
                })) {
                    color = 'rgb(68,68,68)';
                }
                boomSections.push({
                    label: '',
                    data: [lastNozzleOnBoom],
                    borderWidth: 2,
                    backgroundColor: color,
                    borderColor: 'rgb(217,217,217)'
                });
            };

            for (var j = 0; j <= this.boomCount; j++) {
                _loop2(j);
            }
            return boomSections;
        };

        NozzleInfoCustomElement.prototype.restartErrorInterval = function restartErrorInterval() {
            var _this5 = this;

            $.extend(this.selectedNozzle, this.nozzleErrors[this.currentErrorIndex]);
            this.errorInterval = setInterval(function () {
                return _this5.cycleErrors(_this5);
            }, 5000);
        };

        NozzleInfoCustomElement.prototype.isFlowError = function isFlowError(code) {
            return this.flowErrorCodes.some(function (e) {
                return e === code;
            });
        };

        NozzleInfoCustomElement.prototype.isElectricalError = function isElectricalError(code) {
            return this.electricalErrorCodes.some(function (e) {
                return e === code;
            });
        };

        return NozzleInfoCustomElement;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'state', [_dec3], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'chartOption', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: function initializer() {
            return '';
        }
    })), _class2)) || _class) || _class);
});
define('text!components/graphtab/nozzle-info.html', ['module'], function(module) { module.exports = "<template view-cache=\"1\">\n    <require from=\"resources/value-converters/dutyCycle\"></require>\n    <require from=\"resources/value-converters/mlPerHectareToGpa\"></require>\n\n    <div class=\"container-fluid nozzle-container\">\n        <div id=\"graph-tab\" style=\"display: inline-block;\" class=\"graph-element-container owl-carousel row\" ref=\"chartCarousel\">\n            <compose view-model=\"components/graphtab/duty-chart\" model.bind=\"{state: state}\"> </compose>\n            <!--<compose view-model=\"components/graphtab/pressure-chart\" model.bind=\"{state: state}\"> </compose>-->\n            <!--<compose view-model=\"components/graphtab/flow-chart\" view=\"components/graphtab/chart-element.html\" model.bind=\"state\"> </compose>-->\n        </div>\n        <div id=\"owl-dots\" class=\"owl-dots lower-owl-dots\" style=\"margin-top:0\"></div>\n        <div class=\"row\">\n            <button class=\"btn btn-primary pull-left spray-nozzle-button\" click.trigger=\"backError()\"><i class=\"ion-ios-arrow-back\"></i></button>\n            <button class=\"btn btn-primary pull-right spray-nozzle-button\" click.trigger=\"nextError()\"><i class=\"ion-ios-arrow-forward\"></i></button>\n            <div class=\"bg-primary\" id=\"error-info\">\n                <span class=\"col-sm-2 spray-nozzle-info\"> ${\"Valve\" | t}: <span class=\"spray-nozzle-text\">${selectedNozzle.index}</span> </span>\n                <span class=\"col-sm-2 spray-nozzle-info\"> ${\"DC\" | t}: <span class=\"spray-nozzle-text\">${state.nozzleAADutyCycle[selectedNozzle.index] | dutyCycle}%</span> </span>\n                <span class=\"col-sm-2 spray-nozzle-info\"> ${\"Flow\" | t}: <span class=\"spray-nozzle-text\">${state.nozzleAAFlowRate[selectedNozzle.index] | mlPerHectareToGpa}</span> </span>\n                <span class=\"col-sm-2 spray-nozzle-info\"> ${\"Plunger\" | t}: <span i18n=\"nozzleErrorCodes.${state.nozzleErrorCode[selectedNozzle.index]}\" class=\"${isFlowError(state.nozzleErrorCode[selectedNozzle.index]) ? 'spray-nozzle-error' : 'spray-nozzle-text'}\">${state.nozzleErrorCode[selectedNozzle.index]}</span> </span>\n                <span class=\"col-sm-2 spray-nozzle-info\"> ${\"Coil\" | t}: <span i18n=\"coilErrorCodes.${state.nozzleErrorCode[selectedNozzle.index]}\" class=\"${isElectricalError(state.nozzleErrorCode[selectedNozzle.index]) ? 'spray-nozzle-error' : 'spray-nozzle-text'}\">${state.nozzleErrorCode[selectedNozzle.index]}</span> </span>\n            </div>\n        </div>\n    </div>\n</template>\n"; });
var cov_25cw3vpzw4 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/graphtab/graphtab.js',
        hash = '134fc4589432f93fc558a5fae0a11f74ab334293',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/graphtab/graphtab.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/graphtab/graphtab',['exports', 'aurelia-framework', 'px-chart', 'aurelia-event-aggregator'], function (exports, _aureliaFramework, _pxChart, _aureliaEventAggregator) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SprayNozzleGraph = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    var _dec, _desc, _value, _class;

    var SprayNozzleGraph = exports.SprayNozzleGraph = (_dec = (0, _aureliaFramework.computedFrom)('state.nozzleBoomCh, state.nozzleMax'), (_class = function () {
        function SprayNozzleGraph(gatewayService, data) {
            var tooltipEnabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
            var barPercent = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0.95;

            var _this = this;

            var max = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 100;
            var stepSize = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 25;

            _classCallCheck(this, SprayNozzleGraph);

            this.isActiveChart = false;
            this.flowErrorCodes = [0, 1, 5, 9, 11, 12];
            this.electricalErrorCodes = [2, 3, 4];
            this.subscriptions = [];
            this.selectedNozzle = {};

            this.gatewayService = gatewayService;
            this.bindingEngine = _aureliaFramework.Container.instance.get(_aureliaFramework.BindingEngine);
            this.ea = _aureliaFramework.Container.instance.get(_aureliaEventAggregator.EventAggregator);

            this._chartData = {
                type: 'bar',
                data: data,
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    animation: {
                        duration: 5
                    },
                    layout: {
                        padding: {
                            left: 0,
                            right: 3,
                            top: 0,
                            bottom: 0
                        }
                    },
                    tooltips: {
                        enabled: tooltipEnabled,
                        intersect: false,
                        mode: 'index',
                        callbacks: {
                            afterFooter: function afterFooter(tooltipItem) {
                                if (tooltipItem.length > 0 && tooltipItem[0].index >= 0) {
                                    var index = tooltipItem[0].index;
                                    _this.ea.publish('nozzleSelected', { index: index });
                                    $.extend(_this.selectedNozzle, {
                                        index: index
                                    });
                                }
                            }
                        }
                    },
                    events: ['click', 'touchstart', 'touchmove', 'touchend'],
                    legend: {
                        display: false
                    },
                    scales: {
                        xAxes: [{
                            display: false,
                            categoryPercentage: 1.0,
                            barPercentage: barPercent,
                            gridLines: {
                                display: false
                            }
                        }],
                        yAxes: [{
                            ticks: {
                                beginAtZero: true,
                                max: max,
                                stepSize: stepSize
                            },
                            gridLines: {
                                display: true
                            }
                        }]
                    }
                }
            };
        }

        SprayNozzleGraph.prototype.openTip = function openTip(datasetIndex, pointIndex) {
            this._activeChart.tooltip._active = [];
            var activeElements = this._activeChart.tooltip._active;
            var requestedElem = this._activeChart.getDatasetMeta(datasetIndex).data[pointIndex];
            for (var i = 0; i < activeElements.length; i++) {
                if (requestedElem._index === activeElements[i]._index) {
                    return;
                }
            }
            activeElements.push(requestedElem);
            this._activeChart.tooltip._active = activeElements;
            this._activeChart.tooltip.update(true);
            this._activeChart.draw();
        };

        SprayNozzleGraph.prototype.attached = function attached() {
            var _this2 = this;

            this.container.appendChild(this.canvasElement);
            this._isSetup = true;
            this.createChart();

            this.gatewayService.subscribe(['NozzleMax'], 'graphtab');
            this.subscriptions.push(this.bindingEngine.propertyObserver(this.state, 'nozzleMax').subscribe(function () {
                _this2.setDataLabels();
                _this2.refreshChart();
            }));
        };

        SprayNozzleGraph.prototype.detached = function detached() {
            this.gatewayService.unsubscribe(['NozzleMax'], 'graphtab');
            this.subscriptions.forEach(function (subscription) {
                subscription.dispose();
            });
            this.subscriptions = [];
            this._activeChart.destroy();
            this._isSetup = false;
        };

        SprayNozzleGraph.prototype.createChart = function createChart() {
            this._activeChart = new _pxChart.Chart(this.ctx, this._chartData);
            this.refreshChart();
        };

        SprayNozzleGraph.prototype.refreshChart = function refreshChart() {
            if (this._isSetup) {
                this._activeChart.update();
                this._activeChart.resize();
            }
        };

        SprayNozzleGraph.prototype.isFlowError = function isFlowError(code) {
            return this.flowErrorCodes.some(function (e) {
                return e === code;
            });
        };

        SprayNozzleGraph.prototype.isElectricalError = function isElectricalError(code) {
            return this.electricalErrorCodes.some(function (e) {
                return e === code;
            });
        };

        SprayNozzleGraph.prototype.getSelectedNozzle = function getSelectedNozzle() {
            return this.selectedNozzle;
        };

        SprayNozzleGraph.prototype.setSelectedNozzle = function setSelectedNozzle(nozzle) {
            this.selectedNozzle = nozzle;
        };

        _createClass(SprayNozzleGraph, [{
            key: 'boomCount',
            get: function get() {
                return this.state.nozzleBoomCh[this.state.nozzleMax - 1];
            }
        }]);

        return SprayNozzleGraph;
    }(), (_applyDecoratedDescriptor(_class.prototype, 'boomCount', [_dec], Object.getOwnPropertyDescriptor(_class.prototype, 'boomCount'), _class.prototype)), _class));
});
var cov_1vsvc115n9 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/graphtab/flow-chart.js',
        hash = '4a00fc25a6e11386f9ca5263d056938ecdbfcbe3',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/graphtab/flow-chart.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/graphtab/flow-chart',['exports', 'aurelia-framework', './graphtab', './canvas-element-service', '../../resources/value-converters/mlPerHectareToGpa', '../../services/gateway-service'], function (exports, _aureliaFramework, _graphtab, _canvasElementService, _mlPerHectareToGpa, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.FlowChart = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _class, _desc, _value, _class2, _descriptor;

    var FlowChart = exports.FlowChart = (_dec = (0, _aureliaFramework.inject)(_mlPerHectareToGpa.MlPerHectareToGpaValueConverter, _canvasElementService.CanvasElementService, _gatewayService.GatewayService), _dec2 = (0, _aureliaFramework.singleton)(), _dec(_class = _dec2(_class = (_class2 = function (_ref) {
        _inherits(FlowChart, _ref);

        function FlowChart(mlPerHectareToGpaValueConverter, canvasElementService, gatewayService) {
            _classCallCheck(this, FlowChart);

            var data = {
                labels: [],
                datasets: [{
                    data: ['8', '9', '77'],
                    borderWidth: 0,
                    hoverBackgroundColor: 'rgba(93, 198, 98, 1)',
                    borderColor: 'rgba(217,217,217, 80)'
                }]
            };

            var _this = _possibleConstructorReturn(this, _ref.call(this, gatewayService, data, true, 0.95, 10, 2));

            _initDefineProp(_this, 'state', _descriptor, _this);

            _this.electricalErrorCodes = [2, 3, 4];
            _this.flowErrorCodes = [0, 1, 5, 9, 11, 12];
            _this.subscribeProperties = ['NozzleAAFlowRate'];

            _this.gatewayService = gatewayService;
            _this.mlPerHectareToGpaValueConverter = mlPerHectareToGpaValueConverter;
            _this.canvasElementService = canvasElementService;
            _this.canvasElement = _this.canvasElementService.getCanvas('flow-chart');
            _this.ctx = _this.canvasElementService.get2DContext('flow-chart');
            return _this;
        }

        FlowChart.prototype.activate = function activate(state) {
            this.state = state;
        };

        FlowChart.prototype.attached = function attached() {
            var _this2 = this;

            _ref.prototype.attached.call(this);
            this.setDataLabels();
            this.gatewayService.subscribe(this.subscribeProperties, 'flow-chart');
            this.subscriptions.push(this.bindingEngine.propertyObserver(this.state, 'nozzleAAFlowRate').subscribe(function () {
                _this2._activeChart.data.datasets.forEach(function (dataset) {
                    dataset.data = _this2.getChartData();
                    dataset.backgroundColor = _this2.getChartBackgroundColors();
                });
                _this2.refreshChart();
            }));
        };

        FlowChart.prototype.detached = function detached() {
            this.gatewayService.unsubscribe(this.subscribeProperties, 'flow-chart');
        };

        FlowChart.prototype.setDataLabels = function setDataLabels() {
            var sprayNozzleLabelArray = [];
            for (var i = 0; i < this.state.nozzleMax; i++) {
                sprayNozzleLabelArray.push('sp' + i);
            }
            this._activeChart.config.data.labels = sprayNozzleLabelArray;
        };

        FlowChart.prototype.getChartData = function getChartData() {
            var _this3 = this;

            return this.state.nozzleAAFlowRate.map(function (n) {
                return _this3.mlPerHectareToGpaValueConverter.toView(n);
            });
        };

        FlowChart.prototype.getChartBackgroundColors = function getChartBackgroundColors() {
            var _this4 = this;

            return this.state.nozzleErrorCode.map(function (n) {
                if (_this4.electricalErrorCodes.some(function (e) {
                    return e === n;
                })) {
                    return 'rgb(238,29,35)';
                }
                if (_this4.flowErrorCodes.some(function (e) {
                    return e === n;
                })) {
                    return 'rgb(235,237,28)';
                }
                return 'rgb(63, 140, 211)';
            });
        };

        return FlowChart;
    }((_graphtab.SprayNozzleGraph)), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'state', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class2)) || _class) || _class);
});
define('text!components/graphtab/flow-chart.html', ['module'], function(module) { module.exports = "<template>\n    <div class=\"dashboard-graph-element\" ref=\"container\"></div>\n</template>\n"; });
var cov_1mvztycjvp = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/graphtab/duty-chart.js',
        hash = '5e94d85075ecd0ed32457ac4fd791415b3ad158c',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/graphtab/duty-chart.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/graphtab/duty-chart',['exports', 'aurelia-framework', './graphtab', '../../resources/value-converters/dutyCycle', './canvas-element-service', '../../services/gateway-service'], function (exports, _aureliaFramework, _graphtab, _dutyCycle, _canvasElementService, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.DutyChart = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _class, _desc, _value, _class2, _descriptor;

    var DutyChart = exports.DutyChart = (_dec = (0, _aureliaFramework.inject)(_dutyCycle.DutyCycleValueConverter, _canvasElementService.CanvasElementService, _gatewayService.GatewayService), _dec2 = (0, _aureliaFramework.singleton)(), _dec(_class = _dec2(_class = (_class2 = function (_ref) {
        _inherits(DutyChart, _ref);

        function DutyChart(dutyCycleValueConverter, canvasElementService, gatewayService) {
            _classCallCheck(this, DutyChart);

            var data = {
                labels: [],
                datasets: [{
                    data: [],
                    borderWidth: 0,
                    hoverBackgroundColor: 'rgba(93, 198, 98, 1)',
                    borderColor: 'rgba(217,217,217, 80)'
                }]
            };

            var _this = _possibleConstructorReturn(this, _ref.call(this, gatewayService, data));

            _initDefineProp(_this, 'state', _descriptor, _this);

            _this.electricalErrorCodes = [2, 3, 4];
            _this.flowErrorCodes = [1, 5, 9, 11, 12];
            _this.subscribeProperties = ['NozzleAADutyCycle', 'NozzleErrorCode'];

            _this.gatewayService = gatewayService;
            _this.dutyCycleValueConverter = dutyCycleValueConverter;
            _this.canvasElementService = canvasElementService;
            _this.canvasElement = _this.canvasElementService.getCanvas('duty-chart');
            _this.ctx = _this.canvasElementService.get2DContext('duty-chart');
            return _this;
        }

        DutyChart.prototype.activate = function activate(model) {
            this.state = model.state;
        };

        DutyChart.prototype.attached = function attached() {
            var _this2 = this;

            _ref.prototype.attached.call(this);
            this.setDataLabels();
            this.gatewayService.subscribe(this.subscribeProperties, 'duty-chart');
            this.subscriptions.push(this.bindingEngine.propertyObserver(this.state, 'nozzleAADutyCycle').subscribe(function () {
                _this2._activeChart.data.datasets.forEach(function (dataset) {
                    dataset.data = _this2.getChartData();
                    dataset.backgroundColor = _this2.getChartBackgroundColors();
                });
                _this2.refreshChart();
            }));

            this.subscriptions.push(this.bindingEngine.propertyObserver(this.state, 'nozzleErrorCode').subscribe(function () {
                _this2._activeChart.data.datasets.forEach(function (dataset) {
                    dataset.data = _this2.getChartData();
                    dataset.backgroundColor = _this2.getChartBackgroundColors();
                });
                _this2.refreshChart();
            }));
        };

        DutyChart.prototype.detached = function detached() {
            this.gatewayService.unsubscribe(this.subscribeProperties, 'duty-chart');
        };

        DutyChart.prototype.setDataLabels = function setDataLabels() {
            var sprayNozzleLabelArray = [];
            for (var i = 0; i < this.state.nozzleMax; i++) {
                sprayNozzleLabelArray.push('sp' + (i + 1));
            }
            this._activeChart.config.data.labels = sprayNozzleLabelArray;
        };

        DutyChart.prototype.getChartData = function getChartData() {
            var _this3 = this;

            return this.state.nozzleAADutyCycle.map(function (n) {
                return _this3.dutyCycleValueConverter.toView(n);
            });
        };

        DutyChart.prototype.getChartBackgroundColors = function getChartBackgroundColors() {
            var _this4 = this;

            return this.state.nozzleErrorCode.map(function (n) {
                if (_this4.electricalErrorCodes.some(function (e) {
                    return e === n;
                })) {
                    return 'rgb(238,29,35)';
                }
                if (_this4.flowErrorCodes.some(function (e) {
                    return e === n;
                })) {
                    return 'rgb(235,237,28)';
                }
                return 'rgb(63, 140, 211)';
            });
        };

        return DutyChart;
    }((_graphtab.SprayNozzleGraph)), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'state', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    })), _class2)) || _class) || _class);
});
define('text!components/graphtab/duty-chart.html', ['module'], function(module) { module.exports = "<template>\n    <div class=\"dashboard-graph-element\" ref=\"container\" ></div>\n</template>\n"; });
define('text!components/graphtab/chart-element.html', ['module'], function(module) { module.exports = "<template>\n    <div class=\"dashboard-graph-element\" ref=\"container\"></div>\n</template>\n"; });
var cov_6rteuoef5 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/graphtab/canvas-element-service.js',
        hash = '73e1068b6899f7f61e63303c07a945e3217d6462',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/graphtab/canvas-element-service.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/graphtab/canvas-element-service',['exports'], function (exports) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var CanvasElementService = exports.CanvasElementService = function () {
        function CanvasElementService() {
            _classCallCheck(this, CanvasElementService);

            this.canvasRegistry = {};
        }

        CanvasElementService.prototype.getCanvas = function getCanvas(id) {
            if (this.canvasRegistry[id]) {
                return this.canvasRegistry[id].el;
            }
            var el = document.createElement('canvas');
            el.setAttribute('id', id);
            this.canvasRegistry[id] = {
                el: el,
                ctx: el.getContext('2d')
            };
            return el;
        };

        CanvasElementService.prototype.get2DContext = function get2DContext(id) {
            return this.canvasRegistry[id].ctx;
        };

        return CanvasElementService;
    }();
});
var cov_n6xa4m4xg = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/graphtab/boom-section-graph.js',
        hash = '7e3b0cc5341a6d5fc27ea75531823c983096d107',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/graphtab/boom-section-graph.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/graphtab/boom-section-graph',['exports', 'px-chart'], function (exports, _pxChart) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.BoomSectionGraph = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    function _possibleConstructorReturn(self, call) {
        if (!self) {
            throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        }

        return call && (typeof call === "object" || typeof call === "function") ? call : self;
    }

    function _inherits(subClass, superClass) {
        if (typeof superClass !== "function" && superClass !== null) {
            throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
        }

        subClass.prototype = Object.create(superClass && superClass.prototype, {
            constructor: {
                value: subClass,
                enumerable: false,
                writable: true,
                configurable: true
            }
        });
        if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }

    var BoomSectionGraph = exports.BoomSectionGraph = function (_ref) {
        _inherits(BoomSectionGraph, _ref);

        function BoomSectionGraph(ctx, data) {
            _classCallCheck(this, BoomSectionGraph);

            return _possibleConstructorReturn(this, _ref.call(this, ctx, {
                type: 'horizontalBar',
                data: data,
                options: {
                    animation: {
                        duration: 5
                    },
                    layout: {
                        padding: {
                            left: 37,
                            right: 0,
                            top: 0,
                            bottom: 0
                        }
                    },
                    tooltips: {
                        enabled: false
                    },
                    hover: {
                        mode: 'nearest'
                    },
                    events: ['click', 'touchstart', 'touchmove', 'touchend'],
                    legend: {
                        display: false
                    },
                    scales: {
                        xAxes: [{
                            stacked: false,
                            display: false,
                            gridLines: {
                                display: false
                            },
                            ticks: {
                                beginAtZero: true,
                                max: 0
                            }
                        }],
                        yAxes: [{
                            stacked: true,
                            display: false,
                            barPercentage: 0.6,
                            gridLines: {
                                display: false
                            }
                        }]
                    }
                }
            }));
        }

        return BoomSectionGraph;
    }((_pxChart.Chart));
});
var cov_855ygda6v = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/filetransfer/system-folder.js',
        hash = '22792cfb71d7698108edc43c5f91d4128d092a73',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/filetransfer/system-folder.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/filetransfer/system-folder',['exports', 'aurelia-framework', '../../services/file-service', 'dragster'], function (exports, _aureliaFramework, _fileService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SystemFolder = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _dec3, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;

    var SystemFolder = exports.SystemFolder = (_dec = (0, _aureliaFramework.inject)(_fileService.FileService, Element), _dec2 = (0, _aureliaFramework.computedFrom)('fileService.pathOfFolderUpdated'), _dec3 = (0, _aureliaFramework.computedFrom)('fileService.activeSystemFolder', 'fileService.activeUsbFolder'), _dec(_class = (_class2 = function () {
        function SystemFolder(fileService, element) {
            var _this = this;

            _classCallCheck(this, SystemFolder);

            _initDefineProp(this, 'parent', _descriptor, this);

            _initDefineProp(this, 'folder', _descriptor2, this);

            _initDefineProp(this, 'collapsed', _descriptor3, this);

            _initDefineProp(this, 'draggable', _descriptor4, this);

            _initDefineProp(this, 'unavailable', _descriptor5, this);

            _initDefineProp(this, 'selected', _descriptor6, this);

            this.fileService = fileService;
            this.element = element;

            this.dragsterEnter = function (event) {
                if (_this.folder.ghost || _this.unavailable) {
                    return;
                }
                if (_this.parent) {
                    _this.parent.removeGhosts();
                }
                _this.dragenter(event);
            };
            this.dragsterLeave = function (event) {
                if (_this.unavailable) {
                    return;
                }
                if (_this.parent) {
                    _this.parent.dragsterEnter(event);
                }
                _this.dragexit(event);
            };

            this.dragsterBootstrap = new Dragster(this.element);

            this.element.addEventListener('dragster:enter', this.dragsterEnter);
            this.element.addEventListener('dragster:leave', this.dragsterLeave);
        }

        SystemFolder.prototype.collapseFolder = function collapseFolder() {
            this.collapsed = !this.collapsed;
            if (!this.collapsed) {
                this.fileService.selectFolder(this.folder);
            } else {
                this.fileService.popFolder(this.folder);
            }
        };

        SystemFolder.prototype.addFolder = function addFolder(event) {
            var _this2 = this;

            var data = this.folder;
            this.fileService.transferFile(data.path, 'C:\\share\\files', data.device, 'system').then(function (response) {
                _this2.fileService.filesChanged = true;
            });
        };

        SystemFolder.prototype.dragStart = function dragStart(event) {
            event.dataTransfer.setData('data', JSON.stringify(this.folder));
            return this.draggable;
        };

        SystemFolder.prototype.dragover = function dragover(event) {
            event.preventDefault();
        };

        SystemFolder.prototype.removeGhosts = function removeGhosts() {
            this.deghostArray(this.folder.folders);
            this.deghostArray(this.folder.files);
        };

        SystemFolder.prototype.deghostArray = function deghostArray(array) {
            var i = array.length;
            while (i--) {
                if (array[i].ghost) {
                    array.splice(i, 1);
                }
            }
        };

        SystemFolder.prototype.itemExists = function itemExists(array, name) {
            var i = array.length;
            while (i--) {
                if (array[i].name === name) {
                    return true;
                }
            }
        };

        SystemFolder.prototype.pushGhost = function pushGhost(array, item) {
            item.ghost = true;
            array.push(item);
            array.sort(function (a, b) {
                return a.name > b.name;
            });
        };

        SystemFolder.prototype.dragenter = function dragenter(event) {
            if (!this.collapsed) {
                var data = JSON.parse(event.detail.dataTransfer.getData('data'));

                if (this.folder.device !== data.device) {
                    if (data.type === 'Folder') {
                        if (!this.itemExists(this.folder.folders, data.name)) {
                            this.pushGhost(this.folder.folders, data);
                        }
                    }
                    if (data.type === 'File') {
                        if (!this.itemExists(this.folder.files, data.name)) {
                            this.pushGhost(this.folder.files, data);
                        }
                    }
                }
            }
            event.stopPropagation();
        };

        SystemFolder.prototype.dragexit = function dragexit(event) {
            this.removeGhosts();
            event.stopPropagation();
        };

        SystemFolder.prototype.dragdropBody = function dragdropBody(event) {
            if (this.unavailable) {
                return;
            }

            this.processDrop(JSON.parse(event.dataTransfer.getData('data')));

            event.stopPropagation();
        };

        SystemFolder.prototype.dragdropHeading = function dragdropHeading(event) {
            if (this.unavailable) {
                return;
            }

            event.stopPropagation();
            if (this.folder.ghost) {
                this.parent.dragdropHeading(event);
            } else {
                this.collapsed = !this.processDrop(JSON.parse(event.dataTransfer.getData('data')));
            }
        };

        SystemFolder.prototype.processDrop = function processDrop(data) {
            var _this3 = this;

            if (data.device === this.folder.device) {
                return false;
            }
            if (data.type === 'File') {
                if (data.path.replace(data.name, '') === this.folder.path + '\\' || data.path.replace(data.name, '') === this.folder.path + '/') {
                    return false;
                }
                this.fileService.transferFile(data.path, this.folder.path, data.device, this.folder.device).then(function (response) {
                    _this3.folder = response;
                });
                return true;
            }

            if (data.type === 'Folder') {
                if (data.path === this.folder.path) {
                    return false;
                }
                this.fileService.transferFolder(data.path, this.folder.path, data.device, this.folder.device).then(function (response) {
                    _this3.folder = response;
                });
                return true;
            }

            return false;
        };

        SystemFolder.prototype.confirmDelete = function confirmDelete(event) {
            this.showConfirmDelete = true;
            event.stopPropagation();
        };

        SystemFolder.prototype.cancelDelete = function cancelDelete(event) {
            this.showConfirmDelete = false;
            event.stopPropagation();
        };

        SystemFolder.prototype.deleteFolder = function deleteFolder(event) {
            var _this4 = this;

            this.fileService.deleteFolder(this.folder).then(function (response) {
                if (response) {
                    var i = _this4.parent.folder.folders.length;
                    while (i--) {
                        if (_this4.parent.folder.folders[i].path === _this4.folder.path) {
                            _this4.parent.folder.folders.splice(i, 1);
                        }
                    }
                }
            });
            event.stopPropagation();
        };

        _createClass(SystemFolder, [{
            key: 'folderUpdate',
            get: function get() {
                if (this.folder) {
                    if (this.fileService.pathOfFolderUpdated === this.folder.path) {
                        this.folder = this.fileService.updatedFolder;
                        this.fileService.pathOfFolderUpdated = '';
                    }
                }
                return '';
            }
        }, {
            key: 'selectedFolder',
            get: function get() {
                if (this.folder) {
                    if (this.fileService.activeSystemFolder === this.folder.path || this.fileService.activeUsbFolder === this.folder.path) {
                        return 'selected-folder';
                    }
                }
                return 'panel-heading';
            }
        }]);

        return SystemFolder;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'parent', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'folder', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'collapsed', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'draggable', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, 'unavailable', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, 'selected', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _applyDecoratedDescriptor(_class2.prototype, 'folderUpdate', [_dec2], Object.getOwnPropertyDescriptor(_class2.prototype, 'folderUpdate'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'selectedFolder', [_dec3], Object.getOwnPropertyDescriptor(_class2.prototype, 'selectedFolder'), _class2.prototype)), _class2)) || _class);
});
define('text!components/filetransfer/system-folder.html', ['module'], function(module) { module.exports = "<template>\n    <require from=\"./system-file\"></require>\n    <div class=\"panel panel-info system-folder ${collapsed ? '' : ''} ${folder.ghost ? 'ghost' : ''}\" dragover.trigger=\"dragover($event)\" >\n        <div class=\"${selectedFolder} ${folderUpdate}\" click.trigger=\"collapseFolder()\" draggable=\"true\" dragstart.trigger=\"dragStart($event)\" drop.trigger=\"dragdropHeading($event)\">\n            <span class=\"${folder.name =='USB' || unavailable ? 'ion-usb' : folder.name =='System' ? 'ion-android-desktop' :  'ion-android-folder'} folder-icon\"></span>    ${folder.name | t}\n            <div if.bind=\"folder.device == 'system' && folder.name != 'System'\" class=\"pull-right\">\n                <div if.bind=\"showConfirmDelete\">\n                    <span>${\"Delete entire folder?\" | t}</span>\n                    <a class=\"btn btn-danger btn-sm\" click.trigger=\"deleteFolder($event)\">${\"Delete\" | t}</a>\n                    <a class=\"btn btn-primary btn-sm\" click.trigger=\"cancelDelete($event)\">${\"Cancel\" | t}</a>\n                </div>\n                <div else>\n                    <div click.trigger=\"confirmDelete($event)\"><span class=\"ion-trash-a delete-icon\"></span></div>\n                </div>\n            </div>\n        </div>\n        <div class=\"panel-collapse collapse ${collapsed ? '' : 'in'}\" dragover.trigger=\"dragover($event)\" drop.trigger=\"dragdropBody($event)\">\n            <div class=\"panel-body\">\n                <div if.bind=\"unavailable\">\n                    <span class=\"text-info\">USB device is not connected.</span>\n                </div>\n                <div if.bind=\"folder.files.length === 0 && folder.folders.length === 0\">\n                    <span class=\"text-info\">There are no files on the USB device.</span>\n                </div>\n                <div repeat.for=\"folder of folder.folders\">\n                    <system-folder parent.bind=\"$parent\" folder.bind=\"folder\" collapsed.bind=\"true\" draggable.bind=\"true\"></system-folder>\n                </div>\n                <div class=\"folder-files\">\n                    <div repeat.for=\"file of folder.files\">\n                        <system-file parent.bind=\"$parent\" file.bind=\"file\"></system-file>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n\n</template>\n"; });
var cov_9in4b40b = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/components/filetransfer/system-file.js',
        hash = '90d06b4a1559646df4f31cfea4e58f53043c9f59',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/components/filetransfer/system-file.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('components/filetransfer/system-file',['exports', 'aurelia-framework', '../../components/shared/dialogs/preset-dialog', 'aurelia-dialog', '../../services/file-service', '../../services/gateway-service'], function (exports, _aureliaFramework, _presetDialog, _aureliaDialog, _fileService, _gatewayService) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SystemFile = undefined;

    function _initDefineProp(target, property, descriptor, context) {
        if (!descriptor) return;
        Object.defineProperty(target, property, {
            enumerable: descriptor.enumerable,
            configurable: descriptor.configurable,
            writable: descriptor.writable,
            value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
        });
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _createClass = function () {
        function defineProperties(target, props) {
            for (var i = 0; i < props.length; i++) {
                var descriptor = props[i];
                descriptor.enumerable = descriptor.enumerable || false;
                descriptor.configurable = true;
                if ("value" in descriptor) descriptor.writable = true;
                Object.defineProperty(target, descriptor.key, descriptor);
            }
        }

        return function (Constructor, protoProps, staticProps) {
            if (protoProps) defineProperties(Constructor.prototype, protoProps);
            if (staticProps) defineProperties(Constructor, staticProps);
            return Constructor;
        };
    }();

    function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
        var desc = {};
        Object['ke' + 'ys'](descriptor).forEach(function (key) {
            desc[key] = descriptor[key];
        });
        desc.enumerable = !!desc.enumerable;
        desc.configurable = !!desc.configurable;

        if ('value' in desc || desc.initializer) {
            desc.writable = true;
        }

        desc = decorators.slice().reverse().reduce(function (desc, decorator) {
            return decorator(target, property, desc) || desc;
        }, desc);

        if (context && desc.initializer !== void 0) {
            desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
            desc.initializer = undefined;
        }

        if (desc.initializer === void 0) {
            Object['define' + 'Property'](target, property, desc);
            desc = null;
        }

        return desc;
    }

    function _initializerWarningHelper(descriptor, context) {
        throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
    }

    var _dec, _dec2, _dec3, _dec4, _dec5, _class, _desc, _value, _class2, _descriptor, _descriptor2;

    var SystemFile = exports.SystemFile = (_dec = (0, _aureliaFramework.inject)(_fileService.FileService, _aureliaDialog.DialogService, _gatewayService.GatewayService), _dec2 = (0, _aureliaFramework.computedFrom)('file.preset'), _dec3 = (0, _aureliaFramework.computedFrom)('fileService.presetNames'), _dec4 = (0, _aureliaFramework.computedFrom)('fileService.activeUsbFilePath', 'fileService.activeSystemFilePath'), _dec5 = (0, _aureliaFramework.computedFrom)('file.preset'), _dec(_class = (_class2 = function () {
        function SystemFile(fileService, dialogService, gatewayService) {
            _classCallCheck(this, SystemFile);

            _initDefineProp(this, 'parent', _descriptor, this);

            _initDefineProp(this, 'file', _descriptor2, this);

            this.presetLabel = '';

            this.fileService = fileService;
            this.dialogService = dialogService;
            this.gatewayService = gatewayService;
        }

        SystemFile.prototype.dragStart = function dragStart(event) {
            event.dataTransfer.setData('data', JSON.stringify(this.file));
            return true;
        };

        SystemFile.prototype.confirmDelete = function confirmDelete(event) {
            this.showConfirmDelete = true;
            event.stopPropagation();
        };

        SystemFile.prototype.cancelDelete = function cancelDelete(event) {
            this.showConfirmDelete = false;
            event.stopPropagation();
        };

        SystemFile.prototype.confirmAdd = function confirmAdd(event) {
            this.fileService.selectFile(this.file);
        };

        SystemFile.prototype.cancelAdd = function cancelAdd(event) {
            this.showConfirmAdd = false;
            event.stopPropagation();
        };

        SystemFile.prototype.deleteFile = function deleteFile(event) {
            var _this = this;

            this.fileService.deleteFile(this.file.path).then(function (response) {
                if (response) {
                    var i = _this.parent.folder.files.length;
                    while (i--) {
                        if (_this.parent.folder.files[i].path === _this.file.path) {
                            _this.parent.folder.files.splice(i, 1);
                        }
                    }
                }
            });
            event.stopPropagation();
        };

        SystemFile.prototype.sendFile = function sendFile() {
            var _this2 = this;

            this.dialogService.open({
                viewModel: _presetDialog.PresetDialog,
                model: {
                    val: 1,
                    property: 'testing',
                    displayName: this.file.name
                },
                lock: false
            }).whenClosed(function (response) {
                if (response.wasCancelled === false) {
                    var preset = response.output.preset;
                    _this2.file.preset = preset - 1;
                    _this2.fileService.sendFile(_this2.file.path, preset);
                    _this2.fileService.updatePresets(_this2.file.name, preset - 1);
                }
            });
        };

        _createClass(SystemFile, [{
            key: 'testPre',
            get: function get() {
                if (this.file && this.fileService) {
                    this.fileService.updatePresets(this.file.name, this.file.preset);
                }
            }
        }, {
            key: 'testClass',
            get: function get() {
                var preset = -1;
                if (this.file) {
                    for (var i = 0; i < this.fileService.presetNames.length; i++) {
                        if (this.fileService.presetNames[i] === this.file.name) {
                            preset = i;
                            i = this.fileService.presetNames.length;
                        }
                    }
                    this.file.preset = preset;
                }
                return '';
            }
        }, {
            key: 'selectedFile',
            get: function get() {
                if (this.file) {
                    if (this.fileService.activeUsbFilePath === this.file.path || this.fileService.activeSystemFilePath === this.file.path) {
                        return 'selected-file';
                    }
                }
                return '';
            }
        }, {
            key: 'presetFromParentClass',
            get: function get() {
                if (this.file) {
                    if (this.file.preset !== -1 && this.file.device === 'system') {
                        this.presetLabel = '   (' + (this.file.preset + 1) + ')';
                        return 'panel-system-file-preset';
                    }
                }
                this.presetLabel = '';
                return '';
            }
        }]);

        return SystemFile;
    }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'parent', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'file', [_aureliaFramework.bindable], {
        enumerable: true,
        initializer: null
    }), _applyDecoratedDescriptor(_class2.prototype, 'testPre', [_dec2], Object.getOwnPropertyDescriptor(_class2.prototype, 'testPre'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'testClass', [_dec3], Object.getOwnPropertyDescriptor(_class2.prototype, 'testClass'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'selectedFile', [_dec4], Object.getOwnPropertyDescriptor(_class2.prototype, 'selectedFile'), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, 'presetFromParentClass', [_dec5], Object.getOwnPropertyDescriptor(_class2.prototype, 'presetFromParentClass'), _class2.prototype)), _class2)) || _class);
});
define('text!components/filetransfer/system-file.html', ['module'], function(module) { module.exports = "<template>\n    \n    <div draggable=\"true\" dragstart.trigger=\"dragStart($event)\" click.trigger=\"confirmAdd($event)\" \n         class=\"panel panel-info system-file ${presetClass} ${presetFromParentClass} ${testPre} ${testClass} ${selectedFile}\">\n        <div class=\"panel-body ${file.ghost ? 'ghost' : ''}\">\n            <span class=\"ion-document file-icon\"></span>${file.name} ${presetLabel}\n            <!--<a if.bind=\"file.device != 'system'\" class=\"btn btn-primary btn-sm pull-right\" click.trigger=\"addToFiles($event)\">${\"Add\" | t}</a>-->\n            <div if.bind=\"file.device == 'system'\" class=\"pull-right\">\n                <div if.bind=\"showConfirmDelete\">\n                    <span>${\"Delete file?\" | t} </span>\n                    <a class=\"btn btn-danger btn-sm\" click.trigger=\"deleteFile($event)\">${\"Delete\" | t}</a>\n                    <a class=\"btn btn-primary btn-sm\" click.trigger=\"cancelDelete($event)\">${\"Cancel\" | t}</a>\n                </div>\n                <div else>\n                    <!--<div click.trigger=\"confirmDelete($event)\"><span class=\"ion-trash-a delete-icon\"></span></div>-->\n                    <a class=\"ion-gear-a delete-icon\" click.trigger=\"sendFile($event)\"></a>\n                    <a class=\"ion-trash-a delete-icon\" click.trigger=\"confirmDelete($event)\"></a>\n                </div>\n            </div>\n        </div>\n    </div>\n\n</template>\n"; });
var cov_252fq292cc = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/clients/updates-client.js',
        hash = '5294a479c704890783a1628d100a444badb04c25',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/clients/updates-client.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('clients/updates-client',['exports', 'aurelia-framework', 'signalr-client'], function (exports, _aureliaFramework, _signalrClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.UpdatesClient = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var hubLogger = _aureliaFramework.LogManager.getLogger('hub-connections');

    var UpdatesClient = exports.UpdatesClient = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.NewInstance.of(_signalrClient.HubConnectionBuilder)), _dec(_class = function () {
        function UpdatesClient(hubConnectionBuilder) {
            var _this = this;

            _classCallCheck(this, UpdatesClient);

            this.maxAttempts = 10;

            this.hub = hubConnectionBuilder.withUrl('api/hubs/updates').configureLogging(_signalrClient.LogLevel.Information).build();

            this.hub.onclose(function () {
                hubLogger.info('signalR connection closed');
                _this.start();
            });
        }

        UpdatesClient.prototype.start = function start() {
            var _this2 = this;

            return this.hub.start().then(function () {
                return _this2.backoff.reset();
            }).catch(function (error) {
                hubLogger.info(error);
                if (_this2.backoff.attempts >= _this2.maxAttempts) {
                    hubLogger.error('Could not reestablish signalR connecttion: ' + error);
                }
                setTimeout(function () {
                    return _this2.start();
                }, _this2.backoff.duration());
            });
        };

        UpdatesClient.prototype.invoke = function invoke() {
            var _this3 = this;

            for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
                args[_key] = arguments[_key];
            }

            this.startPromise = this.startPromise || this.hub.start().catch(function (error) {
                return hubLogger.error(error.toString());
            });
            return this.startPromise.then(function () {
                var _hub;

                return (_hub = _this3.hub).invoke.apply(_hub, args).catch(function (error) {
                    return hubLogger.error(error);
                });
            });
        };

        UpdatesClient.prototype.connect = function connect(callback) {
            this.hub.on('processDownloadProgress', callback);
        };

        UpdatesClient.prototype.subscribe = function subscribe(callback) {
            this.hub.on('newVersionAvailable', callback);
        };

        UpdatesClient.prototype.getCurrentVersion = function getCurrentVersion() {
            return this.invoke('GetCurrentVersion');
        };

        UpdatesClient.prototype.isUpdateAvailable = function isUpdateAvailable() {
            return this.invoke('isUpdateAvailable');
        };

        UpdatesClient.prototype.getAllPackages = function getAllPackages() {
            return this.invoke('GetAllPackages');
        };

        UpdatesClient.prototype.getDownloadSize = function getDownloadSize(version) {
            return this.invoke('GetDownloadSize', version);
        };

        UpdatesClient.prototype.downloadUpdate = function downloadUpdate(version) {
            this.invoke('DownloadUpdate', version);
        };

        UpdatesClient.prototype.installUpdate = function installUpdate(update, current) {
            this.invoke('InstallUpdate', update, current);
        };

        UpdatesClient.prototype.checkIfDownloaded = function checkIfDownloaded(version) {
            return this.invoke('CheckIfDownloaded', version);
        };

        return UpdatesClient;
    }()) || _class);
});
var cov_2ablczzz0g = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/clients/spray-session-client.js',
        hash = '30b09979831e339a346b2ba897ce01de1560c039',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/clients/spray-session-client.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('clients/spray-session-client',['exports', 'aurelia-framework', 'signalr-client'], function (exports, _aureliaFramework, _signalrClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.SpraySessionClient = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var hubLogger = _aureliaFramework.LogManager.getLogger('hub-connections');

    var SpraySessionClient = exports.SpraySessionClient = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.NewInstance.of(_signalrClient.HubConnectionBuilder)), _dec(_class = function () {
        function SpraySessionClient(hubConnectionBuilder) {
            var _this = this;

            _classCallCheck(this, SpraySessionClient);

            this.maxAttempts = 10;

            this.hub = hubConnectionBuilder.withUrl('api/hubs/spraySession').configureLogging(_signalrClient.LogLevel.Information).build();

            this.hub.onclose(function () {
                hubLogger.info('signalR connection closed');
                _this.start();
            });
        }

        SpraySessionClient.prototype.start = function start() {
            var _this2 = this;

            return this.hub.start().then(function () {
                return _this2.backoff.reset();
            }).catch(function (error) {
                hubLogger.info(error);
                if (_this2.backoff.attempts >= _this2.maxAttempts) {
                    hubLogger.error('Could not reestablish signalR connecttion: ' + error);
                }
                setTimeout(function () {
                    return _this2.start();
                }, _this2.backoff.duration());
            });
        };

        SpraySessionClient.prototype.invoke = function invoke() {
            var _this3 = this;

            for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
                args[_key] = arguments[_key];
            }

            this.startPromise = this.startPromise || this.hub.start().catch(function (error) {
                return hubLogger.error(error.toString());
            });
            return this.startPromise.then(function () {
                var _hub;

                return (_hub = _this3.hub).invoke.apply(_hub, args);
            });
        };

        SpraySessionClient.prototype.setSpraySession = function setSpraySession(sessionId) {
            return this.invoke('SetCurrentSpraySession', sessionId);
        };

        SpraySessionClient.prototype.getAllSpraySessions = function getAllSpraySessions() {
            return this.invoke('GetSpraySessions');
        };

        SpraySessionClient.prototype.getBoundaryGroups = function getBoundaryGroups() {
            return this.invoke('GetBoundaryGroups');
        };

        SpraySessionClient.prototype.getCurrentSpraySession = function getCurrentSpraySession() {
            return this.invoke('GetCurrentSpraySession');
        };

        SpraySessionClient.prototype.sendBoundaryMaps = function sendBoundaryMaps(paths, groupName) {
            return this.invoke('SendBoundaryMap', paths, groupName);
        };

        SpraySessionClient.prototype.setPrescriptionMap = function setPrescriptionMap(paths) {
            return this.invoke('SetPrescriptionMap', paths);
        };

        SpraySessionClient.prototype.useSeparableOverlapDistances = function useSeparableOverlapDistances() {
            return true;
        };

        return SpraySessionClient;
    }()) || _class);
});
var cov_lhxvfynej = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/clients/prescription-map-client.js',
        hash = '1dcad27d116b2bee89639008a07026bfd019eb14',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/clients/prescription-map-client.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('clients/prescription-map-client',['exports', 'aurelia-framework', 'signalr-client'], function (exports, _aureliaFramework, _signalrClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.PrescriptionMapClient = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var hubLogger = _aureliaFramework.LogManager.getLogger('hub-connections');

    var PrescriptionMapClient = exports.PrescriptionMapClient = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.NewInstance.of(_signalrClient.HubConnectionBuilder)), _dec(_class = function () {
        function PrescriptionMapClient(hubConnectionBuilder) {
            var _this = this;

            _classCallCheck(this, PrescriptionMapClient);

            this.maxAttempts = 10;

            this.hub = hubConnectionBuilder.withUrl('api/hubs/prescriptionMap').configureLogging(_signalrClient.LogLevel.Information).build();

            this.hub.onclose(function () {
                hubLogger.info('signalR connection closed');
                _this.start();
            });
        }

        PrescriptionMapClient.prototype.start = function start() {
            var _this2 = this;

            return this.hub.start().then(function () {
                return _this2.backoff.reset();
            }).catch(function (error) {
                hubLogger.info(error);
                if (_this2.backoff.attempts >= _this2.maxAttempts) {
                    hubLogger.error('Could not reestablish signalR connecttion: ' + error);
                }
                setTimeout(function () {
                    return _this2.start();
                }, _this2.backoff.duration());
            });
        };

        PrescriptionMapClient.prototype.connect = function connect(callback) {
            this.hub.on('broadcastPrescriptionMap', callback);
            return this.invoke('getCurrentPrescriptionMap');
        };

        PrescriptionMapClient.prototype.invoke = function invoke() {
            var _this3 = this;

            for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
                args[_key] = arguments[_key];
            }

            this.startPromise = this.startPromise || this.hub.start();
            return this.startPromise.then(function () {
                var _hub;

                return (_hub = _this3.hub).invoke.apply(_hub, args);
            });
        };

        PrescriptionMapClient.prototype.getCurrentPrescriptionMap = function getCurrentPrescriptionMap() {
            return this.invoke('GetCurrentPrescriptionMap');
        };

        return PrescriptionMapClient;
    }()) || _class);
});
var cov_vgyheago6 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/clients/mapping-client.js',
        hash = '60e312fcaebcfae67d6ece940976c9edf9f7b656',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/clients/mapping-client.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('clients/mapping-client',['exports', 'aurelia-framework', 'signalr-client'], function (exports, _aureliaFramework, _signalrClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.MappingClient = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var hubLogger = _aureliaFramework.LogManager.getLogger('hub-connections');

    var MappingClient = exports.MappingClient = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.NewInstance.of(_signalrClient.HubConnectionBuilder)), _dec(_class = function () {
        function MappingClient(hubConnectionBuilder) {
            var _this = this;

            _classCallCheck(this, MappingClient);

            this.maxAttempts = 10;

            this.hub = hubConnectionBuilder.withUrl('api/hubs/mapping').configureLogging(_signalrClient.LogLevel.Error).build();

            this.hub.onclose(function () {
                hubLogger.info('signalR connection closed');
                _this.start();
            });
        }

        MappingClient.prototype.start = function start() {
            var _this2 = this;

            return this.hub.start().then(function () {
                return _this2.backoff.reset();
            }).catch(function (error) {
                hubLogger.info(error);
                if (_this2.backoff.attampts > _this2.maxAttempts) {
                    hubLogger.error('Could not reestablish signalR connecttion: ' + error);
                }
                setTimeout(function () {
                    return _this2.start();
                }, _this2.backoff.duration());
            });
        };

        MappingClient.prototype.invoke = function invoke() {
            var _this3 = this;

            for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
                args[_key] = arguments[_key];
            }

            this.startPromise = this.startPromise || this.hub.start().catch(function (error) {
                return hubLogger.error(error.toString());
            });
            return this.startPromise.then(function () {
                var _hub;

                return (_hub = _this3.hub).invoke.apply(_hub, args);
            });
        };

        MappingClient.prototype.connect = function connect(callback, clearCallback) {
            this.hub.on('broadcastCoordinates', callback);
            this.hub.on('newSpraySession', clearCallback);
            return this.invoke('GetLocation');
        };

        MappingClient.prototype.getRegionCoverage = function getRegionCoverage(blX, blY, trX, trY, resolution) {
            return this.invoke('GetRegionCoverage', blX, blY, trX, trY, resolution);
        };

        MappingClient.prototype.getRegionCoverageBytes = function getRegionCoverageBytes(blX, blY, trX, trY, resolution) {
            return this.invoke('GetRegionCoverageBytes', blX, blY, trX, trY, resolution);
        };

        MappingClient.prototype.getSystemErrors = function getSystemErrors(blX, blY, trX, trY, resolution) {
            return this.invoke('GetSystemErrors', blX, blY, trX, trY, resolution);
        };

        MappingClient.prototype.getCoverageBoundingBoxForSpraySessionId = function getCoverageBoundingBoxForSpraySessionId(spraySessionId) {
            return this.invoke('GetCoverageBoundingBoxForSpraySessionId', spraySessionId);
        };

        MappingClient.prototype.getClosestError = function getClosestError(x, y) {
            return this.invoke('GetClosestError', x, y);
        };

        MappingClient.prototype.sendBoundaryMap = function sendBoundaryMap(path, originLong, originLat) {
            return this.invoke('SendBoundaryMap', path, originLong, originLat);
        };

        MappingClient.prototype.sendPrescriptionMap = function sendPrescriptionMap(path, originLong, originLat) {
            return this.invoke('SendPrescriptionMap', path, originLong, originLat);
        };

        MappingClient.prototype.setPrescriptionUnits = function setPrescriptionUnits(units) {
            this.invoke('SetPrescriptionUnits', units);
        };

        MappingClient.prototype.getBoundaryMap = function getBoundaryMap() {
            return this.invoke('GetCurrentBoundaryMap');
        };

        MappingClient.prototype.getPrescriptionMap = function getPrescriptionMap() {
            return this.invoke('GetCurrentPrescriptionMap');
        };

        MappingClient.prototype.getTweenDelay = function getTweenDelay() {
            return this.invoke('GetTweenDelay');
        };

        MappingClient.prototype.getMinimumResolution = function getMinimumResolution() {
            return this.invoke('GetMinimumResolution');
        };

        MappingClient.prototype.ignoreBoundary = function ignoreBoundary(ignore) {
            this.invoke('SetBoundaryIgnore', ignore);
        };

        return MappingClient;
    }()) || _class);
});
var cov_1thwis80fs = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/clients/log-event-client.js',
        hash = '586024a74f5eddeae7ea0dcbba4895c65af83d9f',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/clients/log-event-client.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('clients/log-event-client',['exports', 'aurelia-framework', 'signalr-client'], function (exports, _aureliaFramework, _signalrClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.LogEventClient = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var hubLogger = _aureliaFramework.LogManager.getLogger('hub-connections');

    var LogEventClient = exports.LogEventClient = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.NewInstance.of(_signalrClient.HubConnectionBuilder)), _dec(_class = function () {
        function LogEventClient(hubConnectionBuilder) {
            var _this = this;

            _classCallCheck(this, LogEventClient);

            this.maxAttempts = 10;

            this.hub = hubConnectionBuilder.withUrl('api/hubs/logs').configureLogging(_signalrClient.LogLevel.Information).build();

            this.hub.onclose(function () {
                hubLogger.info('signalR connection closed');
                _this.start();
            });

            this.startPromise = this.startPromise || this.hub.start();
        }

        LogEventClient.prototype.start = function start() {
            var _this2 = this;

            return this.hub.start().then(function () {
                return _this2.backoff.reset();
            }).catch(function (error) {
                hubLogger.info(error);
                if (_this2.backoff.attempts >= _this2.maxAttempts) {
                    hubLogger.error('Could not reestablish signalR connecttion: ' + error);
                }
                setTimeout(function () {
                    return _this2.start();
                }, _this2.backoff.duration());
            });
        };

        LogEventClient.prototype.invoke = function invoke() {
            var _this3 = this;

            for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
                args[_key] = arguments[_key];
            }

            this.startPromise = this.startPromise || this.hub.start().catch(function (error) {
                return hubLogger.error(error.toString());
            });
            return this.startPromise.then(function () {
                var _hub;

                return (_hub = _this3.hub).invoke.apply(_hub, args);
            });
        };

        LogEventClient.prototype.connect = function connect(connectCallBack, systemErrorCb, nozzleErrCb) {
            this.hub.on('sendSystemError', systemErrorCb);
            this.hub.on('sendNozzleError', nozzleErrCb);
            this.invoke('Connect').then(connectCallBack);
        };

        return LogEventClient;
    }()) || _class);
});
var cov_1elve6g0ga = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/clients/gateway-client.js',
        hash = '91171653110b140002c5a021aa4349d1b3e67776',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/clients/gateway-client.js',
        statementMap: {
            '0': {
                start: {
                    line: 40,
                    column: 8
                },
                end: {
                    line: 53,
                    column: 15
                }
            },
            '1': {
                start: {
                    line: 42,
                    column: 16
                },
                end: {
                    line: 42,
                    column: 36
                }
            },
            '2': {
                start: {
                    line: 45,
                    column: 16
                },
                end: {
                    line: 45,
                    column: 38
                }
            },
            '3': {
                start: {
                    line: 46,
                    column: 16
                },
                end: {
                    line: 48,
                    column: 17
                }
            },
            '4': {
                start: {
                    line: 47,
                    column: 20
                },
                end: {
                    line: 47,
                    column: 91
                }
            },
            '5': {
                start: {
                    line: 49,
                    column: 16
                },
                end: {
                    line: 52,
                    column: 41
                }
            },
            '6': {
                start: {
                    line: 50,
                    column: 20
                },
                end: {
                    line: 50,
                    column: 40
                }
            }
        },
        fnMap: {
            '0': {
                name: '(anonymous_0)',
                decl: {
                    start: {
                        line: 39,
                        column: 4
                    },
                    end: {
                        line: 39,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 39,
                        column: 12
                    },
                    end: {
                        line: 54,
                        column: 5
                    }
                },
                line: 39
            },
            '1': {
                name: '(anonymous_1)',
                decl: {
                    start: {
                        line: 41,
                        column: 18
                    },
                    end: {
                        line: 41,
                        column: 19
                    }
                },
                loc: {
                    start: {
                        line: 42,
                        column: 16
                    },
                    end: {
                        line: 42,
                        column: 36
                    }
                },
                line: 42
            },
            '2': {
                name: '(anonymous_2)',
                decl: {
                    start: {
                        line: 44,
                        column: 19
                    },
                    end: {
                        line: 44,
                        column: 20
                    }
                },
                loc: {
                    start: {
                        line: 44,
                        column: 28
                    },
                    end: {
                        line: 53,
                        column: 13
                    }
                },
                line: 44
            },
            '3': {
                name: '(anonymous_3)',
                decl: {
                    start: {
                        line: 49,
                        column: 27
                    },
                    end: {
                        line: 49,
                        column: 28
                    }
                },
                loc: {
                    start: {
                        line: 49,
                        column: 33
                    },
                    end: {
                        line: 51,
                        column: 17
                    }
                },
                line: 49
            }
        },
        branchMap: {
            '0': {
                loc: {
                    start: {
                        line: 46,
                        column: 16
                    },
                    end: {
                        line: 48,
                        column: 17
                    }
                },
                type: 'if',
                locations: [{
                    start: {
                        line: 46,
                        column: 16
                    },
                    end: {
                        line: 48,
                        column: 17
                    }
                }, {
                    start: {
                        line: 46,
                        column: 16
                    },
                    end: {
                        line: 48,
                        column: 17
                    }
                }],
                line: 46
            }
        },
        s: {
            '0': 0,
            '1': 0,
            '2': 0,
            '3': 0,
            '4': 0,
            '5': 0,
            '6': 0
        },
        f: {
            '0': 0,
            '1': 0,
            '2': 0,
            '3': 0
        },
        b: {
            '0': [0, 0]
        },
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('clients/gateway-client',['exports', 'aurelia-framework', 'signalr-client', 'backoff'], function (exports, _aureliaFramework, _signalrClient, _backoff) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.GatewayClient = undefined;

    var _backoff2 = _interopRequireDefault(_backoff);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var hubLogger = _aureliaFramework.LogManager.getLogger('hub-connections');

    var GatewayClient = exports.GatewayClient = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.NewInstance.of(_signalrClient.HubConnectionBuilder), _aureliaFramework.Factory.of(_backoff2.default)), _dec(_class = function () {
        function GatewayClient(hubConnectionBuilder, BackOff) {
            var _this = this;

            _classCallCheck(this, GatewayClient);

            this.maxAttempts = 10;

            this.backoff = new BackOff({ min: 100, max: 10000 });

            this.hub = hubConnectionBuilder.withUrl('api/hubs/gateway').configureLogging(_signalrClient.LogLevel.Information).build();

            this.hub.onclose(function () {
                hubLogger.info('signalR connection closed');
                _this.start();
            });
        }

        GatewayClient.prototype.start = function start() {
            var _this2 = this;

            cov_1elve6g0ga.f[0]++;
            cov_1elve6g0ga.s[0]++;

            return this.hub.start().then(function () {
                cov_1elve6g0ga.f[1]++;
                cov_1elve6g0ga.s[1]++;
                return _this2.backoff.reset();
            }).catch(function (error) {
                cov_1elve6g0ga.f[2]++;
                cov_1elve6g0ga.s[2]++;

                hubLogger.info(error);
                cov_1elve6g0ga.s[3]++;
                if (_this2.backoff.attempts >= _this2.maxAttempts) {
                    cov_1elve6g0ga.b[0][0]++;
                    cov_1elve6g0ga.s[4]++;

                    hubLogger.error('Could not reestablish signalR connecttion: ' + error);
                } else {
                    cov_1elve6g0ga.b[0][1]++;
                }
                cov_1elve6g0ga.s[5]++;
                setTimeout(function () {
                    cov_1elve6g0ga.f[3]++;
                    cov_1elve6g0ga.s[6]++;

                    return _this2.start();
                }, _this2.backoff.duration());
            });
        };

        GatewayClient.prototype.invoke = function invoke() {
            var _this3 = this;

            for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
                args[_key] = arguments[_key];
            }

            this.startPromise = this.startPromise || this.hub.start().catch(function (error) {
                return hubLogger.error(error.toString());
            });
            return this.startPromise.then(function () {
                var _hub;

                return (_hub = _this3.hub).invoke.apply(_hub, args).catch(function (error) {
                    hubLogger.error(error.toString());
                });
            });
        };

        GatewayClient.prototype.connect = function connect(callback) {
            this.hub.on('broadcastDelta', callback);
            this.invoke('Connect').then(callback);
        };

        GatewayClient.prototype.getProperties = function getProperties(props) {
            return this.invoke('GetProperties', props);
        };

        GatewayClient.prototype.send = function send(stateDelta) {
            this.invoke('Send', stateDelta);
        };

        GatewayClient.prototype.subscribe = function subscribe(properties, component) {
            this.invoke('Subscribe', properties, component);
        };

        GatewayClient.prototype.unsubscribe = function unsubscribe(properties, component) {
            this.invoke('Unsubscribe', properties, component);
        };

        GatewayClient.prototype.registerDebugCallbacks = function registerDebugCallbacks(maxExceededCallback, requestSentCallback, responseReceivedCallback, broadcastsClearedCallback) {
            this.hub.on('broadcastMaxExceeded', maxExceededCallback);
            this.hub.on('broadcastRequestSent', requestSentCallback);
            this.hub.on('broadcastResponseReceived', responseReceivedCallback);
            this.hub.on('broadcastsCleared', broadcastsClearedCallback);
        };

        GatewayClient.prototype.enableDebug = function enableDebug(enabled) {
            this.invoke('EnableDebug', enabled);
        };

        GatewayClient.prototype.getActiveBroadcastRequests = function getActiveBroadcastRequests() {
            return this.invoke('GetActiveBroadcastRequests');
        };

        return GatewayClient;
    }()) || _class);
});
var cov_2n11qmmzj7 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/clients/boundary-map-client.js',
        hash = 'e9b2413e6bd4f7d2918f34ff8806ff92dfcae0eb',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/clients/boundary-map-client.js',
        statementMap: {},
        fnMap: {},
        branchMap: {},
        s: {},
        f: {},
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('clients/boundary-map-client',['exports', 'aurelia-framework', 'signalr-client'], function (exports, _aureliaFramework, _signalrClient) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.BoundaryMapClient = undefined;

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var hubLogger = _aureliaFramework.LogManager.getLogger('hub-connections');

    var BoundaryMapClient = exports.BoundaryMapClient = (_dec = (0, _aureliaFramework.inject)(_aureliaFramework.NewInstance.of(_signalrClient.HubConnectionBuilder)), _dec(_class = function () {
        function BoundaryMapClient(hubConnectionBuilder) {
            var _this = this;

            _classCallCheck(this, BoundaryMapClient);

            this.maxAttempts = 10;

            this.hub = hubConnectionBuilder.withUrl('api/hubs/boundaryMap').configureLogging(_signalrClient.LogLevel.Information).build();

            this.hub.onclose(function () {
                hubLogger.info('signalR connection closed');
                _this.start();
            });
        }

        BoundaryMapClient.prototype.start = function start() {
            var _this2 = this;

            return this.hub.start().then(function () {
                return _this2.backoff.reset();
            }).catch(function (error) {
                hubLogger.info(error);
                if (_this2.backoff.attempts >= _this2.maxAttempts) {
                    hubLogger.error('Could not reestablish signalR connecttion: ' + error);
                }
                setTimeout(function () {
                    return _this2.start();
                }, _this2.backoff.duration());
            });
        };

        BoundaryMapClient.prototype.connect = function connect(callback, addBoundaryPointCallBack, pruneBoundaryPointCallBack, clearBoundaryPointsCallBack) {
            this.hub.on('broadcastBoundaryMap', callback);
            this.hub.on('addBoundaryPoint', addBoundaryPointCallBack);
            this.hub.on('pruneBoundaryPoint', pruneBoundaryPointCallBack);
            this.hub.on('clearBoundaryPoints', clearBoundaryPointsCallBack);
            return this.invoke('GetBoundaryMapAndRecorderStatus');
        };

        BoundaryMapClient.prototype.invoke = function invoke() {
            var _this3 = this;

            for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
                args[_key] = arguments[_key];
            }

            this.startPromise = this.startPromise || this.hub.start().catch(function (error) {
                return hubLogger.error(error.toString());
            });
            return this.startPromise.then(function () {
                var _hub;

                return (_hub = _this3.hub).invoke.apply(_hub, args);
            });
        };

        BoundaryMapClient.prototype.registerBoundaryMapCreatedCallback = function registerBoundaryMapCreatedCallback(callback) {
            this.hub.on('boundaryMapCreated', callback);
        };

        BoundaryMapClient.prototype.getCurrentBoundaryMap = function getCurrentBoundaryMap() {
            return this.invoke('GetCurrentBoundaryMapRegions');
        };

        BoundaryMapClient.prototype.getRecordedBoundaryPoints = function getRecordedBoundaryPoints() {
            return this.invoke('GetRecordedBoundaryPoints');
        };

        BoundaryMapClient.prototype.getRecordedInternalPoints = function getRecordedInternalPoints() {
            return this.invoke('GetRecordedInternalPoints');
        };

        BoundaryMapClient.prototype.getBoundaryRecorderStatus = function getBoundaryRecorderStatus() {
            return this.invoke('GetBoundaryRecorderStatus');
        };

        BoundaryMapClient.prototype.setBoundaryRecorderSide = function setBoundaryRecorderSide(side) {
            this.invoke('SetBoundaryRecorderSide', side);
        };

        BoundaryMapClient.prototype.updateBoundary = function updateBoundary(path, sprayType, remove, group) {
            this.invoke('UpdateABoundary', path, sprayType, remove, group);
        };

        BoundaryMapClient.prototype.setRecordInternal = function setRecordInternal(flag) {
            this.invoke('SetRecordInternal', flag);
        };

        BoundaryMapClient.prototype.recordBoundary = function recordBoundary() {
            this.invoke('RecordBoundary');
        };

        BoundaryMapClient.prototype.pauseBoundary = function pauseBoundary() {
            this.invoke('PauseBoundary');
        };

        BoundaryMapClient.prototype.saveBoundary = function saveBoundary(name, mapName, type) {
            this.invoke('SaveBoundary', name, mapName, type);
        };

        BoundaryMapClient.prototype.discardBoundary = function discardBoundary() {
            this.invoke('DiscardBoundary');
        };

        return BoundaryMapClient;
    }()) || _class);
});
var cov_1lmrqlvsk7 = function () {
    var path = '/opt/atlassian/pipelines/agent/build/Web/src/app.js',
        hash = 'adbf2e8df4d5cba955730c522802e46dd1731fb3',
        global = new Function('return this')(),
        gcv = '__coverage__',
        coverageData = {
        path: '/opt/atlassian/pipelines/agent/build/Web/src/app.js',
        statementMap: {
            '0': {
                start: {
                    line: 19,
                    column: 8
                },
                end: {
                    line: 19,
                    column: 39
                }
            },
            '1': {
                start: {
                    line: 20,
                    column: 8
                },
                end: {
                    line: 20,
                    column: 55
                }
            },
            '2': {
                start: {
                    line: 21,
                    column: 8
                },
                end: {
                    line: 21,
                    column: 31
                }
            }
        },
        fnMap: {
            '0': {
                name: '(anonymous_0)',
                decl: {
                    start: {
                        line: 18,
                        column: 4
                    },
                    end: {
                        line: 18,
                        column: 5
                    }
                },
                loc: {
                    start: {
                        line: 18,
                        column: 50
                    },
                    end: {
                        line: 22,
                        column: 5
                    }
                },
                line: 18
            }
        },
        branchMap: {},
        s: {
            '0': 0,
            '1': 0,
            '2': 0
        },
        f: {
            '0': 0
        },
        b: {},
        _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
    },
        coverage = global[gcv] || (global[gcv] = {});

    if (coverage[path] && coverage[path].hash === hash) {
        return coverage[path];
    }

    coverageData.hash = hash;
    return coverage[path] = coverageData;
}();

define('app',['exports', 'aurelia-framework', './fetch-config', './configs/app-router-configuration', 'aurelia-validation', 'numeral'], function (exports, _aureliaFramework, _fetchConfig, _appRouterConfiguration, _aureliaValidation, _numeral) {
    'use strict';

    Object.defineProperty(exports, "__esModule", {
        value: true
    });
    exports.App = undefined;

    var _appRouterConfiguration2 = _interopRequireDefault(_appRouterConfiguration);

    var _numeral2 = _interopRequireDefault(_numeral);

    function _interopRequireDefault(obj) {
        return obj && obj.__esModule ? obj : {
            default: obj
        };
    }

    function _classCallCheck(instance, Constructor) {
        if (!(instance instanceof Constructor)) {
            throw new TypeError("Cannot call a class as a function");
        }
    }

    var _dec, _class;

    var App = exports.App = (_dec = (0, _aureliaFramework.inject)(_fetchConfig.FetchConfig, _appRouterConfiguration2.default), _dec(_class = function () {
        function App(fetchConfig, routerConfiguration) {
            _classCallCheck(this, App);

            cov_1lmrqlvsk7.f[0]++;
            cov_1lmrqlvsk7.s[0]++;

            this.fetchConfig = fetchConfig;
            cov_1lmrqlvsk7.s[1]++;
            this.routerConfiguration = routerConfiguration;
            cov_1lmrqlvsk7.s[2]++;
            this.customRulesInit();
        }

        App.prototype.activate = function activate() {
            this.routerConfiguration.configure();
            this.fetchConfig.configure();
        };

        App.prototype.customRulesInit = function customRulesInit() {
            _aureliaValidation.ValidationRules.customRule('numRange', function (value, obj, min, max, displayMin, displayMax) {
                return value !== null && value !== undefined && !Number.isNaN(value) && value >= min && value <= max;
            }, '${$this.property} must be a number between ${$config.displayMin} and ${$config.displayMax}.', function (min, max, converter, format) {
                if (converter) {
                    min = converter(min);
                    max = converter(max);
                }
                if (!format) {
                    format = '0';
                }
                var displayMin = (0, _numeral2.default)(min).format(format);
                var displayMax = (0, _numeral2.default)(max).format(format);

                return { min: min, max: max, displayMin: displayMin, displayMax: displayMax };
            });
        };

        return App;
    }()) || _class);
});
define('text!app.html', ['module'], function(module) { module.exports = "<template>\n    <router-view></router-view>\n</template>\n"; });
define('text!app.css', ['module'], function(module) { module.exports = "/* heading styling */\n.px-content h4 { margin-top: 0; }\n\n.px-content { padding: 10px; }\n\n/* app-footer styling */\n\n.app-footer {\n    height: 30px;\n    padding: 5px;\n    padding-left: 10px;\n    /* margin-left: 10px;*/\n}\n\n#map { position: relative; }\n\n#map > .stats > * {\n    position: absolute !important;\n    margin: 5px;\n}\n\n#map > .leftPanel {\n    position: absolute !important;\n    bottom: 10px;\n    width: 500px;\n    margin: 5px;\n}\n\n.border {\n    border-width: 5px;\n}\n\n.small-vertical-padding {\n    padding-top: 10px;\n    padding-bottom: 10px;\n}\n\n.px-navbar { background-color: #424242; }\n\n\n.px-navbar .navbar-collapse { background-color: #424242; }\n\n.px-navbar .navbar-header { background-color: #424242; }\n\n.select2-container--open { z-index: 1011; }\n\n/* app-nav styling */\n\n.px-nav-label { margin-left: 15px; }\n\n.px-nav-item .px-nav-icon { font-size: x-large; }\n.px-nav-item .px-notification-icon {\n    margin-left: -15px;\n    font-size: large;\n    color: orange;\n}\n\n/* dashboard styling */\n\n.dashboard.switcher { margin-top: 38px; }\n\n.dashboard-dropdown { margin-right: 25px; }\n\n.dashboard-map-cloud {\n    margin-top: 15px;\n    height: 800px;\n}\n\n.dashboard-map-cloud {\n    margin-top: 15px;\n    height: 800px;\n}\n\n.dashboard-map .jumbotron {\n    min-height: 100px;\n    max-height: 200px\n}\n\n.dashboard-carousel {\n    display: inline-block;\n    background-color: #424242;\n}\n\ninput[readonly] {\n    background-color: transparent;\n    border: 0;\n    box-shadow: none;\n}\n\n.dashboard-map .jumbotron > h1 { text-align: center; }\n\n.dot {\n    height: 25px;\n    width: 25px;\n    background-color: #4caf50;\n    border-radius: 50%;\n    display: inline-block;\n    position: absolute;\n    top: 12.5px;\n}\n\n.vcm-hr {\n    margin-top: 0px;\n    background-color: black;\n    border-top-width: 0;\n    width: 100%;\n    height: 6px;\n}\n\n.left-dot {\n    left: 10px;\n}\n.right-dot {\n    right: 10px;\n}\n.flex-container {\n    padding: 0;\n    margin: 0;\n    list-style: none;\n    display: flex;\n}\n\n.space-evenly {\n    justify-content: space-evenly;\n}\n.flex-item {\n    padding: 0px;\n    flex: 1;\n    height: 50px;\n    margin: 5px;\n    line-height: 50px;\n    max-width: 5px;\n    color: white;\n    text-align: center;\n}\n\n#owl-demo .item{\n    padding: 30px 0px;\n    margin: 10px;\n    -webkit-border-radius: 3px;\n    -moz-border-radius: 3px;\n    border-radius: 3px;\n    text-align: center;\n}\n\n.left-vertical-bar {\n    border-left: 6px solid black;\n    height: 5rem;\n    margin-bottom: 0\n}\n\n.right-vertical-bar {\n    border-right: 6px solid black;\n    height: 5rem;\n    margin-bottom: 0\n}\n\n.left-vertical-bar-3 {\n    border-left: 6px solid black;\n    height: 3rem;\n    margin-bottom: 0\n}\n\n.right-vertical-bar-3 {\n    border-right: 6px solid black;\n    height: 3rem;\n    margin-bottom: 0\n}\n\n.subnet-nozzle {\n    display: inline-flex;\n    background-color: #000000;\n    height: 4rem;\n    position: relative;\n}\n\n.noz-num {\n    position: absolute;\n    top: 40px;\n    left: 50%;\n    transform: translateX(-50%);\n    color: black;\n    font-size: large;\n    font-weight: bold;\n}\n\n.panel-dark {\n   background-color: #424242;\n   color: #fafafa;\n}\n\n.panel-default > .panel-heading {\n    border-color: #424242;\n    background-color: #424242;\n    color: #fafafa;\n}\n\n.panel-default > .active-tree-toggle {\n    border-color: #44a548;\n    background-color: #44a548 !important;\n    color: #fafafa;\n}\n\n.panel.gauge {\n    width: 150px;\n    float: left;\n    margin-right: 10px;\n}\n\n.panel.gauge .panel-heading {\n    border-top-left-radius: 5px;\n    border-top-right-radius: 5px;\n    text-align: center;\n}\n\n.panel.gauge .panel-heading .panel-heading-text { font-weight: bold; }\n\n\n.panel.gauge .panel-body { text-align: center; }\n\n/* file transfer styling */\n\n.file-transfer-pane {\n    height: 80vh;\n    overflow-y: auto;\n}\n\n.panel.system-file {\n    font-size: x-large;\n    margin-bottom: 5px;\n}\n\n.panel.system-file .panel-body {\n    padding-top: 5px;\n    padding-bottom: 5px;\n    cursor: grab;\n}\n\n.panel.system-file .file-icon {\n    margin-right: 10px;\n    margin-left: 10px;\n}\n\n.panel-system-file-preset {\n    /*background-color: dimgray;*/\n    font-weight: bold;\n}\n\n.selected-file {\n    background-color: deepskyblue;\n}\n\n.selected-folder {\n    background-color: deepskyblue;\n    padding: 10px;\n    font-size: x-large;\n    cursor: grab;\n    border-color: #424242;\n    color: #fafafa;\n    font-weight: bold;\n}\n\n.delete-icon {\n    padding: 0;\n    padding: 10px;\n    margin: 0;\n    font-size: x-large;\n    cursor: pointer;\n    color: black;\n}\n\n.panel.system-folder .panel-heading {\n    font-size: x-large;\n    cursor: grab;\n}\n\n.panel.system-folder .panel-heading .folder-icon { margin-right: 10px; }\n\n/*.system-settings > li > compose > label:after {\n    content: \"\\f35d\";\n    font-family: \"Ionicons\"\n}*/\n\n.ion-chevron-down:after { position: relative }\n\n.folder-files { margin-bottom: 10px; }\n\n.ghost { opacity: .25; }\n\n.interactive-panel {\n    position: absolute;\n    z-index: 1;\n    top: 0px;\n    right: -19px;\n}\n\n.interactive-panel-left {\n    position: absolute;\n    z-index: 1;\n    top: 0px;\n    left: 35px;\n}\n\n.interactive-panel .operations-btn-dark { margin: 2px 73px 10px 20px; }\n\n.interactive-panel-left .operations-btn-dark { margin: 2px 20px 10px 20px; }\n\n.interactive-panel-left .gauge-label-box {\n    right: 11rem;\n    left: initial;\n}\n\n.btn-circle {\n    width: 30px;\n    height: 30px;\n    text-align: center;\n    padding: 6px 0;\n    font-size: 12px;\n    line-height: 1.428571429;\n    border-radius: 15px;\n}\n\n.btn-circle.btn-lg {\n    width: 50px;\n    height: 50px;\n    padding: 10px 16px;\n    font-size: 18px;\n    line-height: 1.33;\n    border-radius: 25px;\n}\n\n.btn-circle.btn-xl {\n    border-radius: 35px;\n}\n\n.btn-xl {\n    width: 10rem;\n    height: 5rem;\n    padding: 10px 16px;\n    font-size: 20px;\n    text-align: center;\n    line-height: 1.33;\n}\n\n.bg-dark {\n    background-color: #424242;\n    color: #fafafa;\n}\n\n.equal {\n    display: -webkit-box;\n    display: -webkit-flex;\n    display: -ms-flexbox;\n    display: flex;\n    flex-wrap: nowrap;\n}\n\n.equal div {\n    align-content: center;\n    align-self: center;\n    text-align: center;\n    flex-wrap: nowrap;\n}\n\nhr {\n    display: block;\n    height: 1px;\n    border: 0;\n    border-top: 1px solid #ccc;\n    margin: 1em 0;\n    padding: 0;\n}\n\n.owl-centered .owl-stage-outer {\n    height: 55px;\n}\n\n.owl-dots {\n    zoom: 2;\n    height: 15px;\n    margin-top: -5px !important;\n    padding-bottom: 0px;\n}\n\n.lower-owl-dots {\n    background: rgba(217, 217, 217, .8);\n    margin-left: -5.5px;\n    margin-right: -5.5px;\n}\n\n.dialog-btn {\n    width: 45%\n}\n\n.label-top {\n    text-align: center;\n    width: 100%;\n    display: block;\n}\n\n.label-xs {\n    vertical-align: super;\n    font-size: x-small;\n}\n\n.label-sm {\n    vertical-align: super;\n    font-size: small;\n}\n\n.label-md {\n    vertical-align: super;\n    font-size: medium;\n}\n\n.label-lg {\n    vertical-align: super;\n    font-size: large;\n}\n\n.label-xl {\n    font-size: x-large;\n}\n\n.label-bs {\n    vertical-align: super;\n}\n\n.vcm-boom-btn {\n    height: 60px;\n    flex: 1;\n    font-size: medium;\n    font-weight: bold;\n}\n\n.boom-btn {\n    flex: 1;\n    font-weight: bold;\n    font-size: 1.3vw;\n    border: solid;\n    border-color: #419d45;\n}\n\n.boom-btn-toolbar {\n    display: flex;\n    width: 85vw;\n}\n\n.manual-control-offset .form-group div{\n    margin-left: 3.6em;\n}\n\n.operations-dark {\n    background-color: #212121;\n    color: #fbff00;\n    text-align: center;\n}\n\n.operations-dark.input-lg {\n    font-size: x-large;\n    line-height: 1;\n    font-weight: bold;\n    padding-left: 6px;\n    padding-right: 6px;\n    min-width: 3.2em;\n}\n\n.operations-dark-text-xl {\n    font-size: x-large;\n    font-weight: bold;\n}\n\ninput[type=number]::-webkit-inner-spin-button, \ninput[type=number]::-webkit-outer-spin-button { \n    -webkit-appearance: none; \n    margin: 0; \n}\n\n.operations-btn {\n    background-color: #616161;\n    color: #fbff00;\n    border-radius: 5rem;\n    border-color: #4caf50;\n    text-align: center;\n}\n\n.operation-txt {\n    color: #fbff00;\n    font-size: 15px;\n    text-align: center;\n}\n\n.operations-btn-dark {\n    border-width: 3px;\n    border-style: solid;\n    color: #fbff00;\n    position: relative;\n    background-color: #424242;\n}\n\n.recirculation-icon {\n    border-width: 3px;\n    border-style: solid;\n    color: #fbff00;\n    width: 40px;\n    height: 40px;\n    text-align: center;\n    padding: 6px 0;\n    font-size: 12px;\n    line-height: 1.428571429;\n    border-radius: 50px;\n    background-color: white;\n    position: absolute;\n    top: -52px;\n    right: 25px;\n    z-index: 2000;\n}\n\n.disconnect-icon {\n    border-width: 3px;\n    border-style: solid;\n    color: #fbff00;\n    width: 150px;\n    height: 50px;\n    text-align: center;\n    padding: 6px 0;\n    font-size: 16px;\n    line-height: 1.428571429;\n    border-radius: 50px;\n    position: absolute;\n    top: 10px;\n    left: 40%;\n}\n\n.color-box {\n    width: 50px;\n    height: 25px;\n    text-align: center;\n    padding: 6px 0;\n    font-size: 10px;\n}\n\n.color-bar {\n    border-width: 2px;\n    border-style: solid;\n    color: #000000;\n    display: flex;\n    line-height: 1.428571429;\n    position: absolute;\n    bottom: 6%;\n    left: 15px;\n}\n\n.alarm-banner {\n    border-width: 2px;\n    border-style: solid;\n    color: #000000;\n    /*width: 30vw;*/\n    width: 150px;\n    height: 30px;\n    background-color: yellow;\n    line-height: 1.428571429;\n    font-size: 14px;\n    padding-left: 5px;\n}\n\n.lower-right-map {\n    position: absolute;\n    bottom: 6%;\n    right: 15px;\n}\n\n.map-zoom {\n    height: 40px;\n    line-height: 13px;\n    width: 40px;\n    font-size: 24px;\n    background-color: #419d45;\n    border-radius: 40px;\n    border-width: 2px;\n    border-color: black;\n    margin-bottom: 6px;\n    margin-left: 110px;\n    padding: 5px;\n}\n\n\n\n.alarm-dialog {\n    text-align: left;\n    font-size: 14px;\n    border-radius: 1rem;\n    border-color: #df4759;\n    border-width: 5px;\n    border-style: solid;\n    padding: 15px;\n    width: 30vw;\n    background-color: #212121;\n    color: #fafafa;\n    -webkit-box-shadow: 10px 10px 30px 0px rgba(0, 0, 0, 0.75);\n    -moz-box-shadow: 10px 10px 30px 0px rgba(0, 0, 0, 0.75);\n    box-shadow: 10px 10px 30px 0px rgba(0, 0, 0, 0.75);\n}\n\n.file-dialog {\n    padding: 0px 20px 5px 20px;\n    margin: //20px;\n}\n\n.btn-orange {\n    background-color: rgb(249, 161, 58);\n    color: black;\n}\n\n.btn-blue {\n    background-color: rgb(0, 103, 167);\n    color: white;\n}\n\n.btn-red {\n    background-color: rgb(140, 12, 4);\n    color: white;\n}\n\n.btn-brown {\n    background-color: #af6448;\n    color: white;\n}\n\n.btn-gray {\n    background-color: rgb(158, 159, 163);\n    color: black;\n}\n\n.btn-white {\n    background-color: white;\n    color: black;\n}\n\n.btn-silver {\n    background-color: silver;\n    color: black;\n}\n\n.btn-hidden {\n    visibility: hidden;\n}\n\n.btn-visible {\n    visibility: visible;\n}\n\n.operation-bdr-success { border-color: #4caf50; }\n\n.operation-bdr-warn { border-color: #fbff00; }\n\n.operation-bdr-error { border-color: #e91e63; }\n\n.operation-bdr-disabled { border-color: lightgrey !important; }\n\n.operation-bdr-off { border-width: 0; }\n\n.operation-popover {\n    border-radius: 1rem;\n    border-color: #4caf50 !important;\n    border-width: 5px;\n    border-style: solid;\n    padding: 15px;\n    background-color: #212121;\n    color: #fafafa;\n    -webkit-box-shadow: 10px 10px 30px 0px rgba(0, 0, 0, 0.75);\n    -moz-box-shadow: 10px 10px 30px 0px rgba(0, 0, 0, 0.75);\n    box-shadow: 10px 10px 30px 0px rgba(0, 0, 0, 0.75);\n}\n\n.operation-popover label {\n    background-color: inherit;\n    font-size: large;\n    text-align: center;\n}\n\n.operation-popover div {\n    font-size: large;\n    text-align: center;\n}\n\n.operation-popover input {\n    background-color: inherit;\n    font-size: large;\n    text-align: center;\n}\n\n.operation-popover .area-meter .btn.btn-outline {\n    background-color: inherit;\n    font-size: large;\n    font-weight: bold;\n    text-align: center;\n    color: #fafafa;\n}\n\n.operation-popover .area-meter .btn.btn-outline.btn-primary {\n        color: #419d45;\n}\n\n.btn-warn:hover {\n    background-color: yellow;\n    color: black;\n}\n\n.btn-warn {\n    background-color: yellow;\n    color: black;\n}\n\n.transfer-btn {\n    background-color: #419d45;\n    color: white;\n    font-weight: bold;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    margin-top: 5px;\n    margin-bottom: 5px;\n}\n\n.transfer-btn-container {\n    padding-top: 30vh;\n}\n\n.ux-dialog {\n    border-color: #4caf50 !important;\n    border-width: 5px;\n}\n.gps-setup-img {\n    background: url(assets/gps.jpg) no-repeat center center;\n}\n\n.boom-sway-img {\n    background: url(assets/boom-sway.jpg) no-repeat center center;\n}\n\n.tractor-img {\n    background: url(assets/tractor.jpg) no-repeat center center;\n    height: 300px;\n    background-size: contain;\n    margin-top: 30px;\n    width: auto;\n}\n\n.pid-display-box {\n    position: absolute;\n    padding: 7px;\n    top: 28%;\n    left: 570px;\n    width: 80px;\n}\n\n.pid-display-box span {\n    border-radius: 3px;\n    border-width: 3px;\n    border-style: solid;\n    border-color: #818a91;\n    width: 100%;\n    text-align: center;\n    background-color: #d6d6d6;\n    display: inline-block;\n}\n\n.yaxis {\n}\n\n.graph .yaxis {\n}\n\n.graph .axis {\n    stroke-width: 1;\n}\n\n.graph .axis .tick line {\n    stroke: black;\n}\n\n.graph .axis .tick text {\n    fill: black;\n}\n\n.graph .axis .domain {\n    fill: none;\n    stroke: black;\n}\n\n.graph .group {\n    fill: none;\n    stroke: black;\n    stroke-width: 1.5;\n}\n\n.grid line {\n    stroke: lightgrey;\n    stroke-width: 1;\n    stroke-opacity: 0.7;\n    shape-rendering: geometricPrecision;\n}\n\n.grid.y path {\n    stroke-width: 0;\n    fill: #000000;\n}\n\n.graphic {\n    height: -moz-available;\n    height: -webkit-fill-available;\n    background-size: contain;\n    margin-top: 30px;\n    width: auto;\n}\n\n.graphic-sm {\n    height: -moz-available;\n    height: -webkit-fill-available;\n    background-size: contain;\n    margin-top: 30px;\n    width: auto;\n}\n\n/* Large Devices, Wide Screens */\n@media only screen and (max-width : 1200px) {\n    .graphic {\n        height: 33vh;\n        margin-top: 30px;\n        background-size: contain;\n        width: auto\n    }\n\n    .font-responsive {\n        font-size: x-large\n    }\n}\n\n/* Medium Devices, Desktops */\n@media only screen and (max-width : 992px) {\n    .graphic {\n        height: 31vh;\n        background-size: contain;\n    }\n    .font-responsive {\n        font-size: x-large\n    }\n}\n\n/* Small Devices, Tablets */\n@media only screen and (max-width : 768px) {\n    .graphic {\n        height: 31vh;\n        margin-top: 30px;\n        background-size: contain;\n        width: auto;\n    }\n    .font-responsive {\n        font-size: large\n    }\n}\n\n/* Extra Small Devices, Phones */ \n@media only screen and (max-width : 480px) {\n    .graphic {\n        height: 38vh; \n        background-size: contain;\n    }\n    .font-responsive {\n        font-size: x-small\n    }\n    .subnet-nozzle {\n        height: 3rem;\n    }\n    .noz-num {\n        top: 2rem;\n    }\n}\n\n/* Custom, iPhone Retina */ \n@media only screen and (max-width : 320px) {\n    .graphic {\n        height: 38vh; \n    }\n}\n\n\n.gauge-label-box {\n    top: 10px;\n    left: 11rem;\n    font-size: 13px;\n    font-weight: 500;\n    line-height: normal;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    position: absolute;\n    width: 65px;\n    height: 35px;\n    color: #fafafa;\n    background: rgba(153, 153, 153, 0.7);\n}\n\n.gauge-label {\n    text-align: center;\n    position: relative;\n}\n\n.gauge-circle {\n    width: 61px;\n    height: 61px;\n    z-index: 11;\n    background: black;\n    border-radius: 50%;\n    position: relative;\n    -moz-border-radius: 36px;\n    border: 1px solid #000;\n    background: radial-gradient(lime 100%, #000);\n    margin-bottom: 15px;\n}\n\n.gauge-circle-green {\n    width: 70px;\n    height: 70px;\n    bottom: -1px;\n    right: -1px;\n    z-index: 12;\n    background: lime;\n    position: relative;\n    -moz-border-radius: 35px;\n    -webkit-border-radius: 35px;\n    border-radius: 35px;\n}\n\n.gauge-circle.mph {\n    position: absolute;\n    right: 100px;\n    top: 220px;\n}\n\n.gauge-circle.psi {\n    right: 100px;\n    top: 380px;\n    position: absolute;\n}\n\n.gauge-circle.gpa {\n    right: 100px;\n    top: 300px;\n    position: absolute;\n}\n\n.gauge-reading {\n    position: relative;\n    color: yellow;\n    font-size: 20px;\n}\n\n.gauge-reading.circle {\n    text-align: center;\n    top: 10px;\n}\n\n.gauge-circle-grey {\n    width: 51px;\n    height: 51px;\n    left: 4px;\n    bottom: -4px;\n    z-index: 12;\n    background: #444;\n    position: relative;\n    -moz-border-radius: 25px;\n    -webkit-border-radius: 25px;\n    border-radius: 26px;\n}\n\n.nozzle-container {\n    background: rgba(217, 217, 217, .8);\n    height: 15vh;\n    padding-top: 5px;\n    padding-bottom: 0px;\n    margin: 0px 10px 10px 10px;\n}\n\n.spray-nozzle-info {\n    /* font-size: 15px; */\n   /* margin-top: 5px;*/\n    color: rgb(127, 123, 119);\n}\n\n.spray-nozzle-error { color: rgb(238, 29, 35); }\n\n.spray-nozzle-text { color: rgb(68, 68, 68); }\n\n.spray-nozzle-button { position: relative; }\n\n.debug-button { background-color: #f7872c }\n\n/* debug styling */\n\ntable.dataTable {\n    width: 100%;\n    margin: 0 auto;\n    clear: both;\n    border-collapse: separate;\n    border-spacing: 0\n}\n\ntable.dataTable thead th,\ntable.dataTable tfoot th { font-weight: bold; }\n\ntable.dataTable thead th,\ntable.dataTable thead td {\n    padding: 10px 18px;\n    border-bottom: 1px solid #111\n}\n\ntable.dataTable thead th:active,\ntable.dataTable thead td:active { outline: none }\n\ntable.dataTable tfoot th,\ntable.dataTable tfoot td {\n    padding: 10px 18px 6px 18px;\n    border-top: 1px solid #111\n}\n\ntable.dataTable tbody tr { background-color: #fff }\n\ntable.dataTable tbody th,\ntable.dataTable tbody td { padding: 8px 10px }\n\ntable.dataTable.row-border tbody th,\ntable.dataTable.row-border tbody td,\ntable.dataTable.display tbody th,\ntable.dataTable.display tbody td { border-top: 1px solid #ddd }\n\ntable.dataTable.row-border tbody tr:first-child th,\ntable.dataTable.row-border tbody tr:first-child td,\ntable.dataTable.display tbody tr:first-child th,\ntable.dataTable.display tbody tr:first-child td { border-top: none }\n\ntable.dataTable.cell-border tbody th,\ntable.dataTable.cell-border tbody td {\n    border-top: 1px solid #ddd;\n    border-right: 1px solid #ddd\n}\n\ntable.dataTable.cell-border tbody tr th:first-child,\ntable.dataTable.cell-border tbody tr td:first-child { border-left: 1px solid #ddd }\n\ntable.dataTable.cell-border tbody tr:first-child th,\ntable.dataTable.cell-border tbody tr:first-child td { border-top: none }\n\ntable.dataTable.stripe tbody tr.odd,\ntable.dataTable.display tbody tr.odd { background-color: #f9f9f9 }\n\n\n/* tree menu*/\n\n.nav > li + li { margin-left: 15px; }\n\n.nav > li:first-child { margin-left: 15px; }\n\n.no-padding { padding: 0px; }\n\nul.nav-menu-list-style .nav-header .menu-collapsible-icon {\n    position: absolute;\n    right: 3px;\n    top: 16px;\n    font-size: 9px;\n}\n\n\n\nul.nav-menu-list-style { margin: 0; }\n\nul.nav-menu-list-style .nav-header {\n    border-top: 1px solid #FFFFFF;\n    border-bottom: 1px solid #e8e8e8;\n    display: block;\n    margin: 0;\n    line-height: 42px;\n    padding: 0 8px;\n    font-weight: 600;\n}\n\nul.nav-menu-list-style > li { position: relative; }\n\nul.nav-menu-list-style > li a {\n    border-top: 1px solid #FFFFFF;\n    border-bottom: 1px solid #e8e8e8;\n    padding: 0 10px;\n    line-height: 32px;\n}\n\nul.nav-menu-list-style > li:first-child a { }\n\n\nul.nav-menu-list-style {\n    list-style: none;\n    padding: 0px;\n    margin: 0px;\n}\n\nul.nav-menu-list-style li .badge, ul.nav-menu-list-style li .pull-right, ul.nav-menu-list-style li span.badge, ul.nav-menu-list-style li label.badge {\n    float: right;\n    margin-top: 7px;\n}\n\nul.bullets { list-style: inside disc }\n\nul.numerics { list-style: inside decimal }\n\n.ul.kas-icon-aero { }\n\nul.kas-icon-aero li a:before {\n    font-family: 'Glyphicons Halflings';\n    font-size: 9px;\n    content: \"\\e258\";\n    padding-right: 8px;\n}\n\n/* aurelia dialog styling*/\n\nux-dialog-container, ux-dialog-overlay {\n    position: fixed;\n    top: 0;\n    right: 0;\n    bottom: 0;\n    left: 0\n}\n\nux-dialog-overlay { opacity: 0 }\n\nux-dialog-overlay.active { opacity: 1 }\n\nux-dialog-container {\n    display: block;\n    transition: opacity .2s linear;\n    opacity: 0;\n    overflow-x: hidden;\n    overflow-y: auto;\n    -webkit-overflow-scrolling: touch\n}\n\nux-dialog-container.active { opacity: 1 }\n\nux-dialog-container > div { padding: 30px }\n\nux-dialog-container > div > div {\n    display: block;\n    min-width: 300px;\n    width: -moz-fit-content;\n    width: -webkit-fit-content;\n    width: fit-content;\n    height: -moz-fit-content;\n    height: -webkit-fit-content;\n    height: fit-content;\n    margin: auto\n}\n\nux-dialog-container, ux-dialog-container > div, ux-dialog-container > div > div { outline: 0 }\n\nux-dialog {\n    display: table;\n    box-shadow: 0 5px 15px rgba(0, 0, 0, .5);\n    border: 1px solid rgba(0, 0, 0, .2);\n    border-radius: 5px;\n    padding: 3px;\n    min-width: 300px;\n    width: -moz-fit-content;\n    width: -webkit-fit-content;\n    width: fit-content;\n    height: -moz-fit-content;\n    height: -webkit-fit-content;\n    height: fit-content;\n    margin: auto;\n    border-image-source: initial;\n    border-image-slice: initial;\n    border-image-width: initial;\n    border-image-outset: initial;\n    border-image-repeat: initial;\n    background: #fff\n}\n\nux-dialog > ux-dialog-header {\n    display: block;\n    padding: 16px;\n    border-bottom: 1px solid #e5e5e5\n}\n\nux-dialog > ux-dialog-header > button {\n    float: right;\n    border: none;\n    display: block;\n    width: 32px;\n    height: 32px;\n    background: 0 0;\n    font-size: 22px;\n    line-height: 16px;\n    margin: -14px -16px 0 0;\n    padding: 0;\n    cursor: pointer\n}\n\nux-dialog > ux-dialog-body {\n    display: block;\n    padding: 16px\n}\n\nux-dialog > ux-dialog-footer {\n    display: block;\n    padding: 6px;\n    border-top: 1px solid #e5e5e5;\n    text-align: right\n}\n\nux-dialog > ux-dialog-footer button {\n    color: #333;\n    background-color: #fff;\n    padding: 6px 12px;\n    font-size: 14px;\n    text-align: center;\n    white-space: nowrap;\n    vertical-align: middle;\n    -ms-touch-action: manipulation;\n    touch-action: manipulation;\n    cursor: pointer;\n    background-image: none;\n    border: 1px solid #ccc;\n    border-radius: 4px;\n    margin: 5px 0 5px 5px\n}\n\nux-dialog > ux-dialog-footer button:disabled {\n    cursor: default;\n    opacity: .45\n}\n\nux-dialog > ux-dialog-footer button:hover:enabled {\n    color: #333;\n    background-color: #e6e6e6;\n    border-color: #adadad\n}\n\n.ux-dialog-open { overflow: hidden }\n\n.vcenter {\n    margin-top: 15px;\n}\n\n.dashboard-map-container {\n    flex: 1 1 auto;\n}\n\n.dashboard-map {\n    height: calc(100% - 4px);\n    margin-bottom: -10px;\n}\n\n.base-container {\n    display: flex;\n    flex-flow: column;\n    height: calc(100vh - 70px);\n}\n\n.dashboard-graph-container {\n    flex: 0 1 auto;\n}\n\n.graph-element-container {\n    height: 10vh;\n}\n\n.dashboard-graph-element {\n    height: 10vh;\n    /*border-style: groove;*/\n}\n\n.boundary-box-spray {\n    background-color: #419d45;\n    border: solid;\n    color: white;\n    border-color: #419d45;\n}\n\n.boundary-box-no-spray {\n    background-color: lightgray;\n    border: solid;\n    color: black;\n    border-color: lightgray;\n}\n\n.boundary-box-island {\n    background-color: #fbff00;\n    color: black;\n    border-color: lightgray; /* #e91e63;*/\n}\n\n.boundary-selected {\n    border: solid;\n    border-color: black;\n    border-bottom-width: 3px;\n}\n"; });
//# sourceMappingURL=app-bundle.js.map