@@ -128,10 +128,6 @@ System.register("angular2/src/facade/lang", [], true, function(require, exports,
128128 return val;
129129 }
130130 exports.deserializeEnum = deserializeEnum;
131- function resolveEnumToken(enumValue, val) {
132- return enumValue[val];
133- }
134- exports.resolveEnumToken = resolveEnumToken;
135131 var StringWrapper = (function() {
136132 function StringWrapper() {}
137133 StringWrapper.fromCharCode = function(code) {
@@ -633,11 +629,9 @@ System.register("angular2/src/core/util/decorators", ["angular2/src/facade/lang"
633629 }
634630 exports.Class = Class;
635631 var Reflect = lang_1.global.Reflect;
636- (function checkReflect() {
637- if (!(Reflect && Reflect.getMetadata)) {
638- throw 'reflect-metadata shim is required when using class decorators';
639- }
640- })();
632+ if (!(Reflect && Reflect.getMetadata)) {
633+ throw 'reflect-metadata shim is required when using class decorators';
634+ }
641635 function makeDecorator(annotationCls, chainFn) {
642636 if (chainFn === void 0) {
643637 chainFn = null;
@@ -2084,17 +2078,6 @@ System.register("angular2/src/facade/promise", [], true, function(require, expor
20842078 var global = System.global,
20852079 __define = global.define;
20862080 global.define = undefined;
2087- var PromiseCompleter = (function() {
2088- function PromiseCompleter() {
2089- var _this = this;
2090- this.promise = new Promise(function(res, rej) {
2091- _this.resolve = res;
2092- _this.reject = rej;
2093- });
2094- }
2095- return PromiseCompleter;
2096- })();
2097- exports.PromiseCompleter = PromiseCompleter;
20982081 var PromiseWrapper = (function() {
20992082 function PromiseWrapper() {}
21002083 PromiseWrapper.resolve = function(obj) {
@@ -2130,7 +2113,17 @@ System.register("angular2/src/facade/promise", [], true, function(require, expor
21302113 return obj instanceof Promise;
21312114 };
21322115 PromiseWrapper.completer = function() {
2133- return new PromiseCompleter();
2116+ var resolve;
2117+ var reject;
2118+ var p = new Promise(function(res, rej) {
2119+ resolve = res;
2120+ reject = rej;
2121+ });
2122+ return {
2123+ promise: p,
2124+ resolve: resolve,
2125+ reject: reject
2126+ };
21342127 };
21352128 return PromiseWrapper;
21362129 })();
@@ -7860,8 +7853,14 @@ System.register("angular2/src/core/change_detection/change_detection_util", ["an
78607853 return SimpleChange;
78617854 })();
78627855 exports.SimpleChange = SimpleChange;
7856+ var _simpleChangesIndex = 0;
7857+ var _simpleChanges = [new SimpleChange(null, null), new SimpleChange(null, null), new SimpleChange(null, null), new SimpleChange(null, null), new SimpleChange(null, null), new SimpleChange(null, null), new SimpleChange(null, null), new SimpleChange(null, null), new SimpleChange(null, null), new SimpleChange(null, null), new SimpleChange(null, null), new SimpleChange(null, null), new SimpleChange(null, null), new SimpleChange(null, null), new SimpleChange(null, null), new SimpleChange(null, null), new SimpleChange(null, null), new SimpleChange(null, null), new SimpleChange(null, null), new SimpleChange(null, null)];
78637858 function _simpleChange(previousValue, currentValue) {
7864- return new SimpleChange(previousValue, currentValue);
7859+ var index = _simpleChangesIndex++ % 20;
7860+ var s = _simpleChanges[index];
7861+ s.previousValue = previousValue;
7862+ s.currentValue = currentValue;
7863+ return s;
78657864 }
78667865 var ChangeDetectionUtil = (function() {
78677866 function ChangeDetectionUtil() {}
@@ -12504,7 +12503,7 @@ System.register("angular2/src/core/application_ref", ["angular2/src/core/zone/ng
1250412503 function PlatformRef() {}
1250512504 Object.defineProperty(PlatformRef.prototype, "injector", {
1250612505 get: function() {
12507- throw exceptions_1.unimplemented();
12506+ return exceptions_1.unimplemented();
1250812507 },
1250912508 enumerable: true,
1251012509 configurable: true
@@ -12721,12 +12720,12 @@ System.register("angular2/src/core/application_ref", ["angular2/src/core/zone/ng
1272112720 completer.reject(e, e.stack);
1272212721 }
1272312722 });
12724- return completer.promise.then(function(ref ) {
12723+ return completer.promise.then(function(_ ) {
1272512724 var c = _this._injector.get(console_1.Console);
1272612725 if (lang_1.assertionsEnabled()) {
1272712726 c.log("Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.");
1272812727 }
12729- return ref ;
12728+ return _ ;
1273012729 });
1273112730 };
1273212731 ApplicationRef_.prototype._loadComponent = function(componentRef) {
@@ -13092,7 +13091,6 @@ System.register("angular2/src/facade/async", ["angular2/src/facade/lang", "angul
1309213091 var lang_1 = require("angular2/src/facade/lang");
1309313092 var promise_1 = require("angular2/src/facade/promise");
1309413093 exports.PromiseWrapper = promise_1.PromiseWrapper;
13095- exports.PromiseCompleter = promise_1.PromiseCompleter;
1309613094 var Subject_1 = require("rxjs/Subject");
1309713095 var PromiseObservable_1 = require("rxjs/observable/PromiseObservable");
1309813096 var toPromise_1 = require("rxjs/operator/toPromise");
@@ -14627,7 +14625,7 @@ System.register("angular2/src/common/pipes/i18n_plural_pipe", ["angular2/src/fac
1462714625 }
1462814626 var key;
1462914627 var valueStr;
14630- var pluralMap = ( args[0]) ;
14628+ var pluralMap = args[0];
1463114629 if (!lang_1.isStringMap(pluralMap)) {
1463214630 throw new invalid_pipe_argument_exception_1.InvalidPipeArgumentException(I18nPluralPipe, pluralMap);
1463314631 }
@@ -14676,7 +14674,7 @@ System.register("angular2/src/common/pipes/i18n_select_pipe", ["angular2/src/fac
1467614674 if (args === void 0) {
1467714675 args = null;
1467814676 }
14679- var mapping = ( args[0]) ;
14677+ var mapping = args[0];
1468014678 if (!lang_1.isStringMap(mapping)) {
1468114679 throw new invalid_pipe_argument_exception_1.InvalidPipeArgumentException(I18nSelectPipe, mapping);
1468214680 }
@@ -16005,7 +16003,7 @@ System.register("angular2/src/common/forms/validators", ["angular2/src/facade/la
1600516003 if (presentValidators.length == 0)
1600616004 return null;
1600716005 return function(control) {
16008- var promises = _executeAsyncValidators (control, presentValidators).map(_convertToPromise);
16006+ var promises = _executeValidators (control, presentValidators).map(_convertToPromise);
1600916007 return promise_1.PromiseWrapper.all(promises).then(_mergeErrors);
1601016008 };
1601116009 };
@@ -16020,11 +16018,6 @@ System.register("angular2/src/common/forms/validators", ["angular2/src/facade/la
1602016018 return v(control);
1602116019 });
1602216020 }
16023- function _executeAsyncValidators(control, validators) {
16024- return validators.map(function(v) {
16025- return v(control);
16026- });
16027- }
1602816021 function _mergeErrors(arrayOfErrors) {
1602916022 var res = arrayOfErrors.reduce(function(res, errors) {
1603016023 return lang_1.isPresent(errors) ? collection_1.StringMapWrapper.merge(res, errors) : res;
@@ -16431,16 +16424,6 @@ System.register("angular2/src/common/forms/directives/normalize_validator", [],
1643116424 }
1643216425 }
1643316426 exports.normalizeValidator = normalizeValidator;
16434- function normalizeAsyncValidator(validator) {
16435- if (validator.validate !== undefined) {
16436- return function(c) {
16437- return Promise.resolve(validator.validate(c));
16438- };
16439- } else {
16440- return validator;
16441- }
16442- }
16443- exports.normalizeAsyncValidator = normalizeAsyncValidator;
1644416427 global.define = __define;
1644516428 return module.exports;
1644616429});
@@ -17298,7 +17281,7 @@ System.register("angular2/src/common/forms/form_builder", ["angular2/core", "ang
1729817281 extra = null;
1729917282 }
1730017283 var controls = this._reduceControls(controlsConfig);
17301- var optionals = ( lang_1.isPresent(extra) ? collection_1.StringMapWrapper.get(extra, "optionals") : null) ;
17284+ var optionals = lang_1.isPresent(extra) ? collection_1.StringMapWrapper.get(extra, "optionals") : null;
1730217285 var validator = lang_1.isPresent(extra) ? collection_1.StringMapWrapper.get(extra, "validator") : null;
1730317286 var asyncValidator = lang_1.isPresent(extra) ? collection_1.StringMapWrapper.get(extra, "asyncValidator") : null;
1730417287 return new modelModule.ControlGroup(controls, optionals, validator, asyncValidator);
@@ -19986,8 +19969,6 @@ System.register("angular2/src/compiler/html_tags", ["angular2/src/facade/lang"],
1998619969 })();
1998719970 exports.HtmlTagDefinition = HtmlTagDefinition;
1998819971 var TAG_DEFINITIONS = {
19989- 'base': new HtmlTagDefinition({isVoid: true}),
19990- 'meta': new HtmlTagDefinition({isVoid: true}),
1999119972 'area': new HtmlTagDefinition({isVoid: true}),
1999219973 'embed': new HtmlTagDefinition({isVoid: true}),
1999319974 'link': new HtmlTagDefinition({isVoid: true}),
@@ -20756,7 +20737,7 @@ System.register("angular2/src/common/forms/directives/shared", ["angular2/src/fa
2075620737 }
2075720738 exports.composeValidators = composeValidators;
2075820739 function composeAsyncValidators(validators) {
20759- return lang_1.isPresent(validators) ? validators_1.Validators.composeAsync(validators.map(normalize_validator_1.normalizeAsyncValidator )) : null;
20740+ return lang_1.isPresent(validators) ? validators_1.Validators.composeAsync(validators.map(normalize_validator_1.normalizeValidator )) : null;
2076020741 }
2076120742 exports.composeAsyncValidators = composeAsyncValidators;
2076220743 function isPropertyUpdated(changes, viewModel) {
@@ -20910,14 +20891,14 @@ System.register("angular2/src/platform/dom/events/hammer_gestures", ["angular2/s
2091020891 var mc = new Hammer(element);
2091120892 mc.get('pinch').set({enable: true});
2091220893 mc.get('rotate').set({enable: true});
20913- var callback = function(eventObj) {
20894+ var handler = function(eventObj) {
2091420895 zone.run(function() {
2091520896 handler(eventObj);
2091620897 });
2091720898 };
20918- mc.on(eventName, callback );
20899+ mc.on(eventName, handler );
2091920900 return function() {
20920- mc.off(eventName, callback );
20901+ mc.off(eventName, handler );
2092120902 };
2092220903 });
2092320904 };
0 commit comments