Full Code of arvindr21/myRESTApp for AI

master 924562bbe8c6 cached
221 files
1.8 MB
488.2k tokens
359 symbols
1 requests
Download .txt
Showing preview only (1,904K chars total). Download the full file or copy to clipboard to get everything.
Repository: arvindr21/myRESTApp
Branch: master
Commit: 924562bbe8c6
Files: 221
Total size: 1.8 MB

Directory structure:
gitextract_a25f4262/

├── README.md
├── ngClient/
│   ├── .bowerrc
│   ├── .gitignore
│   ├── bower.json
│   ├── css/
│   │   └── app.css
│   ├── gulpfile.js
│   ├── index.html
│   ├── js/
│   │   ├── app.js
│   │   ├── auth/
│   │   │   ├── auth.controller.js
│   │   │   └── auth.factory.js
│   │   ├── controllers.js
│   │   ├── directives.js
│   │   ├── factory.js
│   │   └── filters.js
│   ├── libs/
│   │   ├── angular/
│   │   │   ├── .bower.json
│   │   │   ├── README.md
│   │   │   ├── angular-csp.css
│   │   │   ├── angular.js
│   │   │   ├── angular.min.js.gzip
│   │   │   └── bower.json
│   │   ├── angular-route/
│   │   │   ├── .bower.json
│   │   │   ├── README.md
│   │   │   ├── angular-route.js
│   │   │   └── bower.json
│   │   ├── bootstrap/
│   │   │   ├── .bower.json
│   │   │   ├── Gruntfile.js
│   │   │   ├── LICENSE
│   │   │   ├── README.md
│   │   │   ├── bower.json
│   │   │   ├── dist/
│   │   │   │   ├── css/
│   │   │   │   │   ├── bootstrap-theme.css
│   │   │   │   │   └── bootstrap.css
│   │   │   │   └── js/
│   │   │   │       └── bootstrap.js
│   │   │   ├── grunt/
│   │   │   │   ├── bs-glyphicons-data-generator.js
│   │   │   │   ├── bs-lessdoc-parser.js
│   │   │   │   ├── bs-raw-files-generator.js
│   │   │   │   └── sauce_browsers.yml
│   │   │   ├── js/
│   │   │   │   ├── affix.js
│   │   │   │   ├── alert.js
│   │   │   │   ├── button.js
│   │   │   │   ├── carousel.js
│   │   │   │   ├── collapse.js
│   │   │   │   ├── dropdown.js
│   │   │   │   ├── modal.js
│   │   │   │   ├── popover.js
│   │   │   │   ├── scrollspy.js
│   │   │   │   ├── tab.js
│   │   │   │   ├── tooltip.js
│   │   │   │   └── transition.js
│   │   │   ├── less/
│   │   │   │   ├── alerts.less
│   │   │   │   ├── badges.less
│   │   │   │   ├── bootstrap.less
│   │   │   │   ├── breadcrumbs.less
│   │   │   │   ├── button-groups.less
│   │   │   │   ├── buttons.less
│   │   │   │   ├── carousel.less
│   │   │   │   ├── close.less
│   │   │   │   ├── code.less
│   │   │   │   ├── component-animations.less
│   │   │   │   ├── dropdowns.less
│   │   │   │   ├── forms.less
│   │   │   │   ├── glyphicons.less
│   │   │   │   ├── grid.less
│   │   │   │   ├── input-groups.less
│   │   │   │   ├── jumbotron.less
│   │   │   │   ├── labels.less
│   │   │   │   ├── list-group.less
│   │   │   │   ├── media.less
│   │   │   │   ├── mixins/
│   │   │   │   │   ├── alerts.less
│   │   │   │   │   ├── background-variant.less
│   │   │   │   │   ├── border-radius.less
│   │   │   │   │   ├── buttons.less
│   │   │   │   │   ├── center-block.less
│   │   │   │   │   ├── clearfix.less
│   │   │   │   │   ├── forms.less
│   │   │   │   │   ├── gradients.less
│   │   │   │   │   ├── grid-framework.less
│   │   │   │   │   ├── grid.less
│   │   │   │   │   ├── hide-text.less
│   │   │   │   │   ├── image.less
│   │   │   │   │   ├── labels.less
│   │   │   │   │   ├── list-group.less
│   │   │   │   │   ├── nav-divider.less
│   │   │   │   │   ├── nav-vertical-align.less
│   │   │   │   │   ├── opacity.less
│   │   │   │   │   ├── pagination.less
│   │   │   │   │   ├── panels.less
│   │   │   │   │   ├── progress-bar.less
│   │   │   │   │   ├── reset-filter.less
│   │   │   │   │   ├── resize.less
│   │   │   │   │   ├── responsive-visibility.less
│   │   │   │   │   ├── size.less
│   │   │   │   │   ├── tab-focus.less
│   │   │   │   │   ├── table-row.less
│   │   │   │   │   ├── text-emphasis.less
│   │   │   │   │   ├── text-overflow.less
│   │   │   │   │   └── vendor-prefixes.less
│   │   │   │   ├── mixins.less
│   │   │   │   ├── modals.less
│   │   │   │   ├── navbar.less
│   │   │   │   ├── navs.less
│   │   │   │   ├── normalize.less
│   │   │   │   ├── pager.less
│   │   │   │   ├── pagination.less
│   │   │   │   ├── panels.less
│   │   │   │   ├── popovers.less
│   │   │   │   ├── print.less
│   │   │   │   ├── progress-bars.less
│   │   │   │   ├── responsive-embed.less
│   │   │   │   ├── responsive-utilities.less
│   │   │   │   ├── scaffolding.less
│   │   │   │   ├── tables.less
│   │   │   │   ├── theme.less
│   │   │   │   ├── thumbnails.less
│   │   │   │   ├── tooltip.less
│   │   │   │   ├── type.less
│   │   │   │   ├── utilities.less
│   │   │   │   ├── variables.less
│   │   │   │   └── wells.less
│   │   │   └── package.json
│   │   └── jquery/
│   │       ├── .bower.json
│   │       ├── MIT-LICENSE.txt
│   │       ├── bower.json
│   │       ├── dist/
│   │       │   └── jquery.js
│   │       └── src/
│   │           ├── ajax/
│   │           │   ├── jsonp.js
│   │           │   ├── load.js
│   │           │   ├── parseJSON.js
│   │           │   ├── parseXML.js
│   │           │   ├── script.js
│   │           │   ├── var/
│   │           │   │   ├── nonce.js
│   │           │   │   └── rquery.js
│   │           │   └── xhr.js
│   │           ├── ajax.js
│   │           ├── attributes/
│   │           │   ├── attr.js
│   │           │   ├── classes.js
│   │           │   ├── prop.js
│   │           │   ├── support.js
│   │           │   └── val.js
│   │           ├── attributes.js
│   │           ├── callbacks.js
│   │           ├── core/
│   │           │   ├── access.js
│   │           │   ├── init.js
│   │           │   ├── parseHTML.js
│   │           │   ├── ready.js
│   │           │   └── var/
│   │           │       └── rsingleTag.js
│   │           ├── core.js
│   │           ├── css/
│   │           │   ├── addGetHookIf.js
│   │           │   ├── curCSS.js
│   │           │   ├── defaultDisplay.js
│   │           │   ├── hiddenVisibleSelectors.js
│   │           │   ├── support.js
│   │           │   ├── swap.js
│   │           │   └── var/
│   │           │       ├── cssExpand.js
│   │           │       ├── getStyles.js
│   │           │       ├── isHidden.js
│   │           │       ├── rmargin.js
│   │           │       └── rnumnonpx.js
│   │           ├── css.js
│   │           ├── data/
│   │           │   ├── Data.js
│   │           │   ├── accepts.js
│   │           │   └── var/
│   │           │       ├── data_priv.js
│   │           │       └── data_user.js
│   │           ├── data.js
│   │           ├── deferred.js
│   │           ├── deprecated.js
│   │           ├── dimensions.js
│   │           ├── effects/
│   │           │   ├── Tween.js
│   │           │   └── animatedSelector.js
│   │           ├── effects.js
│   │           ├── event/
│   │           │   ├── alias.js
│   │           │   └── support.js
│   │           ├── event.js
│   │           ├── exports/
│   │           │   ├── amd.js
│   │           │   └── global.js
│   │           ├── intro.js
│   │           ├── jquery.js
│   │           ├── manipulation/
│   │           │   ├── _evalUrl.js
│   │           │   ├── support.js
│   │           │   └── var/
│   │           │       └── rcheckableType.js
│   │           ├── manipulation.js
│   │           ├── offset.js
│   │           ├── outro.js
│   │           ├── queue/
│   │           │   └── delay.js
│   │           ├── queue.js
│   │           ├── selector-native.js
│   │           ├── selector-sizzle.js
│   │           ├── selector.js
│   │           ├── serialize.js
│   │           ├── sizzle/
│   │           │   └── dist/
│   │           │       └── sizzle.js
│   │           ├── traversing/
│   │           │   ├── findFilter.js
│   │           │   └── var/
│   │           │       └── rneedsContext.js
│   │           ├── traversing.js
│   │           ├── var/
│   │           │   ├── arr.js
│   │           │   ├── class2type.js
│   │           │   ├── concat.js
│   │           │   ├── hasOwn.js
│   │           │   ├── indexOf.js
│   │           │   ├── pnum.js
│   │           │   ├── push.js
│   │           │   ├── rnotwhite.js
│   │           │   ├── slice.js
│   │           │   ├── strundefined.js
│   │           │   ├── support.js
│   │           │   └── toString.js
│   │           └── wrap.js
│   ├── package.json
│   └── partials/
│       ├── footer.html
│       ├── header.html
│       ├── home.html
│       ├── login.html
│       ├── page1.html
│       ├── page2.html
│       └── page3.html
└── server/
    ├── .gitignore
    ├── config/
    │   └── secret.js
    ├── middlewares/
    │   └── validateRequest.js
    ├── package.json
    ├── routes/
    │   ├── auth.js
    │   ├── index.js
    │   ├── products.js
    │   └── users.js
    └── server.js

================================================
FILE CONTENTS
================================================

================================================
FILE: README.md
================================================
myRESTApp
=========

[Architecting a Secure RESTful Node.js app](http://thejackalofjavascript.com/architecting-a-restful-node-js-app)



================================================
FILE: ngClient/.bowerrc
================================================
{
  "directory" : "libs"
}


================================================
FILE: ngClient/.gitignore
================================================
node_modules


================================================
FILE: ngClient/bower.json
================================================
{
  "name": "ngclient",
  "version": "0.1.0",
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "libs",
    "test",
    "tests"
  ],
  "dependencies": {
    "bootstrap": "~3.2.0",
    "angular": "~1.2.24",
    "angular-route": "~1.2.23"
  }
}


================================================
FILE: ngClient/css/app.css
================================================
/* Sticky footer styles
-------------------------------------------------- */

html {
  position: relative;
  min-height: 100%;
}
body {
  /* Margin bottom by footer height */
  margin-bottom: 60px;
}
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  /* Set the fixed height of the footer here */
  height: 60px;
  background-color: #f5f5f5;
}
/* Custom page CSS
-------------------------------------------------- */

/* Not required for template or sticky footer method. */

body > .container {
  padding: 60px 15px 0;
}
.container .text-muted {
  margin: 20px 0;
}
.footer > .container {
  padding-right: 15px;
  padding-left: 15px;
}
code {
  font-size: 80%;
}


================================================
FILE: ngClient/gulpfile.js
================================================
var gulp = require('gulp'),
  connect = require('gulp-connect');

var paths = {
  app: './',
  src: ['./*.html', './partials/*.html', './css/*.css', './js/*.js']
};

gulp.task('connect', function() {
  connect.server({
    root: paths.app,
    livereload: true,
    port: 2772
  });
});

gulp.task('html', function() {
  gulp.src(paths.src)
    .pipe(connect.reload());
});

gulp.task('watch', function() {
  gulp.watch([paths.src], ['html']);
});

gulp.task('default', ['connect', 'watch']);


================================================
FILE: ngClient/index.html
================================================
<!DOCTYPE html>
<html ng-app="ngclient">

<head>
  <title>ngClient</title>

  <link rel="stylesheet" type="text/css" href="libs/bootstrap/dist/css/bootstrap.min.css">
  <link rel="stylesheet" type="text/css" href="css/app.css">

  <script type="text/javascript" src="libs/angular/angular.min.js"></script>
  <script type="text/javascript" src="libs/angular-route/angular-route.min.js"></script>

  <script type="text/javascript" src="js/app.js"></script>
  <script type="text/javascript" src="js/factory.js"></script>
  <script type="text/javascript" src="js/filters.js"></script>
  <script type="text/javascript" src="js/directives.js"></script>
  <script type="text/javascript" src="js/controllers.js"></script>

  <script type="text/javascript" src="js/auth/auth.factory.js"></script>
  <script type="text/javascript" src="js/auth/auth.controller.js"></script>

</head>

<body>
  <div ng-include="'partials/header.html'"></div>
  <div class="container" ng-view></div>
  <div ng-include="'partials/footer.html'"></div>
</body>

</html>


================================================
FILE: ngClient/js/app.js
================================================
var myApp = angular.module('ngclient', ['ngRoute']);

myApp.config(function($routeProvider, $httpProvider) {

  $httpProvider.interceptors.push('TokenInterceptor');

  $routeProvider
    .when('/login', {
      templateUrl: 'partials/login.html',
      controller: 'LoginCtrl',
      access: {
        requiredLogin: false
      }
    }).when('/', {
      templateUrl: 'partials/home.html',
      controller: 'HomeCtrl',
      access: {
        requiredLogin: true
      }
    }).when('/page1', {
      templateUrl: 'partials/page1.html',
      controller: 'Page1Ctrl',
      access: {
        requiredLogin: true
      }
    }).when('/page2', {
      templateUrl: 'partials/page2.html',
      controller: 'Page2Ctrl',
      access: {
        requiredLogin: true
      }
    }).when('/page3', {
      templateUrl: 'partials/page3.html',
      controller: 'Page3Ctrl',
      access: {
        requiredLogin: true
      }
    }).otherwise({
      redirectTo: '/login'
    });
});

myApp.run(function($rootScope, $window, $location, AuthenticationFactory) {
  // when the page refreshes, check if the user is already logged in
  AuthenticationFactory.check();

  $rootScope.$on("$routeChangeStart", function(event, nextRoute, currentRoute) {
    if ((nextRoute.access && nextRoute.access.requiredLogin) && !AuthenticationFactory.isLogged) {
      $location.path("/login");
    } else {
      // check if user object exists else fetch it. This is incase of a page refresh
      if (!AuthenticationFactory.user) AuthenticationFactory.user = $window.sessionStorage.user;
      if (!AuthenticationFactory.userRole) AuthenticationFactory.userRole = $window.sessionStorage.userRole;
    }
  });

  $rootScope.$on('$routeChangeSuccess', function(event, nextRoute, currentRoute) {
    $rootScope.showMenu = AuthenticationFactory.isLogged;
    $rootScope.role = AuthenticationFactory.userRole;
    // if the user is already logged in, take him to the home page
    if (AuthenticationFactory.isLogged == true && $location.path() == '/login') {
      $location.path('/');
    }
  });
});


================================================
FILE: ngClient/js/auth/auth.controller.js
================================================
myApp.controller('LoginCtrl', ['$scope', '$window', '$location', 'UserAuthFactory', 'AuthenticationFactory',
  function($scope, $window, $location, UserAuthFactory, AuthenticationFactory) {
    $scope.user = {
      username: 'arvind@myApp.com',
      password: 'pass123'
    };

    $scope.login = function() {

      var username = $scope.user.username,
        password = $scope.user.password;

      if (username !== undefined && password !== undefined) {
        UserAuthFactory.login(username, password).success(function(data) {
       
          AuthenticationFactory.isLogged = true;
          AuthenticationFactory.user = data.user.username;
          AuthenticationFactory.userRole = data.user.role;

          $window.sessionStorage.token = data.token;
          $window.sessionStorage.user = data.user.username; // to fetch the user details on refresh
          $window.sessionStorage.userRole = data.user.role; // to fetch the user details on refresh

          $location.path("/");

        }).error(function(status) {
          alert('Oops something went wrong!');
        });
      } else {
        alert('Invalid credentials');
      }

    };

  }
]);


================================================
FILE: ngClient/js/auth/auth.factory.js
================================================
myApp.factory('AuthenticationFactory', function($window) {
  var auth = {
    isLogged: false,
    check: function() {
      if ($window.sessionStorage.token && $window.sessionStorage.user) {
        this.isLogged = true;
      } else {
        this.isLogged = false;
        delete this.user;
      }
    }
  }

  return auth;
});

myApp.factory('UserAuthFactory', function($window, $location, $http, AuthenticationFactory) {
  return {
    login: function(username, password) {
      return $http.post('http://localhost:3000/login', {
        username: username,
        password: password
      });
    },
    logout: function() {

      if (AuthenticationFactory.isLogged) {

        AuthenticationFactory.isLogged = false;
        delete AuthenticationFactory.user;
        delete AuthenticationFactory.userRole;

        delete $window.sessionStorage.token;
        delete $window.sessionStorage.user;
        delete $window.sessionStorage.userRole;

        $location.path("/login");
      }

    }
  }
});

myApp.factory('TokenInterceptor', function($q, $window) {
  return {
    request: function(config) {
      config.headers = config.headers || {};
      if ($window.sessionStorage.token) {
        config.headers['X-Access-Token'] = $window.sessionStorage.token;
        config.headers['X-Key'] = $window.sessionStorage.user;
        config.headers['Content-Type'] = "application/json";
      }
      return config || $q.when(config);
    },

    response: function(response) {
      return response || $q.when(response);
    }
  };
});


================================================
FILE: ngClient/js/controllers.js
================================================
myApp.controller("HeaderCtrl", ['$scope', '$location', 'UserAuthFactory',
  function($scope, $location, UserAuthFactory) {

    $scope.isActive = function(route) {
      return route === $location.path();
    }

    $scope.logout = function () {
      UserAuthFactory.logout();
    }
  }
]);

myApp.controller("HomeCtrl", ['$scope',
  function($scope) {
    $scope.name = "Home Controller";
  }
]);

myApp.controller("Page1Ctrl", ['$scope',
  function($scope) {
    $scope.name = "Page1 Controller";
  }
]);

myApp.controller("Page2Ctrl", ['$scope',
  function($scope) {
    $scope.name = "Page2 Controller";
    // below data will be used by checkmark filter to show a ✓ or ✘ next to it
    $scope.list = ['yes', 'no', true, false, 1, 0];
  }
]);

myApp.controller("Page3Ctrl", ['$scope', 'dataFactory',
  function($scope, dataFactory) {
    $scope.products = [];

    // Access the factory and get the latest products list
    dataFactory.getProducts().then(function(data) {
      $scope.products = data.data;
    });

  }
]);


================================================
FILE: ngClient/js/directives.js
================================================
myApp.directive('printThis', function() {
  /** https://docs.angularjs.org/guide/directive **/

  var directiveDefinitionObject = {
    restrict: 'EA',
    template: '<input ng-model="data" placeholder="Type here"/> {{ data }}'
  }

  return directiveDefinitionObject;
});


================================================
FILE: ngClient/js/factory.js
================================================

myApp.factory('dataFactory', function($http) {
  /** https://docs.angularjs.org/guide/providers **/
  var urlBase = 'http://localhost:3000/api/v1/products';
  var _prodFactory = {};

  _prodFactory.getProducts = function() {
    return $http.get(urlBase);
  }; 

  return _prodFactory;
});



================================================
FILE: ngClient/js/filters.js
================================================
myApp.filter('checkmark', function() {
  /** https://docs.angularjs.org/guide/filter **/

  var filterFunction = function(input) {
    return input ? '\u2713' : '\u2718';
  };

  return filterFunction;
});


================================================
FILE: ngClient/libs/angular/.bower.json
================================================
{
  "name": "angular",
  "version": "1.2.25",
  "main": "./angular.js",
  "dependencies": {},
  "homepage": "https://github.com/angular/bower-angular",
  "_release": "1.2.25",
  "_resolution": {
    "type": "version",
    "tag": "v1.2.25",
    "commit": "0d956316b0472031ac895e57c14b8b2100eea9fb"
  },
  "_source": "git://github.com/angular/bower-angular.git",
  "_target": "~1.2.24",
  "_originalSource": "angular"
}

================================================
FILE: ngClient/libs/angular/README.md
================================================
# bower-angular

This repo is for distribution on `bower`. The source for this module is in the
[main AngularJS repo](https://github.com/angular/angular.js).
Please file issues and pull requests against that repo.

## Install

Install with `bower`:

```shell
bower install angular
```

Add a `<script>` to your `index.html`:

```html
<script src="/bower_components/angular/angular.js"></script>
```

## Documentation

Documentation is available on the
[AngularJS docs site](http://docs.angularjs.org/).

## License

The MIT License

Copyright (c) 2010-2012 Google, Inc. http://angularjs.org

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


================================================
FILE: ngClient/libs/angular/angular-csp.css
================================================
/* Include this file in your html if you are using the CSP mode. */

@charset "UTF-8";

[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak],
.ng-cloak, .x-ng-cloak,
.ng-hide {
  display: none !important;
}

ng\:form {
  display: block;
}

.ng-animate-block-transitions {
  transition:0s all!important;
  -webkit-transition:0s all!important;
}

/* show the element during a show/hide animation when the
 * animation is ongoing, but the .ng-hide class is active */
.ng-hide-add-active, .ng-hide-remove {
  display: block!important;
}


================================================
FILE: ngClient/libs/angular/angular.js
================================================
/**
 * @license AngularJS v1.2.25
 * (c) 2010-2014 Google, Inc. http://angularjs.org
 * License: MIT
 */
(function(window, document, undefined) {'use strict';

/**
 * @description
 *
 * This object provides a utility for producing rich Error messages within
 * Angular. It can be called as follows:
 *
 * var exampleMinErr = minErr('example');
 * throw exampleMinErr('one', 'This {0} is {1}', foo, bar);
 *
 * The above creates an instance of minErr in the example namespace. The
 * resulting error will have a namespaced error code of example.one.  The
 * resulting error will replace {0} with the value of foo, and {1} with the
 * value of bar. The object is not restricted in the number of arguments it can
 * take.
 *
 * If fewer arguments are specified than necessary for interpolation, the extra
 * interpolation markers will be preserved in the final string.
 *
 * Since data will be parsed statically during a build step, some restrictions
 * are applied with respect to how minErr instances are created and called.
 * Instances should have names of the form namespaceMinErr for a minErr created
 * using minErr('namespace') . Error codes, namespaces and template strings
 * should all be static strings, not variables or general expressions.
 *
 * @param {string} module The namespace to use for the new minErr instance.
 * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance
 */

function minErr(module) {
  return function () {
    var code = arguments[0],
      prefix = '[' + (module ? module + ':' : '') + code + '] ',
      template = arguments[1],
      templateArgs = arguments,
      stringify = function (obj) {
        if (typeof obj === 'function') {
          return obj.toString().replace(/ \{[\s\S]*$/, '');
        } else if (typeof obj === 'undefined') {
          return 'undefined';
        } else if (typeof obj !== 'string') {
          return JSON.stringify(obj);
        }
        return obj;
      },
      message, i;

    message = prefix + template.replace(/\{\d+\}/g, function (match) {
      var index = +match.slice(1, -1), arg;

      if (index + 2 < templateArgs.length) {
        arg = templateArgs[index + 2];
        if (typeof arg === 'function') {
          return arg.toString().replace(/ ?\{[\s\S]*$/, '');
        } else if (typeof arg === 'undefined') {
          return 'undefined';
        } else if (typeof arg !== 'string') {
          return toJson(arg);
        }
        return arg;
      }
      return match;
    });

    message = message + '\nhttp://errors.angularjs.org/1.2.25/' +
      (module ? module + '/' : '') + code;
    for (i = 2; i < arguments.length; i++) {
      message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +
        encodeURIComponent(stringify(arguments[i]));
    }

    return new Error(message);
  };
}

/* We need to tell jshint what variables are being exported */
/* global angular: true,
    msie: true,
    jqLite: true,
    jQuery: true,
    slice: true,
    push: true,
    toString: true,
    ngMinErr: true,
    angularModule: true,
    nodeName_: true,
    uid: true,
    VALIDITY_STATE_PROPERTY: true,

    lowercase: true,
    uppercase: true,
    manualLowercase: true,
    manualUppercase: true,
    nodeName_: true,
    isArrayLike: true,
    forEach: true,
    sortedKeys: true,
    forEachSorted: true,
    reverseParams: true,
    nextUid: true,
    setHashKey: true,
    extend: true,
    int: true,
    inherit: true,
    noop: true,
    identity: true,
    valueFn: true,
    isUndefined: true,
    isDefined: true,
    isObject: true,
    isString: true,
    isNumber: true,
    isDate: true,
    isArray: true,
    isFunction: true,
    isRegExp: true,
    isWindow: true,
    isScope: true,
    isFile: true,
    isBlob: true,
    isBoolean: true,
    isPromiseLike: true,
    trim: true,
    isElement: true,
    makeMap: true,
    map: true,
    size: true,
    includes: true,
    indexOf: true,
    arrayRemove: true,
    isLeafNode: true,
    copy: true,
    shallowCopy: true,
    equals: true,
    csp: true,
    concat: true,
    sliceArgs: true,
    bind: true,
    toJsonReplacer: true,
    toJson: true,
    fromJson: true,
    toBoolean: true,
    startingTag: true,
    tryDecodeURIComponent: true,
    parseKeyValue: true,
    toKeyValue: true,
    encodeUriSegment: true,
    encodeUriQuery: true,
    angularInit: true,
    bootstrap: true,
    snake_case: true,
    bindJQuery: true,
    assertArg: true,
    assertArgFn: true,
    assertNotHasOwnProperty: true,
    getter: true,
    getBlockElements: true,
    hasOwnProperty: true,
*/

////////////////////////////////////

/**
 * @ngdoc module
 * @name ng
 * @module ng
 * @description
 *
 * # ng (core module)
 * The ng module is loaded by default when an AngularJS application is started. The module itself
 * contains the essential components for an AngularJS application to function. The table below
 * lists a high level breakdown of each of the services/factories, filters, directives and testing
 * components available within this core module.
 *
 * <div doc-module-components="ng"></div>
 */

// The name of a form control's ValidityState property.
// This is used so that it's possible for internal tests to create mock ValidityStates.
var VALIDITY_STATE_PROPERTY = 'validity';

/**
 * @ngdoc function
 * @name angular.lowercase
 * @module ng
 * @kind function
 *
 * @description Converts the specified string to lowercase.
 * @param {string} string String to be converted to lowercase.
 * @returns {string} Lowercased string.
 */
var lowercase = function(string){return isString(string) ? string.toLowerCase() : string;};
var hasOwnProperty = Object.prototype.hasOwnProperty;

/**
 * @ngdoc function
 * @name angular.uppercase
 * @module ng
 * @kind function
 *
 * @description Converts the specified string to uppercase.
 * @param {string} string String to be converted to uppercase.
 * @returns {string} Uppercased string.
 */
var uppercase = function(string){return isString(string) ? string.toUpperCase() : string;};


var manualLowercase = function(s) {
  /* jshint bitwise: false */
  return isString(s)
      ? s.replace(/[A-Z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) | 32);})
      : s;
};
var manualUppercase = function(s) {
  /* jshint bitwise: false */
  return isString(s)
      ? s.replace(/[a-z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) & ~32);})
      : s;
};


// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish
// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods
// with correct but slower alternatives.
if ('i' !== 'I'.toLowerCase()) {
  lowercase = manualLowercase;
  uppercase = manualUppercase;
}


var /** holds major version number for IE or NaN for real browsers */
    msie,
    jqLite,           // delay binding since jQuery could be loaded after us.
    jQuery,           // delay binding
    slice             = [].slice,
    push              = [].push,
    toString          = Object.prototype.toString,
    ngMinErr          = minErr('ng'),

    /** @name angular */
    angular           = window.angular || (window.angular = {}),
    angularModule,
    nodeName_,
    uid               = ['0', '0', '0'];

/**
 * IE 11 changed the format of the UserAgent string.
 * See http://msdn.microsoft.com/en-us/library/ms537503.aspx
 */
msie = int((/msie (\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]);
if (isNaN(msie)) {
  msie = int((/trident\/.*; rv:(\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]);
}


/**
 * @private
 * @param {*} obj
 * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments,
 *                   String ...)
 */
function isArrayLike(obj) {
  if (obj == null || isWindow(obj)) {
    return false;
  }

  var length = obj.length;

  if (obj.nodeType === 1 && length) {
    return true;
  }

  return isString(obj) || isArray(obj) || length === 0 ||
         typeof length === 'number' && length > 0 && (length - 1) in obj;
}

/**
 * @ngdoc function
 * @name angular.forEach
 * @module ng
 * @kind function
 *
 * @description
 * Invokes the `iterator` function once for each item in `obj` collection, which can be either an
 * object or an array. The `iterator` function is invoked with `iterator(value, key)`, where `value`
 * is the value of an object property or an array element and `key` is the object property key or
 * array element index. Specifying a `context` for the function is optional.
 *
 * It is worth noting that `.forEach` does not iterate over inherited properties because it filters
 * using the `hasOwnProperty` method.
 *
   ```js
     var values = {name: 'misko', gender: 'male'};
     var log = [];
     angular.forEach(values, function(value, key) {
       this.push(key + ': ' + value);
     }, log);
     expect(log).toEqual(['name: misko', 'gender: male']);
   ```
 *
 * @param {Object|Array} obj Object to iterate over.
 * @param {Function} iterator Iterator function.
 * @param {Object=} context Object to become context (`this`) for the iterator function.
 * @returns {Object|Array} Reference to `obj`.
 */
function forEach(obj, iterator, context) {
  var key;
  if (obj) {
    if (isFunction(obj)) {
      for (key in obj) {
        // Need to check if hasOwnProperty exists,
        // as on IE8 the result of querySelectorAll is an object without a hasOwnProperty function
        if (key != 'prototype' && key != 'length' && key != 'name' && (!obj.hasOwnProperty || obj.hasOwnProperty(key))) {
          iterator.call(context, obj[key], key);
        }
      }
    } else if (isArray(obj) || isArrayLike(obj)) {
      for (key = 0; key < obj.length; key++) {
        iterator.call(context, obj[key], key);
      }
    } else if (obj.forEach && obj.forEach !== forEach) {
        obj.forEach(iterator, context);
    } else {
      for (key in obj) {
        if (obj.hasOwnProperty(key)) {
          iterator.call(context, obj[key], key);
        }
      }
    }
  }
  return obj;
}

function sortedKeys(obj) {
  var keys = [];
  for (var key in obj) {
    if (obj.hasOwnProperty(key)) {
      keys.push(key);
    }
  }
  return keys.sort();
}

function forEachSorted(obj, iterator, context) {
  var keys = sortedKeys(obj);
  for ( var i = 0; i < keys.length; i++) {
    iterator.call(context, obj[keys[i]], keys[i]);
  }
  return keys;
}


/**
 * when using forEach the params are value, key, but it is often useful to have key, value.
 * @param {function(string, *)} iteratorFn
 * @returns {function(*, string)}
 */
function reverseParams(iteratorFn) {
  return function(value, key) { iteratorFn(key, value); };
}

/**
 * A consistent way of creating unique IDs in angular. The ID is a sequence of alpha numeric
 * characters such as '012ABC'. The reason why we are not using simply a number counter is that
 * the number string gets longer over time, and it can also overflow, where as the nextId
 * will grow much slower, it is a string, and it will never overflow.
 *
 * @returns {string} an unique alpha-numeric string
 */
function nextUid() {
  var index = uid.length;
  var digit;

  while(index) {
    index--;
    digit = uid[index].charCodeAt(0);
    if (digit == 57 /*'9'*/) {
      uid[index] = 'A';
      return uid.join('');
    }
    if (digit == 90  /*'Z'*/) {
      uid[index] = '0';
    } else {
      uid[index] = String.fromCharCode(digit + 1);
      return uid.join('');
    }
  }
  uid.unshift('0');
  return uid.join('');
}


/**
 * Set or clear the hashkey for an object.
 * @param obj object
 * @param h the hashkey (!truthy to delete the hashkey)
 */
function setHashKey(obj, h) {
  if (h) {
    obj.$$hashKey = h;
  }
  else {
    delete obj.$$hashKey;
  }
}

/**
 * @ngdoc function
 * @name angular.extend
 * @module ng
 * @kind function
 *
 * @description
 * Extends the destination object `dst` by copying all of the properties from the `src` object(s)
 * to `dst`. You can specify multiple `src` objects.
 *
 * @param {Object} dst Destination object.
 * @param {...Object} src Source object(s).
 * @returns {Object} Reference to `dst`.
 */
function extend(dst) {
  var h = dst.$$hashKey;
  forEach(arguments, function(obj) {
    if (obj !== dst) {
      forEach(obj, function(value, key) {
        dst[key] = value;
      });
    }
  });

  setHashKey(dst,h);
  return dst;
}

function int(str) {
  return parseInt(str, 10);
}


function inherit(parent, extra) {
  return extend(new (extend(function() {}, {prototype:parent}))(), extra);
}

/**
 * @ngdoc function
 * @name angular.noop
 * @module ng
 * @kind function
 *
 * @description
 * A function that performs no operations. This function can be useful when writing code in the
 * functional style.
   ```js
     function foo(callback) {
       var result = calculateResult();
       (callback || angular.noop)(result);
     }
   ```
 */
function noop() {}
noop.$inject = [];


/**
 * @ngdoc function
 * @name angular.identity
 * @module ng
 * @kind function
 *
 * @description
 * A function that returns its first argument. This function is useful when writing code in the
 * functional style.
 *
   ```js
     function transformer(transformationFn, value) {
       return (transformationFn || angular.identity)(value);
     };
   ```
 */
function identity($) {return $;}
identity.$inject = [];


function valueFn(value) {return function() {return value;};}

/**
 * @ngdoc function
 * @name angular.isUndefined
 * @module ng
 * @kind function
 *
 * @description
 * Determines if a reference is undefined.
 *
 * @param {*} value Reference to check.
 * @returns {boolean} True if `value` is undefined.
 */
function isUndefined(value){return typeof value === 'undefined';}


/**
 * @ngdoc function
 * @name angular.isDefined
 * @module ng
 * @kind function
 *
 * @description
 * Determines if a reference is defined.
 *
 * @param {*} value Reference to check.
 * @returns {boolean} True if `value` is defined.
 */
function isDefined(value){return typeof value !== 'undefined';}


/**
 * @ngdoc function
 * @name angular.isObject
 * @module ng
 * @kind function
 *
 * @description
 * Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not
 * considered to be objects. Note that JavaScript arrays are objects.
 *
 * @param {*} value Reference to check.
 * @returns {boolean} True if `value` is an `Object` but not `null`.
 */
function isObject(value){return value != null && typeof value === 'object';}


/**
 * @ngdoc function
 * @name angular.isString
 * @module ng
 * @kind function
 *
 * @description
 * Determines if a reference is a `String`.
 *
 * @param {*} value Reference to check.
 * @returns {boolean} True if `value` is a `String`.
 */
function isString(value){return typeof value === 'string';}


/**
 * @ngdoc function
 * @name angular.isNumber
 * @module ng
 * @kind function
 *
 * @description
 * Determines if a reference is a `Number`.
 *
 * @param {*} value Reference to check.
 * @returns {boolean} True if `value` is a `Number`.
 */
function isNumber(value){return typeof value === 'number';}


/**
 * @ngdoc function
 * @name angular.isDate
 * @module ng
 * @kind function
 *
 * @description
 * Determines if a value is a date.
 *
 * @param {*} value Reference to check.
 * @returns {boolean} True if `value` is a `Date`.
 */
function isDate(value) {
  return toString.call(value) === '[object Date]';
}


/**
 * @ngdoc function
 * @name angular.isArray
 * @module ng
 * @kind function
 *
 * @description
 * Determines if a reference is an `Array`.
 *
 * @param {*} value Reference to check.
 * @returns {boolean} True if `value` is an `Array`.
 */
var isArray = (function() {
  if (!isFunction(Array.isArray)) {
    return function(value) {
      return toString.call(value) === '[object Array]';
    };
  }
  return Array.isArray;
})();

/**
 * @ngdoc function
 * @name angular.isFunction
 * @module ng
 * @kind function
 *
 * @description
 * Determines if a reference is a `Function`.
 *
 * @param {*} value Reference to check.
 * @returns {boolean} True if `value` is a `Function`.
 */
function isFunction(value){return typeof value === 'function';}


/**
 * Determines if a value is a regular expression object.
 *
 * @private
 * @param {*} value Reference to check.
 * @returns {boolean} True if `value` is a `RegExp`.
 */
function isRegExp(value) {
  return toString.call(value) === '[object RegExp]';
}


/**
 * Checks if `obj` is a window object.
 *
 * @private
 * @param {*} obj Object to check
 * @returns {boolean} True if `obj` is a window obj.
 */
function isWindow(obj) {
  return obj && obj.document && obj.location && obj.alert && obj.setInterval;
}


function isScope(obj) {
  return obj && obj.$evalAsync && obj.$watch;
}


function isFile(obj) {
  return toString.call(obj) === '[object File]';
}


function isBlob(obj) {
  return toString.call(obj) === '[object Blob]';
}


function isBoolean(value) {
  return typeof value === 'boolean';
}


function isPromiseLike(obj) {
  return obj && isFunction(obj.then);
}


var trim = (function() {
  // native trim is way faster: http://jsperf.com/angular-trim-test
  // but IE doesn't have it... :-(
  // TODO: we should move this into IE/ES5 polyfill
  if (!String.prototype.trim) {
    return function(value) {
      return isString(value) ? value.replace(/^\s\s*/, '').replace(/\s\s*$/, '') : value;
    };
  }
  return function(value) {
    return isString(value) ? value.trim() : value;
  };
})();


/**
 * @ngdoc function
 * @name angular.isElement
 * @module ng
 * @kind function
 *
 * @description
 * Determines if a reference is a DOM element (or wrapped jQuery element).
 *
 * @param {*} value Reference to check.
 * @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).
 */
function isElement(node) {
  return !!(node &&
    (node.nodeName  // we are a direct element
    || (node.prop && node.attr && node.find)));  // we have an on and find method part of jQuery API
}

/**
 * @param str 'key1,key2,...'
 * @returns {object} in the form of {key1:true, key2:true, ...}
 */
function makeMap(str) {
  var obj = {}, items = str.split(","), i;
  for ( i = 0; i < items.length; i++ )
    obj[ items[i] ] = true;
  return obj;
}


if (msie < 9) {
  nodeName_ = function(element) {
    element = element.nodeName ? element : element[0];
    return (element.scopeName && element.scopeName != 'HTML')
      ? uppercase(element.scopeName + ':' + element.nodeName) : element.nodeName;
  };
} else {
  nodeName_ = function(element) {
    return element.nodeName ? element.nodeName : element[0].nodeName;
  };
}


function map(obj, iterator, context) {
  var results = [];
  forEach(obj, function(value, index, list) {
    results.push(iterator.call(context, value, index, list));
  });
  return results;
}


/**
 * @description
 * Determines the number of elements in an array, the number of properties an object has, or
 * the length of a string.
 *
 * Note: This function is used to augment the Object type in Angular expressions. See
 * {@link angular.Object} for more information about Angular arrays.
 *
 * @param {Object|Array|string} obj Object, array, or string to inspect.
 * @param {boolean} [ownPropsOnly=false] Count only "own" properties in an object
 * @returns {number} The size of `obj` or `0` if `obj` is neither an object nor an array.
 */
function size(obj, ownPropsOnly) {
  var count = 0, key;

  if (isArray(obj) || isString(obj)) {
    return obj.length;
  } else if (isObject(obj)) {
    for (key in obj)
      if (!ownPropsOnly || obj.hasOwnProperty(key))
        count++;
  }

  return count;
}


function includes(array, obj) {
  return indexOf(array, obj) != -1;
}

function indexOf(array, obj) {
  if (array.indexOf) return array.indexOf(obj);

  for (var i = 0; i < array.length; i++) {
    if (obj === array[i]) return i;
  }
  return -1;
}

function arrayRemove(array, value) {
  var index = indexOf(array, value);
  if (index >=0)
    array.splice(index, 1);
  return value;
}

function isLeafNode (node) {
  if (node) {
    switch (node.nodeName) {
    case "OPTION":
    case "PRE":
    case "TITLE":
      return true;
    }
  }
  return false;
}

/**
 * @ngdoc function
 * @name angular.copy
 * @module ng
 * @kind function
 *
 * @description
 * Creates a deep copy of `source`, which should be an object or an array.
 *
 * * If no destination is supplied, a copy of the object or array is created.
 * * If a destination is provided, all of its elements (for array) or properties (for objects)
 *   are deleted and then all elements/properties from the source are copied to it.
 * * If `source` is not an object or array (inc. `null` and `undefined`), `source` is returned.
 * * If `source` is identical to 'destination' an exception will be thrown.
 *
 * @param {*} source The source that will be used to make a copy.
 *                   Can be any type, including primitives, `null`, and `undefined`.
 * @param {(Object|Array)=} destination Destination into which the source is copied. If
 *     provided, must be of the same type as `source`.
 * @returns {*} The copy or updated `destination`, if `destination` was specified.
 *
 * @example
 <example module="copyExample">
 <file name="index.html">
 <div ng-controller="ExampleController">
 <form novalidate class="simple-form">
 Name: <input type="text" ng-model="user.name" /><br />
 E-mail: <input type="email" ng-model="user.email" /><br />
 Gender: <input type="radio" ng-model="user.gender" value="male" />male
 <input type="radio" ng-model="user.gender" value="female" />female<br />
 <button ng-click="reset()">RESET</button>
 <button ng-click="update(user)">SAVE</button>
 </form>
 <pre>form = {{user | json}}</pre>
 <pre>master = {{master | json}}</pre>
 </div>

 <script>
  angular.module('copyExample', [])
    .controller('ExampleController', ['$scope', function($scope) {
      $scope.master= {};

      $scope.update = function(user) {
        // Example with 1 argument
        $scope.master= angular.copy(user);
      };

      $scope.reset = function() {
        // Example with 2 arguments
        angular.copy($scope.master, $scope.user);
      };

      $scope.reset();
    }]);
 </script>
 </file>
 </example>
 */
function copy(source, destination, stackSource, stackDest) {
  if (isWindow(source) || isScope(source)) {
    throw ngMinErr('cpws',
      "Can't copy! Making copies of Window or Scope instances is not supported.");
  }

  if (!destination) {
    destination = source;
    if (source) {
      if (isArray(source)) {
        destination = copy(source, [], stackSource, stackDest);
      } else if (isDate(source)) {
        destination = new Date(source.getTime());
      } else if (isRegExp(source)) {
        destination = new RegExp(source.source, source.toString().match(/[^\/]*$/)[0]);
        destination.lastIndex = source.lastIndex;
      } else if (isObject(source)) {
        destination = copy(source, {}, stackSource, stackDest);
      }
    }
  } else {
    if (source === destination) throw ngMinErr('cpi',
      "Can't copy! Source and destination are identical.");

    stackSource = stackSource || [];
    stackDest = stackDest || [];

    if (isObject(source)) {
      var index = indexOf(stackSource, source);
      if (index !== -1) return stackDest[index];

      stackSource.push(source);
      stackDest.push(destination);
    }

    var result;
    if (isArray(source)) {
      destination.length = 0;
      for ( var i = 0; i < source.length; i++) {
        result = copy(source[i], null, stackSource, stackDest);
        if (isObject(source[i])) {
          stackSource.push(source[i]);
          stackDest.push(result);
        }
        destination.push(result);
      }
    } else {
      var h = destination.$$hashKey;
      if (isArray(destination)) {
        destination.length = 0;
      } else {
        forEach(destination, function(value, key) {
          delete destination[key];
        });
      }
      for ( var key in source) {
        result = copy(source[key], null, stackSource, stackDest);
        if (isObject(source[key])) {
          stackSource.push(source[key]);
          stackDest.push(result);
        }
        destination[key] = result;
      }
      setHashKey(destination,h);
    }

  }
  return destination;
}

/**
 * Creates a shallow copy of an object, an array or a primitive
 */
function shallowCopy(src, dst) {
  if (isArray(src)) {
    dst = dst || [];

    for ( var i = 0; i < src.length; i++) {
      dst[i] = src[i];
    }
  } else if (isObject(src)) {
    dst = dst || {};

    for (var key in src) {
      if (hasOwnProperty.call(src, key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) {
        dst[key] = src[key];
      }
    }
  }

  return dst || src;
}


/**
 * @ngdoc function
 * @name angular.equals
 * @module ng
 * @kind function
 *
 * @description
 * Determines if two objects or two values are equivalent. Supports value types, regular
 * expressions, arrays and objects.
 *
 * Two objects or values are considered equivalent if at least one of the following is true:
 *
 * * Both objects or values pass `===` comparison.
 * * Both objects or values are of the same type and all of their properties are equal by
 *   comparing them with `angular.equals`.
 * * Both values are NaN. (In JavaScript, NaN == NaN => false. But we consider two NaN as equal)
 * * Both values represent the same regular expression (In JavaScript,
 *   /abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual
 *   representation matches).
 *
 * During a property comparison, properties of `function` type and properties with names
 * that begin with `$` are ignored.
 *
 * Scope and DOMWindow objects are being compared only by identify (`===`).
 *
 * @param {*} o1 Object or value to compare.
 * @param {*} o2 Object or value to compare.
 * @returns {boolean} True if arguments are equal.
 */
function equals(o1, o2) {
  if (o1 === o2) return true;
  if (o1 === null || o2 === null) return false;
  if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN
  var t1 = typeof o1, t2 = typeof o2, length, key, keySet;
  if (t1 == t2) {
    if (t1 == 'object') {
      if (isArray(o1)) {
        if (!isArray(o2)) return false;
        if ((length = o1.length) == o2.length) {
          for(key=0; key<length; key++) {
            if (!equals(o1[key], o2[key])) return false;
          }
          return true;
        }
      } else if (isDate(o1)) {
        if (!isDate(o2)) return false;
        return (isNaN(o1.getTime()) && isNaN(o2.getTime())) || (o1.getTime() === o2.getTime());
      } else if (isRegExp(o1) && isRegExp(o2)) {
        return o1.toString() == o2.toString();
      } else {
        if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2) || isArray(o2)) return false;
        keySet = {};
        for(key in o1) {
          if (key.charAt(0) === '$' || isFunction(o1[key])) continue;
          if (!equals(o1[key], o2[key])) return false;
          keySet[key] = true;
        }
        for(key in o2) {
          if (!keySet.hasOwnProperty(key) &&
              key.charAt(0) !== '$' &&
              o2[key] !== undefined &&
              !isFunction(o2[key])) return false;
        }
        return true;
      }
    }
  }
  return false;
}

var csp = function() {
  if (isDefined(csp.isActive_)) return csp.isActive_;

  var active = !!(document.querySelector('[ng-csp]') ||
                  document.querySelector('[data-ng-csp]'));

  if (!active) {
    try {
      /* jshint -W031, -W054 */
      new Function('');
      /* jshint +W031, +W054 */
    } catch (e) {
      active = true;
    }
  }

  return (csp.isActive_ = active);
};



function concat(array1, array2, index) {
  return array1.concat(slice.call(array2, index));
}

function sliceArgs(args, startIndex) {
  return slice.call(args, startIndex || 0);
}


/* jshint -W101 */
/**
 * @ngdoc function
 * @name angular.bind
 * @module ng
 * @kind function
 *
 * @description
 * Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for
 * `fn`). You can supply optional `args` that are prebound to the function. This feature is also
 * known as [partial application](http://en.wikipedia.org/wiki/Partial_application), as
 * distinguished from [function currying](http://en.wikipedia.org/wiki/Currying#Contrast_with_partial_function_application).
 *
 * @param {Object} self Context which `fn` should be evaluated in.
 * @param {function()} fn Function to be bound.
 * @param {...*} args Optional arguments to be prebound to the `fn` function call.
 * @returns {function()} Function that wraps the `fn` with all the specified bindings.
 */
/* jshint +W101 */
function bind(self, fn) {
  var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : [];
  if (isFunction(fn) && !(fn instanceof RegExp)) {
    return curryArgs.length
      ? function() {
          return arguments.length
            ? fn.apply(self, curryArgs.concat(slice.call(arguments, 0)))
            : fn.apply(self, curryArgs);
        }
      : function() {
          return arguments.length
            ? fn.apply(self, arguments)
            : fn.call(self);
        };
  } else {
    // in IE, native methods are not functions so they cannot be bound (note: they don't need to be)
    return fn;
  }
}


function toJsonReplacer(key, value) {
  var val = value;

  if (typeof key === 'string' && key.charAt(0) === '$') {
    val = undefined;
  } else if (isWindow(value)) {
    val = '$WINDOW';
  } else if (value &&  document === value) {
    val = '$DOCUMENT';
  } else if (isScope(value)) {
    val = '$SCOPE';
  }

  return val;
}


/**
 * @ngdoc function
 * @name angular.toJson
 * @module ng
 * @kind function
 *
 * @description
 * Serializes input into a JSON-formatted string. Properties with leading $ characters will be
 * stripped since angular uses this notation internally.
 *
 * @param {Object|Array|Date|string|number} obj Input to be serialized into JSON.
 * @param {boolean=} pretty If set to true, the JSON output will contain newlines and whitespace.
 * @returns {string|undefined} JSON-ified string representing `obj`.
 */
function toJson(obj, pretty) {
  if (typeof obj === 'undefined') return undefined;
  return JSON.stringify(obj, toJsonReplacer, pretty ? '  ' : null);
}


/**
 * @ngdoc function
 * @name angular.fromJson
 * @module ng
 * @kind function
 *
 * @description
 * Deserializes a JSON string.
 *
 * @param {string} json JSON string to deserialize.
 * @returns {Object|Array|string|number} Deserialized thingy.
 */
function fromJson(json) {
  return isString(json)
      ? JSON.parse(json)
      : json;
}


function toBoolean(value) {
  if (typeof value === 'function') {
    value = true;
  } else if (value && value.length !== 0) {
    var v = lowercase("" + value);
    value = !(v == 'f' || v == '0' || v == 'false' || v == 'no' || v == 'n' || v == '[]');
  } else {
    value = false;
  }
  return value;
}

/**
 * @returns {string} Returns the string representation of the element.
 */
function startingTag(element) {
  element = jqLite(element).clone();
  try {
    // turns out IE does not let you set .html() on elements which
    // are not allowed to have children. So we just ignore it.
    element.empty();
  } catch(e) {}
  // As Per DOM Standards
  var TEXT_NODE = 3;
  var elemHtml = jqLite('<div>').append(element).html();
  try {
    return element[0].nodeType === TEXT_NODE ? lowercase(elemHtml) :
        elemHtml.
          match(/^(<[^>]+>)/)[1].
          replace(/^<([\w\-]+)/, function(match, nodeName) { return '<' + lowercase(nodeName); });
  } catch(e) {
    return lowercase(elemHtml);
  }

}


/////////////////////////////////////////////////

/**
 * Tries to decode the URI component without throwing an exception.
 *
 * @private
 * @param str value potential URI component to check.
 * @returns {boolean} True if `value` can be decoded
 * with the decodeURIComponent function.
 */
function tryDecodeURIComponent(value) {
  try {
    return decodeURIComponent(value);
  } catch(e) {
    // Ignore any invalid uri component
  }
}


/**
 * Parses an escaped url query string into key-value pairs.
 * @returns {Object.<string,boolean|Array>}
 */
function parseKeyValue(/**string*/keyValue) {
  var obj = {}, key_value, key;
  forEach((keyValue || "").split('&'), function(keyValue) {
    if ( keyValue ) {
      key_value = keyValue.replace(/\+/g,'%20').split('=');
      key = tryDecodeURIComponent(key_value[0]);
      if ( isDefined(key) ) {
        var val = isDefined(key_value[1]) ? tryDecodeURIComponent(key_value[1]) : true;
        if (!hasOwnProperty.call(obj, key)) {
          obj[key] = val;
        } else if(isArray(obj[key])) {
          obj[key].push(val);
        } else {
          obj[key] = [obj[key],val];
        }
      }
    }
  });
  return obj;
}

function toKeyValue(obj) {
  var parts = [];
  forEach(obj, function(value, key) {
    if (isArray(value)) {
      forEach(value, function(arrayValue) {
        parts.push(encodeUriQuery(key, true) +
                   (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true)));
      });
    } else {
    parts.push(encodeUriQuery(key, true) +
               (value === true ? '' : '=' + encodeUriQuery(value, true)));
    }
  });
  return parts.length ? parts.join('&') : '';
}


/**
 * We need our custom method because encodeURIComponent is too aggressive and doesn't follow
 * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path
 * segments:
 *    segment       = *pchar
 *    pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
 *    pct-encoded   = "%" HEXDIG HEXDIG
 *    unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
 *    sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
 *                     / "*" / "+" / "," / ";" / "="
 */
function encodeUriSegment(val) {
  return encodeUriQuery(val, true).
             replace(/%26/gi, '&').
             replace(/%3D/gi, '=').
             replace(/%2B/gi, '+');
}


/**
 * This method is intended for encoding *key* or *value* parts of query component. We need a custom
 * method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be
 * encoded per http://tools.ietf.org/html/rfc3986:
 *    query       = *( pchar / "/" / "?" )
 *    pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
 *    unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
 *    pct-encoded   = "%" HEXDIG HEXDIG
 *    sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
 *                     / "*" / "+" / "," / ";" / "="
 */
function encodeUriQuery(val, pctEncodeSpaces) {
  return encodeURIComponent(val).
             replace(/%40/gi, '@').
             replace(/%3A/gi, ':').
             replace(/%24/g, '$').
             replace(/%2C/gi, ',').
             replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));
}


/**
 * @ngdoc directive
 * @name ngApp
 * @module ng
 *
 * @element ANY
 * @param {angular.Module} ngApp an optional application
 *   {@link angular.module module} name to load.
 *
 * @description
 *
 * Use this directive to **auto-bootstrap** an AngularJS application. The `ngApp` directive
 * designates the **root element** of the application and is typically placed near the root element
 * of the page - e.g. on the `<body>` or `<html>` tags.
 *
 * Only one AngularJS application can be auto-bootstrapped per HTML document. The first `ngApp`
 * found in the document will be used to define the root element to auto-bootstrap as an
 * application. To run multiple applications in an HTML document you must manually bootstrap them using
 * {@link angular.bootstrap} instead. AngularJS applications cannot be nested within each other.
 *
 * You can specify an **AngularJS module** to be used as the root module for the application.  This
 * module will be loaded into the {@link auto.$injector} when the application is bootstrapped and
 * should contain the application code needed or have dependencies on other modules that will
 * contain the code. See {@link angular.module} for more information.
 *
 * In the example below if the `ngApp` directive were not placed on the `html` element then the
 * document would not be compiled, the `AppController` would not be instantiated and the `{{ a+b }}`
 * would not be resolved to `3`.
 *
 * `ngApp` is the easiest, and most common, way to bootstrap an application.
 *
 <example module="ngAppDemo">
   <file name="index.html">
   <div ng-controller="ngAppDemoController">
     I can add: {{a}} + {{b}} =  {{ a+b }}
   </div>
   </file>
   <file name="script.js">
   angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) {
     $scope.a = 1;
     $scope.b = 2;
   });
   </file>
 </example>
 *
 */
function angularInit(element, bootstrap) {
  var elements = [element],
      appElement,
      module,
      names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'],
      NG_APP_CLASS_REGEXP = /\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;

  function append(element) {
    element && elements.push(element);
  }

  forEach(names, function(name) {
    names[name] = true;
    append(document.getElementById(name));
    name = name.replace(':', '\\:');
    if (element.querySelectorAll) {
      forEach(element.querySelectorAll('.' + name), append);
      forEach(element.querySelectorAll('.' + name + '\\:'), append);
      forEach(element.querySelectorAll('[' + name + ']'), append);
    }
  });

  forEach(elements, function(element) {
    if (!appElement) {
      var className = ' ' + element.className + ' ';
      var match = NG_APP_CLASS_REGEXP.exec(className);
      if (match) {
        appElement = element;
        module = (match[2] || '').replace(/\s+/g, ',');
      } else {
        forEach(element.attributes, function(attr) {
          if (!appElement && names[attr.name]) {
            appElement = element;
            module = attr.value;
          }
        });
      }
    }
  });
  if (appElement) {
    bootstrap(appElement, module ? [module] : []);
  }
}

/**
 * @ngdoc function
 * @name angular.bootstrap
 * @module ng
 * @description
 * Use this function to manually start up angular application.
 *
 * See: {@link guide/bootstrap Bootstrap}
 *
 * Note that ngScenario-based end-to-end tests cannot use this function to bootstrap manually.
 * They must use {@link ng.directive:ngApp ngApp}.
 *
 * Angular will detect if it has been loaded into the browser more than once and only allow the
 * first loaded script to be bootstrapped and will report a warning to the browser console for
 * each of the subsequent scripts. This prevents strange results in applications, where otherwise
 * multiple instances of Angular try to work on the DOM.
 *
 * <example name="multi-bootstrap" module="multi-bootstrap">
 * <file name="index.html">
 * <script src="../../../angular.js"></script>
 * <div ng-controller="BrokenTable">
 *   <table>
 *   <tr>
 *     <th ng-repeat="heading in headings">{{heading}}</th>
 *   </tr>
 *   <tr ng-repeat="filling in fillings">
 *     <td ng-repeat="fill in filling">{{fill}}</td>
 *   </tr>
 * </table>
 * </div>
 * </file>
 * <file name="controller.js">
 * var app = angular.module('multi-bootstrap', [])
 *
 * .controller('BrokenTable', function($scope) {
 *     $scope.headings = ['One', 'Two', 'Three'];
 *     $scope.fillings = [[1, 2, 3], ['A', 'B', 'C'], [7, 8, 9]];
 * });
 * </file>
 * <file name="protractor.js" type="protractor">
 * it('should only insert one table cell for each item in $scope.fillings', function() {
 *  expect(element.all(by.css('td')).count())
 *      .toBe(9);
 * });
 * </file>
 * </example>
 *
 * @param {DOMElement} element DOM element which is the root of angular application.
 * @param {Array<String|Function|Array>=} modules an array of modules to load into the application.
 *     Each item in the array should be the name of a predefined module or a (DI annotated)
 *     function that will be invoked by the injector as a run block.
 *     See: {@link angular.module modules}
 * @returns {auto.$injector} Returns the newly created injector for this app.
 */
function bootstrap(element, modules) {
  var doBootstrap = function() {
    element = jqLite(element);

    if (element.injector()) {
      var tag = (element[0] === document) ? 'document' : startingTag(element);
      //Encode angle brackets to prevent input from being sanitized to empty string #8683
      throw ngMinErr(
          'btstrpd',
          "App Already Bootstrapped with this Element '{0}'",
          tag.replace(/</,'&lt;').replace(/>/,'&gt;'));
    }

    modules = modules || [];
    modules.unshift(['$provide', function($provide) {
      $provide.value('$rootElement', element);
    }]);
    modules.unshift('ng');
    var injector = createInjector(modules);
    injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector', '$animate',
       function(scope, element, compile, injector, animate) {
        scope.$apply(function() {
          element.data('$injector', injector);
          compile(element)(scope);
        });
      }]
    );
    return injector;
  };

  var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/;

  if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) {
    return doBootstrap();
  }

  window.name = window.name.replace(NG_DEFER_BOOTSTRAP, '');
  angular.resumeBootstrap = function(extraModules) {
    forEach(extraModules, function(module) {
      modules.push(module);
    });
    doBootstrap();
  };
}

var SNAKE_CASE_REGEXP = /[A-Z]/g;
function snake_case(name, separator) {
  separator = separator || '_';
  return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {
    return (pos ? separator : '') + letter.toLowerCase();
  });
}

function bindJQuery() {
  // bind to jQuery if present;
  jQuery = window.jQuery;
  // Use jQuery if it exists with proper functionality, otherwise default to us.
  // Angular 1.2+ requires jQuery 1.7.1+ for on()/off() support.
  if (jQuery && jQuery.fn.on) {
    jqLite = jQuery;
    extend(jQuery.fn, {
      scope: JQLitePrototype.scope,
      isolateScope: JQLitePrototype.isolateScope,
      controller: JQLitePrototype.controller,
      injector: JQLitePrototype.injector,
      inheritedData: JQLitePrototype.inheritedData
    });
    // Method signature:
    //     jqLitePatchJQueryRemove(name, dispatchThis, filterElems, getterIfNoArguments)
    jqLitePatchJQueryRemove('remove', true, true, false);
    jqLitePatchJQueryRemove('empty', false, false, false);
    jqLitePatchJQueryRemove('html', false, false, true);
  } else {
    jqLite = JQLite;
  }
  angular.element = jqLite;
}

/**
 * throw error if the argument is falsy.
 */
function assertArg(arg, name, reason) {
  if (!arg) {
    throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required"));
  }
  return arg;
}

function assertArgFn(arg, name, acceptArrayAnnotation) {
  if (acceptArrayAnnotation && isArray(arg)) {
      arg = arg[arg.length - 1];
  }

  assertArg(isFunction(arg), name, 'not a function, got ' +
      (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg));
  return arg;
}

/**
 * throw error if the name given is hasOwnProperty
 * @param  {String} name    the name to test
 * @param  {String} context the context in which the name is used, such as module or directive
 */
function assertNotHasOwnProperty(name, context) {
  if (name === 'hasOwnProperty') {
    throw ngMinErr('badname', "hasOwnProperty is not a valid {0} name", context);
  }
}

/**
 * Return the value accessible from the object by path. Any undefined traversals are ignored
 * @param {Object} obj starting object
 * @param {String} path path to traverse
 * @param {boolean} [bindFnToScope=true]
 * @returns {Object} value as accessible by path
 */
//TODO(misko): this function needs to be removed
function getter(obj, path, bindFnToScope) {
  if (!path) return obj;
  var keys = path.split('.');
  var key;
  var lastInstance = obj;
  var len = keys.length;

  for (var i = 0; i < len; i++) {
    key = keys[i];
    if (obj) {
      obj = (lastInstance = obj)[key];
    }
  }
  if (!bindFnToScope && isFunction(obj)) {
    return bind(lastInstance, obj);
  }
  return obj;
}

/**
 * Return the DOM siblings between the first and last node in the given array.
 * @param {Array} array like object
 * @returns {DOMElement} object containing the elements
 */
function getBlockElements(nodes) {
  var startNode = nodes[0],
      endNode = nodes[nodes.length - 1];
  if (startNode === endNode) {
    return jqLite(startNode);
  }

  var element = startNode;
  var elements = [element];

  do {
    element = element.nextSibling;
    if (!element) break;
    elements.push(element);
  } while (element !== endNode);

  return jqLite(elements);
}

/**
 * @ngdoc type
 * @name angular.Module
 * @module ng
 * @description
 *
 * Interface for configuring angular {@link angular.module modules}.
 */

function setupModuleLoader(window) {

  var $injectorMinErr = minErr('$injector');
  var ngMinErr = minErr('ng');

  function ensure(obj, name, factory) {
    return obj[name] || (obj[name] = factory());
  }

  var angular = ensure(window, 'angular', Object);

  // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap
  angular.$$minErr = angular.$$minErr || minErr;

  return ensure(angular, 'module', function() {
    /** @type {Object.<string, angular.Module>} */
    var modules = {};

    /**
     * @ngdoc function
     * @name angular.module
     * @module ng
     * @description
     *
     * The `angular.module` is a global place for creating, registering and retrieving Angular
     * modules.
     * All modules (angular core or 3rd party) that should be available to an application must be
     * registered using this mechanism.
     *
     * When passed two or more arguments, a new module is created.  If passed only one argument, an
     * existing module (the name passed as the first argument to `module`) is retrieved.
     *
     *
     * # Module
     *
     * A module is a collection of services, directives, controllers, filters, and configuration information.
     * `angular.module` is used to configure the {@link auto.$injector $injector}.
     *
     * ```js
     * // Create a new module
     * var myModule = angular.module('myModule', []);
     *
     * // register a new service
     * myModule.value('appName', 'MyCoolApp');
     *
     * // configure existing services inside initialization blocks.
     * myModule.config(['$locationProvider', function($locationProvider) {
     *   // Configure existing providers
     *   $locationProvider.hashPrefix('!');
     * }]);
     * ```
     *
     * Then you can create an injector and load your modules like this:
     *
     * ```js
     * var injector = angular.injector(['ng', 'myModule'])
     * ```
     *
     * However it's more likely that you'll just use
     * {@link ng.directive:ngApp ngApp} or
     * {@link angular.bootstrap} to simplify this process for you.
     *
     * @param {!string} name The name of the module to create or retrieve.
     * @param {!Array.<string>=} requires If specified then new module is being created. If
     *        unspecified then the module is being retrieved for further configuration.
     * @param {Function=} configFn Optional configuration function for the module. Same as
     *        {@link angular.Module#config Module#config()}.
     * @returns {module} new module with the {@link angular.Module} api.
     */
    return function module(name, requires, configFn) {
      var assertNotHasOwnProperty = function(name, context) {
        if (name === 'hasOwnProperty') {
          throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);
        }
      };

      assertNotHasOwnProperty(name, 'module');
      if (requires && modules.hasOwnProperty(name)) {
        modules[name] = null;
      }
      return ensure(modules, name, function() {
        if (!requires) {
          throw $injectorMinErr('nomod', "Module '{0}' is not available! You either misspelled " +
             "the module name or forgot to load it. If registering a module ensure that you " +
             "specify the dependencies as the second argument.", name);
        }

        /** @type {!Array.<Array.<*>>} */
        var invokeQueue = [];

        /** @type {!Array.<Function>} */
        var runBlocks = [];

        var config = invokeLater('$injector', 'invoke');

        /** @type {angular.Module} */
        var moduleInstance = {
          // Private state
          _invokeQueue: invokeQueue,
          _runBlocks: runBlocks,

          /**
           * @ngdoc property
           * @name angular.Module#requires
           * @module ng
           *
           * @description
           * Holds the list of modules which the injector will load before the current module is
           * loaded.
           */
          requires: requires,

          /**
           * @ngdoc property
           * @name angular.Module#name
           * @module ng
           *
           * @description
           * Name of the module.
           */
          name: name,


          /**
           * @ngdoc method
           * @name angular.Module#provider
           * @module ng
           * @param {string} name service name
           * @param {Function} providerType Construction function for creating new instance of the
           *                                service.
           * @description
           * See {@link auto.$provide#provider $provide.provider()}.
           */
          provider: invokeLater('$provide', 'provider'),

          /**
           * @ngdoc method
           * @name angular.Module#factory
           * @module ng
           * @param {string} name service name
           * @param {Function} providerFunction Function for creating new instance of the service.
           * @description
           * See {@link auto.$provide#factory $provide.factory()}.
           */
          factory: invokeLater('$provide', 'factory'),

          /**
           * @ngdoc method
           * @name angular.Module#service
           * @module ng
           * @param {string} name service name
           * @param {Function} constructor A constructor function that will be instantiated.
           * @description
           * See {@link auto.$provide#service $provide.service()}.
           */
          service: invokeLater('$provide', 'service'),

          /**
           * @ngdoc method
           * @name angular.Module#value
           * @module ng
           * @param {string} name service name
           * @param {*} object Service instance object.
           * @description
           * See {@link auto.$provide#value $provide.value()}.
           */
          value: invokeLater('$provide', 'value'),

          /**
           * @ngdoc method
           * @name angular.Module#constant
           * @module ng
           * @param {string} name constant name
           * @param {*} object Constant value.
           * @description
           * Because the constant are fixed, they get applied before other provide methods.
           * See {@link auto.$provide#constant $provide.constant()}.
           */
          constant: invokeLater('$provide', 'constant', 'unshift'),

          /**
           * @ngdoc method
           * @name angular.Module#animation
           * @module ng
           * @param {string} name animation name
           * @param {Function} animationFactory Factory function for creating new instance of an
           *                                    animation.
           * @description
           *
           * **NOTE**: animations take effect only if the **ngAnimate** module is loaded.
           *
           *
           * Defines an animation hook that can be later used with
           * {@link ngAnimate.$animate $animate} service and directives that use this service.
           *
           * ```js
           * module.animation('.animation-name', function($inject1, $inject2) {
           *   return {
           *     eventName : function(element, done) {
           *       //code to run the animation
           *       //once complete, then run done()
           *       return function cancellationFunction(element) {
           *         //code to cancel the animation
           *       }
           *     }
           *   }
           * })
           * ```
           *
           * See {@link ngAnimate.$animateProvider#register $animateProvider.register()} and
           * {@link ngAnimate ngAnimate module} for more information.
           */
          animation: invokeLater('$animateProvider', 'register'),

          /**
           * @ngdoc method
           * @name angular.Module#filter
           * @module ng
           * @param {string} name Filter name.
           * @param {Function} filterFactory Factory function for creating new instance of filter.
           * @description
           * See {@link ng.$filterProvider#register $filterProvider.register()}.
           */
          filter: invokeLater('$filterProvider', 'register'),

          /**
           * @ngdoc method
           * @name angular.Module#controller
           * @module ng
           * @param {string|Object} name Controller name, or an object map of controllers where the
           *    keys are the names and the values are the constructors.
           * @param {Function} constructor Controller constructor function.
           * @description
           * See {@link ng.$controllerProvider#register $controllerProvider.register()}.
           */
          controller: invokeLater('$controllerProvider', 'register'),

          /**
           * @ngdoc method
           * @name angular.Module#directive
           * @module ng
           * @param {string|Object} name Directive name, or an object map of directives where the
           *    keys are the names and the values are the factories.
           * @param {Function} directiveFactory Factory function for creating new instance of
           * directives.
           * @description
           * See {@link ng.$compileProvider#directive $compileProvider.directive()}.
           */
          directive: invokeLater('$compileProvider', 'directive'),

          /**
           * @ngdoc method
           * @name angular.Module#config
           * @module ng
           * @param {Function} configFn Execute this function on module load. Useful for service
           *    configuration.
           * @description
           * Use this method to register work which needs to be performed on module loading.
           * For more about how to configure services, see
           * {@link providers#providers_provider-recipe Provider Recipe}.
           */
          config: config,

          /**
           * @ngdoc method
           * @name angular.Module#run
           * @module ng
           * @param {Function} initializationFn Execute this function after injector creation.
           *    Useful for application initialization.
           * @description
           * Use this method to register work which should be performed when the injector is done
           * loading all modules.
           */
          run: function(block) {
            runBlocks.push(block);
            return this;
          }
        };

        if (configFn) {
          config(configFn);
        }

        return  moduleInstance;

        /**
         * @param {string} provider
         * @param {string} method
         * @param {String=} insertMethod
         * @returns {angular.Module}
         */
        function invokeLater(provider, method, insertMethod) {
          return function() {
            invokeQueue[insertMethod || 'push']([provider, method, arguments]);
            return moduleInstance;
          };
        }
      });
    };
  });

}

/* global angularModule: true,
  version: true,

  $LocaleProvider,
  $CompileProvider,

    htmlAnchorDirective,
    inputDirective,
    inputDirective,
    formDirective,
    scriptDirective,
    selectDirective,
    styleDirective,
    optionDirective,
    ngBindDirective,
    ngBindHtmlDirective,
    ngBindTemplateDirective,
    ngClassDirective,
    ngClassEvenDirective,
    ngClassOddDirective,
    ngCspDirective,
    ngCloakDirective,
    ngControllerDirective,
    ngFormDirective,
    ngHideDirective,
    ngIfDirective,
    ngIncludeDirective,
    ngIncludeFillContentDirective,
    ngInitDirective,
    ngNonBindableDirective,
    ngPluralizeDirective,
    ngRepeatDirective,
    ngShowDirective,
    ngStyleDirective,
    ngSwitchDirective,
    ngSwitchWhenDirective,
    ngSwitchDefaultDirective,
    ngOptionsDirective,
    ngTranscludeDirective,
    ngModelDirective,
    ngListDirective,
    ngChangeDirective,
    requiredDirective,
    requiredDirective,
    ngValueDirective,
    ngAttributeAliasDirectives,
    ngEventDirectives,

    $AnchorScrollProvider,
    $AnimateProvider,
    $BrowserProvider,
    $CacheFactoryProvider,
    $ControllerProvider,
    $DocumentProvider,
    $ExceptionHandlerProvider,
    $FilterProvider,
    $InterpolateProvider,
    $IntervalProvider,
    $HttpProvider,
    $HttpBackendProvider,
    $LocationProvider,
    $LogProvider,
    $ParseProvider,
    $RootScopeProvider,
    $QProvider,
    $$SanitizeUriProvider,
    $SceProvider,
    $SceDelegateProvider,
    $SnifferProvider,
    $TemplateCacheProvider,
    $TimeoutProvider,
    $$RAFProvider,
    $$AsyncCallbackProvider,
    $WindowProvider
*/


/**
 * @ngdoc object
 * @name angular.version
 * @module ng
 * @description
 * An object that contains information about the current AngularJS version. This object has the
 * following properties:
 *
 * - `full` – `{string}` – Full version string, such as "0.9.18".
 * - `major` – `{number}` – Major version number, such as "0".
 * - `minor` – `{number}` – Minor version number, such as "9".
 * - `dot` – `{number}` – Dot version number, such as "18".
 * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
 */
var version = {
  full: '1.2.25',    // all of these placeholder strings will be replaced by grunt's
  major: 1,    // package task
  minor: 2,
  dot: 25,
  codeName: 'hypnotic-gesticulation'
};


function publishExternalAPI(angular){
  extend(angular, {
    'bootstrap': bootstrap,
    'copy': copy,
    'extend': extend,
    'equals': equals,
    'element': jqLite,
    'forEach': forEach,
    'injector': createInjector,
    'noop': noop,
    'bind': bind,
    'toJson': toJson,
    'fromJson': fromJson,
    'identity': identity,
    'isUndefined': isUndefined,
    'isDefined': isDefined,
    'isString': isString,
    'isFunction': isFunction,
    'isObject': isObject,
    'isNumber': isNumber,
    'isElement': isElement,
    'isArray': isArray,
    'version': version,
    'isDate': isDate,
    'lowercase': lowercase,
    'uppercase': uppercase,
    'callbacks': {counter: 0},
    '$$minErr': minErr,
    '$$csp': csp
  });

  angularModule = setupModuleLoader(window);
  try {
    angularModule('ngLocale');
  } catch (e) {
    angularModule('ngLocale', []).provider('$locale', $LocaleProvider);
  }

  angularModule('ng', ['ngLocale'], ['$provide',
    function ngModule($provide) {
      // $$sanitizeUriProvider needs to be before $compileProvider as it is used by it.
      $provide.provider({
        $$sanitizeUri: $$SanitizeUriProvider
      });
      $provide.provider('$compile', $CompileProvider).
        directive({
            a: htmlAnchorDirective,
            input: inputDirective,
            textarea: inputDirective,
            form: formDirective,
            script: scriptDirective,
            select: selectDirective,
            style: styleDirective,
            option: optionDirective,
            ngBind: ngBindDirective,
            ngBindHtml: ngBindHtmlDirective,
            ngBindTemplate: ngBindTemplateDirective,
            ngClass: ngClassDirective,
            ngClassEven: ngClassEvenDirective,
            ngClassOdd: ngClassOddDirective,
            ngCloak: ngCloakDirective,
            ngController: ngControllerDirective,
            ngForm: ngFormDirective,
            ngHide: ngHideDirective,
            ngIf: ngIfDirective,
            ngInclude: ngIncludeDirective,
            ngInit: ngInitDirective,
            ngNonBindable: ngNonBindableDirective,
            ngPluralize: ngPluralizeDirective,
            ngRepeat: ngRepeatDirective,
            ngShow: ngShowDirective,
            ngStyle: ngStyleDirective,
            ngSwitch: ngSwitchDirective,
            ngSwitchWhen: ngSwitchWhenDirective,
            ngSwitchDefault: ngSwitchDefaultDirective,
            ngOptions: ngOptionsDirective,
            ngTransclude: ngTranscludeDirective,
            ngModel: ngModelDirective,
            ngList: ngListDirective,
            ngChange: ngChangeDirective,
            required: requiredDirective,
            ngRequired: requiredDirective,
            ngValue: ngValueDirective
        }).
        directive({
          ngInclude: ngIncludeFillContentDirective
        }).
        directive(ngAttributeAliasDirectives).
        directive(ngEventDirectives);
      $provide.provider({
        $anchorScroll: $AnchorScrollProvider,
        $animate: $AnimateProvider,
        $browser: $BrowserProvider,
        $cacheFactory: $CacheFactoryProvider,
        $controller: $ControllerProvider,
        $document: $DocumentProvider,
        $exceptionHandler: $ExceptionHandlerProvider,
        $filter: $FilterProvider,
        $interpolate: $InterpolateProvider,
        $interval: $IntervalProvider,
        $http: $HttpProvider,
        $httpBackend: $HttpBackendProvider,
        $location: $LocationProvider,
        $log: $LogProvider,
        $parse: $ParseProvider,
        $rootScope: $RootScopeProvider,
        $q: $QProvider,
        $sce: $SceProvider,
        $sceDelegate: $SceDelegateProvider,
        $sniffer: $SnifferProvider,
        $templateCache: $TemplateCacheProvider,
        $timeout: $TimeoutProvider,
        $window: $WindowProvider,
        $$rAF: $$RAFProvider,
        $$asyncCallback : $$AsyncCallbackProvider
      });
    }
  ]);
}

/* global JQLitePrototype: true,
  addEventListenerFn: true,
  removeEventListenerFn: true,
  BOOLEAN_ATTR: true
*/

//////////////////////////////////
//JQLite
//////////////////////////////////

/**
 * @ngdoc function
 * @name angular.element
 * @module ng
 * @kind function
 *
 * @description
 * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element.
 *
 * If jQuery is available, `angular.element` is an alias for the
 * [jQuery](http://api.jquery.com/jQuery/) function. If jQuery is not available, `angular.element`
 * delegates to Angular's built-in subset of jQuery, called "jQuery lite" or "jqLite."
 *
 * <div class="alert alert-success">jqLite is a tiny, API-compatible subset of jQuery that allows
 * Angular to manipulate the DOM in a cross-browser compatible way. **jqLite** implements only the most
 * commonly needed functionality with the goal of having a very small footprint.</div>
 *
 * To use jQuery, simply load it before `DOMContentLoaded` event fired.
 *
 * <div class="alert">**Note:** all element references in Angular are always wrapped with jQuery or
 * jqLite; they are never raw DOM references.</div>
 *
 * ## Angular's jqLite
 * jqLite provides only the following jQuery methods:
 *
 * - [`addClass()`](http://api.jquery.com/addClass/)
 * - [`after()`](http://api.jquery.com/after/)
 * - [`append()`](http://api.jquery.com/append/)
 * - [`attr()`](http://api.jquery.com/attr/)
 * - [`bind()`](http://api.jquery.com/bind/) - Does not support namespaces, selectors or eventData
 * - [`children()`](http://api.jquery.com/children/) - Does not support selectors
 * - [`clone()`](http://api.jquery.com/clone/)
 * - [`contents()`](http://api.jquery.com/contents/)
 * - [`css()`](http://api.jquery.com/css/)
 * - [`data()`](http://api.jquery.com/data/)
 * - [`empty()`](http://api.jquery.com/empty/)
 * - [`eq()`](http://api.jquery.com/eq/)
 * - [`find()`](http://api.jquery.com/find/) - Limited to lookups by tag name
 * - [`hasClass()`](http://api.jquery.com/hasClass/)
 * - [`html()`](http://api.jquery.com/html/)
 * - [`next()`](http://api.jquery.com/next/) - Does not support selectors
 * - [`on()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData
 * - [`off()`](http://api.jquery.com/off/) - Does not support namespaces or selectors
 * - [`one()`](http://api.jquery.com/one/) - Does not support namespaces or selectors
 * - [`parent()`](http://api.jquery.com/parent/) - Does not support selectors
 * - [`prepend()`](http://api.jquery.com/prepend/)
 * - [`prop()`](http://api.jquery.com/prop/)
 * - [`ready()`](http://api.jquery.com/ready/)
 * - [`remove()`](http://api.jquery.com/remove/)
 * - [`removeAttr()`](http://api.jquery.com/removeAttr/)
 * - [`removeClass()`](http://api.jquery.com/removeClass/)
 * - [`removeData()`](http://api.jquery.com/removeData/)
 * - [`replaceWith()`](http://api.jquery.com/replaceWith/)
 * - [`text()`](http://api.jquery.com/text/)
 * - [`toggleClass()`](http://api.jquery.com/toggleClass/)
 * - [`triggerHandler()`](http://api.jquery.com/triggerHandler/) - Passes a dummy event object to handlers.
 * - [`unbind()`](http://api.jquery.com/unbind/) - Does not support namespaces
 * - [`val()`](http://api.jquery.com/val/)
 * - [`wrap()`](http://api.jquery.com/wrap/)
 *
 * ## jQuery/jqLite Extras
 * Angular also provides the following additional methods and events to both jQuery and jqLite:
 *
 * ### Events
 * - `$destroy` - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event
 *    on all DOM nodes being removed.  This can be used to clean up any 3rd party bindings to the DOM
 *    element before it is removed.
 *
 * ### Methods
 * - `controller(name)` - retrieves the controller of the current element or its parent. By default
 *   retrieves controller associated with the `ngController` directive. If `name` is provided as
 *   camelCase directive name, then the controller for this directive will be retrieved (e.g.
 *   `'ngModel'`).
 * - `injector()` - retrieves the injector of the current element or its parent.
 * - `scope()` - retrieves the {@link ng.$rootScope.Scope scope} of the current
 *   element or its parent.
 * - `isolateScope()` - retrieves an isolate {@link ng.$rootScope.Scope scope} if one is attached directly to the
 *   current element. This getter should be used only on elements that contain a directive which starts a new isolate
 *   scope. Calling `scope()` on this element always returns the original non-isolate scope.
 * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top
 *   parent element is reached.
 *
 * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery.
 * @returns {Object} jQuery object.
 */

JQLite.expando = 'ng339';

var jqCache = JQLite.cache = {},
    jqId = 1,
    addEventListenerFn = (window.document.addEventListener
      ? function(element, type, fn) {element.addEventListener(type, fn, false);}
      : function(element, type, fn) {element.attachEvent('on' + type, fn);}),
    removeEventListenerFn = (window.document.removeEventListener
      ? function(element, type, fn) {element.removeEventListener(type, fn, false); }
      : function(element, type, fn) {element.detachEvent('on' + type, fn); });

/*
 * !!! This is an undocumented "private" function !!!
 */
var jqData = JQLite._data = function(node) {
  //jQuery always returns an object on cache miss
  return this.cache[node[this.expando]] || {};
};

function jqNextId() { return ++jqId; }


var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
var MOZ_HACK_REGEXP = /^moz([A-Z])/;
var jqLiteMinErr = minErr('jqLite');

/**
 * Converts snake_case to camelCase.
 * Also there is special case for Moz prefix starting with upper case letter.
 * @param name Name to normalize
 */
function camelCase(name) {
  return name.
    replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
      return offset ? letter.toUpperCase() : letter;
    }).
    replace(MOZ_HACK_REGEXP, 'Moz$1');
}

/////////////////////////////////////////////
// jQuery mutation patch
//
// In conjunction with bindJQuery intercepts all jQuery's DOM destruction apis and fires a
// $destroy event on all DOM nodes being removed.
//
/////////////////////////////////////////////

function jqLitePatchJQueryRemove(name, dispatchThis, filterElems, getterIfNoArguments) {
  var originalJqFn = jQuery.fn[name];
  originalJqFn = originalJqFn.$original || originalJqFn;
  removePatch.$original = originalJqFn;
  jQuery.fn[name] = removePatch;

  function removePatch(param) {
    // jshint -W040
    var list = filterElems && param ? [this.filter(param)] : [this],
        fireEvent = dispatchThis,
        set, setIndex, setLength,
        element, childIndex, childLength, children;

    if (!getterIfNoArguments || param != null) {
      while(list.length) {
        set = list.shift();
        for(setIndex = 0, setLength = set.length; setIndex < setLength; setIndex++) {
          element = jqLite(set[setIndex]);
          if (fireEvent) {
            element.triggerHandler('$destroy');
          } else {
            fireEvent = !fireEvent;
          }
          for(childIndex = 0, childLength = (children = element.children()).length;
              childIndex < childLength;
              childIndex++) {
            list.push(jQuery(children[childIndex]));
          }
        }
      }
    }
    return originalJqFn.apply(this, arguments);
  }
}

var SINGLE_TAG_REGEXP = /^<(\w+)\s*\/?>(?:<\/\1>|)$/;
var HTML_REGEXP = /<|&#?\w+;/;
var TAG_NAME_REGEXP = /<([\w:]+)/;
var XHTML_TAG_REGEXP = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi;

var wrapMap = {
  'option': [1, '<select multiple="multiple">', '</select>'],

  'thead': [1, '<table>', '</table>'],
  'col': [2, '<table><colgroup>', '</colgroup></table>'],
  'tr': [2, '<table><tbody>', '</tbody></table>'],
  'td': [3, '<table><tbody><tr>', '</tr></tbody></table>'],
  '_default': [0, "", ""]
};

wrapMap.optgroup = wrapMap.option;
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
wrapMap.th = wrapMap.td;

function jqLiteIsTextNode(html) {
  return !HTML_REGEXP.test(html);
}

function jqLiteBuildFragment(html, context) {
  var elem, tmp, tag, wrap,
      fragment = context.createDocumentFragment(),
      nodes = [], i, j, jj;

  if (jqLiteIsTextNode(html)) {
    // Convert non-html into a text node
    nodes.push(context.createTextNode(html));
  } else {
    tmp = fragment.appendChild(context.createElement('div'));
    // Convert html into DOM nodes
    tag = (TAG_NAME_REGEXP.exec(html) || ["", ""])[1].toLowerCase();
    wrap = wrapMap[tag] || wrapMap._default;
    tmp.innerHTML = '<div>&#160;</div>' +
      wrap[1] + html.replace(XHTML_TAG_REGEXP, "<$1></$2>") + wrap[2];
    tmp.removeChild(tmp.firstChild);

    // Descend through wrappers to the right content
    i = wrap[0];
    while (i--) {
      tmp = tmp.lastChild;
    }

    for (j=0, jj=tmp.childNodes.length; j<jj; ++j) nodes.push(tmp.childNodes[j]);

    tmp = fragment.firstChild;
    tmp.textContent = "";
  }

  // Remove wrapper from fragment
  fragment.textContent = "";
  fragment.innerHTML = ""; // Clear inner HTML
  return nodes;
}

function jqLiteParseHTML(html, context) {
  context = context || document;
  var parsed;

  if ((parsed = SINGLE_TAG_REGEXP.exec(html))) {
    return [context.createElement(parsed[1])];
  }

  return jqLiteBuildFragment(html, context);
}

/////////////////////////////////////////////
function JQLite(element) {
  if (element instanceof JQLite) {
    return element;
  }
  if (isString(element)) {
    element = trim(element);
  }
  if (!(this instanceof JQLite)) {
    if (isString(element) && element.charAt(0) != '<') {
      throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element');
    }
    return new JQLite(element);
  }

  if (isString(element)) {
    jqLiteAddNodes(this, jqLiteParseHTML(element));
    var fragment = jqLite(document.createDocumentFragment());
    fragment.append(this);
  } else {
    jqLiteAddNodes(this, element);
  }
}

function jqLiteClone(element) {
  return element.cloneNode(true);
}

function jqLiteDealoc(element){
  jqLiteRemoveData(element);
  for ( var i = 0, children = element.childNodes || []; i < children.length; i++) {
    jqLiteDealoc(children[i]);
  }
}

function jqLiteOff(element, type, fn, unsupported) {
  if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument');

  var events = jqLiteExpandoStore(element, 'events'),
      handle = jqLiteExpandoStore(element, 'handle');

  if (!handle) return; //no listeners registered

  if (isUndefined(type)) {
    forEach(events, function(eventHandler, type) {
      removeEventListenerFn(element, type, eventHandler);
      delete events[type];
    });
  } else {
    forEach(type.split(' '), function(type) {
      if (isUndefined(fn)) {
        removeEventListenerFn(element, type, events[type]);
        delete events[type];
      } else {
        arrayRemove(events[type] || [], fn);
      }
    });
  }
}

function jqLiteRemoveData(element, name) {
  var expandoId = element.ng339,
      expandoStore = jqCache[expandoId];

  if (expandoStore) {
    if (name) {
      delete jqCache[expandoId].data[name];
      return;
    }

    if (expandoStore.handle) {
      expandoStore.events.$destroy && expandoStore.handle({}, '$destroy');
      jqLiteOff(element);
    }
    delete jqCache[expandoId];
    element.ng339 = undefined; // don't delete DOM expandos. IE and Chrome don't like it
  }
}

function jqLiteExpandoStore(element, key, value) {
  var expandoId = element.ng339,
      expandoStore = jqCache[expandoId || -1];

  if (isDefined(value)) {
    if (!expandoStore) {
      element.ng339 = expandoId = jqNextId();
      expandoStore = jqCache[expandoId] = {};
    }
    expandoStore[key] = value;
  } else {
    return expandoStore && expandoStore[key];
  }
}

function jqLiteData(element, key, value) {
  var data = jqLiteExpandoStore(element, 'data'),
      isSetter = isDefined(value),
      keyDefined = !isSetter && isDefined(key),
      isSimpleGetter = keyDefined && !isObject(key);

  if (!data && !isSimpleGetter) {
    jqLiteExpandoStore(element, 'data', data = {});
  }

  if (isSetter) {
    data[key] = value;
  } else {
    if (keyDefined) {
      if (isSimpleGetter) {
        // don't create data in this case.
        return data && data[key];
      } else {
        extend(data, key);
      }
    } else {
      return data;
    }
  }
}

function jqLiteHasClass(element, selector) {
  if (!element.getAttribute) return false;
  return ((" " + (element.getAttribute('class') || '') + " ").replace(/[\n\t]/g, " ").
      indexOf( " " + selector + " " ) > -1);
}

function jqLiteRemoveClass(element, cssClasses) {
  if (cssClasses && element.setAttribute) {
    forEach(cssClasses.split(' '), function(cssClass) {
      element.setAttribute('class', trim(
          (" " + (element.getAttribute('class') || '') + " ")
          .replace(/[\n\t]/g, " ")
          .replace(" " + trim(cssClass) + " ", " "))
      );
    });
  }
}

function jqLiteAddClass(element, cssClasses) {
  if (cssClasses && element.setAttribute) {
    var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ')
                            .replace(/[\n\t]/g, " ");

    forEach(cssClasses.split(' '), function(cssClass) {
      cssClass = trim(cssClass);
      if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) {
        existingClasses += cssClass + ' ';
      }
    });

    element.setAttribute('class', trim(existingClasses));
  }
}

function jqLiteAddNodes(root, elements) {
  if (elements) {
    elements = (!elements.nodeName && isDefined(elements.length) && !isWindow(elements))
      ? elements
      : [ elements ];
    for(var i=0; i < elements.length; i++) {
      root.push(elements[i]);
    }
  }
}

function jqLiteController(element, name) {
  return jqLiteInheritedData(element, '$' + (name || 'ngController' ) + 'Controller');
}

function jqLiteInheritedData(element, name, value) {
  // if element is the document object work with the html element instead
  // this makes $(document).scope() possible
  if(element.nodeType == 9) {
    element = element.documentElement;
  }
  var names = isArray(name) ? name : [name];

  while (element) {
    for (var i = 0, ii = names.length; i < ii; i++) {
      if ((value = jqLite.data(element, names[i])) !== undefined) return value;
    }

    // If dealing with a document fragment node with a host element, and no parent, use the host
    // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM
    // to lookup parent controllers.
    element = element.parentNode || (element.nodeType === 11 && element.host);
  }
}

function jqLiteEmpty(element) {
  for (var i = 0, childNodes = element.childNodes; i < childNodes.length; i++) {
    jqLiteDealoc(childNodes[i]);
  }
  while (element.firstChild) {
    element.removeChild(element.firstChild);
  }
}

//////////////////////////////////////////
// Functions which are declared directly.
//////////////////////////////////////////
var JQLitePrototype = JQLite.prototype = {
  ready: function(fn) {
    var fired = false;

    function trigger() {
      if (fired) return;
      fired = true;
      fn();
    }

    // check if document already is loaded
    if (document.readyState === 'complete'){
      setTimeout(trigger);
    } else {
      this.on('DOMContentLoaded', trigger); // works for modern browsers and IE9
      // we can not use jqLite since we are not done loading and jQuery could be loaded later.
      // jshint -W064
      JQLite(window).on('load', trigger); // fallback to window.onload for others
      // jshint +W064
    }
  },
  toString: function() {
    var value = [];
    forEach(this, function(e){ value.push('' + e);});
    return '[' + value.join(', ') + ']';
  },

  eq: function(index) {
      return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]);
  },

  length: 0,
  push: push,
  sort: [].sort,
  splice: [].splice
};

//////////////////////////////////////////
// Functions iterating getter/setters.
// these functions return self on setter and
// value on get.
//////////////////////////////////////////
var BOOLEAN_ATTR = {};
forEach('multiple,selected,checked,disabled,readOnly,required,open'.split(','), function(value) {
  BOOLEAN_ATTR[lowercase(value)] = value;
});
var BOOLEAN_ELEMENTS = {};
forEach('input,select,option,textarea,button,form,details'.split(','), function(value) {
  BOOLEAN_ELEMENTS[uppercase(value)] = true;
});

function getBooleanAttrName(element, name) {
  // check dom last since we will most likely fail on name
  var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()];

  // booleanAttr is here twice to minimize DOM access
  return booleanAttr && BOOLEAN_ELEMENTS[element.nodeName] && booleanAttr;
}

forEach({
  data: jqLiteData,
  removeData: jqLiteRemoveData
}, function(fn, name) {
  JQLite[name] = fn;
});

forEach({
  data: jqLiteData,
  inheritedData: jqLiteInheritedData,

  scope: function(element) {
    // Can't use jqLiteData here directly so we stay compatible with jQuery!
    return jqLite.data(element, '$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']);
  },

  isolateScope: function(element) {
    // Can't use jqLiteData here directly so we stay compatible with jQuery!
    return jqLite.data(element, '$isolateScope') || jqLite.data(element, '$isolateScopeNoTemplate');
  },

  controller: jqLiteController,

  injector: function(element) {
    return jqLiteInheritedData(element, '$injector');
  },

  removeAttr: function(element,name) {
    element.removeAttribute(name);
  },

  hasClass: jqLiteHasClass,

  css: function(element, name, value) {
    name = camelCase(name);

    if (isDefined(value)) {
      element.style[name] = value;
    } else {
      var val;

      if (msie <= 8) {
        // this is some IE specific weirdness that jQuery 1.6.4 does not sure why
        val = element.currentStyle && element.currentStyle[name];
        if (val === '') val = 'auto';
      }

      val = val || element.style[name];

      if (msie <= 8) {
        // jquery weirdness :-/
        val = (val === '') ? undefined : val;
      }

      return  val;
    }
  },

  attr: function(element, name, value){
    var lowercasedName = lowercase(name);
    if (BOOLEAN_ATTR[lowercasedName]) {
      if (isDefined(value)) {
        if (!!value) {
          element[name] = true;
          element.setAttribute(name, lowercasedName);
        } else {
          element[name] = false;
          element.removeAttribute(lowercasedName);
        }
      } else {
        return (element[name] ||
                 (element.attributes.getNamedItem(name)|| noop).specified)
               ? lowercasedName
               : undefined;
      }
    } else if (isDefined(value)) {
      element.setAttribute(name, value);
    } else if (element.getAttribute) {
      // the extra argument "2" is to get the right thing for a.href in IE, see jQuery code
      // some elements (e.g. Document) don't have get attribute, so return undefined
      var ret = element.getAttribute(name, 2);
      // normalize non-existing attributes to undefined (as jQuery)
      return ret === null ? undefined : ret;
    }
  },

  prop: function(element, name, value) {
    if (isDefined(value)) {
      element[name] = value;
    } else {
      return element[name];
    }
  },

  text: (function() {
    var NODE_TYPE_TEXT_PROPERTY = [];
    if (msie < 9) {
      NODE_TYPE_TEXT_PROPERTY[1] = 'innerText';    /** Element **/
      NODE_TYPE_TEXT_PROPERTY[3] = 'nodeValue';    /** Text **/
    } else {
      NODE_TYPE_TEXT_PROPERTY[1] =                 /** Element **/
      NODE_TYPE_TEXT_PROPERTY[3] = 'textContent';  /** Text **/
    }
    getText.$dv = '';
    return getText;

    function getText(element, value) {
      var textProp = NODE_TYPE_TEXT_PROPERTY[element.nodeType];
      if (isUndefined(value)) {
        return textProp ? element[textProp] : '';
      }
      element[textProp] = value;
    }
  })(),

  val: function(element, value) {
    if (isUndefined(value)) {
      if (nodeName_(element) === 'SELECT' && element.multiple) {
        var result = [];
        forEach(element.options, function (option) {
          if (option.selected) {
            result.push(option.value || option.text);
          }
        });
        return result.length === 0 ? null : result;
      }
      return element.value;
    }
    element.value = value;
  },

  html: function(element, value) {
    if (isUndefined(value)) {
      return element.innerHTML;
    }
    for (var i = 0, childNodes = element.childNodes; i < childNodes.length; i++) {
      jqLiteDealoc(childNodes[i]);
    }
    element.innerHTML = value;
  },

  empty: jqLiteEmpty
}, function(fn, name){
  /**
   * Properties: writes return selection, reads return first value
   */
  JQLite.prototype[name] = function(arg1, arg2) {
    var i, key;
    var nodeCount = this.length;

    // jqLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it
    // in a way that survives minification.
    // jqLiteEmpty takes no arguments but is a setter.
    if (fn !== jqLiteEmpty &&
        (((fn.length == 2 && (fn !== jqLiteHasClass && fn !== jqLiteController)) ? arg1 : arg2) === undefined)) {
      if (isObject(arg1)) {

        // we are a write, but the object properties are the key/values
        for (i = 0; i < nodeCount; i++) {
          if (fn === jqLiteData) {
            // data() takes the whole object in jQuery
            fn(this[i], arg1);
          } else {
            for (key in arg1) {
              fn(this[i], key, arg1[key]);
            }
          }
        }
        // return self for chaining
        return this;
      } else {
        // we are a read, so read the first child.
        // TODO: do we still need this?
        var value = fn.$dv;
        // Only if we have $dv do we iterate over all, otherwise it is just the first element.
        var jj = (value === undefined) ? Math.min(nodeCount, 1) : nodeCount;
        for (var j = 0; j < jj; j++) {
          var nodeValue = fn(this[j], arg1, arg2);
          value = value ? value + nodeValue : nodeValue;
        }
        return value;
      }
    } else {
      // we are a write, so apply to all children
      for (i = 0; i < nodeCount; i++) {
        fn(this[i], arg1, arg2);
      }
      // return self for chaining
      return this;
    }
  };
});

function createEventHandler(element, events) {
  var eventHandler = function (event, type) {
    if (!event.preventDefault) {
      event.preventDefault = function() {
        event.returnValue = false; //ie
      };
    }

    if (!event.stopPropagation) {
      event.stopPropagation = function() {
        event.cancelBubble = true; //ie
      };
    }

    if (!event.target) {
      event.target = event.srcElement || document;
    }

    if (isUndefined(event.defaultPrevented)) {
      var prevent = event.preventDefault;
      event.preventDefault = function() {
        event.defaultPrevented = true;
        prevent.call(event);
      };
      event.defaultPrevented = false;
    }

    event.isDefaultPrevented = function() {
      return event.defaultPrevented || event.returnValue === false;
    };

    // Copy event handlers in case event handlers array is modified during execution.
    var eventHandlersCopy = shallowCopy(events[type || event.type] || []);

    forEach(eventHandlersCopy, function(fn) {
      fn.call(element, event);
    });

    // Remove monkey-patched methods (IE),
    // as they would cause memory leaks in IE8.
    if (msie <= 8) {
      // IE7/8 does not allow to delete property on native object
      event.preventDefault = null;
      event.stopPropagation = null;
      event.isDefaultPrevented = null;
    } else {
      // It shouldn't affect normal browsers (native methods are defined on prototype).
      delete event.preventDefault;
      delete event.stopPropagation;
      delete event.isDefaultPrevented;
    }
  };
  eventHandler.elem = element;
  return eventHandler;
}

//////////////////////////////////////////
// Functions iterating traversal.
// These functions chain results into a single
// selector.
//////////////////////////////////////////
forEach({
  removeData: jqLiteRemoveData,

  dealoc: jqLiteDealoc,

  on: function onFn(element, type, fn, unsupported){
    if (isDefined(unsupported)) throw jqLiteMinErr('onargs', 'jqLite#on() does not support the `selector` or `eventData` parameters');

    var events = jqLiteExpandoStore(element, 'events'),
        handle = jqLiteExpandoStore(element, 'handle');

    if (!events) jqLiteExpandoStore(element, 'events', events = {});
    if (!handle) jqLiteExpandoStore(element, 'handle', handle = createEventHandler(element, events));

    forEach(type.split(' '), function(type){
      var eventFns = events[type];

      if (!eventFns) {
        if (type == 'mouseenter' || type == 'mouseleave') {
          var contains = document.body.contains || document.body.compareDocumentPosition ?
          function( a, b ) {
            // jshint bitwise: false
            var adown = a.nodeType === 9 ? a.documentElement : a,
            bup = b && b.parentNode;
            return a === bup || !!( bup && bup.nodeType === 1 && (
              adown.contains ?
              adown.contains( bup ) :
              a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
              ));
            } :
            function( a, b ) {
              if ( b ) {
                while ( (b = b.parentNode) ) {
                  if ( b === a ) {
                    return true;
                  }
                }
              }
              return false;
            };

          events[type] = [];

          // Refer to jQuery's implementation of mouseenter & mouseleave
          // Read about mouseenter and mouseleave:
          // http://www.quirksmode.org/js/events_mouse.html#link8
          var eventmap = { mouseleave : "mouseout", mouseenter : "mouseover"};

          onFn(element, eventmap[type], function(event) {
            var target = this, related = event.relatedTarget;
            // For mousenter/leave call the handler if related is outside the target.
            // NB: No relatedTarget if the mouse left/entered the browser window
            if ( !related || (related !== target && !contains(target, related)) ){
              handle(event, type);
            }
          });

        } else {
          addEventListenerFn(element, type, handle);
          events[type] = [];
        }
        eventFns = events[type];
      }
      eventFns.push(fn);
    });
  },

  off: jqLiteOff,

  one: function(element, type, fn) {
    element = jqLite(element);

    //add the listener twice so that when it is called
    //you can remove the original function and still be
    //able to call element.off(ev, fn) normally
    element.on(type, function onFn() {
      element.off(type, fn);
      element.off(type, onFn);
    });
    element.on(type, fn);
  },

  replaceWith: function(element, replaceNode) {
    var index, parent = element.parentNode;
    jqLiteDealoc(element);
    forEach(new JQLite(replaceNode), function(node){
      if (index) {
        parent.insertBefore(node, index.nextSibling);
      } else {
        parent.replaceChild(node, element);
      }
      index = node;
    });
  },

  children: function(element) {
    var children = [];
    forEach(element.childNodes, function(element){
      if (element.nodeType === 1)
        children.push(element);
    });
    return children;
  },

  contents: function(element) {
    return element.contentDocument || element.childNodes || [];
  },

  append: function(element, node) {
    forEach(new JQLite(node), function(child){
      if (element.nodeType === 1 || element.nodeType === 11) {
        element.appendChild(child);
      }
    });
  },

  prepend: function(element, node) {
    if (element.nodeType === 1) {
      var index = element.firstChild;
      forEach(new JQLite(node), function(child){
        element.insertBefore(child, index);
      });
    }
  },

  wrap: function(element, wrapNode) {
    wrapNode = jqLite(wrapNode)[0];
    var parent = element.parentNode;
    if (parent) {
      parent.replaceChild(wrapNode, element);
    }
    wrapNode.appendChild(element);
  },

  remove: function(element) {
    jqLiteDealoc(element);
    var parent = element.parentNode;
    if (parent) parent.removeChild(element);
  },

  after: function(element, newElement) {
    var index = element, parent = element.parentNode;
    forEach(new JQLite(newElement), function(node){
      parent.insertBefore(node, index.nextSibling);
      index = node;
    });
  },

  addClass: jqLiteAddClass,
  removeClass: jqLiteRemoveClass,

  toggleClass: function(element, selector, condition) {
    if (selector) {
      forEach(selector.split(' '), function(className){
        var classCondition = condition;
        if (isUndefined(classCondition)) {
          classCondition = !jqLiteHasClass(element, className);
        }
        (classCondition ? jqLiteAddClass : jqLiteRemoveClass)(element, className);
      });
    }
  },

  parent: function(element) {
    var parent = element.parentNode;
    return parent && parent.nodeType !== 11 ? parent : null;
  },

  next: function(element) {
    if (element.nextElementSibling) {
      return element.nextElementSibling;
    }

    // IE8 doesn't have nextElementSibling
    var elm = element.nextSibling;
    while (elm != null && elm.nodeType !== 1) {
      elm = elm.nextSibling;
    }
    return elm;
  },

  find: function(element, selector) {
    if (element.getElementsByTagName) {
      return element.getElementsByTagName(selector);
    } else {
      return [];
    }
  },

  clone: jqLiteClone,

  triggerHandler: function(element, event, extraParameters) {

    var dummyEvent, eventFnsCopy, handlerArgs;
    var eventName = event.type || event;
    var eventFns = (jqLiteExpandoStore(element, 'events') || {})[eventName];

    if (eventFns) {

      // Create a dummy event to pass to the handlers
      dummyEvent = {
        preventDefault: function() { this.defaultPrevented = true; },
        isDefaultPrevented: function() { return this.defaultPrevented === true; },
        stopPropagation: noop,
        type: eventName,
        target: element
      };

      // If a custom event was provided then extend our dummy event with it
      if (event.type) {
        dummyEvent = extend(dummyEvent, event);
      }

      // Copy event handlers in case event handlers array is modified during execution.
      eventFnsCopy = shallowCopy(eventFns);
      handlerArgs = extraParameters ? [dummyEvent].concat(extraParameters) : [dummyEvent];

      forEach(eventFnsCopy, function(fn) {
        fn.apply(element, handlerArgs);
      });

    }
  }
}, function(fn, name){
  /**
   * chaining functions
   */
  JQLite.prototype[name] = function(arg1, arg2, arg3) {
    var value;
    for(var i=0; i < this.length; i++) {
      if (isUndefined(value)) {
        value = fn(this[i], arg1, arg2, arg3);
        if (isDefined(value)) {
          // any function which returns a value needs to be wrapped
          value = jqLite(value);
        }
      } else {
        jqLiteAddNodes(value, fn(this[i], arg1, arg2, arg3));
      }
    }
    return isDefined(value) ? value : this;
  };

  // bind legacy bind/unbind to on/off
  JQLite.prototype.bind = JQLite.prototype.on;
  JQLite.prototype.unbind = JQLite.prototype.off;
});

/**
 * Computes a hash of an 'obj'.
 * Hash of a:
 *  string is string
 *  number is number as string
 *  object is either result of calling $$hashKey function on the object or uniquely generated id,
 *         that is also assigned to the $$hashKey property of the object.
 *
 * @param obj
 * @returns {string} hash string such that the same input will have the same hash string.
 *         The resulting string key is in 'type:hashKey' format.
 */
function hashKey(obj, nextUidFn) {
  var objType = typeof obj,
      key;

  if (objType == 'function' || (objType == 'object' && obj !== null)) {
    if (typeof (key = obj.$$hashKey) == 'function') {
      // must invoke on object to keep the right this
      key = obj.$$hashKey();
    } else if (key === undefined) {
      key = obj.$$hashKey = (nextUidFn || nextUid)();
    }
  } else {
    key = obj;
  }

  return objType + ':' + key;
}

/**
 * HashMap which can use objects as keys
 */
function HashMap(array, isolatedUid) {
  if (isolatedUid) {
    var uid = 0;
    this.nextUid = function() {
      return ++uid;
    };
  }
  forEach(array, this.put, this);
}
HashMap.prototype = {
  /**
   * Store key value pair
   * @param key key to store can be any type
   * @param value value to store can be any type
   */
  put: function(key, value) {
    this[hashKey(key, this.nextUid)] = value;
  },

  /**
   * @param key
   * @returns {Object} the value for the key
   */
  get: function(key) {
    return this[hashKey(key, this.nextUid)];
  },

  /**
   * Remove the key/value pair
   * @param key
   */
  remove: function(key) {
    var value = this[key = hashKey(key, this.nextUid)];
    delete this[key];
    return value;
  }
};

/**
 * @ngdoc function
 * @module ng
 * @name angular.injector
 * @kind function
 *
 * @description
 * Creates an injector function that can be used for retrieving services as well as for
 * dependency injection (see {@link guide/di dependency injection}).
 *

 * @param {Array.<string|Function>} modules A list of module functions or their aliases. See
 *        {@link angular.module}. The `ng` module must be explicitly added.
 * @returns {function()} Injector function. See {@link auto.$injector $injector}.
 *
 * @example
 * Typical usage
 * ```js
 *   // create an injector
 *   var $injector = angular.injector(['ng']);
 *
 *   // use the injector to kick off your application
 *   // use the type inference to auto inject arguments, or use implicit injection
 *   $injector.invoke(function($rootScope, $compile, $document){
 *     $compile($document)($rootScope);
 *     $rootScope.$digest();
 *   });
 * ```
 *
 * Sometimes you want to get access to the injector of a currently running Angular app
 * from outside Angular. Perhaps, you want to inject and compile some markup after the
 * application has been bootstrapped. You can do this using the extra `injector()` added
 * to JQuery/jqLite elements. See {@link angular.element}.
 *
 * *This is fairly rare but could be the case if a third party library is injecting the
 * markup.*
 *
 * In the following example a new block of HTML containing a `ng-controller`
 * directive is added to the end of the document body by JQuery. We then compile and link
 * it into the current AngularJS scope.
 *
 * ```js
 * var $div = $('<div ng-controller="MyCtrl">{{content.label}}</div>');
 * $(document.body).append($div);
 *
 * angular.element(document).injector().invoke(function($compile) {
 *   var scope = angular.element($div).scope();
 *   $compile($div)(scope);
 * });
 * ```
 */


/**
 * @ngdoc module
 * @name auto
 * @description
 *
 * Implicit module which gets automatically added to each {@link auto.$injector $injector}.
 */

var FN_ARGS = /^function\s*[^\(]*\(\s*([^\)]*)\)/m;
var FN_ARG_SPLIT = /,/;
var FN_ARG = /^\s*(_?)(\S+?)\1\s*$/;
var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
var $injectorMinErr = minErr('$injector');
function annotate(fn) {
  var $inject,
      fnText,
      argDecl,
      last;

  if (typeof fn === 'function') {
    if (!($inject = fn.$inject)) {
      $inject = [];
      if (fn.length) {
        fnText = fn.toString().replace(STRIP_COMMENTS, '');
        argDecl = fnText.match(FN_ARGS);
        forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg){
          arg.replace(FN_ARG, function(all, underscore, name){
            $inject.push(name);
          });
        });
      }
      fn.$inject = $inject;
    }
  } else if (isArray(fn)) {
    last = fn.length - 1;
    assertArgFn(fn[last], 'fn');
    $inject = fn.slice(0, last);
  } else {
    assertArgFn(fn, 'fn', true);
  }
  return $inject;
}

///////////////////////////////////////

/**
 * @ngdoc service
 * @name $injector
 * @kind function
 *
 * @description
 *
 * `$injector` is used to retrieve object instances as defined by
 * {@link auto.$provide provider}, instantiate types, invoke methods,
 * and load modules.
 *
 * The following always holds true:
 *
 * ```js
 *   var $injector = angular.injector();
 *   expect($injector.get('$injector')).toBe($injector);
 *   expect($injector.invoke(function($injector){
 *     return $injector;
 *   }).toBe($injector);
 * ```
 *
 * # Injection Function Annotation
 *
 * JavaScript does not have annotations, and annotations are needed for dependency injection. The
 * following are all valid ways of annotating function with injection arguments and are equivalent.
 *
 * ```js
 *   // inferred (only works if code not minified/obfuscated)
 *   $injector.invoke(function(serviceA){});
 *
 *   // annotated
 *   function explicit(serviceA) {};
 *   explicit.$inject = ['serviceA'];
 *   $injector.invoke(explicit);
 *
 *   // inline
 *   $injector.invoke(['serviceA', function(serviceA){}]);
 * ```
 *
 * ## Inference
 *
 * In JavaScript calling `toString()` on a function returns the function definition. The definition
 * can then be parsed and the function arguments can be extracted. *NOTE:* This does not work with
 * minification, and obfuscation tools since these tools change the argument names.
 *
 * ## `$inject` Annotation
 * By adding an `$inject` property onto a function the injection parameters can be specified.
 *
 * ## Inline
 * As an array of injection names, where the last item in the array is the function to call.
 */

/**
 * @ngdoc method
 * @name $injector#get
 *
 * @description
 * Return an instance of the service.
 *
 * @param {string} name The name of the instance to retrieve.
 * @return {*} The instance.
 */

/**
 * @ngdoc method
 * @name $injector#invoke
 *
 * @description
 * Invoke the method and supply the method arguments from the `$injector`.
 *
 * @param {!Function} fn The function to invoke. Function parameters are injected according to the
 *   {@link guide/di $inject Annotation} rules.
 * @param {Object=} self The `this` for the invoked method.
 * @param {Object=} locals Optional object. If preset then any argument names are read from this
 *                         object first, before the `$injector` is consulted.
 * @returns {*} the value returned by the invoked `fn` function.
 */

/**
 * @ngdoc method
 * @name $injector#has
 *
 * @description
 * Allows the user to query if the particular service exists.
 *
 * @param {string} Name of the service to query.
 * @returns {boolean} returns true if injector has given service.
 */

/**
 * @ngdoc method
 * @name $injector#instantiate
 * @description
 * Create a new instance of JS type. The method takes a constructor function, invokes the new
 * operator, and supplies all of the arguments to the constructor function as specified by the
 * constructor annotation.
 *
 * @param {Function} Type Annotated constructor function.
 * @param {Object=} locals Optional object. If preset then any argument names are read from this
 * object first, before the `$injector` is consulted.
 * @returns {Object} new instance of `Type`.
 */

/**
 * @ngdoc method
 * @name $injector#annotate
 *
 * @description
 * Returns an array of service names which the function is requesting for injection. This API is
 * used by the injector to determine which services need to be injected into the function when the
 * function is invoked. There are three ways in which the function can be annotated with the needed
 * dependencies.
 *
 * # Argument names
 *
 * The simplest form is to extract the dependencies from the arguments of the function. This is done
 * by converting the function into a string using `toString()` method and extracting the argument
 * names.
 * ```js
 *   // Given
 *   function MyController($scope, $route) {
 *     // ...
 *   }
 *
 *   // Then
 *   expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);
 * ```
 *
 * This method does not work with code minification / obfuscation. For this reason the following
 * annotation strategies are supported.
 *
 * # The `$inject` property
 *
 * If a function has an `$inject` property and its value is an array of strings, then the strings
 * represent names of services to be injected into the function.
 * ```js
 *   // Given
 *   var MyController = function(obfuscatedScope, obfuscatedRoute) {
 *     // ...
 *   }
 *   // Define function dependencies
 *   MyController['$inject'] = ['$scope', '$route'];
 *
 *   // Then
 *   expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);
 * ```
 *
 * # The array notation
 *
 * It is often desirable to inline Injected functions and that's when setting the `$inject` property
 * is very inconvenient. In these situations using the array notation to specify the dependencies in
 * a way that survives minification is a better choice:
 *
 * ```js
 *   // We wish to write this (not minification / obfuscation safe)
 *   injector.invoke(function($compile, $rootScope) {
 *     // ...
 *   });
 *
 *   // We are forced to write break inlining
 *   var tmpFn = function(obfuscatedCompile, obfuscatedRootScope) {
 *     // ...
 *   };
 *   tmpFn.$inject = ['$compile', '$rootScope'];
 *   injector.invoke(tmpFn);
 *
 *   // To better support inline function the inline annotation is supported
 *   injector.invoke(['$compile', '$rootScope', function(obfCompile, obfRootScope) {
 *     // ...
 *   }]);
 *
 *   // Therefore
 *   expect(injector.annotate(
 *      ['$compile', '$rootScope', function(obfus_$compile, obfus_$rootScope) {}])
 *    ).toEqual(['$compile', '$rootScope']);
 * ```
 *
 * @param {Function|Array.<string|Function>} fn Function for which dependent service names need to
 * be retrieved as described above.
 *
 * @returns {Array.<string>} The names of the services which the function requires.
 */




/**
 * @ngdoc service
 * @name $provide
 *
 * @description
 *
 * The {@link auto.$provide $provide} service has a number of methods for registering components
 * with the {@link auto.$injector $injector}. Many of these functions are also exposed on
 * {@link angular.Module}.
 *
 * An Angular **service** is a singleton object created by a **service factory**.  These **service
 * factories** are functions which, in turn, are created by a **service provider**.
 * The **service providers** are constructor functions. When instantiated they must contain a
 * property called `$get`, which holds the **service factory** function.
 *
 * When you request a service, the {@link auto.$injector $injector} is responsible for finding the
 * correct **service provider**, instantiating it and then calling its `$get` **service factory**
 * function to get the instance of the **service**.
 *
 * Often services have no configuration options and there is no need to add methods to the service
 * provider.  The provider will be no more than a constructor function with a `$get` property. For
 * these cases the {@link auto.$provide $provide} service has additional helper methods to register
 * services without specifying a provider.
 *
 * * {@link auto.$provide#provider provider(provider)} - registers a **service provider** with the
 *     {@link auto.$injector $injector}
 * * {@link auto.$provide#constant constant(obj)} - registers a value/object that can be accessed by
 *     providers and services.
 * * {@link auto.$provide#value value(obj)} - registers a value/object that can only be accessed by
 *     services, not providers.
 * * {@link auto.$provide#factory factory(fn)} - registers a service **factory function**, `fn`,
 *     that will be wrapped in a **service provider** object, whose `$get` property will contain the
 *     given factory function.
 * * {@link auto.$provide#service service(class)} - registers a **constructor function**, `class`
 *     that will be wrapped in a **service provider** object, whose `$get` property will instantiate
 *      a new object using the given constructor function.
 *
 * See the individual methods for more information and examples.
 */

/**
 * @ngdoc method
 * @name $provide#provider
 * @description
 *
 * Register a **provider function** with the {@link auto.$injector $injector}. Provider functions
 * are constructor functions, whose instances are responsible for "providing" a factory for a
 * service.
 *
 * Service provider names start with the name of the service they provide followed by `Provider`.
 * For example, the {@link ng.$log $log} service has a provider called
 * {@link ng.$logProvider $logProvider}.
 *
 * Service provider objects can have additional methods which allow configuration of the provider
 * and its service. Importantly, you can configure what kind of service is created by the `$get`
 * method, or how that service will act. For example, the {@link ng.$logProvider $logProvider} has a
 * method {@link ng.$logProvider#debugEnabled debugEnabled}
 * which lets you specify whether the {@link ng.$log $log} service will log debug messages to the
 * console or not.
 *
 * @param {string} name The name of the instance. NOTE: the provider will be available under `name +
                        'Provider'` key.
 * @param {(Object|function())} provider If the provider is:
 *
 *   - `Object`: then it should have a `$get` method. The `$get` method will be invoked using
 *     {@link auto.$injector#invoke $injector.invoke()} when an instance needs to be created.
 *   - `Constructor`: a new instance of the provider will be created using
 *     {@link auto.$injector#instantiate $injector.instantiate()}, then treated as `object`.
 *
 * @returns {Object} registered provider instance

 * @example
 *
 * The following example shows how to create a simple event tracking service and register it using
 * {@link auto.$provide#provider $provide.provider()}.
 *
 * ```js
 *  // Define the eventTracker provider
 *  function EventTrackerProvider() {
 *    var trackingUrl = '/track';
 *
 *    // A provider method for configuring where the tracked events should been saved
 *    this.setTrackingUrl = function(url) {
 *      trackingUrl = url;
 *    };
 *
 *    // The service factory function
 *    this.$get = ['$http', function($http) {
 *      var trackedEvents = {};
 *      return {
 *        // Call this to track an event
 *        event: function(event) {
 *          var count = trackedEvents[event] || 0;
 *          count += 1;
 *          trackedEvents[event] = count;
 *          return count;
 *        },
 *        // Call this to save the tracked events to the trackingUrl
 *        save: function() {
 *          $http.post(trackingUrl, trackedEvents);
 *        }
 *      };
 *    }];
 *  }
 *
 *  describe('eventTracker', function() {
 *    var postSpy;
 *
 *    beforeEach(module(function($provide) {
 *      // Register the eventTracker provider
 *      $provide.provider('eventTracker', EventTrackerProvider);
 *    }));
 *
 *    beforeEach(module(function(eventTrackerProvider) {
 *      // Configure eventTracker provider
 *      eventTrackerProvider.setTrackingUrl('/custom-track');
 *    }));
 *
 *    it('tracks events', inject(function(eventTracker) {
 *      expect(eventTracker.event('login')).toEqual(1);
 *      expect(eventTracker.event('login')).toEqual(2);
 *    }));
 *
 *    it('saves to the tracking url', inject(function(eventTracker, $http) {
 *      postSpy = spyOn($http, 'post');
 *      eventTracker.event('login');
 *      eventTracker.save();
 *      expect(postSpy).toHaveBeenCalled();
 *      expect(postSpy.mostRecentCall.args[0]).not.toEqual('/track');
 *      expect(postSpy.mostRecentCall.args[0]).toEqual('/custom-track');
 *      expect(postSpy.mostRecentCall.args[1]).toEqual({ 'login': 1 });
 *    }));
 *  });
 * ```
 */

/**
 * @ngdoc method
 * @name $provide#factory
 * @description
 *
 * Register a **service factory**, which will be called to return the service instance.
 * This is short for registering a service where its provider consists of only a `$get` property,
 * which is the given service factory function.
 * You should use {@link auto.$provide#factory $provide.factory(getFn)} if you do not need to
 * configure your service in a provider.
 *
 * @param {string} name The name of the instance.
 * @param {function()} $getFn The $getFn for the instance creation. Internally this is a short hand
 *                            for `$provide.provider(name, {$get: $getFn})`.
 * @returns {Object} registered provider instance
 *
 * @example
 * Here is an example of registering a service
 * ```js
 *   $provide.factory('ping', ['$http', function($http) {
 *     return function ping() {
 *       return $http.send('/ping');
 *     };
 *   }]);
 * ```
 * You would then inject and use this service like this:
 * ```js
 *   someModule.controller('Ctrl', ['ping', function(ping) {
 *     ping();
 *   }]);
 * ```
 */


/**
 * @ngdoc method
 * @name $provide#service
 * @description
 *
 * Register a **service constructor**, which will be invoked with `new` to create the service
 * instance.
 * This is short for registering a service where its provider's `$get` property is the service
 * constructor function that will be used to instantiate the service instance.
 *
 * You should use {@link auto.$provide#service $provide.service(class)} if you define your service
 * as a type/class.
 *
 * @param {string} name The name of the instance.
 * @param {Function} constructor A class (constructor function) that will be instantiated.
 * @returns {Object} registered provider instance
 *
 * @example
 * Here is an example of registering a service using
 * {@link auto.$provide#service $provide.service(class)}.
 * ```js
 *   var Ping = function($http) {
 *     this.$http = $http;
 *   };
 *
 *   Ping.$inject = ['$http'];
 *
 *   Ping.prototype.send = function() {
 *     return this.$http.get('/ping');
 *   };
 *   $provide.service('ping', Ping);
 * ```
 * You would then inject and use this service like this:
 * ```js
 *   someModule.controller('Ctrl', ['ping', function(ping) {
 *     ping.send();
 *   }]);
 * ```
 */


/**
 * @ngdoc method
 * @name $provide#value
 * @description
 *
 * Register a **value service** with the {@link auto.$injector $injector}, such as a string, a
 * number, an array, an object or a function.  This is short for registering a service where its
 * provider's `$get` property is a factory function that takes no arguments and returns the **value
 * service**.
 *
 * Value services are similar to constant services, except that they cannot be injected into a
 * module configuration function (see {@link angular.Module#config}) but they can be overridden by
 * an Angular
 * {@link auto.$provide#decorator decorator}.
 *
 * @param {string} name The name of the instance.
 * @param {*} value The value.
 * @returns {Object} registered provider instance
 *
 * @example
 * Here are some examples of creating value services.
 * ```js
 *   $provide.value('ADMIN_USER', 'admin');
 *
 *   $provide.value('RoleLookup', { admin: 0, writer: 1, reader: 2 });
 *
 *   $provide.value('halfOf', function(value) {
 *     return value / 2;
 *   });
 * ```
 */


/**
 * @ngdoc method
 * @name $provide#constant
 * @description
 *
 * Register a **constant service**, such as a string, a number, an array, an object or a function,
 * with the {@link auto.$injector $injector}. Unlike {@link auto.$provide#value value} it can be
 * injected into a module configuration function (see {@link angular.Module#config}) and it cannot
 * be overridden by an Angular {@link auto.$provide#decorator decorator}.
 *
 * @param {string} name The name of the constant.
 * @param {*} value The constant value.
 * @returns {Object} registered instance
 *
 * @example
 * Here a some examples of creating constants:
 * ```js
 *   $provide.constant('SHARD_HEIGHT', 306);
 *
 *   $provide.constant('MY_COLOURS', ['red', 'blue', 'grey']);
 *
 *   $provide.constant('double', function(value) {
 *     return value * 2;
 *   });
 * ```
 */


/**
 * @ngdoc method
 * @name $provide#decorator
 * @description
 *
 * Register a **service decorator** with the {@link auto.$injector $injector}. A service decorator
 * intercepts the creation of a service, allowing it to override or modify the behaviour of the
 * service. The object returned by the decorator may be the original service, or a new service
 * object which replaces or wraps and delegates to the original service.
 *
 * @param {string} name The name of the service to decorate.
 * @param {function()} decorator This function will be invoked when the service needs to be
 *    instantiated and should return the decorated service instance. The function is called using
 *    the {@link auto.$injector#invoke injector.invoke} method and is therefore fully injectable.
 *    Local injection arguments:
 *
 *    * `$delegate` - The original service instance, which can be monkey patched, configured,
 *      decorated or delegated to.
 *
 * @example
 * Here we decorate the {@link ng.$log $log} service to convert warnings to errors by intercepting
 * calls to {@link ng.$log#error $log.warn()}.
 * ```js
 *   $provide.decorator('$log', ['$delegate', function($delegate) {
 *     $delegate.warn = $delegate.error;
 *     return $delegate;
 *   }]);
 * ```
 */


function createInjector(modulesToLoad) {
  var INSTANTIATING = {},
      providerSuffix = 'Provider',
      path = [],
      loadedModules = new HashMap([], true),
      providerCache = {
        $provide: {
            provider: supportObject(provider),
            factory: supportObject(factory),
            service: supportObject(service),
            value: supportObject(value),
            constant: supportObject(constant),
            decorator: decorator
          }
      },
      providerInjector = (providerCache.$injector =
          createInternalInjector(providerCache, function() {
            throw $injectorMinErr('unpr', "Unknown provider: {0}", path.join(' <- '));
          })),
      instanceCache = {},
      instanceInjector = (instanceCache.$injector =
          createInternalInjector(instanceCache, function(servicename) {
            var provider = providerInjector.get(servicename + providerSuffix);
            return instanceInjector.invoke(provider.$get, provider);
          }));


  forEach(loadModules(modulesToLoad), function(fn) { instanceInjector.invoke(fn || noop); });

  return instanceInjector;

  ////////////////////////////////////
  // $provider
  ////////////////////////////////////

  function supportObject(delegate) {
    return function(key, value) {
      if (isObject(key)) {
        forEach(key, reverseParams(delegate));
      } else {
        return delegate(key, value);
      }
    };
  }

  function provider(name, provider_) {
    assertNotHasOwnProperty(name, 'service');
    if (isFunction(provider_) || isArray(provider_)) {
      provider_ = providerInjector.instantiate(provider_);
    }
    if (!provider_.$get) {
      throw $injectorMinErr('pget', "Provider '{0}' must define $get factory method.", name);
    }
    return providerCache[name + providerSuffix] = provider_;
  }

  function factory(name, factoryFn) { return provider(name, { $get: factoryFn }); }

  function service(name, constructor) {
    return factory(name, ['$injector', function($injector) {
      return $injector.instantiate(constructor);
    }]);
  }

  function value(name, val) { return factory(name, valueFn(val)); }

  function constant(name, value) {
    assertNotHasOwnProperty(name, 'constant');
    providerCache[name] = value;
    instanceCache[name] = value;
  }

  function decorator(serviceName, decorFn) {
    var origProvider = providerInjector.get(serviceName + providerSuffix),
        orig$get = origProvider.$get;

    origProvider.$get = function() {
      var origInstance = instanceInjector.invoke(orig$get, origProvider);
      return instanceInjector.invoke(decorFn, null, {$delegate: origInstance});
    };
  }

  ////////////////////////////////////
  // Module Loading
  ////////////////////////////////////
  function loadModules(modulesToLoad){
    var runBlocks = [], moduleFn, invokeQueue, i, ii;
    forEach(modulesToLoad, function(module) {
      if (loadedModules.get(module)) return;
      loadedModules.put(module, true);

      try {
        if (isString(module)) {
          moduleFn = angularModule(module);
          runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);

          for(invokeQueue = moduleFn._invokeQueue, i = 0, ii = invokeQueue.length; i < ii; i++) {
            var invokeArgs = invokeQueue[i],
                provider = providerInjector.get(invokeArgs[0]);

            provider[invokeArgs[1]].apply(provider, invokeArgs[2]);
          }
        } else if (isFunction(module)) {
            runBlocks.push(providerInjector.invoke(module));
        } else if (isArray(module)) {
            runBlocks.push(providerInjector.invoke(module));
        } else {
          assertArgFn(module, 'module');
        }
      } catch (e) {
        if (isArray(module)) {
          module = module[module.length - 1];
        }
        if (e.message && e.stack && e.stack.indexOf(e.message) == -1) {
          // Safari & FF's stack traces don't contain error.message content
          // unlike those of Chrome and IE
          // So if stack doesn't contain message, we create a new string that contains both.
          // Since error.stack is read-only in Safari, I'm overriding e and not e.stack here.
          /* jshint -W022 */
          e = e.message + '\n' + e.stack;
        }
        throw $injectorMinErr('modulerr', "Failed to instantiate module {0} due to:\n{1}",
                  module, e.stack || e.message || e);
      }
    });
    return runBlocks;
  }

  ////////////////////////////////////
  // internal Injector
  ////////////////////////////////////

  function createInternalInjector(cache, factory) {

    function getService(serviceName) {
      if (cache.hasOwnProperty(serviceName)) {
        if (cache[serviceName] === INSTANTIATING) {
          throw $injectorMinErr('cdep', 'Circular dependency found: {0}',
                    serviceName + ' <- ' + path.join(' <- '));
        }
        return cache[serviceName];
      } else {
        try {
          path.unshift(serviceName);
          cache[serviceName] = INSTANTIATING;
          return cache[serviceName] = factory(serviceName);
        } catch (err) {
          if (cache[serviceName] === INSTANTIATING) {
            delete cache[serviceName];
          }
          throw err;
        } finally {
          path.shift();
        }
      }
    }

    function invoke(fn, self, locals){
      var args = [],
          $inject = annotate(fn),
          length, i,
          key;

      for(i = 0, length = $inject.length; i < length; i++) {
        key = $inject[i];
        if (typeof key !== 'string') {
          throw $injectorMinErr('itkn',
                  'Incorrect injection token! Expected service name as string, got {0}', key);
        }
        args.push(
          locals && locals.hasOwnProperty(key)
          ? locals[key]
          : getService(key)
        );
      }
      if (isArray(fn)) {
        fn = fn[length];
      }

      // http://jsperf.com/angularjs-invoke-apply-vs-switch
      // #5388
      return fn.apply(self, args);
    }

    function instantiate(Type, locals) {
      var Constructor = function() {},
          instance, returnedValue;

      // Check if Type is annotated and use just the given function at n-1 as parameter
      // e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]);
      Constructor.prototype = (isArray(Type) ? Type[Type.length - 1] : Type).prototype;
      instance = new Constructor();
      returnedValue = invoke(Type, instance, locals);

      return isObject(returnedValue) || isFunction(returnedValue) ? returnedValue : instance;
    }

    return {
      invoke: invoke,
      instantiate: instantiate,
      get: getService,
      annotate: annotate,
      has: function(name) {
        return providerCache.hasOwnProperty(name + providerSuffix) || cache.hasOwnProperty(name);
      }
    };
  }
}

/**
 * @ngdoc service
 * @name $anchorScroll
 * @kind function
 * @requires $window
 * @requires $location
 * @requires $rootScope
 *
 * @description
 * When called, it checks current value of `$location.hash()` and scrolls to the related element,
 * according to rules specified in
 * [Html5 spec](http://dev.w3.org/html5/spec/Overview.html#the-indicated-part-of-the-document).
 *
 * It also watches the `$location.hash()` and scrolls whenever it changes to match any anchor.
 * This can be disabled by calling `$anchorScrollProvider.disableAutoScrolling()`.
 *
 * @example
   <example>
     <file name="index.html">
       <div id="scrollArea" ng-controller="ScrollCtrl">
         <a ng-click="gotoBottom()">Go to bottom</a>
         <a id="bottom"></a> You're at the bottom!
       </div>
     </file>
     <file name="script.js">
       function ScrollCtrl($scope, $location, $anchorScroll) {
         $scope.gotoBottom = function (){
           // set the location.hash to the id of
           // the element you wish to scroll to.
           $location.hash('bottom');

           // call $anchorScroll()
           $anchorScroll();
         };
       }
     </file>
     <file name="style.css">
       #scrollArea {
         height: 350px;
         overflow: auto;
       }

       #bottom {
         display: block;
         margin-top: 2000px;
       }
     </file>
   </example>
 */
function $AnchorScrollProvider() {

  var autoScrollingEnabled = true;

  this.disableAutoScrolling = function() {
    autoScrollingEnabled = false;
  };

  this.$get = ['$window', '$location', '$rootScope', function($window, $location, $rootScope) {
    var document = $window.document;

    // helper function to get first anchor from a NodeList
    // can't use filter.filter, as it accepts only instances of Array
    // and IE can't convert NodeList to an array using [].slice
    // TODO(vojta): use filter if we change it to accept lists as well
    function getFirstAnchor(list) {
      var result = null;
      forEach(list, function(element) {
        if (!result && lowercase(element.nodeName) === 'a') result = element;
      });
      return result;
    }

    function scroll() {
      var hash = $location.hash(), elm;

      // empty hash, scroll to the top of the page
      if (!hash) $window.scrollTo(0, 0);

      // element with given id
      else if ((elm = document.getElementById(hash))) elm.scrollIntoView();

      // first anchor with given name :-D
      else if ((elm = getFirstAnchor(document.getElementsByName(hash)))) elm.scrollIntoView();

      // no element and hash == 'top', scroll to the top of the page
      else if (hash === 'top') $window.scrollTo(0, 0);
    }

    // does not scroll when user clicks on anchor link that is currently on
    // (no url change, no $location.hash() change), browser native does scroll
    if (autoScrollingEnabled) {
      $rootScope.$watch(function autoScrollWatch() {return $location.hash();},
        function autoScrollWatchAction() {
          $rootScope.$evalAsync(scroll);
        });
    }

    return scroll;
  }];
}

var $animateMinErr = minErr('$animate');

/**
 * @ngdoc provider
 * @name $animateProvider
 *
 * @description
 * Default implementation of $animate that doesn't perform any animations, instead just
 * synchronously performs DOM
 * updates and calls done() callbacks.
 *
 * In order to enable animations the ngAnimate module has to be loaded.
 *
 * To see the functional implementation check out src/ngAnimate/animate.js
 */
var $AnimateProvider = ['$provide', function($provide) {


  this.$$selectors = {};


  /**
   * @ngdoc method
   * @name $animateProvider#register
   *
   * @description
   * Registers a new injectable animation factory function. The factory function produces the
   * animation object which contains callback functions for each event that is expected to be
   * animated.
   *
   *   * `eventFn`: `function(Element, doneFunction)` The element to animate, the `doneFunction`
   *   must be called once the element animation is complete. If a function is returned then the
   *   animation service will use this function to cancel the animation whenever a cancel event is
   *   triggered.
   *
   *
   * ```js
   *   return {
     *     eventFn : function(element, done) {
     *       //code to run the animation
     *       //once complete, then run done()
     *       return function cancellationFunction() {
     *         //code to cancel the animation
     *       }
     *     }
     *   }
   * ```
   *
   * @param {string} name The name of the animation.
   * @param {Function} factory The factory function that will be executed to return the animation
   *                           object.
   */
  this.register = function(name, factory) {
    var key = name + '-animation';
    if (name && name.charAt(0) != '.') throw $animateMinErr('notcsel',
        "Expecting class selector starting with '.' got '{0}'.", name);
    this.$$selectors[name.substr(1)] = key;
    $provide.factory(key, factory);
  };

  /**
   * @ngdoc method
   * @name $animateProvider#classNameFilter
   *
   * @description
   * Sets and/or returns the CSS class regular expression that is checked when performing
   * an animation. Upon bootstrap the classNameFilter value is not set at all and will
   * therefore enable $animate to attempt to perform an animation on any element.
   * When setting the classNameFilter value, animations will only be performed on elements
   * that successfully match the filter expression. This in turn can boost performance
   * for low-powered devices as well as applications containing a lot of structural operations.
   * @param {RegExp=} expression The className expression which will be checked against all animations
   * @return {RegExp} The current CSS className expression value. If null then there is no expression value
   */
  this.classNameFilter = function(expression) {
    if(arguments.length === 1) {
      this.$$classNameFilter = (expression instanceof RegExp) ? expression : null;
    }
    return this.$$classNameFilter;
  };

  this.$get = ['$timeout', '$$asyncCallback', function($timeout, $$asyncCallback) {

    function async(fn) {
      fn && $$asyncCallback(fn);
    }

    /**
     *
     * @ngdoc service
     * @name $animate
     * @description The $animate service provides rudimentary DOM manipulation functions to
     * insert, remove and move elements within the DOM, as well as adding and removing classes.
     * This service is the core service used by the ngAnimate $animator service which provides
     * high-level animation hooks for CSS and JavaScript.
     *
     * $animate is available in the AngularJS core, however, the ngAnimate module must be included
     * to enable full out animation support. Otherwise, $animate will only perform simple DOM
     * manipulation operations.
     *
     * To learn more about enabling animation support, click here to visit the {@link ngAnimate
     * ngAnimate module page} as well as the {@link ngAnimate.$animate ngAnimate $animate service
     * page}.
     */
    return {

      /**
       *
       * @ngdoc method
       * @name $animate#enter
       * @kind function
       * @description Inserts the element into the DOM either after the `after` element or within
       *   the `parent` element. Once complete, the done() callback will be fired (if provided).
       * @param {DOMElement} element the element which will be inserted into the DOM
       * @param {DOMElement} parent the parent element which will append the element as
       *   a child (if the after element is not present)
       * @param {DOMElement} after the sibling element which will append the element
       *   after itself
       * @param {Function=} done callback function that will be called after the element has been
       *   inserted into the DOM
       */
      enter : function(element, parent, after, done) {
        if (after) {
          after.after(element);
        } else {
          if (!parent || !parent[0]) {
            parent = after.parent();
          }
          parent.append(element);
        }
        async(done);
      },

      /**
       *
       * @ngdoc method
       * @name $animate#leave
       * @kind function
       * @description Removes the element from the DOM. Once complete, the done() callback will be
       *   fired (if provided).
       * @param {DOMElement} element the element which will be removed from the DOM
       * @param {Function=} done callback function that will be called after the element has been
       *   removed from the DOM
       */
      leave : function(element, done) {
        element.remove();
        async(done);
      },

      /**
       *
       * @ngdoc method
       * @name $animate#move
       * @kind function
       * @description Moves the position of the provided element within the DOM to be placed
       * either after the `after` element or inside of the `parent` element. Once complete, the
       * done() callback will be fired (if provided).
       *
       * @param {DOMElement} element the element which will be moved around within the
       *   DOM
       * @param {DOMElement} parent the parent element where the element will be
       *   inserted into (if the after element is not present)
       * @param {DOMElement} after the sibling element where the element will be
       *   positioned next to
       * @param {Function=} done the callback function (if provided) that will be fired after the
       *   element has been moved to its new position
       */
      move : function(element, parent, after, done) {
        // Do not remove element before insert. Removing will cause data associated with the
        // element to be dropped. Insert will implicitly do the remove.
        this.enter(element, parent, after, done);
      },

      /**
       *
       * @ngdoc method
       * @name $animate#addClass
       * @kind function
       * @description Adds the provided className CSS class value to the provided element. Once
       * complete, the done() callback will be fired (if provided).
       * @param {DOMElement} element the element which will have the className value
       *   added to it
       * @param {string} className the CSS class which will be added to the element
       * @param {Function=} done the callback function (if provided) that will be fired after the
       *   className value has been added to the element
       */
      addClass : function(element, className, done) {
        className = isString(className) ?
                      className :
                      isArray(className) ? className.join(' ') : '';
        forEach(element, function (element) {
          jqLiteAddClass(element, className);
        });
        async(done);
      },

      /**
       *
       * @ngdoc method
       * @name $animate#removeClass
       * @kind function
       * @description Removes the provided className CSS class value from the provided element.
       * Once complete, the done() callback will be fired (if provided).
       * @param {DOMElement} element the element which will have the className value
       *   removed from it
       * @param {string} className the CSS class which will be removed from the element
       * @param {Function=} done the callback function (if provided) that will be fired after the
       *   className value has been removed from the element
       */
      removeClass : function(element, className, done) {
        className = isString(className) ?
                      className :
                      isArray(className) ? className.join(' ') : '';
        forEach(element, function (element) {
          jqLiteRemoveClass(element, className);
        });
        async(done);
      },

      /**
       *
       * @ngdoc method
       * @name $animate#setClass
       * @kind function
       * @description Adds and/or removes the given CSS classes to and from the element.
       * Once complete, the done() callback will be fired (if provided).
       * @param {DOMElement} element the element which will have its CSS classes changed
       *   removed from it
       * @param {string} add the CSS classes which will be added to the element
       * @param {string} remove the CSS class which will be removed from the element
       * @param {Function=} done the callback function (if provided) that will be fired after the
       *   CSS classes have been set on the element
       */
      setClass : function(element, add, remove, done) {
        forEach(element, function (element) {
          jqLiteAddClass(element, add);
          jqLiteRemoveClass(element, remove);
        });
        async(done);
      },

      enabled : noop
    };
  }];
}];

function $$AsyncCallbackProvider(){
  this.$get = ['$$rAF', '$timeout', function($$rAF, $timeout) {
    return $$rAF.supported
      ? function(fn) { return $$rAF(fn); }
      : function(fn) {
        return $timeout(fn, 0, false);
      };
  }];
}

/**
 * ! This is a private undocumented service !
 *
 * @name $browser
 * @requires $log
 * @description
 * This object has two goals:
 *
 * - hide all the global state in the browser caused by the window object
 * - abstract away all the browser specific features and inconsistencies
 *
 * For tests we provide {@link ngMock.$browser mock implementation} of the `$browser`
 * service, which can be used for convenient testing of the application without the interaction with
 * the real browser apis.
 */
/**
 * @param {object} window The global window object.
 * @param {object} document jQuery wrapped document.
 * @param {function()} XHR XMLHttpRequest constructor.
 * @param {object} $log console.log or an object with the same interface.
 * @param {object} $sniffer $sniffer service
 */
function Browser(window, document, $log, $sniffer) {
  var self = this,
      rawDocument = document[0],
      location = window.location,
      history = window.history,
      setTimeout = window.setTimeout,
      clearTimeout = window.clearTimeout,
      pendingDeferIds = {};

  self.isMock = false;

  var outstandingRequestCount = 0;
  var outstandingRequestCallbacks = [];

  // TODO(vojta): remove this temporary api
  self.$$completeOutstandingRequest = completeOutstandingRequest;
  self.$$incOutstandingRequestCount = function() { outstandingRequestCount++; };

  /**
   * Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks`
   * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.
   */
  function completeOutstandingRequest(fn) {
    try {
      fn.apply(null, sliceArgs(arguments, 1));
    } finally {
      outstandingRequestCount--;
      if (outstandingRequestCount === 0) {
        while(outstandingRequestCallbacks.length) {
          try {
            outstandingRequestCallbacks.pop()();
          } catch (e) {
            $log.error(e);
          }
        }
      }
    }
  }

  /**
   * @private
   * Note: this method is used only by scenario runner
   * TODO(vojta): prefix this method with $$ ?
   * @param {function()} callback Function that will be called when no outstanding request
   */
  self.notifyWhenNoOutstandingRequests = function(callback) {
    // force browser to execute all pollFns - this is needed so that cookies and other pollers fire
    // at some deterministic time in respect to the test runner's actions. Leaving things up to the
    // regular poller would result in flaky tests.
    forEach(pollFns, function(pollFn){ pollFn(); });

    if (outstandingRequestCount === 0) {
      callback();
    } else {
      outstandingRequestCallbacks.push(callback);
    }
  };

  //////////////////////////////////////////////////////////////
  // Poll Watcher API
  //////////////////////////////////////////////////////////////
  var pollFns = [],
      pollTimeout;

  /**
   * @name $browser#addPollFn
   *
   * @param {function()} fn Poll function to add
   *
   * @description
   * Adds a function to the list of functions that poller periodically executes,
   * and starts polling if not started yet.
   *
   * @returns {function()} the added function
   */
  self.addPollFn = function(fn) {
    if (isUndefined(pollTimeout)) startPoller(100, setTimeout);
    pollFns.push(fn);
    return fn;
  };

  /**
   * @param {number} interval How often should browser call poll functions (ms)
   * @param {function()} setTimeout Reference to a real or fake `setTimeout` function.
   *
   * @description
   * Configures the poller to run in the specified intervals, using the specified
   * setTimeout fn and kicks it off.
   */
  function startPoller(interval, setTimeout) {
    (function check() {
      forEach(pollFns, function(pollFn){ pollFn(); });
      pollTimeout = setTimeout(check, interval);
    })();
  }

  //////////////////////////////////////////////////////////////
  // URL API
  //////////////////////////////////////////////////////////////

  var lastBrowserUrl = location.href,
      baseElement = document.find('base'),
      newLocation = null;

  /**
   * @name $browser#url
   *
   * @description
   * GETTER:
   * Without any argument, this method just returns current value of location.href.
   *
   * SETTER:
   * With at least one argument, this method sets url to new value.
   * If html5 history api supported, pushState/replaceState is used, otherwise
   * location.href/location.replace is used.
   * Returns its own instance to allow chaining
   *
   * NOTE: this api is intended for use only by the $location service. Please use the
   * {@link ng.$location $location service} to change url.
   *
   * @param {string} url New url (when used as setter)
   * @param {boolean=} replace Should new url replace current history record ?
   */
  self.url = function(url, replace) {
    // Android Browser BFCache causes location, history reference to become stale.
    if (location !== window.location) location = window.location;
    if (history !== window.history) history = window.history;

    // setter
    if (url) {
      if (lastBrowserUrl == url) return;
      lastBrowserUrl = url;
      if ($sniffer.history) {
        if (replace) history.replaceState(null, '', url);
        else {
          history.pushState(null, '', url);
          // Crazy Opera Bug: http://my.opera.com/community/forums/topic.dml?id=1185462
          baseElement.attr('href', baseElement.attr('href'));
        }
      } else {
        newLocation = url;
        if (replace) {
          location.replace(url);
        } else {
          location.href = url;
        }
      }
      return self;
    // getter
    } else {
      // - newLocation is a workaround for an IE7-9 issue with location.replace and location.href
      //   methods not updating location.href synchronously.
      // - the replacement is a workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=407172
      return newLocation || location.href.replace(/%27/g,"'");
    }
  };

  var urlChangeListeners = [],
      urlChangeInit = false;

  function fireUrlChange() {
    newLocation = null;
    if (lastBrowserUrl == self.url()) return;

    lastBrowserUrl = self.url();
    forEach(urlChangeListeners, function(listener) {
      listener(self.url());
    });
  }

  /**
   * @name $browser#onUrlChange
   *
   * @description
   * Register callback function that will be called, when url changes.
   *
   * It's only called when the url is changed from outside of angular:
   * - user types different url into address bar
   * - user clicks on history (forward/back) button
   * - user clicks on a link
   *
   * It's not called when url is changed by $browser.url() method
   *
   * The listener gets called with new url as parameter.
   *
   * NOTE: this api is intended for use only by the $location service. Please use the
   * {@link ng.$location $location service} to monitor url changes in angular apps.
   *
   * @param {function(string)} listener Listener function to be called when url changes.
   * @return {function(string)} Returns the registered listener fn - handy if the fn is anonymous.
   */
  self.onUrlChange = function(callback) {
    // TODO(vojta): refactor to use node's syntax for events
    if (!urlChangeInit) {
      // We listen on both (hashchange/popstate) when available, as some browsers (e.g. Opera)
      // don't fire popstate when user change the address bar and don't fire hashchange when url
      // changed by push/replaceState

      // html5 history api - popstate event
      if ($sniffer.history) jqLite(window).on('popstate', fireUrlChange);
      // hashchange event
      if ($sniffer.hashchange) jqLite(window).on('hashchange', fireUrlChange);
      // polling
      else self.addPollFn(fireUrlChange);

      urlChangeInit = true;
    }

    urlChangeListeners.push(callback);
    return callback;
  };

  /**
   * Checks whether the url has changed outside of Angular.
   * Needs to be exported to be able to check for changes that have been done in sync,
   * as hashchange/popstate events fire in async.
   */
  self.$$checkUrlChange = fireUrlChange;

  //////////////////////////////////////////////////////////////
  // Misc API
  //////////////////////////////////////////////////////////////

  /**
   * @name $browser#baseHref
   *
   * @description
   * Returns current <base href>
   * (always relative - without domain)
   *
   * @returns {string} The current base href
   */
  self.baseHref = function() {
    var href = baseElement.attr('href');
    return href ? href.replace(/^(https?\:)?\/\/[^\/]*/, '') : '';
  };

  //////////////////////////////////////////////////////////////
  // Cookies API
  //////////////////////////////////////////////////////////////
  var lastCookies = {};
  var lastCookieString = '';
  var cookiePath = self.baseHref();

  /**
   * @name $browser#cookies
   *
   * @param {string=} name Cookie name
   * @param {string=} value Cookie value
   *
   * @description
   * The cookies method provides a 'private' low level access to browser cookies.
   * It is not meant to be used directly, use the $cookie service instead.
   *
   * The return values vary depending on the arguments that the method was called with as follows:
   *
   * - cookies() -> hash of all cookies, this is NOT a copy of the internal state, so do not modify
   *   it
   * - cookies(name, value) -> set name to value, if value is undefined delete the cookie
   * - cookies(name) -> the same as (name, undefined) == DELETES (no one calls it right now that
   *   way)
   *
   * @returns {Object} Hash of all cookies (if called without any parameter)
   */
  self.cookies = function(name, value) {
    /* global escape: false, unescape: false */
    var cookieLength, cookieArray, cookie, i, index;

    if (name) {
      if (value === undefined) {
        rawDocument.cookie = escape(name) + "=;path=" + cookiePath +
                                ";expires=Thu, 01 Jan 1970 00:00:00 GMT";
      } else {
        if (isString(value)) {
          cookieLength = (rawDocument.cookie = escape(name) + '=' + escape(value) +
                                ';path=' + cookiePath).length + 1;

          // per http://www.ietf.org/rfc/rfc2109.txt browser must allow at minimum:
          // - 300 cookies
          // - 20 cookies per unique domain
          // - 4096 bytes per cookie
          if (cookieLength > 4096) {
            $log.warn("Cookie '"+ name +
              "' possibly not set or overflowed because it was too large ("+
              cookieLength + " > 4096 bytes)!");
          }
        }
      }
    } else {
      if (rawDocument.cookie !== lastCookieString) {
        lastCookieString = rawDocument.cookie;
        cookieArray = lastCookieString.split("; ");
        lastCookies = {};

        for (i = 0; i < cookieArray.length; i++) {
          cookie = cookieArray[i];
          index = cookie.indexOf('=');
          if (index > 0) { //ignore nameless cookies
            name = unescape(cookie.substring(0, index));
            // the first value that is seen for a cookie is the most
            // specific one.  values for the same cookie name that
            // follow are for less specific paths.
            if (lastCookies[name] === undefined) {
              lastCookies[name] = unescape(cookie.substring(index + 1));
            }
          }
        }
      }
      return lastCookies;
    }
  };


  /**
   * @name $browser#defer
   * @param {function()} fn A function, who's execution should be deferred.
   * @param {number=} [delay=0] of milliseconds to defer the function execution.
   * @returns {*} DeferId that can be used to cancel the task via `$browser.defer.cancel()`.
   *
   * @description
   * Executes a fn asynchronously via `setTimeout(fn, delay)`.
   *
   * Unlike when calling `setTimeout` directly, in test this function is mocked and instead of using
   * `setTimeout` in tests, the fns are queued in an array, which can be programmatically flushed
   * via `$browser.defer.flush()`.
   *
   */
  self.defer = function(fn, delay) {
    var timeoutId;
    outstandingRequestCount++;
    timeoutId = setTimeout(function() {
      delete pendingDeferIds[timeoutId];
      completeOutstandingRequest(fn);
    }, delay || 0);
    pendingDeferIds[timeoutId] = true;
    return timeoutId;
  };


  /**
   * @name $browser#defer.cancel
   *
   * @description
   * Cancels a deferred task identified with `deferId`.
   *
   * @param {*} deferId Token returned by the `$browser.defer` function.
   * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully
   *                    canceled.
   */
  self.defer.cancel = function(deferId) {
    if (pendingDeferIds[deferId]) {
      delete pendingDeferIds[deferId];
      clearTimeout(deferId);
      completeOutstandingRequest(noop);
      return true;
    }
    return false;
  };

}

function $BrowserProvider(){
  this.$get = ['$window', '$log', '$sniffer', '$document',
      function( $window,   $log,   $sniffer,   $document){
        return new Browser($window, $document, $log, $sniffer);
      }];
}

/**
 * @ngdoc service
 * @name $cacheFactory
 *
 * @description
 * Factory that constructs {@link $cacheFactory.Cache Cache} objects and gives access to
 * them.
 *
 * ```js
 *
 *  var cache = $cacheFactory('cacheId');
 *  expect($cacheFactory.get('cacheId')).toBe(cache);
 *  expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined();
 *
 *  cache.put("key", "value");
 *  cache.put("another key", "another value");
 *
 *  // We've specified no options on creation
 *  expect(cache.info()).toEqual({id: 'cacheId', size: 2});
 *
 * ```
 *
 *
 * @param {string} cacheId Name or id of the newly created cache.
 * @param {object=} options Options object that specifies the cache behavior. Properties:
 *
 *   - `{number=}` `capacity` — turns the cache into LRU cache.
 *
 * @returns {object} Newly created cache object with the following set of methods:
 *
 * - `{object}` `info()` — Returns id, size, and options of cache.
 * - `{{*}}` `put({string} key, {*} value)` — Puts a new key-value pair into the cache and returns
 *   it.
 * - `{{*}}` `get({string} key)` — Returns cached value for `key` or undefined for cache miss.
 * - `{void}` `remove({string} key)` — Removes a key-value pair from the cache.
 * - `{void}` `removeAll()` — Removes all cached values.
 * - `{void}` `destroy()` — Removes references to this cache from $cacheFactory.
 *
 * @example
   <example module="cacheExampleApp">
     <file name="index.html">
       <div ng-controller="CacheController">
         <input ng-model="newCacheKey" placeholder="Key">
         <input ng-model="newCacheValue" placeholder="Value">
         <button ng-click="put(newCacheKey, newCacheValue)">Cache</button>

         <p ng-if="keys.length">Cached Values</p>
         <div ng-repeat="key in keys">
           <span ng-bind="key"></span>
           <span>: </span>
           <b ng-bind="cache.get(key)"></b>
         </div>

         <p>Cache Info</p>
         <div ng-repeat="(key, value) in cache.info()">
           <span ng-bind="key"></span>
           <span>: </span>
           <b ng-bind="value"></b>
         </div>
       </div>
     </file>
     <file name="script.js">
       angular.module('cacheExampleApp', []).
         controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) {
           $scope.keys = [];
           $scope.cache = $cacheFactory('cacheId');
           $scope.put = function(key, value) {
             if ($scope.cache.get(key) === undefined) {
               $scope.keys.push(key);
             }
             $scope.cache.put(key, value === undefined ? null : value);
           };
         }]);
     </file>
     <file name="style.css">
       p {
         margin: 10px 0 3px;
       }
     </file>
   </example>
 */
function $CacheFactoryProvider() {

  this.$get = function() {
    var caches = {};

    function cacheFactory(cacheId, options) {
      if (cacheId in caches) {
        throw minErr('$cacheFactory')('iid', "CacheId '{0}' is already taken!", cacheId);
      }

      var size = 0,
          stats = extend({}, options, {id: cacheId}),
          data = {},
          capacity = (options && options.capacity) || Number.MAX_VALUE,
          lruHash = {},
          freshEnd = null,
          staleEnd = null;

      /**
       * @ngdoc type
       * @name $cacheFactory.Cache
       *
       * @description
       * A cache object used to store and retrieve data, primarily used by
       * {@link $http $http} and the {@link ng.directive:script script} directive to cache
       * templates and other data.
       *
       * ```js
       *  angular.module('superCache')
       *    .factory('superCache', ['$cacheFactory', function($cacheFactory) {
       *      return $cacheFactory('super-cache');
       *    }]);
       * ```
       *
       * Example test:
       *
       * ```js
       *  it('should behave like a cache', inject(function(superCache) {
       *    superCache.put('key', 'value');
       *    superCache.put('another key', 'another value');
       *
       *    expect(superCache.info()).toEqual({
       *      id: 'super-cache',
       *      size: 2
       *    });
       *
       *    superCache.remove('another key');
       *    expect(superCache.get('another key')).toBeUndefined();
       *
       *    superCache.removeAll();
       *    expect(superCache.info()).toEqual({
       *      id: 'super-cache',
       *      size: 0
       *    });
       *  }));
       * ```
       */
      return caches[cacheId] = {

        /**
         * @ngdoc method
         * @name $cacheFactory.Cache#put
         * @kind function
         *
         * @description
         * Inserts a named entry into the {@link $cacheFactory.Cache Cache} object to be
         * retrieved later, and incrementing the size of the cache if the key was not already
         * present in the cache. If behaving like an LRU cache, it will also remove stale
         * entries from the set.
         *
         * It will not insert undefined values into the cache.
         *
         * @param {string} key the key under which the cached data is stored.
         * @param {*} value the value to store alongside the key. If it is undefined, the key
         *    will not be stored.
         * @returns {*} the value stored.
         */
        put: function(key, value) {
          if (capacity < Number.MAX_VALUE) {
            var lruEntry = lruHash[key] || (lruHash[key] = {key: key});

            refresh(lruEntry);
          }

          if (isUndefined(value)) return;
          if (!(key in data)) size++;
          data[key] = value;

          if (size > capacity) {
            this.remove(staleEnd.key);
          }

          return value;
        },

        /**
         * @ngdoc method
         * @name $cacheFactory.Cache#get
         * @kind function
         *
         * @description
         * Retrieves named data stored in the {@link $cacheFactory.Cache Cache} object.
         *
         * @param {string} key the key of the data to be retrieved
         * @returns {*} the value stored.
         */
        get: function(key) {
          if (capacity < Number.MAX_VALUE) {
            var lruEntry = lruHash[key];

            if (!lruEntry) return;

            refresh(lruEntry);
          }

          return data[key];
        },


        /**
         * @ngdoc method
         * @name $cacheFactory.Cache#remove
         * @kind function
         *
         * @description
         * Removes an entry from the {@link $cacheFactory.Cache Cache} object.
         *
         * @param {string} key the key of the entry to be removed
         */
        remove: function(key) {
          if (capacity < Number.MAX_VALUE) {
            var lruEntry = lruHash[key];

            if (!lruEntry) return;

            if (lruEntry == freshEnd) freshEnd = lruEntry.p;
            if (lruEntry == staleEnd) staleEnd = lruEntry.n;
            link(lruEntry.n,lruEntry.p);

            delete lruHash[key];
          }

          delete data[key];
          size--;
        },


        /**
         * @ngdoc method
         * @name $cacheFactory.Cache#removeAll
         * @kind function
         *
         * @description
         * Clears the cache object of any entries.
         */
        removeAll: function() {
          data = {};
          size = 0;
          lruHash = {};
          freshEnd = staleEnd = null;
        },


        /**
         * @ngdoc method
         * @name $cacheFactory.Cache#destroy
         * @kind function
         *
         * @description
         * Destroys the {@link $cacheFactory.Cache Cache} object entirely,
         * removing it from the {@link $cacheFactory $cacheFactory} set.
         */
        destroy: function() {
          data = null;
          stats = null;
          lruHash = null;
          delete caches[cacheId];
        },


        /**
         * @ngdoc method
         * @name $cacheFactory.Cache#info
         * @kind function
         *
         * @description
         * Retrieve information regarding a particular {@link $cacheFactory.Cache Cache}.
         *
         * @returns {object} an object with the following properties:
         *   <ul>
         *     <li>**id**: the id of the cache instance</li>
         *     <li>**size**: the number of entries kept in the cache instance</li>
         *     <li>**...**: any additional properties from the options object when creating the
         *       cache.</li>
         *   </ul>
         */
        info: function() {
          return extend({}, stats, {size: size});
        }
      };


      /**
       * makes the `entry` the freshEnd of the LRU linked list
       */
      function refresh(entry) {
        if (entry != freshEnd) {
          if (!staleEnd) {
            staleEnd = entry;
          } else if (staleEnd == entry) {
            staleEnd = entry.n;
          }

          link(entry.n, entry.p);
          link(entry, freshEnd);
          freshEnd = entry;
          freshEnd.n = null;
        }
      }


      /**
       * bidirectionally links two entries of the LRU linked list
       */
      function link(nextEntry, prevEntry) {
        if (nextEntry != prevEntry) {
          if (nextEntry) nextEntry.p = prevEntry; //p stands for previous, 'prev' didn't minify
          if (prevEntry) prevEntry.n = nextEntry; //n stands for next, 'next' didn't minify
        }
      }
    }


  /**
   * @ngdoc method
   * @name $cacheFactory#info
   *
   * @description
   * Get information about all the caches that have been created
   *
   * @returns {Object} - key-value map of `cacheId` to the result of calling `cache#info`
   */
    cacheFactory.info = function() {
      var info = {};
      forEach(caches, function(cache, cacheId) {
        info[cacheId] = cache.info();
      });
      return info;
    };


  /**
   * @ngdoc method
   * @name $cacheFactory#get
   *
   * @description
   * Get access to a cache object by the `cacheId` used when it was created.
   *
   * @param {string} cacheId Name or id of a cache to access.
   * @returns {object} Cache object identified by the cacheId or undefined if no such cache.
   */
    cacheFactory.get = function(cacheId) {
      return caches[cacheId];
    };


    return cacheFactory;
  };
}

/**
 * @ngdoc service
 * @name $templateCache
 *
 * @description
 * The first time a template is used, it is loaded in the template cache for quick retrieval. You
 * can load templates directly into the cache in a `script` tag, or by consuming the
 * `$templateCache` service directly.
 *
 * Adding via the `script` tag:
 *
 * ```html
 *   <script type="text/ng-template" id="templateId.html">
 *     <p>This is the content of the template</p>
 *   </script>
 * ```
 *
 * **Note:** the `script` tag containing the template does not need to be included in the `head` of
 * the document, but it must be below the `ng-app` definition.
 *
 * Adding via the $templateCache service:
 *
 * ```js
 * var myApp = angular.module('myApp', []);
 * myApp.run(function($templateCache) {
 *   $templateCache.put('templateId.html', 'This is the content of the template');
 * });
 * ```
 *
 * To retrieve the template later, simply use it in your HTML:
 * ```html
 * <div ng-include=" 'templateId.html' "></div>
 * ```
 *
 * or get it via Javascript:
 * ```js
 * $templateCache.get('templateId.html')
 * ```
 *
 * See {@link ng.$cacheFactory $cacheFactory}.
 *
 */
function $TemplateCacheProvider() {
  this.$get = ['$cacheFactory', function($cacheFactory) {
    return $cacheFactory('templates');
  }];
}

/* ! VARIABLE/FUNCTION NAMING CONVENTIONS THAT APPLY TO THIS FILE!
 *
 * DOM-related variables:
 *
 * - "node" - DOM Node
 * - "element" - DOM Element or Node
 * - "$node" or "$element" - jqLite-wrapped node or element
 *
 *
 * Compiler related stuff:
 *
 * - "linkFn" - linking fn of a single directive
 * - "nodeLinkFn" - function that aggregates all linking fns for a particular node
 * - "childLinkFn" -  function that aggregates all linking fns for child nodes of a particular node
 * - "compositeLinkFn" - function that aggregates all linking fns for a compilation root (nodeList)
 */


/**
 * @ngdoc service
 * @name $compile
 * @kind function
 *
 * @description
 * Compiles an HTML string or DOM into a template and produces a template function, which
 * can then be used to link {@link ng.$rootScope.Scope `scope`} and the template together.
 *
 * The compilation is a process of walking the DOM tree and matching DOM elements to
 * {@link ng.$compileProvider#directive directives}.
 *
 * <div class="alert alert-warning">
 * **Note:** This document is an in-depth reference of all directive options.
 * For a gentle introduction to directives with examples of common use cases,
 * see the {@link guide/directive directive guide}.
 * </div>
 *
 * ## Comprehensive Directive API
 *
 * There are many different options for a directive.
 *
 * The difference resides in the return value of the factory function.
 * You can either return a "Directive Definition Object" (see below) that defines the directive properties,
 * or just the `postLink` function (all other properties will have the default values).
 *
 * <div class="alert alert-success">
 * **Best Practice:** It's recommended to use the "directive definition object" form.
 * </div>
 *
 * Here's an example directive declared with a Directive Definition Object:
 *
 * ```js
 *   var myModule = angular.module(...);
 *
 *   myModule.directive('directiveName', function factory(injectables) {
 *     var directiveDefinitionObject = {
 *       priority: 0,
 *       template: '<div></div>', // or // function(tElement, tAttrs) { ... },
 *       // or
 *       // templateUrl: 'directive.html', // or // function(tElement, tAttrs) { ... },
 *       transclude: false,
 *       restrict: 'A',
 *       scope: false,
 *       controller: function($scope, $element, $attrs, $transclude, otherInjectables) { ... },
 *       controllerAs: 'stringAlias',
 *       require: 'siblingDirectiveName', // or // ['^parentDirectiveName', '?optionalDirectiveName', '?^optionalParent'],
 *       compile: function compile(tElement, tAttrs, transclude) {
 *         return {
 *           pre: function preLink(scope, iElement, iAttrs, controller) { ... },
 *           post: function postLink(scope, iElement, iAttrs, controller) { ... }
 *         }
 *         // or
 *         // return function postLink( ... ) { ... }
 *       },
 *       // or
 *       // link: {
 *       //  pre: function preLink(scope, iElement, iAttrs, controller) { ... },
 *       //  post: function postLink(scope, iElement, iAttrs, controller) { ... }
 *       // }
 *       // or
 *       // link: function postLink( ... ) { ... }
 *     };
 *     return directiveDefinitionObject;
 *   });
 * ```
 *
 * <div class="alert alert-warning">
 * **Note:** Any unspecified options will use the default value. You can see the default values below.
 * </div>
 *
 * Therefore the above can be simplified as:
 *
 * ```js
 *   var myModule = angular.module(...);
 *
 *   myModule.directive('directiveName', function factory(injectables) {
 *     var directiveDefinitionObject = {
 *       link: function postLink(scope, iElement, iAttrs) { ... }
 *     };
 *     return directiveDefinitionObject;
 *     // or
 *     // return function postLink(scope, iElement, iAttrs) { ... }
 *   });
 * ```
 *
 *
 *
 * ### Directive Definition Object
 *
 * The directive definition object provides instructions to the {@link ng.$compile
 * compiler}. The attributes are:
 *
 * #### `priority`
 * When there are multiple directives defined on a single DOM element, sometimes it
 * is necessary to specify the order in which the directives are applied. The `priority` is used
 * to sort the directives before their `compile` functions get called. Priority is defined as a
 * number. Directives with greater numerical `priority` are compiled first. Pre-link functions
 * are also run in priority order, but post-link functions are run in reverse order. The order
 * of directives with the same priority is undefined. The default priority is `0`.
 *
 * #### `terminal`
 * If set to true then the current `priority` will be the last set of directives
 * which will execute (any directives at the current priority will still execute
 * as the order of execution on same `priority` is undefined).
 *
 * #### `scope`
 * **If set to `true`,** then a new scope will be created for this directive. If multiple directives on the
 * same element request a new scope, only one new scope is created. The new scope rule does not
 * apply for the root of the template since the root of the template always gets a new scope.
 *
 * **If set to `{}` (object hash),** then a new "isolate" scope is created. The 'isolate' scope differs from
 * normal scope in that it does not prototypically inherit from the parent scope. This is useful
 * when creating reusable components, which should not accidentally read or modify data in the
 * parent scope.
 *
 * The 'isolate' scope takes an object hash which defines a set of local scope properties
 * derived from the parent scope. These local properties are useful for aliasing values for
 * templates. Locals definition is a hash of local scope property to its source:
 *
 * * `@` or `@attr` - bind a local scope property to the value of DOM attribute. The result is
 *   always a string since DOM attributes are strings. If no `attr` name is specified  then the
 *   attribute name is assumed to be the same as the local name.
 *   Given `<widget my-attr="hello {{name}}">` and widget definition
 *   of `scope: { localName:'@myAttr' }`, then widget scope property `localName` will reflect
 *   the interpolated value of `hello {{name}}`. As the `name` attribute changes so will the
 *   `localName` property on the widget scope. The `name` is read from the parent scope (not
 *   component scope).
 *
 * * `=` or `=attr` - set up bi-directional binding between a local scope property and the
 *   parent scope property of name defined via the value of the `attr` attribute. If no `attr`
 *   name is specified then the attribute name is assumed to be the same as the local name.
 *   Given `<widget my-attr="parentModel">` and widget definition of
 *   `scope: { localModel:'=myAttr' }`, then widget scope property `localModel` will reflect the
 *   value of `parentModel` on the parent scope. Any changes to `parentModel` will be reflected
 *   in `localModel` and any changes in `localModel` will reflect in `parentModel`. If the parent
 *   scope property doesn't exist, it will throw a NON_ASSIGNABLE_MODEL_EXPRESSION exception. You
 *   can avoid this behavior using `=?` or `=?attr` in order to flag the property as optional.
 *
 * * `&` or `&attr` - provides a way to execute an expression in the context of the parent scope.
 *   If no `attr` name is specified then the attribute name is assumed to be the same as the
 *   local name. Given `<widget my-attr="count = count + value">` and widget definition of
 *   `scope: { localFn:'&myAttr' }`, then isolate scope property `localFn` will point to
 *   a function wrapper for the `count = count + value` expression. Often it's desirable to
 *   pass data from the isolated scope via an expression to the parent scope, this can be
 *   done by passing a map of local variable names and values into the expression wrapper fn.
 *   For example, if the expression is `increment(amount)` then we can specify the amount value
 *   by calling the `localFn` as `localFn({amount: 22})`.
 *
 *
 *
 * #### `controller`
 * Controller constructor function. The controller is instantiated before the
 * pre-linking phase and it is shared with other directives (see
 * `require` attribute). This allows the directives to communicate with each other and augment
 * each other's behavior. The controller is injectable (and supports bracket notation) with the following locals:
 *
 * * `$scope` - Current scope associated with the element
 * * `$element` - Current element
 * * `$attrs` - Current attributes object for the element
 * * `$transclude` - A transclude linking function pre-bound to the correct transclusion scope.
 *    The scope can be overridden by an optional first argument.
 *   `function([scope], cloneLinkingFn)`.
 *
 *
 * #### `require`
 * Require another directive and inject its controller as the fourth argument to the linking function. The
 * `require` takes a string name (or array of strings) of the directive(s) to pass in. If an array is used, the
 * injected argument will be an array in corresponding order. If no such directive can be
 * found, or if the directive does not have a controller, then an error is raised. The name can be prefixed with:
 *
 * * (no prefix) - Locate the required controller on the current element. Throw an error if not found.
 * * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found.
 * * `^` - Locate the required controller by searching the element and its parents. Throw an error if not found.
 * * `?^` - Attempt to locate the required controller by searching the element and its parents or pass
 *   `null` to the `link` fn if not found.
 *
 *
 * #### `controllerAs`
 * Controller alias at the directive scope. An alias for the controller so it
 * can be referenced at the directive template. The directive needs to define a scope for this
 * configuration to be used. Useful in the case when directive is used as component.
 *
 *
 * #### `restrict`
 * String of subset of `EACM` which restricts the directive to a specific directive
 * declaration style. If omitted, the default (attributes only) is used.
 *
 * * `E` - Element name: `<my-directive></my-directive>`
 * * `A` - Attribute (default): `<div my-directive="exp"></div>`
 * * `C` - Class: `<div class="my-directive: exp;"></div>`
 * * `M` - Comment: `<!-- directive: my-directive exp -->`
 *
 *
 * #### `template`
 * HTML markup that may:
 * * Replace the contents of the directive's element (default).
 * * Replace the directive's element itself (if `replace` is true - DEPRECATED).
 * * Wrap the contents of the directive's element (if `transclude` is true).
 *
 * Value may be:
 *
 * * A string. For example `<div red-on-hover>{{delete_str}}</div>`.
 * * A function which takes two arguments `tElement` and `tAttrs` (described in the `compile`
 *   function api below) and returns a string value.
 *
 *
 * #### `templateUrl`
 * Same as `template` but the template is loaded from the specified URL. Because
 * the template loading is asynchronous the compilation/linking is suspended until the template
 * is loaded.
 *
 * You can specify `templateUrl` as a string representing the URL or as a function which takes two
 * arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns
 * a string value representing the url.  In either case, the template URL is passed through {@link
 * api/ng.$sce#getTrustedResourceUrl $sce.getTrustedResourceUrl}.
 *
 *
 * #### `replace` ([*DEPRECATED*!], will be removed in next major release)
 * specify what the template should replace. Defaults to `false`.
 *
 * * `true` - the template will replace the directive's element.
 * * `false` - the template will replace the contents of the directive's element.
 *
 * The replacement process migrates all of the attributes / classes from the old element to the new
 * one. See the {@link guide/directive#creating-custom-directives_creating-directives_template-expanding-directive
 * Directives Guide} for an example.
 *
 * #### `transclude`
 * compile the content of the element and make it available to the directive.
 * Typically used with {@link ng.directive:ngTransclude
 * ngTransclude}. The advantage of transclusion is that the linking function receives a
 * transclusion function which is pre-bound to the correct scope. In a typical setup the widget
 * creates an `isolate` scope, but the transclusion is not a child, but a sibling of the `isolate`
 * scope. This makes it possible for the widget to have private state, and the transclusion to
 * be bound to the parent (pre-`isolate`) scope.
 *
 * * `true` - transclude the content of the directive.
 * * `'element'` - transclude the whole element including any directives defined at lower priority.
 *
 * <div class="alert alert-warning">
 * **Note:** When testing an element transclude directive you must not place the directive at the root of the
 * DOM fragment that is being compiled. See {@link guide/unit-testing#testing-transclusion-directives
 * Testing Transclusion Directives}.
 * </div>
 *
 * #### `compile`
 *
 * ```js
 *   function compile(tElement, tAttrs, transclude) { ... }
 * ```
 *
 * The compile function deals with transforming the template DOM. Since most directives do not do
 * template transformation, it is not used often. The compile function takes the following arguments:
 *
 *   * `tElement` - template element - The element where the directive has been declared. It is
 *     safe to do template transformation on the element and child elements only.
 *
 *   * `tAttrs` - template attributes - Normalized list of attributes declared on this element shared
 *     between all directive compile functions.
 *
 *   * `transclude` -  [*DEPRECATED*!] A transclude linking function: `function(scope, cloneLinkingFn)`
 *
 * <div class="alert alert-warning">
 * **Note:** The template instance and the link instance may be different objects if the template has
 * been cloned. For this reason it is **not** safe to do anything other than DOM transformations that
 * apply to all cloned DOM nodes within the compile function. Specifically, DOM listener registration
 * should be done in a linking function rather than in a compile function.
 * </div>

 * <div class="alert alert-warning">
 * **Note:** The compile function cannot handle directives that recursively use themselves in their
 * own templates or compile functions. Compiling these directives results in an infinite loop and a
 * stack overflow errors.
 *
 * This can be avoided by manually using $compile in the postLink function to imperatively compile
 * a directive's template instead of relying on automatic template compilation via `template` or
 * `templateUrl` declaration or manual compilation inside the compile function.
 * </div>
 *
 * <div class="alert alert-error">
 * **Note:** The `transclude` function that is passed to the compile function is deprecated, as it
 *   e.g. does not know about the right outer scope. Please use the transclude function that is passed
 *   to the link function instead.
 * </div>

 * A compile function can have a return value which can be either a function or an object.
 *
 * * returning a (post-link) function - is equivalent to registering the linking function via the
 *   `link` property of the config object when the compile function is empty.
 *
 * * returning an object with function(s) registered via `pre` and `post` properties - allows you to
 *   control when a linking function should be called during the linking phase. See info about
 *   pre-linking and post-linking functions below.
 *
 *
 * #### `link`
 * This property is used only if the `compile` property is not defined.
 *
 * ```js
 *   function link(scope, iElement, iAttrs, controller, transcludeFn) { ... }
 * ```
 *
 * The link function is responsible for registering DOM listeners as well as updating the DOM. It is
 * executed after the template has been cloned. This is where most of the directive logic will be
 * put.
 *
 *   * `scope` - {@link ng.$rootScope.Scope Scope} - The scope to be used by the
 *     directive for registering {@link ng.$rootScope.Scope#$watch watches}.
 *
 *   * `iElement` - instance element - The element where the directive is to be used. It is safe to
 *     manipulate the children of the element only in `postLink` function since the children have
 *     already been linked.
 *
 *   * `iAttrs` - instance attributes - Normalized list of attributes declared on this element shared
 *     between all directive linking functions.
 *
 *   * `controller` - a controller instance - A controller instance if at least one directive on the
 *     element defines a controller. The controller is shared among all the directives, which allows
 *     the directives to use the controllers as a communication channel.
 *
 *   * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope.
 *     The scope can be overridden by an optional first argument. This is the same as the `$transclude`
 *     parameter of directive controllers.
 *     `function([scope], cloneLinkingFn)`.
 *
 *
 * #### Pre-linking function
 *
 * Executed before the child elements are linked. Not safe to do DOM transformation since the
 * compiler linking function will fail to locate the correct elements for linking.
 *
 * #### Post-linking function
 *
 * Executed after the child elements are linked. It is safe to do DOM transformation in the post-linking function.
 *
 * <a name="Attributes"></a>
 * ### Attributes
 *
 * The {@link ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the
 * `link()` or `compile()` functions. It has a variety of uses.
 *
 * accessing *Normalized attribute names:*
 * Directives like 'ngBind' can be expressed in many ways: 'ng:bind', `data-ng-bind`, or 'x-ng-bind'.
 * the attributes object allows for normalized access to
 *   the attributes.
 *
 * * *Directive inter-communication:* All directives share the same instance of the attributes
 *   object which allows the directives to use the attributes object as inter directive
 *   communication.
 *
 * * *Supports interpolation:* Interpolation attributes are assigned to the attribute object
 *   allowing other directives to read the interpolated value.
 *
 * * *Observing interpolated attributes:* Use `$observe` to observe the value changes of attributes
 *   that contain interpolation (e.g. `src="{{bar}}"`). Not only is this very efficient but it's also
 *   the only way to easily get the actual value because during the linking phase the interpolation
 *   hasn't been evaluated yet and so the value is at this time set to `undefined`.
 *
 * ```js
 * function linkingFn(scope, elm, attrs, ctrl) {
 *   // get the attribute value
 *   console.log(attrs.ngModel);
 *
 *   // change the attribute
 *   attrs.$set('ngModel', 'new value');
 *
 *   // observe changes to interpolated attribute
 *   attrs.$observe('ngModel', function(value) {
 *     console.log('ngModel has changed value to ' + value);
 *   });
 * }
 * ```
 *
 * Below is an example using `$compileProvider`.
 *
 * <div class="alert alert-warning">
 * **Note**: Typically directives are registered with `module.directive`. The example below is
 * to illustrate how `$compile` works.
 * </div>
 *
 <example module="compileExample">
   <file name="index.html">
    <script>
      angular.module('compileExample', [], function($compileProvider) {
        // configure new 'compile' directive by passing a directive
        // factory function. The factory function injects the '$compile'
        $compileProvider.directive('compile', function($compile) {
          // directive factory creates a link function
          return function(scope, element, attrs) {
            scope.$watch(
              function(scope) {
                 // watch the 'compile' expression for changes
                return scope.$eval(attrs.compile);
              },
              function(value) {
                // when the 'compile' expression changes
                // assign it into the current DOM
                element.html(value);

                // compile the new DOM and link it to the current
                // scope.
                // NOTE: we only compile .childNodes so that
                // we don't get into infinite loop compiling ourselves
                $compile(element.contents())(scope);
              }
            );
          };
        });
      })
      .controller('GreeterController', ['$scope', function($scope) {
        $scope.name = 'Angular';
        $scope.html = 'Hello {{name}}';
      }]);
    </script>
    <div ng-controller="GreeterController">
      <input ng-model="name"> <br>
      <textarea ng-model="html"></textarea> <br>
      <div compile="html"></div>
    </div>
   </file>
   <file name="protractor.js" type="protractor">
     it('should auto compile', function() {
       var textarea = $('textarea');
       var output = $('div[compile]');
       // The initial state reads 'Hello Angular'.
       expect(output.getText()).toBe('Hello Angular');
       textarea.clear();
       textarea.sendKeys('{{name}}!');
       expect(output.getText()).toBe('Angular!');
     });
   </file>
 </example>

 *
 *
 * @param {string|DOMElement} element Element or HTML string to compile into a template function.
 * @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives.
 * @param {number} maxPriority only apply directives lower than given priority (Only effects the
 *                 root element(s), not their children)
 * @returns {function(scope, cloneAttachFn=)} a link function which is used to bind template
 * (a DOM element/tree) to a scope. Where:
 *
 *  * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to.
 *  * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the
 *  `template` and call the `cloneAttachFn` function allowing the caller to attach the
 *  cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is
 *  called as: <br> `cloneAttachFn(clonedElement, scope)` where:
 *
 *      * `clonedElement` - is a clone of the original `element` passed into the compiler.
 *      * `scope` - is the current scope with which the linking function is working with.
 *
 * Calling the linking function returns the element of the template. It is either the original
 * element passed in, or the clone of the element if the `cloneAttachFn` is provided.
 *
 * After linking the view is not updated until after a call to $digest which typically is done by
 * Angular automatically.
 *
 * If you need access to the bound view, there are two ways to do it:
 *
 * - If you are not asking the linking function to clone the template, create the DOM element(s)
 *   before you send them to the compiler and keep this reference around.
 *   ```js
 *     var element = $compile('<p>{{total}}</p>')(scope);
 *   ```
 *
 * - if on the other hand, you need the element to be cloned, the view reference from the original
 *   example would not point to the clone, but rather to the original template that was cloned. In
 *   this case, you can access the clone via the cloneAttachFn:
 *   ```js
 *     var templateElement = angular.element('<p>{{total}}</p>'),
 *         scope = ....;
 *
 *     var clonedElement = $compile(templateElement)(scope, function(clonedElement, scope) {
 *       //attach the clone to DOM document at the right place
 *     });
 *
 *     //now we have reference to the cloned DOM via `clonedElement`
 *   ```
 *
 *
 * For information on how the compiler works, see the
 * {@link guide/compiler Angular HTML Compiler} section of the Developer Guide.
 */

var $compileMinErr = minErr('$compile');

/**
 * @ngdoc provider
 * @name $compileProvider
 * @kind function
 *
 * @description
 */
$CompileProvider.$inject = ['$provide', '$$sanitizeUriProvider'];
function $CompileProvider($provide, $$sanitizeUriProvider) {
  var hasDirectives = {},
      Suffix = 'Directive',
      COMMENT_DIRECTIVE_REGEXP = /^\s*directive\:\s*([\d\w_\-]+)\s+(.*)$/,
      CLASS_DIRECTIVE_REGEXP = /(([\d\w_\-]+)(?:\:([^;]+))?;?)/;

  // Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes
  // The assumption is that future DOM event attribute names will begin with
  // 'on' and be composed of only English letters.
  var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/;

  /**
   * @ngdoc method
   * @name $compileProvider#directive
   * @kind function
   *
   * @description
   * Register a new directive with the compiler.
   *
   * @param {string|Object} name Name of the directive in camel-case (i.e. <code>ngBind</code> which
   *    will match as <code>ng-bind</code>), or an object map of directives where the keys are the
   *    names and the values are the factories.
   * @param {Function|Array} directiveFactory An injectable directive factory function. See
   *    {@link guide/directive} for more info.
   * @returns {ng.$compileProvider} Self for chaining.
   */
   this.directive = function registerDirective(name, directiveFactory) {
    assertNotHasOwnProp
Download .txt
gitextract_a25f4262/

├── README.md
├── ngClient/
│   ├── .bowerrc
│   ├── .gitignore
│   ├── bower.json
│   ├── css/
│   │   └── app.css
│   ├── gulpfile.js
│   ├── index.html
│   ├── js/
│   │   ├── app.js
│   │   ├── auth/
│   │   │   ├── auth.controller.js
│   │   │   └── auth.factory.js
│   │   ├── controllers.js
│   │   ├── directives.js
│   │   ├── factory.js
│   │   └── filters.js
│   ├── libs/
│   │   ├── angular/
│   │   │   ├── .bower.json
│   │   │   ├── README.md
│   │   │   ├── angular-csp.css
│   │   │   ├── angular.js
│   │   │   ├── angular.min.js.gzip
│   │   │   └── bower.json
│   │   ├── angular-route/
│   │   │   ├── .bower.json
│   │   │   ├── README.md
│   │   │   ├── angular-route.js
│   │   │   └── bower.json
│   │   ├── bootstrap/
│   │   │   ├── .bower.json
│   │   │   ├── Gruntfile.js
│   │   │   ├── LICENSE
│   │   │   ├── README.md
│   │   │   ├── bower.json
│   │   │   ├── dist/
│   │   │   │   ├── css/
│   │   │   │   │   ├── bootstrap-theme.css
│   │   │   │   │   └── bootstrap.css
│   │   │   │   └── js/
│   │   │   │       └── bootstrap.js
│   │   │   ├── grunt/
│   │   │   │   ├── bs-glyphicons-data-generator.js
│   │   │   │   ├── bs-lessdoc-parser.js
│   │   │   │   ├── bs-raw-files-generator.js
│   │   │   │   └── sauce_browsers.yml
│   │   │   ├── js/
│   │   │   │   ├── affix.js
│   │   │   │   ├── alert.js
│   │   │   │   ├── button.js
│   │   │   │   ├── carousel.js
│   │   │   │   ├── collapse.js
│   │   │   │   ├── dropdown.js
│   │   │   │   ├── modal.js
│   │   │   │   ├── popover.js
│   │   │   │   ├── scrollspy.js
│   │   │   │   ├── tab.js
│   │   │   │   ├── tooltip.js
│   │   │   │   └── transition.js
│   │   │   ├── less/
│   │   │   │   ├── alerts.less
│   │   │   │   ├── badges.less
│   │   │   │   ├── bootstrap.less
│   │   │   │   ├── breadcrumbs.less
│   │   │   │   ├── button-groups.less
│   │   │   │   ├── buttons.less
│   │   │   │   ├── carousel.less
│   │   │   │   ├── close.less
│   │   │   │   ├── code.less
│   │   │   │   ├── component-animations.less
│   │   │   │   ├── dropdowns.less
│   │   │   │   ├── forms.less
│   │   │   │   ├── glyphicons.less
│   │   │   │   ├── grid.less
│   │   │   │   ├── input-groups.less
│   │   │   │   ├── jumbotron.less
│   │   │   │   ├── labels.less
│   │   │   │   ├── list-group.less
│   │   │   │   ├── media.less
│   │   │   │   ├── mixins/
│   │   │   │   │   ├── alerts.less
│   │   │   │   │   ├── background-variant.less
│   │   │   │   │   ├── border-radius.less
│   │   │   │   │   ├── buttons.less
│   │   │   │   │   ├── center-block.less
│   │   │   │   │   ├── clearfix.less
│   │   │   │   │   ├── forms.less
│   │   │   │   │   ├── gradients.less
│   │   │   │   │   ├── grid-framework.less
│   │   │   │   │   ├── grid.less
│   │   │   │   │   ├── hide-text.less
│   │   │   │   │   ├── image.less
│   │   │   │   │   ├── labels.less
│   │   │   │   │   ├── list-group.less
│   │   │   │   │   ├── nav-divider.less
│   │   │   │   │   ├── nav-vertical-align.less
│   │   │   │   │   ├── opacity.less
│   │   │   │   │   ├── pagination.less
│   │   │   │   │   ├── panels.less
│   │   │   │   │   ├── progress-bar.less
│   │   │   │   │   ├── reset-filter.less
│   │   │   │   │   ├── resize.less
│   │   │   │   │   ├── responsive-visibility.less
│   │   │   │   │   ├── size.less
│   │   │   │   │   ├── tab-focus.less
│   │   │   │   │   ├── table-row.less
│   │   │   │   │   ├── text-emphasis.less
│   │   │   │   │   ├── text-overflow.less
│   │   │   │   │   └── vendor-prefixes.less
│   │   │   │   ├── mixins.less
│   │   │   │   ├── modals.less
│   │   │   │   ├── navbar.less
│   │   │   │   ├── navs.less
│   │   │   │   ├── normalize.less
│   │   │   │   ├── pager.less
│   │   │   │   ├── pagination.less
│   │   │   │   ├── panels.less
│   │   │   │   ├── popovers.less
│   │   │   │   ├── print.less
│   │   │   │   ├── progress-bars.less
│   │   │   │   ├── responsive-embed.less
│   │   │   │   ├── responsive-utilities.less
│   │   │   │   ├── scaffolding.less
│   │   │   │   ├── tables.less
│   │   │   │   ├── theme.less
│   │   │   │   ├── thumbnails.less
│   │   │   │   ├── tooltip.less
│   │   │   │   ├── type.less
│   │   │   │   ├── utilities.less
│   │   │   │   ├── variables.less
│   │   │   │   └── wells.less
│   │   │   └── package.json
│   │   └── jquery/
│   │       ├── .bower.json
│   │       ├── MIT-LICENSE.txt
│   │       ├── bower.json
│   │       ├── dist/
│   │       │   └── jquery.js
│   │       └── src/
│   │           ├── ajax/
│   │           │   ├── jsonp.js
│   │           │   ├── load.js
│   │           │   ├── parseJSON.js
│   │           │   ├── parseXML.js
│   │           │   ├── script.js
│   │           │   ├── var/
│   │           │   │   ├── nonce.js
│   │           │   │   └── rquery.js
│   │           │   └── xhr.js
│   │           ├── ajax.js
│   │           ├── attributes/
│   │           │   ├── attr.js
│   │           │   ├── classes.js
│   │           │   ├── prop.js
│   │           │   ├── support.js
│   │           │   └── val.js
│   │           ├── attributes.js
│   │           ├── callbacks.js
│   │           ├── core/
│   │           │   ├── access.js
│   │           │   ├── init.js
│   │           │   ├── parseHTML.js
│   │           │   ├── ready.js
│   │           │   └── var/
│   │           │       └── rsingleTag.js
│   │           ├── core.js
│   │           ├── css/
│   │           │   ├── addGetHookIf.js
│   │           │   ├── curCSS.js
│   │           │   ├── defaultDisplay.js
│   │           │   ├── hiddenVisibleSelectors.js
│   │           │   ├── support.js
│   │           │   ├── swap.js
│   │           │   └── var/
│   │           │       ├── cssExpand.js
│   │           │       ├── getStyles.js
│   │           │       ├── isHidden.js
│   │           │       ├── rmargin.js
│   │           │       └── rnumnonpx.js
│   │           ├── css.js
│   │           ├── data/
│   │           │   ├── Data.js
│   │           │   ├── accepts.js
│   │           │   └── var/
│   │           │       ├── data_priv.js
│   │           │       └── data_user.js
│   │           ├── data.js
│   │           ├── deferred.js
│   │           ├── deprecated.js
│   │           ├── dimensions.js
│   │           ├── effects/
│   │           │   ├── Tween.js
│   │           │   └── animatedSelector.js
│   │           ├── effects.js
│   │           ├── event/
│   │           │   ├── alias.js
│   │           │   └── support.js
│   │           ├── event.js
│   │           ├── exports/
│   │           │   ├── amd.js
│   │           │   └── global.js
│   │           ├── intro.js
│   │           ├── jquery.js
│   │           ├── manipulation/
│   │           │   ├── _evalUrl.js
│   │           │   ├── support.js
│   │           │   └── var/
│   │           │       └── rcheckableType.js
│   │           ├── manipulation.js
│   │           ├── offset.js
│   │           ├── outro.js
│   │           ├── queue/
│   │           │   └── delay.js
│   │           ├── queue.js
│   │           ├── selector-native.js
│   │           ├── selector-sizzle.js
│   │           ├── selector.js
│   │           ├── serialize.js
│   │           ├── sizzle/
│   │           │   └── dist/
│   │           │       └── sizzle.js
│   │           ├── traversing/
│   │           │   ├── findFilter.js
│   │           │   └── var/
│   │           │       └── rneedsContext.js
│   │           ├── traversing.js
│   │           ├── var/
│   │           │   ├── arr.js
│   │           │   ├── class2type.js
│   │           │   ├── concat.js
│   │           │   ├── hasOwn.js
│   │           │   ├── indexOf.js
│   │           │   ├── pnum.js
│   │           │   ├── push.js
│   │           │   ├── rnotwhite.js
│   │           │   ├── slice.js
│   │           │   ├── strundefined.js
│   │           │   ├── support.js
│   │           │   └── toString.js
│   │           └── wrap.js
│   ├── package.json
│   └── partials/
│       ├── footer.html
│       ├── header.html
│       ├── home.html
│       ├── login.html
│       ├── page1.html
│       ├── page2.html
│       └── page3.html
└── server/
    ├── .gitignore
    ├── config/
    │   └── secret.js
    ├── middlewares/
    │   └── validateRequest.js
    ├── package.json
    ├── routes/
    │   ├── auth.js
    │   ├── index.js
    │   ├── products.js
    │   └── users.js
    └── server.js
Download .txt
SYMBOL INDEX (359 symbols across 39 files)

FILE: ngClient/libs/angular-route/angular-route.js
  function $RouteProvider (line 42) | function $RouteProvider(){
  function $RouteParamsProvider (line 636) | function $RouteParamsProvider() {
  function ngViewFactory (line 820) | function ngViewFactory(   $route,   $anchorScroll,   $animate) {
  function ngViewFillContentFactory (line 896) | function ngViewFillContentFactory($compile, $controller, $route) {

FILE: ngClient/libs/angular/angular.js
  function minErr (line 36) | function minErr(module) {
  function isArrayLike (line 268) | function isArrayLike(obj) {
  function forEach (line 312) | function forEach(obj, iterator, context) {
  function sortedKeys (line 340) | function sortedKeys(obj) {
  function forEachSorted (line 350) | function forEachSorted(obj, iterator, context) {
  function reverseParams (line 364) | function reverseParams(iteratorFn) {
  function nextUid (line 376) | function nextUid() {
  function setHashKey (line 404) | function setHashKey(obj, h) {
  function extend (line 427) | function extend(dst) {
  function int (line 441) | function int(str) {
  function inherit (line 446) | function inherit(parent, extra) {
  function noop (line 466) | function noop() {}
  function identity (line 486) | function identity($) {return $;}
  function valueFn (line 490) | function valueFn(value) {return function() {return value;};}
  function isUndefined (line 504) | function isUndefined(value){return typeof value === 'undefined';}
  function isDefined (line 519) | function isDefined(value){return typeof value !== 'undefined';}
  function isObject (line 535) | function isObject(value){return value != null && typeof value === 'objec...
  function isString (line 550) | function isString(value){return typeof value === 'string';}
  function isNumber (line 565) | function isNumber(value){return typeof value === 'number';}
  function isDate (line 580) | function isDate(value) {
  function isFunction (line 618) | function isFunction(value){return typeof value === 'function';}
  function isRegExp (line 628) | function isRegExp(value) {
  function isWindow (line 640) | function isWindow(obj) {
  function isScope (line 645) | function isScope(obj) {
  function isFile (line 650) | function isFile(obj) {
  function isBlob (line 655) | function isBlob(obj) {
  function isBoolean (line 660) | function isBoolean(value) {
  function isPromiseLike (line 665) | function isPromiseLike(obj) {
  function isElement (line 697) | function isElement(node) {
  function makeMap (line 707) | function makeMap(str) {
  function map (line 728) | function map(obj, iterator, context) {
  function size (line 749) | function size(obj, ownPropsOnly) {
  function includes (line 764) | function includes(array, obj) {
  function indexOf (line 768) | function indexOf(array, obj) {
  function arrayRemove (line 777) | function arrayRemove(array, value) {
  function isLeafNode (line 784) | function isLeafNode (node) {
  function copy (line 854) | function copy(source, destination, stackSource, stackDest) {
  function shallowCopy (line 927) | function shallowCopy(src, dst) {
  function equals (line 977) | function equals(o1, o2) {
  function concat (line 1039) | function concat(array1, array2, index) {
  function sliceArgs (line 1043) | function sliceArgs(args, startIndex) {
  function bind (line 1067) | function bind(self, fn) {
  function toJsonReplacer (line 1088) | function toJsonReplacer(key, value) {
  function toJson (line 1119) | function toJson(obj, pretty) {
  function fromJson (line 1137) | function fromJson(json) {
  function toBoolean (line 1144) | function toBoolean(value) {
  function startingTag (line 1159) | function startingTag(element) {
  function tryDecodeURIComponent (line 1191) | function tryDecodeURIComponent(value) {
  function parseKeyValue (line 1204) | function parseKeyValue(/**string*/keyValue) {
  function toKeyValue (line 1225) | function toKeyValue(obj) {
  function encodeUriSegment (line 1253) | function encodeUriSegment(val) {
  function encodeUriQuery (line 1272) | function encodeUriQuery(val, pctEncodeSpaces) {
  function angularInit (line 1328) | function angularInit(element, bootstrap) {
  function bootstrap (line 1426) | function bootstrap(element, modules) {
  function snake_case (line 1472) | function snake_case(name, separator) {
  function bindJQuery (line 1479) | function bindJQuery() {
  function assertArg (line 1507) | function assertArg(arg, name, reason) {
  function assertArgFn (line 1514) | function assertArgFn(arg, name, acceptArrayAnnotation) {
  function assertNotHasOwnProperty (line 1529) | function assertNotHasOwnProperty(name, context) {
  function getter (line 1543) | function getter(obj, path, bindFnToScope) {
  function getBlockElements (line 1567) | function getBlockElements(nodes) {
  function setupModuleLoader (line 1595) | function setupModuleLoader(window) {
  function publishExternalAPI (line 1998) | function publishExternalAPI(angular){
  function jqNextId (line 2233) | function jqNextId() { return ++jqId; }
  function camelCase (line 2245) | function camelCase(name) {
  function jqLitePatchJQueryRemove (line 2261) | function jqLitePatchJQueryRemove(name, dispatchThis, filterElems, getter...
  function jqLiteIsTextNode (line 2315) | function jqLiteIsTextNode(html) {
  function jqLiteBuildFragment (line 2319) | function jqLiteBuildFragment(html, context) {
  function jqLiteParseHTML (line 2354) | function jqLiteParseHTML(html, context) {
  function JQLite (line 2366) | function JQLite(element) {
  function jqLiteClone (line 2389) | function jqLiteClone(element) {
  function jqLiteDealoc (line 2393) | function jqLiteDealoc(element){
  function jqLiteOff (line 2400) | function jqLiteOff(element, type, fn, unsupported) {
  function jqLiteRemoveData (line 2425) | function jqLiteRemoveData(element, name) {
  function jqLiteExpandoStore (line 2444) | function jqLiteExpandoStore(element, key, value) {
  function jqLiteData (line 2459) | function jqLiteData(element, key, value) {
  function jqLiteHasClass (line 2485) | function jqLiteHasClass(element, selector) {
  function jqLiteRemoveClass (line 2491) | function jqLiteRemoveClass(element, cssClasses) {
  function jqLiteAddClass (line 2503) | function jqLiteAddClass(element, cssClasses) {
  function jqLiteAddNodes (line 2519) | function jqLiteAddNodes(root, elements) {
  function jqLiteController (line 2530) | function jqLiteController(element, name) {
  function jqLiteInheritedData (line 2534) | function jqLiteInheritedData(element, name, value) {
  function jqLiteEmpty (line 2554) | function jqLiteEmpty(element) {
  function trigger (line 2570) | function trigger() {
  function getBooleanAttrName (line 2617) | function getBooleanAttrName(element, name) {
  function getText (line 2731) | function getText(element, value) {
  function createEventHandler (line 2818) | function createEventHandler(element, events) {
  function hashKey (line 3139) | function hashKey(obj, nextUidFn) {
  function HashMap (line 3160) | function HashMap(array, isolatedUid) {
  function annotate (line 3264) | function annotate(fn) {
  function createInjector (line 3785) | function createInjector(modulesToLoad) {
  function $AnchorScrollProvider (line 4043) | function $AnchorScrollProvider() {
  function async (line 4178) | function async(fn) {
  function $$AsyncCallbackProvider (line 4341) | function $$AsyncCallbackProvider(){
  function Browser (line 4373) | function Browser(window, document, $log, $sniffer) {
  function $BrowserProvider (line 4734) | function $BrowserProvider(){
  function $CacheFactoryProvider (line 4822) | function $CacheFactoryProvider() {
  function $TemplateCacheProvider (line 5134) | function $TemplateCacheProvider() {
  function $CompileProvider (line 5653) | function $CompileProvider($provide, $$sanitizeUriProvider) {
  function directiveNormalize (line 7130) | function directiveNormalize(name) {
  function nodesetLinkingFn (line 7179) | function nodesetLinkingFn(
  function directiveLinkingFn (line 7186) | function directiveLinkingFn(
  function tokenDifference (line 7194) | function tokenDifference(str1, str2) {
  function $ControllerProvider (line 7220) | function $ControllerProvider() {
  function $DocumentProvider (line 7323) | function $DocumentProvider(){
  function $ExceptionHandlerProvider (line 7361) | function $ExceptionHandlerProvider() {
  function parseHeaders (line 7375) | function parseHeaders(headers) {
  function headersGetter (line 7406) | function headersGetter(headers) {
  function transformData (line 7431) | function transformData(data, headers, fns) {
  function isSuccess (line 7443) | function isSuccess(status) {
  function $HttpProvider (line 7454) | function $HttpProvider() {
  function createXhr (line 8433) | function createXhr(method) {
  function $HttpBackendProvider (line 8463) | function $HttpBackendProvider() {
  function createHttpBackend (line 8469) | function createHttpBackend($browser, createXhr, $browserDefer, callbacks...
  function $InterpolateProvider (line 8684) | function $InterpolateProvider() {
  function $IntervalProvider (line 8896) | function $IntervalProvider() {
  function $LocaleProvider (line 9091) | function $LocaleProvider(){
  function encodePath (line 9164) | function encodePath(path) {
  function parseAbsoluteUrl (line 9175) | function parseAbsoluteUrl(absoluteUrl, locationObj, appBase) {
  function parseAppUrl (line 9184) | function parseAppUrl(relativeUrl, locationObj, appBase) {
  function beginsWith (line 9209) | function beginsWith(begin, whole) {
  function stripHash (line 9216) | function stripHash(url) {
  function stripFile (line 9222) | function stripFile(url) {
  function serverBase (line 9227) | function serverBase(url) {
  function LocationHtml5Url (line 9240) | function LocationHtml5Url(appBase, basePrefix) {
  function LocationHashbangUrl (line 9308) | function LocationHashbangUrl(appBase, hashPrefix) {
  function LocationHashbangInHtml5Url (line 9401) | function LocationHashbangInHtml5Url(appBase, hashPrefix) {
  function locationGetter (line 9658) | function locationGetter(property) {
  function locationGetterSetter (line 9665) | function locationGetterSetter(property, preprocess) {
  function $LocationProvider (line 9710) | function $LocationProvider(){
  function $LogProvider (line 9965) | function $LogProvider(){
  function ensureSafeMemberName (line 10110) | function ensureSafeMemberName(name, fullExpression) {
  function ensureSafeObject (line 10121) | function ensureSafeObject(obj, fullExpression) {
  function ensureSafeFunction (line 10152) | function ensureSafeFunction(obj, fullExpression) {
  function setter (line 10924) | function setter(obj, path, setValue, fullExp, options) {
  function cspSafeGetterFn (line 10965) | function cspSafeGetterFn(key0, key1, key2, key3, key4, fullExp, options) {
  function getterFn (line 11069) | function getterFn(path, options, fullExp) {
  function $ParseProvider (line 11192) | function $ParseProvider() {
  function $QProvider (line 11489) | function $QProvider() {
  function qFactory (line 11507) | function qFactory(nextTick, exceptionHandler) {
  function $$RAFProvider (line 11845) | function $$RAFProvider(){ //rAF
  function $RootScopeProvider (line 11944) | function $RootScopeProvider(){
  function $$SanitizeUriProvider (line 13047) | function $$SanitizeUriProvider() {
  function escapeForRegexp (line 13133) | function escapeForRegexp(s) {
  function adjustMatcher (line 13139) | function adjustMatcher(matcher) {
  function adjustMatchers (line 13167) | function adjustMatchers(matchers) {
  function $SceDelegateProvider (line 13245) | function $SceDelegateProvider() {
  function $SceProvider (line 13775) | function $SceProvider() {
  function $SnifferProvider (line 14188) | function $SnifferProvider() {
  function $TimeoutProvider (line 14265) | function $TimeoutProvider() {
  function urlResolve (line 14411) | function urlResolve(url, base) {
  function urlIsSameOrigin (line 14445) | function urlIsSameOrigin(requestUrl) {
  function $WindowProvider (line 14492) | function $WindowProvider(){
  function $FilterProvider (line 14589) | function $FilterProvider($provide) {
  function filterFilter (line 14759) | function filterFilter() {
  function currencyFilter (line 14914) | function currencyFilter($locale) {
  function numberFilter (line 14975) | function numberFilter($locale) {
  function formatNumber (line 14984) | function formatNumber(number, pattern, groupSep, decimalSep, fractionSiz...
  function padNumber (line 15066) | function padNumber(num, digits, trim) {
  function dateGetter (line 15080) | function dateGetter(name, size, offset, trim) {
  function dateStrGetter (line 15091) | function dateStrGetter(name, shortForm) {
  function timeZoneGetter (line 15100) | function timeZoneGetter(date) {
  function ampmGetter (line 15110) | function ampmGetter(date, formats) {
  function dateFilter (line 15230) | function dateFilter($locale) {
  function jsonFilter (line 15329) | function jsonFilter() {
  function limitToFilter (line 15427) | function limitToFilter(){
  function orderByFilter (line 15584) | function orderByFilter($parse){
  function ngDirective (line 15645) | function ngDirective(directive) {
  function FormController (line 16150) | function FormController(element, attrs, $scope, $animate) {
  function validate (line 16968) | function validate(ctrl, validatorName, validity, value){
  function testFlags (line 16973) | function testFlags(validity, flags) {
  function addNativeHtml5Validators (line 16987) | function addNativeHtml5Validators(ctrl, validatorName, badFlags, ignoreF...
  function textInputType (line 17005) | function textInputType(scope, element, attr, ctrl, $sniffer, $browser) {
  function numberInputType (line 17159) | function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {
  function urlInputType (line 17204) | function urlInputType(scope, element, attr, ctrl, $sniffer, $browser) {
  function emailInputType (line 17215) | function emailInputType(scope, element, attr, ctrl, $sniffer, $browser) {
  function radioInputType (line 17226) | function radioInputType(scope, element, attr, ctrl) {
  function checkboxInputType (line 17248) | function checkboxInputType(scope, element, attr, ctrl) {
  function toggleValidCss (line 17644) | function toggleValidCss(isValid, validationErrorKey) {
  function getStringValue (line 18360) | function getStringValue() {
  function classDirective (line 18372) | function classDirective(name, selector) {
  function getBlockStart (line 20642) | function getBlockStart(block) {
  function getBlockEnd (line 20646) | function getBlockEnd(block) {
  function setupAsSingle (line 21585) | function setupAsSingle(scope, selectElement, ngModelCtrl, selectCtrl) {
  function setupAsMultiple (line 21610) | function setupAsMultiple(scope, selectElement, ctrl) {
  function setupAsOptions (line 21641) | function setupAsOptions(scope, selectElement, ctrl) {

FILE: ngClient/libs/bootstrap/dist/js/bootstrap.js
  function transitionEnd (line 24) | function transitionEnd() {
  function removeElement (line 114) | function removeElement() {
  function Plugin (line 130) | function Plugin(option) {
  function Plugin (line 233) | function Plugin(option) {
  function Plugin (line 438) | function Plugin(option) {
  function Plugin (line 616) | function Plugin(option) {
  function clearMenus (line 754) | function clearMenus(e) {
  function getParent (line 767) | function getParent($this) {
  function Plugin (line 784) | function Plugin(option) {
  function Plugin (line 1052) | function Plugin(option, _relatedTarget) {
  function complete (line 1384) | function complete() {
  function Plugin (line 1531) | function Plugin(option) {
  function Plugin (line 1645) | function Plugin(option) {
  function ScrollSpy (line 1688) | function ScrollSpy(element, options) {
  function Plugin (line 1806) | function Plugin(option) {
  function next (line 1903) | function next() {
  function Plugin (line 1938) | function Plugin(option) {
  function Plugin (line 2071) | function Plugin(option) {

FILE: ngClient/libs/bootstrap/grunt/bs-lessdoc-parser.js
  function markdown2html (line 11) | function markdown2html(markdownString) {
  function Section (line 40) | function Section(heading, customizable) {
  function SubSection (line 52) | function SubSection(heading) {
  function VarDocstring (line 62) | function VarDocstring(markdownString) {
  function SectionDocstring (line 66) | function SectionDocstring(markdownString) {
  function Variable (line 70) | function Variable(name, defaultValue) {
  function Tokenizer (line 76) | function Tokenizer(fileContent) {
  function Parser (line 140) | function Parser(fileContent) {

FILE: ngClient/libs/bootstrap/grunt/bs-raw-files-generator.js
  function getFiles (line 15) | function getFiles(type) {

FILE: ngClient/libs/bootstrap/js/affix.js
  function Plugin (line 99) | function Plugin(option) {

FILE: ngClient/libs/bootstrap/js/alert.js
  function removeElement (line 46) | function removeElement() {
  function Plugin (line 62) | function Plugin(option) {

FILE: ngClient/libs/bootstrap/js/button.js
  function Plugin (line 72) | function Plugin(option) {

FILE: ngClient/libs/bootstrap/js/carousel.js
  function Plugin (line 166) | function Plugin(option) {

FILE: ngClient/libs/bootstrap/js/collapse.js
  function Plugin (line 120) | function Plugin(option) {

FILE: ngClient/libs/bootstrap/js/dropdown.js
  function clearMenus (line 87) | function clearMenus(e) {
  function getParent (line 100) | function getParent($this) {
  function Plugin (line 117) | function Plugin(option) {

FILE: ngClient/libs/bootstrap/js/modal.js
  function Plugin (line 233) | function Plugin(option, _relatedTarget) {

FILE: ngClient/libs/bootstrap/js/popover.js
  function Plugin (line 87) | function Plugin(option) {

FILE: ngClient/libs/bootstrap/js/scrollspy.js
  function ScrollSpy (line 16) | function ScrollSpy(element, options) {
  function Plugin (line 134) | function Plugin(option) {

FILE: ngClient/libs/bootstrap/js/tab.js
  function next (line 60) | function next() {
  function Plugin (line 95) | function Plugin(option) {

FILE: ngClient/libs/bootstrap/js/tooltip.js
  function complete (line 284) | function complete() {
  function Plugin (line 431) | function Plugin(option) {

FILE: ngClient/libs/bootstrap/js/transition.js
  function transitionEnd (line 16) | function transitionEnd() {

FILE: ngClient/libs/jquery/dist/jquery.js
  function isArraylike (line 534) | function isArraylike( obj ) {
  function Sizzle (line 737) | function Sizzle( selector, context, results, seed ) {
  function createCache (line 852) | function createCache() {
  function markFunction (line 870) | function markFunction( fn ) {
  function assert (line 879) | function assert( fn ) {
  function addHandle (line 901) | function addHandle( attrs, handler ) {
  function siblingCheck (line 916) | function siblingCheck( a, b ) {
  function createInputPseudo (line 943) | function createInputPseudo( type ) {
  function createButtonPseudo (line 954) | function createButtonPseudo( type ) {
  function createPositionalPseudo (line 965) | function createPositionalPseudo( fn ) {
  function testContext (line 988) | function testContext( context ) {
  function setFilters (line 1985) | function setFilters() {}
  function toSelector (line 2056) | function toSelector( tokens ) {
  function addCombinator (line 2066) | function addCombinator( matcher, combinator, base ) {
  function elementMatcher (line 2119) | function elementMatcher( matchers ) {
  function multipleContexts (line 2133) | function multipleContexts( selector, contexts, results ) {
  function condense (line 2142) | function condense( unmatched, map, filter, context, xml ) {
  function setMatcher (line 2163) | function setMatcher( preFilter, selector, matcher, postFilter, postFinde...
  function matcherFromTokens (line 2256) | function matcherFromTokens( tokens ) {
  function matcherFromGroupMatchers (line 2311) | function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
  function winnow (line 2607) | function winnow( elements, qualifier, not ) {
  function sibling (line 2932) | function sibling( cur, dir ) {
  function createOptions (line 3010) | function createOptions( options ) {
  function completed (line 3404) | function completed() {
  function Data (line 3509) | function Data() {
  function dataAttr (line 3701) | function dataAttr( elem, key, data ) {
  function returnTrue (line 4040) | function returnTrue() {
  function returnFalse (line 4044) | function returnFalse() {
  function safeActiveElement (line 4048) | function safeActiveElement() {
  function manipulationTarget (line 4920) | function manipulationTarget( elem, content ) {
  function disableScript (line 4930) | function disableScript( elem ) {
  function restoreScript (line 4934) | function restoreScript( elem ) {
  function setGlobalEval (line 4947) | function setGlobalEval( elems, refElements ) {
  function cloneCopyEvent (line 4958) | function cloneCopyEvent( src, dest ) {
  function getAll (line 4992) | function getAll( context, tag ) {
  function fixInput (line 5003) | function fixInput( src, dest ) {
  function actualDisplay (line 5460) | function actualDisplay( name, doc ) {
  function defaultDisplay (line 5482) | function defaultDisplay( nodeName ) {
  function curCSS (line 5522) | function curCSS( elem, name, computed ) {
  function addGetHookIf (line 5570) | function addGetHookIf( conditionFn, hookFn ) {
  function computePixelPositionAndBoxSizingReliable (line 5610) | function computePixelPositionAndBoxSizingReliable() {
  function vendorPropName (line 5712) | function vendorPropName( style, name ) {
  function setPositiveNumber (line 5734) | function setPositiveNumber( elem, value, subtract ) {
  function augmentWidthOrHeight (line 5742) | function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
  function getWidthOrHeight (line 5781) | function getWidthOrHeight( elem, name, extra ) {
  function showHide (line 5825) | function showHide( elements, show ) {
  function Tween (line 6124) | function Tween( elem, options, prop, end, easing ) {
  function createFxNow (line 6293) | function createFxNow() {
  function genFx (line 6301) | function genFx( type, includeWidth ) {
  function createTween (line 6321) | function createTween( value, prop, animation ) {
  function defaultPrefilter (line 6335) | function defaultPrefilter( elem, props, opts ) {
  function propFilter (line 6469) | function propFilter( props, specialEasing ) {
  function Animation (line 6506) | function Animation( elem, properties, options ) {
  function addToPrefiltersOrTransports (line 7573) | function addToPrefiltersOrTransports( structure ) {
  function inspectPrefiltersOrTransports (line 7605) | function inspectPrefiltersOrTransports( structure, options, originalOpti...
  function ajaxExtend (line 7632) | function ajaxExtend( target, src ) {
  function ajaxHandleResponses (line 7652) | function ajaxHandleResponses( s, jqXHR, responses ) {
  function ajaxConvert (line 7708) | function ajaxConvert( s, response, jqXHR, isSuccess ) {
  function done (line 8165) | function done( status, nativeStatusText, responses, headers ) {
  function buildParams (line 8417) | function buildParams( prefix, obj, traditional, add ) {
  function getWindow (line 8900) | function getWindow( elem ) {

FILE: ngClient/libs/jquery/src/ajax.js
  function addToPrefiltersOrTransports (line 63) | function addToPrefiltersOrTransports( structure ) {
  function inspectPrefiltersOrTransports (line 95) | function inspectPrefiltersOrTransports( structure, options, originalOpti...
  function ajaxExtend (line 122) | function ajaxExtend( target, src ) {
  function ajaxHandleResponses (line 142) | function ajaxHandleResponses( s, jqXHR, responses ) {
  function ajaxConvert (line 198) | function ajaxConvert( s, response, jqXHR, isSuccess ) {
  function done (line 655) | function done( status, nativeStatusText, responses, headers ) {

FILE: ngClient/libs/jquery/src/callbacks.js
  function createOptions (line 10) | function createOptions( options ) {

FILE: ngClient/libs/jquery/src/core.js
  function isArraylike (line 481) | function isArraylike( obj ) {

FILE: ngClient/libs/jquery/src/core/ready.js
  function completed (line 64) | function completed() {

FILE: ngClient/libs/jquery/src/css.js
  function vendorPropName (line 39) | function vendorPropName( style, name ) {
  function setPositiveNumber (line 61) | function setPositiveNumber( elem, value, subtract ) {
  function augmentWidthOrHeight (line 69) | function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
  function getWidthOrHeight (line 108) | function getWidthOrHeight( elem, name, extra ) {
  function showHide (line 152) | function showHide( elements, show ) {

FILE: ngClient/libs/jquery/src/css/addGetHookIf.js
  function addGetHookIf (line 3) | function addGetHookIf( conditionFn, hookFn ) {

FILE: ngClient/libs/jquery/src/css/curCSS.js
  function curCSS (line 9) | function curCSS( elem, name, computed ) {

FILE: ngClient/libs/jquery/src/css/defaultDisplay.js
  function actualDisplay (line 15) | function actualDisplay( name, doc ) {
  function defaultDisplay (line 37) | function defaultDisplay( nodeName ) {

FILE: ngClient/libs/jquery/src/css/support.js
  function computePixelPositionAndBoxSizingReliable (line 26) | function computePixelPositionAndBoxSizingReliable() {

FILE: ngClient/libs/jquery/src/data.js
  function dataAttr (line 23) | function dataAttr( elem, key, data ) {

FILE: ngClient/libs/jquery/src/data/Data.js
  function Data (line 7) | function Data() {

FILE: ngClient/libs/jquery/src/effects.js
  function createFxNow (line 75) | function createFxNow() {
  function genFx (line 83) | function genFx( type, includeWidth ) {
  function createTween (line 103) | function createTween( value, prop, animation ) {
  function defaultPrefilter (line 117) | function defaultPrefilter( elem, props, opts ) {
  function propFilter (line 251) | function propFilter( props, specialEasing ) {
  function Animation (line 288) | function Animation( elem, properties, options ) {

FILE: ngClient/libs/jquery/src/effects/Tween.js
  function Tween (line 6) | function Tween( elem, options, prop, end, easing ) {

FILE: ngClient/libs/jquery/src/event.js
  function returnTrue (line 21) | function returnTrue() {
  function returnFalse (line 25) | function returnFalse() {
  function safeActiveElement (line 29) | function safeActiveElement() {

FILE: ngClient/libs/jquery/src/manipulation.js
  function manipulationTarget (line 51) | function manipulationTarget( elem, content ) {
  function disableScript (line 61) | function disableScript( elem ) {
  function restoreScript (line 65) | function restoreScript( elem ) {
  function setGlobalEval (line 78) | function setGlobalEval( elems, refElements ) {
  function cloneCopyEvent (line 89) | function cloneCopyEvent( src, dest ) {
  function getAll (line 123) | function getAll( context, tag ) {
  function fixInput (line 134) | function fixInput( src, dest ) {

FILE: ngClient/libs/jquery/src/offset.js
  function getWindow (line 20) | function getWindow( elem ) {

FILE: ngClient/libs/jquery/src/serialize.js
  function buildParams (line 15) | function buildParams( prefix, obj, traditional, add ) {

FILE: ngClient/libs/jquery/src/sizzle/dist/sizzle.js
  function Sizzle (line 188) | function Sizzle( selector, context, results, seed ) {
  function createCache (line 303) | function createCache() {
  function markFunction (line 321) | function markFunction( fn ) {
  function assert (line 330) | function assert( fn ) {
  function addHandle (line 352) | function addHandle( attrs, handler ) {
  function siblingCheck (line 367) | function siblingCheck( a, b ) {
  function createInputPseudo (line 394) | function createInputPseudo( type ) {
  function createButtonPseudo (line 405) | function createButtonPseudo( type ) {
  function createPositionalPseudo (line 416) | function createPositionalPseudo( fn ) {
  function testContext (line 439) | function testContext( context ) {
  function setFilters (line 1436) | function setFilters() {}
  function toSelector (line 1507) | function toSelector( tokens ) {
  function addCombinator (line 1517) | function addCombinator( matcher, combinator, base ) {
  function elementMatcher (line 1570) | function elementMatcher( matchers ) {
  function multipleContexts (line 1584) | function multipleContexts( selector, contexts, results ) {
  function condense (line 1593) | function condense( unmatched, map, filter, context, xml ) {
  function setMatcher (line 1614) | function setMatcher( preFilter, selector, matcher, postFilter, postFinde...
  function matcherFromTokens (line 1707) | function matcherFromTokens( tokens ) {
  function matcherFromGroupMatchers (line 1762) | function matcherFromGroupMatchers( elementMatchers, setMatchers ) {

FILE: ngClient/libs/jquery/src/traversing.js
  function sibling (line 128) | function sibling( cur, dir ) {

FILE: ngClient/libs/jquery/src/traversing/findFilter.js
  function winnow (line 11) | function winnow( elements, qualifier, not ) {

FILE: server/routes/auth.js
  function genToken (line 65) | function genToken(user) {
  function expiresIn (line 78) | function expiresIn(numDays) {
Condensed preview — 221 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,989K chars).
[
  {
    "path": "README.md",
    "chars": 135,
    "preview": "myRESTApp\n=========\n\n[Architecting a Secure RESTful Node.js app](http://thejackalofjavascript.com/architecting-a-restful"
  },
  {
    "path": "ngClient/.bowerrc",
    "chars": 30,
    "preview": "{\r\n  \"directory\" : \"libs\"\r\n}\r\n"
  },
  {
    "path": "ngClient/.gitignore",
    "chars": 14,
    "preview": "node_modules\r\n"
  },
  {
    "path": "ngClient/bower.json",
    "chars": 268,
    "preview": "{\n  \"name\": \"ngclient\",\n  \"version\": \"0.1.0\",\n  \"ignore\": [\n    \"**/.*\",\n    \"node_modules\",\n    \"bower_components\",\n   "
  },
  {
    "path": "ngClient/css/app.css",
    "chars": 676,
    "preview": "/* Sticky footer styles\n-------------------------------------------------- */\n\nhtml {\n  position: relative;\n  min-height"
  },
  {
    "path": "ngClient/gulpfile.js",
    "chars": 519,
    "preview": "var gulp = require('gulp'),\r\n  connect = require('gulp-connect');\r\n\r\nvar paths = {\r\n  app: './',\r\n  src: ['./*.html', '."
  },
  {
    "path": "ngClient/index.html",
    "chars": 1068,
    "preview": "<!DOCTYPE html>\r\n<html ng-app=\"ngclient\">\r\n\r\n<head>\r\n  <title>ngClient</title>\r\n\r\n  <link rel=\"stylesheet\" type=\"text/cs"
  },
  {
    "path": "ngClient/js/app.js",
    "chars": 2074,
    "preview": "var myApp = angular.module('ngclient', ['ngRoute']);\n\nmyApp.config(function($routeProvider, $httpProvider) {\n\n  $httpPro"
  },
  {
    "path": "ngClient/js/auth/auth.controller.js",
    "chars": 1170,
    "preview": "myApp.controller('LoginCtrl', ['$scope', '$window', '$location', 'UserAuthFactory', 'AuthenticationFactory',\n  function("
  },
  {
    "path": "ngClient/js/auth/auth.factory.js",
    "chars": 1550,
    "preview": "myApp.factory('AuthenticationFactory', function($window) {\n  var auth = {\n    isLogged: false,\n    check: function() {\n "
  },
  {
    "path": "ngClient/js/controllers.js",
    "chars": 1029,
    "preview": "myApp.controller(\"HeaderCtrl\", ['$scope', '$location', 'UserAuthFactory',\n  function($scope, $location, UserAuthFactory)"
  },
  {
    "path": "ngClient/js/directives.js",
    "chars": 273,
    "preview": "myApp.directive('printThis', function() {\n  /** https://docs.angularjs.org/guide/directive **/\n\n  var directiveDefinitio"
  },
  {
    "path": "ngClient/js/factory.js",
    "chars": 292,
    "preview": "\nmyApp.factory('dataFactory', function($http) {\n  /** https://docs.angularjs.org/guide/providers **/\n  var urlBase = 'ht"
  },
  {
    "path": "ngClient/js/filters.js",
    "chars": 206,
    "preview": "myApp.filter('checkmark', function() {\n  /** https://docs.angularjs.org/guide/filter **/\n\n  var filterFunction = functio"
  },
  {
    "path": "ngClient/libs/angular/.bower.json",
    "chars": 417,
    "preview": "{\n  \"name\": \"angular\",\n  \"version\": \"1.2.25\",\n  \"main\": \"./angular.js\",\n  \"dependencies\": {},\n  \"homepage\": \"https://git"
  },
  {
    "path": "ngClient/libs/angular/README.md",
    "chars": 1615,
    "preview": "# bower-angular\n\nThis repo is for distribution on `bower`. The source for this module is in the\n[main AngularJS repo](ht"
  },
  {
    "path": "ngClient/libs/angular/angular-csp.css",
    "chars": 535,
    "preview": "/* Include this file in your html if you are using the CSP mode. */\n\n@charset \"UTF-8\";\n\n[ng\\:cloak], [ng-cloak], [data-n"
  },
  {
    "path": "ngClient/libs/angular/angular.js",
    "chars": 782956,
    "preview": "/**\n * @license AngularJS v1.2.25\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(windo"
  },
  {
    "path": "ngClient/libs/angular/bower.json",
    "chars": 98,
    "preview": "{\n  \"name\": \"angular\",\n  \"version\": \"1.2.25\",\n  \"main\": \"./angular.js\",\n  \"dependencies\": {\n  }\n}\n"
  },
  {
    "path": "ngClient/libs/angular-route/.bower.json",
    "chars": 474,
    "preview": "{\n  \"name\": \"angular-route\",\n  \"version\": \"1.2.25\",\n  \"main\": \"./angular-route.js\",\n  \"dependencies\": {\n    \"angular\": \""
  },
  {
    "path": "ngClient/libs/angular-route/README.md",
    "chars": 1780,
    "preview": "# bower-angular-route\n\nThis repo is for distribution on `bower`. The source for this module is in the\n[main AngularJS re"
  },
  {
    "path": "ngClient/libs/angular-route/angular-route.js",
    "chars": 32966,
    "preview": "/**\n * @license AngularJS v1.2.25\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(windo"
  },
  {
    "path": "ngClient/libs/angular-route/bower.json",
    "chars": 134,
    "preview": "{\n  \"name\": \"angular-route\",\n  \"version\": \"1.2.25\",\n  \"main\": \"./angular-route.js\",\n  \"dependencies\": {\n    \"angular\": \""
  },
  {
    "path": "ngClient/libs/bootstrap/.bower.json",
    "chars": 1105,
    "preview": "{\n  \"name\": \"bootstrap\",\n  \"description\": \"The most popular front-end framework for developing responsive, mobile first "
  },
  {
    "path": "ngClient/libs/bootstrap/Gruntfile.js",
    "chars": 12948,
    "preview": "/*!\n * Bootstrap's Gruntfile\n * http://getbootstrap.com\n * Copyright 2013-2014 Twitter, Inc.\n * Licensed under MIT (http"
  },
  {
    "path": "ngClient/libs/bootstrap/LICENSE",
    "chars": 1084,
    "preview": "The MIT License (MIT)\n\nCopyright (c) 2011-2014 Twitter, Inc\n\nPermission is hereby granted, free of charge, to any person"
  },
  {
    "path": "ngClient/libs/bootstrap/README.md",
    "chars": 5792,
    "preview": "# [Bootstrap](http://getbootstrap.com)\n[![Bower version](https://badge.fury.io/bo/bootstrap.svg)](http://badge.fury.io/b"
  },
  {
    "path": "ngClient/libs/bootstrap/bower.json",
    "chars": 849,
    "preview": "{\n  \"name\": \"bootstrap\",\n  \"description\": \"The most popular front-end framework for developing responsive, mobile first "
  },
  {
    "path": "ngClient/libs/bootstrap/dist/css/bootstrap-theme.css",
    "chars": 21368,
    "preview": "/*!\n * Bootstrap v3.2.0 (http://getbootstrap.com)\n * Copyright 2011-2014 Twitter, Inc.\n * Licensed under MIT (https://gi"
  },
  {
    "path": "ngClient/libs/bootstrap/dist/css/bootstrap.css",
    "chars": 132546,
    "preview": "/*!\n * Bootstrap v3.2.0 (http://getbootstrap.com)\n * Copyright 2011-2014 Twitter, Inc.\n * Licensed under MIT (https://gi"
  },
  {
    "path": "ngClient/libs/bootstrap/dist/js/bootstrap.js",
    "chars": 60681,
    "preview": "/*!\n * Bootstrap v3.2.0 (http://getbootstrap.com)\n * Copyright 2011-2014 Twitter, Inc.\n * Licensed under MIT (https://gi"
  },
  {
    "path": "ngClient/libs/bootstrap/grunt/bs-glyphicons-data-generator.js",
    "chars": 1393,
    "preview": "/*!\n * Bootstrap Grunt task for Glyphicons data generation\n * http://getbootstrap.com\n * Copyright 2014 Twitter, Inc.\n *"
  },
  {
    "path": "ngClient/libs/bootstrap/grunt/bs-lessdoc-parser.js",
    "chars": 6065,
    "preview": "/*!\n * Bootstrap Grunt task for parsing Less docstrings\n * http://getbootstrap.com\n * Copyright 2014 Twitter, Inc.\n * Li"
  },
  {
    "path": "ngClient/libs/bootstrap/grunt/bs-raw-files-generator.js",
    "chars": 1376,
    "preview": "/*!\n * Bootstrap Grunt task for generating raw-files.min.js for the Customizer\n * http://getbootstrap.com\n * Copyright 2"
  },
  {
    "path": "ngClient/libs/bootstrap/grunt/sauce_browsers.yml",
    "chars": 1435,
    "preview": "[\n  # Docs: https://saucelabs.com/docs/platforms/webdriver\n\n  {\n    browserName: \"safari\",\n    platform: \"OS X 10.9\"\n  }"
  },
  {
    "path": "ngClient/libs/bootstrap/js/affix.js",
    "chars": 4102,
    "preview": "/* ========================================================================\n * Bootstrap: affix.js v3.2.0\n * http://getb"
  },
  {
    "path": "ngClient/libs/bootstrap/js/alert.js",
    "chars": 2228,
    "preview": "/* ========================================================================\n * Bootstrap: alert.js v3.2.0\n * http://getb"
  },
  {
    "path": "ngClient/libs/bootstrap/js/button.js",
    "chars": 2975,
    "preview": "/* ========================================================================\n * Bootstrap: button.js v3.2.0\n * http://get"
  },
  {
    "path": "ngClient/libs/bootstrap/js/carousel.js",
    "chars": 6526,
    "preview": "/* ========================================================================\n * Bootstrap: carousel.js v3.2.0\n * http://g"
  },
  {
    "path": "ngClient/libs/bootstrap/js/collapse.js",
    "chars": 4872,
    "preview": "/* ========================================================================\n * Bootstrap: collapse.js v3.2.0\n * http://g"
  },
  {
    "path": "ngClient/libs/bootstrap/js/dropdown.js",
    "chars": 4385,
    "preview": "/* ========================================================================\n * Bootstrap: dropdown.js v3.2.0\n * http://g"
  },
  {
    "path": "ngClient/libs/bootstrap/js/modal.js",
    "chars": 7940,
    "preview": "/* ========================================================================\n * Bootstrap: modal.js v3.2.0\n * http://getb"
  },
  {
    "path": "ngClient/libs/bootstrap/js/popover.js",
    "chars": 3260,
    "preview": "/* ========================================================================\n * Bootstrap: popover.js v3.2.0\n * http://ge"
  },
  {
    "path": "ngClient/libs/bootstrap/js/scrollspy.js",
    "chars": 4641,
    "preview": "/* ========================================================================\n * Bootstrap: scrollspy.js v3.2.0\n * http://"
  },
  {
    "path": "ngClient/libs/bootstrap/js/tab.js",
    "chars": 2999,
    "preview": "/* ========================================================================\n * Bootstrap: tab.js v3.2.0\n * http://getboo"
  },
  {
    "path": "ngClient/libs/bootstrap/js/tooltip.js",
    "chars": 14642,
    "preview": "/* ========================================================================\n * Bootstrap: tooltip.js v3.2.0\n * http://ge"
  },
  {
    "path": "ngClient/libs/bootstrap/js/transition.js",
    "chars": 1831,
    "preview": "/* ========================================================================\n * Bootstrap: transition.js v3.2.0\n * http:/"
  },
  {
    "path": "ngClient/libs/bootstrap/less/alerts.less",
    "chars": 1513,
    "preview": "//\n// Alerts\n// --------------------------------------------------\n\n\n// Base styles\n// -------------------------\n\n.alert"
  },
  {
    "path": "ngClient/libs/bootstrap/less/badges.less",
    "chars": 1069,
    "preview": "//\n// Badges\n// --------------------------------------------------\n\n\n// Base class\n.badge {\n  display: inline-block;\n  m"
  },
  {
    "path": "ngClient/libs/bootstrap/less/bootstrap.less",
    "chars": 1121,
    "preview": "// Core variables and mixins\n@import \"variables.less\";\n@import \"mixins.less\";\n\n// Reset and dependencies\n@import \"normal"
  },
  {
    "path": "ngClient/libs/bootstrap/less/breadcrumbs.less",
    "chars": 594,
    "preview": "//\n// Breadcrumbs\n// --------------------------------------------------\n\n\n.breadcrumb {\n  padding: @breadcrumb-padding-v"
  },
  {
    "path": "ngClient/libs/bootstrap/less/button-groups.less",
    "chars": 5484,
    "preview": "//\n// Button groups\n// --------------------------------------------------\n\n// Make the div behave like a button\n.btn-gro"
  },
  {
    "path": "ngClient/libs/bootstrap/less/buttons.less",
    "chars": 3500,
    "preview": "//\n// Buttons\n// --------------------------------------------------\n\n\n// Base styles\n// --------------------------------"
  },
  {
    "path": "ngClient/libs/bootstrap/less/carousel.less",
    "chars": 4759,
    "preview": "//\n// Carousel\n// --------------------------------------------------\n\n\n// Wrapper for the slide container and indicators"
  },
  {
    "path": "ngClient/libs/bootstrap/less/close.less",
    "chars": 683,
    "preview": "//\n// Close icons\n// --------------------------------------------------\n\n\n.close {\n  float: right;\n  font-size: (@font-s"
  },
  {
    "path": "ngClient/libs/bootstrap/less/code.less",
    "chars": 1378,
    "preview": "//\n// Code (inline and block)\n// --------------------------------------------------\n\n\n// Inline and block code styles\nco"
  },
  {
    "path": "ngClient/libs/bootstrap/less/component-animations.less",
    "chars": 585,
    "preview": "//\n// Component animations\n// --------------------------------------------------\n\n// Heads up!\n//\n// We don't use the `."
  },
  {
    "path": "ngClient/libs/bootstrap/less/dropdowns.less",
    "chars": 4782,
    "preview": "//\n// Dropdown menus\n// --------------------------------------------------\n\n\n// Dropdown arrow/caret\n.caret {\n  display:"
  },
  {
    "path": "ngClient/libs/bootstrap/less/forms.less",
    "chars": 13734,
    "preview": "//\n// Forms\n// --------------------------------------------------\n\n\n// Normalize non-controls\n//\n// Restyle and baseline"
  },
  {
    "path": "ngClient/libs/bootstrap/less/glyphicons.less",
    "chars": 14862,
    "preview": "//\n// Glyphicons for Bootstrap\n//\n// Since icons are fonts, they can be placed anywhere text is placed and are\n// thus a"
  },
  {
    "path": "ngClient/libs/bootstrap/less/grid.less",
    "chars": 1387,
    "preview": "//\n// Grid system\n// --------------------------------------------------\n\n\n// Container widths\n//\n// Set the container wi"
  },
  {
    "path": "ngClient/libs/bootstrap/less/input-groups.less",
    "chars": 4215,
    "preview": "//\n// Input groups\n// --------------------------------------------------\n\n// Base styles\n// -------------------------\n.i"
  },
  {
    "path": "ngClient/libs/bootstrap/less/jumbotron.less",
    "chars": 965,
    "preview": "//\n// Jumbotron\n// --------------------------------------------------\n\n\n.jumbotron {\n  padding: @jumbotron-padding;\n  ma"
  },
  {
    "path": "ngClient/libs/bootstrap/less/labels.less",
    "chars": 1079,
    "preview": "//\n// Labels\n// --------------------------------------------------\n\n.label {\n  display: inline;\n  padding: .2em .6em .3e"
  },
  {
    "path": "ngClient/libs/bootstrap/less/list-group.less",
    "chars": 3113,
    "preview": "//\n// List groups\n// --------------------------------------------------\n\n\n// Base class\n//\n// Easily usable on <ul>, <ol"
  },
  {
    "path": "ngClient/libs/bootstrap/less/media.less",
    "chars": 848,
    "preview": "// Media objects\n// Source: http://stubbornella.org/content/?p=497\n// --------------------------------------------------"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/alerts.less",
    "chars": 257,
    "preview": "// Alerts\n\n.alert-variant(@background; @border; @text-color) {\n  background-color: @background;\n  border-color: @border;"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/background-variant.less",
    "chars": 139,
    "preview": "// Contextual backgrounds\n\n.bg-variant(@color) {\n  background-color: @color;\n  a&:hover {\n    background-color: darken(@"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/border-radius.less",
    "chars": 468,
    "preview": "// Single side border-radius\n\n.border-top-radius(@radius) {\n  border-top-right-radius: @radius;\n   border-top-left-radiu"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/buttons.less",
    "chars": 1056,
    "preview": "// Button variants\n//\n// Easily pump out default styles, as well as :hover, :focus, :active,\n// and disabled options for"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/center-block.less",
    "chars": 120,
    "preview": "// Center-align a block level element\n\n.center-block() {\n  display: block;\n  margin-left: auto;\n  margin-right: auto;\n}\n"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/clearfix.less",
    "chars": 605,
    "preview": "// Clearfix\n//\n// For modern browsers\n// 1. The space content is one way to avoid an Opera bug when the\n//    contentedi"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/forms.less",
    "chars": 2553,
    "preview": "// Form validation states\n//\n// Used in forms.less to generate the form validation CSS for warnings, errors,\n// and succ"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/gradients.less",
    "chars": 4388,
    "preview": "// Gradients\n\n#gradient {\n\n  // Horizontal gradient, from left to right\n  //\n  // Creates two color stops, start and end"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/grid-framework.less",
    "chars": 2820,
    "preview": "// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any va"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/grid.less",
    "chars": 3094,
    "preview": "// Grid system\n//\n// Generate semantic grid columns with these mixins.\n\n// Centered container element\n.container-fixed(@"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/hide-text.less",
    "chars": 579,
    "preview": "// CSS image replacement\n//\n// Heads up! v3 launched with with only `.hide-text()`, but per our pattern for\n// mixins be"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/image.less",
    "chars": 1133,
    "preview": "// Image Mixins\n// - Responsive image\n// - Retina image\n\n\n// Responsive image\n//\n// Keep images from scaling beyond the "
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/labels.less",
    "chars": 163,
    "preview": "// Labels\n\n.label-variant(@color) {\n  background-color: @color;\n  \n  &[href] {\n    &:hover,\n    &:focus {\n      backgrou"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/list-group.less",
    "chars": 533,
    "preview": "// List Groups\n\n.list-group-item-variant(@state; @background; @color) {\n  .list-group-item-@{state} {\n    color: @color;"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/nav-divider.less",
    "chars": 232,
    "preview": "// Horizontal dividers\n//\n// Dividers (basically an hr) within dropdowns and nav lists\n\n.nav-divider(@color: #e5e5e5) {\n"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/nav-vertical-align.less",
    "chars": 364,
    "preview": "// Navbar vertical align\n//\n// Vertically center elements in the navbar.\n// Example: an element has a height of 30px, so"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/opacity.less",
    "chars": 148,
    "preview": "// Opacity\n\n.opacity(@opacity) {\n  opacity: @opacity;\n  // IE8 filter\n  @opacity-ie: (@opacity * 100);\n  filter: ~\"alpha"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/pagination.less",
    "chars": 438,
    "preview": "// Pagination\n\n.pagination-size(@padding-vertical; @padding-horizontal; @font-size; @border-radius) {\n  > li {\n    > a,\n"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/panels.less",
    "chars": 537,
    "preview": "// Panels\n\n.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {\n  border-color: @border;\n\n"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/progress-bar.less",
    "chars": 191,
    "preview": "// Progress bars\n\n.progress-bar-variant(@color) {\n  background-color: @color;\n\n  // Deprecated parent class requirement "
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/reset-filter.less",
    "chars": 248,
    "preview": "// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the I"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/resize.less",
    "chars": 196,
    "preview": "// Resize anything\n\n.resizable(@direction) {\n  resize: @direction; // Options: horizontal, vertical, both\n  overflow: au"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/responsive-visibility.less",
    "chars": 343,
    "preview": "// Responsive utilities\n\n//\n// More easily include all the states for responsive-utilities.less.\n.responsive-visibility("
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/size.less",
    "chars": 127,
    "preview": "// Sizing shortcuts\n\n.size(@width; @height) {\n  width: @width;\n  height: @height;\n}\n\n.square(@size) {\n  .size(@size; @si"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/tab-focus.less",
    "chars": 159,
    "preview": "// WebKit-style focus\n\n.tab-focus() {\n  // Default\n  outline: thin dotted;\n  // WebKit\n  outline: 5px auto -webkit-focus"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/table-row.less",
    "chars": 700,
    "preview": "// Tables\n\n.table-row-variant(@state; @background) {\n  // Exact selectors below required to override `.table-striped` an"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/text-emphasis.less",
    "chars": 116,
    "preview": "// Typography\n\n.text-emphasis-variant(@color) {\n  color: @color;\n  a&:hover {\n    color: darken(@color, 10%);\n  }\n}\n"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/text-overflow.less",
    "chars": 162,
    "preview": "// Text overflow\n// Requires inline-block or block for proper styling\n\n.text-overflow() {\n  overflow: hidden;\n  text-ove"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins/vendor-prefixes.less",
    "chars": 6646,
    "preview": "// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our"
  },
  {
    "path": "ngClient/libs/bootstrap/less/mixins.less",
    "chars": 1102,
    "preview": "// Mixins\n// --------------------------------------------------\n\n// Utilities\n@import \"mixins/hide-text.less\";\n@import \""
  },
  {
    "path": "ngClient/libs/bootstrap/less/modals.less",
    "chars": 3575,
    "preview": "//\n// Modals\n// --------------------------------------------------\n\n// .modal-open      - body class for killing the scr"
  },
  {
    "path": "ngClient/libs/bootstrap/less/navbar.less",
    "chars": 14688,
    "preview": "//\n// Navbars\n// --------------------------------------------------\n\n\n// Wrapper and base class\n//\n// Provide a static n"
  },
  {
    "path": "ngClient/libs/bootstrap/less/navs.less",
    "chars": 4925,
    "preview": "//\n// Navs\n// --------------------------------------------------\n\n\n// Base class\n// ------------------------------------"
  },
  {
    "path": "ngClient/libs/bootstrap/less/normalize.less",
    "chars": 7635,
    "preview": "/*! normalize.css v3.0.1 | MIT License | git.io/normalize */\n\n//\n// 1. Set default font family to sans-serif.\n// 2. Prev"
  },
  {
    "path": "ngClient/libs/bootstrap/less/pager.less",
    "chars": 857,
    "preview": "//\n// Pager pagination\n// --------------------------------------------------\n\n\n.pager {\n  padding-left: 0;\n  margin: @li"
  },
  {
    "path": "ngClient/libs/bootstrap/less/pagination.less",
    "chars": 1996,
    "preview": "//\n// Pagination (multiple pages)\n// --------------------------------------------------\n.pagination {\n  display: inline-"
  },
  {
    "path": "ngClient/libs/bootstrap/less/panels.less",
    "chars": 5605,
    "preview": "//\n// Panels\n// --------------------------------------------------\n\n\n// Base class\n.panel {\n  margin-bottom: @line-heigh"
  },
  {
    "path": "ngClient/libs/bootstrap/less/popovers.less",
    "chars": 3406,
    "preview": "//\n// Popovers\n// --------------------------------------------------\n\n\n.popover {\n  position: absolute;\n  top: 0;\n  left"
  },
  {
    "path": "ngClient/libs/bootstrap/less/print.less",
    "chars": 1613,
    "preview": "//\n// Basic print styles\n// --------------------------------------------------\n// Source: https://github.com/h5bp/html5-"
  },
  {
    "path": "ngClient/libs/bootstrap/less/progress-bars.less",
    "chars": 2209,
    "preview": "//\n// Progress bars\n// --------------------------------------------------\n\n\n// Bar animations\n// -----------------------"
  },
  {
    "path": "ngClient/libs/bootstrap/less/responsive-embed.less",
    "chars": 555,
    "preview": "// Embeds responsive\n//\n// Credit: Nicolas Gallagher and SUIT CSS.\n\n.embed-responsive {\n  position: relative;\n  display:"
  },
  {
    "path": "ngClient/libs/bootstrap/less/responsive-utilities.less",
    "chars": 4262,
    "preview": "//\n// Responsive: Utility classes\n// --------------------------------------------------\n\n\n// IE10 in Windows (Phone) 8\n/"
  },
  {
    "path": "ngClient/libs/bootstrap/less/scaffolding.less",
    "chars": 2643,
    "preview": "//\n// Scaffolding\n// --------------------------------------------------\n\n\n// Reset the box-sizing\n//\n// Heads up! This r"
  },
  {
    "path": "ngClient/libs/bootstrap/less/tables.less",
    "chars": 4479,
    "preview": "//\n// Tables\n// --------------------------------------------------\n\n\ntable {\n  background-color: @table-bg;\n}\nth {\n  tex"
  },
  {
    "path": "ngClient/libs/bootstrap/less/theme.less",
    "chars": 7173,
    "preview": "\n//\n// Load core variables and mixins\n// --------------------------------------------------\n\n@import \"variables.less\";\n@"
  },
  {
    "path": "ngClient/libs/bootstrap/less/thumbnails.less",
    "chars": 750,
    "preview": "//\n// Thumbnails\n// --------------------------------------------------\n\n\n// Mixin and adjust the regular image class\n.th"
  },
  {
    "path": "ngClient/libs/bootstrap/less/tooltip.less",
    "chars": 2590,
    "preview": "//\n// Tooltips\n// --------------------------------------------------\n\n\n// Base class\n.tooltip {\n  position: absolute;\n  "
  },
  {
    "path": "ngClient/libs/bootstrap/less/type.less",
    "chars": 6089,
    "preview": "//\n// Typography\n// --------------------------------------------------\n\n\n// Headings\n// -------------------------\n\nh1, h"
  },
  {
    "path": "ngClient/libs/bootstrap/less/utilities.less",
    "chars": 805,
    "preview": "//\n// Utility classes\n// --------------------------------------------------\n\n\n// Floats\n// -------------------------\n\n.c"
  },
  {
    "path": "ngClient/libs/bootstrap/less/variables.less",
    "chars": 26225,
    "preview": "//\n// Variables\n// --------------------------------------------------\n\n\n//== Colors\n//\n//## Gray and brand colors for us"
  },
  {
    "path": "ngClient/libs/bootstrap/less/wells.less",
    "chars": 527,
    "preview": "//\n// Wells\n// --------------------------------------------------\n\n\n// Base class\n.well {\n  min-height: 20px;\n  padding:"
  },
  {
    "path": "ngClient/libs/bootstrap/package.json",
    "chars": 2022,
    "preview": "{\n  \"name\": \"bootstrap\",\n  \"description\": \"The most popular front-end framework for developing responsive, mobile first "
  },
  {
    "path": "ngClient/libs/jquery/.bower.json",
    "chars": 727,
    "preview": "{\n  \"name\": \"jquery\",\n  \"version\": \"2.1.1\",\n  \"main\": \"dist/jquery.js\",\n  \"license\": \"MIT\",\n  \"ignore\": [\n    \"**/.*\",\n "
  },
  {
    "path": "ngClient/libs/jquery/MIT-LICENSE.txt",
    "chars": 1099,
    "preview": "Copyright 2014 jQuery Foundation and other contributors\nhttp://jquery.com/\n\nPermission is hereby granted, free of charge"
  },
  {
    "path": "ngClient/libs/jquery/bower.json",
    "chars": 424,
    "preview": "{\n  \"name\": \"jquery\",\n  \"version\": \"2.1.1\",\n  \"main\": \"dist/jquery.js\",\n  \"license\": \"MIT\",\n  \"ignore\": [\n    \"**/.*\",\n "
  },
  {
    "path": "ngClient/libs/jquery/dist/jquery.js",
    "chars": 247351,
    "preview": "/*!\n * jQuery JavaScript Library v2.1.1\n * http://jquery.com/\n *\n * Includes Sizzle.js\n * http://sizzlejs.com/\n *\n * Cop"
  },
  {
    "path": "ngClient/libs/jquery/src/ajax/jsonp.js",
    "chars": 2516,
    "preview": "define([\n\t\"../core\",\n\t\"./var/nonce\",\n\t\"./var/rquery\",\n\t\"../ajax\"\n], function( jQuery, nonce, rquery ) {\n\nvar oldCallback"
  },
  {
    "path": "ngClient/libs/jquery/src/ajax/load.js",
    "chars": 1669,
    "preview": "define([\n\t\"../core\",\n\t\"../core/parseHTML\",\n\t\"../ajax\",\n\t\"../traversing\",\n\t\"../manipulation\",\n\t\"../selector\",\n\t// Optiona"
  },
  {
    "path": "ngClient/libs/jquery/src/ajax/parseJSON.js",
    "chars": 222,
    "preview": "define([\n\t\"../core\"\n], function( jQuery ) {\n\n// Support: Android 2.3\n// Workaround failure to string-cast null input\njQu"
  },
  {
    "path": "ngClient/libs/jquery/src/ajax/parseXML.js",
    "chars": 485,
    "preview": "define([\n\t\"../core\"\n], function( jQuery ) {\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml,"
  },
  {
    "path": "ngClient/libs/jquery/src/ajax/script.js",
    "chars": 1271,
    "preview": "define([\n\t\"../core\",\n\t\"../ajax\"\n], function( jQuery ) {\n\n// Install script dataType\njQuery.ajaxSetup({\n\taccepts: {\n\t\tscr"
  },
  {
    "path": "ngClient/libs/jquery/src/ajax/var/nonce.js",
    "chars": 73,
    "preview": "define([\n\t\"../../core\"\n], function( jQuery ) {\n\treturn jQuery.now();\n});\n"
  },
  {
    "path": "ngClient/libs/jquery/src/ajax/var/rquery.js",
    "chars": 40,
    "preview": "define(function() {\n\treturn (/\\?/);\n});\n"
  },
  {
    "path": "ngClient/libs/jquery/src/ajax/xhr.js",
    "chars": 3427,
    "preview": "define([\n\t\"../core\",\n\t\"../var/support\",\n\t\"../ajax\"\n], function( jQuery, support ) {\n\njQuery.ajaxSettings.xhr = function("
  },
  {
    "path": "ngClient/libs/jquery/src/ajax.js",
    "chars": 21719,
    "preview": "define([\n\t\"./core\",\n\t\"./var/rnotwhite\",\n\t\"./ajax/var/nonce\",\n\t\"./ajax/var/rquery\",\n\t\"./core/init\",\n\t\"./ajax/parseJSON\",\n"
  },
  {
    "path": "ngClient/libs/jquery/src/attributes/attr.js",
    "chars": 3484,
    "preview": "define([\n\t\"../core\",\n\t\"../var/rnotwhite\",\n\t\"../var/strundefined\",\n\t\"../core/access\",\n\t\"./support\",\n\t\"../selector\"\n], fun"
  },
  {
    "path": "ngClient/libs/jquery/src/attributes/classes.js",
    "chars": 4155,
    "preview": "define([\n\t\"../core\",\n\t\"../var/rnotwhite\",\n\t\"../var/strundefined\",\n\t\"../data/var/data_priv\",\n\t\"../core/init\"\n], function("
  },
  {
    "path": "ngClient/libs/jquery/src/attributes/prop.js",
    "chars": 1934,
    "preview": "define([\n\t\"../core\",\n\t\"../core/access\",\n\t\"./support\"\n], function( jQuery, access, support ) {\n\nvar rfocusable = /^(?:inp"
  },
  {
    "path": "ngClient/libs/jquery/src/attributes/support.js",
    "chars": 970,
    "preview": "define([\n\t\"../var/support\"\n], function( support ) {\n\n(function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tsel"
  },
  {
    "path": "ngClient/libs/jquery/src/attributes/val.js",
    "chars": 3925,
    "preview": "define([\n\t\"../core\",\n\t\"./support\",\n\t\"../core/init\"\n], function( jQuery, support ) {\n\nvar rreturn = /\\r/g;\n\njQuery.fn.ext"
  },
  {
    "path": "ngClient/libs/jquery/src/attributes.js",
    "chars": 200,
    "preview": "define([\n\t\"./core\",\n\t\"./attributes/attr\",\n\t\"./attributes/prop\",\n\t\"./attributes/classes\",\n\t\"./attributes/val\"\n], function"
  },
  {
    "path": "ngClient/libs/jquery/src/callbacks.js",
    "chars": 5506,
    "preview": "define([\n\t\"./core\",\n\t\"./var/rnotwhite\"\n], function( jQuery, rnotwhite ) {\n\n// String to Object options format cache\nvar "
  },
  {
    "path": "ngClient/libs/jquery/src/core/access.js",
    "chars": 1210,
    "preview": "define([\n\t\"../core\"\n], function( jQuery ) {\n\n// Multifunctional method to get and set values of a collection\n// The valu"
  },
  {
    "path": "ngClient/libs/jquery/src/core/init.js",
    "chars": 3410,
    "preview": "// Initialize a jQuery object\ndefine([\n\t\"../core\",\n\t\"./var/rsingleTag\",\n\t\"../traversing/findFilter\"\n], function( jQuery,"
  },
  {
    "path": "ngClient/libs/jquery/src/core/parseHTML.js",
    "chars": 938,
    "preview": "define([\n\t\"../core\",\n\t\"./var/rsingleTag\",\n\t\"../manipulation\" // buildFragment\n], function( jQuery, rsingleTag ) {\n\n// da"
  },
  {
    "path": "ngClient/libs/jquery/src/core/ready.js",
    "chars": 2381,
    "preview": "define([\n\t\"../core\",\n\t\"../core/init\",\n\t\"../deferred\"\n], function( jQuery ) {\n\n// The deferred used on DOM ready\nvar read"
  },
  {
    "path": "ngClient/libs/jquery/src/core/var/rsingleTag.js",
    "chars": 91,
    "preview": "define(function() {\n\t// Match a standalone tag\n\treturn (/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/);\n});\n"
  },
  {
    "path": "ngClient/libs/jquery/src/core.js",
    "chars": 11667,
    "preview": "define([\n\t\"./var/arr\",\n\t\"./var/slice\",\n\t\"./var/concat\",\n\t\"./var/push\",\n\t\"./var/indexOf\",\n\t\"./var/class2type\",\n\t\"./var/to"
  },
  {
    "path": "ngClient/libs/jquery/src/css/addGetHookIf.js",
    "chars": 590,
    "preview": "define(function() {\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\t// Define the hook, we'll check on the first run if"
  },
  {
    "path": "ngClient/libs/jquery/src/css/curCSS.js",
    "chars": 1462,
    "preview": "define([\n\t\"../core\",\n\t\"./var/rnumnonpx\",\n\t\"./var/rmargin\",\n\t\"./var/getStyles\",\n\t\"../selector\" // contains\n], function( j"
  },
  {
    "path": "ngClient/libs/jquery/src/css/defaultDisplay.js",
    "chars": 1866,
    "preview": "define([\n\t\"../core\",\n\t\"../manipulation\" // appendTo\n], function( jQuery ) {\n\nvar iframe,\n\telemdisplay = {};\n\n/**\n * Retr"
  },
  {
    "path": "ngClient/libs/jquery/src/css/hiddenVisibleSelectors.js",
    "chars": 380,
    "preview": "define([\n\t\"../core\",\n\t\"../selector\"\n], function( jQuery ) {\n\njQuery.expr.filters.hidden = function( elem ) {\n\t// Support"
  },
  {
    "path": "ngClient/libs/jquery/src/css/support.js",
    "chars": 3075,
    "preview": "define([\n\t\"../core\",\n\t\"../var/support\"\n], function( jQuery, support ) {\n\n(function() {\n\tvar pixelPositionVal, boxSizingR"
  },
  {
    "path": "ngClient/libs/jquery/src/css/swap.js",
    "chars": 555,
    "preview": "define([\n\t\"../core\"\n], function( jQuery ) {\n\n// A method for quickly swapping in/out CSS properties to get correct calcu"
  },
  {
    "path": "ngClient/libs/jquery/src/css/var/cssExpand.js",
    "chars": 70,
    "preview": "define(function() {\n\treturn [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n});\n"
  },
  {
    "path": "ngClient/libs/jquery/src/css/var/getStyles.js",
    "chars": 127,
    "preview": "define(function() {\n\treturn function( elem ) {\n\t\treturn elem.ownerDocument.defaultView.getComputedStyle( elem, null );\n\t"
  },
  {
    "path": "ngClient/libs/jquery/src/css/var/isHidden.js",
    "chars": 355,
    "preview": "define([\n\t\"../../core\",\n\t\"../../selector\"\n\t// css is assumed\n], function( jQuery ) {\n\n\treturn function( elem, el ) {\n\t\t/"
  },
  {
    "path": "ngClient/libs/jquery/src/css/var/rmargin.js",
    "chars": 45,
    "preview": "define(function() {\n\treturn (/^margin/);\n});\n"
  },
  {
    "path": "ngClient/libs/jquery/src/css/var/rnumnonpx.js",
    "chars": 113,
    "preview": "define([\n\t\"../../var/pnum\"\n], function( pnum ) {\n\treturn new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n});\n"
  },
  {
    "path": "ngClient/libs/jquery/src/css.js",
    "chars": 12747,
    "preview": "define([\n\t\"./core\",\n\t\"./var/pnum\",\n\t\"./core/access\",\n\t\"./css/var/rmargin\",\n\t\"./css/var/rnumnonpx\",\n\t\"./css/var/cssExpand"
  },
  {
    "path": "ngClient/libs/jquery/src/data/Data.js",
    "chars": 4889,
    "preview": "define([\n\t\"../core\",\n\t\"../var/rnotwhite\",\n\t\"./accepts\"\n], function( jQuery, rnotwhite ) {\n\nfunction Data() {\n\t// Support"
  },
  {
    "path": "ngClient/libs/jquery/src/data/accepts.js",
    "chars": 383,
    "preview": "define([\n\t\"../core\"\n], function( jQuery ) {\n\n/**\n * Determines whether an object can have data\n */\njQuery.acceptData = f"
  },
  {
    "path": "ngClient/libs/jquery/src/data/var/data_priv.js",
    "chars": 66,
    "preview": "define([\n\t\"../Data\"\n], function( Data ) {\n\treturn new Data();\n});\n"
  },
  {
    "path": "ngClient/libs/jquery/src/data/var/data_user.js",
    "chars": 66,
    "preview": "define([\n\t\"../Data\"\n], function( Data ) {\n\treturn new Data();\n});\n"
  },
  {
    "path": "ngClient/libs/jquery/src/data.js",
    "chars": 4929,
    "preview": "define([\n\t\"./core\",\n\t\"./var/rnotwhite\",\n\t\"./core/access\",\n\t\"./data/var/data_priv\",\n\t\"./data/var/data_user\"\n], function( "
  },
  {
    "path": "ngClient/libs/jquery/src/deferred.js",
    "chars": 4414,
    "preview": "define([\n\t\"./core\",\n\t\"./var/slice\",\n\t\"./callbacks\"\n], function( jQuery, slice ) {\n\njQuery.extend({\n\n\tDeferred: function("
  },
  {
    "path": "ngClient/libs/jquery/src/deprecated.js",
    "chars": 223,
    "preview": "define([\n\t\"./core\",\n\t\"./traversing\"\n], function( jQuery ) {\n\n// The number of elements contained in the matched element "
  },
  {
    "path": "ngClient/libs/jquery/src/dimensions.js",
    "chars": 1776,
    "preview": "define([\n\t\"./core\",\n\t\"./core/access\",\n\t\"./css\"\n], function( jQuery, access ) {\n\n// Create innerHeight, innerWidth, heigh"
  },
  {
    "path": "ngClient/libs/jquery/src/effects/Tween.js",
    "chars": 3031,
    "preview": "define([\n\t\"../core\",\n\t\"../css\"\n], function( jQuery ) {\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new"
  },
  {
    "path": "ngClient/libs/jquery/src/effects/animatedSelector.js",
    "chars": 225,
    "preview": "define([\n\t\"../core\",\n\t\"../selector\",\n\t\"../effects\"\n], function( jQuery ) {\n\njQuery.expr.filters.animated = function( ele"
  },
  {
    "path": "ngClient/libs/jquery/src/effects.js",
    "chars": 16974,
    "preview": "define([\n\t\"./core\",\n\t\"./var/pnum\",\n\t\"./css/var/cssExpand\",\n\t\"./css/var/isHidden\",\n\t\"./css/defaultDisplay\",\n\t\"./data/var/"
  },
  {
    "path": "ngClient/libs/jquery/src/event/alias.js",
    "chars": 1094,
    "preview": "define([\n\t\"../core\",\n\t\"../event\"\n], function( jQuery ) {\n\njQuery.each( (\"blur focus focusin focusout load resize scroll "
  },
  {
    "path": "ngClient/libs/jquery/src/event/support.js",
    "chars": 123,
    "preview": "define([\n\t\"../var/support\"\n], function( support ) {\n\nsupport.focusinBubbles = \"onfocusin\" in window;\n\nreturn support;\n\n}"
  },
  {
    "path": "ngClient/libs/jquery/src/event.js",
    "chars": 24479,
    "preview": "define([\n\t\"./core\",\n\t\"./var/strundefined\",\n\t\"./var/rnotwhite\",\n\t\"./var/hasOwn\",\n\t\"./var/slice\",\n\t\"./event/support\",\n\t\"./"
  },
  {
    "path": "ngClient/libs/jquery/src/exports/amd.js",
    "chars": 1006,
    "preview": "define([\n\t\"../core\"\n], function( jQuery ) {\n\n// Register as a named AMD module, since jQuery can be concatenated with ot"
  },
  {
    "path": "ngClient/libs/jquery/src/exports/global.js",
    "chars": 641,
    "preview": "define([\n\t\"../core\",\n\t\"../var/strundefined\"\n], function( jQuery, strundefined ) {\n\nvar\n\t// Map over jQuery in case of ov"
  },
  {
    "path": "ngClient/libs/jquery/src/intro.js",
    "chars": 1405,
    "preview": "/*!\n * jQuery JavaScript Library v@VERSION\n * http://jquery.com/\n *\n * Includes Sizzle.js\n * http://sizzlejs.com/\n *\n * "
  },
  {
    "path": "ngClient/libs/jquery/src/jquery.js",
    "chars": 557,
    "preview": "define([\n\t\"./core\",\n\t\"./selector\",\n\t\"./traversing\",\n\t\"./callbacks\",\n\t\"./deferred\",\n\t\"./core/ready\",\n\t\"./data\",\n\t\"./queue"
  },
  {
    "path": "ngClient/libs/jquery/src/manipulation/_evalUrl.js",
    "chars": 240,
    "preview": "define([\n\t\"../ajax\"\n], function( jQuery ) {\n\njQuery._evalUrl = function( url ) {\n\treturn jQuery.ajax({\n\t\turl: url,\n\t\ttyp"
  },
  {
    "path": "ngClient/libs/jquery/src/manipulation/support.js",
    "chars": 986,
    "preview": "define([\n\t\"../var/support\"\n], function( support ) {\n\n(function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\t"
  },
  {
    "path": "ngClient/libs/jquery/src/manipulation/var/rcheckableType.js",
    "chars": 59,
    "preview": "define(function() {\n\treturn (/^(?:checkbox|radio)$/i);\n});\n"
  },
  {
    "path": "ngClient/libs/jquery/src/manipulation.js",
    "chars": 15024,
    "preview": "define([\n\t\"./core\",\n\t\"./var/concat\",\n\t\"./var/push\",\n\t\"./core/access\",\n\t\"./manipulation/var/rcheckableType\",\n\t\"./manipula"
  },
  {
    "path": "ngClient/libs/jquery/src/offset.js",
    "chars": 5481,
    "preview": "define([\n\t\"./core\",\n\t\"./var/strundefined\",\n\t\"./core/access\",\n\t\"./css/var/rnumnonpx\",\n\t\"./css/curCSS\",\n\t\"./css/addGetHook"
  },
  {
    "path": "ngClient/libs/jquery/src/outro.js",
    "chars": 5,
    "preview": "}));\n"
  },
  {
    "path": "ngClient/libs/jquery/src/queue/delay.js",
    "chars": 561,
    "preview": "define([\n\t\"../core\",\n\t\"../queue\",\n\t\"../effects\" // Delay is optional because of this dependency\n], function( jQuery ) {\n"
  },
  {
    "path": "ngClient/libs/jquery/src/queue.js",
    "chars": 3090,
    "preview": "define([\n\t\"./core\",\n\t\"./data/var/data_priv\",\n\t\"./deferred\",\n\t\"./callbacks\"\n], function( jQuery, data_priv ) {\n\njQuery.ex"
  },
  {
    "path": "ngClient/libs/jquery/src/selector-native.js",
    "chars": 4434,
    "preview": "define([\n\t\"./core\"\n], function( jQuery ) {\n\n/*\n * Optional (non-Sizzle) selector module for custom builds.\n *\n * Note th"
  },
  {
    "path": "ngClient/libs/jquery/src/selector-sizzle.js",
    "chars": 294,
    "preview": "define([\n\t\"./core\",\n\t\"sizzle\"\n], function( jQuery, Sizzle ) {\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\njQu"
  },
  {
    "path": "ngClient/libs/jquery/src/selector.js",
    "chars": 33,
    "preview": "define([ \"./selector-sizzle\" ]);\n"
  },
  {
    "path": "ngClient/libs/jquery/src/serialize.js",
    "chars": 3214,
    "preview": "define([\n\t\"./core\",\n\t\"./manipulation/var/rcheckableType\",\n\t\"./core/init\",\n\t\"./traversing\", // filter\n\t\"./attributes/prop"
  },
  {
    "path": "ngClient/libs/jquery/src/sizzle/dist/sizzle.js",
    "chars": 58579,
    "preview": "/*!\n * Sizzle CSS Selector Engine v1.10.19\n * http://sizzlejs.com/\n *\n * Copyright 2013 jQuery Foundation, Inc. and othe"
  },
  {
    "path": "ngClient/libs/jquery/src/traversing/findFilter.js",
    "chars": 2464,
    "preview": "define([\n\t\"../core\",\n\t\"../var/indexOf\",\n\t\"./var/rneedsContext\",\n\t\"../selector\"\n], function( jQuery, indexOf, rneedsConte"
  },
  {
    "path": "ngClient/libs/jquery/src/traversing/var/rneedsContext.js",
    "chars": 110,
    "preview": "define([\n\t\"../../core\",\n\t\"../../selector\"\n], function( jQuery ) {\n\treturn jQuery.expr.match.needsContext;\n});\n"
  },
  {
    "path": "ngClient/libs/jquery/src/traversing.js",
    "chars": 4559,
    "preview": "define([\n\t\"./core\",\n\t\"./var/indexOf\",\n\t\"./traversing/var/rneedsContext\",\n\t\"./core/init\",\n\t\"./traversing/findFilter\",\n\t\"."
  },
  {
    "path": "ngClient/libs/jquery/src/var/arr.js",
    "chars": 36,
    "preview": "define(function() {\n\treturn [];\n});\n"
  },
  {
    "path": "ngClient/libs/jquery/src/var/class2type.js",
    "chars": 64,
    "preview": "define(function() {\n\t// [[Class]] -> type pairs\n\treturn {};\n});\n"
  },
  {
    "path": "ngClient/libs/jquery/src/var/concat.js",
    "chars": 63,
    "preview": "define([\n\t\"./arr\"\n], function( arr ) {\n\treturn arr.concat;\n});\n"
  },
  {
    "path": "ngClient/libs/jquery/src/var/hasOwn.js",
    "chars": 92,
    "preview": "define([\n\t\"./class2type\"\n], function( class2type ) {\n\treturn class2type.hasOwnProperty;\n});\n"
  },
  {
    "path": "ngClient/libs/jquery/src/var/indexOf.js",
    "chars": 64,
    "preview": "define([\n\t\"./arr\"\n], function( arr ) {\n\treturn arr.indexOf;\n});\n"
  },
  {
    "path": "ngClient/libs/jquery/src/var/pnum.js",
    "chars": 80,
    "preview": "define(function() {\n\treturn (/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/).source;\n});\n"
  },
  {
    "path": "ngClient/libs/jquery/src/var/push.js",
    "chars": 61,
    "preview": "define([\n\t\"./arr\"\n], function( arr ) {\n\treturn arr.push;\n});\n"
  },
  {
    "path": "ngClient/libs/jquery/src/var/rnotwhite.js",
    "chars": 42,
    "preview": "define(function() {\n\treturn (/\\S+/g);\n});\n"
  },
  {
    "path": "ngClient/libs/jquery/src/var/slice.js",
    "chars": 62,
    "preview": "define([\n\t\"./arr\"\n], function( arr ) {\n\treturn arr.slice;\n});\n"
  },
  {
    "path": "ngClient/libs/jquery/src/var/strundefined.js",
    "chars": 50,
    "preview": "define(function() {\n\treturn typeof undefined;\n});\n"
  }
]

// ... and 21 more files (download for full content)

About this extraction

This page contains the full source code of the arvindr21/myRESTApp GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 221 files (1.8 MB), approximately 488.2k tokens, and a symbol index with 359 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!