text: /* */ 
  define(['exports', 'aurelia-framework', 'aurelia-pal', 'aurelia-router', 'aurelia-event-aggregator', '../channel'], function (exports, _aureliaFramework, _aureliaPal, _aureliaRouter, _aureliaEventAggregator, _channel2) {
    'use strict';
  
    Object.defineProperty(exports, '__esModule', {
      value: true
    });
  
    var _createDecoratedClass = (function () { function defineProperties(target, descriptors, initializers) { for (var i = 0; i < descriptors.length; i++) { var descriptor = descriptors[i]; var decorators = descriptor.decorators; var key = descriptor.key; delete descriptor.key; delete descriptor.decorators; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor || descriptor.initializer) descriptor.writable = true; if (decorators) { for (var f = 0; f < decorators.length; f++) { var decorator = decorators[f]; if (typeof decorator === 'function') { descriptor = decorator(target, key, descriptor) || descriptor; } else { throw new TypeError('The decorator for method ' + descriptor.key + ' is of the invalid type ' + typeof decorator); } } if (descriptor.initializer !== undefined) { initializers[key] = descriptor; continue; } } Object.defineProperty(target, key, descriptor); } } return function (Constructor, protoProps, staticProps, protoInitializers, staticInitializers) { if (protoProps) defineProperties(Constructor.prototype, protoProps, protoInitializers); if (staticProps) defineProperties(Constructor, staticProps, staticInitializers); return Constructor; }; })();
  
    var _get = function get(_x2, _x3, _x4) { var _again = true; _function: while (_again) { var object = _x2, property = _x3, receiver = _x4; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x2 = parent; _x3 = property; _x4 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
  
    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 _defineDecoratedPropertyDescriptor(target, key, descriptors) { var _descriptor = descriptors[key]; if (!_descriptor) return; var descriptor = {}; for (var _key in _descriptor) descriptor[_key] = _descriptor[_key]; descriptor.value = descriptor.initializer ? descriptor.initializer.call(target) : undefined; Object.defineProperty(target, key, descriptor); }
  
    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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
  
    var channel;
  
    var Navbar = (function () {
      function Navbar(channel, navbar) {
        _classCallCheck(this, Navbar);
  
        channel = channel;
        if (navbar) navbar.config = this;
        this.navbar = navbar;
        this.channel = channel;
      }
  
      _createClass(Navbar, [{
        key: 'configure',
        value: function configure(options) {
          Object.assign(this, options);
          return this;
        }
      }, {
        key: 'set',
        value: function set(key, value) {
          if (!value && typeof key === 'string') {
            value = key;
            key = key.value;
          }
          this[key] = value;
        }
      }, {
        key: 'get',
        value: function get(key) {
          return this[key] || this;
        }
      }, {
        key: 'Title',
        value: function Title(options) {
          this.current.brand = options;
        }
      }, {
        key: 'LeftNav',
        value: (function (_LeftNav) {
          function LeftNav(_x) {
            return _LeftNav.apply(this, arguments);
          }
  
          LeftNav.toString = function () {
            return _LeftNav.toString();
          };
  
          return LeftNav;
        })(function (options) {
          return new LeftNav(options);
        })
      }, {
        key: 'RightNav',
        value: (function (_RightNav) {
          function RightNav() {
            return _RightNav.apply(this, arguments);
          }
  
          RightNav.toString = function () {
            return _RightNav.toString();
          };
  
          return RightNav;
        })(function () {
          return new RightNav(options);
        })
      }]);
  
      return Navbar;
    })();
  
    exports.Navbar = Navbar;
  
    var NavbarNav = function NavbarNav(options) {
      _classCallCheck(this, NavbarNav);
  
      this.navigateBack = false;
      this.navigate = undefined;
      this.aicon = undefined;
      this.key = undefined;
  
      Object.assign(options, this);
    };
  
    exports.NavbarNav = NavbarNav;
  
    var LeftNav = (function (_NavbarNav) {
      _inherits(LeftNav, _NavbarNav);
  
      function LeftNav(options) {
        _classCallCheck(this, LeftNav);
  
        _get(Object.getPrototypeOf(LeftNav.prototype), 'constructor', this).call(this, options);this.navigateBack = true;
        this.aicon = 'ios-arrow-left';
        this.key = 'left';
      }
  
      return LeftNav;
    })(NavbarNav);
  
    exports.LeftNav = LeftNav;
  
    var RightNav = (function (_NavbarNav2) {
      _inherits(RightNav, _NavbarNav2);
  
      function RightNav(options) {
        _classCallCheck(this, RightNav);
  
        _get(Object.getPrototypeOf(RightNav.prototype), 'constructor', this).call(this, options);this.key = 'right';
      }
  
      return RightNav;
    })(NavbarNav);
  
    exports.RightNav = RightNav;
  
    var NavbarElement = (function () {
      var _instanceInitializers = {};
      var _instanceInitializers = {};
  
      _createDecoratedClass(NavbarElement, [{
        key: 'size',
        decorators: [_aureliaFramework.bindable],
        initializer: function initializer() {
          return null;
        },
        enumerable: true
      }, {
        key: 'slot',
        decorators: [_aureliaFramework.bindable],
        initializer: function initializer() {
          return null;
        },
        enumerable: true
      }, {
        key: 'nav',
        decorators: [_aureliaFramework.bindable],
        initializer: function initializer() {
          return null;
        },
        enumerable: true
      }, {
        key: 'router',
        decorators: [_aureliaFramework.bindable],
        initializer: function initializer() {
          return null;
        },
        enumerable: true
      }, {
        key: 'right',
        decorators: [(0, _aureliaFramework.child)('[right]')],
        initializer: function initializer() {
          return null;
        },
        enumerable: true
      }, {
        key: 'left',
        decorators: [(0, _aureliaFramework.child)('[left]')],
        initializer: function initializer() {
          return null;
        },
        enumerable: true
      }, {
        key: 'center',
        decorators: [(0, _aureliaFramework.child)('[center]')],
        initializer: function initializer() {
          return null;
        },
        enumerable: true
      }, {
        key: 'brand',
        decorators: [(0, _aureliaFramework.child)('[brand]')],
        initializer: function initializer() {
          return null;
        },
        enumerable: true
      }], null, _instanceInitializers);
  
      function NavbarElement(element, container, _channel, router) {
        _classCallCheck(this, _NavbarElement);
  
        _defineDecoratedPropertyDescriptor(this, 'size', _instanceInitializers);
  
        _defineDecoratedPropertyDescriptor(this, 'slot', _instanceInitializers);
  
        _defineDecoratedPropertyDescriptor(this, 'nav', _instanceInitializers);
  
        _defineDecoratedPropertyDescriptor(this, 'router', _instanceInitializers);
  
        _defineDecoratedPropertyDescriptor(this, 'right', _instanceInitializers);
  
        _defineDecoratedPropertyDescriptor(this, 'left', _instanceInitializers);
  
        _defineDecoratedPropertyDescriptor(this, 'center', _instanceInitializers);
  
        _defineDecoratedPropertyDescriptor(this, 'brand', _instanceInitializers);
  
        this.config = {};
        this.fragment = _aureliaPal.DOM.createDocumentFragment();
        this.placeholder = _aureliaPal.DOM.createElement('navbar-placeholder');
  
        channel = _channel;
        this.element = element;
        this.container = container;
        this.config = {};
  
        this.navigateBack = function () {
          router.history.navigateBack();
        };
      }
  
      _createDecoratedClass(NavbarElement, [{
        key: 'created',
        value: function created(view) {
          this.view = this.element.au.controller.view;
        }
      }, {
        key: 'attached',
        value: function attached() {}
      }, {
        key: 'detached',
        value: function detached() {}
      }, {
        key: 'configure',
        value: function configure() {}
      }, {
        key: 'hide',
        value: function hide() {
          return Velocity(this.element, {
            translateY: '-100%'
          });
        }
      }, {
        key: 'show',
        value: function show() {
          return Velocity(this.element, {
            translateY: '0'
          });
        }
      }], null, _instanceInitializers);
  
      var _NavbarElement = NavbarElement;
      NavbarElement = (0, _aureliaFramework.inject)(Element, _aureliaFramework.Container, _channel2.InterfaceChannel, _aureliaRouter.Router)(NavbarElement) || NavbarElement;
      NavbarElement = (0, _aureliaFramework.customElement)('ai-nav-bar')(NavbarElement) || NavbarElement;
      return NavbarElement;
    })();
  
    exports.NavbarElement = NavbarEl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