Socket
Socket
Sign inDemoInstall

@angular/upgrade

Package Overview
Dependencies
Maintainers
1
Versions
838
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angular/upgrade - npm Package Compare versions

Comparing version 4.0.0-rc.2 to 4.0.0-rc.3

typings/src/static/angular1_providers.d.ts

462

@angular/upgrade/static.es5.js

@@ -1,6 +0,8 @@

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
import { SimpleChange, ReflectiveInjector, EventEmitter, Testability, ComponentFactoryResolver, Version, NgModule, NgZone, Injector } from '@angular/core';
/**
* @license Angular v4.0.0-rc.3
* (c) 2010-2017 Google, Inc. https://angular.io/
* License: MIT
*/
import { SimpleChange, ReflectiveInjector, EventEmitter, ɵlooseIdentical, Testability, ComponentFactoryResolver, Version, NgModule, NgZone, Injector } from '@angular/core';
/**
* @license

@@ -18,3 +20,3 @@ * Copyright Google Inc. All Rights Reserved.

* found in the LICENSE file at https://angular.io/license
*/var $COMPILE = '$compile';
*/ var $COMPILE = '$compile';
var $CONTROLLER = '$controller';

@@ -33,3 +35,2 @@ var $DELEGATE = '$delegate';

var UPGRADE_MODULE_NAME = '$$UpgradeModule';
/**

@@ -48,3 +49,3 @@ * @license

*/
var PropertyBinding = function () {
var PropertyBinding = (function () {
function PropertyBinding(binding) {

@@ -67,4 +68,3 @@ this.binding = binding;

return PropertyBinding;
}();
}());
/**

@@ -77,4 +77,5 @@ * @license

*/
var ContentProjectionHelper = function () {
function ContentProjectionHelper() {}
var ContentProjectionHelper = (function () {
function ContentProjectionHelper() {
}
ContentProjectionHelper.prototype.groupProjectableNodes = function ($injector, component, nodes) {

@@ -86,4 +87,3 @@ // By default, do not support multi-slot projection,

return ContentProjectionHelper;
}();
}());
function controllerKey(name) {

@@ -102,3 +102,4 @@ return '$' + name + 'Controller';

function supportsNgModel(component) {
return typeof component.writeValue === 'function' && typeof component.registerOnChange === 'function';
return typeof component.writeValue === 'function' &&
typeof component.registerOnChange === 'function';
}

@@ -111,13 +112,10 @@ /**

if (ngModel && supportsNgModel(component)) {
ngModel.$render = function () {
component.writeValue(ngModel.$viewValue);
};
ngModel.$render = function () { component.writeValue(ngModel.$viewValue); };
component.registerOnChange(ngModel.$setViewValue.bind(ngModel));
}
}
var INITIAL_VALUE = {
__UNINITIALIZED__: true
};
var DowngradeComponentAdapter = function () {
var DowngradeComponentAdapter = (function () {
function DowngradeComponentAdapter(id, info, element, attrs, scope, ngModel, parentInjector, $injector, $compile, $parse, componentFactory) {

@@ -149,5 +147,3 @@ this.id = id;

var projectableNodes = projectionHelper.groupProjectableNodes(this.$injector, this.info.component, this.element.contents());
var linkFns = projectableNodes.map(function (nodes) {
return _this.$compile(nodes);
});
var linkFns = projectableNodes.map(function (nodes) { return _this.$compile(nodes); });
this.element.empty();

@@ -164,3 +160,4 @@ linkFns.forEach(function (linkFn) {

var childInjector = ReflectiveInjector.resolveAndCreate([{ provide: $SCOPE, useValue: this.componentScope }], this.parentInjector);
this.componentRef = this.componentFactory.create(childInjector, projectableNodes, this.element[0]);
this.componentRef =
this.componentFactory.create(childInjector, projectableNodes, this.element[0]);
this.changeDetector = this.componentRef.changeDetectorRef;

@@ -178,3 +175,3 @@ this.component = this.componentRef.instance;

if (attrs.hasOwnProperty(input.attr)) {
var observeFn = function (prop) {
var observeFn = (function (prop) {
var prevValue = INITIAL_VALUE;

@@ -188,19 +185,23 @@ return function (currValue) {

};
}(input.prop);
})(input.prop);
attrs.$observe(input.attr, observeFn);
} else if (attrs.hasOwnProperty(input.bindAttr)) {
}
else if (attrs.hasOwnProperty(input.bindAttr)) {
expr = attrs /** TODO #9100 */[input.bindAttr];
} else if (attrs.hasOwnProperty(input.bracketAttr)) {
}
else if (attrs.hasOwnProperty(input.bracketAttr)) {
expr = attrs /** TODO #9100 */[input.bracketAttr];
} else if (attrs.hasOwnProperty(input.bindonAttr)) {
}
else if (attrs.hasOwnProperty(input.bindonAttr)) {
expr = attrs /** TODO #9100 */[input.bindonAttr];
} else if (attrs.hasOwnProperty(input.bracketParenAttr)) {
}
else if (attrs.hasOwnProperty(input.bracketParenAttr)) {
expr = attrs /** TODO #9100 */[input.bracketParenAttr];
}
if (expr != null) {
var watchFn = function (prop) {
var watchFn = (function (prop) {
return function (currValue, prevValue) {
return _this.updateInput(prop, prevValue, currValue);
};
}(input.prop);
})(input.prop);
this.componentScope.$watch(expr, watchFn);

@@ -213,5 +214,3 @@ }

this.inputChanges = {};
this.componentScope.$watch(function () {
return _this.inputChangeCount;
}, function () {
this.componentScope.$watch(function () { return _this.inputChangeCount; }, function () {
var inputChanges = _this.inputChanges;

@@ -222,5 +221,3 @@ _this.inputChanges = {};

}
this.componentScope.$watch(function () {
return _this.changeDetector && _this.changeDetector.detectChanges();
});
this.componentScope.$watch(function () { return _this.changeDetector && _this.changeDetector.detectChanges(); });
};

@@ -236,11 +233,16 @@ DowngradeComponentAdapter.prototype.setupOutputs = function () {

var bindonAttr = output.bindonAttr ? output.bindonAttr.substring(0, output.bindonAttr.length - 6) : null;
var bracketParenAttr = output.bracketParenAttr ? "[(" + output.bracketParenAttr.substring(2, output.bracketParenAttr.length - 8) + ")]" : null;
var bracketParenAttr = output.bracketParenAttr ?
"[(" + output.bracketParenAttr.substring(2, output.bracketParenAttr.length - 8) + ")]" :
null;
if (attrs.hasOwnProperty(output.onAttr)) {
expr = attrs /** TODO #9100 */[output.onAttr];
} else if (attrs.hasOwnProperty(output.parenAttr)) {
}
else if (attrs.hasOwnProperty(output.parenAttr)) {
expr = attrs /** TODO #9100 */[output.parenAttr];
} else if (attrs.hasOwnProperty(bindonAttr)) {
}
else if (attrs.hasOwnProperty(bindonAttr)) {
expr = attrs /** TODO #9100 */[bindonAttr];
assignExpr = true;
} else if (attrs.hasOwnProperty(bracketParenAttr)) {
}
else if (attrs.hasOwnProperty(bracketParenAttr)) {
expr = attrs /** TODO #9100 */[bracketParenAttr];

@@ -258,13 +260,12 @@ assignExpr = true;

emitter.subscribe({
next: assignExpr ? function (setter) {
return function (v /** TODO #9100 */) {
return setter(_this.scope, v);
};
}(setter) : function (getter) {
return function (v /** TODO #9100 */) {
return getter(_this.scope, { $event: v });
};
}(getter)
next: assignExpr ?
(function (setter) { return function (v /** TODO #9100 */) { return setter(_this.scope, v); }; })(setter) :
(function (getter) {
return function (v /** TODO #9100 */) {
return getter(_this.scope, { $event: v });
};
})(getter)
});
} else {
}
else {
throw new Error("Missing emitter '" + output.prop + "' on component '" + getComponentName(this.info.component) + "'!");

@@ -282,5 +283,3 @@ }

};
DowngradeComponentAdapter.prototype.getInjector = function () {
return this.componentRef && this.componentRef.injector;
};
DowngradeComponentAdapter.prototype.getInjector = function () { return this.componentRef && this.componentRef.injector; };
DowngradeComponentAdapter.prototype.updateInput = function (prop, prevValue, currValue) {

@@ -294,4 +293,3 @@ if (this.inputChanges) {

return DowngradeComponentAdapter;
}();
}());
var downgradeCount = 0;

@@ -348,3 +346,3 @@ /**

var idCount = 0;
var directiveFactory = function directiveFactory($compile, $injector, $parse) {
var directiveFactory = function ($compile, $injector, $parse) {
return {

@@ -354,3 +352,3 @@ restrict: 'E',

require: [REQUIRE_INJECTOR, REQUIRE_NG_MODEL],
link: function link(scope, element, attrs, required) {
link: function (scope, element, attrs, required) {
// We might have to compile the contents asynchronously, because this might have been

@@ -361,3 +359,3 @@ // triggered by `UpgradeNg1ComponentAdapterBuilder`, before the Angular templates have

var ngModel = required[1];
var downgradeFn = function downgradeFn(injector) {
var downgradeFn = function (injector) {
var componentFactoryResolver = injector.get(ComponentFactoryResolver);

@@ -368,3 +366,3 @@ var componentFactory = componentFactoryResolver.resolveComponentFactory(info.component);

}
var id = idPrefix + idCount++;
var id = idPrefix + (idCount++);
var injectorPromise = new ParentInjectorPromise(element);

@@ -381,3 +379,4 @@ var facade = new DowngradeComponentAdapter(id, info, element, attrs, scope, ngModel, injector, $injector, $compile, $parse, componentFactory);

parentInjector.then(downgradeFn);
} else {
}
else {
downgradeFn(parentInjector);

@@ -396,3 +395,3 @@ }

*/
var ParentInjectorPromise = function () {
var ParentInjectorPromise = (function () {
function ParentInjectorPromise(element) {

@@ -408,3 +407,4 @@ this.element = element;

callback(this.injector);
} else {
}
else {
this.callbacks.push(callback);

@@ -420,10 +420,7 @@ }

// Run the queued callbacks.
this.callbacks.forEach(function (callback) {
return callback(injector);
});
this.callbacks.forEach(function (callback) { return callback(injector); });
this.callbacks.length = 0;
};
return ParentInjectorPromise;
}();
}());
/**

@@ -472,14 +469,10 @@ * @whatItDoes

function downgradeInjectable(token) {
var factory = function factory(i) {
return i.get(token);
};
var factory = function (i) { return i.get(token); };
factory.$inject = [INJECTOR_KEY];
return factory;
}
/**
* @stable
*/
var VERSION = new Version('4.0.0-rc.2');
var VERSION = new Version('4.0.0-rc.3');
/**

@@ -507,12 +500,8 @@ * @license

}
} catch (e) {}
}
catch (e) {
}
var bootstrap = angular.bootstrap;
var module$1 = angular.module;
var element = angular.element;
// JS has NaN !== NaN
function looseIdentical(a, b) {
return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);
}
var REQUIRE_PREFIX_RE = /^(\^\^?)?(\?)?(\^\^?)?/;

@@ -523,3 +512,3 @@ var NOT_SUPPORTED = 'NOT_SUPPORTED';

};
var Bindings = function () {
var Bindings = (function () {
function Bindings() {

@@ -532,3 +521,3 @@ this.twoWayBoundProperties = [];

return Bindings;
}();
}());
/**

@@ -574,3 +563,3 @@ * @whatItDoes

*/
var UpgradeComponent = function () {
var UpgradeComponent = (function () {
/**

@@ -596,4 +585,2 @@ * Create a new `UpgradeComponent` instance. You should not normally need to do this.

this.injector = injector;
this.controllerInstance = null;
this.bindingDestination = null;
this.$injector = injector.get($INJECTOR);

@@ -608,3 +595,2 @@ this.$compile = this.$injector.get($COMPILE);

this.bindings = this.initializeBindings(this.directive);
this.linkFn = this.compileTemplate(this.directive);
// We ask for the AngularJS scope from the Angular injector, since

@@ -616,2 +602,10 @@ // we will put the new component scope onto the new injector for each component

this.$componentScope = $parentScope.$new(!!this.directive.scope);
this.initializeOutputs();
}
UpgradeComponent.prototype.ngOnInit = function () {
var _this = this;
// Collect contents, insert and compile template
var contentChildNodes = this.extractChildNodes(this.element);
var linkFn = this.compileTemplate(this.directive);
// Instantiate controller
var controllerType = this.directive.controller;

@@ -621,12 +615,10 @@ var bindToController = this.directive.bindToController;

this.controllerInstance = this.buildController(controllerType, this.$componentScope, this.$element, this.directive.controllerAs);
} else if (bindToController) {
throw new Error("Upgraded directive '" + name + "' specifies 'bindToController' but no controller.");
}
else if (bindToController) {
throw new Error("Upgraded directive '" + this.directive.name + "' specifies 'bindToController' but no controller.");
}
// Set up outputs
this.bindingDestination = bindToController ? this.controllerInstance : this.$componentScope;
this.setupOutputs();
}
UpgradeComponent.prototype.ngOnInit = function () {
var _this = this;
var attrs = NOT_SUPPORTED;
var transcludeFn = NOT_SUPPORTED;
this.bindOutputs();
// Require other controllers
var directiveRequire = this.getDirectiveRequire(this.directive);

@@ -640,34 +632,34 @@ var requiredControllers = this.resolveRequire(this.directive.name, this.$element, directiveRequire);

}
// Hook: $onChanges
if (this.pendingChanges) {
this.forwardChanges(this.pendingChanges);
this.pendingChanges = null;
}
// Hook: $onInit
if (this.controllerInstance && isFunction(this.controllerInstance.$onInit)) {
this.controllerInstance.$onInit();
}
// Hook: $doCheck
if (this.controllerInstance && isFunction(this.controllerInstance.$doCheck)) {
var callDoCheck = function callDoCheck() {
return _this.controllerInstance.$doCheck();
};
var callDoCheck = function () { return _this.controllerInstance.$doCheck(); };
this.unregisterDoCheckWatcher = this.$componentScope.$parent.$watch(callDoCheck);
callDoCheck();
}
// Linking
var link = this.directive.link;
var preLink = (typeof link === 'undefined' ? 'undefined' : _typeof(link)) == 'object' && link.pre;
var postLink = (typeof link === 'undefined' ? 'undefined' : _typeof(link)) == 'object' ? link.post : link;
var preLink = (typeof link == 'object') && link.pre;
var postLink = (typeof link == 'object') ? link.post : link;
var attrs = NOT_SUPPORTED;
var transcludeFn = NOT_SUPPORTED;
if (preLink) {
preLink(this.$componentScope, this.$element, attrs, requiredControllers, transcludeFn);
}
var childNodes = [];
var childNode;
while (childNode = this.element.firstChild) {
this.element.removeChild(childNode);
childNodes.push(childNode);
}
var attachElement = function attachElement(clonedElements, scope) {
_this.$element.append(clonedElements);
var attachChildNodes = function (scope, cloneAttach) {
return cloneAttach(contentChildNodes);
};
var attachChildNodes = function attachChildNodes(scope, cloneAttach) {
return cloneAttach(childNodes);
};
this.linkFn(this.$componentScope, attachElement, { parentBoundTranscludeFn: attachChildNodes });
linkFn(this.$componentScope, null, { parentBoundTranscludeFn: attachChildNodes });
if (postLink) {
postLink(this.$componentScope, this.$element, attrs, requiredControllers, transcludeFn);
}
// Hook: $postLink
if (this.controllerInstance && isFunction(this.controllerInstance.$postLink)) {

@@ -678,10 +670,8 @@ this.controllerInstance.$postLink();

UpgradeComponent.prototype.ngOnChanges = function (changes) {
var _this = this;
// Forward input changes to `bindingDestination`
Object.keys(changes).forEach(function (propName) {
return _this.bindingDestination[propName] = changes[propName].currentValue;
});
if (isFunction(this.bindingDestination.$onChanges)) {
this.bindingDestination.$onChanges(changes);
if (!this.bindingDestination) {
this.pendingChanges = changes;
}
else {
this.forwardChanges(changes);
}
};

@@ -696,3 +686,3 @@ UpgradeComponent.prototype.ngDoCheck = function () {

var oldValue = twoWayBoundLastValues[idx];
if (!looseIdentical(newValue, oldValue)) {
if (!ɵlooseIdentical(newValue, oldValue)) {
var outputName = propertyToOutputMap[propName];

@@ -720,9 +710,13 @@ var eventEmitter = _this[outputName];

var directive = directives[0];
if (directive.replace) this.notSupported('replace');
if (directive.terminal) this.notSupported('terminal');
if (directive.compile) this.notSupported('compile');
if (directive.replace)
this.notSupported('replace');
if (directive.terminal)
this.notSupported('terminal');
if (directive.compile)
this.notSupported('compile');
var link = directive.link;
// QUESTION: why not support link.post?
if ((typeof link === 'undefined' ? 'undefined' : _typeof(link)) == 'object') {
if (link.post) this.notSupported('link.post');
if (typeof link == 'object') {
if (link.post)
this.notSupported('link.post');
}

@@ -732,3 +726,3 @@ return directive;

UpgradeComponent.prototype.getDirectiveRequire = function (directive) {
var require = directive.require || directive.controller && directive.name;
var require = directive.require || (directive.controller && directive.name);
if (isMap(require)) {

@@ -748,9 +742,9 @@ Object.keys(require).forEach(function (key) {

var _this = this;
var btcIsObject = _typeof(directive.bindToController) === 'object';
var btcIsObject = typeof directive.bindToController === 'object';
if (btcIsObject && Object.keys(directive.scope).length) {
throw new Error("Binding definitions on scope and controller at the same time is not supported.");
}
var context = btcIsObject ? directive.bindToController : directive.scope;
var context = (btcIsObject) ? directive.bindToController : directive.scope;
var bindings = new Bindings();
if ((typeof context === 'undefined' ? 'undefined' : _typeof(context)) == 'object') {
if (typeof context == 'object') {
Object.keys(context).forEach(function (propName) {

@@ -784,6 +778,16 @@ var definition = context[propName];

};
UpgradeComponent.prototype.extractChildNodes = function (element) {
var childNodes = [];
var childNode;
while (childNode = element.firstChild) {
element.removeChild(childNode);
childNodes.push(childNode);
}
return childNodes;
};
UpgradeComponent.prototype.compileTemplate = function (directive) {
if (this.directive.template !== undefined) {
return this.compileHtml(getOrCall(this.directive.template));
} else if (this.directive.templateUrl) {
}
else if (this.directive.templateUrl) {
var url = getOrCall(this.directive.templateUrl);

@@ -793,6 +797,8 @@ var html = this.$templateCache.get(url);

return this.compileHtml(html);
} else {
}
else {
throw new Error('loading directive templates asynchronously is not supported');
}
} else {
}
else {
throw new Error("Directive '" + this.name + "' is not a component, it is missing template.");

@@ -813,13 +819,12 @@ }

return null;
} else if (Array.isArray(require)) {
return require.map(function (req) {
return _this.resolveRequire(directiveName, $element, req);
});
} else if ((typeof require === 'undefined' ? 'undefined' : _typeof(require)) === 'object') {
}
else if (Array.isArray(require)) {
return require.map(function (req) { return _this.resolveRequire(directiveName, $element, req); });
}
else if (typeof require === 'object') {
var value_1 = {};
Object.keys(require).forEach(function (key) {
return value_1[key] = _this.resolveRequire(directiveName, $element, require[key]);
});
Object.keys(require).forEach(function (key) { return value_1[key] = _this.resolveRequire(directiveName, $element, require[key]); });
return value_1;
} else if (typeof require === 'string') {
}
else if (typeof require === 'string') {
var match = require.match(REQUIRE_PREFIX_RE);

@@ -840,24 +845,33 @@ var inheritType = match[1] || match[3];

return value;
} else {
}
else {
throw new Error("Unrecognized require syntax on upgraded directive '" + directiveName + "': " + require);
}
};
UpgradeComponent.prototype.setupOutputs = function () {
UpgradeComponent.prototype.initializeOutputs = function () {
var _this = this;
// Set up the outputs for `=` bindings
this.bindings.twoWayBoundProperties.forEach(function (propName) {
// Initialize the outputs for `=` and `&` bindings
this.bindings.twoWayBoundProperties.concat(this.bindings.expressionBoundProperties)
.forEach(function (propName) {
var outputName = _this.bindings.propertyToOutputMap[propName];
_this[outputName] = new EventEmitter();
});
// Set up the outputs for `&` bindings
};
UpgradeComponent.prototype.bindOutputs = function () {
var _this = this;
// Bind `&` bindings to the corresponding outputs
this.bindings.expressionBoundProperties.forEach(function (propName) {
var outputName = _this.bindings.propertyToOutputMap[propName];
var emitter = _this[outputName] = new EventEmitter();
// QUESTION: Do we want the ng1 component to call the function with `<value>` or with
// `{$event: <value>}`. The former is closer to ng2, the latter to ng1.
_this.bindingDestination[propName] = function (value) {
return emitter.emit(value);
};
var emitter = _this[outputName];
_this.bindingDestination[propName] = function (value) { return emitter.emit(value); };
});
};
UpgradeComponent.prototype.forwardChanges = function (changes) {
var _this = this;
// Forward input changes to `bindingDestination`
Object.keys(changes).forEach(function (propName) { return _this.bindingDestination[propName] = changes[propName].currentValue; });
if (isFunction(this.bindingDestination.$onChanges)) {
this.bindingDestination.$onChanges(changes);
}
};
UpgradeComponent.prototype.notSupported = function (feature) {

@@ -867,8 +881,7 @@ throw new Error("Upgraded directive '" + this.name + "' contains unsupported feature: '" + feature + "'.");

UpgradeComponent.prototype.compileHtml = function (html) {
var div = document.createElement('div');
div.innerHTML = html;
return this.$compile(div.childNodes);
this.element.innerHTML = html;
return this.$compile(this.element.childNodes);
};
return UpgradeComponent;
}();
}());
function getOrCall(property) {

@@ -882,5 +895,4 @@ return isFunction(property) ? property() : property;

function isMap(value) {
return value && !Array.isArray(value) && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object';
return value && !Array.isArray(value) && typeof value === 'object';
}
/**

@@ -916,8 +928,11 @@ * @license

var angular1Providers = [
// We must use exported named functions for the ng2 factories to keep the compiler happy:
// > Metadata collected contains an error that will be reported at runtime:
// > Function calls are not supported.
// > Consider replacing the function or lambda with a reference to an exported function
{ provide: '$injector', useFactory: injectorFactory }, { provide: '$rootScope', useFactory: rootScopeFactory, deps: ['$injector'] }, { provide: '$compile', useFactory: compileFactory, deps: ['$injector'] }, { provide: '$parse', useFactory: parseFactory, deps: ['$injector'] }];
// We must use exported named functions for the ng2 factories to keep the compiler happy:
// > Metadata collected contains an error that will be reported at runtime:
// > Function calls are not supported.
// > Consider replacing the function or lambda with a reference to an exported function
{ provide: '$injector', useFactory: injectorFactory },
{ provide: '$rootScope', useFactory: rootScopeFactory, deps: ['$injector'] },
{ provide: '$compile', useFactory: compileFactory, deps: ['$injector'] },
{ provide: '$parse', useFactory: parseFactory, deps: ['$injector'] }
];
/**

@@ -1036,8 +1051,8 @@ * @whatItDoes

*/
var UpgradeModule = function () {
var UpgradeModule = (function () {
function UpgradeModule(
/** The root {@link Injector} for the upgrade application. */
injector,
/** The bootstrap zone for the upgrade application */
ngZone) {
/** The root {@link Injector} for the upgrade application. */
injector,
/** The bootstrap zone for the upgrade application */
ngZone) {
this.injector = injector;

@@ -1059,42 +1074,51 @@ this.ngZone = ngZone;

// Create an ng1 module to bootstrap
var initModule = module$1(INIT_MODULE_NAME, []).value(INJECTOR_KEY, this.injector).config([$PROVIDE, $INJECTOR, function ($provide, $injector) {
if ($injector.has($$TESTABILITY)) {
$provide.decorator($$TESTABILITY, [$DELEGATE, function (testabilityDelegate) {
var originalWhenStable = testabilityDelegate.whenStable;
var injector = _this.injector;
// Cannot use arrow function below because we need the context
var newWhenStable = function newWhenStable(callback) {
originalWhenStable.call(testabilityDelegate, function () {
var ng2Testability = injector.get(Testability);
if (ng2Testability.isStable()) {
callback();
} else {
ng2Testability.whenStable(newWhenStable.bind(testabilityDelegate, callback));
}
});
};
testabilityDelegate.whenStable = newWhenStable;
return testabilityDelegate;
}]);
var initModule = module$1(INIT_MODULE_NAME, [])
.value(INJECTOR_KEY, this.injector)
.config([
$PROVIDE, $INJECTOR,
function ($provide, $injector) {
if ($injector.has($$TESTABILITY)) {
$provide.decorator($$TESTABILITY, [
$DELEGATE,
function (testabilityDelegate) {
var originalWhenStable = testabilityDelegate.whenStable;
var injector = _this.injector;
// Cannot use arrow function below because we need the context
var newWhenStable = function (callback) {
originalWhenStable.call(testabilityDelegate, function () {
var ng2Testability = injector.get(Testability);
if (ng2Testability.isStable()) {
callback();
}
else {
ng2Testability.whenStable(newWhenStable.bind(testabilityDelegate, callback));
}
});
};
testabilityDelegate.whenStable = newWhenStable;
return testabilityDelegate;
}
]);
}
}
}]).run([$INJECTOR, function ($injector) {
_this.$injector = $injector;
// Initialize the ng1 $injector provider
setTempInjectorRef($injector);
_this.injector.get($INJECTOR);
// Put the injector on the DOM, so that it can be "required"
element(element$$).data(controllerKey(INJECTOR_KEY), _this.injector);
// Wire up the ng1 rootScope to run a digest cycle whenever the zone settles
// We need to do this in the next tick so that we don't prevent the bootup
// stabilizing
setTimeout(function () {
var $rootScope = $injector.get('$rootScope');
var subscription = _this.ngZone.onMicrotaskEmpty.subscribe(function () {
return $rootScope.$digest();
});
$rootScope.$on('$destroy', function () {
subscription.unsubscribe();
});
}, 0);
}]);
])
.run([
$INJECTOR,
function ($injector) {
_this.$injector = $injector;
// Initialize the ng1 $injector provider
setTempInjectorRef($injector);
_this.injector.get($INJECTOR);
// Put the injector on the DOM, so that it can be "required"
element(element$$).data(controllerKey(INJECTOR_KEY), _this.injector);
// Wire up the ng1 rootScope to run a digest cycle whenever the zone settles
// We need to do this in the next tick so that we don't prevent the bootup
// stabilizing
setTimeout(function () {
var $rootScope = $injector.get('$rootScope');
var subscription = _this.ngZone.onMicrotaskEmpty.subscribe(function () { return $rootScope.$digest(); });
$rootScope.$on('$destroy', function () { subscription.unsubscribe(); });
}, 0);
}
]);
var upgradeModule = module$1(UPGRADE_MODULE_NAME, [INIT_MODULE_NAME].concat(modules));

@@ -1105,5 +1129,3 @@ // Make sure resumeBootstrap() only exists if the current bootstrap is deferred

// Bootstrap the AngularJS application inside our zone
this.ngZone.run(function () {
bootstrap(element$$, [upgradeModule.name], config);
});
this.ngZone.run(function () { bootstrap(element$$, [upgradeModule.name], config); });
// Patch resumeBootstrap() to run inside the ngZone

@@ -1117,5 +1139,3 @@ if (windowAngular.resumeBootstrap) {

windowAngular.resumeBootstrap = originalResumeBootstrap_1;
ngZone_1.run(function () {
windowAngular.resumeBootstrap.apply(_this, args);
});
ngZone_1.run(function () { windowAngular.resumeBootstrap.apply(_this, args); });
};

@@ -1125,9 +1145,13 @@ }

return UpgradeModule;
}();
UpgradeModule.decorators = [{ type: NgModule, args: [{ providers: [angular1Providers, ContentProjectionHelper] }] }];
}());
UpgradeModule.decorators = [
{ type: NgModule, args: [{ providers: [angular1Providers, ContentProjectionHelper] },] },
];
/** @nocollapse */
UpgradeModule.ctorParameters = function () {
return [{ type: Injector }, { type: NgZone }];
return [
{ type: Injector, },
{ type: NgZone, },
];
};
export { ContentProjectionHelper as ɵf, angular1Providers as ɵe, compileFactory as ɵc, injectorFactory as ɵa, parseFactory as ɵd, rootScopeFactory as ɵb, downgradeComponent, downgradeInjectable, VERSION, UpgradeComponent, UpgradeModule };
export { downgradeComponent, downgradeInjectable, VERSION, UpgradeComponent, UpgradeModule };

@@ -1,2 +0,7 @@

import { SimpleChange, ReflectiveInjector, EventEmitter, Testability, ComponentFactoryResolver, Version, NgModule, NgZone, Injector } from '@angular/core';
/**
* @license Angular v4.0.0-rc.3
* (c) 2010-2017 Google, Inc. https://angular.io/
* License: MIT
*/
import { SimpleChange, ReflectiveInjector, EventEmitter, ɵlooseIdentical, Testability, ComponentFactoryResolver, Version, NgModule, NgZone, Injector } from '@angular/core';

@@ -449,3 +454,3 @@ /**

*/
var VERSION = new Version('4.0.0-rc.2');
var VERSION = new Version('4.0.0-rc.3');

@@ -481,7 +486,2 @@ /**

// JS has NaN !== NaN
function looseIdentical(a, b) {
return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);
}
var REQUIRE_PREFIX_RE = /^(\^\^?)?(\?)?(\^\^?)?/;

@@ -562,4 +562,2 @@ var NOT_SUPPORTED = 'NOT_SUPPORTED';

this.injector = injector;
this.controllerInstance = null;
this.bindingDestination = null;
this.$injector = injector.get($INJECTOR);

@@ -574,3 +572,2 @@ this.$compile = this.$injector.get($COMPILE);

this.bindings = this.initializeBindings(this.directive);
this.linkFn = this.compileTemplate(this.directive);
// We ask for the AngularJS scope from the Angular injector, since

@@ -582,2 +579,10 @@ // we will put the new component scope onto the new injector for each component

this.$componentScope = $parentScope.$new(!!this.directive.scope);
this.initializeOutputs();
}
UpgradeComponent.prototype.ngOnInit = function () {
var _this = this;
// Collect contents, insert and compile template
var contentChildNodes = this.extractChildNodes(this.element);
var linkFn = this.compileTemplate(this.directive);
// Instantiate controller
var controllerType = this.directive.controller;

@@ -589,11 +594,8 @@ var bindToController = this.directive.bindToController;

else if (bindToController) {
throw new Error("Upgraded directive '" + name + "' specifies 'bindToController' but no controller.");
throw new Error("Upgraded directive '" + this.directive.name + "' specifies 'bindToController' but no controller.");
}
// Set up outputs
this.bindingDestination = bindToController ? this.controllerInstance : this.$componentScope;
this.setupOutputs();
}
UpgradeComponent.prototype.ngOnInit = function () {
var _this = this;
var attrs = NOT_SUPPORTED;
var transcludeFn = NOT_SUPPORTED;
this.bindOutputs();
// Require other controllers
var directiveRequire = this.getDirectiveRequire(this.directive);

@@ -607,5 +609,12 @@ var requiredControllers = this.resolveRequire(this.directive.name, this.$element, directiveRequire);

}
// Hook: $onChanges
if (this.pendingChanges) {
this.forwardChanges(this.pendingChanges);
this.pendingChanges = null;
}
// Hook: $onInit
if (this.controllerInstance && isFunction(this.controllerInstance.$onInit)) {
this.controllerInstance.$onInit();
}
// Hook: $doCheck
if (this.controllerInstance && isFunction(this.controllerInstance.$doCheck)) {

@@ -616,20 +625,19 @@ var callDoCheck = function () { return _this.controllerInstance.$doCheck(); };

}
// Linking
var link = this.directive.link;
var preLink = (typeof link == 'object') && link.pre;
var postLink = (typeof link == 'object') ? link.post : link;
var attrs = NOT_SUPPORTED;
var transcludeFn = NOT_SUPPORTED;
if (preLink) {
preLink(this.$componentScope, this.$element, attrs, requiredControllers, transcludeFn);
}
var childNodes = [];
var childNode;
while (childNode = this.element.firstChild) {
this.element.removeChild(childNode);
childNodes.push(childNode);
}
var attachElement = function (clonedElements, scope) { _this.$element.append(clonedElements); };
var attachChildNodes = function (scope, cloneAttach) { return cloneAttach(childNodes); };
this.linkFn(this.$componentScope, attachElement, { parentBoundTranscludeFn: attachChildNodes });
var attachChildNodes = function (scope, cloneAttach) {
return cloneAttach(contentChildNodes);
};
linkFn(this.$componentScope, null, { parentBoundTranscludeFn: attachChildNodes });
if (postLink) {
postLink(this.$componentScope, this.$element, attrs, requiredControllers, transcludeFn);
}
// Hook: $postLink
if (this.controllerInstance && isFunction(this.controllerInstance.$postLink)) {

@@ -640,8 +648,8 @@ this.controllerInstance.$postLink();

UpgradeComponent.prototype.ngOnChanges = function (changes) {
var _this = this;
// Forward input changes to `bindingDestination`
Object.keys(changes).forEach(function (propName) { return _this.bindingDestination[propName] = changes[propName].currentValue; });
if (isFunction(this.bindingDestination.$onChanges)) {
this.bindingDestination.$onChanges(changes);
if (!this.bindingDestination) {
this.pendingChanges = changes;
}
else {
this.forwardChanges(changes);
}
};

@@ -656,3 +664,3 @@ UpgradeComponent.prototype.ngDoCheck = function () {

var oldValue = twoWayBoundLastValues[idx];
if (!looseIdentical(newValue, oldValue)) {
if (!ɵlooseIdentical(newValue, oldValue)) {
var outputName = propertyToOutputMap[propName];

@@ -745,2 +753,11 @@ var eventEmitter = _this[outputName];

};
UpgradeComponent.prototype.extractChildNodes = function (element) {
var childNodes = [];
var childNode;
while (childNode = element.firstChild) {
element.removeChild(childNode);
childNodes.push(childNode);
}
return childNodes;
};
UpgradeComponent.prototype.compileTemplate = function (directive) {

@@ -806,18 +823,28 @@ if (this.directive.template !== undefined) {

};
UpgradeComponent.prototype.setupOutputs = function () {
UpgradeComponent.prototype.initializeOutputs = function () {
var _this = this;
// Set up the outputs for `=` bindings
this.bindings.twoWayBoundProperties.forEach(function (propName) {
// Initialize the outputs for `=` and `&` bindings
this.bindings.twoWayBoundProperties.concat(this.bindings.expressionBoundProperties)
.forEach(function (propName) {
var outputName = _this.bindings.propertyToOutputMap[propName];
_this[outputName] = new EventEmitter();
});
// Set up the outputs for `&` bindings
};
UpgradeComponent.prototype.bindOutputs = function () {
var _this = this;
// Bind `&` bindings to the corresponding outputs
this.bindings.expressionBoundProperties.forEach(function (propName) {
var outputName = _this.bindings.propertyToOutputMap[propName];
var emitter = _this[outputName] = new EventEmitter();
// QUESTION: Do we want the ng1 component to call the function with `<value>` or with
// `{$event: <value>}`. The former is closer to ng2, the latter to ng1.
var emitter = _this[outputName];
_this.bindingDestination[propName] = function (value) { return emitter.emit(value); };
});
};
UpgradeComponent.prototype.forwardChanges = function (changes) {
var _this = this;
// Forward input changes to `bindingDestination`
Object.keys(changes).forEach(function (propName) { return _this.bindingDestination[propName] = changes[propName].currentValue; });
if (isFunction(this.bindingDestination.$onChanges)) {
this.bindingDestination.$onChanges(changes);
}
};
UpgradeComponent.prototype.notSupported = function (feature) {

@@ -827,5 +854,4 @@ throw new Error("Upgraded directive '" + this.name + "' contains unsupported feature: '" + feature + "'.");

UpgradeComponent.prototype.compileHtml = function (html) {
var div = document.createElement('div');
div.innerHTML = html;
return this.$compile(div.childNodes);
this.element.innerHTML = html;
return this.$compile(this.element.childNodes);
};

@@ -1096,2 +1122,2 @@ return UpgradeComponent;

export { ContentProjectionHelper as ɵf, angular1Providers as ɵe, compileFactory as ɵc, injectorFactory as ɵa, parseFactory as ɵd, rootScopeFactory as ɵb, downgradeComponent, downgradeInjectable, VERSION, UpgradeComponent, UpgradeModule };
export { downgradeComponent, downgradeInjectable, VERSION, UpgradeComponent, UpgradeModule };
/**
* @license Angular v4.0.0-rc.2
* @license Angular v4.0.0-rc.3
* (c) 2010-2017 Google, Inc. https://angular.io/

@@ -7,29 +7,7 @@ * License: MIT

(function (global, factory) {
if (typeof define === "function" && define.amd) {
define('@angular/upgrade/static', ['exports', '@angular/core'], factory);
} else if (typeof exports !== "undefined") {
factory(exports, require('@angular/core'));
} else {
var mod = {
exports: {}
};
factory(mod.exports, global.angularCore);
global.ng = global.ng || {};
global.ng.upgrade = global.ng.upgrade || {};
global.ng.upgrade.static = mod.exports;
}
})(this, function (exports, _core) {
'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core')) :
typeof define === 'function' && define.amd ? define(['exports', '@angular/core'], factory) :
(factory((global.ng = global.ng || {}, global.ng.upgrade = global.ng.upgrade || {}, global.ng.upgrade.static = global.ng.upgrade.static || {}),global.ng.core));
}(this, function (exports,_angular_core) { 'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.UpgradeModule = exports.UpgradeComponent = exports.VERSION = exports.downgradeInjectable = exports.downgradeComponent = exports.ɵb = exports.ɵd = exports.ɵa = exports.ɵc = exports.ɵe = exports.ɵf = undefined;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
/**

@@ -48,3 +26,3 @@ * @license

* found in the LICENSE file at https://angular.io/license
*/var $COMPILE = '$compile';
*/ var $COMPILE = '$compile';
var $CONTROLLER = '$controller';

@@ -63,3 +41,2 @@ var $DELEGATE = '$delegate';

var UPGRADE_MODULE_NAME = '$$UpgradeModule';
/**

@@ -78,3 +55,3 @@ * @license

*/
var PropertyBinding = function () {
var PropertyBinding = (function () {
function PropertyBinding(binding) {

@@ -97,4 +74,3 @@ this.binding = binding;

return PropertyBinding;
}();
}());
/**

@@ -107,4 +83,5 @@ * @license

*/
var ContentProjectionHelper = function () {
function ContentProjectionHelper() {}
var ContentProjectionHelper = (function () {
function ContentProjectionHelper() {
}
ContentProjectionHelper.prototype.groupProjectableNodes = function ($injector, component, nodes) {

@@ -116,4 +93,3 @@ // By default, do not support multi-slot projection,

return ContentProjectionHelper;
}();
}());
function controllerKey(name) {

@@ -132,3 +108,4 @@ return '$' + name + 'Controller';

function supportsNgModel(component) {
return typeof component.writeValue === 'function' && typeof component.registerOnChange === 'function';
return typeof component.writeValue === 'function' &&
typeof component.registerOnChange === 'function';
}

@@ -141,13 +118,10 @@ /**

if (ngModel && supportsNgModel(component)) {
ngModel.$render = function () {
component.writeValue(ngModel.$viewValue);
};
ngModel.$render = function () { component.writeValue(ngModel.$viewValue); };
component.registerOnChange(ngModel.$setViewValue.bind(ngModel));
}
}
var INITIAL_VALUE = {
__UNINITIALIZED__: true
};
var DowngradeComponentAdapter = function () {
var DowngradeComponentAdapter = (function () {
function DowngradeComponentAdapter(id, info, element, attrs, scope, ngModel, parentInjector, $injector, $compile, $parse, componentFactory) {

@@ -179,5 +153,3 @@ this.id = id;

var projectableNodes = projectionHelper.groupProjectableNodes(this.$injector, this.info.component, this.element.contents());
var linkFns = projectableNodes.map(function (nodes) {
return _this.$compile(nodes);
});
var linkFns = projectableNodes.map(function (nodes) { return _this.$compile(nodes); });
this.element.empty();

@@ -193,4 +165,5 @@ linkFns.forEach(function (linkFn) {

DowngradeComponentAdapter.prototype.createComponent = function (projectableNodes) {
var childInjector = _core.ReflectiveInjector.resolveAndCreate([{ provide: $SCOPE, useValue: this.componentScope }], this.parentInjector);
this.componentRef = this.componentFactory.create(childInjector, projectableNodes, this.element[0]);
var childInjector = _angular_core.ReflectiveInjector.resolveAndCreate([{ provide: $SCOPE, useValue: this.componentScope }], this.parentInjector);
this.componentRef =
this.componentFactory.create(childInjector, projectableNodes, this.element[0]);
this.changeDetector = this.componentRef.changeDetectorRef;

@@ -208,3 +181,3 @@ this.component = this.componentRef.instance;

if (attrs.hasOwnProperty(input.attr)) {
var observeFn = function (prop) {
var observeFn = (function (prop) {
var prevValue = INITIAL_VALUE;

@@ -218,19 +191,23 @@ return function (currValue) {

};
}(input.prop);
})(input.prop);
attrs.$observe(input.attr, observeFn);
} else if (attrs.hasOwnProperty(input.bindAttr)) {
}
else if (attrs.hasOwnProperty(input.bindAttr)) {
expr = attrs /** TODO #9100 */[input.bindAttr];
} else if (attrs.hasOwnProperty(input.bracketAttr)) {
}
else if (attrs.hasOwnProperty(input.bracketAttr)) {
expr = attrs /** TODO #9100 */[input.bracketAttr];
} else if (attrs.hasOwnProperty(input.bindonAttr)) {
}
else if (attrs.hasOwnProperty(input.bindonAttr)) {
expr = attrs /** TODO #9100 */[input.bindonAttr];
} else if (attrs.hasOwnProperty(input.bracketParenAttr)) {
}
else if (attrs.hasOwnProperty(input.bracketParenAttr)) {
expr = attrs /** TODO #9100 */[input.bracketParenAttr];
}
if (expr != null) {
var watchFn = function (prop) {
var watchFn = (function (prop) {
return function (currValue, prevValue) {
return _this.updateInput(prop, prevValue, currValue);
};
}(input.prop);
})(input.prop);
this.componentScope.$watch(expr, watchFn);

@@ -243,5 +220,3 @@ }

this.inputChanges = {};
this.componentScope.$watch(function () {
return _this.inputChangeCount;
}, function () {
this.componentScope.$watch(function () { return _this.inputChangeCount; }, function () {
var inputChanges = _this.inputChanges;

@@ -252,5 +227,3 @@ _this.inputChanges = {};

}
this.componentScope.$watch(function () {
return _this.changeDetector && _this.changeDetector.detectChanges();
});
this.componentScope.$watch(function () { return _this.changeDetector && _this.changeDetector.detectChanges(); });
};

@@ -266,11 +239,16 @@ DowngradeComponentAdapter.prototype.setupOutputs = function () {

var bindonAttr = output.bindonAttr ? output.bindonAttr.substring(0, output.bindonAttr.length - 6) : null;
var bracketParenAttr = output.bracketParenAttr ? "[(" + output.bracketParenAttr.substring(2, output.bracketParenAttr.length - 8) + ")]" : null;
var bracketParenAttr = output.bracketParenAttr ?
"[(" + output.bracketParenAttr.substring(2, output.bracketParenAttr.length - 8) + ")]" :
null;
if (attrs.hasOwnProperty(output.onAttr)) {
expr = attrs /** TODO #9100 */[output.onAttr];
} else if (attrs.hasOwnProperty(output.parenAttr)) {
}
else if (attrs.hasOwnProperty(output.parenAttr)) {
expr = attrs /** TODO #9100 */[output.parenAttr];
} else if (attrs.hasOwnProperty(bindonAttr)) {
}
else if (attrs.hasOwnProperty(bindonAttr)) {
expr = attrs /** TODO #9100 */[bindonAttr];
assignExpr = true;
} else if (attrs.hasOwnProperty(bracketParenAttr)) {
}
else if (attrs.hasOwnProperty(bracketParenAttr)) {
expr = attrs /** TODO #9100 */[bracketParenAttr];

@@ -288,13 +266,12 @@ assignExpr = true;

emitter.subscribe({
next: assignExpr ? function (setter) {
return function (v /** TODO #9100 */) {
return setter(_this.scope, v);
};
}(setter) : function (getter) {
return function (v /** TODO #9100 */) {
return getter(_this.scope, { $event: v });
};
}(getter)
next: assignExpr ?
(function (setter) { return function (v /** TODO #9100 */) { return setter(_this.scope, v); }; })(setter) :
(function (getter) {
return function (v /** TODO #9100 */) {
return getter(_this.scope, { $event: v });
};
})(getter)
});
} else {
}
else {
throw new Error("Missing emitter '" + output.prop + "' on component '" + getComponentName(this.info.component) + "'!");

@@ -312,9 +289,7 @@ }

};
DowngradeComponentAdapter.prototype.getInjector = function () {
return this.componentRef && this.componentRef.injector;
};
DowngradeComponentAdapter.prototype.getInjector = function () { return this.componentRef && this.componentRef.injector; };
DowngradeComponentAdapter.prototype.updateInput = function (prop, prevValue, currValue) {
if (this.inputChanges) {
this.inputChangeCount++;
this.inputChanges[prop] = new _core.SimpleChange(prevValue, currValue, prevValue === currValue);
this.inputChanges[prop] = new _angular_core.SimpleChange(prevValue, currValue, prevValue === currValue);
}

@@ -324,4 +299,3 @@ this.component[prop] = currValue;

return DowngradeComponentAdapter;
}();
}());
var downgradeCount = 0;

@@ -378,3 +352,3 @@ /**

var idCount = 0;
var directiveFactory = function directiveFactory($compile, $injector, $parse) {
var directiveFactory = function ($compile, $injector, $parse) {
return {

@@ -384,3 +358,3 @@ restrict: 'E',

require: [REQUIRE_INJECTOR, REQUIRE_NG_MODEL],
link: function link(scope, element, attrs, required) {
link: function (scope, element, attrs, required) {
// We might have to compile the contents asynchronously, because this might have been

@@ -391,4 +365,4 @@ // triggered by `UpgradeNg1ComponentAdapterBuilder`, before the Angular templates have

var ngModel = required[1];
var downgradeFn = function downgradeFn(injector) {
var componentFactoryResolver = injector.get(_core.ComponentFactoryResolver);
var downgradeFn = function (injector) {
var componentFactoryResolver = injector.get(_angular_core.ComponentFactoryResolver);
var componentFactory = componentFactoryResolver.resolveComponentFactory(info.component);

@@ -398,3 +372,3 @@ if (!componentFactory) {

}
var id = idPrefix + idCount++;
var id = idPrefix + (idCount++);
var injectorPromise = new ParentInjectorPromise(element);

@@ -411,3 +385,4 @@ var facade = new DowngradeComponentAdapter(id, info, element, attrs, scope, ngModel, injector, $injector, $compile, $parse, componentFactory);

parentInjector.then(downgradeFn);
} else {
}
else {
downgradeFn(parentInjector);

@@ -426,3 +401,3 @@ }

*/
var ParentInjectorPromise = function () {
var ParentInjectorPromise = (function () {
function ParentInjectorPromise(element) {

@@ -438,3 +413,4 @@ this.element = element;

callback(this.injector);
} else {
}
else {
this.callbacks.push(callback);

@@ -450,10 +426,7 @@ }

// Run the queued callbacks.
this.callbacks.forEach(function (callback) {
return callback(injector);
});
this.callbacks.forEach(function (callback) { return callback(injector); });
this.callbacks.length = 0;
};
return ParentInjectorPromise;
}();
}());
/**

@@ -502,14 +475,10 @@ * @whatItDoes

function downgradeInjectable(token) {
var factory = function factory(i) {
return i.get(token);
};
var factory = function (i) { return i.get(token); };
factory.$inject = [INJECTOR_KEY];
return factory;
}
/**
* @stable
*/
var VERSION = new _core.Version('4.0.0-rc.2');
var VERSION = new _angular_core.Version('4.0.0-rc.3');
/**

@@ -537,12 +506,8 @@ * @license

}
} catch (e) {}
}
catch (e) {
}
var bootstrap = angular.bootstrap;
var module$1 = angular.module;
var element = angular.element;
// JS has NaN !== NaN
function looseIdentical(a, b) {
return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);
}
var REQUIRE_PREFIX_RE = /^(\^\^?)?(\?)?(\^\^?)?/;

@@ -553,3 +518,3 @@ var NOT_SUPPORTED = 'NOT_SUPPORTED';

};
var Bindings = function () {
var Bindings = (function () {
function Bindings() {

@@ -562,3 +527,3 @@ this.twoWayBoundProperties = [];

return Bindings;
}();
}());
/**

@@ -604,3 +569,3 @@ * @whatItDoes

*/
var UpgradeComponent = function () {
var UpgradeComponent = (function () {
/**

@@ -626,4 +591,2 @@ * Create a new `UpgradeComponent` instance. You should not normally need to do this.

this.injector = injector;
this.controllerInstance = null;
this.bindingDestination = null;
this.$injector = injector.get($INJECTOR);

@@ -638,3 +601,2 @@ this.$compile = this.$injector.get($COMPILE);

this.bindings = this.initializeBindings(this.directive);
this.linkFn = this.compileTemplate(this.directive);
// We ask for the AngularJS scope from the Angular injector, since

@@ -646,2 +608,10 @@ // we will put the new component scope onto the new injector for each component

this.$componentScope = $parentScope.$new(!!this.directive.scope);
this.initializeOutputs();
}
UpgradeComponent.prototype.ngOnInit = function () {
var _this = this;
// Collect contents, insert and compile template
var contentChildNodes = this.extractChildNodes(this.element);
var linkFn = this.compileTemplate(this.directive);
// Instantiate controller
var controllerType = this.directive.controller;

@@ -651,12 +621,10 @@ var bindToController = this.directive.bindToController;

this.controllerInstance = this.buildController(controllerType, this.$componentScope, this.$element, this.directive.controllerAs);
} else if (bindToController) {
throw new Error("Upgraded directive '" + name + "' specifies 'bindToController' but no controller.");
}
else if (bindToController) {
throw new Error("Upgraded directive '" + this.directive.name + "' specifies 'bindToController' but no controller.");
}
// Set up outputs
this.bindingDestination = bindToController ? this.controllerInstance : this.$componentScope;
this.setupOutputs();
}
UpgradeComponent.prototype.ngOnInit = function () {
var _this = this;
var attrs = NOT_SUPPORTED;
var transcludeFn = NOT_SUPPORTED;
this.bindOutputs();
// Require other controllers
var directiveRequire = this.getDirectiveRequire(this.directive);

@@ -670,34 +638,34 @@ var requiredControllers = this.resolveRequire(this.directive.name, this.$element, directiveRequire);

}
// Hook: $onChanges
if (this.pendingChanges) {
this.forwardChanges(this.pendingChanges);
this.pendingChanges = null;
}
// Hook: $onInit
if (this.controllerInstance && isFunction(this.controllerInstance.$onInit)) {
this.controllerInstance.$onInit();
}
// Hook: $doCheck
if (this.controllerInstance && isFunction(this.controllerInstance.$doCheck)) {
var callDoCheck = function callDoCheck() {
return _this.controllerInstance.$doCheck();
};
var callDoCheck = function () { return _this.controllerInstance.$doCheck(); };
this.unregisterDoCheckWatcher = this.$componentScope.$parent.$watch(callDoCheck);
callDoCheck();
}
// Linking
var link = this.directive.link;
var preLink = (typeof link === 'undefined' ? 'undefined' : _typeof(link)) == 'object' && link.pre;
var postLink = (typeof link === 'undefined' ? 'undefined' : _typeof(link)) == 'object' ? link.post : link;
var preLink = (typeof link == 'object') && link.pre;
var postLink = (typeof link == 'object') ? link.post : link;
var attrs = NOT_SUPPORTED;
var transcludeFn = NOT_SUPPORTED;
if (preLink) {
preLink(this.$componentScope, this.$element, attrs, requiredControllers, transcludeFn);
}
var childNodes = [];
var childNode;
while (childNode = this.element.firstChild) {
this.element.removeChild(childNode);
childNodes.push(childNode);
}
var attachElement = function attachElement(clonedElements, scope) {
_this.$element.append(clonedElements);
var attachChildNodes = function (scope, cloneAttach) {
return cloneAttach(contentChildNodes);
};
var attachChildNodes = function attachChildNodes(scope, cloneAttach) {
return cloneAttach(childNodes);
};
this.linkFn(this.$componentScope, attachElement, { parentBoundTranscludeFn: attachChildNodes });
linkFn(this.$componentScope, null, { parentBoundTranscludeFn: attachChildNodes });
if (postLink) {
postLink(this.$componentScope, this.$element, attrs, requiredControllers, transcludeFn);
}
// Hook: $postLink
if (this.controllerInstance && isFunction(this.controllerInstance.$postLink)) {

@@ -708,10 +676,8 @@ this.controllerInstance.$postLink();

UpgradeComponent.prototype.ngOnChanges = function (changes) {
var _this = this;
// Forward input changes to `bindingDestination`
Object.keys(changes).forEach(function (propName) {
return _this.bindingDestination[propName] = changes[propName].currentValue;
});
if (isFunction(this.bindingDestination.$onChanges)) {
this.bindingDestination.$onChanges(changes);
if (!this.bindingDestination) {
this.pendingChanges = changes;
}
else {
this.forwardChanges(changes);
}
};

@@ -726,3 +692,3 @@ UpgradeComponent.prototype.ngDoCheck = function () {

var oldValue = twoWayBoundLastValues[idx];
if (!looseIdentical(newValue, oldValue)) {
if (!_angular_core.ɵlooseIdentical(newValue, oldValue)) {
var outputName = propertyToOutputMap[propName];

@@ -750,9 +716,13 @@ var eventEmitter = _this[outputName];

var directive = directives[0];
if (directive.replace) this.notSupported('replace');
if (directive.terminal) this.notSupported('terminal');
if (directive.compile) this.notSupported('compile');
if (directive.replace)
this.notSupported('replace');
if (directive.terminal)
this.notSupported('terminal');
if (directive.compile)
this.notSupported('compile');
var link = directive.link;
// QUESTION: why not support link.post?
if ((typeof link === 'undefined' ? 'undefined' : _typeof(link)) == 'object') {
if (link.post) this.notSupported('link.post');
if (typeof link == 'object') {
if (link.post)
this.notSupported('link.post');
}

@@ -762,3 +732,3 @@ return directive;

UpgradeComponent.prototype.getDirectiveRequire = function (directive) {
var require = directive.require || directive.controller && directive.name;
var require = directive.require || (directive.controller && directive.name);
if (isMap(require)) {

@@ -778,9 +748,9 @@ Object.keys(require).forEach(function (key) {

var _this = this;
var btcIsObject = _typeof(directive.bindToController) === 'object';
var btcIsObject = typeof directive.bindToController === 'object';
if (btcIsObject && Object.keys(directive.scope).length) {
throw new Error("Binding definitions on scope and controller at the same time is not supported.");
}
var context = btcIsObject ? directive.bindToController : directive.scope;
var context = (btcIsObject) ? directive.bindToController : directive.scope;
var bindings = new Bindings();
if ((typeof context === 'undefined' ? 'undefined' : _typeof(context)) == 'object') {
if (typeof context == 'object') {
Object.keys(context).forEach(function (propName) {

@@ -814,6 +784,16 @@ var definition = context[propName];

};
UpgradeComponent.prototype.extractChildNodes = function (element) {
var childNodes = [];
var childNode;
while (childNode = element.firstChild) {
element.removeChild(childNode);
childNodes.push(childNode);
}
return childNodes;
};
UpgradeComponent.prototype.compileTemplate = function (directive) {
if (this.directive.template !== undefined) {
return this.compileHtml(getOrCall(this.directive.template));
} else if (this.directive.templateUrl) {
}
else if (this.directive.templateUrl) {
var url = getOrCall(this.directive.templateUrl);

@@ -823,6 +803,8 @@ var html = this.$templateCache.get(url);

return this.compileHtml(html);
} else {
}
else {
throw new Error('loading directive templates asynchronously is not supported');
}
} else {
}
else {
throw new Error("Directive '" + this.name + "' is not a component, it is missing template.");

@@ -843,13 +825,12 @@ }

return null;
} else if (Array.isArray(require)) {
return require.map(function (req) {
return _this.resolveRequire(directiveName, $element, req);
});
} else if ((typeof require === 'undefined' ? 'undefined' : _typeof(require)) === 'object') {
}
else if (Array.isArray(require)) {
return require.map(function (req) { return _this.resolveRequire(directiveName, $element, req); });
}
else if (typeof require === 'object') {
var value_1 = {};
Object.keys(require).forEach(function (key) {
return value_1[key] = _this.resolveRequire(directiveName, $element, require[key]);
});
Object.keys(require).forEach(function (key) { return value_1[key] = _this.resolveRequire(directiveName, $element, require[key]); });
return value_1;
} else if (typeof require === 'string') {
}
else if (typeof require === 'string') {
var match = require.match(REQUIRE_PREFIX_RE);

@@ -870,24 +851,33 @@ var inheritType = match[1] || match[3];

return value;
} else {
}
else {
throw new Error("Unrecognized require syntax on upgraded directive '" + directiveName + "': " + require);
}
};
UpgradeComponent.prototype.setupOutputs = function () {
UpgradeComponent.prototype.initializeOutputs = function () {
var _this = this;
// Set up the outputs for `=` bindings
this.bindings.twoWayBoundProperties.forEach(function (propName) {
// Initialize the outputs for `=` and `&` bindings
this.bindings.twoWayBoundProperties.concat(this.bindings.expressionBoundProperties)
.forEach(function (propName) {
var outputName = _this.bindings.propertyToOutputMap[propName];
_this[outputName] = new _core.EventEmitter();
_this[outputName] = new _angular_core.EventEmitter();
});
// Set up the outputs for `&` bindings
};
UpgradeComponent.prototype.bindOutputs = function () {
var _this = this;
// Bind `&` bindings to the corresponding outputs
this.bindings.expressionBoundProperties.forEach(function (propName) {
var outputName = _this.bindings.propertyToOutputMap[propName];
var emitter = _this[outputName] = new _core.EventEmitter();
// QUESTION: Do we want the ng1 component to call the function with `<value>` or with
// `{$event: <value>}`. The former is closer to ng2, the latter to ng1.
_this.bindingDestination[propName] = function (value) {
return emitter.emit(value);
};
var emitter = _this[outputName];
_this.bindingDestination[propName] = function (value) { return emitter.emit(value); };
});
};
UpgradeComponent.prototype.forwardChanges = function (changes) {
var _this = this;
// Forward input changes to `bindingDestination`
Object.keys(changes).forEach(function (propName) { return _this.bindingDestination[propName] = changes[propName].currentValue; });
if (isFunction(this.bindingDestination.$onChanges)) {
this.bindingDestination.$onChanges(changes);
}
};
UpgradeComponent.prototype.notSupported = function (feature) {

@@ -897,8 +887,7 @@ throw new Error("Upgraded directive '" + this.name + "' contains unsupported feature: '" + feature + "'.");

UpgradeComponent.prototype.compileHtml = function (html) {
var div = document.createElement('div');
div.innerHTML = html;
return this.$compile(div.childNodes);
this.element.innerHTML = html;
return this.$compile(this.element.childNodes);
};
return UpgradeComponent;
}();
}());
function getOrCall(property) {

@@ -912,5 +901,4 @@ return isFunction(property) ? property() : property;

function isMap(value) {
return value && !Array.isArray(value) && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object';
return value && !Array.isArray(value) && typeof value === 'object';
}
/**

@@ -946,8 +934,11 @@ * @license

var angular1Providers = [
// We must use exported named functions for the ng2 factories to keep the compiler happy:
// > Metadata collected contains an error that will be reported at runtime:
// > Function calls are not supported.
// > Consider replacing the function or lambda with a reference to an exported function
{ provide: '$injector', useFactory: injectorFactory }, { provide: '$rootScope', useFactory: rootScopeFactory, deps: ['$injector'] }, { provide: '$compile', useFactory: compileFactory, deps: ['$injector'] }, { provide: '$parse', useFactory: parseFactory, deps: ['$injector'] }];
// We must use exported named functions for the ng2 factories to keep the compiler happy:
// > Metadata collected contains an error that will be reported at runtime:
// > Function calls are not supported.
// > Consider replacing the function or lambda with a reference to an exported function
{ provide: '$injector', useFactory: injectorFactory },
{ provide: '$rootScope', useFactory: rootScopeFactory, deps: ['$injector'] },
{ provide: '$compile', useFactory: compileFactory, deps: ['$injector'] },
{ provide: '$parse', useFactory: parseFactory, deps: ['$injector'] }
];
/**

@@ -1066,8 +1057,8 @@ * @whatItDoes

*/
var UpgradeModule = function () {
var UpgradeModule = (function () {
function UpgradeModule(
/** The root {@link Injector} for the upgrade application. */
injector,
/** The bootstrap zone for the upgrade application */
ngZone) {
/** The root {@link Injector} for the upgrade application. */
injector,
/** The bootstrap zone for the upgrade application */
ngZone) {
this.injector = injector;

@@ -1089,42 +1080,51 @@ this.ngZone = ngZone;

// Create an ng1 module to bootstrap
var initModule = module$1(INIT_MODULE_NAME, []).value(INJECTOR_KEY, this.injector).config([$PROVIDE, $INJECTOR, function ($provide, $injector) {
if ($injector.has($$TESTABILITY)) {
$provide.decorator($$TESTABILITY, [$DELEGATE, function (testabilityDelegate) {
var originalWhenStable = testabilityDelegate.whenStable;
var injector = _this.injector;
// Cannot use arrow function below because we need the context
var newWhenStable = function newWhenStable(callback) {
originalWhenStable.call(testabilityDelegate, function () {
var ng2Testability = injector.get(_core.Testability);
if (ng2Testability.isStable()) {
callback();
} else {
ng2Testability.whenStable(newWhenStable.bind(testabilityDelegate, callback));
}
});
};
testabilityDelegate.whenStable = newWhenStable;
return testabilityDelegate;
}]);
var initModule = module$1(INIT_MODULE_NAME, [])
.value(INJECTOR_KEY, this.injector)
.config([
$PROVIDE, $INJECTOR,
function ($provide, $injector) {
if ($injector.has($$TESTABILITY)) {
$provide.decorator($$TESTABILITY, [
$DELEGATE,
function (testabilityDelegate) {
var originalWhenStable = testabilityDelegate.whenStable;
var injector = _this.injector;
// Cannot use arrow function below because we need the context
var newWhenStable = function (callback) {
originalWhenStable.call(testabilityDelegate, function () {
var ng2Testability = injector.get(_angular_core.Testability);
if (ng2Testability.isStable()) {
callback();
}
else {
ng2Testability.whenStable(newWhenStable.bind(testabilityDelegate, callback));
}
});
};
testabilityDelegate.whenStable = newWhenStable;
return testabilityDelegate;
}
]);
}
}
}]).run([$INJECTOR, function ($injector) {
_this.$injector = $injector;
// Initialize the ng1 $injector provider
setTempInjectorRef($injector);
_this.injector.get($INJECTOR);
// Put the injector on the DOM, so that it can be "required"
element(element$$).data(controllerKey(INJECTOR_KEY), _this.injector);
// Wire up the ng1 rootScope to run a digest cycle whenever the zone settles
// We need to do this in the next tick so that we don't prevent the bootup
// stabilizing
setTimeout(function () {
var $rootScope = $injector.get('$rootScope');
var subscription = _this.ngZone.onMicrotaskEmpty.subscribe(function () {
return $rootScope.$digest();
});
$rootScope.$on('$destroy', function () {
subscription.unsubscribe();
});
}, 0);
}]);
])
.run([
$INJECTOR,
function ($injector) {
_this.$injector = $injector;
// Initialize the ng1 $injector provider
setTempInjectorRef($injector);
_this.injector.get($INJECTOR);
// Put the injector on the DOM, so that it can be "required"
element(element$$).data(controllerKey(INJECTOR_KEY), _this.injector);
// Wire up the ng1 rootScope to run a digest cycle whenever the zone settles
// We need to do this in the next tick so that we don't prevent the bootup
// stabilizing
setTimeout(function () {
var $rootScope = $injector.get('$rootScope');
var subscription = _this.ngZone.onMicrotaskEmpty.subscribe(function () { return $rootScope.$digest(); });
$rootScope.$on('$destroy', function () { subscription.unsubscribe(); });
}, 0);
}
]);
var upgradeModule = module$1(UPGRADE_MODULE_NAME, [INIT_MODULE_NAME].concat(modules));

@@ -1135,5 +1135,3 @@ // Make sure resumeBootstrap() only exists if the current bootstrap is deferred

// Bootstrap the AngularJS application inside our zone
this.ngZone.run(function () {
bootstrap(element$$, [upgradeModule.name], config);
});
this.ngZone.run(function () { bootstrap(element$$, [upgradeModule.name], config); });
// Patch resumeBootstrap() to run inside the ngZone

@@ -1147,5 +1145,3 @@ if (windowAngular.resumeBootstrap) {

windowAngular.resumeBootstrap = originalResumeBootstrap_1;
ngZone_1.run(function () {
windowAngular.resumeBootstrap.apply(_this, args);
});
ngZone_1.run(function () { windowAngular.resumeBootstrap.apply(_this, args); });
};

@@ -1155,15 +1151,14 @@ }

return UpgradeModule;
}();
UpgradeModule.decorators = [{ type: _core.NgModule, args: [{ providers: [angular1Providers, ContentProjectionHelper] }] }];
}());
UpgradeModule.decorators = [
{ type: _angular_core.NgModule, args: [{ providers: [angular1Providers, ContentProjectionHelper] },] },
];
/** @nocollapse */
UpgradeModule.ctorParameters = function () {
return [{ type: _core.Injector }, { type: _core.NgZone }];
return [
{ type: _angular_core.Injector, },
{ type: _angular_core.NgZone, },
];
};
exports.ɵf = ContentProjectionHelper;
exports.ɵe = angular1Providers;
exports.ɵc = compileFactory;
exports.ɵa = injectorFactory;
exports.ɵd = parseFactory;
exports.ɵb = rootScopeFactory;
exports.downgradeComponent = downgradeComponent;

@@ -1174,2 +1169,3 @@ exports.downgradeInjectable = downgradeInjectable;

exports.UpgradeModule = UpgradeModule;
});
}));
/**
* @license Angular v4.0.0-rc.2
* @license Angular v4.0.0-rc.3
* (c) 2010-2017 Google, Inc. https://angular.io/
* License: MIT
*/
!function(global,factory){if("function"==typeof define&&define.amd)define("@angular/upgrade/static",["exports","@angular/core"],factory);else if("undefined"!=typeof exports)factory(exports,require("@angular/core"));else{var mod={exports:{}};factory(mod.exports,global.angularCore),global.ng=global.ng||{},global.ng.upgrade=global.ng.upgrade||{},global.ng.upgrade.static=mod.exports}}(this,function(exports,_core){"use strict";function controllerKey(name){return"$"+name+"Controller"}function getComponentName(component){return component.overriddenName||component.name||component.toString().split("\n")[0]}function supportsNgModel(component){return"function"==typeof component.writeValue&&"function"==typeof component.registerOnChange}function hookupNgModel(ngModel,component){ngModel&&supportsNgModel(component)&&(ngModel.$render=function(){component.writeValue(ngModel.$viewValue)},component.registerOnChange(ngModel.$setViewValue.bind(ngModel)))}function downgradeComponent(info){var idPrefix="NG2_UPGRADE_"+downgradeCount++ +"_",idCount=0,directiveFactory=function($compile,$injector,$parse){return{restrict:"E",terminal:!0,require:[REQUIRE_INJECTOR,REQUIRE_NG_MODEL],link:function(scope,element,attrs,required){var parentInjector=required[0]||$injector.get(INJECTOR_KEY),ngModel=required[1],downgradeFn=function(injector){var componentFactoryResolver=injector.get(_core.ComponentFactoryResolver),componentFactory=componentFactoryResolver.resolveComponentFactory(info.component);if(!componentFactory)throw new Error("Expecting ComponentFactory for: "+getComponentName(info.component));var id=idPrefix+idCount++,injectorPromise=new ParentInjectorPromise(element),facade=new DowngradeComponentAdapter(id,info,element,attrs,scope,ngModel,injector,$injector,$compile,$parse,componentFactory),projectableNodes=facade.compileContents();facade.createComponent(projectableNodes),facade.setupInputs(),facade.setupOutputs(),facade.registerCleanup(),injectorPromise.resolve(facade.getInjector())};parentInjector instanceof ParentInjectorPromise?parentInjector.then(downgradeFn):downgradeFn(parentInjector)}}};return directiveFactory.$inject=[$COMPILE,$INJECTOR,$PARSE],directiveFactory}function downgradeInjectable(token){var factory=function(i){return i.get(token)};return factory.$inject=[INJECTOR_KEY],factory}/**
!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports,require("@angular/core")):"function"==typeof define&&define.amd?define(["exports","@angular/core"],factory):factory((global.ng=global.ng||{},global.ng.upgrade=global.ng.upgrade||{},global.ng.upgrade.static=global.ng.upgrade.static||{}),global.ng.core)}(this,function(exports,_angular_core){"use strict";function controllerKey(name){return"$"+name+"Controller"}function getComponentName(component){return component.overriddenName||component.name||component.toString().split("\n")[0]}function supportsNgModel(component){return"function"==typeof component.writeValue&&"function"==typeof component.registerOnChange}function hookupNgModel(ngModel,component){ngModel&&supportsNgModel(component)&&(ngModel.$render=function(){component.writeValue(ngModel.$viewValue)},component.registerOnChange(ngModel.$setViewValue.bind(ngModel)))}function downgradeComponent(info){var idPrefix="NG2_UPGRADE_"+downgradeCount++ +"_",idCount=0,directiveFactory=function($compile,$injector,$parse){return{restrict:"E",terminal:!0,require:[REQUIRE_INJECTOR,REQUIRE_NG_MODEL],link:function(scope,element,attrs,required){var parentInjector=required[0]||$injector.get(INJECTOR_KEY),ngModel=required[1],downgradeFn=function(injector){var componentFactoryResolver=injector.get(_angular_core.ComponentFactoryResolver),componentFactory=componentFactoryResolver.resolveComponentFactory(info.component);if(!componentFactory)throw new Error("Expecting ComponentFactory for: "+getComponentName(info.component));var id=idPrefix+idCount++,injectorPromise=new ParentInjectorPromise(element),facade=new DowngradeComponentAdapter(id,info,element,attrs,scope,ngModel,injector,$injector,$compile,$parse,componentFactory),projectableNodes=facade.compileContents();facade.createComponent(projectableNodes),facade.setupInputs(),facade.setupOutputs(),facade.registerCleanup(),injectorPromise.resolve(facade.getInjector())};parentInjector instanceof ParentInjectorPromise?parentInjector.then(downgradeFn):downgradeFn(parentInjector)}}};return directiveFactory.$inject=[$COMPILE,$INJECTOR,$PARSE],directiveFactory}function downgradeInjectable(token){var factory=function(i){return i.get(token)};return factory.$inject=[INJECTOR_KEY],factory}/**
* @license

@@ -13,2 +13,16 @@ * Copyright Google Inc. All Rights Reserved.

*/
function noNg(){throw new Error("AngularJS v1.x is not loaded!")}function looseIdentical(a,b){return a===b||"number"==typeof a&&"number"==typeof b&&isNaN(a)&&isNaN(b)}function getOrCall(property){return isFunction(property)?property():property}function isFunction(value){return"function"==typeof value}function isMap(value){return value&&!Array.isArray(value)&&"object"===("undefined"==typeof value?"undefined":_typeof(value))}function setTempInjectorRef(injector){tempInjectorRef=injector}function injectorFactory(){var injector=tempInjectorRef;return tempInjectorRef=null,injector}function rootScopeFactory(i){return i.get("$rootScope")}function compileFactory(i){return i.get("$compile")}function parseFactory(i){return i.get("$parse")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.UpgradeModule=exports.UpgradeComponent=exports.VERSION=exports.downgradeInjectable=exports.downgradeComponent=exports.ɵb=exports.ɵd=exports.ɵa=exports.ɵc=exports.ɵe=exports.ɵf=void 0;var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},$COMPILE="$compile",$CONTROLLER="$controller",$DELEGATE="$delegate",$HTTP_BACKEND="$httpBackend",$INJECTOR="$injector",$PARSE="$parse",$PROVIDE="$provide",$SCOPE="$scope",$TEMPLATE_CACHE="$templateCache",$$TESTABILITY="$$testability",INJECTOR_KEY="$$angularInjector",REQUIRE_INJECTOR="?^^"+INJECTOR_KEY,REQUIRE_NG_MODEL="?ngModel",UPGRADE_MODULE_NAME="$$UpgradeModule",PropertyBinding=function(){function PropertyBinding(binding){this.binding=binding,this.parseBinding()}return PropertyBinding.prototype.parseBinding=function(){var parts=this.binding.split(":");this.prop=parts[0].trim(),this.attr=(parts[1]||this.prop).trim(),this.bracketAttr="["+this.attr+"]",this.parenAttr="("+this.attr+")",this.bracketParenAttr="[("+this.attr+")]";var capitalAttr=this.attr.charAt(0).toUpperCase()+this.attr.substr(1);this.onAttr="on"+capitalAttr,this.bindAttr="bind"+capitalAttr,this.bindonAttr="bindon"+capitalAttr},PropertyBinding}(),ContentProjectionHelper=function(){function ContentProjectionHelper(){}return ContentProjectionHelper.prototype.groupProjectableNodes=function($injector,component,nodes){return[nodes]},ContentProjectionHelper}(),INITIAL_VALUE={__UNINITIALIZED__:!0},DowngradeComponentAdapter=function(){function DowngradeComponentAdapter(id,info,element,attrs,scope,ngModel,parentInjector,$injector,$compile,$parse,componentFactory){this.id=id,this.info=info,this.element=element,this.attrs=attrs,this.scope=scope,this.ngModel=ngModel,this.parentInjector=parentInjector,this.$injector=$injector,this.$compile=$compile,this.$parse=$parse,this.componentFactory=componentFactory,this.inputChangeCount=0,this.inputChanges=null,this.componentRef=null,this.component=null,this.changeDetector=null,this.element[0].id=id,this.componentScope=scope.$new()}return DowngradeComponentAdapter.prototype.compileContents=function(){var _this=this,compiledProjectableNodes=[],projectionHelper=this.parentInjector.get(ContentProjectionHelper),projectableNodes=projectionHelper.groupProjectableNodes(this.$injector,this.info.component,this.element.contents()),linkFns=projectableNodes.map(function(nodes){return _this.$compile(nodes)});return this.element.empty(),linkFns.forEach(function(linkFn){linkFn(_this.scope,function(clone){compiledProjectableNodes.push(clone),_this.element.append(clone)})}),compiledProjectableNodes},DowngradeComponentAdapter.prototype.createComponent=function(projectableNodes){var childInjector=_core.ReflectiveInjector.resolveAndCreate([{provide:$SCOPE,useValue:this.componentScope}],this.parentInjector);this.componentRef=this.componentFactory.create(childInjector,projectableNodes,this.element[0]),this.changeDetector=this.componentRef.changeDetectorRef,this.component=this.componentRef.instance,hookupNgModel(this.ngModel,this.component)},DowngradeComponentAdapter.prototype.setupInputs=function(){for(var _this=this,attrs=this.attrs,inputs=this.info.inputs||[],i=0;i<inputs.length;i++){var input=new PropertyBinding(inputs[i]),expr=null;if(attrs.hasOwnProperty(input.attr)){var observeFn=function(prop){var prevValue=INITIAL_VALUE;return function(currValue){prevValue===INITIAL_VALUE&&(prevValue=currValue),_this.updateInput(prop,prevValue,currValue),prevValue=currValue}}(input.prop);attrs.$observe(input.attr,observeFn)}else attrs.hasOwnProperty(input.bindAttr)?expr=attrs[input.bindAttr]:attrs.hasOwnProperty(input.bracketAttr)?expr=attrs[input.bracketAttr]:attrs.hasOwnProperty(input.bindonAttr)?expr=attrs[input.bindonAttr]:attrs.hasOwnProperty(input.bracketParenAttr)&&(expr=attrs[input.bracketParenAttr]);if(null!=expr){var watchFn=function(prop){return function(currValue,prevValue){return _this.updateInput(prop,prevValue,currValue)}}(input.prop);this.componentScope.$watch(expr,watchFn)}}var prototype=this.info.component.prototype;prototype&&prototype.ngOnChanges&&(this.inputChanges={},this.componentScope.$watch(function(){return _this.inputChangeCount},function(){var inputChanges=_this.inputChanges;_this.inputChanges={},_this.component.ngOnChanges(inputChanges)})),this.componentScope.$watch(function(){return _this.changeDetector&&_this.changeDetector.detectChanges()})},DowngradeComponentAdapter.prototype.setupOutputs=function(){for(var _this=this,attrs=this.attrs,outputs=this.info.outputs||[],j=0;j<outputs.length;j++){var output=new PropertyBinding(outputs[j]),expr=null,assignExpr=!1,bindonAttr=output.bindonAttr?output.bindonAttr.substring(0,output.bindonAttr.length-6):null,bracketParenAttr=output.bracketParenAttr?"[("+output.bracketParenAttr.substring(2,output.bracketParenAttr.length-8)+")]":null;if(attrs.hasOwnProperty(output.onAttr)?expr=attrs[output.onAttr]:attrs.hasOwnProperty(output.parenAttr)?expr=attrs[output.parenAttr]:attrs.hasOwnProperty(bindonAttr)?(expr=attrs[bindonAttr],assignExpr=!0):attrs.hasOwnProperty(bracketParenAttr)&&(expr=attrs[bracketParenAttr],assignExpr=!0),null!=expr&&null!=assignExpr){var getter=this.$parse(expr),setter=getter.assign;if(assignExpr&&!setter)throw new Error("Expression '"+expr+"' is not assignable!");var emitter=this.component[output.prop];if(!emitter)throw new Error("Missing emitter '"+output.prop+"' on component '"+getComponentName(this.info.component)+"'!");emitter.subscribe({next:assignExpr?function(setter){return function(v){return setter(_this.scope,v)}}(setter):function(getter){return function(v){return getter(_this.scope,{$event:v})}}(getter)})}}},DowngradeComponentAdapter.prototype.registerCleanup=function(){var _this=this;this.element.bind("$destroy",function(){_this.componentScope.$destroy(),_this.componentRef.destroy()})},DowngradeComponentAdapter.prototype.getInjector=function(){return this.componentRef&&this.componentRef.injector},DowngradeComponentAdapter.prototype.updateInput=function(prop,prevValue,currValue){this.inputChanges&&(this.inputChangeCount++,this.inputChanges[prop]=new _core.SimpleChange(prevValue,currValue,prevValue===currValue)),this.component[prop]=currValue},DowngradeComponentAdapter}(),downgradeCount=0,ParentInjectorPromise=function(){function ParentInjectorPromise(element){this.element=element,this.injectorKey=controllerKey(INJECTOR_KEY),this.callbacks=[],element.data(this.injectorKey,this)}return ParentInjectorPromise.prototype.then=function(callback){this.injector?callback(this.injector):this.callbacks.push(callback)},ParentInjectorPromise.prototype.resolve=function(injector){this.injector=injector,this.element.data(this.injectorKey,injector),this.element=null,this.callbacks.forEach(function(callback){return callback(injector)}),this.callbacks.length=0},ParentInjectorPromise}(),VERSION=new _core.Version("4.0.0-rc.2"),angular={bootstrap:noNg,module:noNg,element:noNg,version:noNg,resumeBootstrap:noNg,getTestability:noNg};try{window.hasOwnProperty("angular")&&(angular=window.angular)}catch(e){}var tempInjectorRef,bootstrap=angular.bootstrap,module$1=angular.module,element=angular.element,REQUIRE_PREFIX_RE=/^(\^\^?)?(\?)?(\^\^?)?/,NOT_SUPPORTED="NOT_SUPPORTED",INITIAL_VALUE$1={__UNINITIALIZED__:!0},Bindings=function(){function Bindings(){this.twoWayBoundProperties=[],this.twoWayBoundLastValues=[],this.expressionBoundProperties=[],this.propertyToOutputMap={}}return Bindings}(),UpgradeComponent=function(){function UpgradeComponent(name,elementRef,injector){this.name=name,this.elementRef=elementRef,this.injector=injector,this.controllerInstance=null,this.bindingDestination=null,this.$injector=injector.get($INJECTOR),this.$compile=this.$injector.get($COMPILE),this.$templateCache=this.$injector.get($TEMPLATE_CACHE),this.$httpBackend=this.$injector.get($HTTP_BACKEND),this.$controller=this.$injector.get($CONTROLLER),this.element=elementRef.nativeElement,this.$element=element(this.element),this.directive=this.getDirective(name),this.bindings=this.initializeBindings(this.directive),this.linkFn=this.compileTemplate(this.directive);var $parentScope=injector.get($SCOPE);this.$componentScope=$parentScope.$new(!!this.directive.scope);var controllerType=this.directive.controller,bindToController=this.directive.bindToController;if(controllerType)this.controllerInstance=this.buildController(controllerType,this.$componentScope,this.$element,this.directive.controllerAs);else if(bindToController)throw new Error("Upgraded directive '"+name+"' specifies 'bindToController' but no controller.");this.bindingDestination=bindToController?this.controllerInstance:this.$componentScope,this.setupOutputs()}return UpgradeComponent.prototype.ngOnInit=function(){var _this=this,attrs=NOT_SUPPORTED,transcludeFn=NOT_SUPPORTED,directiveRequire=this.getDirectiveRequire(this.directive),requiredControllers=this.resolveRequire(this.directive.name,this.$element,directiveRequire);if(this.directive.bindToController&&isMap(directiveRequire)){var requiredControllersMap_1=requiredControllers;Object.keys(requiredControllersMap_1).forEach(function(key){_this.controllerInstance[key]=requiredControllersMap_1[key]})}if(this.controllerInstance&&isFunction(this.controllerInstance.$onInit)&&this.controllerInstance.$onInit(),this.controllerInstance&&isFunction(this.controllerInstance.$doCheck)){var callDoCheck=function(){return _this.controllerInstance.$doCheck()};this.unregisterDoCheckWatcher=this.$componentScope.$parent.$watch(callDoCheck),callDoCheck()}var link=this.directive.link,preLink="object"==("undefined"==typeof link?"undefined":_typeof(link))&&link.pre,postLink="object"==("undefined"==typeof link?"undefined":_typeof(link))?link.post:link;preLink&&preLink(this.$componentScope,this.$element,attrs,requiredControllers,transcludeFn);for(var childNode,childNodes=[];childNode=this.element.firstChild;)this.element.removeChild(childNode),childNodes.push(childNode);var attachElement=function(clonedElements,scope){_this.$element.append(clonedElements)},attachChildNodes=function(scope,cloneAttach){return cloneAttach(childNodes)};this.linkFn(this.$componentScope,attachElement,{parentBoundTranscludeFn:attachChildNodes}),postLink&&postLink(this.$componentScope,this.$element,attrs,requiredControllers,transcludeFn),this.controllerInstance&&isFunction(this.controllerInstance.$postLink)&&this.controllerInstance.$postLink()},UpgradeComponent.prototype.ngOnChanges=function(changes){var _this=this;Object.keys(changes).forEach(function(propName){return _this.bindingDestination[propName]=changes[propName].currentValue}),isFunction(this.bindingDestination.$onChanges)&&this.bindingDestination.$onChanges(changes)},UpgradeComponent.prototype.ngDoCheck=function(){var _this=this,twoWayBoundProperties=this.bindings.twoWayBoundProperties,twoWayBoundLastValues=this.bindings.twoWayBoundLastValues,propertyToOutputMap=this.bindings.propertyToOutputMap;twoWayBoundProperties.forEach(function(propName,idx){var newValue=_this.bindingDestination[propName],oldValue=twoWayBoundLastValues[idx];if(!looseIdentical(newValue,oldValue)){var outputName=propertyToOutputMap[propName],eventEmitter=_this[outputName];eventEmitter.emit(newValue),twoWayBoundLastValues[idx]=newValue}})},UpgradeComponent.prototype.ngOnDestroy=function(){isFunction(this.unregisterDoCheckWatcher)&&this.unregisterDoCheckWatcher(),this.controllerInstance&&isFunction(this.controllerInstance.$onDestroy)&&this.controllerInstance.$onDestroy(),this.$componentScope.$destroy()},UpgradeComponent.prototype.getDirective=function(name){var directives=this.$injector.get(name+"Directive");if(directives.length>1)throw new Error("Only support single directive definition for: "+this.name);var directive=directives[0];directive.replace&&this.notSupported("replace"),directive.terminal&&this.notSupported("terminal"),directive.compile&&this.notSupported("compile");var link=directive.link;return"object"==("undefined"==typeof link?"undefined":_typeof(link))&&link.post&&this.notSupported("link.post"),directive},UpgradeComponent.prototype.getDirectiveRequire=function(directive){var require=directive.require||directive.controller&&directive.name;return isMap(require)&&Object.keys(require).forEach(function(key){var value=require[key],match=value.match(REQUIRE_PREFIX_RE),name=value.substring(match[0].length);name||(require[key]=match[0]+key)}),require},UpgradeComponent.prototype.initializeBindings=function(directive){var _this=this,btcIsObject="object"===_typeof(directive.bindToController);if(btcIsObject&&Object.keys(directive.scope).length)throw new Error("Binding definitions on scope and controller at the same time is not supported.");var context=btcIsObject?directive.bindToController:directive.scope,bindings=new Bindings;return"object"==("undefined"==typeof context?"undefined":_typeof(context))&&Object.keys(context).forEach(function(propName){var definition=context[propName],bindingType=definition.charAt(0);switch(bindingType){case"@":case"<":break;case"=":bindings.twoWayBoundProperties.push(propName),bindings.twoWayBoundLastValues.push(INITIAL_VALUE$1),bindings.propertyToOutputMap[propName]=propName+"Change";break;case"&":bindings.expressionBoundProperties.push(propName),bindings.propertyToOutputMap[propName]=propName;break;default:var json=JSON.stringify(context);throw new Error("Unexpected mapping '"+bindingType+"' in '"+json+"' in '"+_this.name+"' directive.")}}),bindings},UpgradeComponent.prototype.compileTemplate=function(directive){if(void 0!==this.directive.template)return this.compileHtml(getOrCall(this.directive.template));if(this.directive.templateUrl){var url=getOrCall(this.directive.templateUrl),html=this.$templateCache.get(url);if(void 0!==html)return this.compileHtml(html);throw new Error("loading directive templates asynchronously is not supported")}throw new Error("Directive '"+this.name+"' is not a component, it is missing template.")},UpgradeComponent.prototype.buildController=function(controllerType,$scope,$element,controllerAs){var locals={$scope:$scope,$element:$element},controller=this.$controller(controllerType,locals,null,controllerAs);return $element.data(controllerKey(this.directive.name),controller),controller},UpgradeComponent.prototype.resolveRequire=function(directiveName,$element,require){var _this=this;if(require){if(Array.isArray(require))return require.map(function(req){return _this.resolveRequire(directiveName,$element,req)});if("object"===("undefined"==typeof require?"undefined":_typeof(require))){var value_1={};return Object.keys(require).forEach(function(key){return value_1[key]=_this.resolveRequire(directiveName,$element,require[key])}),value_1}if("string"==typeof require){var match=require.match(REQUIRE_PREFIX_RE),inheritType=match[1]||match[3],name_1=require.substring(match[0].length),isOptional=!!match[2],searchParents=!!inheritType,startOnParent="^^"===inheritType,ctrlKey=controllerKey(name_1);startOnParent&&($element=$element.parent());var value=searchParents?$element.inheritedData(ctrlKey):$element.data(ctrlKey);if(!value&&!isOptional)throw new Error("Unable to find required '"+require+"' in upgraded directive '"+directiveName+"'.");return value}throw new Error("Unrecognized require syntax on upgraded directive '"+directiveName+"': "+require)}return null},UpgradeComponent.prototype.setupOutputs=function(){var _this=this;this.bindings.twoWayBoundProperties.forEach(function(propName){var outputName=_this.bindings.propertyToOutputMap[propName];_this[outputName]=new _core.EventEmitter}),this.bindings.expressionBoundProperties.forEach(function(propName){var outputName=_this.bindings.propertyToOutputMap[propName],emitter=_this[outputName]=new _core.EventEmitter;_this.bindingDestination[propName]=function(value){return emitter.emit(value)}})},UpgradeComponent.prototype.notSupported=function(feature){throw new Error("Upgraded directive '"+this.name+"' contains unsupported feature: '"+feature+"'.")},UpgradeComponent.prototype.compileHtml=function(html){var div=document.createElement("div");return div.innerHTML=html,this.$compile(div.childNodes)},UpgradeComponent}(),angular1Providers=[{provide:"$injector",useFactory:injectorFactory},{provide:"$rootScope",useFactory:rootScopeFactory,deps:["$injector"]},{provide:"$compile",useFactory:compileFactory,deps:["$injector"]},{provide:"$parse",useFactory:parseFactory,deps:["$injector"]}],UpgradeModule=function(){function UpgradeModule(injector,ngZone){this.injector=injector,this.ngZone=ngZone}return UpgradeModule.prototype.bootstrap=function(element$$,modules,config){var _this=this;void 0===modules&&(modules=[]);var INIT_MODULE_NAME=UPGRADE_MODULE_NAME+".init",upgradeModule=(module$1(INIT_MODULE_NAME,[]).value(INJECTOR_KEY,this.injector).config([$PROVIDE,$INJECTOR,function($provide,$injector){$injector.has($$TESTABILITY)&&$provide.decorator($$TESTABILITY,[$DELEGATE,function(testabilityDelegate){var originalWhenStable=testabilityDelegate.whenStable,injector=_this.injector,newWhenStable=function newWhenStable(callback){originalWhenStable.call(testabilityDelegate,function(){var ng2Testability=injector.get(_core.Testability);ng2Testability.isStable()?callback():ng2Testability.whenStable(newWhenStable.bind(testabilityDelegate,callback))})};return testabilityDelegate.whenStable=newWhenStable,testabilityDelegate}])}]).run([$INJECTOR,function($injector){_this.$injector=$injector,setTempInjectorRef($injector),_this.injector.get($INJECTOR),element(element$$).data(controllerKey(INJECTOR_KEY),_this.injector),setTimeout(function(){var $rootScope=$injector.get("$rootScope"),subscription=_this.ngZone.onMicrotaskEmpty.subscribe(function(){return $rootScope.$digest()});$rootScope.$on("$destroy",function(){subscription.unsubscribe()})},0)}]),module$1(UPGRADE_MODULE_NAME,[INIT_MODULE_NAME].concat(modules))),windowAngular=window.angular;if(windowAngular.resumeBootstrap=void 0,this.ngZone.run(function(){bootstrap(element$$,[upgradeModule.name],config)}),windowAngular.resumeBootstrap){var originalResumeBootstrap_1=windowAngular.resumeBootstrap,ngZone_1=this.ngZone;windowAngular.resumeBootstrap=function(){var _this=this,args=arguments;windowAngular.resumeBootstrap=originalResumeBootstrap_1,ngZone_1.run(function(){windowAngular.resumeBootstrap.apply(_this,args)})}}},UpgradeModule}();UpgradeModule.decorators=[{type:_core.NgModule,args:[{providers:[angular1Providers,ContentProjectionHelper]}]}],UpgradeModule.ctorParameters=function(){return[{type:_core.Injector},{type:_core.NgZone}]},exports.ɵf=ContentProjectionHelper,exports.ɵe=angular1Providers,exports.ɵc=compileFactory,exports.ɵa=injectorFactory,exports.ɵd=parseFactory,exports.ɵb=rootScopeFactory,exports.downgradeComponent=downgradeComponent,exports.downgradeInjectable=downgradeInjectable,exports.VERSION=VERSION,exports.UpgradeComponent=UpgradeComponent,exports.UpgradeModule=UpgradeModule});
function noNg(){throw new Error("AngularJS v1.x is not loaded!")}function getOrCall(property){return isFunction(property)?property():property}function isFunction(value){return"function"==typeof value}function isMap(value){return value&&!Array.isArray(value)&&"object"==typeof value}function setTempInjectorRef(injector){tempInjectorRef=injector}function injectorFactory(){var injector=tempInjectorRef;return tempInjectorRef=null,injector}function rootScopeFactory(i){return i.get("$rootScope")}function compileFactory(i){return i.get("$compile")}function parseFactory(i){return i.get("$parse")}/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var $COMPILE="$compile",$CONTROLLER="$controller",$DELEGATE="$delegate",$HTTP_BACKEND="$httpBackend",$INJECTOR="$injector",$PARSE="$parse",$PROVIDE="$provide",$SCOPE="$scope",$TEMPLATE_CACHE="$templateCache",$$TESTABILITY="$$testability",INJECTOR_KEY="$$angularInjector",REQUIRE_INJECTOR="?^^"+INJECTOR_KEY,REQUIRE_NG_MODEL="?ngModel",UPGRADE_MODULE_NAME="$$UpgradeModule",PropertyBinding=function(){function PropertyBinding(binding){this.binding=binding,this.parseBinding()}return PropertyBinding.prototype.parseBinding=function(){var parts=this.binding.split(":");this.prop=parts[0].trim(),this.attr=(parts[1]||this.prop).trim(),this.bracketAttr="["+this.attr+"]",this.parenAttr="("+this.attr+")",this.bracketParenAttr="[("+this.attr+")]";var capitalAttr=this.attr.charAt(0).toUpperCase()+this.attr.substr(1);this.onAttr="on"+capitalAttr,this.bindAttr="bind"+capitalAttr,this.bindonAttr="bindon"+capitalAttr},PropertyBinding}(),ContentProjectionHelper=function(){function ContentProjectionHelper(){}return ContentProjectionHelper.prototype.groupProjectableNodes=function($injector,component,nodes){return[nodes]},ContentProjectionHelper}(),INITIAL_VALUE={__UNINITIALIZED__:!0},DowngradeComponentAdapter=function(){function DowngradeComponentAdapter(id,info,element,attrs,scope,ngModel,parentInjector,$injector,$compile,$parse,componentFactory){this.id=id,this.info=info,this.element=element,this.attrs=attrs,this.scope=scope,this.ngModel=ngModel,this.parentInjector=parentInjector,this.$injector=$injector,this.$compile=$compile,this.$parse=$parse,this.componentFactory=componentFactory,this.inputChangeCount=0,this.inputChanges=null,this.componentRef=null,this.component=null,this.changeDetector=null,this.element[0].id=id,this.componentScope=scope.$new()}return DowngradeComponentAdapter.prototype.compileContents=function(){var _this=this,compiledProjectableNodes=[],projectionHelper=this.parentInjector.get(ContentProjectionHelper),projectableNodes=projectionHelper.groupProjectableNodes(this.$injector,this.info.component,this.element.contents()),linkFns=projectableNodes.map(function(nodes){return _this.$compile(nodes)});return this.element.empty(),linkFns.forEach(function(linkFn){linkFn(_this.scope,function(clone){compiledProjectableNodes.push(clone),_this.element.append(clone)})}),compiledProjectableNodes},DowngradeComponentAdapter.prototype.createComponent=function(projectableNodes){var childInjector=_angular_core.ReflectiveInjector.resolveAndCreate([{provide:$SCOPE,useValue:this.componentScope}],this.parentInjector);this.componentRef=this.componentFactory.create(childInjector,projectableNodes,this.element[0]),this.changeDetector=this.componentRef.changeDetectorRef,this.component=this.componentRef.instance,hookupNgModel(this.ngModel,this.component)},DowngradeComponentAdapter.prototype.setupInputs=function(){for(var _this=this,attrs=this.attrs,inputs=this.info.inputs||[],i=0;i<inputs.length;i++){var input=new PropertyBinding(inputs[i]),expr=null;if(attrs.hasOwnProperty(input.attr)){var observeFn=function(prop){var prevValue=INITIAL_VALUE;return function(currValue){prevValue===INITIAL_VALUE&&(prevValue=currValue),_this.updateInput(prop,prevValue,currValue),prevValue=currValue}}(input.prop);attrs.$observe(input.attr,observeFn)}else attrs.hasOwnProperty(input.bindAttr)?expr=attrs[input.bindAttr]:attrs.hasOwnProperty(input.bracketAttr)?expr=attrs[input.bracketAttr]:attrs.hasOwnProperty(input.bindonAttr)?expr=attrs[input.bindonAttr]:attrs.hasOwnProperty(input.bracketParenAttr)&&(expr=attrs[input.bracketParenAttr]);if(null!=expr){var watchFn=function(prop){return function(currValue,prevValue){return _this.updateInput(prop,prevValue,currValue)}}(input.prop);this.componentScope.$watch(expr,watchFn)}}var prototype=this.info.component.prototype;prototype&&prototype.ngOnChanges&&(this.inputChanges={},this.componentScope.$watch(function(){return _this.inputChangeCount},function(){var inputChanges=_this.inputChanges;_this.inputChanges={},_this.component.ngOnChanges(inputChanges)})),this.componentScope.$watch(function(){return _this.changeDetector&&_this.changeDetector.detectChanges()})},DowngradeComponentAdapter.prototype.setupOutputs=function(){for(var _this=this,attrs=this.attrs,outputs=this.info.outputs||[],j=0;j<outputs.length;j++){var output=new PropertyBinding(outputs[j]),expr=null,assignExpr=!1,bindonAttr=output.bindonAttr?output.bindonAttr.substring(0,output.bindonAttr.length-6):null,bracketParenAttr=output.bracketParenAttr?"[("+output.bracketParenAttr.substring(2,output.bracketParenAttr.length-8)+")]":null;if(attrs.hasOwnProperty(output.onAttr)?expr=attrs[output.onAttr]:attrs.hasOwnProperty(output.parenAttr)?expr=attrs[output.parenAttr]:attrs.hasOwnProperty(bindonAttr)?(expr=attrs[bindonAttr],assignExpr=!0):attrs.hasOwnProperty(bracketParenAttr)&&(expr=attrs[bracketParenAttr],assignExpr=!0),null!=expr&&null!=assignExpr){var getter=this.$parse(expr),setter=getter.assign;if(assignExpr&&!setter)throw new Error("Expression '"+expr+"' is not assignable!");var emitter=this.component[output.prop];if(!emitter)throw new Error("Missing emitter '"+output.prop+"' on component '"+getComponentName(this.info.component)+"'!");emitter.subscribe({next:assignExpr?function(setter){return function(v){return setter(_this.scope,v)}}(setter):function(getter){return function(v){return getter(_this.scope,{$event:v})}}(getter)})}}},DowngradeComponentAdapter.prototype.registerCleanup=function(){var _this=this;this.element.bind("$destroy",function(){_this.componentScope.$destroy(),_this.componentRef.destroy()})},DowngradeComponentAdapter.prototype.getInjector=function(){return this.componentRef&&this.componentRef.injector},DowngradeComponentAdapter.prototype.updateInput=function(prop,prevValue,currValue){this.inputChanges&&(this.inputChangeCount++,this.inputChanges[prop]=new _angular_core.SimpleChange(prevValue,currValue,prevValue===currValue)),this.component[prop]=currValue},DowngradeComponentAdapter}(),downgradeCount=0,ParentInjectorPromise=function(){function ParentInjectorPromise(element){this.element=element,this.injectorKey=controllerKey(INJECTOR_KEY),this.callbacks=[],element.data(this.injectorKey,this)}return ParentInjectorPromise.prototype.then=function(callback){this.injector?callback(this.injector):this.callbacks.push(callback)},ParentInjectorPromise.prototype.resolve=function(injector){this.injector=injector,this.element.data(this.injectorKey,injector),this.element=null,this.callbacks.forEach(function(callback){return callback(injector)}),this.callbacks.length=0},ParentInjectorPromise}(),VERSION=new _angular_core.Version("4.0.0-rc.3"),angular={bootstrap:noNg,module:noNg,element:noNg,version:noNg,resumeBootstrap:noNg,getTestability:noNg};try{window.hasOwnProperty("angular")&&(angular=window.angular)}catch(e){}var tempInjectorRef,bootstrap=angular.bootstrap,module$1=angular.module,element=angular.element,REQUIRE_PREFIX_RE=/^(\^\^?)?(\?)?(\^\^?)?/,NOT_SUPPORTED="NOT_SUPPORTED",INITIAL_VALUE$1={__UNINITIALIZED__:!0},Bindings=function(){function Bindings(){this.twoWayBoundProperties=[],this.twoWayBoundLastValues=[],this.expressionBoundProperties=[],this.propertyToOutputMap={}}return Bindings}(),UpgradeComponent=function(){function UpgradeComponent(name,elementRef,injector){this.name=name,this.elementRef=elementRef,this.injector=injector,this.$injector=injector.get($INJECTOR),this.$compile=this.$injector.get($COMPILE),this.$templateCache=this.$injector.get($TEMPLATE_CACHE),this.$httpBackend=this.$injector.get($HTTP_BACKEND),this.$controller=this.$injector.get($CONTROLLER),this.element=elementRef.nativeElement,this.$element=element(this.element),this.directive=this.getDirective(name),this.bindings=this.initializeBindings(this.directive);var $parentScope=injector.get($SCOPE);this.$componentScope=$parentScope.$new(!!this.directive.scope),this.initializeOutputs()}return UpgradeComponent.prototype.ngOnInit=function(){var _this=this,contentChildNodes=this.extractChildNodes(this.element),linkFn=this.compileTemplate(this.directive),controllerType=this.directive.controller,bindToController=this.directive.bindToController;if(controllerType)this.controllerInstance=this.buildController(controllerType,this.$componentScope,this.$element,this.directive.controllerAs);else if(bindToController)throw new Error("Upgraded directive '"+this.directive.name+"' specifies 'bindToController' but no controller.");this.bindingDestination=bindToController?this.controllerInstance:this.$componentScope,this.bindOutputs();var directiveRequire=this.getDirectiveRequire(this.directive),requiredControllers=this.resolveRequire(this.directive.name,this.$element,directiveRequire);if(this.directive.bindToController&&isMap(directiveRequire)){var requiredControllersMap_1=requiredControllers;Object.keys(requiredControllersMap_1).forEach(function(key){_this.controllerInstance[key]=requiredControllersMap_1[key]})}if(this.pendingChanges&&(this.forwardChanges(this.pendingChanges),this.pendingChanges=null),this.controllerInstance&&isFunction(this.controllerInstance.$onInit)&&this.controllerInstance.$onInit(),this.controllerInstance&&isFunction(this.controllerInstance.$doCheck)){var callDoCheck=function(){return _this.controllerInstance.$doCheck()};this.unregisterDoCheckWatcher=this.$componentScope.$parent.$watch(callDoCheck),callDoCheck()}var link=this.directive.link,preLink="object"==typeof link&&link.pre,postLink="object"==typeof link?link.post:link,attrs=NOT_SUPPORTED,transcludeFn=NOT_SUPPORTED;preLink&&preLink(this.$componentScope,this.$element,attrs,requiredControllers,transcludeFn);var attachChildNodes=function(scope,cloneAttach){return cloneAttach(contentChildNodes)};linkFn(this.$componentScope,null,{parentBoundTranscludeFn:attachChildNodes}),postLink&&postLink(this.$componentScope,this.$element,attrs,requiredControllers,transcludeFn),this.controllerInstance&&isFunction(this.controllerInstance.$postLink)&&this.controllerInstance.$postLink()},UpgradeComponent.prototype.ngOnChanges=function(changes){this.bindingDestination?this.forwardChanges(changes):this.pendingChanges=changes},UpgradeComponent.prototype.ngDoCheck=function(){var _this=this,twoWayBoundProperties=this.bindings.twoWayBoundProperties,twoWayBoundLastValues=this.bindings.twoWayBoundLastValues,propertyToOutputMap=this.bindings.propertyToOutputMap;twoWayBoundProperties.forEach(function(propName,idx){var newValue=_this.bindingDestination[propName],oldValue=twoWayBoundLastValues[idx];if(!_angular_core.ɵlooseIdentical(newValue,oldValue)){var outputName=propertyToOutputMap[propName],eventEmitter=_this[outputName];eventEmitter.emit(newValue),twoWayBoundLastValues[idx]=newValue}})},UpgradeComponent.prototype.ngOnDestroy=function(){isFunction(this.unregisterDoCheckWatcher)&&this.unregisterDoCheckWatcher(),this.controllerInstance&&isFunction(this.controllerInstance.$onDestroy)&&this.controllerInstance.$onDestroy(),this.$componentScope.$destroy()},UpgradeComponent.prototype.getDirective=function(name){var directives=this.$injector.get(name+"Directive");if(directives.length>1)throw new Error("Only support single directive definition for: "+this.name);var directive=directives[0];directive.replace&&this.notSupported("replace"),directive.terminal&&this.notSupported("terminal"),directive.compile&&this.notSupported("compile");var link=directive.link;return"object"==typeof link&&link.post&&this.notSupported("link.post"),directive},UpgradeComponent.prototype.getDirectiveRequire=function(directive){var require=directive.require||directive.controller&&directive.name;return isMap(require)&&Object.keys(require).forEach(function(key){var value=require[key],match=value.match(REQUIRE_PREFIX_RE),name=value.substring(match[0].length);name||(require[key]=match[0]+key)}),require},UpgradeComponent.prototype.initializeBindings=function(directive){var _this=this,btcIsObject="object"==typeof directive.bindToController;if(btcIsObject&&Object.keys(directive.scope).length)throw new Error("Binding definitions on scope and controller at the same time is not supported.");var context=btcIsObject?directive.bindToController:directive.scope,bindings=new Bindings;return"object"==typeof context&&Object.keys(context).forEach(function(propName){var definition=context[propName],bindingType=definition.charAt(0);switch(bindingType){case"@":case"<":break;case"=":bindings.twoWayBoundProperties.push(propName),bindings.twoWayBoundLastValues.push(INITIAL_VALUE$1),bindings.propertyToOutputMap[propName]=propName+"Change";break;case"&":bindings.expressionBoundProperties.push(propName),bindings.propertyToOutputMap[propName]=propName;break;default:var json=JSON.stringify(context);throw new Error("Unexpected mapping '"+bindingType+"' in '"+json+"' in '"+_this.name+"' directive.")}}),bindings},UpgradeComponent.prototype.extractChildNodes=function(element){for(var childNode,childNodes=[];childNode=element.firstChild;)element.removeChild(childNode),childNodes.push(childNode);return childNodes},UpgradeComponent.prototype.compileTemplate=function(directive){if(void 0!==this.directive.template)return this.compileHtml(getOrCall(this.directive.template));if(this.directive.templateUrl){var url=getOrCall(this.directive.templateUrl),html=this.$templateCache.get(url);if(void 0!==html)return this.compileHtml(html);throw new Error("loading directive templates asynchronously is not supported")}throw new Error("Directive '"+this.name+"' is not a component, it is missing template.")},UpgradeComponent.prototype.buildController=function(controllerType,$scope,$element,controllerAs){var locals={$scope:$scope,$element:$element},controller=this.$controller(controllerType,locals,null,controllerAs);return $element.data(controllerKey(this.directive.name),controller),controller},UpgradeComponent.prototype.resolveRequire=function(directiveName,$element,require){var _this=this;if(require){if(Array.isArray(require))return require.map(function(req){return _this.resolveRequire(directiveName,$element,req)});if("object"==typeof require){var value_1={};return Object.keys(require).forEach(function(key){return value_1[key]=_this.resolveRequire(directiveName,$element,require[key])}),value_1}if("string"==typeof require){var match=require.match(REQUIRE_PREFIX_RE),inheritType=match[1]||match[3],name_1=require.substring(match[0].length),isOptional=!!match[2],searchParents=!!inheritType,startOnParent="^^"===inheritType,ctrlKey=controllerKey(name_1);startOnParent&&($element=$element.parent());var value=searchParents?$element.inheritedData(ctrlKey):$element.data(ctrlKey);if(!value&&!isOptional)throw new Error("Unable to find required '"+require+"' in upgraded directive '"+directiveName+"'.");return value}throw new Error("Unrecognized require syntax on upgraded directive '"+directiveName+"': "+require)}return null},UpgradeComponent.prototype.initializeOutputs=function(){var _this=this;this.bindings.twoWayBoundProperties.concat(this.bindings.expressionBoundProperties).forEach(function(propName){var outputName=_this.bindings.propertyToOutputMap[propName];_this[outputName]=new _angular_core.EventEmitter})},UpgradeComponent.prototype.bindOutputs=function(){var _this=this;this.bindings.expressionBoundProperties.forEach(function(propName){var outputName=_this.bindings.propertyToOutputMap[propName],emitter=_this[outputName];_this.bindingDestination[propName]=function(value){return emitter.emit(value)}})},UpgradeComponent.prototype.forwardChanges=function(changes){var _this=this;Object.keys(changes).forEach(function(propName){return _this.bindingDestination[propName]=changes[propName].currentValue}),isFunction(this.bindingDestination.$onChanges)&&this.bindingDestination.$onChanges(changes)},UpgradeComponent.prototype.notSupported=function(feature){throw new Error("Upgraded directive '"+this.name+"' contains unsupported feature: '"+feature+"'.")},UpgradeComponent.prototype.compileHtml=function(html){return this.element.innerHTML=html,this.$compile(this.element.childNodes)},UpgradeComponent}(),angular1Providers=[{provide:"$injector",useFactory:injectorFactory},{provide:"$rootScope",useFactory:rootScopeFactory,deps:["$injector"]},{provide:"$compile",useFactory:compileFactory,deps:["$injector"]},{provide:"$parse",useFactory:parseFactory,deps:["$injector"]}],UpgradeModule=function(){function UpgradeModule(injector,ngZone){this.injector=injector,this.ngZone=ngZone}return UpgradeModule.prototype.bootstrap=function(element$$,modules,config){var _this=this;void 0===modules&&(modules=[]);var INIT_MODULE_NAME=UPGRADE_MODULE_NAME+".init",upgradeModule=(module$1(INIT_MODULE_NAME,[]).value(INJECTOR_KEY,this.injector).config([$PROVIDE,$INJECTOR,function($provide,$injector){$injector.has($$TESTABILITY)&&$provide.decorator($$TESTABILITY,[$DELEGATE,function(testabilityDelegate){var originalWhenStable=testabilityDelegate.whenStable,injector=_this.injector,newWhenStable=function(callback){originalWhenStable.call(testabilityDelegate,function(){var ng2Testability=injector.get(_angular_core.Testability);ng2Testability.isStable()?callback():ng2Testability.whenStable(newWhenStable.bind(testabilityDelegate,callback))})};return testabilityDelegate.whenStable=newWhenStable,testabilityDelegate}])}]).run([$INJECTOR,function($injector){_this.$injector=$injector,setTempInjectorRef($injector),_this.injector.get($INJECTOR),element(element$$).data(controllerKey(INJECTOR_KEY),_this.injector),setTimeout(function(){var $rootScope=$injector.get("$rootScope"),subscription=_this.ngZone.onMicrotaskEmpty.subscribe(function(){return $rootScope.$digest()});$rootScope.$on("$destroy",function(){subscription.unsubscribe()})},0)}]),module$1(UPGRADE_MODULE_NAME,[INIT_MODULE_NAME].concat(modules))),windowAngular=window.angular;if(windowAngular.resumeBootstrap=void 0,this.ngZone.run(function(){bootstrap(element$$,[upgradeModule.name],config)}),windowAngular.resumeBootstrap){var originalResumeBootstrap_1=windowAngular.resumeBootstrap,ngZone_1=this.ngZone;windowAngular.resumeBootstrap=function(){var _this=this,args=arguments;windowAngular.resumeBootstrap=originalResumeBootstrap_1,ngZone_1.run(function(){windowAngular.resumeBootstrap.apply(_this,args)})}}},UpgradeModule}();UpgradeModule.decorators=[{type:_angular_core.NgModule,args:[{providers:[angular1Providers,ContentProjectionHelper]}]}],UpgradeModule.ctorParameters=function(){return[{type:_angular_core.Injector},{type:_angular_core.NgZone}]},exports.downgradeComponent=downgradeComponent,exports.downgradeInjectable=downgradeInjectable,exports.VERSION=VERSION,exports.UpgradeComponent=UpgradeComponent,exports.UpgradeModule=UpgradeModule});

@@ -1,1 +0,20 @@

!function(global,factory){if("function"==typeof define&&define.amd)define("@angular/upgrade",["exports","@angular/core","@angular/compiler","@angular/platform-browser-dynamic"],factory);else if("undefined"!=typeof exports)factory(exports,require("@angular/core"),require("@angular/compiler"),require("@angular/platform-browser-dynamic"));else{var mod={exports:{}};factory(mod.exports,global.ng.core,global.ng.compiler,global.ng.platformBrowserDynamic),global.ng=global.ng||{},global.ng.upgrade=mod.exports}}(this,function(exports,_core,_compiler,_platformBrowserDynamic){"use strict";function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function noNg(){throw new Error("AngularJS v1.x is not loaded!")}function onError(a){throw console.error?console.error(a,a.stack):console.log(a,a.stack),a}function controllerKey(a){return"$"+a+"Controller"}function getAttributesAsArray(a){var b=a.attributes,c=void 0;if(b){var d=b.length;c=Array(d);for(var f=0;f<d;f++)c[f]=[b[f].nodeName,b[f].nodeValue]}return c||[]}function getComponentName(a){return a.overriddenName||a.name||a.toString().split("\n")[0]}function supportsNgModel(a){return"function"==typeof a.writeValue&&"function"==typeof a.registerOnChange}function hookupNgModel(a,b){a&&supportsNgModel(b)&&(a.$render=function(){b.writeValue(a.$viewValue)},b.registerOnChange(a.$setViewValue.bind(a)))}function downgradeComponent(a){var b="NG2_UPGRADE_"+downgradeCount++ +"_",c=0,d=function(f,g,h){return{restrict:"E",terminal:!0,require:[REQUIRE_INJECTOR,REQUIRE_NG_MODEL],link:function(l,m,n,o){var p=o[0]||g.get(INJECTOR_KEY),q=o[1],r=function(s){var t=s.get(_core.ComponentFactoryResolver),u=t.resolveComponentFactory(a.component);if(!u)throw new Error("Expecting ComponentFactory for: "+getComponentName(a.component));var w=b+c++,x=new ParentInjectorPromise$1(m),y=new DowngradeComponentAdapter(w,a,m,n,l,q,s,g,f,h,u),z=y.compileContents();y.createComponent(z),y.setupInputs(),y.setupOutputs(),y.registerCleanup(),x.resolve(y.getInjector())};p instanceof ParentInjectorPromise$1?p.then(r):r(p)}}};return d.$inject=[$COMPILE,$INJECTOR,$PARSE],d}function downgradeInjectable(a){var b=function(c){return c.get(a)};return b.$inject=[INJECTOR_KEY],b}function isFunction(a){return"function"==typeof a}Object.defineProperty(exports,"__esModule",{value:!0}),exports.UpgradeAdapterRef=exports.UpgradeAdapter=exports.VERSION=void 0;var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),VERSION=new _core.Version("4.0.0-rc.2"),angular={bootstrap:noNg,module:noNg,element:noNg,version:noNg,resumeBootstrap:noNg,getTestability:noNg};try{window.hasOwnProperty("angular")&&(angular=window.angular)}catch(a){}var _bootstrap=angular.bootstrap,module$1=angular.module,element=angular.element,$COMPILE="$compile",$CONTROLLER="$controller",$HTTP_BACKEND="$httpBackend",$INJECTOR="$injector",$PARSE="$parse",$ROOT_SCOPE="$rootScope",$SCOPE="$scope",$TEMPLATE_CACHE="$templateCache",$$TESTABILITY="$$testability",COMPILER_KEY="$$angularCompiler",INJECTOR_KEY="$$angularInjector",NG_ZONE_KEY="$$angularNgZone",REQUIRE_INJECTOR="?^^"+INJECTOR_KEY,REQUIRE_NG_MODEL="?ngModel",ContentProjectionHelper=function(){function ContentProjectionHelper(){_classCallCheck(this,ContentProjectionHelper)}return _createClass(ContentProjectionHelper,[{key:"groupProjectableNodes",value:function(a,b,c){return[c]}}]),ContentProjectionHelper}(),PropertyBinding=function(){function PropertyBinding(a){_classCallCheck(this,PropertyBinding),this.binding=a,this.parseBinding()}return _createClass(PropertyBinding,[{key:"parseBinding",value:function(){var a=this.binding.split(":");this.prop=a[0].trim(),this.attr=(a[1]||this.prop).trim(),this.bracketAttr="["+this.attr+"]",this.parenAttr="("+this.attr+")",this.bracketParenAttr="[("+this.attr+")]";var b=this.attr.charAt(0).toUpperCase()+this.attr.substr(1);this.onAttr="on"+b,this.bindAttr="bind"+b,this.bindonAttr="bindon"+b}}]),PropertyBinding}(),Deferred=function Deferred(){var _this=this;_classCallCheck(this,Deferred),this.promise=new Promise(function(a,b){_this.resolve=a,_this.reject=b})},INITIAL_VALUE={__UNINITIALIZED__:!0},DowngradeComponentAdapter=function(){function DowngradeComponentAdapter(a,b,c,d,f,g,h,l,m,n,o){_classCallCheck(this,DowngradeComponentAdapter),this.id=a,this.info=b,this.element=c,this.attrs=d,this.scope=f,this.ngModel=g,this.parentInjector=h,this.$injector=l,this.$compile=m,this.$parse=n,this.componentFactory=o,this.inputChangeCount=0,this.inputChanges=null,this.componentRef=null,this.component=null,this.changeDetector=null,this.element[0].id=a,this.componentScope=f.$new()}return _createClass(DowngradeComponentAdapter,[{key:"compileContents",value:function(){var _this2=this,a=[],b=this.parentInjector.get(ContentProjectionHelper),c=b.groupProjectableNodes(this.$injector,this.info.component,this.element.contents()),d=c.map(function(f){return _this2.$compile(f)});return this.element.empty(),d.forEach(function(f){f(_this2.scope,function(g){a.push(g),_this2.element.append(g)})}),a}},{key:"createComponent",value:function(a){var b=_core.ReflectiveInjector.resolveAndCreate([{provide:$SCOPE,useValue:this.componentScope}],this.parentInjector);this.componentRef=this.componentFactory.create(b,a,this.element[0]),this.changeDetector=this.componentRef.changeDetectorRef,this.component=this.componentRef.instance,hookupNgModel(this.ngModel,this.component)}},{key:"setupInputs",value:function(){for(var _this3=this,a=this.attrs,b=this.info.inputs||[],d=0;d<b.length;d++){var f=new PropertyBinding(b[d]),g=null;if(a.hasOwnProperty(f.attr)){var h=function(l){var m=INITIAL_VALUE;return function(n){m===INITIAL_VALUE&&(m=n),_this3.updateInput(l,m,n),m=n}}(f.prop);a.$observe(f.attr,h)}else a.hasOwnProperty(f.bindAttr)?g=a[f.bindAttr]:a.hasOwnProperty(f.bracketAttr)?g=a[f.bracketAttr]:a.hasOwnProperty(f.bindonAttr)?g=a[f.bindonAttr]:a.hasOwnProperty(f.bracketParenAttr)&&(g=a[f.bracketParenAttr]);if(null!=g){var _h=function(l){return function(m,n){return _this3.updateInput(l,n,m)}}(f.prop);this.componentScope.$watch(g,_h)}}var c=this.info.component.prototype;c&&c.ngOnChanges&&(this.inputChanges={},this.componentScope.$watch(function(){return _this3.inputChangeCount},function(){var d=_this3.inputChanges;_this3.inputChanges={},_this3.component.ngOnChanges(d)})),this.componentScope.$watch(function(){return _this3.changeDetector&&_this3.changeDetector.detectChanges()})}},{key:"setupOutputs",value:function(){for(var _this4=this,a=this.attrs,b=this.info.outputs||[],c=0;c<b.length;c++){var d=new PropertyBinding(b[c]),f=null,g=!1,h=d.bindonAttr?d.bindonAttr.substring(0,d.bindonAttr.length-6):null,l=d.bracketParenAttr?"[("+d.bracketParenAttr.substring(2,d.bracketParenAttr.length-8)+")]":null;if(a.hasOwnProperty(d.onAttr)?f=a[d.onAttr]:a.hasOwnProperty(d.parenAttr)?f=a[d.parenAttr]:a.hasOwnProperty(h)?(f=a[h],g=!0):a.hasOwnProperty(l)&&(f=a[l],g=!0),null!=f&&null!=g){var m=this.$parse(f),n=m.assign;if(g&&!n)throw new Error("Expression '"+f+"' is not assignable!");var o=this.component[d.prop];if(!o)throw new Error("Missing emitter '"+d.prop+"' on component '"+getComponentName(this.info.component)+"'!");o.subscribe({next:g?function(p){return function(q){return p(_this4.scope,q)}}(n):function(p){return function(q){return p(_this4.scope,{$event:q})}}(m)})}}}},{key:"registerCleanup",value:function(){var _this5=this;this.element.bind("$destroy",function(){_this5.componentScope.$destroy(),_this5.componentRef.destroy()})}},{key:"getInjector",value:function(){return this.componentRef&&this.componentRef.injector}},{key:"updateInput",value:function(a,b,c){this.inputChanges&&(this.inputChangeCount++,this.inputChanges[a]=new _core.SimpleChange(b,c,b===c)),this.component[a]=c}}]),DowngradeComponentAdapter}(),downgradeCount=0,ParentInjectorPromise$1=function(){function ParentInjectorPromise$1(a){_classCallCheck(this,ParentInjectorPromise$1),this.element=a,this.injectorKey=controllerKey(INJECTOR_KEY),this.callbacks=[],a.data(this.injectorKey,this)}return _createClass(ParentInjectorPromise$1,[{key:"then",value:function(a){this.injector?a(this.injector):this.callbacks.push(a)}},{key:"resolve",value:function(a){this.injector=a,this.element.data(this.injectorKey,a),this.element=null,this.callbacks.forEach(function(b){return b(a)}),this.callbacks.length=0}}]),ParentInjectorPromise$1}(),DynamicContentProjectionHelper=function(_ContentProjectionHel){function DynamicContentProjectionHelper(){return _classCallCheck(this,DynamicContentProjectionHelper),_possibleConstructorReturn(this,(DynamicContentProjectionHelper.__proto__||Object.getPrototypeOf(DynamicContentProjectionHelper)).apply(this,arguments))}return _inherits(DynamicContentProjectionHelper,_ContentProjectionHel),_createClass(DynamicContentProjectionHelper,[{key:"groupProjectableNodes",value:function(a,b,c){var d=a.get(COMPILER_KEY),f=d.getNgContentSelectors(b);if(!f)throw new Error("Expecting ngContentSelectors for: "+getComponentName(b));return this.groupNodesBySelector(f,c)}},{key:"groupNodesBySelector",value:function(a,b){for(var c=[],d=new _compiler.SelectorMatcher,f=void 0,g=0,h=a.length;g<h;++g){c[g]=[];var l=a[g];"*"===l?f=g:d.addSelectables(_compiler.CssSelector.parse(l),g)}for(var _loop=function(_g,_h2){var l=[],m=b[_g],n=(0,_compiler.createElementCssSelector)(m.nodeName.toLowerCase(),getAttributesAsArray(m));d.match(n,function(o,p){return l.push(p)}),l.sort(),void 0!==f&&l.push(f),l.length&&c[l[0]].push(m)},_g=0,_h2=b.length;_g<_h2;++_g)_loop(_g,_h2);return c}}]),DynamicContentProjectionHelper}(ContentProjectionHelper),CAMEL_CASE=/([A-Z])/g,INITIAL_VALUE$1={__UNINITIALIZED__:!0},NOT_SUPPORTED="NOT_SUPPORTED",UpgradeNg1ComponentAdapterBuilder=function(){function UpgradeNg1ComponentAdapterBuilder(a){_classCallCheck(this,UpgradeNg1ComponentAdapterBuilder),this.name=a,this.inputs=[],this.inputsRename=[],this.outputs=[],this.outputsRename=[],this.propertyOutputs=[],this.checkProperties=[],this.propertyMap={},this.linkFn=null,this.directive=null,this.$controller=null;var b=a.replace(CAMEL_CASE,function(d,f){return"-"+f.toLowerCase()}),c=this;this.type=(0,_core.Directive)({selector:b,inputs:this.inputsRename,outputs:this.outputsRename}).Class({constructor:[new _core.Inject($SCOPE),_core.ElementRef,function(d,f){return new UpgradeNg1ComponentAdapter(c.linkFn,d,c.directive,f,c.$controller,c.inputs,c.outputs,c.propertyOutputs,c.checkProperties,c.propertyMap)}],ngOnInit:function(){},ngOnChanges:function(){},ngDoCheck:function(){},ngOnDestroy:function(){}})}return _createClass(UpgradeNg1ComponentAdapterBuilder,[{key:"extractDirective",value:function(a){var b=a.get(this.name+"Directive");if(1<b.length)throw new Error("Only support single directive definition for: "+this.name);var c=b[0];c.replace&&this.notSupported("replace"),c.terminal&&this.notSupported("terminal");var d=c.link;return"object"==("undefined"==typeof d?"undefined":_typeof(d))&&d.post&&this.notSupported("link.post"),c}},{key:"notSupported",value:function(a){throw new Error("Upgraded directive '"+this.name+"' does not support '"+a+"'.")}},{key:"extractBindings",value:function(){var a="object"==_typeof(this.directive.bindToController);if(a&&Object.keys(this.directive.scope).length)throw new Error("Binding definitions on scope and controller at the same time are not supported.");var b=a?this.directive.bindToController:this.directive.scope;if("object"==("undefined"==typeof b?"undefined":_typeof(b)))for(var c in b)if(b.hasOwnProperty(c)){var d=b[c],f=d.charAt(0),g=d.charAt(1);d="?"===g?d.substr(2):d.substr(1),d=d||c;var h="output_"+c,n="input_"+c,o=n+": "+c;switch(f){case"=":this.propertyOutputs.push(h),this.checkProperties.push(d),this.outputs.push(h),this.outputsRename.push(h+": "+c+"Change"),this.propertyMap[h]=d,this.inputs.push(n),this.inputsRename.push(o),this.propertyMap[n]=d;break;case"@":case"<":this.inputs.push(n),this.inputsRename.push(o),this.propertyMap[n]=d;break;case"&":this.outputs.push(h),this.outputsRename.push(h+": "+c),this.propertyMap[h]=d;break;default:var p=JSON.stringify(b);throw new Error("Unexpected mapping '"+f+"' in '"+p+"' in '"+this.name+"' directive.")}}}},{key:"compileTemplate",value:function(a,b,c){function d(f){var g=document.createElement("div");return g.innerHTML=f,a(g.childNodes)}var _this7=this;if(void 0!==this.directive.template)this.linkFn=d(isFunction(this.directive.template)?this.directive.template():this.directive.template);else{if(!this.directive.templateUrl)throw new Error("Directive '"+this.name+"' is not a component, it is missing template.");var f=isFunction(this.directive.templateUrl)?this.directive.templateUrl():this.directive.templateUrl,g=b.get(f);if(void 0===g)return new Promise(function(h,l){c("GET",f,null,function(m,n){200==m?h(_this7.linkFn=d(b.put(f,n))):l("GET "+f+" returned "+m+": "+n)})});this.linkFn=d(g)}return null}}],[{key:"resolve",value:function(a,b){var c=[],d=b.get($COMPILE),f=b.get($TEMPLATE_CACHE),g=b.get($HTTP_BACKEND),h=b.get($CONTROLLER);for(var l in a)if(a.hasOwnProperty(l)){var m=a[l];m.directive=m.extractDirective(b),m.$controller=h,m.extractBindings();var n=m.compileTemplate(d,f,g);n&&c.push(n)}return Promise.all(c)}}]),UpgradeNg1ComponentAdapterBuilder}(),UpgradeNg1ComponentAdapter=function(){function UpgradeNg1ComponentAdapter(a,b,c,d,f,g,h,l,m,n){_classCallCheck(this,UpgradeNg1ComponentAdapter),this.linkFn=a,this.directive=c,this.$controller=f,this.inputs=g,this.outputs=h,this.propOuts=l,this.checkProperties=m,this.propertyMap=n,this.controllerInstance=null,this.destinationObj=null,this.checkLastValues=[],this.$element=null,this.element=d.nativeElement,this.componentScope=b.$new(!!c.scope),this.$element=element(this.element);var o=c.controller;c.bindToController&&o?(this.controllerInstance=this.buildController(o),this.destinationObj=this.controllerInstance):this.destinationObj=this.componentScope;for(var p=0;p<g.length;p++)this[g[p]]=null;for(var _p=0;_p<h.length;_p++){var q=this[h[_p]]=new _core.EventEmitter;this.setComponentProperty(h[_p],function(r){return function(s){return r.emit(s)}}(q))}for(var _p2=0;_p2<l.length;_p2++)this[l[_p2]]=new _core.EventEmitter,this.checkLastValues.push(INITIAL_VALUE$1)}return _createClass(UpgradeNg1ComponentAdapter,[{key:"ngOnInit",value:function(){var _this8=this;!this.directive.bindToController&&this.directive.controller&&(this.controllerInstance=this.buildController(this.directive.controller)),this.controllerInstance&&isFunction(this.controllerInstance.$onInit)&&this.controllerInstance.$onInit();var a=this.directive.link;if("object"==("undefined"==typeof a?"undefined":_typeof(a))&&(a=a.pre),a){var g=this.resolveRequired(this.$element,this.directive.require);this.directive.link(this.componentScope,this.$element,NOT_SUPPORTED,g,NOT_SUPPORTED)}for(var c,b=[];c=this.element.firstChild;)this.element.removeChild(c),b.push(c);this.linkFn(this.componentScope,function(d){for(var _g2=0,h=d.length;_g2<h;_g2++)_this8.element.appendChild(d[_g2])},{parentBoundTranscludeFn:function(d,f){f(b)}}),this.controllerInstance&&isFunction(this.controllerInstance.$postLink)&&this.controllerInstance.$postLink()}},{key:"ngOnChanges",value:function(a){var _this9=this,b={};Object.keys(a).forEach(function(c){var d=a[c];_this9.setComponentProperty(c,d.currentValue),b[_this9.propertyMap[c]]=d}),isFunction(this.destinationObj.$onChanges)&&this.destinationObj.$onChanges(b)}},{key:"ngDoCheck",value:function(){for(var a=this.destinationObj,b=this.checkLastValues,c=this.checkProperties,d=0;d<c.length;d++){var f=a[c[d]],g=b[d];if(f!==g)if("number"==typeof f&&isNaN(f)&&"number"==typeof g&&isNaN(g));else{var h=this[this.propOuts[d]];h.emit(b[d]=f)}}this.controllerInstance&&isFunction(this.controllerInstance.$doCheck)&&this.controllerInstance.$doCheck()}},{key:"ngOnDestroy",value:function(){this.controllerInstance&&isFunction(this.controllerInstance.$onDestroy)&&this.controllerInstance.$onDestroy()}},{key:"setComponentProperty",value:function(a,b){this.destinationObj[this.propertyMap[a]]=b}},{key:"buildController",value:function(a){var b={$scope:this.componentScope,$element:this.$element},c=this.$controller(a,b,null,this.directive.controllerAs);return this.$element.data(controllerKey(this.directive.name),c),c}},{key:"resolveRequired",value:function(a,b){if(b){if("string"==typeof b){var c=b,d=!1,f=!1,g=!1;"?"==c.charAt(0)&&(d=!0,c=c.substr(1)),"^"==c.charAt(0)&&(g=!0,c=c.substr(1)),"^"==c.charAt(0)&&(f=!0,c=c.substr(1));var h=controllerKey(c);f&&(a=a.parent());var l=g?a.inheritedData(h):a.data(h);if(!l&&!d)throw new Error("Can not locate '"+b+"' in '"+this.directive.name+"'.");return l}if(b instanceof Array){for(var _c=[],_d=0;_d<b.length;_d++)_c.push(this.resolveRequired(a,b[_d]));return _c}throw new Error("Directive '"+this.directive.name+"' require syntax unrecognized: "+this.directive.require)}}}]),UpgradeNg1ComponentAdapter}(),upgradeCount=0,UpgradeAdapter=function(){function UpgradeAdapter(a,b){if(_classCallCheck(this,UpgradeAdapter),this.ng2AppModule=a,this.compilerOptions=b,this.idPrefix="NG2_UPGRADE_"+upgradeCount++ +"_",this.directiveResolver=new _compiler.DirectiveResolver,this.downgradedComponents=[],this.ng1ComponentsToBeUpgraded={},this.upgradedProviders=[],this.moduleRef=null,!a)throw new Error("UpgradeAdapter cannot be instantiated without an NgModule of the Angular app.")}return _createClass(UpgradeAdapter,[{key:"downgradeNg2Component",value:function(a){this.downgradedComponents.push(a);var b=this.directiveResolver.resolve(a),c={component:a,inputs:b.inputs,outputs:b.outputs};return downgradeComponent(c)}},{key:"upgradeNg1Component",value:function(a){return this.ng1ComponentsToBeUpgraded.hasOwnProperty(a)?this.ng1ComponentsToBeUpgraded[a].type:(this.ng1ComponentsToBeUpgraded[a]=new UpgradeNg1ComponentAdapterBuilder(a)).type}},{key:"registerForNg1Tests",value:function(a){var _this10=this,b=window.angular.mock;if(!b||!b.module)throw new Error("Failed to find 'angular.mock.module'.");this.declareNg1Module(a),b.module(this.ng1Module.name);var c=new UpgradeAdapterRef;return this.ng2BootstrapDeferred.promise.then(function(d){c._bootstrapDone(_this10.moduleRef,d)},onError),c}},{key:"bootstrap",value:function(a,b,c){var _this11=this;this.declareNg1Module(b);var d=new UpgradeAdapterRef,f=window.angular;f.resumeBootstrap=void 0,this.ngZone.run(function(){_bootstrap(a,[_this11.ng1Module.name],c)});var g=new Promise(function(h){if(f.resumeBootstrap){var l=f.resumeBootstrap;f.resumeBootstrap=function(){f.resumeBootstrap=l,f.resumeBootstrap.apply(this,arguments),h()}}else h()});return Promise.all([this.ng2BootstrapDeferred.promise,g]).then(function(_ref){var _ref2=_slicedToArray(_ref,1),h=_ref2[0];element(a).data(controllerKey(INJECTOR_KEY),_this11.moduleRef.injector),_this11.moduleRef.injector.get(_core.NgZone).run(function(){d._bootstrapDone(_this11.moduleRef,h)})},onError),d}},{key:"upgradeNg1Provider",value:function(a,b){var c=b&&b.asToken||a;this.upgradedProviders.push({provide:c,useFactory:function(d){return d.get(a)},deps:[$INJECTOR]})}},{key:"downgradeNg2Provider",value:function(a){return downgradeInjectable(a)}},{key:"declareNg1Module",value:function(){var _this12=this,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],b=[],c=void 0,d=void 0,f=void 0,g=this,h=this.ng1Module=module$1(this.idPrefix,a),l=(0,_platformBrowserDynamic.platformBrowserDynamic)();return this.ngZone=new _core.NgZone({enableLongStackTrace:Zone.hasOwnProperty("longStackTraceZoneSpec")}),this.ng2BootstrapDeferred=new Deferred,h.factory(INJECTOR_KEY,function(){return _this12.moduleRef.injector.get(_core.Injector)}).constant(NG_ZONE_KEY,this.ngZone).factory(COMPILER_KEY,function(){return _this12.moduleRef.injector.get(_core.Compiler)}).config(["$provide","$injector",function(m,n){m.decorator($ROOT_SCOPE,["$delegate",function(o){if(d=o.constructor.prototype,!d.hasOwnProperty("$apply"))throw new Error("Failed to find '$apply' on '$rootScope'!");return c=d.$apply,d.$apply=function(p){return b.push(p)},f=o}]),n.has($$TESTABILITY)&&m.decorator($$TESTABILITY,["$delegate",function(o){var p=o.whenStable,q=function q(r){p.call(this,function(){var s=g.moduleRef.injector.get(_core.Testability);s.isStable()?r.apply(this,arguments):s.whenStable(q.bind(this,r))})};return o.whenStable=q,o}])}]),h.run(["$injector","$rootScope",function(m,n){UpgradeNg1ComponentAdapterBuilder.resolve(_this12.ng1ComponentsToBeUpgraded,m).then(function(){var o=(0,_core.NgModule)({providers:[{provide:$INJECTOR,useFactory:function(){return m}},{provide:$COMPILE,useFactory:function(){return m.get($COMPILE)}},{provide:ContentProjectionHelper,useClass:DynamicContentProjectionHelper},_this12.upgradedProviders],imports:[_this12.ng2AppModule],entryComponents:_this12.downgradedComponents}).Class({constructor:function(){},ngDoBootstrap:function(){}});l._bootstrapModuleWithZone(o,_this12.compilerOptions,_this12.ngZone).then(function(p){_this12.moduleRef=p,_this12.ngZone.run(function(){if(d){for(d.$apply=c;b.length;)n.$apply(b.shift());d=null}})}).then(function(){return _this12.ng2BootstrapDeferred.resolve(m)},onError).then(function(){var p=_this12.ngZone.onMicrotaskEmpty.subscribe({next:function(){return n.$digest()}});n.$on("$destroy",function(){p.unsubscribe()})})}).catch(function(o){return _this12.ng2BootstrapDeferred.reject(o)})}]),h}}]),UpgradeAdapter}(),UpgradeAdapterRef=function(){function UpgradeAdapterRef(){_classCallCheck(this,UpgradeAdapterRef),this._readyFn=null,this.ng1RootScope=null,this.ng1Injector=null,this.ng2ModuleRef=null,this.ng2Injector=null}return _createClass(UpgradeAdapterRef,[{key:"_bootstrapDone",value:function(a,b){this.ng2ModuleRef=a,this.ng2Injector=a.injector,this.ng1Injector=b,this.ng1RootScope=b.get($ROOT_SCOPE),this._readyFn&&this._readyFn(this)}},{key:"ready",value:function(a){this._readyFn=a}},{key:"dispose",value:function(){this.ng1Injector.get($ROOT_SCOPE).$destroy(),this.ng2ModuleRef.destroy()}}]),UpgradeAdapterRef}();exports.VERSION=VERSION,exports.UpgradeAdapter=UpgradeAdapter,exports.UpgradeAdapterRef=UpgradeAdapterRef});
/**
* @license Angular v4.0.0-rc.3
* (c) 2010-2017 Google, Inc. https://angular.io/
* License: MIT
*/
!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports,require("@angular/core"),require("@angular/compiler"),require("@angular/platform-browser-dynamic")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/compiler","@angular/platform-browser-dynamic"],factory):factory((global.ng=global.ng||{},global.ng.upgrade=global.ng.upgrade||{}),global.ng.core,global.ng.compiler,global.ng.platformBrowserDynamic)}(this,function(exports,_angular_core,_angular_compiler,_angular_platformBrowserDynamic){"use strict";/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function noNg(){throw new Error("AngularJS v1.x is not loaded!")}/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function onError(e){throw console.error?console.error(e,e.stack):console.log(e,e.stack),e}function controllerKey(name){return"$"+name+"Controller"}function getAttributesAsArray(node){var asArray,attributes=node.attributes;if(attributes){var attrLen=attributes.length;asArray=new Array(attrLen);for(var i=0;i<attrLen;i++)asArray[i]=[attributes[i].nodeName,attributes[i].nodeValue]}return asArray||[]}function getComponentName(component){return component.overriddenName||component.name||component.toString().split("\n")[0]}function supportsNgModel(component){return"function"==typeof component.writeValue&&"function"==typeof component.registerOnChange}function hookupNgModel(ngModel,component){ngModel&&supportsNgModel(component)&&(ngModel.$render=function(){component.writeValue(ngModel.$viewValue)},component.registerOnChange(ngModel.$setViewValue.bind(ngModel)))}function downgradeComponent(info){var idPrefix="NG2_UPGRADE_"+downgradeCount++ +"_",idCount=0,directiveFactory=function($compile,$injector,$parse){return{restrict:"E",terminal:!0,require:[REQUIRE_INJECTOR,REQUIRE_NG_MODEL],link:function(scope,element,attrs,required){var parentInjector=required[0]||$injector.get(INJECTOR_KEY),ngModel=required[1],downgradeFn=function(injector){var componentFactoryResolver=injector.get(_angular_core.ComponentFactoryResolver),componentFactory=componentFactoryResolver.resolveComponentFactory(info.component);if(!componentFactory)throw new Error("Expecting ComponentFactory for: "+getComponentName(info.component));var id=idPrefix+idCount++,injectorPromise=new ParentInjectorPromise$1(element),facade=new DowngradeComponentAdapter(id,info,element,attrs,scope,ngModel,injector,$injector,$compile,$parse,componentFactory),projectableNodes=facade.compileContents();facade.createComponent(projectableNodes),facade.setupInputs(),facade.setupOutputs(),facade.registerCleanup(),injectorPromise.resolve(facade.getInjector())};parentInjector instanceof ParentInjectorPromise$1?parentInjector.then(downgradeFn):downgradeFn(parentInjector)}}};return directiveFactory.$inject=[$COMPILE,$INJECTOR,$PARSE],directiveFactory}function downgradeInjectable(token){var factory=function(i){return i.get(token)};return factory.$inject=[INJECTOR_KEY],factory}function isFunction(value){return"function"==typeof value}var __extends=this&&this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)},VERSION=new _angular_core.Version("4.0.0-rc.3"),angular={bootstrap:noNg,module:noNg,element:noNg,version:noNg,resumeBootstrap:noNg,getTestability:noNg};try{window.hasOwnProperty("angular")&&(angular=window.angular)}catch(e){}var bootstrap=angular.bootstrap,module$1=angular.module,element=angular.element,$COMPILE="$compile",$CONTROLLER="$controller",$HTTP_BACKEND="$httpBackend",$INJECTOR="$injector",$PARSE="$parse",$ROOT_SCOPE="$rootScope",$SCOPE="$scope",$TEMPLATE_CACHE="$templateCache",$$TESTABILITY="$$testability",COMPILER_KEY="$$angularCompiler",INJECTOR_KEY="$$angularInjector",NG_ZONE_KEY="$$angularNgZone",REQUIRE_INJECTOR="?^^"+INJECTOR_KEY,REQUIRE_NG_MODEL="?ngModel",ContentProjectionHelper=function(){function ContentProjectionHelper(){}return ContentProjectionHelper.prototype.groupProjectableNodes=function($injector,component,nodes){return[nodes]},ContentProjectionHelper}(),PropertyBinding=function(){function PropertyBinding(binding){this.binding=binding,this.parseBinding()}return PropertyBinding.prototype.parseBinding=function(){var parts=this.binding.split(":");this.prop=parts[0].trim(),this.attr=(parts[1]||this.prop).trim(),this.bracketAttr="["+this.attr+"]",this.parenAttr="("+this.attr+")",this.bracketParenAttr="[("+this.attr+")]";var capitalAttr=this.attr.charAt(0).toUpperCase()+this.attr.substr(1);this.onAttr="on"+capitalAttr,this.bindAttr="bind"+capitalAttr,this.bindonAttr="bindon"+capitalAttr},PropertyBinding}(),Deferred=function(){function Deferred(){var _this=this;this.promise=new Promise(function(res,rej){_this.resolve=res,_this.reject=rej})}return Deferred}(),INITIAL_VALUE={__UNINITIALIZED__:!0},DowngradeComponentAdapter=function(){function DowngradeComponentAdapter(id,info,element,attrs,scope,ngModel,parentInjector,$injector,$compile,$parse,componentFactory){this.id=id,this.info=info,this.element=element,this.attrs=attrs,this.scope=scope,this.ngModel=ngModel,this.parentInjector=parentInjector,this.$injector=$injector,this.$compile=$compile,this.$parse=$parse,this.componentFactory=componentFactory,this.inputChangeCount=0,this.inputChanges=null,this.componentRef=null,this.component=null,this.changeDetector=null,this.element[0].id=id,this.componentScope=scope.$new()}return DowngradeComponentAdapter.prototype.compileContents=function(){var _this=this,compiledProjectableNodes=[],projectionHelper=this.parentInjector.get(ContentProjectionHelper),projectableNodes=projectionHelper.groupProjectableNodes(this.$injector,this.info.component,this.element.contents()),linkFns=projectableNodes.map(function(nodes){return _this.$compile(nodes)});return this.element.empty(),linkFns.forEach(function(linkFn){linkFn(_this.scope,function(clone){compiledProjectableNodes.push(clone),_this.element.append(clone)})}),compiledProjectableNodes},DowngradeComponentAdapter.prototype.createComponent=function(projectableNodes){var childInjector=_angular_core.ReflectiveInjector.resolveAndCreate([{provide:$SCOPE,useValue:this.componentScope}],this.parentInjector);this.componentRef=this.componentFactory.create(childInjector,projectableNodes,this.element[0]),this.changeDetector=this.componentRef.changeDetectorRef,this.component=this.componentRef.instance,hookupNgModel(this.ngModel,this.component)},DowngradeComponentAdapter.prototype.setupInputs=function(){for(var _this=this,attrs=this.attrs,inputs=this.info.inputs||[],i=0;i<inputs.length;i++){var input=new PropertyBinding(inputs[i]),expr=null;if(attrs.hasOwnProperty(input.attr)){var observeFn=function(prop){var prevValue=INITIAL_VALUE;return function(currValue){prevValue===INITIAL_VALUE&&(prevValue=currValue),_this.updateInput(prop,prevValue,currValue),prevValue=currValue}}(input.prop);attrs.$observe(input.attr,observeFn)}else attrs.hasOwnProperty(input.bindAttr)?expr=attrs[input.bindAttr]:attrs.hasOwnProperty(input.bracketAttr)?expr=attrs[input.bracketAttr]:attrs.hasOwnProperty(input.bindonAttr)?expr=attrs[input.bindonAttr]:attrs.hasOwnProperty(input.bracketParenAttr)&&(expr=attrs[input.bracketParenAttr]);if(null!=expr){var watchFn=function(prop){return function(currValue,prevValue){return _this.updateInput(prop,prevValue,currValue)}}(input.prop);this.componentScope.$watch(expr,watchFn)}}var prototype=this.info.component.prototype;prototype&&prototype.ngOnChanges&&(this.inputChanges={},this.componentScope.$watch(function(){return _this.inputChangeCount},function(){var inputChanges=_this.inputChanges;_this.inputChanges={},_this.component.ngOnChanges(inputChanges)})),this.componentScope.$watch(function(){return _this.changeDetector&&_this.changeDetector.detectChanges()})},DowngradeComponentAdapter.prototype.setupOutputs=function(){for(var _this=this,attrs=this.attrs,outputs=this.info.outputs||[],j=0;j<outputs.length;j++){var output=new PropertyBinding(outputs[j]),expr=null,assignExpr=!1,bindonAttr=output.bindonAttr?output.bindonAttr.substring(0,output.bindonAttr.length-6):null,bracketParenAttr=output.bracketParenAttr?"[("+output.bracketParenAttr.substring(2,output.bracketParenAttr.length-8)+")]":null;if(attrs.hasOwnProperty(output.onAttr)?expr=attrs[output.onAttr]:attrs.hasOwnProperty(output.parenAttr)?expr=attrs[output.parenAttr]:attrs.hasOwnProperty(bindonAttr)?(expr=attrs[bindonAttr],assignExpr=!0):attrs.hasOwnProperty(bracketParenAttr)&&(expr=attrs[bracketParenAttr],assignExpr=!0),null!=expr&&null!=assignExpr){var getter=this.$parse(expr),setter=getter.assign;if(assignExpr&&!setter)throw new Error("Expression '"+expr+"' is not assignable!");var emitter=this.component[output.prop];if(!emitter)throw new Error("Missing emitter '"+output.prop+"' on component '"+getComponentName(this.info.component)+"'!");emitter.subscribe({next:assignExpr?function(setter){return function(v){return setter(_this.scope,v)}}(setter):function(getter){return function(v){return getter(_this.scope,{$event:v})}}(getter)})}}},DowngradeComponentAdapter.prototype.registerCleanup=function(){var _this=this;this.element.bind("$destroy",function(){_this.componentScope.$destroy(),_this.componentRef.destroy()})},DowngradeComponentAdapter.prototype.getInjector=function(){return this.componentRef&&this.componentRef.injector},DowngradeComponentAdapter.prototype.updateInput=function(prop,prevValue,currValue){this.inputChanges&&(this.inputChangeCount++,this.inputChanges[prop]=new _angular_core.SimpleChange(prevValue,currValue,prevValue===currValue)),this.component[prop]=currValue},DowngradeComponentAdapter}(),downgradeCount=0,ParentInjectorPromise$1=function(){function ParentInjectorPromise(element){this.element=element,this.injectorKey=controllerKey(INJECTOR_KEY),this.callbacks=[],element.data(this.injectorKey,this)}return ParentInjectorPromise.prototype.then=function(callback){this.injector?callback(this.injector):this.callbacks.push(callback)},ParentInjectorPromise.prototype.resolve=function(injector){this.injector=injector,this.element.data(this.injectorKey,injector),this.element=null,this.callbacks.forEach(function(callback){return callback(injector)}),this.callbacks.length=0},ParentInjectorPromise}(),DynamicContentProjectionHelper=function(_super){function DynamicContentProjectionHelper(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(DynamicContentProjectionHelper,_super),DynamicContentProjectionHelper.prototype.groupProjectableNodes=function($injector,component,nodes){var ng2Compiler=$injector.get(COMPILER_KEY),ngContentSelectors=ng2Compiler.getNgContentSelectors(component);if(!ngContentSelectors)throw new Error("Expecting ngContentSelectors for: "+getComponentName(component));return this.groupNodesBySelector(ngContentSelectors,nodes)},DynamicContentProjectionHelper.prototype.groupNodesBySelector=function(ngContentSelectors,nodes){for(var wildcardNgContentIndex,projectableNodes=[],matcher=new _angular_compiler.SelectorMatcher,i=0,ii=ngContentSelectors.length;i<ii;++i){projectableNodes[i]=[];var selector=ngContentSelectors[i];"*"===selector?wildcardNgContentIndex=i:matcher.addSelectables(_angular_compiler.CssSelector.parse(selector),i)}for(var _loop_1=function(j,jj){var ngContentIndices=[],node=nodes[j],selector=_angular_compiler.createElementCssSelector(node.nodeName.toLowerCase(),getAttributesAsArray(node));matcher.match(selector,function(_,index){return ngContentIndices.push(index)}),ngContentIndices.sort(),void 0!==wildcardNgContentIndex&&ngContentIndices.push(wildcardNgContentIndex),ngContentIndices.length&&projectableNodes[ngContentIndices[0]].push(node)},j=0,jj=nodes.length;j<jj;++j)_loop_1(j,jj);return projectableNodes},DynamicContentProjectionHelper}(ContentProjectionHelper),CAMEL_CASE=/([A-Z])/g,INITIAL_VALUE$1={__UNINITIALIZED__:!0},NOT_SUPPORTED="NOT_SUPPORTED",UpgradeNg1ComponentAdapterBuilder=function(){function UpgradeNg1ComponentAdapterBuilder(name){this.name=name,this.inputs=[],this.inputsRename=[],this.outputs=[],this.outputsRename=[],this.propertyOutputs=[],this.checkProperties=[],this.propertyMap={},this.linkFn=null,this.directive=null,this.$controller=null;var selector=name.replace(CAMEL_CASE,function(all,next){return"-"+next.toLowerCase()}),self=this;this.type=_angular_core.Directive({selector:selector,inputs:this.inputsRename,outputs:this.outputsRename}).Class({constructor:[new _angular_core.Inject($SCOPE),_angular_core.ElementRef,function(scope,elementRef){return new UpgradeNg1ComponentAdapter(self.linkFn,scope,self.directive,elementRef,self.$controller,self.inputs,self.outputs,self.propertyOutputs,self.checkProperties,self.propertyMap)}],ngOnInit:function(){},ngOnChanges:function(){},ngDoCheck:function(){},ngOnDestroy:function(){}})}return UpgradeNg1ComponentAdapterBuilder.prototype.extractDirective=function(injector){var directives=injector.get(this.name+"Directive");if(directives.length>1)throw new Error("Only support single directive definition for: "+this.name);var directive=directives[0];directive.replace&&this.notSupported("replace"),directive.terminal&&this.notSupported("terminal");var link=directive.link;return"object"==typeof link&&link.post&&this.notSupported("link.post"),directive},UpgradeNg1ComponentAdapterBuilder.prototype.notSupported=function(feature){throw new Error("Upgraded directive '"+this.name+"' does not support '"+feature+"'.")},UpgradeNg1ComponentAdapterBuilder.prototype.extractBindings=function(){var btcIsObject="object"==typeof this.directive.bindToController;if(btcIsObject&&Object.keys(this.directive.scope).length)throw new Error("Binding definitions on scope and controller at the same time are not supported.");var context=btcIsObject?this.directive.bindToController:this.directive.scope;if("object"==typeof context)for(var name in context)if(context.hasOwnProperty(name)){var localName=context[name],type=localName.charAt(0),typeOptions=localName.charAt(1);localName="?"===typeOptions?localName.substr(2):localName.substr(1),localName=localName||name;var outputName="output_"+name,outputNameRename=outputName+": "+name,outputNameRenameChange=outputName+": "+name+"Change",inputName="input_"+name,inputNameRename=inputName+": "+name;switch(type){case"=":this.propertyOutputs.push(outputName),this.checkProperties.push(localName),this.outputs.push(outputName),this.outputsRename.push(outputNameRenameChange),this.propertyMap[outputName]=localName,this.inputs.push(inputName),this.inputsRename.push(inputNameRename),this.propertyMap[inputName]=localName;break;case"@":case"<":this.inputs.push(inputName),this.inputsRename.push(inputNameRename),this.propertyMap[inputName]=localName;break;case"&":this.outputs.push(outputName),this.outputsRename.push(outputNameRename),this.propertyMap[outputName]=localName;break;default:var json=JSON.stringify(context);throw new Error("Unexpected mapping '"+type+"' in '"+json+"' in '"+this.name+"' directive.")}}},UpgradeNg1ComponentAdapterBuilder.prototype.compileTemplate=function(compile,templateCache,httpBackend){function compileHtml(html){var div=document.createElement("div");return div.innerHTML=html,compile(div.childNodes)}var _this=this;if(void 0!==this.directive.template)this.linkFn=compileHtml(isFunction(this.directive.template)?this.directive.template():this.directive.template);else{if(!this.directive.templateUrl)throw new Error("Directive '"+this.name+"' is not a component, it is missing template.");var url_1=isFunction(this.directive.templateUrl)?this.directive.templateUrl():this.directive.templateUrl,html=templateCache.get(url_1);if(void 0===html)return new Promise(function(resolve,err){httpBackend("GET",url_1,null,function(status,response){200==status?resolve(_this.linkFn=compileHtml(templateCache.put(url_1,response))):err("GET "+url_1+" returned "+status+": "+response)})});this.linkFn=compileHtml(html)}return null},UpgradeNg1ComponentAdapterBuilder.resolve=function(exportedComponents,injector){var promises=[],compile=injector.get($COMPILE),templateCache=injector.get($TEMPLATE_CACHE),httpBackend=injector.get($HTTP_BACKEND),$controller=injector.get($CONTROLLER);for(var name in exportedComponents)if(exportedComponents.hasOwnProperty(name)){var exportedComponent=exportedComponents[name];exportedComponent.directive=exportedComponent.extractDirective(injector),exportedComponent.$controller=$controller,exportedComponent.extractBindings();var promise=exportedComponent.compileTemplate(compile,templateCache,httpBackend);promise&&promises.push(promise)}return Promise.all(promises)},UpgradeNg1ComponentAdapterBuilder}(),UpgradeNg1ComponentAdapter=function(){function UpgradeNg1ComponentAdapter(linkFn,scope,directive,elementRef,$controller,inputs,outputs,propOuts,checkProperties,propertyMap){this.linkFn=linkFn,this.directive=directive,this.$controller=$controller,this.inputs=inputs,this.outputs=outputs,this.propOuts=propOuts,this.checkProperties=checkProperties,this.propertyMap=propertyMap,this.controllerInstance=null,this.destinationObj=null,this.checkLastValues=[],this.$element=null,this.element=elementRef.nativeElement,this.componentScope=scope.$new(!!directive.scope),this.$element=element(this.element);var controllerType=directive.controller;directive.bindToController&&controllerType?(this.controllerInstance=this.buildController(controllerType),this.destinationObj=this.controllerInstance):this.destinationObj=this.componentScope;for(var i=0;i<inputs.length;i++)this[inputs[i]]=null;for(var j=0;j<outputs.length;j++){var emitter=this[outputs[j]]=new _angular_core.EventEmitter;this.setComponentProperty(outputs[j],function(emitter){return function(value){return emitter.emit(value)}}(emitter))}for(var k=0;k<propOuts.length;k++)this[propOuts[k]]=new _angular_core.EventEmitter,this.checkLastValues.push(INITIAL_VALUE$1)}return UpgradeNg1ComponentAdapter.prototype.ngOnInit=function(){var _this=this;!this.directive.bindToController&&this.directive.controller&&(this.controllerInstance=this.buildController(this.directive.controller)),this.controllerInstance&&isFunction(this.controllerInstance.$onInit)&&this.controllerInstance.$onInit();var link=this.directive.link;if("object"==typeof link&&(link=link.pre),link){var attrs=NOT_SUPPORTED,transcludeFn=NOT_SUPPORTED,linkController=this.resolveRequired(this.$element,this.directive.require);this.directive.link(this.componentScope,this.$element,attrs,linkController,transcludeFn)}for(var childNode,childNodes=[];childNode=this.element.firstChild;)this.element.removeChild(childNode),childNodes.push(childNode);this.linkFn(this.componentScope,function(clonedElement,scope){for(var i=0,ii=clonedElement.length;i<ii;i++)_this.element.appendChild(clonedElement[i])},{parentBoundTranscludeFn:function(scope,cloneAttach){cloneAttach(childNodes)}}),this.controllerInstance&&isFunction(this.controllerInstance.$postLink)&&this.controllerInstance.$postLink()},UpgradeNg1ComponentAdapter.prototype.ngOnChanges=function(changes){var _this=this,ng1Changes={};Object.keys(changes).forEach(function(name){var change=changes[name];_this.setComponentProperty(name,change.currentValue),ng1Changes[_this.propertyMap[name]]=change}),isFunction(this.destinationObj.$onChanges)&&this.destinationObj.$onChanges(ng1Changes)},UpgradeNg1ComponentAdapter.prototype.ngDoCheck=function(){for(var destinationObj=this.destinationObj,lastValues=this.checkLastValues,checkProperties=this.checkProperties,i=0;i<checkProperties.length;i++){var value=destinationObj[checkProperties[i]],last=lastValues[i];if(value!==last)if("number"==typeof value&&isNaN(value)&&"number"==typeof last&&isNaN(last));else{var eventEmitter=this[this.propOuts[i]];eventEmitter.emit(lastValues[i]=value)}}this.controllerInstance&&isFunction(this.controllerInstance.$doCheck)&&this.controllerInstance.$doCheck()},UpgradeNg1ComponentAdapter.prototype.ngOnDestroy=function(){this.controllerInstance&&isFunction(this.controllerInstance.$onDestroy)&&this.controllerInstance.$onDestroy()},UpgradeNg1ComponentAdapter.prototype.setComponentProperty=function(name,value){this.destinationObj[this.propertyMap[name]]=value},UpgradeNg1ComponentAdapter.prototype.buildController=function(controllerType){var locals={$scope:this.componentScope,$element:this.$element},controller=this.$controller(controllerType,locals,null,this.directive.controllerAs);return this.$element.data(controllerKey(this.directive.name),controller),controller},UpgradeNg1ComponentAdapter.prototype.resolveRequired=function($element,require){if(require){if("string"==typeof require){var name=require,isOptional=!1,startParent=!1,searchParents=!1;"?"==name.charAt(0)&&(isOptional=!0,name=name.substr(1)),"^"==name.charAt(0)&&(searchParents=!0,name=name.substr(1)),"^"==name.charAt(0)&&(startParent=!0,name=name.substr(1));var key=controllerKey(name);startParent&&($element=$element.parent());var dep=searchParents?$element.inheritedData(key):$element.data(key);if(!dep&&!isOptional)throw new Error("Can not locate '"+require+"' in '"+this.directive.name+"'.");return dep}if(require instanceof Array){for(var deps=[],i=0;i<require.length;i++)deps.push(this.resolveRequired($element,require[i]));return deps}throw new Error("Directive '"+this.directive.name+"' require syntax unrecognized: "+this.directive.require)}},UpgradeNg1ComponentAdapter}(),upgradeCount=0,UpgradeAdapter=function(){function UpgradeAdapter(ng2AppModule,compilerOptions){if(this.ng2AppModule=ng2AppModule,this.compilerOptions=compilerOptions,this.idPrefix="NG2_UPGRADE_"+upgradeCount++ +"_",this.directiveResolver=new _angular_compiler.DirectiveResolver,this.downgradedComponents=[],this.ng1ComponentsToBeUpgraded={},this.upgradedProviders=[],this.moduleRef=null,!ng2AppModule)throw new Error("UpgradeAdapter cannot be instantiated without an NgModule of the Angular app.")}return UpgradeAdapter.prototype.downgradeNg2Component=function(component){this.downgradedComponents.push(component);var metadata=this.directiveResolver.resolve(component),info={component:component,inputs:metadata.inputs,outputs:metadata.outputs};return downgradeComponent(info)},UpgradeAdapter.prototype.upgradeNg1Component=function(name){return this.ng1ComponentsToBeUpgraded.hasOwnProperty(name)?this.ng1ComponentsToBeUpgraded[name].type:(this.ng1ComponentsToBeUpgraded[name]=new UpgradeNg1ComponentAdapterBuilder(name)).type},UpgradeAdapter.prototype.registerForNg1Tests=function(modules){var _this=this,windowNgMock=window.angular.mock;if(!windowNgMock||!windowNgMock.module)throw new Error("Failed to find 'angular.mock.module'.");this.declareNg1Module(modules),windowNgMock.module(this.ng1Module.name);var upgrade=new UpgradeAdapterRef;return this.ng2BootstrapDeferred.promise.then(function(ng1Injector){upgrade._bootstrapDone(_this.moduleRef,ng1Injector)},onError),upgrade},UpgradeAdapter.prototype.bootstrap=function(element$$,modules,config){var _this=this;this.declareNg1Module(modules);var upgrade=new UpgradeAdapterRef,windowAngular=window.angular;windowAngular.resumeBootstrap=void 0,this.ngZone.run(function(){bootstrap(element$$,[_this.ng1Module.name],config)});var ng1BootstrapPromise=new Promise(function(resolve){if(windowAngular.resumeBootstrap){var originalResumeBootstrap_1=windowAngular.resumeBootstrap;windowAngular.resumeBootstrap=function(){windowAngular.resumeBootstrap=originalResumeBootstrap_1,windowAngular.resumeBootstrap.apply(this,arguments),resolve()}}else resolve()});return Promise.all([this.ng2BootstrapDeferred.promise,ng1BootstrapPromise]).then(function(_a){var ng1Injector=_a[0];element(element$$).data(controllerKey(INJECTOR_KEY),_this.moduleRef.injector),_this.moduleRef.injector.get(_angular_core.NgZone).run(function(){upgrade._bootstrapDone(_this.moduleRef,ng1Injector)})},onError),upgrade},UpgradeAdapter.prototype.upgradeNg1Provider=function(name,options){var token=options&&options.asToken||name;this.upgradedProviders.push({provide:token,useFactory:function($injector){return $injector.get(name)},deps:[$INJECTOR]})},UpgradeAdapter.prototype.downgradeNg2Provider=function(token){return downgradeInjectable(token)},UpgradeAdapter.prototype.declareNg1Module=function(modules){var _this=this;void 0===modules&&(modules=[]);var original$applyFn,rootScopePrototype,rootScope,delayApplyExps=[],upgradeAdapter=this,ng1Module=this.ng1Module=module$1(this.idPrefix,modules),platformRef=_angular_platformBrowserDynamic.platformBrowserDynamic();return this.ngZone=new _angular_core.NgZone({enableLongStackTrace:Zone.hasOwnProperty("longStackTraceZoneSpec")}),this.ng2BootstrapDeferred=new Deferred,ng1Module.factory(INJECTOR_KEY,function(){return _this.moduleRef.injector.get(_angular_core.Injector)}).constant(NG_ZONE_KEY,this.ngZone).factory(COMPILER_KEY,function(){return _this.moduleRef.injector.get(_angular_core.Compiler)}).config(["$provide","$injector",function(provide,ng1Injector){provide.decorator($ROOT_SCOPE,["$delegate",function(rootScopeDelegate){if(rootScopePrototype=rootScopeDelegate.constructor.prototype,!rootScopePrototype.hasOwnProperty("$apply"))throw new Error("Failed to find '$apply' on '$rootScope'!");return original$applyFn=rootScopePrototype.$apply,rootScopePrototype.$apply=function(exp){return delayApplyExps.push(exp)},rootScope=rootScopeDelegate}]),ng1Injector.has($$TESTABILITY)&&provide.decorator($$TESTABILITY,["$delegate",function(testabilityDelegate){var originalWhenStable=testabilityDelegate.whenStable,newWhenStable=function(callback){originalWhenStable.call(this,function(){var ng2Testability=upgradeAdapter.moduleRef.injector.get(_angular_core.Testability);ng2Testability.isStable()?callback.apply(this,arguments):ng2Testability.whenStable(newWhenStable.bind(this,callback))})};return testabilityDelegate.whenStable=newWhenStable,testabilityDelegate}])}]),ng1Module.run(["$injector","$rootScope",function(ng1Injector,rootScope){UpgradeNg1ComponentAdapterBuilder.resolve(_this.ng1ComponentsToBeUpgraded,ng1Injector).then(function(){var DynamicNgUpgradeModule=_angular_core.NgModule({providers:[{provide:$INJECTOR,useFactory:function(){return ng1Injector}},{provide:$COMPILE,useFactory:function(){return ng1Injector.get($COMPILE)}},{provide:ContentProjectionHelper,useClass:DynamicContentProjectionHelper},_this.upgradedProviders],imports:[_this.ng2AppModule],entryComponents:_this.downgradedComponents}).Class({constructor:function(){},ngDoBootstrap:function(){}});platformRef._bootstrapModuleWithZone(DynamicNgUpgradeModule,_this.compilerOptions,_this.ngZone).then(function(ref){_this.moduleRef=ref,_this.ngZone.run(function(){if(rootScopePrototype){for(rootScopePrototype.$apply=original$applyFn;delayApplyExps.length;)rootScope.$apply(delayApplyExps.shift());rootScopePrototype=null}})}).then(function(){return _this.ng2BootstrapDeferred.resolve(ng1Injector)},onError).then(function(){var subscription=_this.ngZone.onMicrotaskEmpty.subscribe({next:function(){return rootScope.$digest()}});rootScope.$on("$destroy",function(){subscription.unsubscribe()})})}).catch(function(e){return _this.ng2BootstrapDeferred.reject(e)})}]),ng1Module},UpgradeAdapter}(),UpgradeAdapterRef=function(){function UpgradeAdapterRef(){this._readyFn=null,this.ng1RootScope=null,this.ng1Injector=null,this.ng2ModuleRef=null,this.ng2Injector=null}return UpgradeAdapterRef.prototype._bootstrapDone=function(ngModuleRef,ng1Injector){this.ng2ModuleRef=ngModuleRef,this.ng2Injector=ngModuleRef.injector,this.ng1Injector=ng1Injector,this.ng1RootScope=ng1Injector.get($ROOT_SCOPE),this._readyFn&&this._readyFn(this)},UpgradeAdapterRef.prototype.ready=function(fn){this._readyFn=fn},UpgradeAdapterRef.prototype.dispose=function(){this.ng1Injector.get($ROOT_SCOPE).$destroy(),this.ng2ModuleRef.destroy()},UpgradeAdapterRef}();exports.VERSION=VERSION,exports.UpgradeAdapter=UpgradeAdapter,exports.UpgradeAdapterRef=UpgradeAdapterRef});
{
"name": "@angular/upgrade",
"version": "4.0.0-rc.2",
"version": "4.0.0-rc.3",
"description": "Angular - the library for easing update from v1 to v2",

@@ -12,6 +12,6 @@ "main": "./bundles/upgrade.umd.js",

"peerDependencies": {
"@angular/core": "4.0.0-rc.2",
"@angular/compiler": "4.0.0-rc.2",
"@angular/platform-browser": "4.0.0-rc.2",
"@angular/platform-browser-dynamic": "4.0.0-rc.2"
"@angular/core": "4.0.0-rc.3",
"@angular/compiler": "4.0.0-rc.3",
"@angular/platform-browser": "4.0.0-rc.3",
"@angular/platform-browser-dynamic": "4.0.0-rc.3"
},

@@ -18,0 +18,0 @@ "repository": {

@@ -1,1 +0,6 @@

{"typings": "../typings/static/static.d.ts", "main": "../bundles/upgrade-static.umd.js", "module": "../@angular/upgrade/static.es5.js", "es2015": "../@angular/upgrade/static.js"}
{
"typings": "../typings/static/index.d.ts",
"main": "../bundles/upgrade-static.umd.js",
"module": "../@angular/upgrade/static.es5.js",
"es2015": "../@angular/upgrade/static.js"
}

@@ -123,2 +123,3 @@ /**

data?: (name: string, value?: any) => any;
text?: () => string;
inheritedData?: (name: string, value?: any) => any;

@@ -125,0 +126,0 @@ contents?: () => IAugmentedJQuery;

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":3,"metadata":{"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version"},"arguments":["4.0.0-rc.2"]},"UpgradeAdapter":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Type","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","module":"@angular/core","name":"CompilerOptions"}]}],"downgradeNg2Component":[{"__symbolic":"method"}],"upgradeNg1Component":[{"__symbolic":"method"}],"registerForNg1Tests":[{"__symbolic":"method"}],"bootstrap":[{"__symbolic":"method"}],"upgradeNg1Provider":[{"__symbolic":"method"}],"downgradeNg2Provider":[{"__symbolic":"method"}],"declareNg1Module":[{"__symbolic":"method"}]}},"UpgradeAdapterRef":{"__symbolic":"class","members":{"_bootstrapDone":[{"__symbolic":"method"}],"ready":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}]}}},"importAs":"@angular/upgrade"}
{"__symbolic":"module","version":3,"metadata":{"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version"},"arguments":["4.0.0-rc.3"]},"UpgradeAdapter":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Type","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","module":"@angular/core","name":"CompilerOptions"}]}],"downgradeNg2Component":[{"__symbolic":"method"}],"upgradeNg1Component":[{"__symbolic":"method"}],"registerForNg1Tests":[{"__symbolic":"method"}],"bootstrap":[{"__symbolic":"method"}],"upgradeNg1Provider":[{"__symbolic":"method"}],"downgradeNg2Provider":[{"__symbolic":"method"}],"declareNg1Module":[{"__symbolic":"method"}]}},"UpgradeAdapterRef":{"__symbolic":"class","members":{"_bootstrapDone":[{"__symbolic":"method"}],"ready":[{"__symbolic":"method"}],"dispose":[{"__symbolic":"method"}]}}},"importAs":"@angular/upgrade"}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc