Bones/node_modules/browser-sync-ui/public/js/app.js.map

63 lines
1.2 MiB
Plaintext
Raw Normal View History

2017-05-17 13:45:25 -04:00
{
"version": 3,
"sources": [
"node_modules/browserify/node_modules/browser-pack/_prelude.js",
"src/scripts/app.js",
"node_modules/angular-route/angular-route.js",
"node_modules/angular-sanitize/angular-sanitize.js",
"node_modules/angular-touch/angular-touch.js",
"node_modules/angular/angular.js",
"node_modules/object-path/index.js",
"node_modules/store/store.js",
"src/scripts/angular.js",
"src/scripts/directives.js",
"src/scripts/directives/icon.js",
"src/scripts/directives/link-to.js",
"src/scripts/directives/new-tab.js",
"src/scripts/directives/switch.js",
"src/scripts/filters.js",
"src/scripts/main/controller.js",
"src/scripts/module.js",
"src/scripts/modules/bsClients.js",
"src/scripts/modules/bsDisconnect.js",
"src/scripts/modules/bsHistory.js",
"src/scripts/modules/bsNotify.js",
"src/scripts/modules/bsSocket.js",
"src/scripts/modules/bsStore.js",
"src/scripts/services/Options.js",
"src/scripts/services/Pages.js",
"src/scripts/utils.js"
],
"names": [],
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC
"file": "generated.js",
"sourceRoot": "",
"sourcesContent": [
"(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})",
"require('angular');\nrequire('angular-route');\nrequire('angular-sanitize');\nrequire('angular-touch');\n\nvar angular = window.angular;\n\nangular\n .module(\"BrowserSync\", [\n \"bsHistory\",\n \"bsClients\",\n \"bsDisconnect\",\n \"bsNotify\",\n \"bsSocket\",\n \"bsStore\",\n \"ngRoute\",\n \"ngTouch\",\n \"ngSanitize\"\n ])\n .config([\"$locationProvider\", Config]);\n\n/**\n * @constructor\n * @param $locationProvider\n */\nfunction Config($locationProvider) {\n $locationProvider.html5Mode({\n enabled: true,\n requireBase: false\n });\n}\n\n\n/**\n * Modules\n * @type {exports}\n */\n/* jshint ignore:start */\nvar discon = require(\"./modules/bsDisconnect\");\nvar notify = require(\"./modules/bsNotify\");\nvar history = require(\"./modules/bsHistory\");\nvar clients = require(\"./modules/bsClients\");\nvar socket = require(\"./modules/bsSocket\");\nvar app = require(\"./services/Pages\");\nvar options = require(\"./services/Options\");\nvar Store = require(\"./modules/bsStore\");\nvar mainCtrl = require(\"./main/controller\");\nvar filter = require(\"./filters\");\nvar directives = require(\"./directives\");\n/* jshint ignore:end */",
"/**\n * @license AngularJS v1.3.11\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, angular, undefined) {'use strict';\n\n/**\n * @ngdoc module\n * @name ngRoute\n * @description\n *\n * # ngRoute\n *\n * The `ngRoute` module provides routing and deeplinking services and directives for angular apps.\n *\n * ## Example\n * See {@link ngRoute.$route#example $route} for an example of configuring and using `ngRoute`.\n *\n *\n * <div doc-module-components=\"ngRoute\"></div>\n */\n /* global -ngRouteModule */\nvar ngRouteModule = angular.module('ngRoute', ['ng']).\n provider('$route', $RouteProvider),\n $routeMinErr = angular.$$minErr('ngRoute');\n\n/**\n * @ngdoc provider\n * @name $routeProvider\n *\n * @description\n *\n * Used for configuring routes.\n *\n * ## Example\n * See {@link ngRoute.$route#example $route} for an example of configuring and using `ngRoute`.\n *\n * ## Dependencies\n * Requires the {@link ngRoute `ngRoute`} module to be installed.\n */\nfunction $RouteProvider() {\n function inherit(parent, extra) {\n return angular.extend(Object.create(parent), extra);\n }\n\n var routes = {};\n\n /**\n * @ngdoc method\n * @name $routeProvider#when\n *\n * @param {string} path Route path (matched against `$location.path`). If `$location.path`\n * contains redundant trailing slash or is missing one, the route will still match and the\n * `$location.path` will be updated to add or drop the trailing slash to exactly match the\n * route definition.\n *\n * * `path` can contain named groups starting with a colon: e.g. `:name`. All characters up\n * to the next slash are matched and stored in `$routeParams` under the given `name`\n * when the route matches.\n * * `path` can contain named groups starting with a colon and ending with a star:\n * e.g.`:name*`. All characters are eagerly stored in `$routeParams` under the given `name`\n * when the route matches.\n * * `path` can contain optional named groups with a question mark: e.g.`:name?`.\n *\n * For example, routes like `/color/:color/largecode/:largecode*\\/edit` will match\n * `/color/brown/largecode/code/with/slashes/edit` and extract:\n *\n * * `color: brown`\n * * `largecode: code/with/slashes`.\n *\n *\n * @param {Object} route Mapping information to be assigned to `$route.current` on route\n * match.\n *\n * Object properties:\n *\n * - `controller` `{(string|function()=}` Controller fn that should be associated with\n * newly created scope or the name of a {@link angular.Module#controller registered\n * controller} if passed as a string.\n * - `controllerAs` `{string=}` A controller alias name. If present the controller will be\n * published to scope under the `controllerAs` name.\n * - `template` `{string=|function()=}` html template as a string or a function that\n * returns an html template as a string which should be used by {@link\n * ngRoute.directive:ngView ngView} or {@link ng.directive:ngInclude ngInclude} directives.\n * This property takes precedence over `templateUrl`.\n *\n * If `template` is a function, it will be called with the following parameters:\n *\n * - `{Array.<Object>}` - route parameters extracted from the current\n * `$location.path()` by applying the current route\n *\n * - `templateUrl` `{string=|function()=}` path or function that returns a path to an html\n * template that should be used by {@link ngRoute.directive:ngView ngView}.\n *\n * If `templateUrl` is a function, it will be called with the following parameters:\n *\n * - `{Array.<Object>}` - route parameters extracted from the current\n * `$location.path()` by applying the current route\n *\n * - `resolve` - `{Object.<string, function>=}` - An optional map of dependencies which should\n * be injected into th
"/**\n * @license AngularJS v1.3.11\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, angular, undefined) {'use strict';\n\nvar $sanitizeMinErr = angular.$$minErr('$sanitize');\n\n/**\n * @ngdoc module\n * @name ngSanitize\n * @description\n *\n * # ngSanitize\n *\n * The `ngSanitize` module provides functionality to sanitize HTML.\n *\n *\n * <div doc-module-components=\"ngSanitize\"></div>\n *\n * See {@link ngSanitize.$sanitize `$sanitize`} for usage.\n */\n\n/*\n * HTML Parser By Misko Hevery (misko@hevery.com)\n * based on: HTML Parser By John Resig (ejohn.org)\n * Original code by Erik Arvidsson, Mozilla Public License\n * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js\n *\n * // Use like so:\n * htmlParser(htmlString, {\n * start: function(tag, attrs, unary) {},\n * end: function(tag) {},\n * chars: function(text) {},\n * comment: function(text) {}\n * });\n *\n */\n\n\n/**\n * @ngdoc service\n * @name $sanitize\n * @kind function\n *\n * @description\n * The input is sanitized by parsing the HTML into tokens. All safe tokens (from a whitelist) are\n * then serialized back to properly escaped html string. This means that no unsafe input can make\n * it into the returned string, however, since our parser is more strict than a typical browser\n * parser, it's possible that some obscure input, which would be recognized as valid HTML by a\n * browser, won't make it through the sanitizer. The input may also contain SVG markup.\n * The whitelist is configured using the functions `aHrefSanitizationWhitelist` and\n * `imgSrcSanitizationWhitelist` of {@link ng.$compileProvider `$compileProvider`}.\n *\n * @param {string} html HTML input.\n * @returns {string} Sanitized HTML.\n *\n * @example\n <example module=\"sanitizeExample\" deps=\"angular-sanitize.js\">\n <file name=\"index.html\">\n <script>\n angular.module('sanitizeExample', ['ngSanitize'])\n .controller('ExampleController', ['$scope', '$sce', function($scope, $sce) {\n $scope.snippet =\n '<p style=\"color:blue\">an html\\n' +\n '<em onmouseover=\"this.textContent=\\'PWN3D!\\'\">click here</em>\\n' +\n 'snippet</p>';\n $scope.deliberatelyTrustDangerousSnippet = function() {\n return $sce.trustAsHtml($scope.snippet);\n };\n }]);\n </script>\n <div ng-controller=\"ExampleController\">\n Snippet: <textarea ng-model=\"snippet\" cols=\"60\" rows=\"3\"></textarea>\n <table>\n <tr>\n <td>Directive</td>\n <td>How</td>\n <td>Source</td>\n <td>Rendered</td>\n </tr>\n <tr id=\"bind-html-with-sanitize\">\n <td>ng-bind-html</td>\n <td>Automatically uses $sanitize</td>\n <td><pre>&lt;div ng-bind-html=\"snippet\"&gt;<br/>&lt;/div&gt;</pre></td>\n <td><div ng-bind-html=\"snippet\"></div></td>\n </tr>\n <tr id=\"bind-html-with-trust\">\n <td>ng-bind-html</td>\n <td>Bypass $sanitize by explicitly trusting the dangerous value</td>\n <td>\n <pre>&lt;div ng-bind-html=\"deliberatelyTrustDangerousSnippet()\"&gt;\n&lt;/div&gt;</pre>\n </td>\n <td><div ng-bind-html=\"deliberatelyTrustDangerousSnippet()\"></div></td>\n </tr>\n <tr id=\"bind-default\">\n <td>ng-bind</td>\n <td>Automatically escapes</td>\n <td><pre>&lt;div ng-bind=\"snippet\"&gt;<br/>&lt;/div&gt;</pre></td>\n <td><div ng-bind=\"snippet\"></div></td>\n </tr>\n </table>\n </div>\n </file>\n <file name=\"protractor.js\" type=\"protractor\">\n it('should sanitize the html snippet by default', function() {\n expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()).\n toBe('<p>an html\\n<em>click here</em>\\nsnippet</p>');\n });\n\n it('should inline raw snippet if bound to a trusted value', function() {
"/**\n * @license AngularJS v1.3.11\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, angular, undefined) {'use strict';\n\n/**\n * @ngdoc module\n * @name ngTouch\n * @description\n *\n * # ngTouch\n *\n * The `ngTouch` module provides touch events and other helpers for touch-enabled devices.\n * The implementation is based on jQuery Mobile touch event handling\n * ([jquerymobile.com](http://jquerymobile.com/)).\n *\n *\n * See {@link ngTouch.$swipe `$swipe`} for usage.\n *\n * <div doc-module-components=\"ngTouch\"></div>\n *\n */\n\n// define ngTouch module\n/* global -ngTouch */\nvar ngTouch = angular.module('ngTouch', []);\n\n/* global ngTouch: false */\n\n /**\n * @ngdoc service\n * @name $swipe\n *\n * @description\n * The `$swipe` service is a service that abstracts the messier details of hold-and-drag swipe\n * behavior, to make implementing swipe-related directives more convenient.\n *\n * Requires the {@link ngTouch `ngTouch`} module to be installed.\n *\n * `$swipe` is used by the `ngSwipeLeft` and `ngSwipeRight` directives in `ngTouch`, and by\n * `ngCarousel` in a separate component.\n *\n * # Usage\n * The `$swipe` service is an object with a single method: `bind`. `bind` takes an element\n * which is to be watched for swipes, and an object with four handler functions. See the\n * documentation for `bind` below.\n */\n\nngTouch.factory('$swipe', [function() {\n // The total distance in any direction before we make the call on swipe vs. scroll.\n var MOVE_BUFFER_RADIUS = 10;\n\n var POINTER_EVENTS = {\n 'mouse': {\n start: 'mousedown',\n move: 'mousemove',\n end: 'mouseup'\n },\n 'touch': {\n start: 'touchstart',\n move: 'touchmove',\n end: 'touchend',\n cancel: 'touchcancel'\n }\n };\n\n function getCoordinates(event) {\n var touches = event.touches && event.touches.length ? event.touches : [event];\n var e = (event.changedTouches && event.changedTouches[0]) ||\n (event.originalEvent && event.originalEvent.changedTouches &&\n event.originalEvent.changedTouches[0]) ||\n touches[0].originalEvent || touches[0];\n\n return {\n x: e.clientX,\n y: e.clientY\n };\n }\n\n function getEvents(pointerTypes, eventType) {\n var res = [];\n angular.forEach(pointerTypes, function(pointerType) {\n var eventName = POINTER_EVENTS[pointerType][eventType];\n if (eventName) {\n res.push(eventName);\n }\n });\n return res.join(' ');\n }\n\n return {\n /**\n * @ngdoc method\n * @name $swipe#bind\n *\n * @description\n * The main method of `$swipe`. It takes an element to be watched for swipe motions, and an\n * object containing event handlers.\n * The pointer types that should be used can be specified via the optional\n * third argument, which is an array of strings `'mouse'` and `'touch'`. By default,\n * `$swipe` will listen for `mouse` and `touch` events.\n *\n * The four events are `start`, `move`, `end`, and `cancel`. `start`, `move`, and `end`\n * receive as a parameter a coordinates object of the form `{ x: 150, y: 310 }`.\n *\n * `start` is called on either `mousedown` or `touchstart`. After this event, `$swipe` is\n * watching for `touchmove` or `mousemove` events. These events are ignored until the total\n * distance moved in either dimension exceeds a small threshold.\n *\n * Once this threshold is exceeded, either the horizontal or vertical delta is greater.\n * - If the horizontal distance is greater, this is a swipe and `move` and `end` events follow.\n * - If the vertical distance is greater, this is a scroll, and we let the browser take over.\n * A `cancel` event is sent.\n *\n * `move` is called on `mousemove` and `touchmove` after the above logic has determined that\n * a swipe is in progress.\n *\n * `end` is called when a swipe is successfully comple
"/**\n * @license AngularJS v1.3.11\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, document, undefined) {'use strict';\n\n/**\n * @description\n *\n * This object provides a utility for producing rich Error messages within\n * Angular. It can be called as follows:\n *\n * var exampleMinErr = minErr('example');\n * throw exampleMinErr('one', 'This {0} is {1}', foo, bar);\n *\n * The above creates an instance of minErr in the example namespace. The\n * resulting error will have a namespaced error code of example.one. The\n * resulting error will replace {0} with the value of foo, and {1} with the\n * value of bar. The object is not restricted in the number of arguments it can\n * take.\n *\n * If fewer arguments are specified than necessary for interpolation, the extra\n * interpolation markers will be preserved in the final string.\n *\n * Since data will be parsed statically during a build step, some restrictions\n * are applied with respect to how minErr instances are created and called.\n * Instances should have names of the form namespaceMinErr for a minErr created\n * using minErr('namespace') . Error codes, namespaces and template strings\n * should all be static strings, not variables or general expressions.\n *\n * @param {string} module The namespace to use for the new minErr instance.\n * @param {function} ErrorConstructor Custom error constructor to be instantiated when returning\n * error from returned function, for cases when a particular type of error is useful.\n * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance\n */\n\nfunction minErr(module, ErrorConstructor) {\n ErrorConstructor = ErrorConstructor || Error;\n return function() {\n var code = arguments[0],\n prefix = '[' + (module ? module + ':' : '') + code + '] ',\n template = arguments[1],\n templateArgs = arguments,\n\n message, i;\n\n message = prefix + template.replace(/\\{\\d+\\}/g, function(match) {\n var index = +match.slice(1, -1), arg;\n\n if (index + 2 < templateArgs.length) {\n return toDebugString(templateArgs[index + 2]);\n }\n return match;\n });\n\n message = message + '\\nhttp://errors.angularjs.org/1.3.11/' +\n (module ? module + '/' : '') + code;\n for (i = 2; i < arguments.length; i++) {\n message = message + (i == 2 ? '?' : '&') + 'p' + (i - 2) + '=' +\n encodeURIComponent(toDebugString(arguments[i]));\n }\n return new ErrorConstructor(message);\n };\n}\n\n/* We need to tell jshint what variables are being exported */\n/* global angular: true,\n msie: true,\n jqLite: true,\n jQuery: true,\n slice: true,\n splice: true,\n push: true,\n toString: true,\n ngMinErr: true,\n angularModule: true,\n uid: true,\n REGEX_STRING_REGEXP: true,\n VALIDITY_STATE_PROPERTY: true,\n\n lowercase: true,\n uppercase: true,\n manualLowercase: true,\n manualUppercase: true,\n nodeName_: true,\n isArrayLike: true,\n forEach: true,\n sortedKeys: true,\n forEachSorted: true,\n reverseParams: true,\n nextUid: true,\n setHashKey: true,\n extend: true,\n int: true,\n inherit: true,\n noop: true,\n identity: true,\n valueFn: true,\n isUndefined: true,\n isDefined: true,\n isObject: true,\n isString: true,\n isNumber: true,\n isDate: true,\n isArray: true,\n isFunction: true,\n isRegExp: true,\n isWindow: true,\n isScope: true,\n isFile: true,\n isFormData: true,\n isBlob: true,\n isBoolean: true,\n isPromiseLike: true,\n trim: true,\n escapeForRegexp: true,\n isElement: true,\n makeMap: true,\n includes: true,\n arrayRemove: true,\n copy: true,\n shallowCopy: true,\n equals: true,\n csp: true,\n concat: true,\n sliceArgs: true,\n bind: true,\n toJsonReplacer: true,\n toJson: true,\n fromJson: true,\n startingTag: true,\n tryDecodeURIComponent: true,\n parseKeyValue: true,\n toKeyValue: true,\n encodeUriSegment: true,\n encodeUriQuery: true,\n angularInit: true,\n bootstrap: true,\n getTestability: true,\n snake
"(function (root, factory){\n 'use strict';\n\n /*istanbul ignore next:cant test*/\n if (typeof module === 'object' && typeof module.exports === 'object') {\n module.exports = factory();\n } else if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define([], factory);\n } else {\n // Browser globals\n root.objectPath = factory();\n }\n})(this, function(){\n 'use strict';\n\n var\n toStr = Object.prototype.toString,\n _hasOwnProperty = Object.prototype.hasOwnProperty;\n\n function isEmpty(value){\n if (!value) {\n return true;\n }\n if (isArray(value) && value.length === 0) {\n return true;\n } else if (!isString(value)) {\n for (var i in value) {\n if (_hasOwnProperty.call(value, i)) {\n return false;\n }\n }\n return true;\n }\n return false;\n }\n\n function toString(type){\n return toStr.call(type);\n }\n\n function isNumber(value){\n return typeof value === 'number' || toString(value) === \"[object Number]\";\n }\n\n function isString(obj){\n return typeof obj === 'string' || toString(obj) === \"[object String]\";\n }\n\n function isObject(obj){\n return typeof obj === 'object' && toString(obj) === \"[object Object]\";\n }\n\n function isArray(obj){\n return typeof obj === 'object' && typeof obj.length === 'number' && toString(obj) === '[object Array]';\n }\n\n function isBoolean(obj){\n return typeof obj === 'boolean' || toString(obj) === '[object Boolean]';\n }\n\n function getKey(key){\n var intKey = parseInt(key);\n if (intKey.toString() === key) {\n return intKey;\n }\n return key;\n }\n\n function set(obj, path, value, doNotReplace){\n if (isNumber(path)) {\n path = [path];\n }\n if (isEmpty(path)) {\n return obj;\n }\n if (isString(path)) {\n return set(obj, path.split('.').map(getKey), value, doNotReplace);\n }\n var currentPath = path[0];\n\n if (path.length === 1) {\n var oldVal = obj[currentPath];\n if (oldVal === void 0 || !doNotReplace) {\n obj[currentPath] = value;\n }\n return oldVal;\n }\n\n if (obj[currentPath] === void 0) {\n //check if we assume an array\n if(isNumber(path[1])) {\n obj[currentPath] = [];\n } else {\n obj[currentPath] = {};\n }\n }\n\n return set(obj[currentPath], path.slice(1), value, doNotReplace);\n }\n\n function del(obj, path) {\n if (isNumber(path)) {\n path = [path];\n }\n\n if (isEmpty(obj)) {\n return void 0;\n }\n\n if (isEmpty(path)) {\n return obj;\n }\n if(isString(path)) {\n return del(obj, path.split('.'));\n }\n\n var currentPath = getKey(path[0]);\n var oldVal = obj[currentPath];\n\n if(path.length === 1) {\n if (oldVal !== void 0) {\n if (isArray(obj)) {\n obj.splice(currentPath, 1);\n } else {\n delete obj[currentPath];\n }\n }\n } else {\n if (obj[currentPath] !== void 0) {\n return del(obj[currentPath], path.slice(1));\n }\n }\n\n return obj;\n }\n\n var objectPath = function(obj) {\n return Object.keys(objectPath).reduce(function(proxy, prop) {\n if (typeof objectPath[prop] === 'function') {\n proxy[prop] = objectPath[prop].bind(objectPath, obj);\n }\n\n return proxy;\n }, {});\n };\n\n objectPath.has = function (obj, path) {\n if (isEmpty(obj)) {\n return false;\n }\n\n if (isNumber(path)) {\n path = [path];\n } else if (isString(path)) {\n path = path.split('.');\n }\n\n if (isEmpty(path) || path.length === 0) {\n return false;\n }\n\n for (var i = 0; i < path.length; i++) {\n var j = path[i];\n if ((isObject(obj) || isArray(obj)) && _hasOwnProperty.call(obj, j)) {\n obj = obj[j];\n } else {\n return false;\n }\n }\n\n return true;\n };\n\n objectPath.ensureExists = function (obj, path, value)
";(function(win){\n\tvar store = {},\n\t\tdoc = win.document,\n\t\tlocalStorageName = 'localStorage',\n\t\tscriptTag = 'script',\n\t\tstorage\n\n\tstore.disabled = false\n\tstore.version = '1.3.17'\n\tstore.set = function(key, value) {}\n\tstore.get = function(key, defaultVal) {}\n\tstore.has = function(key) { return store.get(key) !== undefined }\n\tstore.remove = function(key) {}\n\tstore.clear = function() {}\n\tstore.transact = function(key, defaultVal, transactionFn) {\n\t\tif (transactionFn == null) {\n\t\t\ttransactionFn = defaultVal\n\t\t\tdefaultVal = null\n\t\t}\n\t\tif (defaultVal == null) {\n\t\t\tdefaultVal = {}\n\t\t}\n\t\tvar val = store.get(key, defaultVal)\n\t\ttransactionFn(val)\n\t\tstore.set(key, val)\n\t}\n\tstore.getAll = function() {}\n\tstore.forEach = function() {}\n\n\tstore.serialize = function(value) {\n\t\treturn JSON.stringify(value)\n\t}\n\tstore.deserialize = function(value) {\n\t\tif (typeof value != 'string') { return undefined }\n\t\ttry { return JSON.parse(value) }\n\t\tcatch(e) { return value || undefined }\n\t}\n\n\t// Functions to encapsulate questionable FireFox 3.6.13 behavior\n\t// when about.config::dom.storage.enabled === false\n\t// See https://github.com/marcuswestin/store.js/issues#issue/13\n\tfunction isLocalStorageNameSupported() {\n\t\ttry { return (localStorageName in win && win[localStorageName]) }\n\t\tcatch(err) { return false }\n\t}\n\n\tif (isLocalStorageNameSupported()) {\n\t\tstorage = win[localStorageName]\n\t\tstore.set = function(key, val) {\n\t\t\tif (val === undefined) { return store.remove(key) }\n\t\t\tstorage.setItem(key, store.serialize(val))\n\t\t\treturn val\n\t\t}\n\t\tstore.get = function(key, defaultVal) {\n\t\t\tvar val = store.deserialize(storage.getItem(key))\n\t\t\treturn (val === undefined ? defaultVal : val)\n\t\t}\n\t\tstore.remove = function(key) { storage.removeItem(key) }\n\t\tstore.clear = function() { storage.clear() }\n\t\tstore.getAll = function() {\n\t\t\tvar ret = {}\n\t\t\tstore.forEach(function(key, val) {\n\t\t\t\tret[key] = val\n\t\t\t})\n\t\t\treturn ret\n\t\t}\n\t\tstore.forEach = function(callback) {\n\t\t\tfor (var i=0; i<storage.length; i++) {\n\t\t\t\tvar key = storage.key(i)\n\t\t\t\tcallback(key, store.get(key))\n\t\t\t}\n\t\t}\n\t} else if (doc.documentElement.addBehavior) {\n\t\tvar storageOwner,\n\t\t\tstorageContainer\n\t\t// Since #userData storage applies only to specific paths, we need to\n\t\t// somehow link our data to a specific path. We choose /favicon.ico\n\t\t// as a pretty safe option, since all browsers already make a request to\n\t\t// this URL anyway and being a 404 will not hurt us here. We wrap an\n\t\t// iframe pointing to the favicon in an ActiveXObject(htmlfile) object\n\t\t// (see: http://msdn.microsoft.com/en-us/library/aa752574(v=VS.85).aspx)\n\t\t// since the iframe access rules appear to allow direct access and\n\t\t// manipulation of the document element, even for a 404 page. This\n\t\t// document can be used instead of the current document (which would\n\t\t// have been limited to the current path) to perform #userData storage.\n\t\ttry {\n\t\t\tstorageContainer = new ActiveXObject('htmlfile')\n\t\t\tstorageContainer.open()\n\t\t\tstorageContainer.write('<'+scriptTag+'>document.w=window</'+scriptTag+'><iframe src=\"/favicon.ico\"></iframe>')\n\t\t\tstorageContainer.close()\n\t\t\tstorageOwner = storageContainer.w.frames[0].document\n\t\t\tstorage = storageOwner.createElement('div')\n\t\t} catch(e) {\n\t\t\t// somehow ActiveXObject instantiation failed (perhaps some special\n\t\t\t// security settings or otherwse), fall back to per-path storage\n\t\t\tstorage = doc.createElement('div')\n\t\t\tstorageOwner = doc.body\n\t\t}\n\t\tvar withIEStorage = function(storeFunction) {\n\t\t\treturn function() {\n\t\t\t\tvar args = Array.prototype.slice.call(arguments, 0)\n\t\t\t\targs.unshift(storage)\n\t\t\t\t// See http://msdn.microsoft.com/en-us/library/ms531081(v=VS.85).aspx\n\t\t\t\t// and http://msdn.microsoft.com/en-us/library/ms531424(v=VS.85).aspx\n\t\t\t\tstorageOwner.appendChild(storage)\
"/**\n * @type {angular}\n */\nmodule.exports = window.angular;\n",
"var module = require(\"./module\"); //jshint ignore:line\n\nmodule.directive(\"icon\", require(\"./directives/icon\"));\nmodule.directive(\"linkTo\", require(\"./directives/link-to\"));\nmodule.directive(\"switch\", require(\"./directives/switch\"));\nmodule.directive(\"newTab\", require(\"./directives/new-tab\"));",
"module.exports = function () {\n return {\n scope: {\n icon: \"@\"\n },\n restrict: \"E\",\n replace: true,\n template: \"<svg bs-svg-icon><use xlink:href=\\\"{{iconName}}\\\"></use></svg>\",\n link: function (scope, elem, attrs) {\n scope.iconName = \"#svg-\" + scope.icon;\n return scope;\n }\n };\n};",
"module.exports = function () {\n return {\n restrict: \"E\",\n replace: false,\n transclude: true,\n scope: {\n \"path\": \"@\"\n },\n template: \"<a href='#' ng-click='navi(path)' ng-transclude=''>as</a>\",\n controller: [\"$scope\", \"$location\", \"$injector\", function ($scope, $location, $injector) {\n\n var pages = $injector.get(\"pagesConfig\");\n var Pages = $injector.get(\"Pages\");\n\n $scope.navi = function (path) {\n var item = pages[path];\n Pages.enable(item);\n $location.path(path);\n };\n }]\n };\n};",
"module.exports = function () {\n return {\n scope: {\n url: \"@\",\n mode: \"@\"\n },\n restrict: \"E\",\n replace: true,\n template: '<a href=\"{{url}}\" bs-button=\"subtle-alt icon\" target=\"_blank\" title=\"Open a new tab\" ng-show=\"mode !== \\'snippet\\'\"><icon icon=\"newtab\"></icon> New Tab </a>' //jshint:ignore\n };\n};",
"module.exports = function () {\n return {\n scope: {\n toggle: \"&\",\n item: \"=\",\n switchid: \"@\",\n title: \"@\",\n tagline: \"@\",\n active: \"=\",\n prop: \"@\"\n },\n restrict: \"E\",\n replace: true,\n transclude: true,\n templateUrl: \"bs-switch.html\",\n controllerAs: \"ctrl\",\n controller: [\"$scope\", function ($scope) {\n var ctrl = this;\n ctrl.item = $scope.item;\n }]\n };\n};",
"var module = require(\"./module\"); //jshint ignore:line\nvar utils = require(\"./utils\"); //jshint ignore:line\n\nmodule\n .filter(\"ucfirst\", function () { return utils.ucfirst; })\n .filter(\"localRootUrl\", function () { return utils.localRootUrl; })\n .filter(\"localUrl\", function () { return utils.localRootUrl; })\n .filter(\"orderObjectBy\", function () { return utils.orderObjectBy; });",
"var app = require(\"../module\");\n\napp.controller(\"MainController\", [\n \"$scope\",\n \"$rootScope\",\n \"$location\",\n \"$injector\",\n MainController\n]);\n\n\n/**\n * @param $scope\n * @param $rootScope\n * @param $location\n * @param $injector\n * @constructor\n */\nfunction MainController ($scope, $rootScope, $location, $injector) {\n\n var ctrl = this;\n ctrl.options = false;\n ctrl.browsers = [];\n ctrl.socketId = \"\";\n\n var pagesConfig = $injector.get(\"pagesConfig\");\n var Pages = $injector.get(\"Pages\");\n var Socket = $injector.get(\"Socket\");\n var Clients = $injector.get(\"Clients\");\n\n ctrl.ui = {\n menu: pagesConfig,\n sectionMenu: false,\n disconnected: false\n };\n\n /**\n * @param $section\n */\n ctrl.setActiveSection = function ($section) {\n Pages.enable($section);\n $location.path($section.path);\n ctrl.ui.sectionMenu = false;\n };\n\n /**\n * Refresh all event\n */\n ctrl.reloadAll = function () {\n Clients.reloadAll();\n $rootScope.$emit(\"notify:flash\", {\n heading: \"Instruction sent:\",\n message: \"Reload All Browsers ✔\"\n });\n };\n\n /**\n * @param value\n */\n ctrl.scrollAllTo = function () {\n Clients.scrollAllTo(0);\n $rootScope.$emit(\"notify:flash\", {\n heading: \"Instruction sent:\",\n message: \"Scroll all browsers to Y=0 ✔\"\n });\n };\n\n /**\n * Emit the socket event\n */\n ctrl.sendAllTo = function (path) {\n Clients.sendAllTo(path);\n $rootScope.$emit(\"notify:flash\", {\n heading: \"Instruction sent:\",\n message: \"Reset all Browsers to /\"\n });\n };\n\n /**\n *\n */\n ctrl.toggleMenu = function () {\n ctrl.ui.sectionMenu = !ctrl.ui.sectionMenu;\n };\n\n /**\n * @type {{connection: connection, addBrowsers: addBrowsers}}\n */\n ctrl.socketEvents = {\n\n /**\n * @param options\n */\n connection: function (options) {\n ctrl.update(options);\n },\n /**\n *\n */\n disconnect: function () {\n ctrl.ui.disconnected = true;\n }\n };\n\n /**\n * Update the current $scope\n */\n ctrl.update = function (options) {\n\n ctrl.options = transformOptions(options);\n ctrl.ui.disconnected = false;\n\n Pages.transform(pagesConfig[\"overview\"], function ($section) {\n return $section;\n });\n };\n\n /**\n * Set the currently active page\n */\n ctrl.setActiveSection(Pages.current());\n\n /**\n * Get options from socket connection\n */\n Socket.options().then(ctrl.socketEvents.connection);\n\n /**\n * React to disconnects\n */\n $rootScope.$on(\"ui:disconnect\", ctrl.socketEvents.disconnect);\n $rootScope.$on(\"ui:connection\", function (evt, options) {\n ctrl.socketEvents.connection(options);\n $scope.$digest();\n });\n}\n\n/**\n * Options transformations\n * @param options\n * @returns {*}\n */\nfunction transformOptions(options) {\n\n options.displayUrl = getDisplayUrl(options.urls);\n\n return options;\n}\n\n/**\n * @param urls\n * @returns {*}\n */\nfunction getDisplayUrl (urls) {\n if (!urls) {\n return false;\n }\n return urls.external || urls.local;\n}",
"/**\n * @type {angular}\n */\nmodule.exports = window.angular.module(\"BrowserSync\");\n",
"(function (angular) {\n\n angular\n .module(\"bsClients\", [\"bsSocket\"])\n .service(\"Clients\", [\"Socket\", ClientsService]);\n\n /**\n * @param Socket\n * @returns {{reloadAll: Function, sendAllTo: Function, scrollAllTo: Function, highlight: Function}}\n * @constructor\n */\n function ClientsService (Socket) {\n\n var api = {\n reloadAll: function () {\n Socket.clientEvent(\"browser:reload\");\n },\n sendAllTo: function (path) {\n Socket.emit(\"ui\", {\n namespace: \"history\",\n event: \"sendAllTo\",\n data: {\n path: path\n }\n });\n },\n scrollAllTo: function () {\n Socket.clientEvent(\"scroll\", {\n position: {\n raw: 0,\n proportional: 0\n },\n override: true\n });\n },\n highlight: function (connection) {\n Socket.emit(\"ui:highlight\", connection);\n }\n };\n\n return api;\n }\n\n})(angular);\n\n",
"(function () {\n\n angular\n .module(\"bsDisconnect\", [])\n .directive(\"disconnectElem\", function () {\n return {\n restrict: \"E\",\n scope: {},\n template: '<section bs-overlay ng-class=\"{\\'active\\': ui.visible}\">\\n <p><icon icon=\"block\"></icon></p>\\n <h1>{{ui.heading}} {{ui.message}}</h1>\\n <p>Possible reasons are:</p>\\n <ul bs-list>\\n <li>1. Your process was exited by another tool</li>\\n </ul>\\n <p>You should check your terminal window to see what happened. <br/>(Or simply try reloading this page.)</p>\\n</section>', // jshint:ignore\n controller: [\"$scope\", \"$rootScope\", \"$window\", disconnectController]\n };\n });\n\n /**\n * Disconnect\n * @param $scope\n * @param $rootScope\n * @param $window\n */\n function disconnectController ($scope, $rootScope, $window) {\n\n /**\n * Default settings\n */\n const DEFAULT_HEADING = \"BrowserSync\";\n const DEFAULT_MESSAGE = \"Disconnected\";\n\n $scope._disconnected = false;\n\n /**\n * Default state\n * @type {{visible: boolean, status: string, heading: string, text: string}}\n */\n $scope.ui = {\n visible: false,\n heading: DEFAULT_HEADING,\n message: DEFAULT_MESSAGE\n };\n\n /**\n * @type {{connection: Function, disconnect: Function}}\n */\n $scope.socketEvents = {\n connection: function () {\n if ($scope._disconnected) {\n $window.location.reload(true);\n }\n $scope.ui.visible = false;\n $scope.$digest();\n },\n disconnect: function () {\n $scope._disconnected = true;\n $scope.ui.visible = true;\n $scope.$digest();\n }\n };\n\n $rootScope.$on(\"ui:connection\", $scope.socketEvents.connection);\n $rootScope.$on(\"ui:disconnect\", $scope.socketEvents.disconnect);\n }\n\n})(angular);\n\n",
"(function (angular) {\n\n angular\n .module(\"bsHistory\", [\"bsSocket\"])\n .service(\"History\", [\"Socket\", HistoryService]);\n\n function HistoryService (Socket) {\n\n var visited = [];\n var updateStack = [];\n\n /**\n * Add a single socket event and call all callbacks listening to it.\n */\n Socket.on(\"ui:history:update\", function (items) {\n updateStack.forEach(function (fn) {\n fn(items);\n });\n });\n\n return {\n visited: visited,\n updateHistory: function (urls) {\n visited = urls;\n },\n get: function () {\n return Socket.getData(\"visited\");\n },\n remove: function (data) {\n Socket.emit(\"ui\", {\n namespace: \"history\",\n event: \"remove\",\n data: data\n });\n },\n clear: function () {\n Socket.emit(\"ui\", {\n namespace: \"history\",\n event: \"clear\"\n });\n },\n on: function (event, fn) {\n updateStack.push(fn);\n },\n off: function (fn) {\n var index = updateStack.indexOf(fn);\n if (index > -1) {\n updateStack = updateStack.splice(index, 1);\n }\n }\n };\n }\n\n})(angular);\n\n",
"(function (angular) {\n\n angular\n .module('bsNotify', [])\n .directive(\"notifyElem\", function () {\n return {\n restrict: \"E\",\n scope: {},\n template: \"<div bs-notify ng-class=\\\"{\\'active\\': ui.visible}\\\">\\n <p class=\\\"notification__text\\\">{{ui.heading}} <span class=\\\"color--lime\\\">{{ui.message}}</span></p>\\n</div>\",\n controller: [\"$scope\", \"$rootScope\", notifyController]\n };\n });\n\n /**\n * Notify\n * @param $scope\n * @param $rootScope\n */\n function notifyController ($scope, $rootScope) {\n\n /**\n * Default settings\n */\n var DEFAULT_STATUS = \"info\";\n var DEFAULT_HEADING = \"BrowserSync:\";\n var DEFAULT_MESSAGE = \"Welcome to BrowserSync\";\n var DEFAULT_TIMEOUT = 2000;\n\n /**\n * Default state\n * @type {{visible: boolean, status: string, heading: string, text: string}}\n */\n $scope.ui = {\n status: DEFAULT_STATUS,\n heading: DEFAULT_HEADING,\n message: DEFAULT_MESSAGE\n };\n\n /**\n * @param evt\n * @param data\n */\n $scope.show = function (evt, data) {\n\n data = data || {};\n\n /**\n *\n * Clear any previous timers\n *\n */\n if ($scope._timer) {\n clearTimeout($scope._timer);\n }\n\n /**\n *\n * Set a reset timer\n *\n */\n $scope._timer = window.setTimeout($scope.reset, data.timeout || DEFAULT_TIMEOUT);\n\n /**\n *\n * Set UI flags\n *\n */\n $scope.ui.visible = true;\n $scope.ui.status = data.status || DEFAULT_STATUS;\n $scope.ui.heading = data.heading || DEFAULT_HEADING;\n $scope.ui.message = data.message || DEFAULT_HEADING;\n };\n\n /**\n * Reset the UI\n */\n $scope.reset = function () {\n $scope.ui.visible = false;\n $scope.$digest();\n };\n\n /**\n * Listen to events on the $rootScope\n */\n $rootScope.$on(\"notify:flash\", $scope.show);\n }\n})(angular);",
"(function (angular, browserSyncSocket) {\n\n /**\n * @type {{emit: emit, on: on}}\n */\n var socket = browserSyncSocket || {\n\n emit: function () {},\n on: function () {},\n removeListener: function () {}\n };\n\n angular\n .module(\"bsSocket\", [])\n .service(\"Socket\", [\"$q\", \"$rootScope\", SocketService]);\n\n function SocketService ($q, $rootScope) {\n\n var deferred = $q.defer();\n var session;\n\n socket.on(\"connection\", function (out) {\n session = out.session;\n $rootScope.$emit(\"ui:connection\", out);\n\n deferred.resolve(out, this);\n\n if (window.name === '') {\n window.name = JSON.stringify({id: socket.id});\n } else {\n var prev = JSON.parse(window.name);\n //console.log(prev, socket);\n if (prev.id !== socket.id) {\n //console.log('new session');\n } else {\n //console.log('page reload');\n }\n //console.log(JSON.parse(window.name));\n }\n });\n\n socket.on(\"disconnect\", function () {\n $rootScope.$emit(\"ui:disconnect\");\n });\n\n var publicApi = {\n on: function (name, callback) {\n socket.on(name, callback);\n },\n off: function (name, callback) {\n socket.off(name, callback);\n },\n removeEvent: function (name, callback) {\n socket.removeListener(name, callback);\n },\n emit: function (name, data) {\n socket.emit(name, data || {});\n },\n /**\n * Proxy client events\n * @param name\n * @param data\n */\n clientEvent: function (name, data) {\n socket.emit(\"ui:client:proxy\", {\n event: name,\n data: data\n });\n },\n options: function () {\n return deferred.promise;\n },\n getData: function (name) {\n var deferred = $q.defer();\n socket.on(\"ui:receive:\" + name, function (data) {\n deferred.resolve(data);\n });\n socket.emit(\"ui:get:\" + name);\n return deferred.promise;\n },\n uiEvent: function (evt) {\n socket.emit(\"ui\", evt);\n },\n newSession: function () {\n\n }\n };\n\n Object.defineProperty(publicApi, 'sessionId', {\n get: function () {\n return session\n }\n });\n\n return publicApi;\n }\n\n})(angular, window.___browserSync___.socket);\n",
"var angular = require('../angular');\nvar store = require('store');\nvar objectPath = require('object-path');\n\nangular\n .module(\"bsStore\", [])\n .service(\"Store\", [\"$q\", \"$rootScope\", StoreModule]);\n\nfunction Store (ns) {\n var bs = store.get('bs', {});\n if (!Object.keys(bs).length) {\n store.set('bs', {});\n }\n this.ns = ns;\n this.get = function (path) {\n var bs = store.get('bs', {});\n if (!Object.keys(bs).length) {\n store.set('bs', {});\n }\n return objectPath.get(bs, [ns].concat(path).join('.'));\n };\n this.set = function (path, value) {\n var bs = store.get('bs', {});\n if (!Object.keys(bs).length) {\n store.set('bs', {});\n }\n if (!bs[ns]) {\n bs[ns] = {};\n }\n bs[ns][path] = value;\n store.set('bs', bs);\n },\n this.remove = function (path) {\n var bs = store.get('bs', {});\n if (!Object.keys(bs).length) {\n store.set('bs', {});\n }\n if (!bs[ns]) {\n bs[ns] = {};\n }\n if (bs[ns][path]) {\n delete bs[ns][path];\n }\n store.set('bs', bs);\n }\n}\n\nfunction StoreModule () {\n\n return {\n create: function (ns) {\n var store = new Store(ns);\n return store;\n }\n }\n};\n\n",
"var app = require(\"../module\");\n\napp.factory(\"Options\", [\"Socket\", OptionsService]);\n\n/**\n * @param Socket\n * @returns {{all: Function}}\n * @constructor\n */\nfunction OptionsService(Socket) {\n\n return {\n all: function () {\n return Socket.getData(\"options\");\n }\n };\n}",
"/**\n * @type {angular}\n */\nvar app = require(\"../module\");\n\napp.service(\"Pages\", [\"pagesConfig\", \"$location\", ContentSections]);\n\n/**\n * @param pagesConfig\n * @param $location\n * @returns {{enable: Function, transform: Function, current: Function}}\n * @constructor\n */\nfunction ContentSections(pagesConfig, $location) {\n\n return {\n /**\n * Enable a single Item\n * @param $section\n * @returns {*}\n */\n enable: function ($section) {\n angular.forEach(pagesConfig, function (item) {\n item.active = false;\n });\n $section.active = true;\n return pagesConfig;\n },\n /**\n * Transform an item\n */\n transform: function ($section, fn) {\n if (typeof fn === \"function\") {\n return $section = fn($section);\n } else {\n throw new TypeError(\"Noooo\");\n }\n },\n /**\n * Get the current section based on the path\n * @returns {*}\n */\n current: function () {\n if ($location.path() === \"/\") {\n return pagesConfig[\"overview\"];\n }\n var match;\n angular.forEach(pagesConfig, function (item) {\n if (item.path === $location.path()) {\n match = item;\n }\n });\n return match;\n }\n };\n}",
"module.exports = {\n ucfirst: function (string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n },\n localRootUrl: function (port, scheme) {\n return [scheme, \"://\", window.location.hostname, \":\", port].join(\"\");\n },\n localUrl: function(path, port, mode) {\n if (mode === \"snippet\") {\n return path;\n }\n return [\"//\", window.location.hostname, \":\", port, path].join(\"\");\n },\n orderObjectBy: function (items, field, reverse) {\n var filtered = [];\n Object.keys(items).forEach(function(key) {\n filtered.push(items[key]);\n });\n filtered.sort(function (a, b) {\n return (a[field] > b[field] ? 1 : -1);\n });\n if (reverse) {\n filtered.reverse();\n }\n return filtered;\n }\n};"
]
}