cleanup angular2-product example
This commit is contained in:
1 parent
5e9f3b32fc
commit
71cfa11d2f
9320 files changed
-1467631
No files matched your search
@@ -1,69 +0,0 @@
|
||||
System.register(['angular2/http', 'angular2/core', 'rxjs/Observable', './keycloak'], function(exports_1) {
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
var http_1, core_1, Observable_1, keycloak_1;
|
||||
var AppComponent;
|
||||
return {
|
||||
setters:[
|
||||
function (http_1_1) {
|
||||
http_1 = http_1_1;
|
||||
},
|
||||
function (core_1_1) {
|
||||
core_1 = core_1_1;
|
||||
},
|
||||
function (Observable_1_1) {
|
||||
Observable_1 = Observable_1_1;
|
||||
},
|
||||
function (keycloak_1_1) {
|
||||
keycloak_1 = keycloak_1_1;
|
||||
}],
|
||||
execute: function() {
|
||||
AppComponent = (function () {
|
||||
function AppComponent(_kc, http) {
|
||||
this._kc = _kc;
|
||||
this.http = http;
|
||||
this.products = [];
|
||||
}
|
||||
AppComponent.prototype.logout = function () {
|
||||
this._kc.logout();
|
||||
};
|
||||
AppComponent.prototype.reloadData = function () {
|
||||
//angular dont have http interceptor yet
|
||||
var _this = this;
|
||||
this._kc.getToken().then(function (token) {
|
||||
var headers = new http_1.Headers({
|
||||
'Accept': 'application/json',
|
||||
'Authorization': 'Bearer ' + token
|
||||
});
|
||||
var options = new http_1.RequestOptions({ headers: headers });
|
||||
_this.http.get('/database/products', options)
|
||||
.map(function (res) { return res.json(); })
|
||||
.subscribe(function (prods) { return _this.products = prods; }, function (error) { return console.log(error); });
|
||||
}, function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
};
|
||||
AppComponent.prototype.handleError = function (error) {
|
||||
console.error(error);
|
||||
return Observable_1.Observable.throw(error.json().error || 'Server error');
|
||||
};
|
||||
AppComponent = __decorate([
|
||||
core_1.Component({
|
||||
selector: 'my-app',
|
||||
template: "\n<div id=\"content-area\" class=\"col-md-9\" role=\"main\">\n <div id=\"content\">\n <h1>Angular2 Product (Beta)</h1>\n <h2><span>Products</span></h2>\n \n <button type=\"button\" (click)=\"logout()\">Sign Out</button>\n <button type=\"button\" (click)=\"reloadData()\">Reload</button>\n <table class=\"table\" [hidden]=\"!products.length\">\n <thead>\n <tr>\n <th>Product Listing</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"#p of products\">\n <td>{{p}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n</div>\n"
|
||||
}),
|
||||
__metadata('design:paramtypes', [keycloak_1.KeycloakService, http_1.Http])
|
||||
], AppComponent);
|
||||
return AppComponent;
|
||||
})();
|
||||
exports_1("AppComponent", AppComponent);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"app.js","sourceRoot":"","names":["AppComponent","AppComponent.constructor","AppComponent.logout","AppComponent.reloadData"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;YAOA;gBA0BIA,sBAAoBA,GAAmBA,EAAUA,IAASA;oBAAtCC,QAAGA,GAAHA,GAAGA,CAAgBA;oBAAUA,SAAIA,GAAJA,IAAIA,CAAKA;gBAAGA,CAACA;gBAI9DD,6BAAMA,GAANA;oBACIE,IAAIA,CAACA,GAAGA,CAACA,MAAMA,EAAEA,CAACA;gBACtBA,CAACA;gBAEDF,iCAAUA,GAAVA;oBACIG,wCAAwCA;oBAD5CA,iBAuBCA;oBApBGA,IAAIA,CAACA,GAAGA,CAACA,QAAQA,EAAEA,CAACA,IAAIA,CACpBA,UAACA,KAAKA;wBAEFA,IAAIA,OAAOA,GAAGA,IAAIA,cAAOA,CAACA;4BAClBA,cAAcA,EAAEA,kBAAkBA;4BAClCA,aAAaA,EAAEA,SAASA,GAAGA,KAAKA;yBACnCA,CAACA,CAACA;wBAEPA,IAAIA,OAAOA,GAAGA,IAAIA,qBAAcA,CAACA,EAAEA,OAAOA,EAAEA,OAAOA,EAAEA,CAACA,CAACA;wBAEvDA,KAAIA,CAACA,IAAIA,CAACA,GAAGA,CAACA,oBAAoBA,EAAEA,OAAOA,CAACA;6BACvCA,GAAGA,CAACA,UAAAA,GAAGA,IAAIA,OAAWA,GAAGA,CAACA,IAAIA,EAAEA,CAACA,IAAIA,EAA1BA,CAA0BA,CAACA;6BACtCA,EAAEA,CAACA,UAAAA,IAAIA,IAAGA,OAAAA,KAAIA,CAACA,QAAQA,GAAGA,IAAIA,EAApBA,CAAoBA,CAACA,CAACA;wBACjCA,2BAA2BA;oBACnCA,CAACA,EACDA,UAACA,KAAKA;wBACFA,OAAOA,CAACA,GAAGA,CAACA,KAAKA,CAACA,CAACA;oBACvBA,CAACA,CACJA,CAACA;gBAENA,CAACA;gBAzDLH;oBAACA,gBAASA,CAACA;wBACPA,QAAQA,EAAEA,QAAQA;wBAClBA,QAAQA,EACZA,mmBAoBCA;qBACAA,CAACA;;iCAwCDA;gBAADA,mBAACA;YAADA,CAACA,AAhED,IAgEC;YAhED,uCAgEC,CAAA"}
|
||||
@@ -1,66 +0,0 @@
|
||||
System.register(['angular2/core'], function(exports_1) {
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
var core_1;
|
||||
var KeycloakService;
|
||||
return {
|
||||
setters:[
|
||||
function (core_1_1) {
|
||||
core_1 = core_1_1;
|
||||
}],
|
||||
execute: function() {
|
||||
KeycloakService = (function () {
|
||||
function KeycloakService() {
|
||||
}
|
||||
KeycloakService.init = function () {
|
||||
var keycloakAuth = new Keycloak('keycloak.json');
|
||||
KeycloakService.auth.loggedIn = false;
|
||||
return new Promise(function (resolve, reject) {
|
||||
keycloakAuth.init({ onLoad: 'login-required' })
|
||||
.success(function () {
|
||||
KeycloakService.auth.loggedIn = true;
|
||||
KeycloakService.auth.authz = keycloakAuth;
|
||||
KeycloakService.auth.logoutUrl = keycloakAuth.authServerUrl + "/realms/demo/tokens/logout?redirect_uri=/angular2-product/index.html";
|
||||
resolve(null);
|
||||
})
|
||||
.error(function () {
|
||||
reject(null);
|
||||
});
|
||||
});
|
||||
};
|
||||
KeycloakService.prototype.logout = function () {
|
||||
console.log('*** LOGOUT');
|
||||
KeycloakService.auth.loggedIn = false;
|
||||
KeycloakService.auth.authz = null;
|
||||
window.location.href = KeycloakService.auth.logoutUrl;
|
||||
};
|
||||
KeycloakService.prototype.getToken = function () {
|
||||
return new Promise(function (resolve, reject) {
|
||||
if (KeycloakService.auth.authz.token) {
|
||||
KeycloakService.auth.authz.updateToken(5).success(function () {
|
||||
resolve(KeycloakService.auth.authz.token);
|
||||
})
|
||||
.error(function () {
|
||||
reject('Failed to refresh token');
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
KeycloakService.auth = {};
|
||||
KeycloakService = __decorate([
|
||||
core_1.Injectable(),
|
||||
__metadata('design:paramtypes', [])
|
||||
], KeycloakService);
|
||||
return KeycloakService;
|
||||
})();
|
||||
exports_1("KeycloakService", KeycloakService);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"keycloak.js","sourceRoot":"","names":["KeycloakService","KeycloakService.constructor","KeycloakService.init","KeycloakService.logout","KeycloakService.getToken"],"mappings":";;;;;;;;;;;;;;;;;;YAOA,sCAAsC;YACtC,kCAAkC;YAGlC,aAAa;YACb,yBAAyB;YACzB,kBAAkB;YAClB,sBAAsB;YACtB,GAAG;YAKH;gBAKIA;oBACIC,OAAOA,CAACA,GAAGA,CAACA,6BAA6BA,CAACA,CAACA;gBAC/CA,CAACA;gBAEMD,oBAAIA,GAAXA;oBACIE,OAAOA,CAACA,GAAGA,CAACA,uBAAuBA,CAACA,CAACA;oBACrCA,IAAIA,YAAYA,GAASA,IAAIA,QAAQA,CAACA,eAAeA,CAACA,CAACA;oBACvDA,eAAeA,CAACA,IAAIA,CAACA,QAAQA,GAAGA,KAAKA,CAACA;oBAEtCA,MAAMA,CAACA,IAAIA,OAAOA,CAACA,UAACA,OAAOA,EAACA,MAAMA;wBAC9BA,YAAYA,CAACA,IAAIA,CAACA,EAAEA,MAAMA,EAAEA,gBAAgBA,EAAEA,CAACA;6BAC1CA,OAAOA,CAAEA;4BACNA,eAAeA,CAACA,IAAIA,CAACA,QAAQA,GAAGA,IAAIA,CAACA;4BACrCA,eAAeA,CAACA,IAAIA,CAACA,KAAKA,GAAGA,YAAYA,CAACA;4BAC1CA,eAAeA,CAACA,IAAIA,CAACA,SAASA,GAAGA,YAAYA,CAACA,aAAaA,GAAGA,qEAAqEA,CAACA;4BACpIA,OAAOA,CAACA,IAAIA,CAACA,CAACA;wBAClBA,CAACA,CAACA;6BACDA,KAAKA,CAACA;4BACHA,MAAMA,CAACA,IAAIA,CAACA,CAACA;wBACjBA,CAACA,CAACA,CAACA;oBACXA,CAACA,CAACA,CAACA;gBACPA,CAACA;gBAEDF,gCAAMA,GAANA;oBACIG,OAAOA,CAACA,GAAGA,CAACA,YAAYA,CAACA,CAACA;oBAC1BA,eAAeA,CAACA,IAAIA,CAACA,QAAQA,GAAGA,KAAKA,CAACA;oBACtCA,eAAeA,CAACA,IAAIA,CAACA,KAAKA,GAAGA,IAAIA,CAACA;oBAClCA,MAAMA,CAACA,QAAQA,GAAGA,eAAeA,CAACA,IAAIA,CAACA,SAASA,CAACA;gBACrDA,CAACA;gBAEDH,kCAAQA,GAARA;oBACII,MAAMA,CAACA,IAAIA,OAAOA,CAASA,UAACA,OAAOA,EAACA,MAAMA;wBACtCA,EAAEA,CAACA,CAACA,eAAeA,CAACA,IAAIA,CAACA,KAAKA,CAACA,KAAKA,CAACA,CAACA,CAACA;4BACnCA,eAAeA,CAACA,IAAIA,CAACA,KAAKA,CAACA,WAAWA,CAACA,CAACA,CAACA,CAACA,OAAOA,CAACA;gCAC9C,OAAO,CAAS,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;4BACtD,CAAC,CAACA;iCACDA,KAAKA,CAACA;gCACH,MAAM,CAAC,yBAAyB,CAAC,CAAC;4BACtC,CAAC,CAACA,CAACA;wBACPA,CAACA;oBACLA,CAACA,CAACA,CAACA;gBACPA,CAACA;gBA3CMJ,oBAAIA,GAASA,EAAEA,CAACA;gBAH3BA;oBAACA,iBAAUA,EAAEA;;oCA+CZA;gBAADA,sBAACA;YAADA,CAACA,AA/CD,IA+CC;YA/CD,6CA+CC,CAAA"}
|
||||
@@ -1,26 +0,0 @@
|
||||
System.register(['rxjs/Rx', 'angular2/platform/browser', 'angular2/http', './keycloak', './app'], function(exports_1) {
|
||||
var browser_1, http_1, keycloak_1, app_1;
|
||||
return {
|
||||
setters:[
|
||||
function (_1) {},
|
||||
function (browser_1_1) {
|
||||
browser_1 = browser_1_1;
|
||||
},
|
||||
function (http_1_1) {
|
||||
http_1 = http_1_1;
|
||||
},
|
||||
function (keycloak_1_1) {
|
||||
keycloak_1 = keycloak_1_1;
|
||||
},
|
||||
function (app_1_1) {
|
||||
app_1 = app_1_1;
|
||||
}],
|
||||
execute: function() {
|
||||
keycloak_1.KeycloakService.init().then(function (o) {
|
||||
browser_1.bootstrap(app_1.AppComponent, [http_1.HTTP_BINDINGS, keycloak_1.KeycloakService]);
|
||||
}, function (x) {
|
||||
window.location.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"main.js","sourceRoot":"","names":[],"mappings":";;;;;;;;;;;;;;;;;YAKA,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;YACzB,0BAAe,CAAC,IAAI,EAAE,CAAC,IAAI,CACvB;gBACI,mBAAS,CAAC,kBAAY,EAAC,CAAC,oBAAa,CAAC,CAAC,CAAC;YAC5C,CAAC,EACD;gBACI,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;YAC7B,CAAC,CACJ,CAAC"}
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../browser-sync/bin/browser-sync.js
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../concurrently/src/main.js
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../dev-ip/lib/dev-ip.js
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../express/bin/express
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../foxy/cli.js
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../har-validator/bin/har-validator
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../has-ansi/cli.js
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../indent-string/cli.js
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../lite-server/bin/lite-server
|
||||
-1
@@ -1 +0,0 @@
|
||||
../localtunnel/bin/client
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../nopt/bin/nopt.js
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../repeating/cli.js
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../rimraf/bin.js
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../strip-ansi/cli.js
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../supports-color/cli.js
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../stream-throttle/bin/throttleproxy.js
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../typescript/bin/tsc
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../typescript/bin/tsserver
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../node-uuid/bin/uuid
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../weinre/weinre
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
../window-size/cli.js
|
||||
Generated
Vendored
-4
@@ -1,4 +0,0 @@
|
||||
.nyc_output
|
||||
nyc_output
|
||||
node_modules
|
||||
coverage
|
||||
Generated
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- '0.10'
|
||||
- '0.12'
|
||||
- 'iojs'
|
||||
Generated
Vendored
-3
@@ -1,3 +0,0 @@
|
||||
To get started, <a
|
||||
href="http://www.clahub.com/agreements/isaacs/abbrev-js">sign the
|
||||
Contributor License Agreement</a>.
|
||||
Generated
Vendored
-15
@@ -1,15 +0,0 @@
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
Generated
Vendored
-23
@@ -1,23 +0,0 @@
|
||||
# abbrev-js
|
||||
|
||||
Just like [ruby's Abbrev](http://apidock.com/ruby/Abbrev).
|
||||
|
||||
Usage:
|
||||
|
||||
var abbrev = require("abbrev");
|
||||
abbrev("foo", "fool", "folding", "flop");
|
||||
|
||||
// returns:
|
||||
{ fl: 'flop'
|
||||
, flo: 'flop'
|
||||
, flop: 'flop'
|
||||
, fol: 'folding'
|
||||
, fold: 'folding'
|
||||
, foldi: 'folding'
|
||||
, foldin: 'folding'
|
||||
, folding: 'folding'
|
||||
, foo: 'foo'
|
||||
, fool: 'fool'
|
||||
}
|
||||
|
||||
This is handy for command-line scripts, or other cases where you want to be able to accept shorthands.
|
||||
Generated
Vendored
-62
@@ -1,62 +0,0 @@
|
||||
|
||||
module.exports = exports = abbrev.abbrev = abbrev
|
||||
|
||||
abbrev.monkeyPatch = monkeyPatch
|
||||
|
||||
function monkeyPatch () {
|
||||
Object.defineProperty(Array.prototype, 'abbrev', {
|
||||
value: function () { return abbrev(this) },
|
||||
enumerable: false, configurable: true, writable: true
|
||||
})
|
||||
|
||||
Object.defineProperty(Object.prototype, 'abbrev', {
|
||||
value: function () { return abbrev(Object.keys(this)) },
|
||||
enumerable: false, configurable: true, writable: true
|
||||
})
|
||||
}
|
||||
|
||||
function abbrev (list) {
|
||||
if (arguments.length !== 1 || !Array.isArray(list)) {
|
||||
list = Array.prototype.slice.call(arguments, 0)
|
||||
}
|
||||
for (var i = 0, l = list.length, args = [] ; i < l ; i ++) {
|
||||
args[i] = typeof list[i] === "string" ? list[i] : String(list[i])
|
||||
}
|
||||
|
||||
// sort them lexicographically, so that they're next to their nearest kin
|
||||
args = args.sort(lexSort)
|
||||
|
||||
// walk through each, seeing how much it has in common with the next and previous
|
||||
var abbrevs = {}
|
||||
, prev = ""
|
||||
for (var i = 0, l = args.length ; i < l ; i ++) {
|
||||
var current = args[i]
|
||||
, next = args[i + 1] || ""
|
||||
, nextMatches = true
|
||||
, prevMatches = true
|
||||
if (current === next) continue
|
||||
for (var j = 0, cl = current.length ; j < cl ; j ++) {
|
||||
var curChar = current.charAt(j)
|
||||
nextMatches = nextMatches && curChar === next.charAt(j)
|
||||
prevMatches = prevMatches && curChar === prev.charAt(j)
|
||||
if (!nextMatches && !prevMatches) {
|
||||
j ++
|
||||
break
|
||||
}
|
||||
}
|
||||
prev = current
|
||||
if (j === cl) {
|
||||
abbrevs[current] = current
|
||||
continue
|
||||
}
|
||||
for (var a = current.substr(0, j) ; j <= cl ; j ++) {
|
||||
abbrevs[a] = current
|
||||
a += current.charAt(j)
|
||||
}
|
||||
}
|
||||
return abbrevs
|
||||
}
|
||||
|
||||
function lexSort (a, b) {
|
||||
return a === b ? 0 : a > b ? 1 : -1
|
||||
}
|
||||
Generated
Vendored
-73
@@ -1,73 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"abbrev@1",
|
||||
"/home/jean/Experiences/angular2-product-app/node_modules/nopt"
|
||||
]
|
||||
],
|
||||
"_from": "abbrev@>=1.0.0 <2.0.0",
|
||||
"_id": "abbrev@1.0.7",
|
||||
"_inCache": true,
|
||||
"_location": "/abbrev",
|
||||
"_nodeVersion": "2.0.1",
|
||||
"_npmUser": {
|
||||
"email": "isaacs@npmjs.com",
|
||||
"name": "isaacs"
|
||||
},
|
||||
"_npmVersion": "2.10.1",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "abbrev",
|
||||
"raw": "abbrev@1",
|
||||
"rawSpec": "1",
|
||||
"scope": null,
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/nopt"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.7.tgz",
|
||||
"_shasum": "5b6035b2ee9d4fb5cf859f08a9be81b208491843",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "abbrev@1",
|
||||
"_where": "/home/jean/Experiences/angular2-product-app/node_modules/nopt",
|
||||
"author": {
|
||||
"email": "i@izs.me",
|
||||
"name": "Isaac Z. Schlueter"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/isaacs/abbrev-js/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Like ruby's abbrev module, but in js",
|
||||
"devDependencies": {
|
||||
"tap": "^1.2.0"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "5b6035b2ee9d4fb5cf859f08a9be81b208491843",
|
||||
"tarball": "http://registry.npmjs.org/abbrev/-/abbrev-1.0.7.tgz"
|
||||
},
|
||||
"gitHead": "821d09ce7da33627f91bbd8ed631497ed6f760c2",
|
||||
"homepage": "https://github.com/isaacs/abbrev-js#readme",
|
||||
"installable": true,
|
||||
"license": "ISC",
|
||||
"main": "abbrev.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "isaacs",
|
||||
"email": "i@izs.me"
|
||||
}
|
||||
],
|
||||
"name": "abbrev",
|
||||
"optionalDependencies": {},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/isaacs/abbrev-js.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tap test.js --cov"
|
||||
},
|
||||
"version": "1.0.7"
|
||||
}
|
||||
Generated
Vendored
-47
@@ -1,47 +0,0 @@
|
||||
var abbrev = require('./abbrev.js')
|
||||
var assert = require("assert")
|
||||
var util = require("util")
|
||||
|
||||
console.log("TAP version 13")
|
||||
var count = 0
|
||||
|
||||
function test (list, expect) {
|
||||
count++
|
||||
var actual = abbrev(list)
|
||||
assert.deepEqual(actual, expect,
|
||||
"abbrev("+util.inspect(list)+") === " + util.inspect(expect) + "\n"+
|
||||
"actual: "+util.inspect(actual))
|
||||
actual = abbrev.apply(exports, list)
|
||||
assert.deepEqual(abbrev.apply(exports, list), expect,
|
||||
"abbrev("+list.map(JSON.stringify).join(",")+") === " + util.inspect(expect) + "\n"+
|
||||
"actual: "+util.inspect(actual))
|
||||
console.log('ok - ' + list.join(' '))
|
||||
}
|
||||
|
||||
test([ "ruby", "ruby", "rules", "rules", "rules" ],
|
||||
{ rub: 'ruby'
|
||||
, ruby: 'ruby'
|
||||
, rul: 'rules'
|
||||
, rule: 'rules'
|
||||
, rules: 'rules'
|
||||
})
|
||||
test(["fool", "foom", "pool", "pope"],
|
||||
{ fool: 'fool'
|
||||
, foom: 'foom'
|
||||
, poo: 'pool'
|
||||
, pool: 'pool'
|
||||
, pop: 'pope'
|
||||
, pope: 'pope'
|
||||
})
|
||||
test(["a", "ab", "abc", "abcd", "abcde", "acde"],
|
||||
{ a: 'a'
|
||||
, ab: 'ab'
|
||||
, abc: 'abc'
|
||||
, abcd: 'abcd'
|
||||
, abcde: 'abcde'
|
||||
, ac: 'acde'
|
||||
, acd: 'acde'
|
||||
, acde: 'acde'
|
||||
})
|
||||
|
||||
console.log("1..%d", count)
|
||||
Generated
Vendored
-170
@@ -1,170 +0,0 @@
|
||||
1.2.13 / 2015-09-06
|
||||
===================
|
||||
|
||||
* deps: mime-types@~2.1.6
|
||||
- deps: mime-db@~1.18.0
|
||||
|
||||
1.2.12 / 2015-07-30
|
||||
===================
|
||||
|
||||
* deps: mime-types@~2.1.4
|
||||
- deps: mime-db@~1.16.0
|
||||
|
||||
1.2.11 / 2015-07-16
|
||||
===================
|
||||
|
||||
* deps: mime-types@~2.1.3
|
||||
- deps: mime-db@~1.15.0
|
||||
|
||||
1.2.10 / 2015-07-01
|
||||
===================
|
||||
|
||||
* deps: mime-types@~2.1.2
|
||||
- deps: mime-db@~1.14.0
|
||||
|
||||
1.2.9 / 2015-06-08
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.1.1
|
||||
- perf: fix deopt during mapping
|
||||
|
||||
1.2.8 / 2015-06-07
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.1.0
|
||||
- deps: mime-db@~1.13.0
|
||||
* perf: avoid argument reassignment & argument slice
|
||||
* perf: avoid negotiator recursive construction
|
||||
* perf: enable strict mode
|
||||
* perf: remove unnecessary bitwise operator
|
||||
|
||||
1.2.7 / 2015-05-10
|
||||
==================
|
||||
|
||||
* deps: negotiator@0.5.3
|
||||
- Fix media type parameter matching to be case-insensitive
|
||||
|
||||
1.2.6 / 2015-05-07
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.0.11
|
||||
- deps: mime-db@~1.9.1
|
||||
* deps: negotiator@0.5.2
|
||||
- Fix comparing media types with quoted values
|
||||
- Fix splitting media types with quoted commas
|
||||
|
||||
1.2.5 / 2015-03-13
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.0.10
|
||||
- deps: mime-db@~1.8.0
|
||||
|
||||
1.2.4 / 2015-02-14
|
||||
==================
|
||||
|
||||
* Support Node.js 0.6
|
||||
* deps: mime-types@~2.0.9
|
||||
- deps: mime-db@~1.7.0
|
||||
* deps: negotiator@0.5.1
|
||||
- Fix preference sorting to be stable for long acceptable lists
|
||||
|
||||
1.2.3 / 2015-01-31
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.0.8
|
||||
- deps: mime-db@~1.6.0
|
||||
|
||||
1.2.2 / 2014-12-30
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.0.7
|
||||
- deps: mime-db@~1.5.0
|
||||
|
||||
1.2.1 / 2014-12-30
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.0.5
|
||||
- deps: mime-db@~1.3.1
|
||||
|
||||
1.2.0 / 2014-12-19
|
||||
==================
|
||||
|
||||
* deps: negotiator@0.5.0
|
||||
- Fix list return order when large accepted list
|
||||
- Fix missing identity encoding when q=0 exists
|
||||
- Remove dynamic building of Negotiator class
|
||||
|
||||
1.1.4 / 2014-12-10
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.0.4
|
||||
- deps: mime-db@~1.3.0
|
||||
|
||||
1.1.3 / 2014-11-09
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.0.3
|
||||
- deps: mime-db@~1.2.0
|
||||
|
||||
1.1.2 / 2014-10-14
|
||||
==================
|
||||
|
||||
* deps: negotiator@0.4.9
|
||||
- Fix error when media type has invalid parameter
|
||||
|
||||
1.1.1 / 2014-09-28
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.0.2
|
||||
- deps: mime-db@~1.1.0
|
||||
* deps: negotiator@0.4.8
|
||||
- Fix all negotiations to be case-insensitive
|
||||
- Stable sort preferences of same quality according to client order
|
||||
|
||||
1.1.0 / 2014-09-02
|
||||
==================
|
||||
|
||||
* update `mime-types`
|
||||
|
||||
1.0.7 / 2014-07-04
|
||||
==================
|
||||
|
||||
* Fix wrong type returned from `type` when match after unknown extension
|
||||
|
||||
1.0.6 / 2014-06-24
|
||||
==================
|
||||
|
||||
* deps: negotiator@0.4.7
|
||||
|
||||
1.0.5 / 2014-06-20
|
||||
==================
|
||||
|
||||
* fix crash when unknown extension given
|
||||
|
||||
1.0.4 / 2014-06-19
|
||||
==================
|
||||
|
||||
* use `mime-types`
|
||||
|
||||
1.0.3 / 2014-06-11
|
||||
==================
|
||||
|
||||
* deps: negotiator@0.4.6
|
||||
- Order by specificity when quality is the same
|
||||
|
||||
1.0.2 / 2014-05-29
|
||||
==================
|
||||
|
||||
* Fix interpretation when header not in request
|
||||
* deps: pin negotiator@0.4.5
|
||||
|
||||
1.0.1 / 2014-01-18
|
||||
==================
|
||||
|
||||
* Identity encoding isn't always acceptable
|
||||
* deps: negotiator@~0.4.0
|
||||
|
||||
1.0.0 / 2013-12-27
|
||||
==================
|
||||
|
||||
* Genesis
|
||||
Generated
Vendored
-23
@@ -1,23 +0,0 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
|
||||
Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
Generated
Vendored
-135
@@ -1,135 +0,0 @@
|
||||
# accepts
|
||||
|
||||
[![NPM Version][npm-image]][npm-url]
|
||||
[![NPM Downloads][downloads-image]][downloads-url]
|
||||
[![Node.js Version][node-version-image]][node-version-url]
|
||||
[![Build Status][travis-image]][travis-url]
|
||||
[![Test Coverage][coveralls-image]][coveralls-url]
|
||||
|
||||
Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator). Extracted from [koa](https://www.npmjs.com/package/koa) for general use.
|
||||
|
||||
In addition to negotiator, it allows:
|
||||
|
||||
- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])` as well as `('text/html', 'application/json')`.
|
||||
- Allows type shorthands such as `json`.
|
||||
- Returns `false` when no types match
|
||||
- Treats non-existent headers as `*`
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
npm install accepts
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
```js
|
||||
var accepts = require('accepts')
|
||||
```
|
||||
|
||||
### accepts(req)
|
||||
|
||||
Create a new `Accepts` object for the given `req`.
|
||||
|
||||
#### .charset(charsets)
|
||||
|
||||
Return the first accepted charset. If nothing in `charsets` is accepted,
|
||||
then `false` is returned.
|
||||
|
||||
#### .charsets()
|
||||
|
||||
Return the charsets that the request accepts, in the order of the client's
|
||||
preference (most preferred first).
|
||||
|
||||
#### .encoding(encodings)
|
||||
|
||||
Return the first accepted encoding. If nothing in `encodings` is accepted,
|
||||
then `false` is returned.
|
||||
|
||||
#### .encodings()
|
||||
|
||||
Return the encodings that the request accepts, in the order of the client's
|
||||
preference (most preferred first).
|
||||
|
||||
#### .language(languages)
|
||||
|
||||
Return the first accepted language. If nothing in `languages` is accepted,
|
||||
then `false` is returned.
|
||||
|
||||
#### .languages()
|
||||
|
||||
Return the languages that the request accepts, in the order of the client's
|
||||
preference (most preferred first).
|
||||
|
||||
#### .type(types)
|
||||
|
||||
Return the first accepted type (and it is returned as the same text as what
|
||||
appears in the `types` array). If nothing in `types` is accepted, then `false`
|
||||
is returned.
|
||||
|
||||
The `types` array can contain full MIME types or file extensions. Any value
|
||||
that is not a full MIME types is passed to `require('mime-types').lookup`.
|
||||
|
||||
#### .types()
|
||||
|
||||
Return the types that the request accepts, in the order of the client's
|
||||
preference (most preferred first).
|
||||
|
||||
## Examples
|
||||
|
||||
### Simple type negotiation
|
||||
|
||||
This simple example shows how to use `accepts` to return a different typed
|
||||
respond body based on what the client wants to accept. The server lists it's
|
||||
preferences in order and will get back the best match between the client and
|
||||
server.
|
||||
|
||||
```js
|
||||
var accepts = require('accepts')
|
||||
var http = require('http')
|
||||
|
||||
function app(req, res) {
|
||||
var accept = accepts(req)
|
||||
|
||||
// the order of this list is significant; should be server preferred order
|
||||
switch(accept.type(['json', 'html'])) {
|
||||
case 'json':
|
||||
res.setHeader('Content-Type', 'application/json')
|
||||
res.write('{"hello":"world!"}')
|
||||
break
|
||||
case 'html':
|
||||
res.setHeader('Content-Type', 'text/html')
|
||||
res.write('<b>hello, world!</b>')
|
||||
break
|
||||
default:
|
||||
// the fallback is text/plain, so no need to specify it above
|
||||
res.setHeader('Content-Type', 'text/plain')
|
||||
res.write('hello, world!')
|
||||
break
|
||||
}
|
||||
|
||||
res.end()
|
||||
}
|
||||
|
||||
http.createServer(app).listen(3000)
|
||||
```
|
||||
|
||||
You can test this out with the cURL program:
|
||||
```sh
|
||||
curl -I -H'Accept: text/html' http://localhost:3000/
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE)
|
||||
|
||||
[npm-image]: https://img.shields.io/npm/v/accepts.svg
|
||||
[npm-url]: https://npmjs.org/package/accepts
|
||||
[node-version-image]: https://img.shields.io/node/v/accepts.svg
|
||||
[node-version-url]: http://nodejs.org/download/
|
||||
[travis-image]: https://img.shields.io/travis/jshttp/accepts/master.svg
|
||||
[travis-url]: https://travis-ci.org/jshttp/accepts
|
||||
[coveralls-image]: https://img.shields.io/coveralls/jshttp/accepts/master.svg
|
||||
[coveralls-url]: https://coveralls.io/r/jshttp/accepts
|
||||
[downloads-image]: https://img.shields.io/npm/dm/accepts.svg
|
||||
[downloads-url]: https://npmjs.org/package/accepts
|
||||
Generated
Vendored
-231
@@ -1,231 +0,0 @@
|
||||
/*!
|
||||
* accepts
|
||||
* Copyright(c) 2014 Jonathan Ong
|
||||
* Copyright(c) 2015 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/**
|
||||
* Module dependencies.
|
||||
* @private
|
||||
*/
|
||||
|
||||
var Negotiator = require('negotiator')
|
||||
var mime = require('mime-types')
|
||||
|
||||
/**
|
||||
* Module exports.
|
||||
* @public
|
||||
*/
|
||||
|
||||
module.exports = Accepts
|
||||
|
||||
/**
|
||||
* Create a new Accepts object for the given req.
|
||||
*
|
||||
* @param {object} req
|
||||
* @public
|
||||
*/
|
||||
|
||||
function Accepts(req) {
|
||||
if (!(this instanceof Accepts))
|
||||
return new Accepts(req)
|
||||
|
||||
this.headers = req.headers
|
||||
this.negotiator = new Negotiator(req)
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the given `type(s)` is acceptable, returning
|
||||
* the best match when true, otherwise `undefined`, in which
|
||||
* case you should respond with 406 "Not Acceptable".
|
||||
*
|
||||
* The `type` value may be a single mime type string
|
||||
* such as "application/json", the extension name
|
||||
* such as "json" or an array `["json", "html", "text/plain"]`. When a list
|
||||
* or array is given the _best_ match, if any is returned.
|
||||
*
|
||||
* Examples:
|
||||
*
|
||||
* // Accept: text/html
|
||||
* this.types('html');
|
||||
* // => "html"
|
||||
*
|
||||
* // Accept: text/*, application/json
|
||||
* this.types('html');
|
||||
* // => "html"
|
||||
* this.types('text/html');
|
||||
* // => "text/html"
|
||||
* this.types('json', 'text');
|
||||
* // => "json"
|
||||
* this.types('application/json');
|
||||
* // => "application/json"
|
||||
*
|
||||
* // Accept: text/*, application/json
|
||||
* this.types('image/png');
|
||||
* this.types('png');
|
||||
* // => undefined
|
||||
*
|
||||
* // Accept: text/*;q=.5, application/json
|
||||
* this.types(['html', 'json']);
|
||||
* this.types('html', 'json');
|
||||
* // => "json"
|
||||
*
|
||||
* @param {String|Array} types...
|
||||
* @return {String|Array|Boolean}
|
||||
* @public
|
||||
*/
|
||||
|
||||
Accepts.prototype.type =
|
||||
Accepts.prototype.types = function (types_) {
|
||||
var types = types_
|
||||
|
||||
// support flattened arguments
|
||||
if (types && !Array.isArray(types)) {
|
||||
types = new Array(arguments.length)
|
||||
for (var i = 0; i < types.length; i++) {
|
||||
types[i] = arguments[i]
|
||||
}
|
||||
}
|
||||
|
||||
// no types, return all requested types
|
||||
if (!types || types.length === 0) {
|
||||
return this.negotiator.mediaTypes()
|
||||
}
|
||||
|
||||
if (!this.headers.accept) return types[0];
|
||||
var mimes = types.map(extToMime);
|
||||
var accepts = this.negotiator.mediaTypes(mimes.filter(validMime));
|
||||
var first = accepts[0];
|
||||
if (!first) return false;
|
||||
return types[mimes.indexOf(first)];
|
||||
}
|
||||
|
||||
/**
|
||||
* Return accepted encodings or best fit based on `encodings`.
|
||||
*
|
||||
* Given `Accept-Encoding: gzip, deflate`
|
||||
* an array sorted by quality is returned:
|
||||
*
|
||||
* ['gzip', 'deflate']
|
||||
*
|
||||
* @param {String|Array} encodings...
|
||||
* @return {String|Array}
|
||||
* @public
|
||||
*/
|
||||
|
||||
Accepts.prototype.encoding =
|
||||
Accepts.prototype.encodings = function (encodings_) {
|
||||
var encodings = encodings_
|
||||
|
||||
// support flattened arguments
|
||||
if (encodings && !Array.isArray(encodings)) {
|
||||
encodings = new Array(arguments.length)
|
||||
for (var i = 0; i < encodings.length; i++) {
|
||||
encodings[i] = arguments[i]
|
||||
}
|
||||
}
|
||||
|
||||
// no encodings, return all requested encodings
|
||||
if (!encodings || encodings.length === 0) {
|
||||
return this.negotiator.encodings()
|
||||
}
|
||||
|
||||
return this.negotiator.encodings(encodings)[0] || false
|
||||
}
|
||||
|
||||
/**
|
||||
* Return accepted charsets or best fit based on `charsets`.
|
||||
*
|
||||
* Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5`
|
||||
* an array sorted by quality is returned:
|
||||
*
|
||||
* ['utf-8', 'utf-7', 'iso-8859-1']
|
||||
*
|
||||
* @param {String|Array} charsets...
|
||||
* @return {String|Array}
|
||||
* @public
|
||||
*/
|
||||
|
||||
Accepts.prototype.charset =
|
||||
Accepts.prototype.charsets = function (charsets_) {
|
||||
var charsets = charsets_
|
||||
|
||||
// support flattened arguments
|
||||
if (charsets && !Array.isArray(charsets)) {
|
||||
charsets = new Array(arguments.length)
|
||||
for (var i = 0; i < charsets.length; i++) {
|
||||
charsets[i] = arguments[i]
|
||||
}
|
||||
}
|
||||
|
||||
// no charsets, return all requested charsets
|
||||
if (!charsets || charsets.length === 0) {
|
||||
return this.negotiator.charsets()
|
||||
}
|
||||
|
||||
return this.negotiator.charsets(charsets)[0] || false
|
||||
}
|
||||
|
||||
/**
|
||||
* Return accepted languages or best fit based on `langs`.
|
||||
*
|
||||
* Given `Accept-Language: en;q=0.8, es, pt`
|
||||
* an array sorted by quality is returned:
|
||||
*
|
||||
* ['es', 'pt', 'en']
|
||||
*
|
||||
* @param {String|Array} langs...
|
||||
* @return {Array|String}
|
||||
* @public
|
||||
*/
|
||||
|
||||
Accepts.prototype.lang =
|
||||
Accepts.prototype.langs =
|
||||
Accepts.prototype.language =
|
||||
Accepts.prototype.languages = function (languages_) {
|
||||
var languages = languages_
|
||||
|
||||
// support flattened arguments
|
||||
if (languages && !Array.isArray(languages)) {
|
||||
languages = new Array(arguments.length)
|
||||
for (var i = 0; i < languages.length; i++) {
|
||||
languages[i] = arguments[i]
|
||||
}
|
||||
}
|
||||
|
||||
// no languages, return all requested languages
|
||||
if (!languages || languages.length === 0) {
|
||||
return this.negotiator.languages()
|
||||
}
|
||||
|
||||
return this.negotiator.languages(languages)[0] || false
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert extnames to mime.
|
||||
*
|
||||
* @param {String} type
|
||||
* @return {String}
|
||||
* @private
|
||||
*/
|
||||
|
||||
function extToMime(type) {
|
||||
return type.indexOf('/') === -1
|
||||
? mime.lookup(type)
|
||||
: type
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if mime is valid.
|
||||
*
|
||||
* @param {String} type
|
||||
* @return {String}
|
||||
* @private
|
||||
*/
|
||||
|
||||
function validMime(type) {
|
||||
return typeof type === 'string';
|
||||
}
|
||||
Generated
Vendored
-122
@@ -1,122 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"accepts@~1.2.13",
|
||||
"/home/jean/Experiences/angular2-product-app/node_modules/serve-index"
|
||||
]
|
||||
],
|
||||
"_from": "accepts@>=1.2.13 <1.3.0",
|
||||
"_id": "accepts@1.2.13",
|
||||
"_inCache": true,
|
||||
"_location": "/accepts",
|
||||
"_npmUser": {
|
||||
"email": "doug@somethingdoug.com",
|
||||
"name": "dougwilson"
|
||||
},
|
||||
"_npmVersion": "1.4.28",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "accepts",
|
||||
"raw": "accepts@~1.2.13",
|
||||
"rawSpec": "~1.2.13",
|
||||
"scope": null,
|
||||
"spec": ">=1.2.13 <1.3.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/serve-index"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.2.13.tgz",
|
||||
"_shasum": "e5f1f3928c6d95fd96558c36ec3d9d0de4a6ecea",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "accepts@~1.2.13",
|
||||
"_where": "/home/jean/Experiences/angular2-product-app/node_modules/serve-index",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jshttp/accepts/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Douglas Christopher Wilson",
|
||||
"email": "doug@somethingdoug.com"
|
||||
},
|
||||
{
|
||||
"name": "Jonathan Ong",
|
||||
"email": "me@jongleberry.com",
|
||||
"url": "http://jongleberry.com"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"mime-types": "~2.1.6",
|
||||
"negotiator": "0.5.3"
|
||||
},
|
||||
"description": "Higher-level content negotiation",
|
||||
"devDependencies": {
|
||||
"istanbul": "0.3.19",
|
||||
"mocha": "~1.21.5"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "e5f1f3928c6d95fd96558c36ec3d9d0de4a6ecea",
|
||||
"tarball": "http://registry.npmjs.org/accepts/-/accepts-1.2.13.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
},
|
||||
"files": [
|
||||
"HISTORY.md",
|
||||
"LICENSE",
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "b7e15ecb25dacc0b2133ed0553d64f8a79537e01",
|
||||
"homepage": "https://github.com/jshttp/accepts",
|
||||
"installable": true,
|
||||
"keywords": [
|
||||
"accept",
|
||||
"accepts",
|
||||
"content",
|
||||
"negotiation"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "jongleberry",
|
||||
"email": "jonathanrichardong@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "federomero",
|
||||
"email": "federomero@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "dougwilson",
|
||||
"email": "doug@somethingdoug.com"
|
||||
},
|
||||
{
|
||||
"name": "fishrock123",
|
||||
"email": "fishrock123@rocketmail.com"
|
||||
},
|
||||
{
|
||||
"name": "tjholowaychuk",
|
||||
"email": "tj@vision-media.ca"
|
||||
},
|
||||
{
|
||||
"name": "mscdex",
|
||||
"email": "mscdex@mscdex.net"
|
||||
},
|
||||
{
|
||||
"name": "defunctzombie",
|
||||
"email": "shtylman@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "accepts",
|
||||
"optionalDependencies": {},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jshttp/accepts"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha --reporter spec --check-leaks --bail test/",
|
||||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
|
||||
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
|
||||
},
|
||||
"version": "1.2.13"
|
||||
}
|
||||
Generated
Vendored
-2
@@ -1,2 +0,0 @@
|
||||
node_modules
|
||||
.monitor
|
||||
Generated
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- 0.6
|
||||
- 0.8
|
||||
- 0.9
|
||||
Generated
Vendored
-19
@@ -1,19 +0,0 @@
|
||||
Copyright (c) 2011 Raynos.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
Generated
Vendored
-75
@@ -1,75 +0,0 @@
|
||||
# After [![Build Status][1]][2]
|
||||
|
||||
Invoke callback after n calls
|
||||
|
||||
## Status: production ready
|
||||
|
||||
## Example
|
||||
|
||||
var after = require("after")
|
||||
, next = after(3, logItWorks)
|
||||
|
||||
next()
|
||||
next()
|
||||
next() // it works
|
||||
|
||||
function logItWorks() {
|
||||
console.log("it works!")
|
||||
}
|
||||
|
||||
## Example with error handling
|
||||
|
||||
var after = require("after")
|
||||
, next = after(3, logError)
|
||||
|
||||
next()
|
||||
next(new Error("oops")) // logs oops
|
||||
next() // does nothing
|
||||
|
||||
function logError(err) {
|
||||
console.log(err)
|
||||
}
|
||||
|
||||
## After < 0.6.0
|
||||
|
||||
Older versions of after had iterators and flows in them.
|
||||
|
||||
These have been replaced with seperate modules
|
||||
|
||||
- [iterators][8]
|
||||
- [composite][9]
|
||||
|
||||
## Installation
|
||||
|
||||
`npm install after`
|
||||
|
||||
## Tests
|
||||
|
||||
`npm test`
|
||||
|
||||
## Blog post
|
||||
|
||||
- [Flow control in node.js][3]
|
||||
|
||||
## Examples :
|
||||
|
||||
- [Determining the end of asynchronous operations][4]
|
||||
- [In javascript what are best practices for executing multiple asynchronous functions][5]
|
||||
- [JavaScript performance long running tasks][6]
|
||||
- [Synchronous database queries with node.js][7]
|
||||
|
||||
## Contributors
|
||||
|
||||
- Raynos
|
||||
|
||||
## MIT Licenced
|
||||
|
||||
[1]: https://secure.travis-ci.org/Raynos/after.png
|
||||
[2]: http://travis-ci.org/Raynos/after
|
||||
[3]: http://raynos.org/blog/2/Flow-control-in-node.js
|
||||
[4]: http://stackoverflow.com/questions/6852059/determining-the-end-of-asynchronous-operations-javascript/6852307#6852307
|
||||
[5]: http://stackoverflow.com/questions/6869872/in-javascript-what-are-best-practices-for-executing-multiple-asynchronous-functi/6870031#6870031
|
||||
[6]: http://stackoverflow.com/questions/6864397/javascript-performance-long-running-tasks/6889419#6889419
|
||||
[7]: http://stackoverflow.com/questions/6597493/synchronous-database-queries-with-node-js/6620091#6620091
|
||||
[8]: http://github.com/Raynos/iterators
|
||||
[9]: http://github.com/Raynos/composite
|
||||
Generated
Vendored
-28
@@ -1,28 +0,0 @@
|
||||
module.exports = after
|
||||
|
||||
function after(count, callback, err_cb) {
|
||||
var bail = false
|
||||
err_cb = err_cb || noop
|
||||
proxy.count = count
|
||||
|
||||
return (count === 0) ? callback() : proxy
|
||||
|
||||
function proxy(err, result) {
|
||||
if (proxy.count <= 0) {
|
||||
throw new Error('after called too many times')
|
||||
}
|
||||
--proxy.count
|
||||
|
||||
// after first error, rest are passed to err_cb
|
||||
if (err) {
|
||||
bail = true
|
||||
callback(err)
|
||||
// future error callbacks will go to error handler
|
||||
callback = err_cb
|
||||
} else if (proxy.count === 0 && !bail) {
|
||||
callback(null, result)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function noop() {}
|
||||
Generated
Vendored
-86
@@ -1,86 +0,0 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"after@0.8.1",
|
||||
"/home/jean/Experiences/angular2-product-app/node_modules/engine.io-parser"
|
||||
]
|
||||
],
|
||||
"_from": "after@0.8.1",
|
||||
"_id": "after@0.8.1",
|
||||
"_inCache": true,
|
||||
"_location": "/after",
|
||||
"_npmUser": {
|
||||
"email": "raynos2@gmail.com",
|
||||
"name": "raynos"
|
||||
},
|
||||
"_npmVersion": "1.2.25",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "after",
|
||||
"raw": "after@0.8.1",
|
||||
"rawSpec": "0.8.1",
|
||||
"scope": null,
|
||||
"spec": "0.8.1",
|
||||
"type": "version"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/engine.io-parser"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/after/-/after-0.8.1.tgz",
|
||||
"_shasum": "ab5d4fb883f596816d3515f8f791c0af486dd627",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "after@0.8.1",
|
||||
"_where": "/home/jean/Experiences/angular2-product-app/node_modules/engine.io-parser",
|
||||
"author": {
|
||||
"email": "raynos2@gmail.com",
|
||||
"name": "Raynos"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/Raynos/after/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Raynos",
|
||||
"email": "raynos2@gmail.com",
|
||||
"url": "http://raynos.org"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"description": "after - tiny flow control",
|
||||
"devDependencies": {
|
||||
"mocha": "~1.8.1"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "ab5d4fb883f596816d3515f8f791c0af486dd627",
|
||||
"tarball": "http://registry.npmjs.org/after/-/after-0.8.1.tgz"
|
||||
},
|
||||
"installable": true,
|
||||
"keywords": [
|
||||
"after",
|
||||
"arch",
|
||||
"control",
|
||||
"flow",
|
||||
"flowcontrol"
|
||||
],
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "raynos",
|
||||
"email": "raynos2@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "shtylman",
|
||||
"email": "shtylman@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "after",
|
||||
"optionalDependencies": {},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/Raynos/after.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha --ui tdd --reporter spec test/*.js"
|
||||
},
|
||||
"version": "0.8.1"
|
||||
}
|
||||
Generated
Vendored
-120
@@ -1,120 +0,0 @@
|
||||
/*global suite, test*/
|
||||
|
||||
var assert = require("assert")
|
||||
, after = require("../")
|
||||
|
||||
test("exists", function () {
|
||||
assert(typeof after === "function", "after is not a function")
|
||||
})
|
||||
|
||||
test("after when called with 0 invokes", function (done) {
|
||||
after(0, done)
|
||||
});
|
||||
|
||||
test("after 1", function (done) {
|
||||
var next = after(1, done)
|
||||
next()
|
||||
})
|
||||
|
||||
test("after 5", function (done) {
|
||||
var next = after(5, done)
|
||||
, i = 5
|
||||
|
||||
while (i--) {
|
||||
next()
|
||||
}
|
||||
})
|
||||
|
||||
test("manipulate count", function (done) {
|
||||
var next = after(1, done)
|
||||
, i = 5
|
||||
|
||||
next.count = i
|
||||
while (i--) {
|
||||
next()
|
||||
}
|
||||
})
|
||||
|
||||
test("after terminates on error", function (done) {
|
||||
var next = after(2, function(err) {
|
||||
assert.equal(err.message, 'test');
|
||||
done();
|
||||
})
|
||||
next(new Error('test'))
|
||||
next(new Error('test2'))
|
||||
})
|
||||
|
||||
test('gee', function(done) {
|
||||
done = after(2, done)
|
||||
|
||||
function cb(err) {
|
||||
assert.equal(err.message, 1);
|
||||
done()
|
||||
}
|
||||
|
||||
var next = after(3, cb, function(err) {
|
||||
assert.equal(err.message, 2)
|
||||
done()
|
||||
});
|
||||
|
||||
next()
|
||||
next(new Error(1))
|
||||
next(new Error(2))
|
||||
})
|
||||
|
||||
test('eee', function(done) {
|
||||
done = after(3, done)
|
||||
|
||||
function cb(err) {
|
||||
assert.equal(err.message, 1);
|
||||
done()
|
||||
}
|
||||
|
||||
var next = after(3, cb, function(err) {
|
||||
assert.equal(err.message, 2)
|
||||
done()
|
||||
});
|
||||
|
||||
next(new Error(1))
|
||||
next(new Error(2))
|
||||
next(new Error(2))
|
||||
})
|
||||
|
||||
test('gge', function(done) {
|
||||
function cb(err) {
|
||||
assert.equal(err.message, 1);
|
||||
done()
|
||||
}
|
||||
|
||||
var next = after(3, cb, function(err) {
|
||||
// should not happen
|
||||
assert.ok(false);
|
||||
});
|
||||
|
||||
next()
|
||||
next()
|
||||
next(new Error(1))
|
||||
})
|
||||
|
||||
test('egg', function(done) {
|
||||
function cb(err) {
|
||||
assert.equal(err.message, 1);
|
||||
done()
|
||||
}
|
||||
|
||||
var next = after(3, cb, function(err) {
|
||||
// should not happen
|
||||
assert.ok(false);
|
||||
});
|
||||
|
||||
next(new Error(1))
|
||||
next()
|
||||
next()
|
||||
})
|
||||
|
||||
test('throws on too many calls', function(done) {
|
||||
var next = after(1, done);
|
||||
next()
|
||||
assert.throws(next, /after called too many times/);
|
||||
});
|
||||
|
||||
Generated
Vendored
-21
@@ -1,21 +0,0 @@
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2014-2016 Google, Inc. http://angular.io
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
Generated
Vendored
-15
@@ -1,15 +0,0 @@
|
||||
Angular2
|
||||
=========
|
||||
|
||||
The sources for this package are in the main [Angular2](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo. This is the repository for the upcoming 2.0 version. If you're looking for the current official version of Angular you should go to [angular/angular.js](https://github.com/angular/angular.js)
|
||||
|
||||
This package contains different sources for different users:
|
||||
|
||||
1. The files located in the root folder can be consumed using CommonJS.
|
||||
2. The files under `/es6` are es6 compatible files that can be transpiled to
|
||||
es5 using any transpiler. This contains:
|
||||
* `dev/`: a development version that includes runtime type assertions
|
||||
* `prod/`: a production version that does not include runtime type assertions
|
||||
3. The files under `/ts` are the TypeScript source files.
|
||||
|
||||
License: Apache MIT 2.0
|
||||
Generated
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
export { Animation } from './src/animate/animation';
|
||||
export { AnimationBuilder } from './src/animate/animation_builder';
|
||||
export { BrowserDetails } from './src/animate/browser_details';
|
||||
export { CssAnimationBuilder } from './src/animate/css_animation_builder';
|
||||
export { CssAnimationOptions } from './src/animate/css_animation_options';
|
||||
Generated
Vendored
-11
@@ -1,11 +0,0 @@
|
||||
'use strict';var animation_1 = require('./src/animate/animation');
|
||||
exports.Animation = animation_1.Animation;
|
||||
var animation_builder_1 = require('./src/animate/animation_builder');
|
||||
exports.AnimationBuilder = animation_builder_1.AnimationBuilder;
|
||||
var browser_details_1 = require('./src/animate/browser_details');
|
||||
exports.BrowserDetails = browser_details_1.BrowserDetails;
|
||||
var css_animation_builder_1 = require('./src/animate/css_animation_builder');
|
||||
exports.CssAnimationBuilder = css_animation_builder_1.CssAnimationBuilder;
|
||||
var css_animation_options_1 = require('./src/animate/css_animation_options');
|
||||
exports.CssAnimationOptions = css_animation_options_1.CssAnimationOptions;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5pbWF0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImFuZ3VsYXIyL2FuaW1hdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsMEJBQXdCLHlCQUF5QixDQUFDO0FBQTFDLDBDQUEwQztBQUNsRCxrQ0FBK0IsaUNBQWlDLENBQUM7QUFBekQsZ0VBQXlEO0FBQ2pFLGdDQUE2QiwrQkFBK0IsQ0FBQztBQUFyRCwwREFBcUQ7QUFDN0Qsc0NBQWtDLHFDQUFxQyxDQUFDO0FBQWhFLDBFQUFnRTtBQUN4RSxzQ0FBa0MscUNBQXFDLENBQUM7QUFBaEUsMEVBQWdFIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHtBbmltYXRpb259IGZyb20gJy4vc3JjL2FuaW1hdGUvYW5pbWF0aW9uJztcbmV4cG9ydCB7QW5pbWF0aW9uQnVpbGRlcn0gZnJvbSAnLi9zcmMvYW5pbWF0ZS9hbmltYXRpb25fYnVpbGRlcic7XG5leHBvcnQge0Jyb3dzZXJEZXRhaWxzfSBmcm9tICcuL3NyYy9hbmltYXRlL2Jyb3dzZXJfZGV0YWlscyc7XG5leHBvcnQge0Nzc0FuaW1hdGlvbkJ1aWxkZXJ9IGZyb20gJy4vc3JjL2FuaW1hdGUvY3NzX2FuaW1hdGlvbl9idWlsZGVyJztcbmV4cG9ydCB7Q3NzQW5pbWF0aW9uT3B0aW9uc30gZnJvbSAnLi9zcmMvYW5pbWF0ZS9jc3NfYW5pbWF0aW9uX29wdGlvbnMnO1xuIl19
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
export * from 'angular2/src/mock/animation_builder_mock';
|
||||
examples/demo-template/angular2-product-app/src/main/webapp/node_modules/angular2/animate/testing.js
Generated
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
'use strict';function __export(m) {
|
||||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||
}
|
||||
__export(require('angular2/src/mock/animation_builder_mock'));
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdGluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImFuZ3VsYXIyL2FuaW1hdGUvdGVzdGluZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxpQkFBYywwQ0FBMEMsQ0FBQyxFQUFBIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnYW5ndWxhcjIvc3JjL21vY2svYW5pbWF0aW9uX2J1aWxkZXJfbW9jayc7XG4iXX0=
|
||||
Generated
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
/**
|
||||
* See {@link bootstrap} for more information.
|
||||
* @deprecated
|
||||
*/
|
||||
export { bootstrap } from 'angular2/platform/browser';
|
||||
export { AngularEntrypoint } from 'angular2/src/core/angular_entrypoint';
|
||||
Generated
Vendored
-9
@@ -1,9 +0,0 @@
|
||||
'use strict';/**
|
||||
* See {@link bootstrap} for more information.
|
||||
* @deprecated
|
||||
*/
|
||||
var browser_1 = require('angular2/platform/browser');
|
||||
exports.bootstrap = browser_1.bootstrap;
|
||||
var angular_entrypoint_1 = require('angular2/src/core/angular_entrypoint');
|
||||
exports.AngularEntrypoint = angular_entrypoint_1.AngularEntrypoint;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm9vdHN0cmFwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYW5ndWxhcjIvYm9vdHN0cmFwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7R0FHRztBQUNILHdCQUF3QiwyQkFBMkIsQ0FBQztBQUE1Qyx3Q0FBNEM7QUFDcEQsbUNBQWdDLHNDQUFzQyxDQUFDO0FBQS9ELG1FQUErRCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogU2VlIHtAbGluayBib290c3RyYXB9IGZvciBtb3JlIGluZm9ybWF0aW9uLlxuICogQGRlcHJlY2F0ZWRcbiAqL1xuZXhwb3J0IHtib290c3RyYXB9IGZyb20gJ2FuZ3VsYXIyL3BsYXRmb3JtL2Jyb3dzZXInO1xuZXhwb3J0IHtBbmd1bGFyRW50cnlwb2ludH0gZnJvbSAnYW5ndWxhcjIvc3JjL2NvcmUvYW5ndWxhcl9lbnRyeXBvaW50JztcbiJdfQ==
|
||||
Generated
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
/**
|
||||
* See {@link bootstrap} for more information.
|
||||
* @deprecated
|
||||
*/
|
||||
export { bootstrapStatic } from 'angular2/platform/browser_static';
|
||||
export { AngularEntrypoint } from 'angular2/src/core/angular_entrypoint';
|
||||
Generated
Vendored
-9
@@ -1,9 +0,0 @@
|
||||
'use strict';/**
|
||||
* See {@link bootstrap} for more information.
|
||||
* @deprecated
|
||||
*/
|
||||
var browser_static_1 = require('angular2/platform/browser_static');
|
||||
exports.bootstrapStatic = browser_static_1.bootstrapStatic;
|
||||
var angular_entrypoint_1 = require('angular2/src/core/angular_entrypoint');
|
||||
exports.AngularEntrypoint = angular_entrypoint_1.AngularEntrypoint;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm9vdHN0cmFwX3N0YXRpYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImFuZ3VsYXIyL2Jvb3RzdHJhcF9zdGF0aWMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7OztHQUdHO0FBQ0gsK0JBQThCLGtDQUFrQyxDQUFDO0FBQXpELDJEQUF5RDtBQUNqRSxtQ0FBZ0Msc0NBQXNDLENBQUM7QUFBL0QsbUVBQStEIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBTZWUge0BsaW5rIGJvb3RzdHJhcH0gZm9yIG1vcmUgaW5mb3JtYXRpb24uXG4gKiBAZGVwcmVjYXRlZFxuICovXG5leHBvcnQge2Jvb3RzdHJhcFN0YXRpY30gZnJvbSAnYW5ndWxhcjIvcGxhdGZvcm0vYnJvd3Nlcl9zdGF0aWMnO1xuZXhwb3J0IHtBbmd1bGFyRW50cnlwb2ludH0gZnJvbSAnYW5ndWxhcjIvc3JjL2NvcmUvYW5ndWxhcl9lbnRyeXBvaW50JztcbiJdfQ==
|
||||
Generated
Vendored
-38346
File diff suppressed because it is too large.
Load diff
Generated
Vendored
-36173
File diff suppressed because it is too large.
Load diff
Generated
Vendored
-36172
File diff suppressed because it is too large.
Load diff
Generated
Vendored
-18
@@ -1,18 +0,0 @@
|
||||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("Rx"),require("rxjs/observable/fromPromise"),require("rxjs/operator/toPromise")):"function"==typeof define&&define.amd?define(["Rx","rxjs/observable/fromPromise","rxjs/operator/toPromise"],t):"object"==typeof exports?exports.ng=t(require("Rx"),require("rxjs/observable/fromPromise"),require("rxjs/operator/toPromise")):e.ng=t(e.Rx,e.Rx.Observable,e.Rx.Observable.prototype)}(this,function(e,t,n){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){t.core=n(2),t.common=n(97),t.compiler=n(140),t.platform={browser:n(173),common_dom:n(196)},t.http=n(204),t.router=n(219),t.router_link_dsl=n(246),t.instrumentation=n(248),t.upgrade=n(249)},function(e,t,n){function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}r(n(3)),r(n(62)),r(n(63)),r(n(6)),r(n(64));var i=n(5);t.enableProdMode=i.enableProdMode;var o=n(65);t.platform=o.platform,t.createNgZone=o.createNgZone,t.PlatformRef=o.PlatformRef,t.ApplicationRef=o.ApplicationRef;var s=n(67);t.APP_ID=s.APP_ID,t.APP_COMPONENT=s.APP_COMPONENT,t.APP_INITIALIZER=s.APP_INITIALIZER,t.PACKAGE_ROOT_URL=s.PACKAGE_ROOT_URL,t.PLATFORM_INITIALIZER=s.PLATFORM_INITIALIZER,r(n(86)),r(n(87)),r(n(88));var a=n(91);t.DebugElement=a.DebugElement,t.DebugNode=a.DebugNode,t.asNativeElements=a.asNativeElements,r(n(68)),r(n(24)),r(n(92)),r(n(93)),r(n(94)),r(n(16))},function(e,t,n){var r=n(4);t.QueryMetadata=r.QueryMetadata,t.ContentChildrenMetadata=r.ContentChildrenMetadata,t.ContentChildMetadata=r.ContentChildMetadata,t.ViewChildrenMetadata=r.ViewChildrenMetadata,t.ViewQueryMetadata=r.ViewQueryMetadata,t.ViewChildMetadata=r.ViewChildMetadata,t.AttributeMetadata=r.AttributeMetadata;var i=n(23);t.ComponentMetadata=i.ComponentMetadata,t.DirectiveMetadata=i.DirectiveMetadata,t.PipeMetadata=i.PipeMetadata,t.InputMetadata=i.InputMetadata,t.OutputMetadata=i.OutputMetadata,t.HostBindingMetadata=i.HostBindingMetadata,t.HostListenerMetadata=i.HostListenerMetadata;var o=n(61);t.ViewMetadata=o.ViewMetadata,t.ViewEncapsulation=o.ViewEncapsulation;var s=n(4),a=n(23),c=n(61),u=n(9);t.Component=u.makeDecorator(a.ComponentMetadata,function(e){return e.View=t.View}),t.Directive=u.makeDecorator(a.DirectiveMetadata),t.View=u.makeDecorator(c.ViewMetadata,function(e){return e.View=t.View}),t.Attribute=u.makeParamDecorator(s.AttributeMetadata),t.Query=u.makeParamDecorator(s.QueryMetadata),t.ContentChildren=u.makePropDecorator(s.ContentChildrenMetadata),t.ContentChild=u.makePropDecorator(s.ContentChildMetadata),t.ViewChildren=u.makePropDecorator(s.ViewChildrenMetadata),t.ViewChild=u.makePropDecorator(s.ViewChildMetadata),t.ViewQuery=u.makeParamDecorator(s.ViewQueryMetadata),t.Pipe=u.makeDecorator(a.PipeMetadata),t.Input=u.makePropDecorator(a.InputMetadata),t.Output=u.makePropDecorator(a.OutputMetadata),t.HostBinding=u.makePropDecorator(a.HostBindingMetadata),t.HostListener=u.makePropDecorator(a.HostListenerMetadata)},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(5),a=n(6),c=n(7),u=function(e){function t(t){e.call(this),this.attributeName=t}return r(t,e),Object.defineProperty(t.prototype,"token",{get:function(){return this},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"@Attribute("+s.stringify(this.attributeName)+")"},t=i([s.CONST(),o("design:paramtypes",[String])],t)}(c.DependencyMetadata);t.AttributeMetadata=u;var p=function(e){function t(t,n){var r=void 0===n?{}:n,i=r.descendants,o=void 0===i?!1:i,s=r.first,a=void 0===s?!1:s;e.call(this),this._selector=t,this.descendants=o,this.first=a}return r(t,e),Object.defineProperty(t.prototype,"isViewQuery",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selector",{get:function(){return a.resolveForwardRef(this._selector)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isVarBindingQuery",{get:function(){return s.isString(this.selector)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"varBindings",{get:function(){return this.selector.split(",")},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"@Query("+s.stringify(this.selLine truncated
|
||||
}),n}}(),u=function(){return(new t.Map).keys().next?function(e){for(var t,n=e.keys();!(t=n.next()).done;)e.set(t.value,null)}:function(e){e.forEach(function(t,n){e.set(n,null)})}}(),p=function(){try{if((new t.Map).values().next)return function(e,t){return t?Array.from(e.values()):Array.from(e.keys())}}catch(e){}return function(e,t){var n=f.createFixedSize(e.size),r=0;return e.forEach(function(e,i){n[r]=t?e:i,r++}),n}}(),l=function(){function e(){}return e.clone=function(e){return c(e)},e.createFromStringMap=function(e){var n=new t.Map;for(var r in e)n.set(r,e[r]);return n},e.toStringMap=function(e){var t={};return e.forEach(function(e,n){return t[n]=e}),t},e.createFromPairs=function(e){return a(e)},e.clearValues=function(e){u(e)},e.iterable=function(e){return e},e.keys=function(e){return p(e,!1)},e.values=function(e){return p(e,!0)},e}();t.MapWrapper=l;var h=function(){function e(){}return e.create=function(){return{}},e.contains=function(e,t){return e.hasOwnProperty(t)},e.get=function(e,t){return e.hasOwnProperty(t)?e[t]:void 0},e.set=function(e,t,n){e[t]=n},e.keys=function(e){return Object.keys(e)},e.isEmpty=function(e){for(var t in e)return!1;return!0},e["delete"]=function(e,t){delete e[t]},e.forEach=function(e,t){for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)},e.merge=function(e,t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);return n},e.equals=function(e,t){var n=Object.keys(e),r=Object.keys(t);if(n.length!=r.length)return!1;for(var i,o=0;o<n.length;o++)if(i=n[o],e[i]!==t[i])return!1;return!0},e}();t.StringMapWrapper=h;var f=function(){function e(){}return e.createFixedSize=function(e){return new Array(e)},e.createGrowableSize=function(e){return new Array(e)},e.clone=function(e){return e.slice(0)},e.forEachWithIndex=function(e,t){for(var n=0;n<e.length;n++)t(e[n],n)},e.first=function(e){return e?e[0]:null},e.last=function(e){return e&&0!=e.length?e[e.length-1]:null},e.indexOf=function(e,t,n){return void 0===n&&(n=0),e.indexOf(t,n)},e.contains=function(e,t){return-1!==e.indexOf(t)},e.reversed=function(t){var n=e.clone(t);return n.reverse()},e.concat=function(e,t){return e.concat(t)},e.insert=function(e,t,n){e.splice(t,0,n)},e.removeAt=function(e,t){var n=e[t];return e.splice(t,1),n},e.removeAll=function(e,t){for(var n=0;n<t.length;++n){var r=e.indexOf(t[n]);e.splice(r,1)}},e.remove=function(e,t){var n=e.indexOf(t);return n>-1?(e.splice(n,1),!0):!1},e.clear=function(e){e.length=0},e.isEmpty=function(e){return 0==e.length},e.fill=function(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=null),e.fill(t,n,null===r?e.length:r)},e.equals=function(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;++n)if(e[n]!==t[n])return!1;return!0},e.slice=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=null),e.slice(t,null===n?void 0:n)},e.splice=function(e,t,n){return e.splice(t,n)},e.sort=function(e,t){s.isPresent(t)?e.sort(t):e.sort()},e.toString=function(e){return e.toString()},e.toJSON=function(e){return JSON.stringify(e)},e.maximum=function(e,t){if(0==e.length)return null;for(var n=null,r=-(1/0),i=0;i<e.length;i++){var o=e[i];if(!s.isBlank(o)){var a=t(o);a>r&&(n=o,r=a)}}return n},e}();t.ListWrapper=f,t.isListLikeIterable=r,t.areIterablesEqual=i,t.iterateListLike=o;var d=function(){var e=new t.Set([1,2,3]);return 3===e.size?function(e){return new t.Set(e)}:function(e){var n=new t.Set(e);if(n.size!==e.length)for(var r=0;r<e.length;r++)n.add(e[r]);return n}}(),y=function(){function e(){}return e.createFromList=function(e){return d(e)},e.has=function(e,t){return e.has(t)},e["delete"]=function(e,t){e["delete"](t)},e}();t.SetWrapper=y},function(e,t,n){function r(e){return new x(e)}function i(e,t){var n=t.useClass,r=t.useValue,i=t.useExisting,o=t.useFactory,s=t.deps,a=t.multi;return new S(e,{useClass:n,useValue:r,useExisting:i,useFactory:o,deps:s,multi:a})}function o(e){var t,n;if(g.isPresent(e.useClass)){var r=w.resolveForwardRef(e.useClass);t=P.reflector.factory(r),n=l(r)}else g.isPresent(e.useExisting)?(t=function(e){return e},n=[E.fromKey(C.Key.get(e.useExisting))]):g.isPresent(e.useFactory)?(t=e.useFactory,n=p(e.useFactory,e.dependencies)):(t=function(){return e.useValue},n=O);return new T(t,n)}function s(e){return new A(C.Key.get(e.token),[o(e)],e.multi)}function a(e){var t=u(e,[]),n=t.map(s);return _.MapWrapper.values(c(n,new Map))}function c(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t.get(r.key.id);if(g.isPresent(i)){if(r.multiProvider!==i.multiProvider)throw new R.MixingMultiProvidersWithRegularProvidersError(i,r);if(r.multiProvider)for(var o=0;o<r.resolvedFactories.length;o++)i.resolvedFactories.push(r.resolvedFactories[o]);else t.set(r.key.id,r)}else{var s;s=r.multiProvider?new A(r.key,_.ListWrapper.clone(r.resolvedFactories),r.multiProvider):r,t.set(r.key.id,s)}}return t}function u(e,t){return e.forEach(function(e){if(e instanceof g.Type)t.push(i(e,{useClass:e}));else if(e instanceof S)t.push(e);else{if(!(e instanceof Array))throw e instancLine truncated
|
||||
if(o.isBlank(n))throw new s.BaseException("Cannot extend IterableDiffers without a parent injector");return e.create(t,n)},deps:[[e,new c.SkipSelfMetadata,new c.OptionalMetadata]]})},e.prototype.find=function(e){var t=this.factories.find(function(t){return t.supports(e)});if(o.isPresent(t))return t;throw new s.BaseException("Cannot find a differ supporting object '"+e+"'")},e=r([c.Injectable(),o.CONST(),i("design:paramtypes",[Array])],e)}();t.IterableDiffers=u},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(14),a=n(12),c=n(5),u=function(){function e(){}return e.prototype.supports=function(e){return a.isListLikeIterable(e)},e.prototype.create=function(e,t){return new l(t)},e=r([o.CONST(),i("design:paramtypes",[])],e)}();t.DefaultIterableDifferFactory=u;var p=function(e,t){return t},l=function(){function e(e){this._trackByFn=e,this._length=null,this._collection=null,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._trackByFn=c.isPresent(this._trackByFn)?this._trackByFn:p}return Object.defineProperty(e.prototype,"collection",{get:function(){return this._collection},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._length},enumerable:!0,configurable:!0}),e.prototype.forEachItem=function(e){var t;for(t=this._itHead;null!==t;t=t._next)e(t)},e.prototype.forEachPreviousItem=function(e){var t;for(t=this._previousItHead;null!==t;t=t._nextPrevious)e(t)},e.prototype.forEachAddedItem=function(e){var t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)},e.prototype.forEachMovedItem=function(e){var t;for(t=this._movesHead;null!==t;t=t._nextMoved)e(t)},e.prototype.forEachRemovedItem=function(e){var t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)},e.prototype.diff=function(e){if(c.isBlank(e)&&(e=[]),!a.isListLikeIterable(e))throw new s.BaseException("Error trying to diff '"+e+"'");return this.check(e)?this:null},e.prototype.onDestroy=function(){},e.prototype.check=function(e){var t=this;this._reset();var n,r,i,o=this._itHead,s=!1;if(c.isArray(e)){var u=e;for(this._length=e.length,n=0;n<this._length;n++)r=u[n],i=this._trackByFn(n,r),null!==o&&c.looseIdentical(o.trackById,i)?(s&&(o=this._verifyReinsertion(o,r,i,n)),o.item=r):(o=this._mismatch(o,r,i,n),s=!0),o=o._next}else n=0,a.iterateListLike(e,function(e){i=t._trackByFn(n,e),null!==o&&c.looseIdentical(o.trackById,i)?s&&(o=t._verifyReinsertion(o,e,i,n)):(o=t._mismatch(o,e,i,n),s=!0),o=o._next,n++}),this._length=n;return this._truncate(o),this._collection=e,this.isDirty},Object.defineProperty(e.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead},enumerable:!0,configurable:!0}),e.prototype._reset=function(){if(this.isDirty){var e,t;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=t)e.previousIndex=e.currentIndex,t=e._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null}},e.prototype._mismatch=function(e,t,n,r){var i;return null===e?i=this._itTail:(i=e._prev,this._remove(e)),e=null===this._linkedRecords?null:this._linkedRecords.get(n,r),null!==e?this._moveAfter(e,i,r):(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n),null!==e?this._reinsertAfter(e,i,r):e=this._addAfter(new h(t,n),i,r)),e},e.prototype._verifyReinsertion=function(e,t,n,r){var i=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n);return null!==i?e=this._reinsertAfter(i,e._prev,r):e.currentIndex!=r&&(e.currentIndex=r,this._addToMoves(e,r)),e.item=t,e},e.prototype._truncate=function(e){for(;null!==e;){var t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null)},e.prototype._reinsertAfter=function(e,t,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);var r=e._prevRemoved,i=e._nextRemoved;return null===r?this._removalsHead=i:r._nextRemoved=i,null===i?this._removLine truncated
|
||||
},s=n(8),a=n(5),c=n(14),u=n(12),p=n(31),l=n(16),h=n(30),f=new h.ImplicitReceiver,d=/\{\{(.*?)\}\}/g,y=function(e){function t(t,n,r,i){e.call(this,"Parser Error: "+t+" "+r+" ["+n+"] in "+i)}return r(t,e),t}(c.BaseException),v=function(){function e(e,t){void 0===t&&(t=null),this._lexer=e,this._reflector=a.isPresent(t)?t:l.reflector}return e.prototype.parseAction=function(e,t){this._checkNoInterpolation(e,t);var n=this._lexer.tokenize(e),r=new g(e,t,n,this._reflector,!0).parseChain();return new h.ASTWithSource(r,e,t)},e.prototype.parseBinding=function(e,t){var n=this._parseBindingAst(e,t);return new h.ASTWithSource(n,e,t)},e.prototype.parseSimpleBinding=function(e,t){var n=this._parseBindingAst(e,t);if(!m.check(n))throw new y("Host binding expression can only contain field access and constants",e,t);return new h.ASTWithSource(n,e,t)},e.prototype._parseBindingAst=function(e,t){var n=this._parseQuote(e,t);if(a.isPresent(n))return n;this._checkNoInterpolation(e,t);var r=this._lexer.tokenize(e);return new g(e,t,r,this._reflector,!1).parseChain()},e.prototype._parseQuote=function(e,t){if(a.isBlank(e))return null;var n=e.indexOf(":");if(-1==n)return null;var r=e.substring(0,n).trim();if(!p.isIdentifier(r))return null;var i=e.substring(n+1);return new h.Quote(r,i,t)},e.prototype.parseTemplateBindings=function(e,t){var n=this._lexer.tokenize(e);return new g(e,t,n,this._reflector,!1).parseTemplateBindings()},e.prototype.parseInterpolation=function(e,t){var n=a.StringWrapper.split(e,d);if(n.length<=1)return null;for(var r=[],i=[],o=0;o<n.length;o++){var s=n[o];if(o%2===0)r.push(s);else{if(!(s.trim().length>0))throw new y("Blank expressions are not allowed in interpolated strings",e,"at column "+this._findInterpolationErrorColumn(n,o)+" in",t);var c=this._lexer.tokenize(s),u=new g(e,t,c,this._reflector,!1).parseChain();i.push(u)}}return new h.ASTWithSource(new h.Interpolation(r,i),e,t)},e.prototype.wrapLiteralPrimitive=function(e,t){return new h.ASTWithSource(new h.LiteralPrimitive(e),e,t)},e.prototype._checkNoInterpolation=function(e,t){var n=a.StringWrapper.split(e,d);if(n.length>1)throw new y("Got interpolation ({{}}) where expression was expected",e,"at column "+this._findInterpolationErrorColumn(n,1)+" in",t)},e.prototype._findInterpolationErrorColumn=function(e,t){for(var n="",r=0;t>r;r++)n+=r%2===0?e[r]:"{{"+e[r]+"}}";return n.length},e=i([s.Injectable(),o("design:paramtypes",[p.Lexer,l.Reflector])],e)}();t.Parser=v;var g=function(){function e(e,t,n,r,i){this.input=e,this.location=t,this.tokens=n,this.reflector=r,this.parseAction=i,this.index=0}return e.prototype.peek=function(e){var t=this.index+e;return t<this.tokens.length?this.tokens[t]:p.EOF},Object.defineProperty(e.prototype,"next",{get:function(){return this.peek(0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputIndex",{get:function(){return this.index<this.tokens.length?this.next.index:this.input.length},enumerable:!0,configurable:!0}),e.prototype.advance=function(){this.index++},e.prototype.optionalCharacter=function(e){return this.next.isCharacter(e)?(this.advance(),!0):!1},e.prototype.optionalKeywordVar=function(){return this.peekKeywordVar()?(this.advance(),!0):!1},e.prototype.peekKeywordVar=function(){return this.next.isKeywordVar()||this.next.isOperator("#")},e.prototype.expectCharacter=function(e){this.optionalCharacter(e)||this.error("Missing expected "+a.StringWrapper.fromCharCode(e))},e.prototype.optionalOperator=function(e){return this.next.isOperator(e)?(this.advance(),!0):!1},e.prototype.expectOperator=function(e){this.optionalOperator(e)||this.error("Missing expected operator "+e)},e.prototype.expectIdentifierOrKeyword=function(){var e=this.next;return e.isIdentifier()||e.isKeyword()||this.error("Unexpected token "+e+", expected identifier or keyword"),this.advance(),e.toString()},e.prototype.expectIdentifierOrKeywordOrString=function(){var e=this.next;return e.isIdentifier()||e.isKeyword()||e.isString()||this.error("Unexpected token "+e+", expected identifier, keyword, or string"),this.advance(),e.toString()},e.prototype.parseChain=function(){for(var e=[];this.index<this.tokens.length;){var t=this.parsePipe();if(e.push(t),this.optionalCharacter(p.$SEMICOLON))for(this.parseAction||this.error("Binding expression cannot contain chained expression");this.optionalCharacter(p.$SEMICOLON););else this.index<this.tokens.length&&this.error("Unexpected token '"+this.next+"'")}return 0==e.length?new h.EmptyExpr:1==e.length?e[0]:new h.Chain(e)},e.prototype.parsePipe=function(){var e=this.parseExpression();if(this.optionalOperator("|")){this.parseAction&&this.error("Cannot have a pipe in an action expression");do{for(var t=this.expectIdentifierOrKeyword(),n=[];this.optionalCharacter(p.$COLON);)n.push(this.parseExpression());e=new h.BindingPipe(e,t,n)}while(this.optionalOperator("|"))}return e},e.prototype.parseExpression=function(){return this.parseConditional()},e.prototype.parseConditional=function(){var e=this.inputIndex,t=thLine truncated
|
||||
},e.prototype.isDefaultChangeDetection=function(){return r.isBlank(this.directiveRecord)||this.directiveRecord.isDefaultChangeDetection()},e.createDirectiveDoCheck=function(t){return new e(i,null,0,null,null,"DoCheck",t)},e.createDirectiveOnInit=function(t){return new e(i,null,0,null,null,"OnInit",t)},e.createDirectiveOnChanges=function(t){return new e(i,null,0,null,null,"OnChanges",t)},e.createForDirective=function(t,n,r,i){var o=i.directiveIndex.elementIndex,a=new d(s,o,n,null,t.toString());return new e(s,a,0,t,r,null,i)},e.createForElementProperty=function(t,n,r){var i=new d(a,n,r,null,t.toString());return new e(o,i,0,t,null,null,null)},e.createForElementAttribute=function(t,n,r){var i=new d(c,n,r,null,t.toString());return new e(o,i,0,t,null,null,null)},e.createForElementClass=function(t,n,r){var i=new d(u,n,r,null,t.toString());return new e(o,i,0,t,null,null,null)},e.createForElementStyle=function(t,n,r,i){var s=new d(p,n,r,i,t.toString());return new e(o,s,0,t,null,null,null)},e.createForHostProperty=function(t,n,r){var i=new d(a,t.elementIndex,r,null,n.toString());return new e(o,i,t,n,null,null,null)},e.createForHostAttribute=function(t,n,r){var i=new d(c,t.elementIndex,r,null,n.toString());return new e(o,i,t,n,null,null,null)},e.createForHostClass=function(t,n,r){var i=new d(u,t.elementIndex,r,null,n.toString());return new e(o,i,t,n,null,null,null)},e.createForHostStyle=function(t,n,r,i){var s=new d(p,t.elementIndex,r,i,n.toString());return new e(o,s,t,n,null,null,null)},e.createForTextNode=function(t,n){var r=new d(l,n,null,null,t.toString());return new e(o,r,0,t,null,null,null)},e.createForEvent=function(t,n,r){var i=new d(h,r,n,null,t.toString());return new e(h,i,0,t,null,null,null)},e.createForHostEvent=function(t,n,r){var i=r.directiveIndex,o=new d(f,i.elementIndex,n,null,t.toString());return new e(f,o,i,t,null,null,r)},e}();t.BindingRecord=y},function(e,t,n){var r=n(5),i=n(36),o=function(){function e(e,t){this.elementIndex=e,this.directiveIndex=t}return Object.defineProperty(e.prototype,"name",{get:function(){return this.elementIndex+"_"+this.directiveIndex},enumerable:!0,configurable:!0}),e}();t.DirectiveIndex=o;var s=function(){function e(e){var t=void 0===e?{}:e,n=t.directiveIndex,i=t.callAfterContentInit,o=t.callAfterContentChecked,s=t.callAfterViewInit,a=t.callAfterViewChecked,c=t.callOnChanges,u=t.callDoCheck,p=t.callOnInit,l=t.callOnDestroy,h=t.changeDetection,f=t.outputs;this.directiveIndex=n,this.callAfterContentInit=r.normalizeBool(i),this.callAfterContentChecked=r.normalizeBool(o),this.callOnChanges=r.normalizeBool(c),this.callAfterViewInit=r.normalizeBool(s),this.callAfterViewChecked=r.normalizeBool(a),this.callDoCheck=r.normalizeBool(u),this.callOnInit=r.normalizeBool(p),this.callOnDestroy=r.normalizeBool(l),this.changeDetection=h,this.outputs=f}return e.prototype.isDefaultChangeDetection=function(){return i.isDefaultChangeDetectionStrategy(this.changeDetection)},e}();t.DirectiveRecord=s},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=n(5),o=n(14),s=n(12),a=n(43),c=n(38),u=n(36),p=n(53),l=n(16),h=n(48),f=function(e){function t(t,n,r,i,o,a,c,u,p){e.call(this,t,n,r,i,o),this._records=a,this._eventBindings=c,this._directiveRecords=u,this._genConfig=p;var l=a.length+1;this.values=s.ListWrapper.createFixedSize(l),this.localPipes=s.ListWrapper.createFixedSize(l),this.prevContexts=s.ListWrapper.createFixedSize(l),this.changes=s.ListWrapper.createFixedSize(l),this.dehydrateDirectives(!1)}return r(t,e),t.prototype.handleEventInternal=function(e,t,n){var r=this,i=!1;return this._matchingEventBindings(e,t).forEach(function(e){var t=r._processEventBinding(e,n);t===!1&&(i=!0)}),i},t.prototype._processEventBinding=function(e,t){var n=s.ListWrapper.createFixedSize(e.records.length);n[0]=this.values[0];for(var r=0;r<e.records.length;++r){var i=e.records[r];if(i.isSkipRecord())r+=this._computeSkipLength(r,i,n);else{var a=this._calculateCurrValue(i,n,t);if(i.lastInBinding)return this._markPathAsCheckOnce(i),a;this._writeSelf(i,a,n)}}throw new o.BaseException("Cannot be reached")},t.prototype._computeSkipLength=function(e,t,n){if(t.mode===p.RecordType.SkipRecords)return t.fixedArgs[0]-e-1;if(t.mode===p.RecordType.SkipRecordsIf){var r=this._readContext(t,n);return r?t.fixedArgs[0]-e-1:0}if(t.mode===p.RecordType.SkipRecordsIfNot){var r=this._readContext(t,n);return r?0:t.fixedArgs[0]-e-1}throw new o.BaseException("Cannot be reached")},t.prototype._markPathAsCheckOnce=function(e){if(!e.bindingRecord.isDefaultChangeDetection()){var t=e.bindingRecord.directiveRecord;this._getDetectorFor(t.directiveIndex).markPathToRootAsCheckOnce()}},t.prototype._matchingEventBindings=function(e,t){return this._eventBindings.filter(function(n){return n.eventName==e&&n.elIndex===t})},t.prototype.hydrateDirectives=function(t){var n=this;if(this.values[0]=this.conLine truncated
|
||||
},e.prototype._genPropertyBindingTargets=function(){var e=this._logic.genPropertyBindingTargets(this.propertyBindingTargets,this.genConfig.genDebugInfo);return this.typeName+".gen_propertyBindingTargets = "+e+";"},e.prototype._genDirectiveIndices=function(){var e=this._logic.genDirectiveIndices(this.directiveRecords);return this.typeName+".gen_directiveIndices = "+e+";"},e.prototype._maybeGenHandleEventInternal=function(){var e=this;if(this.eventBindings.length>0){var t=this.eventBindings.map(function(t){return e._genEventBinding(t)}).join("\n");return"\n "+this.typeName+".prototype.handleEventInternal = function(eventName, elIndex, locals) {\n var "+this._names.getPreventDefaultAccesor()+" = false;\n "+this._names.genInitEventLocals()+"\n "+t+"\n return "+this._names.getPreventDefaultAccesor()+";\n }\n "}return""},e.prototype._genEventBinding=function(e){var t=this,n=[];return this._endOfBlockIdxs=[],o.ListWrapper.forEachWithIndex(e.records,function(r,i){var o;o=r.isConditionalSkipRecord()?t._genConditionalSkip(r,t._names.getEventLocalName(e,i)):r.isUnconditionalSkipRecord()?t._genUnconditionalSkip(r):t._genEventBindingEval(e,r),o+=t._genEndOfSkipBlock(i),n.push(o)}),'\n if (eventName === "'+e.eventName+'" && elIndex === '+e.elIndex+") {\n "+n.join("\n")+"\n }"},e.prototype._genEventBindingEval=function(e,t){if(t.lastInBinding){var n=this._logic.genEventBindingEvalValue(e,t),r=this._genMarkPathToRootAsCheckOnce(t),i=this._genUpdatePreventDefault(e,t);return n+"\n"+r+"\n"+i}return this._logic.genEventBindingEvalValue(e,t)},e.prototype._genMarkPathToRootAsCheckOnce=function(e){var t=e.bindingRecord;return t.isDefaultChangeDetection()?"":this._names.getDetectorName(t.directiveRecord.directiveIndex)+".markPathToRootAsCheckOnce();"},e.prototype._genUpdatePreventDefault=function(e,t){var n=this._names.getEventLocalName(e,t.selfIndex);return"if ("+n+" === false) { "+this._names.getPreventDefaultAccesor()+" = true};"},e.prototype._maybeGenDehydrateDirectives=function(){var e=this._names.genPipeOnDestroy(),t=this._logic.genDirectivesOnDestroy(this.directiveRecords),n=this._names.genDehydrateFields();return e||t||n?this.typeName+".prototype.dehydrateDirectives = function(destroyPipes) {\n if (destroyPipes) {\n "+e+"\n "+t+"\n }\n "+n+"\n }":""},e.prototype._maybeGenHydrateDirectives=function(){var e=this._logic.genHydrateDirectives(this.directiveRecords),t=this._logic.genHydrateDetectors(this.directiveRecords);return e||t?this.typeName+".prototype.hydrateDirectives = function(directives) {\n "+e+"\n "+t+"\n }":""},e.prototype._maybeGenAfterContentLifecycleCallbacks=function(){var e=this._logic.genContentLifecycleCallbacks(this.directiveRecords);if(e.length>0){var t=e.join("\n");return"\n "+this.typeName+".prototype.afterContentLifecycleCallbacksInternal = function() {\n "+t+"\n }\n "}return""},e.prototype._maybeGenAfterViewLifecycleCallbacks=function(){var e=this._logic.genViewLifecycleCallbacks(this.directiveRecords);if(e.length>0){var t=e.join("\n");return"\n "+this.typeName+".prototype.afterViewLifecycleCallbacksInternal = function() {\n "+t+"\n }\n "}return""},e.prototype._genAllRecords=function(e){var t=[];this._endOfBlockIdxs=[];for(var n=0;n<e.length;n++){var r=void 0,i=e[n];r=i.isLifeCycleRecord()?this._genDirectiveLifecycle(i):i.isPipeRecord()?this._genPipeCheck(i):i.isConditionalSkipRecord()?this._genConditionalSkip(i,this._names.getLocalName(i.contextIndex)):i.isUnconditionalSkipRecord()?this._genUnconditionalSkip(i):this._genReferenceCheck(i),r="\n "+this._maybeFirstInBinding(i)+"\n "+r+"\n "+this._maybeGenLastInDirective(i)+"\n "+this._genEndOfSkipBlock(n)+"\n ",t.push(r)}return t.join("\n")},e.prototype._genConditionalSkip=function(e,t){var n=e.mode===c.RecordType.SkipRecordsIf?"!":"";return this._endOfBlockIdxs.push(e.fixedArgs[0]-1),"if ("+n+t+") {"},e.prototype._genUnconditionalSkip=function(e){return this._endOfBlockIdxs.pop(),this._endOfBlockIdxs.push(e.fixedArgs[0]-1),"} else {"},e.prototype._genEndOfSkipBlock=function(e){if(!o.ListWrapper.isEmpty(this._endOfBlockIdxs)){var t=o.ListWrapper.last(this._endOfBlockIdxs);if(e===t)return this._endOfBlockIdxs.pop(),"}"}return""},e.prototype._genDirectiveLifecycle=function(e){if("DoCheck"===e.name)return this._genOnCheck(e);if("OnInit"===e.name)return this._genOnInit(e);if("OnChanges"===e.name)return this._genOnChange(e);throw new i.BaseException("Unknown lifecycle event '"+e.name+"'")},e.prototype._genPipeCheck=function(e){var t=this,n=this._names.getLocalName(e.contextIndex),r=e.args.map(function(e){return t._names.getLocalName(e)}).join(", "),i=this._names.getFieldName(e.selfIndex),o=this._names.getLocalName(e.selfIndex),s=this._names.getPipeName(e.selfIndex),a=e.name,c="\n if ("+s+" === "+this.changeDetectionUtilVarName+".uninitialized) {Line truncated
|
||||
},function(e,t,n){function r(e){y=e}var i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(6),a=n(12),c=n(5),u=n(14),p=n(66),l=n(48),h=function(){function e(e){this._pendingCount=0,this._didWork=!1,this._callbacks=[],this._isAngularEventPending=!1,this._watchAngularEvents(e)}return e.prototype._watchAngularEvents=function(e){var t=this;l.ObservableWrapper.subscribe(e.onTurnStart,function(e){t._didWork=!0,t._isAngularEventPending=!0}),e.runOutsideAngular(function(){l.ObservableWrapper.subscribe(e.onEventDone,function(n){e.hasPendingTimers||(t._isAngularEventPending=!1,t._runCallbacksIfReady())})})},e.prototype.increasePendingRequestCount=function(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount},e.prototype.decreasePendingRequestCount=function(){if(this._pendingCount-=1,this._pendingCount<0)throw new u.BaseException("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount},e.prototype.isStable=function(){return 0==this._pendingCount&&!this._isAngularEventPending},e.prototype._runCallbacksIfReady=function(){var e=this;return this.isStable()?void l.PromiseWrapper.resolve(null).then(function(t){for(;0!==e._callbacks.length;)e._callbacks.pop()(e._didWork);e._didWork=!1}):void(this._didWork=!0)},e.prototype.whenStable=function(e){this._callbacks.push(e),this._runCallbacksIfReady()},e.prototype.getPendingRequestCount=function(){return this._pendingCount},e.prototype.isAngularEventPending=function(){return this._isAngularEventPending},e.prototype.findBindings=function(e,t,n){return[]},e.prototype.findProviders=function(e,t,n){return[]},e=i([s.Injectable(),o("design:paramtypes",[p.NgZone])],e)}();t.Testability=h;var f=function(){function e(){this._applications=new a.Map,y.addToWindow(this)}return e.prototype.registerApplication=function(e,t){this._applications.set(e,t)},e.prototype.getTestability=function(e){return this._applications.get(e)},e.prototype.getAllTestabilities=function(){return a.MapWrapper.values(this._applications)},e.prototype.findTestabilityInTree=function(e,t){return void 0===t&&(t=!0),y.findTestabilityInTree(this,e,t)},e=i([s.Injectable(),o("design:paramtypes",[])],e)}();t.TestabilityRegistry=f;var d=function(){function e(){}return e.prototype.addToWindow=function(e){},e.prototype.findTestabilityInTree=function(e,t,n){return null},e=i([c.CONST(),o("design:paramtypes",[])],e)}();t.setTestabilityGetter=r;var y=c.CONST_EXPR(new d)},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(6),a=n(70),c=n(5),u=n(84),p=function(){function e(){}return Object.defineProperty(e.prototype,"hostView",{get:function(){return this.location.internalElement.parentView.ref},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hostComponent",{get:function(){return this.instance},enumerable:!0,configurable:!0}),e}();t.ComponentRef=p;var l=function(e){function t(t,n,r,i,o){e.call(this),this._dispose=o,this.location=t,this.instance=n,this.componentType=r,this.injector=i}return r(t,e),Object.defineProperty(t.prototype,"hostComponentType",{get:function(){return this.componentType},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this._dispose()},t}(p);t.ComponentRef_=l;var h=function(){function e(){}return e}();t.DynamicComponentLoader=h;var f=function(e){function t(t,n){e.call(this),this._compiler=t,this._viewManager=n}return r(t,e),t.prototype.loadAsRoot=function(e,t,n,r,i){var o=this;return this._compiler.compileInHost(e).then(function(s){var a=o._viewManager.createRootHostView(s,t,n,i),u=o._viewManager.getHostElement(a),p=o._viewManager.getComponent(u),h=function(){c.isPresent(r)&&r(),o._viewManager.destroyRootHostView(a)};return new l(u,p,e,n,h)})},t.prototype.loadIntoLocation=function(e,t,n,r,i){return void 0===r&&(r=null),void 0===i&&(i=null),this.loadNextToLocation(e,this._viewManager.getNamedElementInComponentView(t,n),r,i)},t.prototype.loadNextToLocation=function(e,t,n,r){Line truncated
|
||||
}(t.ViewType||(t.ViewType={}));t.ViewType},function(e,t,n){var r=n(14),i=function(){function e(){}return Object.defineProperty(e.prototype,"nativeElement",{get:function(){return r.unimplemented()},enumerable:!0,configurable:!0}),e}();t.ElementRef=i;var o=function(){function e(e){this._appElement=e}return Object.defineProperty(e.prototype,"internalElement",{get:function(){return this._appElement},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nativeElement",{get:function(){return this._appElement.nativeElement},enumerable:!0,configurable:!0}),e}();t.ElementRef_=o},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=n(12),o=n(14),s=n(5),a=function(){function e(){}return Object.defineProperty(e.prototype,"element",{get:function(){return o.unimplemented()},enumerable:!0,configurable:!0}),e.prototype.clear=function(){for(var e=this.length-1;e>=0;e--)this.remove(e)},Object.defineProperty(e.prototype,"length",{get:function(){return o.unimplemented()},enumerable:!0,configurable:!0}),e}();t.ViewContainerRef=a;var c=function(e){function t(t){e.call(this),this._element=t}return r(t,e),t.prototype.get=function(e){return this._element.nestedViews[e].ref},Object.defineProperty(t.prototype,"length",{get:function(){var e=this._element.nestedViews;return s.isPresent(e)?e.length:0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._element.ref},enumerable:!0,configurable:!0}),t.prototype.createEmbeddedView=function(e,t){void 0===t&&(t=-1),-1==t&&(t=this.length);var n=this._element.parentView.viewManager;return n.createEmbeddedViewInContainer(this._element.ref,t,e)},t.prototype.createHostView=function(e,t,n,r){void 0===t&&(t=-1),void 0===n&&(n=null),void 0===r&&(r=null),-1==t&&(t=this.length);var i=this._element.parentView.viewManager;return i.createHostViewInContainer(this._element.ref,t,e,n,r)},t.prototype.insert=function(e,t){void 0===t&&(t=-1),-1==t&&(t=this.length);var n=this._element.parentView.viewManager;return n.attachViewInContainer(this._element.ref,t,e)},t.prototype.indexOf=function(e){return i.ListWrapper.indexOf(this._element.nestedViews,e.internalView)},t.prototype.remove=function(e){void 0===e&&(e=-1),-1==e&&(e=this.length-1);var t=this._element.parentView.viewManager;return t.destroyViewInContainer(this._element.ref,e)},t.prototype.detach=function(e){void 0===e&&(e=-1),-1==e&&(e=this.length-1);var t=this._element.parentView.viewManager;return t.detachViewInContainer(this._element.ref,e)},t}(a);t.ViewContainerRef_=c},function(e,t){var n=function(){function e(e,t,n){this.id=e,this.encapsulation=t,this.styles=n}return e}();t.RenderComponentType=n;var r=function(){function e(e,t,n,r){this.injector=e,this.component=t,this.providerTokens=n,this.locals=r}return e}();t.RenderDebugInfo=r;var i=function(){function e(){}return e}();t.Renderer=i;var o=function(){function e(){}return e}();t.RootRenderer=o},function(e,t){var n=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},r=function(){function e(){}return Object.defineProperty(e.prototype,"elementRef",{get:function(){return null},enumerable:!0,configurable:!0}),e}();t.TemplateRef=r;var i=function(e){function t(t){e.call(this),this._elementRef=t}return n(t,e),Object.defineProperty(t.prototype,"elementRef",{get:function(){return this._elementRef},enumerable:!0,configurable:!0}),t}(r);t.TemplateRef_=i},function(e,t,n){var r=n(12),i=n(5),o=n(48),s=function(){function e(){this._results=[],this._emitter=new o.EventEmitter}return Object.defineProperty(e.prototype,"changes",{get:function(){return this._emitter},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._results.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"first",{get:function(){return r.ListWrapper.first(this._results)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"last",{get:function(){return r.ListWrapper.last(this._results)},enumerable:!0,configurable:!0}),e.prototype.map=function(e){return this._results.map(e)},e.prototype.filter=function(e){return this._results.filter(e)},e.prototype.reduce=function(e,t){return this._results.reduce(e,t)},e.prototype.toArray=function(){return r.ListWrapper.clone(this._results)},e.prototype[i.getSymbolIterator()]=function(){return this._results[i.getSymbolIterator()]()},e.prototype.toString=function(){return this._results.toString()},e.prototype.reset=function(e){this._results=e},e.prototype.notifyOnChanges=function(){this._emitter.emit(this)},e}();t.QueryList=s},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null==Line truncated
|
||||
var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(14),a=n(12),c=n(2),u=n(100),p=function(){function e(){}return e.prototype.transform=function(t,n){if(void 0===n&&(n=null),o.isBlank(n)||0==n.length)throw new s.BaseException("Slice pipe requires one argument");if(!this.supports(t))throw new u.InvalidPipeArgumentException(e,t);if(o.isBlank(t))return t;var r=n[0],i=n.length>1?n[1]:null;return o.isString(t)?o.StringWrapper.slice(t,r,i):a.ListWrapper.slice(t,r,i)},e.prototype.supports=function(e){return o.isString(e)||o.isArray(e)},e=r([c.Pipe({name:"slice",pure:!1}),c.Injectable(),i("design:paramtypes",[])],e)}();t.SlicePipe=p},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(106),a=n(2),c=n(12),u=n(100),p="en-US",l=function(){function e(){}return e.prototype.transform=function(t,n){if(o.isBlank(t))return null;if(!this.supports(t))throw new u.InvalidPipeArgumentException(e,t);var r=o.isPresent(n)&&n.length>0?n[0]:"mediumDate";return o.isNumber(t)&&(t=o.DateWrapper.fromMillis(t)),c.StringMapWrapper.contains(e._ALIASES,r)&&(r=c.StringMapWrapper.get(e._ALIASES,r)),s.DateFormatter.format(t,p,r)},e.prototype.supports=function(e){return o.isDate(e)||o.isNumber(e)},e._ALIASES={medium:"yMMMdjms","short":"yMdjm",fullDate:"yMMMMEEEEd",longDate:"yMMMMd",mediumDate:"yMMMd",shortDate:"yMd",mediumTime:"jms",shortTime:"jm"},e=r([o.CONST(),a.Pipe({name:"date",pure:!0}),a.Injectable(),i("design:paramtypes",[])],e)}();t.DatePipe=l},function(e,t){function n(e){return 2==e?"2-digit":"numeric"}function r(e){return 4>e?"short":"long"}function i(e){for(var t,i={},o=0;o<e.length;){for(t=o;t<e.length&&e[t]==e[o];)t++;var s=t-o;switch(e[o]){case"G":i.era=r(s);break;case"y":i.year=n(s);break;case"M":s>=3?i.month=r(s):i.month=n(s);break;case"d":i.day=n(s);break;case"E":i.weekday=r(s);break;case"j":i.hour=n(s);break;case"h":i.hour=n(s),i.hour12=!0;break;case"H":i.hour=n(s),i.hour12=!1;break;case"m":i.minute=n(s);break;case"s":i.second=n(s);break;case"z":i.timeZoneName="long";break;case"Z":i.timeZoneName="short"}o=t}return i}!function(e){e[e.Decimal=0]="Decimal",e[e.Percent=1]="Percent",e[e.Currency=2]="Currency"}(t.NumberFormatStyle||(t.NumberFormatStyle={}));var o=t.NumberFormatStyle,s=function(){function e(){}return e.format=function(e,t,n,r){var i=void 0===r?{}:r,s=i.minimumIntegerDigits,a=void 0===s?1:s,c=i.minimumFractionDigits,u=void 0===c?0:c,p=i.maximumFractionDigits,l=void 0===p?3:p,h=i.currency,f=i.currencyAsSymbol,d=void 0===f?!1:f,y={minimumIntegerDigits:a,minimumFractionDigits:u,maximumFractionDigits:l};return y.style=o[n].toLowerCase(),n==o.Currency&&(y.currency=h,y.currencyDisplay=d?"symbol":"code"),new Intl.NumberFormat(t,y).format(e)},e}();t.NumberFormatter=s;var a=new Map,c=function(){function e(){}return e.format=function(e,t,n){var r=t+n;if(a.has(r))return a.get(r).format(e);var o=new Intl.DateTimeFormat(t,i(n));return a.set(r,o),o.format(e)},e}();t.DateFormatter=c},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(5),a=n(14),c=n(106),u=n(2),p=n(12),l=n(100),h="en-US",f=s.RegExpWrapper.create("^(\\d+)?\\.((\\d+)(\\-(\\d+))?)?$"),d=function(){function e(){}return e._format=function(t,n,r,i,o){if(void 0===i&&(i=null),void 0===o&&(o=!1),s.isBlank(t))return null;if(!s.isNumber(t))throw new l.InvalidPipeArgumentException(e,t);var u=1,p=0,d=3;if(s.isPresent(r)){var y=s.RegExpWrapper.firstMatch(f,r);if(s.isBlank(y))throw new a.BaseException(r+" is not a valid digit info for number pipes");s.isPresent(y[1])&&(u=s.NumberWrapper.parseIntLine truncated
|
||||
exportAs:"ngForm"}),s(0,u.Host()),s(0,u.SkipSelf()),s(1,u.Optional()),s(1,u.Self()),s(1,u.Inject(d.NG_VALIDATORS)),s(2,u.Optional()),s(2,u.Self()),s(2,u.Inject(d.NG_ASYNC_VALIDATORS)),s(3,u.Optional()),s(3,u.Self()),s(3,u.Inject(h.NG_VALUE_ACCESSOR)),o("design:paramtypes",[p.ControlContainer,Array,Array,Array])],t)}(l.NgControl);t.NgControlName=v},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=n(118),o=n(14),s=function(e){function t(){e.apply(this,arguments),this.name=null,this.valueAccessor=null}return r(t,e),Object.defineProperty(t.prototype,"validator",{get:function(){return o.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"asyncValidator",{get:function(){return o.unimplemented()},enumerable:!0,configurable:!0}),t}(i.AbstractControlDirective);t.NgControl=s},function(e,t,n){var r=n(2),i=n(5);t.NG_VALUE_ACCESSOR=i.CONST_EXPR(new r.OpaqueToken("NgValueAccessor"))},function(e,t,n){function r(e,t){var n=l.ListWrapper.clone(t.path);return n.push(e),n}function i(e,t){h.isBlank(e)&&s(t,"Cannot find control"),h.isBlank(t.valueAccessor)&&s(t,"No value accessor for"),e.validator=d.Validators.compose([e.validator,t.validator]),e.asyncValidator=d.Validators.composeAsync([e.asyncValidator,t.asyncValidator]),t.valueAccessor.writeValue(e.value),t.valueAccessor.registerOnChange(function(n){t.viewToModelUpdate(n),e.updateValue(n,{emitModelToViewChange:!1}),e.markAsDirty()}),e.registerOnChange(function(e){return t.valueAccessor.writeValue(e)}),t.valueAccessor.registerOnTouched(function(){return e.markAsTouched()})}function o(e,t){h.isBlank(e)&&s(t,"Cannot find control"),e.validator=d.Validators.compose([e.validator,t.validator]),e.asyncValidator=d.Validators.composeAsync([e.asyncValidator,t.asyncValidator])}function s(e,t){var n=e.path.join(" -> ");throw new f.BaseException(t+" '"+n+"'")}function a(e){return h.isPresent(e)?d.Validators.compose(e.map(_.normalizeValidator)):null}function c(e){return h.isPresent(e)?d.Validators.composeAsync(e.map(_.normalizeValidator)):null}function u(e,t){if(!l.StringMapWrapper.contains(e,"model"))return!1;var n=e.model;return n.isFirstChange()?!0:!h.looseIdentical(t,n.currentValue)}function p(e,t){if(h.isBlank(t))return null;var n,r,i;return t.forEach(function(t){t instanceof y.DefaultValueAccessor?n=t:t instanceof g.CheckboxControlValueAccessor||t instanceof v.NumberValueAccessor||t instanceof m.SelectControlValueAccessor?(h.isPresent(r)&&s(e,"More than one built-in value accessor matches"),r=t):(h.isPresent(i)&&s(e,"More than one custom value accessor matches"),i=t)}),h.isPresent(i)?i:h.isPresent(r)?r:h.isPresent(n)?n:(s(e,"No valid value accessor for"),null)}var l=n(12),h=n(5),f=n(14),d=n(124),y=n(125),v=n(126),g=n(127),m=n(128),_=n(129);t.controlPath=r,t.setUpControl=i,t.setUpControlGroup=o,t.composeValidators=a,t.composeAsyncValidators=c,t.isPropertyUpdated=u,t.selectValueAccessor=p},function(e,t,n){function r(e){return a.PromiseWrapper.isPromise(e)?e:c.ObservableWrapper.toPromise(e)}function i(e,t){return t.map(function(t){return t(e)})}function o(e){var t=e.reduce(function(e,t){return s.isPresent(t)?u.StringMapWrapper.merge(e,t):e},{});return u.StringMapWrapper.isEmpty(t)?null:t}var s=n(5),a=n(49),c=n(48),u=n(12),p=n(2);t.NG_VALIDATORS=s.CONST_EXPR(new p.OpaqueToken("NgValidators")),t.NG_ASYNC_VALIDATORS=s.CONST_EXPR(new p.OpaqueToken("NgAsyncValidators"));var l=function(){function e(){}return e.required=function(e){return s.isBlank(e.value)||""==e.value?{required:!0}:null},e.minLength=function(t){return function(n){if(s.isPresent(e.required(n)))return null;var r=n.value;return r.length<t?{minlength:{requiredLength:t,actualLength:r.length}}:null}},e.maxLength=function(t){return function(n){if(s.isPresent(e.required(n)))return null;var r=n.value;return r.length>t?{maxlength:{requiredLength:t,actualLength:r.length}}:null}},e.nullValidator=function(e){return null},e.compose=function(e){if(s.isBlank(e))return null;var t=e.filter(s.isPresent);return 0==t.length?null:function(e){return o(i(e,t))}},e.composeAsync=function(e){if(s.isBlank(e))return null;var t=e.filter(s.isPresent);return 0==t.length?null:function(e){var n=i(e,t).map(r);return a.PromiseWrapper.all(n).then(o)}},e}();t.Validators=l},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(2),s=n(122),a=n(5),c=a.CONST_EXPR(new o.Provider(s.NG_VALUE_ACCESSOR,{useExisting:o.forwardRef(funcLine truncated
|
||||
var a=o.lastIndexOf("/");return o=o.substring(0,a+1)+n[m.Path],n[m.Path]=o,c(n)}var p=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},l=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},h=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},f=n(6),d=n(5),y=n(67),v=n(6);t.createWithoutPackagePrefix=r,t.DEFAULT_PACKAGE_URL_PROVIDER=new v.Provider(y.PACKAGE_ROOT_URL,{useValue:"/"});var g=function(){function e(e){void 0===e&&(e=null),d.isPresent(e)&&(this._packagePrefix=d.StringWrapper.stripRight(e,"/")+"/")}return e.prototype.resolve=function(e,t){var n=t;return d.isPresent(e)&&e.length>0&&(n=u(e,n)),d.isPresent(this._packagePrefix)&&"package"==i(n)&&(n=n.replace("package:",this._packagePrefix)),n},e=p([f.Injectable(),h(0,f.Inject(y.PACKAGE_ROOT_URL)),l("design:paramtypes",[String])],e)}();t.UrlResolver=g,t.getUrlScheme=i;var m,_=d.RegExpWrapper.create("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([\\w\\d\\-\\u0100-\\uffff.%]*)(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");!function(e){e[e.Scheme=1]="Scheme",e[e.UserInfo=2]="UserInfo",e[e.Domain=3]="Domain",e[e.Port=4]="Port",e[e.Path=5]="Path",e[e.QueryData=6]="QueryData",e[e.Fragment=7]="Fragment"}(m||(m={}))},function(e,t){var n=function(){function e(){}return e.prototype.get=function(e){return null},e}();t.XHR=n},function(e,t,n){function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function i(){return new b.ChangeDetectorGenConfig(l.assertionsEnabled(),!1,!0)}var o=n(144),s=n(145);t.TemplateCompiler=s.TemplateCompiler;var a=n(146);t.CompileDirectiveMetadata=a.CompileDirectiveMetadata,t.CompileTypeMetadata=a.CompileTypeMetadata,t.CompileTemplateMetadata=a.CompileTemplateMetadata;var c=n(151);t.SourceModule=c.SourceModule,t.SourceWithImports=c.SourceWithImports;var u=n(92);t.PLATFORM_DIRECTIVES=u.PLATFORM_DIRECTIVES,t.PLATFORM_PIPES=u.PLATFORM_PIPES,r(n(150));var p=n(160);t.TEMPLATE_TRANSFORMS=p.TEMPLATE_TRANSFORMS;var l=n(5),h=n(6),f=n(160),d=n(161),y=n(168),v=n(169),g=n(152),m=n(155),_=n(158),P=n(159),C=n(145),b=n(25),R=n(70),w=n(144),E=n(166),O=n(171),S=n(141),D=n(25);t.COMPILER_PROVIDERS=l.CONST_EXPR([D.Lexer,D.Parser,d.HtmlParser,f.TemplateParser,y.TemplateNormalizer,v.RuntimeMetadataResolver,S.DEFAULT_PACKAGE_URL_PROVIDER,m.StyleCompiler,P.ProtoViewCompiler,_.ViewCompiler,g.ChangeDetectionCompiler,new h.Provider(b.ChangeDetectorGenConfig,{useFactory:i,deps:[]}),C.TemplateCompiler,new h.Provider(w.RuntimeCompiler,{useClass:o.RuntimeCompiler_}),new h.Provider(R.Compiler,{useExisting:w.RuntimeCompiler}),O.DomElementSchemaRegistry,new h.Provider(E.ElementSchemaRegistry,{useExisting:O.DomElementSchemaRegistry}),S.UrlResolver])},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(70),a=n(80),c=n(145),u=n(6),p=function(e){function t(){e.apply(this,arguments)}return r(t,e),t}(s.Compiler);t.RuntimeCompiler=p;var l=function(e){function t(t){e.call(this),this._templateCompiler=t}return r(t,e),t.prototype.compileInHost=function(e){return this._templateCompiler.compileHostComponentRuntime(e).then(function(e){return new a.HostViewFactoryRef_(e)})},t.prototype.clearCache=function(){e.prototype.clearCache.call(this),this._templateCompiler.clearCache()},t=i([u.Injectable(),o("design:paramtypes",[c.TemplateCompiler])],t)}(s.Compiler_);t.RuntimeCompiler_=l},function(e,t,n){function r(e){if(!e.isComponent)throw new f.BaseException("Could not compile '"+e.type.name+"' because it is not a component.")}function i(e){var t=e.substring(0,e.length-T.MODULE_SUFFIX.length);return t+".template"+T.MODULE_SUFFIX}function o(e){return"hostViewFactory_"+e.name}function s(e){return _.moduleRef(i(e.type.moduleUrl))+"viewFactory_"+e.type.name+"0"}function a(e){var t={};return e.forEach(function(e){d.StringMapWrapper.forEach(e,function(e,n){t[n]=e})}),t}function c(e){var t=[];return e.forEach(function(e){var n=t.filter(function(t){return t.type.name==e.type.name&&t.type.moduleUrl==e.type.moduleUrl&&t.type.runtime==e.type.runtime}).length>0;n||t.push(e)}),tLine truncated
|
||||
function e(e){this._genConfig=e}return e.prototype.compileComponentRuntime=function(e,t,n){var r=this,i=p.createChangeDetectorDefinitions(e,t,this._genConfig,n);return i.map(function(e){return r._createChangeDetectorFactory(e)})},e.prototype._createChangeDetectorFactory=function(e){var t=new h.DynamicProtoChangeDetector(e);return function(){return t.instantiate()}},e.prototype.compileComponentCodeGen=function(e,t,n){var r=p.createChangeDetectorDefinitions(e,t,this._genConfig,n),i=[],a=0,c=r.map(function(t){var n,r;if(l.IS_DART){n=new f.Codegen(C);var c="_"+t.id,u=0===a&&e.isHost?"dynamic":""+o.moduleRef(e.moduleUrl)+e.name;n.generate(u,c,t),i.push(c+".newChangeDetector"),r=n.toString()}else n=new s.ChangeDetectorJITGenerator(t,""+P+g,""+_+v,""+b+m),i.push("function() { return new "+n.typeName+"(); }"),r=n.generateSource();return a++,r});return new o.SourceExpressions(c,i)},e=r([y.Injectable(),i("design:paramtypes",[h.ChangeDetectorGenConfig])],e)}();t.ChangeDetectionCompiler=R},function(e,t,n){function r(e,t,n,r){var o=[],s=new h(null,o,t);return p.templateVisitAll(s,r),i(o,e,n)}function i(e,t,n){var r=o(e);return e.map(function(e){var i=t.name+"_"+e.viewIndex;return new u.ChangeDetectorDefinition(i,e.strategy,r[e.viewIndex],e.bindingRecords,e.eventRecords,e.directiveRecords,n)})}function o(e){var t=s.ListWrapper.createFixedSize(e.length);return e.forEach(function(e){var n=a.isPresent(e.parent)?t[e.parent.viewIndex]:[];t[e.viewIndex]=n.concat(e.variableNames)}),t}var s=n(12),a=n(5),c=n(16),u=n(25),p=n(150),l=n(149);t.createChangeDetectorDefinitions=r;var h=function(){function e(e,t,n){this.parent=e,this.allVisitors=t,this.strategy=n,this.nodeCount=0,this.boundElementCount=0,this.variableNames=[],this.bindingRecords=[],this.eventRecords=[],this.directiveRecords=[],this.viewIndex=t.length,t.push(this)}return e.prototype.visitEmbeddedTemplate=function(t,n){this.nodeCount++,this.boundElementCount++,p.templateVisitAll(this,t.outputs);for(var r=0;r<t.directives.length;r++)t.directives[r].visit(this,r);var i=new e(this,this.allVisitors,u.ChangeDetectionStrategy.Default);return p.templateVisitAll(i,t.vars),p.templateVisitAll(i,t.children),null},e.prototype.visitElement=function(e,t){this.nodeCount++,e.isBound()&&this.boundElementCount++,p.templateVisitAll(this,e.inputs,null),p.templateVisitAll(this,e.outputs),p.templateVisitAll(this,e.exportAsVars);for(var n=0;n<e.directives.length;n++)e.directives[n].visit(this,n);return p.templateVisitAll(this,e.children),null},e.prototype.visitNgContent=function(e,t){return null},e.prototype.visitVariable=function(e,t){return this.variableNames.push(e.name),null},e.prototype.visitEvent=function(e,t){var n=a.isPresent(t)?u.BindingRecord.createForHostEvent(e.handler,e.fullName,t):u.BindingRecord.createForEvent(e.handler,e.fullName,this.boundElementCount-1);return this.eventRecords.push(n),null},e.prototype.visitElementProperty=function(e,t){var n,r=this.boundElementCount-1,i=a.isPresent(t)?t.directiveIndex:null;return e.type===p.PropertyBindingType.Property?n=a.isPresent(i)?u.BindingRecord.createForHostProperty(i,e.value,e.name):u.BindingRecord.createForElementProperty(e.value,r,e.name):e.type===p.PropertyBindingType.Attribute?n=a.isPresent(i)?u.BindingRecord.createForHostAttribute(i,e.value,e.name):u.BindingRecord.createForElementAttribute(e.value,r,e.name):e.type===p.PropertyBindingType.Class?n=a.isPresent(i)?u.BindingRecord.createForHostClass(i,e.value,e.name):u.BindingRecord.createForElementClass(e.value,r,e.name):e.type===p.PropertyBindingType.Style&&(n=a.isPresent(i)?u.BindingRecord.createForHostStyle(i,e.value,e.name,e.unit):u.BindingRecord.createForElementStyle(e.value,r,e.name,e.unit)),this.bindingRecords.push(n),null},e.prototype.visitAttr=function(e,t){return null},e.prototype.visitBoundText=function(e,t){var n=this.nodeCount++;return this.bindingRecords.push(u.BindingRecord.createForTextNode(e.value,n)),null},e.prototype.visitText=function(e,t){return this.nodeCount++,null},e.prototype.visitDirective=function(e,t){var n=new u.DirectiveIndex(this.boundElementCount-1,t),r=e.directive,i=[];s.StringMapWrapper.forEach(e.directive.outputs,function(e,t){return i.push([t,e])});var o=new u.DirectiveRecord({directiveIndex:n,callAfterContentInit:-1!==r.lifecycleHooks.indexOf(l.LifecycleHooks.AfterContentInit),callAfterContentChecked:-1!==r.lifecycleHooks.indexOf(l.LifecycleHooks.AfterContentChecked),callAfterViewInit:-1!==r.lifecycleHooks.indexOf(l.LifecycleHooks.AfterViewInit),callAfterViewChecked:-1!==r.lifecycleHooks.indexOf(l.LifecycleHooks.AfterViewChecked),callOnChanges:-1!==r.lifecycleHooks.indexOf(l.LifecycleHooks.OnChanges),callDoCheck:-1!==r.lifecycleHooks.indexOf(l.LifecycleHooks.DoCheck),callOnInit:-1!==r.lifecycleHooks.indexOf(l.LifecycleHooks.OnInit),callOnDestroy:-1!==r.lifecycleHooks.indexOf(l.LifecycleHooks.OnDestroy),changeDetection:r.changeDetection,outputs:i});this.directiveRecords.push(o),p.templateVisitAll(this,e.inputs,o);var a=this.bindingRecords;return oLine truncated
|
||||
n[t]=y.isPresent(r)?o(t,r,e):e})}),i(n)},e.prototype.visitBoundText=function(e,t){return null},e.prototype.visitText=function(e,t){return null},e.prototype.visitNgContent=function(e,t){return null},e.prototype.visitElement=function(e,t){var n=this,i=null;e.isBound()&&(i=this.boundElementCount++);var o=e.getComponent(),s=[];y.isBlank(o)&&e.exportAsVars.forEach(function(e){s.push([e.name,null])});var a=[],c=r(this,e.outputs,new Map);v.ListWrapper.forEachWithIndex(e.directives,function(e,t){e.visit(n,new M(t,i,c,s,a))});var u=[];c.forEach(function(e,t){return u.push(e)});var p=this._readAttrNameAndValues(a,e.attrs);return this._addProtoElement(e.isBound(),i,p,s,u,a,null),g.templateVisitAll(this,e.children),null},e.prototype.visitEmbeddedTemplate=function(e,t){var n=this,r=this.boundElementCount++,i=[];v.ListWrapper.forEachWithIndex(e.directives,function(e,t){e.visit(n,new M(t,r,new Map,[],i))});var o=this._readAttrNameAndValues(i,e.attrs),s=e.vars.map(function(e){return[e.value.length>0?e.value:w,e.name]}),a=this.factory.createCompileProtoView(e.children,s,this.allStatements,this.allProtoViews);return this._addProtoElement(!0,r,o,[],[],i,a.embeddedTemplateIndex),null},e.prototype._addProtoElement=function(e,t,n,r,i,o,s){var a=null;e&&(a=this.factory.createAppProtoElement(t,n,r,o,this.allStatements));var c=new T(t,n,r,i,o,s,a);this.protoElements.push(c)},e.prototype.visitVariable=function(e,t){return null},e.prototype.visitAttr=function(e,t){return t[e.name]=e.value,null},e.prototype.visitDirective=function(e,t){return t.targetDirectives.push(e.directive),g.templateVisitAll(this,e.hostEvents,t.hostEventTargetAndNames),e.exportAsVars.forEach(function(e){t.targetVariableNameAndValues.push([e.name,t.index])}),null},e.prototype.visitEvent=function(e,t){return t.set(e.fullName,e),null},e.prototype.visitDirectiveProperty=function(e,t){return null},e.prototype.visitElementProperty=function(e,t){return null},e}(),M=function(){function e(e,t,n,r,i){this.index=e,this.boundElementIndex=t,this.hostEventTargetAndNames=n,this.targetVariableNameAndValues=r,this.targetDirectives=i}return e}()},function(e,t,n){function r(e){return p.StringWrapper.split(e.trim(),/\s+/g)}function i(e,t){var n=new P.CssSelector,i=v.splitNsName(e)[1];n.setElement(i);for(var o=0;o<t.length;o++){var s=t[o][0],a=v.splitNsName(s)[1],c=t[o][1];if(n.addAttribute(a,c),s.toLowerCase()==T){var u=r(c);u.forEach(function(e){return n.addClassName(e)})}}return n}var o=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},s=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},u=n(12),p=n(5),l=n(2),h=n(5),f=n(14),d=n(25),y=n(161),v=n(165),g=n(164),m=n(30),_=n(150),P=n(147),C=n(166),b=n(167),R=n(157),w=n(162),E=n(148),O=/^(?:(?:(?:(bind-)|(var-|#)|(on-)|(bindon-))(.+))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/g,S="template",D="template",A="*",T="class",x=".",I="attr",N="class",k="style",M=P.CssSelector.parse("*")[0];t.TEMPLATE_TRANSFORMS=h.CONST_EXPR(new l.OpaqueToken("TemplateTransforms"));var V=function(e){function t(t,n){e.call(this,n,t)}return o(t,e),t}(g.ParseError);t.TemplateParseError=V;var j=function(){function e(e,t,n,r){this._exprParser=e,this._schemaRegistry=t,this._htmlParser=n,this.transforms=r}return e.prototype.parse=function(e,t,n,r){var i=new L(t,n,this._exprParser,this._schemaRegistry),o=this._htmlParser.parse(e,r),s=w.htmlVisitAll(i,o.rootNodes,U),a=o.errors.concat(i.errors);if(a.length>0){var c=a.join("\n");throw new f.BaseException("Template parse errors:\n"+c)}return p.isPresent(this.transforms)&&this.transforms.forEach(function(e){s=_.templateVisitAll(e,s)}),s},e=s([l.Injectable(),c(3,l.Optional()),c(3,l.Inject(t.TEMPLATE_TRANSFORMS)),a("design:paramtypes",[d.Parser,C.ElementSchemaRegistry,y.HtmlParser,Array])],e)}();t.TemplateParser=j;var L=function(){function e(e,t,n,r){var i=this;this._exprParser=n,this._schemaRegistry=r,this.errors=[],this.directivesIndex=new Map,this.ngContentCount=0,this.selectorMatcher=new P.SelectorMatcher,u.ListWrapper.forEachWithIndex(e,function(e,t){var n=P.CssSelector.parse(e.selector);i.selectorMatcher.addSelectables(n,e),i.directivesIndex.set(e,t)}),this.pipesByName=new Map,t.forEach(function(e){return i.pipesByName.set(e.name,e)})}return e.prototype._reportError=function(e,t){this.errors.push(new V(e,t.start))},e.prototype._parseInterpolation=function(e,t){var n=t.start.toString();try{Line truncated
|
||||
},e.prototype._restorePosition=function(e){this.peek=e[0],this.index=e[1],this.column=e[2],this.line=e[3];var t=e[4];t<this.tokens.length&&(this.tokens=P.ListWrapper.slice(this.tokens,0,t))},e}()},function(e,t){var n=function(){function e(e,t,n,r){this.file=e,this.offset=t,this.line=n,this.col=r}return e.prototype.toString=function(){return this.file.url+"@"+this.line+":"+this.col},e}();t.ParseLocation=n;var r=function(){function e(e,t){this.content=e,this.url=t}return e}();t.ParseSourceFile=r;var i=function(){function e(e,t){this.location=e,this.msg=t}return e.prototype.toString=function(){var e=this.location.file.content,t=this.location.offset;t>e.length-1&&(t=e.length-1);for(var n=t,r=0,i=0;100>r&&t>0&&(t--,r++,"\n"!=e[t]||3!=++i););for(r=0,i=0;100>r&&n<e.length-1&&(n++,r++,"\n"!=e[n]||3!=++i););var o=e.substring(t,this.location.offset)+"[ERROR ->]"+e.substring(this.location.offset,n+1);return this.msg+' ("'+o+'"): '+this.location},e}();t.ParseError=i;var o=function(){function e(e,t){this.start=e,this.end=t}return e.prototype.toString=function(){return this.start.file.content.substring(this.start.offset,this.end.offset)},e}();t.ParseSourceSpan=o},function(e,t,n){function r(e){var t=u[e.toLowerCase()];return s.isPresent(t)?t:p}function i(e){if("@"!=e[0])return[null,e];var t=s.RegExpWrapper.firstMatch(l,e);return[t[1],t[2]]}function o(e){return i(e)[0]}var s=n(5);t.NAMED_ENTITIES=s.CONST_EXPR({Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",alefsym:"ℵ",Alpha:"Α",alpha:"α",amp:"&",and:"∧",ang:"∠",apos:"'",Aring:"Å",aring:"å",asymp:"≈",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",bdquo:"„",Beta:"Β",beta:"β",brvbar:"¦",bull:"•",cap:"∩",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",Chi:"Χ",chi:"χ",circ:"ˆ",clubs:"♣",cong:"≅",copy:"©",crarr:"↵",cup:"∪",curren:"¤",dagger:"†",Dagger:"‡",darr:"↓",dArr:"⇓",deg:"°",Delta:"Δ",delta:"δ",diams:"♦",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",empty:"∅",emsp:" ",ensp:" ",Epsilon:"Ε",epsilon:"ε",equiv:"≡",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",exist:"∃",fnof:"ƒ",forall:"∀",frac12:"½",frac14:"¼",frac34:"¾",frasl:"⁄",Gamma:"Γ",gamma:"γ",ge:"≥",gt:">",harr:"↔",hArr:"⇔",hearts:"♥",hellip:"…",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",image:"ℑ",infin:"∞","int":"∫",Iota:"Ι",iota:"ι",iquest:"¿",isin:"∈",Iuml:"Ï",iuml:"ï",Kappa:"Κ",kappa:"κ",Lambda:"Λ",lambda:"λ",lang:"⟨",laquo:"«",larr:"←",lArr:"⇐",lceil:"⌈",ldquo:"“",le:"≤",lfloor:"⌊",lowast:"∗",loz:"◊",lrm:"",lsaquo:"‹",lsquo:"‘",lt:"<",macr:"¯",mdash:"—",micro:"µ",middot:"·",minus:"−",Mu:"Μ",mu:"μ",nabla:"∇",nbsp:" ",ndash:"–",ne:"≠",ni:"∋",not:"¬",notin:"∉",nsub:"⊄",Ntilde:"Ñ",ntilde:"ñ",Nu:"Ν",nu:"ν",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",OElig:"Œ",oelig:"œ",Ograve:"Ò",ograve:"ò",oline:"‾",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",oplus:"⊕",or:"∨",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",otimes:"⊗",Ouml:"Ö",ouml:"ö",para:"¶",permil:"‰",perp:"⊥",Phi:"Φ",phi:"φ",Pi:"Π",pi:"π",piv:"ϖ",plusmn:"±",pound:"£",prime:"′",Prime:"″",prod:"∏",prop:"∝",Psi:"Ψ",psi:"ψ",quot:'"',radic:"√",rang:"⟩",raquo:"»",rarr:"→",rArr:"⇒",rceil:"⌉",rdquo:"”",real:"ℜ",reg:"®",rfloor:"⌋",Rho:"Ρ",rho:"ρ",rlm:"",rsaquo:"›",rsquo:"’",sbquo:"‚",Scaron:"Š",scaron:"š",sdot:"⋅",sect:"§",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sim:"∼",spades:"♠",sub:"⊂",sube:"⊆",sum:"∑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supe:"⊇",szlig:"ß",Tau:"Τ",tau:"τ",there4:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thinsp:" ",THORN:"Þ",thorn:"þ",tilde:"˜",times:"×",trade:"™",Uacute:"Ú",uacute:"ú",uarr:"↑",uArr:"⇑",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",Uuml:"Ü",uuml:"ü",weierp:"℘",Xi:"Ξ",xi:"ξ",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ",Yuml:"Ÿ",Zeta:"Ζ",zeta:"ζ",zwj:"",zwnj:""}),function(e){e[e.RAW_TEXT=0]="RAW_TEXT",e[e.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",e[e.PARSABLE_DATA=2]="PARSABLE_DATA"}(t.HtmlTagContentType||(t.HtmlTagContentType={}));var a=t.HtmlTagContentType,c=function(){function e(e){var t=this,n=void 0===e?{}:e,r=n.closedByChildren,i=n.requiredParents,o=n.implicitNamespacePrefix,c=n.contentType,u=n.closedByParent,p=n.isVoid,l=n.ignoreFirstLf;this.closedByChildren={},this.closedByParent=!1,s.isPresent(r)&&r.length>0&&r.forEach(function(e){return t.closedByChildren[e]=!0}),this.isVoid=s.normalizeBool(p),this.closedByParent=s.normalizeBool(u)||this.isVoid,s.isPresent(i)&&i.length>0&&(this.requiredParents={},this.parentToAdd=i[0],i.forEach(function(e){return t.requiredParents[e]=!0})),this.implicitNamespacePrefix=o,this.contentType=s.isPresent(c)?c:a.PARSABLE_DATALine truncated
|
||||
},e.prototype.detachView=function(e){for(var t=0;t<e.length;t++){var n=e[t];b.DOM.remove(n),this.animateNodeLeave(n)}},e.prototype.destroyView=function(e,t){this.componentProto.encapsulation===C.ViewEncapsulation.Native&&v.isPresent(e)&&this._rootRenderer.sharedStylesHost.removeHost(b.DOM.getShadowRoot(e))},e.prototype.listen=function(e,t,n){return this._rootRenderer.eventManager.addEventListener(e,t,o(n))},e.prototype.listenGlobal=function(e,t,n){return this._rootRenderer.eventManager.addGlobalEventListener(e,t,o(n))},e.prototype.setElementProperty=function(e,t,n){b.DOM.setProperty(e,t,n)},e.prototype.setElementAttribute=function(e,t,n){var r,i=u(t);v.isPresent(i[0])&&(t=i[0]+":"+i[1],r=w[i[0]]),v.isPresent(n)?v.isPresent(r)?b.DOM.setAttributeNS(e,r,t,n):b.DOM.setAttribute(e,i[1],n):b.DOM.removeAttribute(e,t)},e.prototype.setBindingDebugInfo=function(e,t,n){var r=R.camelCaseToDashCase(t);if(b.DOM.isCommentNode(e)){var i=v.RegExpWrapper.firstMatch(O,v.StringWrapper.replaceAll(b.DOM.getText(e),/\n/g,"")),o=v.Json.parse(i[1]);o[r]=n,b.DOM.setText(e,v.StringWrapper.replace(E,"{}",v.Json.stringify(o)))}else this.setElementAttribute(e,t,n)},e.prototype.setElementDebugInfo=function(e,t){},e.prototype.setElementClass=function(e,t,n){n?b.DOM.addClass(e,t):b.DOM.removeClass(e,t)},e.prototype.setElementStyle=function(e,t,n){v.isPresent(n)?b.DOM.setStyle(e,t,v.stringify(n)):b.DOM.removeStyle(e,t)},e.prototype.invokeElementMethod=function(e,t,n){b.DOM.invoke(e,t,n)},e.prototype.setText=function(e,t){b.DOM.setText(e,t)},e.prototype.animateNodeEnter=function(e){b.DOM.isElementNode(e)&&b.DOM.hasClass(e,"ng-animate")&&(b.DOM.addClass(e,"ng-enter"),this._rootRenderer.animate.css().addAnimationClass("ng-enter-active").start(e).onComplete(function(){b.DOM.removeClass(e,"ng-enter")}))},e.prototype.animateNodeLeave=function(e){b.DOM.isElementNode(e)&&b.DOM.hasClass(e,"ng-animate")?(b.DOM.addClass(e,"ng-leave"),this._rootRenderer.animate.css().addAnimationClass("ng-leave-active").start(e).onComplete(function(){b.DOM.removeClass(e,"ng-leave"),b.DOM.remove(e)})):b.DOM.remove(e)},e}();t.DomRenderer=A;var T=/%COMP%/g;t.COMPONENT_VARIABLE="%COMP%",t.HOST_ATTR="_nghost-"+t.COMPONENT_VARIABLE,t.CONTENT_ATTR="_ngcontent-"+t.COMPONENT_VARIABLE;var x=/^@([^:]+):(.+)/g},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(6),s=n(184),a=n(189),c=function(){function e(e){this.browserDetails=e}return e.prototype.css=function(){return new s.CssAnimationBuilder(this.browserDetails)},e=r([o.Injectable(),i("design:paramtypes",[a.BrowserDetails])],e)}();t.AnimationBuilder=c},function(e,t,n){var r=n(185),i=n(186),o=function(){function e(e){this.browserDetails=e,this.data=new r.CssAnimationOptions}return e.prototype.addAnimationClass=function(e){return this.data.animationClasses.push(e),this},e.prototype.addClass=function(e){return this.data.classesToAdd.push(e),this},e.prototype.removeClass=function(e){return this.data.classesToRemove.push(e),this},e.prototype.setDuration=function(e){return this.data.duration=e,this},e.prototype.setDelay=function(e){return this.data.delay=e,this},e.prototype.setStyles=function(e,t){return this.setFromStyles(e).setToStyles(t)},e.prototype.setFromStyles=function(e){return this.data.fromStyles=e,this},e.prototype.setToStyles=function(e){return this.data.toStyles=e,this},e.prototype.start=function(e){return new i.Animation(e,this.data,this.browserDetails)},e}();t.CssAnimationBuilder=o},function(e,t){var n=function(){function e(){this.classesToAdd=[],this.classesToRemove=[],this.animationClasses=[]}return e}();t.CssAnimationOptions=n},function(e,t,n){var r=n(5),i=n(187),o=n(188),s=n(12),a=n(172),c=function(){function e(e,t,n){var i=this;this.element=e,this.data=t,this.browserDetails=n,this.callbacks=[],this.eventClearFunctions=[],this.completed=!1,this._stringPrefix="",this.startTime=r.DateWrapper.toMillis(r.DateWrapper.now()),this._stringPrefix=a.DOM.getAnimationPrefix(),this.setup(),this.wait(function(e){return i.start()})}return Object.defineProperty(e.prototype,"totalTime",{get:function(){var e=null!=this.computedDelay?this.computedDelay:0,t=null!=this.computedDuration?this.computedDuration:0;return e+t},enumerable:!0,configurable:!0}),e.prototype.wait=function(e){this.browserDetails.raf(e,2)},e.prototype.setup=function(){null!=this.data.fromStyles&&this.applyStyles(this.data.fromStyles),null!=this.data.duration&&this.applyStyles({transitionDuration:this.data.duration.toString()+"ms"}),null!=this.data.delay&&this.applyStyles({transitionDelay:this.data.delay.toString(Line truncated
|
||||
},function(e,t,n){function r(e,t){return e.createConnection(t).response}function i(e,t,n,r){var i=e;return c.isPresent(t)?i.merge(new f.RequestOptions({method:t.method||n,url:t.url||r,search:t.search,headers:t.headers,body:t.body})):c.isPresent(n)?i.merge(new f.RequestOptions({method:n,url:r})):i.merge(new f.RequestOptions({url:r}))}var o=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},s=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=n(5),u=n(14),p=n(2),l=n(206),h=n(207),f=n(211),d=n(210),y=function(){function e(e,t){this._backend=e,this._defaultOptions=t}return e.prototype.request=function(e,t){var n;if(c.isString(e))n=r(this._backend,new h.Request(i(this._defaultOptions,t,d.RequestMethod.Get,e)));else{if(!(e instanceof h.Request))throw u.makeTypeError("First argument must be a url string or Request instance.");n=r(this._backend,e)}return n},e.prototype.get=function(e,t){return r(this._backend,new h.Request(i(this._defaultOptions,t,d.RequestMethod.Get,e)))},e.prototype.post=function(e,t,n){return r(this._backend,new h.Request(i(this._defaultOptions.merge(new f.RequestOptions({body:t})),n,d.RequestMethod.Post,e)))},e.prototype.put=function(e,t,n){return r(this._backend,new h.Request(i(this._defaultOptions.merge(new f.RequestOptions({body:t})),n,d.RequestMethod.Put,e)))},e.prototype["delete"]=function(e,t){return r(this._backend,new h.Request(i(this._defaultOptions,t,d.RequestMethod.Delete,e)))},e.prototype.patch=function(e,t,n){return r(this._backend,new h.Request(i(this._defaultOptions.merge(new f.RequestOptions({body:t})),n,d.RequestMethod.Patch,e)))},e.prototype.head=function(e,t){return r(this._backend,new h.Request(i(this._defaultOptions,t,d.RequestMethod.Head,e)))},e=s([p.Injectable(),a("design:paramtypes",[l.ConnectionBackend,f.RequestOptions])],e)}();t.Http=y;var v=function(e){function t(t,n){e.call(this,t,n)}return o(t,e),t.prototype.request=function(e,t){var n;if(c.isString(e)&&(e=new h.Request(i(this._defaultOptions,t,d.RequestMethod.Get,e))),!(e instanceof h.Request))throw u.makeTypeError("First argument must be a url string or Request instance.");return e.method!==d.RequestMethod.Get&&u.makeTypeError("JSONP requests must use GET request method."),n=r(this._backend,e)},t=s([p.Injectable(),a("design:paramtypes",[l.ConnectionBackend,f.RequestOptions])],t)}(y);t.Jsonp=v},function(e,t){var n=function(){function e(){}return e}();t.ConnectionBackend=n;var r=function(){function e(){}return e}();t.Connection=r},function(e,t,n){var r=n(208),i=n(209),o=n(5),s=function(){function e(e){var t=e.url;if(this.url=e.url,o.isPresent(e.search)){var n=e.search.toString();if(n.length>0){var s="?";o.StringWrapper.contains(this.url,"?")&&(s="&"==this.url[this.url.length-1]?"":"&"),this.url=t+s+n}}this._body=e.body,this.method=i.normalizeMethodName(e.method),this.headers=new r.Headers(e.headers)}return e.prototype.text=function(){return o.isPresent(this._body)?this._body.toString():""},e}();t.Request=s},function(e,t,n){var r=n(5),i=n(14),o=n(12),s=function(){function e(t){var n=this;return t instanceof e?void(this._headersMap=t._headersMap):(this._headersMap=new o.Map,void(r.isBlank(t)||o.StringMapWrapper.forEach(t,function(e,t){n._headersMap.set(t,o.isListLikeIterable(e)?e:[e])})))}return e.fromResponseHeaderString=function(t){return t.trim().split("\n").map(function(e){return e.split(":")}).map(function(e){var t=e[0],n=e.slice(1);return[t.trim(),n.join(":").trim()]}).reduce(function(e,t){var n=t[0],r=t[1];return!e.set(n,r)&&e},new e)},e.prototype.append=function(e,t){var n=this._headersMap.get(e),r=o.isListLikeIterable(n)?n:[];r.push(t),this._headersMap.set(e,r)},e.prototype["delete"]=function(e){this._headersMap["delete"](e)},e.prototype.forEach=function(e){this._headersMap.forEach(e)},e.prototype.get=function(e){return o.ListWrapper.first(this._headersMap.get(e))},e.prototype.has=function(e){return this._headersMap.has(e)},e.prototype.keys=function(){return o.MapWrapper.keys(this._headersMap)},e.prototype.set=function(e,t){var n=[];if(o.isListLikeIterable(t)){var r=t.join(",");n.push(r)}else n.push(t);this._headersMap.set(e,n)},e.prototype.values=function(){return o.MapWrapper.values(this._headersMap)},e.prototype.toJSON=function(){return r.Json.stringify(this.values())},e.prototype.getAll=function(e){var t=this._headersMap.get(e);return o.isListLikeIterable(t)?t:[]},e.prototype.entries=function(){throw new i.BaseException('"entries" method is notLine truncated
|
||||
}else 1==t.length&&(a=t[0].component.componentType,c=this._rootComponent);var d=this.hasRoute(s,a),y=h.isPresent(c)&&this.hasRoute(s,c);if(y&&d){var v='Link "'+p.ListWrapper.toJSON(e)+'" is ambiguous, use "./" or "../" to disambiguate.';throw new f.BaseException(v)}y&&(i=t.pop())}if(""==o[o.length-1]&&o.pop(),o.length>0&&""==o[0]&&o.shift(),o.length<1){var v='Link "'+p.ListWrapper.toJSON(e)+'" must include a route name.';throw new f.BaseException(v)}for(var g=this._generate(o,t,i,n,e),m=t.length-1;m>=0;m--){var _=t[m];if(h.isBlank(_))break;g=_.replaceChild(g)}return g},e.prototype._generate=function(e,t,n,r,i){var o=this;void 0===r&&(r=!1);var s=this._rootComponent,a=null,c={},u=p.ListWrapper.last(t);if(h.isPresent(u)&&h.isPresent(u.component)&&(s=u.component.componentType),0==e.length){var l=this.generateDefault(s);if(h.isBlank(l))throw new f.BaseException('Link "'+p.ListWrapper.toJSON(i)+'" does not resolve to a terminal instruction.');return l}h.isPresent(n)&&!r&&(c=p.StringMapWrapper.merge(n.auxInstruction,c),a=n.component);var d=this._rules.get(s);if(h.isBlank(d))throw new f.BaseException('Component "'+h.getTypeNameForDebugging(s)+'" has no route config.');var y=0,v={};if(y<e.length&&h.isString(e[y])){var g=e[y];if(""==g||"."==g||".."==g)throw new f.BaseException('"'+g+'/" is only allowed at the beginning of a link DSL.');if(y+=1,y<e.length){var m=e[y];h.isStringMap(m)&&!h.isArray(m)&&(v=m,y+=1)}var P=(r?d.auxNames:d.names).get(g);if(h.isBlank(P))throw new f.BaseException('Component "'+h.getTypeNameForDebugging(s)+'" has no route named "'+g+'".');if(h.isBlank(P.handler.componentType)){var C=P.generateComponentPathValues(v);return new _.UnresolvedInstruction(function(){return P.handler.resolveComponentType().then(function(s){return o._generate(e,t,n,r,i)})},C.urlPath,C.urlParams)}a=r?d.generateAuxiliary(g,v):d.generate(g,v)}for(;y<e.length&&h.isArray(e[y]);){var b=[u],R=this._generate(e[y],b,null,!0,i);c[R.component.urlPath]=R,y+=1}var w=new _.ResolvedInstruction(a,null,c);if(h.isPresent(a)&&h.isPresent(a.componentType)){var E=null;if(a.terminal)y>=e.length;else{var O=t.concat([w]),S=e.slice(y);E=this._generate(S,O,null,!1,i)}w.child=E}return w},e.prototype.hasRoute=function(e,t){var n=this._rules.get(t);return h.isBlank(n)?!1:n.hasRoute(e)},e.prototype.generateDefault=function(e){var t=this;if(h.isBlank(e))return null;var n=this._rules.get(e);if(h.isBlank(n)||h.isBlank(n.defaultRoute))return null;var r=null;if(h.isPresent(n.defaultRoute.handler.componentType)){var i=n.defaultRoute.generate({});return n.defaultRoute.terminal||(r=this.generateDefault(n.defaultRoute.handler.componentType)),new _.DefaultInstruction(i,r)}return new _.UnresolvedInstruction(function(){return n.defaultRoute.handler.resolveComponentType().then(function(n){return t.generateDefault(e)})})},e=a([y.Injectable(),u(0,y.Inject(t.ROUTER_PRIMARY_COMPONENT)),c("design:paramtypes",[h.Type])],e)}();t.RouteRegistry=R},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=function(){function e(e){this.configs=e}return e=r([o.CONST(),i("design:paramtypes",[Array])],e)}();t.RouteConfig=s;var a=function(){function e(e){var t=e.path,n=e.component,r=e.name,i=e.data,o=e.useAsDefault;this.aux=null,this.loader=null,this.redirectTo=null,this.path=t,this.component=n,this.name=r,this.data=i,this.useAsDefault=o}return e=r([o.CONST(),i("design:paramtypes",[Object])],e)}();t.Route=a;var c=function(){function e(e){var t=e.path,n=e.component,r=e.name;this.data=null,this.aux=null,this.loader=null,this.redirectTo=null,this.useAsDefault=!1,this.path=t,this.component=n,this.name=r}return e=r([o.CONST(),i("design:paramtypes",[Object])],e)}();t.AuxRoute=c;var u=function(){function e(e){var t=e.path,n=e.loader,r=e.name,i=e.data,o=e.useAsDefault;this.aux=null,this.path=t,this.loader=n,this.name=r,this.data=i,this.useAsDefault=o}return e=r([o.CONST(),i("design:paramtypes",[Object])],e)}();t.AsyncRoute=u;var p=function(){function e(e){var t=e.path,n=e.redirectTo;this.name=null,this.loader=null,this.data=null,this.aux=null,this.useAsDefault=!1,this.path=t,this.redirectTo=n}return e=r([o.CONST(),i("design:paramtypes",[Object])],e)}();t.Redirect=p},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=n(5),o=n(14),s=n(49),a=n(12),c=n(224),u=n(225),p=function(){function e(){}return e}();t.RouteMatch=p;var l=function(e){function t(t,n,r){e.call(this),this.instructiLine truncated
|
||||
configurable:!0}),Object.defineProperty(e.prototype,"routeParams",{set:function(e){this._routeParams=e,this._updateLink()},enumerable:!0,configurable:!0}),e.prototype.onClick=function(){return s.isString(this.target)&&"_self"!=this.target?!0:(this._router.navigateByInstruction(this._navigationInstruction),!1)},e=r([o.Directive({selector:"[routerLink]",inputs:["routeParams: routerLink","target: target"],host:{"(click)":"onClick()","[attr.href]":"visibleHref","[class.router-link-active]":"isRouteActive"}}),i("design:paramtypes",[a.Router,c.Location])],e)}();t.RouterLink=u},function(e,t){var n=function(){function e(){}return e}();t.PlatformLocation=n},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},a=n(2),c=n(233),u=n(5),p=n(239),l=function(e){function t(t,n){e.call(this),this._platformLocation=t,this._baseHref="",u.isPresent(n)&&(this._baseHref=n)}return r(t,e),t.prototype.onPopState=function(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)},t.prototype.getBaseHref=function(){return this._baseHref},t.prototype.path=function(){var e=this._platformLocation.hash;return(e.length>0?e.substring(1):e)+c.normalizeQueryParams(this._platformLocation.search)},t.prototype.prepareExternalUrl=function(e){var t=c.joinWithSlash(this._baseHref,e);return t.length>0?"#"+t:t},t.prototype.pushState=function(e,t,n,r){var i=this.prepareExternalUrl(n+c.normalizeQueryParams(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.pushState(e,t,i)},t.prototype.replaceState=function(e,t,n,r){var i=this.prepareExternalUrl(n+c.normalizeQueryParams(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.replaceState(e,t,i)},t.prototype.forward=function(){this._platformLocation.forward()},t.prototype.back=function(){this._platformLocation.back()},t=i([a.Injectable(),s(1,a.Optional()),s(1,a.Inject(c.APP_BASE_HREF)),o("design:paramtypes",[p.PlatformLocation,String])],t)}(c.LocationStrategy);t.HashLocationStrategy=l},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},a=n(2),c=n(5),u=n(14),p=n(233),l=n(239),h=function(e){function t(t,n){if(e.call(this),this._platformLocation=t,c.isBlank(n)&&(n=this._platformLocation.getBaseHrefFromDOM()),c.isBlank(n))throw new u.BaseException("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=n}return r(t,e),t.prototype.onPopState=function(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)},t.prototype.getBaseHref=function(){return this._baseHref},t.prototype.prepareExternalUrl=function(e){return p.joinWithSlash(this._baseHref,e)},t.prototype.path=function(){return this._platformLocation.pathname+p.normalizeQueryParams(this._platformLocation.search)},t.prototype.pushState=function(e,t,n,r){var i=this.prepareExternalUrl(n+p.normalizeQueryParams(r));this._platformLocation.pushState(e,t,i)},t.prototype.replaceState=function(e,t,n,r){var i=this.prepareExternalUrl(n+p.normalizeQueryParams(r));this._platformLocation.replaceState(e,t,i)},t.prototype.forward=function(){this._platformLocation.forward()},t.prototype.back=function(){this._platformLocation.back()},t=i([a.Injectable(),s(1,a.Optional()),s(1,a.Inject(p.APP_BASE_HREF)),o("design:paramtypes",[l.PlatformLocation,String])],t)}(p.LocationStrategy);t.PathLocationStrategy=h},function(e,t){},function(e,t,n){function r(e,t,n,r){var i=new a.RootRouter(e,t,n);return r.registerDisposeListener(function(){return i.dispose()}),i}function i(e){if(0==e.componentTypes.length)throw new h.BaseException("BootsLine truncated
|
||||
Generated
Vendored
-3316
File diff suppressed because it is too large.
Load diff
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){(function(t){"use strict";var e=n(1),r=n(2),o=n(6),i=n(10);o.Zone.prototype.scheduleMicrotask?console.warn("Zone-microtasks already exported on window the object!"):(e.addMicrotaskSupport(o.Zone),t.Zone=o.Zone,t.zone=new t.Zone,t.Promise=r.Promise,i.apply())}).call(e,function(){return this}())},function(t,e,n){(function(t){function r(t){c._asap(this.bind(t))}function o(t){return t.prototype.scheduleMicrotask=r,t}var i,a="undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]"),u=t.navigator&&t.navigator.userAgent.toLowerCase().indexOf("firefox")>-1;a&&!u&&(i=Promise.resolve());var c=n(2).Promise;i&&c._setScheduler(function(t){i.then(t)}),c._setAsap(function(e,n){t.zone.scheduleMicrotask(function(){e(n)})}),e.addMicrotaskSupport=o}).call(e,function(){return this}())},function(t,e,n){var r;(function(t,o){(function(){"use strict";function i(t){return"function"==typeof t||"object"==typeof t&&null!==t}function a(t){return"function"==typeof t}function u(t){return"object"==typeof t&&null!==t}function c(t){K=t}function s(t){V=t}function f(){return function(){process.nextTick(y)}}function p(){return function(){U(y)}}function l(){var t=0,e=new Q(y),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function h(){var t=new MessageChannel;return t.port1.onmessage=y,function(){t.port2.postMessage(0)}}function d(){return function(){setTimeout(y,1)}}function y(){for(var t=0;B>t;t+=2){var e=nt[t],n=nt[t+1];e(n),nt[t]=void 0,nt[t+1]=void 0}B=0}function v(){try{var t=n(4);return U=t.runOnLoop||t.runOnContext,p()}catch(e){return d()}}function m(){}function g(){return new TypeError("You cannot resolve a promise with itself")}function b(){return new TypeError("A promises callback cannot return that same promise.")}function w(t){try{return t.then}catch(e){return at.error=e,at}}function k(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function _(t,e,n){V(function(t){var r=!1,o=k(n,e,function(n){r||(r=!0,e!==n?P(t,n):j(t,n))},function(e){r||(r=!0,M(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,M(t,o))},t)}function E(t,e){e._state===ot?j(t,e._result):e._state===it?M(t,e._result):S(e,void 0,function(e){P(t,e)},function(e){M(t,e)})}function T(t,e){if(e.constructor===t.constructor)E(t,e);else{var n=w(e);n===at?M(t,at.error):void 0===n?j(t,e):a(n)?_(t,e,n):j(t,e)}}function P(t,e){t===e?M(t,g()):i(e)?T(t,e):j(t,e)}function O(t){t._onerror&&t._onerror(t._result),A(t)}function j(t,e){t._state===rt&&(t._result=e,t._state=ot,0!==t._subscribers.length&&V(A,t))}function M(t,e){t._state===rt&&(t._state=it,t._result=e,V(O,t))}function S(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+ot]=n,o[i+it]=r,0===i&&t._state&&V(A,t)}function A(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r,o,i=t._result,a=0;a<e.length;a+=3)r=e[a],o=e[a+n],r?F(n,r,o,i):o(i);t._subscribers.length=0}}function z(){this.error=null}function x(t,e){try{return t(e)}catch(n){return ut.error=n,ut}}function F(t,e,n,r){var o,i,u,c,s=a(n);if(s){if(o=x(n,r),o===ut?(c=!0,i=o.error,o=null):u=!0,e===o)return void M(e,b())}else o=r,u=!0;e._state!==rt||(s&&u?P(e,o):c?M(e,i):t===ot?j(e,o):t===it&&M(e,o))}function L(t,e){try{e(function(e){P(t,e)},function(e){M(t,e)})}catch(n){M(t,n)}}function C(t,e){var n=this;n._instanceConstructor=t,n.promise=new t(m),n._validateInput(e)?(n._input=e,n.length=e.length,n._remaining=e.length,n._init(),0===n.length?j(n.promise,n._result):(n.length=n.length||0,n._enumerate(),0===n._remaining&&j(n.promise,n._result))):M(n.promise,n._validationError())}function R(t){return new ct(this,t).promise}function q(t){function e(t){P(o,t)}function n(t){M(o,t)}var r=this,o=new r(m);if(!G(t))return M(o,new TypeError("You must pass an array to race.")),o;for(var i=t.length,a=0;o._state===rt&&i>a;a++)S(r.resolve(t[a]),void 0,e,n);return o}function W(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(m);return P(n,t),n}function Z(t){var e=this,n=new e(m);return M(n,t),n}function I(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function D(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function $(t){this._id=ht++,this._state=void 0,this._result=void 0,this._subscribers=[],m!==t&&(a(t)||I(),this instanceof $||D(),L(this,t))}function H(){var e;if("undefined"!=typeof t)e=t;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(n){throw new Error("polyfill failed because global object is unavailable in this environment")}var r=e.Promise;(!r||"[object Promise]"!==Object.prototype.toString.call(r.resolve())||r.cast)&&(e.Promise=dt)}var N;N=Array.isArLine truncated
|
||||
Generated
Vendored
-24651
File diff suppressed because it is too large.
Load diff
Generated
Vendored
-24651
File diff suppressed because it is too large.
Load diff
Generated
Vendored
-18
@@ -1,18 +0,0 @@
|
||||
"format register";System.register("angular2/src/facade/lang",[],!0,function(e,t,r){function n(e){return e.name}function i(){B=!0}function o(){if(B)throw"Cannot enable prod mode after platform setup.";L=!1}function a(){return L}function s(e){return e}function c(){return function(e){return e}}function l(e){return void 0!==e&&null!==e}function u(e){return void 0===e||null===e}function p(e){return"string"==typeof e}function d(e){return"function"==typeof e}function f(e){return d(e)}function h(e){return"object"==typeof e&&null!==e}function g(e){return e instanceof j.Promise}function m(e){return Array.isArray(e)}function v(e){return"number"==typeof e}function y(e){return e instanceof t.Date&&!isNaN(e.valueOf())}function _(){}function b(e){if("string"==typeof e)return e;if(void 0===e||null===e)return""+e;if(e.name)return e.name;if(e.overriddenName)return e.overriddenName;var t=e.toString(),r=t.indexOf("\n");return-1===r?t:t.substring(0,r)}function C(e){return e}function w(e,t){return e}function P(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}function E(e){return e}function S(e){return u(e)?null:e}function R(e){return u(e)?!1:e}function x(e){return null!==e&&("function"==typeof e||"object"==typeof e)}function O(e){console.log(e)}function D(e,t,r){for(var n=t.split("."),i=e;n.length>1;){var o=n.shift();i=i.hasOwnProperty(o)&&l(i[o])?i[o]:i[o]={}}(void 0===i||null===i)&&(i={}),i[n.shift()]=r}function A(){if(u(Q))if(l(Symbol)&&l(Symbol.iterator))Q=Symbol.iterator;else for(var e=Object.getOwnPropertyNames(Map.prototype),t=0;t<e.length;++t){var r=e[t];"entries"!==r&&"size"!==r&&Map.prototype[r]===Map.prototype.entries&&(Q=r)}return Q}function T(e,t,r,n){var i=r+"\nreturn "+t+"\n//# sourceURL="+e,o=[],a=[];for(var s in n)o.push(s),a.push(n[s]);return(new(Function.bind.apply(Function,[void 0].concat(o.concat(i))))).apply(void 0,a)}function I(e){return!x(e)}var k=System.global,N=k.define;k.define=void 0;var V,M=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)};V="undefined"==typeof window?"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:k:window,t.IS_DART=!1;var j=V;t.global=j,t.Type=Function,t.getTypeNameForDebugging=n,t.Math=j.Math,t.Date=j.Date;var L=!0,B=!1;t.lockMode=i,t.enableProdMode=o,t.assertionsEnabled=a,j.assert=function(e){},t.CONST_EXPR=s,t.CONST=c,t.isPresent=l,t.isBlank=u,t.isString=p,t.isFunction=d,t.isType=f,t.isStringMap=h,t.isPromise=g,t.isArray=m,t.isNumber=v,t.isDate=y,t.noop=_,t.stringify=b,t.serializeEnum=C,t.deserializeEnum=w;var F=function(){function e(){}return e.fromCharCode=function(e){return String.fromCharCode(e)},e.charCodeAt=function(e,t){return e.charCodeAt(t)},e.split=function(e,t){return e.split(t)},e.equals=function(e,t){return e===t},e.stripLeft=function(e,t){if(e&&e.length){for(var r=0,n=0;n<e.length&&e[n]==t;n++)r++;e=e.substring(r)}return e},e.stripRight=function(e,t){if(e&&e.length){for(var r=e.length,n=e.length-1;n>=0&&e[n]==t;n--)r--;e=e.substring(0,r)}return e},e.replace=function(e,t,r){return e.replace(t,r)},e.replaceAll=function(e,t,r){return e.replace(t,r)},e.slice=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=null),e.slice(t,null===r?void 0:r)},e.replaceAllMapped=function(e,t,r){return e.replace(t,function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return e.splice(-2,2),r(e)})},e.contains=function(e,t){return-1!=e.indexOf(t)},e.compare=function(e,t){return t>e?-1:e>t?1:0},e}();t.StringWrapper=F;var W=function(){function e(e){void 0===e&&(e=[]),this.parts=e}return e.prototype.add=function(e){this.parts.push(e)},e.prototype.toString=function(){return this.parts.join("")},e}();t.StringJoiner=W;var U=function(e){function t(t){e.call(this),this.message=t}return M(t,e),t.prototype.toString=function(){return this.message},t}(Error);t.NumberParseError=U;var H=function(){function e(){}return e.toFixed=function(e,t){return e.toFixed(t)},e.equal=function(e,t){return e===t},e.parseIntAutoRadix=function(e){var t=parseInt(e);if(isNaN(t))throw new U("Invalid integer literal when parsing "+e);return t},e.parseInt=function(e,t){if(10==t){if(/^(\-|\+)?[0-9]+$/.test(e))return parseInt(e,t)}else if(16==t){if(/^(\-|\+)?[0-9ABCDEFabcdef]+$/.test(e))return parseInt(e,t)}else{var r=parseInt(e,t);if(!isNaN(r))return r}throw new U("Invalid integer literal when parsing "+e+" in base "+t)},e.parseFloat=function(e){return parseFloat(e)},Object.defineProperty(e,"NaN",{get:function(){return NaN},enumerable:!0,configurable:!0}),e.isNaN=function(e){return isNaN(e)},e.isInteger=function(e){return Number.isInteger(e)},e}();t.NumberWrapper=H,t.RegExp=j.RegExp;var G=function(){function e(){}return e.create=function(e,t){return void 0===t&&(t=""),t=t.replace(/g/g,""),new j.RegExp(e,t+"g")},e.firstMatch=function(e,t){return e.lastIndex=0,e.exec(t)},e.test=function(e,t){return e.lastIndex=0,eLine truncated
|
||||
if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=e("angular2/src/core/di"),c=e("angular2/src/facade/math"),l=e("angular2/src/platform/dom/dom_adapter"),u=function(){function e(){this.elapsedTimeIncludesDelay=!1,this.doesElapsedTimeIncludesDelay()}return e.prototype.doesElapsedTimeIncludesDelay=function(){var e=this,t=l.DOM.createElement("div");l.DOM.setAttribute(t,"style","position: absolute; top: -9999px; left: -9999px; width: 1px;\n height: 1px; transition: all 1ms linear 1ms;"),this.raf(function(r){l.DOM.on(t,"transitionend",function(r){var n=c.Math.round(1e3*r.elapsedTime);e.elapsedTimeIncludesDelay=2==n,l.DOM.remove(t)}),l.DOM.setStyle(t,"width","2px")},2)},e.prototype.raf=function(e,t){void 0===t&&(t=1);var r=new p(e,t);return function(){return r.cancel()}},e=o([s.Injectable(),a("design:paramtypes",[])],e)}();t.BrowserDetails=u;var p=function(){function e(e,t){this.callback=e,this.frames=t,this._raf()}return e.prototype._raf=function(){var e=this;this.currentFrameId=l.DOM.requestAnimationFrame(function(t){return e._nextFrame(t)})},e.prototype._nextFrame=function(e){this.frames--,this.frames>0?this._raf():this.callback(e)},e.prototype.cancel=function(){l.DOM.cancelAnimationFrame(this.currentFrameId),this.currentFrameId=null},e}();return n.define=i,r.exports}),System.register("angular2/src/platform/dom/dom_tokens",["angular2/src/core/di","angular2/src/facade/lang"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/core/di"),a=e("angular2/src/facade/lang");return t.DOCUMENT=a.CONST_EXPR(new o.OpaqueToken("DocumentToken")),n.define=i,r.exports}),System.register("angular2/src/facade/promise",[],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=function(){function e(){}return e.resolve=function(e){return Promise.resolve(e)},e.reject=function(e,t){return Promise.reject(e)},e.catchError=function(e,t){return e["catch"](t)},e.all=function(e){return 0==e.length?Promise.resolve([]):Promise.all(e)},e.then=function(e,t,r){return e.then(t,r)},e.wrap=function(e){return new Promise(function(t,r){try{t(e())}catch(n){r(n)}})},e.scheduleMicrotask=function(t){e.then(e.resolve(null),t,function(e){})},e.isPromise=function(e){return e instanceof Promise},e.completer=function(){var e,t,r=new Promise(function(r,n){e=r,t=n});return{promise:r,resolve:e,reject:t}},e}();return t.PromiseWrapper=o,n.define=i,r.exports}),System.register("angular2/src/core/profile/wtf_impl",["angular2/src/facade/lang"],!0,function(e,t,r){function n(){var e=d.global.wtf;return e&&(u=e.trace)?(p=u.events,!0):!1}function i(e,t){return void 0===t&&(t=null),p.createScope(e,t)}function o(e,t){return u.leaveScope(e,t),t}function a(e,t){return u.beginTimeRange(e,t)}function s(e){u.endTimeRange(e)}var c=System.global,l=c.define;c.define=void 0;var u,p,d=e("angular2/src/facade/lang");return t.detectWTF=n,t.createScope=i,t.leave=o,t.startTimeRange=a,t.endTimeRange=s,c.define=l,r.exports}),System.register("angular2/src/core/metadata/di",["angular2/src/facade/lang","angular2/src/core/di","angular2/src/core/di/metadata"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},a=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=3>o?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},s=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=e("angular2/src/facade/lang"),l=e("angular2/src/core/di"),u=e("angular2/src/core/di/metadata"),p=function(e){function t(t){e.call(this),this.attributeName=t}return o(t,e),Object.defineProperty(t.prototype,"token",{get:function(){return this},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"@Attribute("+c.stringify(this.attributeName)+")"},t=a([c.CONST(),s("design:paramtypes",[String])],t)}(u.DependencyMetadata);t.AttributeMetadata=p;var d=function(e){function t(t,r){var n=void 0===r?{}:r,i=n.descendants,o=void 0===i?!1:i,a=n.first,s=void 0===a?!1:a;e.call(this),this._selector=t,this.descendants=o,this.first=s}return o(t,e),Object.defineProperty(t.prototype,"isViewQuery",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selector",{get:function(){return l.resolveForwardRef(this._selLine truncated
|
||||
},e.prototype.visitKeyedRead=function(e){return new m(e.obj.visit(this),e.key.visit(this))},e.prototype.visitKeyedWrite=function(e){return new v(e.obj.visit(this),e.key.visit(this),e.value.visit(this))},e.prototype.visitAll=function(e){for(var t=a.ListWrapper.createFixedSize(e.length),r=0;r<e.length;++r)t[r]=e[r].visit(this);return t},e.prototype.visitChain=function(e){return new p(this.visitAll(e.expressions))},e.prototype.visitQuote=function(e){return new c(e.prefix,e.uninterpretedExpression,e.location)},e}();return t.AstTransformer=T,n.define=i,r.exports}),System.register("angular2/src/core/change_detection/parser/lexer",["angular2/src/core/di/decorators","angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/facade/exceptions"],!0,function(e,t,r){function n(e,t){return new O(e,R.Character,t,E.StringWrapper.fromCharCode(t))}function i(e,t){return new O(e,R.Identifier,0,t)}function o(e,t){return new O(e,R.Keyword,0,t)}function a(e,t){return new O(e,R.Operator,0,t)}function s(e,t){return new O(e,R.String,0,t)}function c(e,t){return new O(e,R.Number,t,"")}function l(e){return e>=t.$TAB&&e<=t.$SPACE||e==q}function u(e){return e>=M&&G>=e||e>=T&&k>=e||e==V||e==t.$$}function p(e){if(0==e.length)return!1;var r=new z(e);if(!u(r.peek))return!1;for(r.advance();r.peek!==t.$EOF;){if(!d(r.peek))return!1;r.advance()}return!0}function d(e){return e>=M&&G>=e||e>=T&&k>=e||e>=D&&A>=e||e==V||e==t.$$}function f(e){return e>=D&&A>=e}function h(e){return e==j||e==I}function g(e){return e==t.$MINUS||e==t.$PLUS}function m(e){switch(e){case B:return t.$LF;case L:return t.$FF;case F:return t.$CR;case W:return t.$TAB;case H:return t.$VTAB;default:return e}}var v=System.global,y=v.define;v.define=void 0;var _=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},b=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=3>o?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},C=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},w=e("angular2/src/core/di/decorators"),P=e("angular2/src/facade/collection"),E=e("angular2/src/facade/lang"),S=e("angular2/src/facade/exceptions");!function(e){e[e.Character=0]="Character",e[e.Identifier=1]="Identifier",e[e.Keyword=2]="Keyword",e[e.String=3]="String",e[e.Operator=4]="Operator",e[e.Number=5]="Number"}(t.TokenType||(t.TokenType={}));var R=t.TokenType,x=function(){function e(){}return e.prototype.tokenize=function(e){for(var t=new z(e),r=[],n=t.scanToken();null!=n;)r.push(n),n=t.scanToken();return r},e=b([w.Injectable(),C("design:paramtypes",[])],e)}();t.Lexer=x;var O=function(){function e(e,t,r,n){this.index=e,this.type=t,this.numValue=r,this.strValue=n}return e.prototype.isCharacter=function(e){return this.type==R.Character&&this.numValue==e},e.prototype.isNumber=function(){return this.type==R.Number},e.prototype.isString=function(){return this.type==R.String},e.prototype.isOperator=function(e){return this.type==R.Operator&&this.strValue==e},e.prototype.isIdentifier=function(){return this.type==R.Identifier},e.prototype.isKeyword=function(){return this.type==R.Keyword},e.prototype.isKeywordVar=function(){return this.type==R.Keyword&&"var"==this.strValue},e.prototype.isKeywordNull=function(){return this.type==R.Keyword&&"null"==this.strValue},e.prototype.isKeywordUndefined=function(){return this.type==R.Keyword&&"undefined"==this.strValue},e.prototype.isKeywordTrue=function(){return this.type==R.Keyword&&"true"==this.strValue},e.prototype.isKeywordFalse=function(){return this.type==R.Keyword&&"false"==this.strValue},e.prototype.toNumber=function(){return this.type==R.Number?this.numValue:-1},e.prototype.toString=function(){switch(this.type){case R.Character:case R.Identifier:case R.Keyword:case R.Operator:case R.String:return this.strValue;case R.Number:return this.numValue.toString();default:return null}},e}();t.Token=O,t.EOF=new O(-1,R.Character,0,""),t.$EOF=0,t.$TAB=9,t.$LF=10,t.$VTAB=11,t.$FF=12,t.$CR=13,t.$SPACE=32,t.$BANG=33,t.$DQ=34,t.$HASH=35,t.$$=36,t.$PERCENT=37,t.$AMPERSAND=38,t.$SQ=39,t.$LPAREN=40,t.$RPAREN=41,t.$STAR=42,t.$PLUS=43,t.$COMMA=44,t.$MINUS=45,t.$PERIOD=46,t.$SLASH=47,t.$COLON=58,t.$SEMICOLON=59,t.$LT=60,t.$EQ=61,t.$GT=62,t.$QUESTION=63;var D=48,A=57,T=65,I=69,k=90;t.$LBRACKET=91,t.$BACKSLASH=92,t.$RBRACKET=93;var N=94,V=95,M=97,j=101,L=102,B=110,F=114,W=116,U=117,H=118,G=122;t.$LBRACE=123,t.$BAR=124,t.$RBRACE=125;var q=160,K=function(e){function t(t){e.call(this),this.message=t}return _(t,e),t.prototype.toString=function(){return this.message},t}(S.BaseException);t.ScannerError=K;var z=function(){function e(eLine truncated
|
||||
var n=System.global,i=n.define;n.define=void 0;var o=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},a=e("angular2/src/core/change_detection/constants"),s=function(){function e(){}return e}();t.ChangeDetectorRef=s;var c=function(e){function t(t){e.call(this),this._cd=t}return o(t,e),t.prototype.markForCheck=function(){this._cd.markPathToRootAsCheckOnce()},t.prototype.detach=function(){this._cd.mode=a.ChangeDetectionStrategy.Detached},t.prototype.detectChanges=function(){this._cd.detectChanges()},t.prototype.checkNoChanges=function(){this._cd.checkNoChanges()},t.prototype.reattach=function(){this._cd.mode=a.ChangeDetectionStrategy.CheckAlways,this.markForCheck()},t}(s);return t.ChangeDetectorRef_=c,n.define=i,r.exports}),System.register("angular2/src/core/change_detection/observable_facade",[],!0,function(e,t,r){function n(e){return!1}var i=System.global,o=i.define;return i.define=void 0,t.isObservable=n,i.define=o,r.exports}),System.register("angular2/src/core/change_detection/proto_record",[],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0,function(e){e[e.Self=0]="Self",e[e.Const=1]="Const",e[e.PrimitiveOp=2]="PrimitiveOp",e[e.PropertyRead=3]="PropertyRead",e[e.PropertyWrite=4]="PropertyWrite",e[e.Local=5]="Local",e[e.InvokeMethod=6]="InvokeMethod",e[e.InvokeClosure=7]="InvokeClosure",e[e.KeyedRead=8]="KeyedRead",e[e.KeyedWrite=9]="KeyedWrite",e[e.Pipe=10]="Pipe",e[e.Interpolate=11]="Interpolate",e[e.SafeProperty=12]="SafeProperty",e[e.CollectionLiteral=13]="CollectionLiteral",e[e.SafeMethodInvoke=14]="SafeMethodInvoke",e[e.DirectiveLifecycle=15]="DirectiveLifecycle",e[e.Chain=16]="Chain",e[e.SkipRecordsIf=17]="SkipRecordsIf",e[e.SkipRecordsIfNot=18]="SkipRecordsIfNot",e[e.SkipRecords=19]="SkipRecords"}(t.RecordType||(t.RecordType={}));var o=t.RecordType,a=function(){function e(e,t,r,n,i,o,a,s,c,l,u,p,d,f){this.mode=e,this.name=t,this.funcOrValue=r,this.args=n,this.fixedArgs=i,this.contextIndex=o,this.directiveIndex=a,this.selfIndex=s,this.bindingRecord=c,this.lastInBinding=l,this.lastInDirective=u,this.argumentToPureFunction=p,this.referencedBySelf=d,this.propertyBindingIndex=f}return e.prototype.isPureFunction=function(){return this.mode===o.Interpolate||this.mode===o.CollectionLiteral},e.prototype.isUsedByOtherRecord=function(){return!this.lastInBinding||this.referencedBySelf},e.prototype.shouldBeChecked=function(){return this.argumentToPureFunction||this.lastInBinding||this.isPureFunction()||this.isPipeRecord()},e.prototype.isPipeRecord=function(){return this.mode===o.Pipe},e.prototype.isConditionalSkipRecord=function(){return this.mode===o.SkipRecordsIfNot||this.mode===o.SkipRecordsIf},e.prototype.isUnconditionalSkipRecord=function(){return this.mode===o.SkipRecords},e.prototype.isSkipRecord=function(){return this.isConditionalSkipRecord()||this.isUnconditionalSkipRecord()},e.prototype.isLifeCycleRecord=function(){return this.mode===o.DirectiveLifecycle},e}();return t.ProtoRecord=a,n.define=i,r.exports}),System.register("angular2/src/core/change_detection/event_binding",[],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=function(){function e(e,t,r,n){this.eventName=e,this.elIndex=t,this.dirIndex=r,this.records=n}return e}();return t.EventBinding=o,n.define=i,r.exports}),System.register("angular2/src/core/change_detection/coalesce",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/core/change_detection/proto_record"],!0,function(e,t,r){function n(e){for(var t=[],r=[],n=new h.Map,a=0,c=h.ListWrapper.createFixedSize(e.length),l=0;l<e.length;l++){var u=c[l];f.isPresent(u)&&(a--,u.fixedArgs[0]=t.length);var p=e[l],d=s(p,t,n);if(d.isSkipRecord())t.push(d),a++,c[d.fixedArgs[0]]=d;else{var g=o(d,t,r,a>0);n.set(p.selfIndex,g.selfIndex)}}return i(t)}function i(e){for(var t=[],r=h.ListWrapper.createFixedSize(e.length),n=new h.Map,i=0;i<e.length;i++){var o=r[i];f.isPresent(o)&&(o.fixedArgs[0]=t.length);var a=e[i];if(a.isSkipRecord()){if(a.isConditionalSkipRecord()&&a.fixedArgs[0]===i+2&&i<e.length-1&&e[i+1].mode===g.RecordType.SkipRecords&&(a.mode=a.mode===g.RecordType.SkipRecordsIf?g.RecordType.SkipRecordsIfNot:g.RecordType.SkipRecordsIf,a.fixedArgs[0]=e[i+1].fixedArgs[0],i++),a.fixedArgs[0]>i+1){var c=s(a,t,n);t.push(c),r[c.fixedArgs[0]]=c}}else{var c=s(a,t,n);t.push(c),n.set(a.selfIndex,c.selfIndex)}}return t}function o(e,t,r,n){var i=a(e,t,r);return f.isPresent(i)?(e.lastInBinding?(t.push(l(e,i.selfIndex,t.length+1)),i.referencedBySelf=!0):e.argumentToPureFunction&&(i.argumentToPureFunction=!0),i):(n&&r.push(e.selfIndex),t.push(e),e)}function a(e,t,r){return t.find(function(t){return-1==r.indexOf(t.selfIndex)&&t.mode!==g.RecordType.DirectiveLifecycle&&u(t,e)&&t.mode===e.mode&&f.looseIdentical(t.funcOrValue,e.funcOrValue)&&t.contextIndex===e.contextIndex&&f.looseIdentical(t.name,e.name)&&h.ListWrapper.equalLine truncated
|
||||
if(e.proto.type===y.ViewType.COMPONENT)throw new d.BaseException("Component views can't be moved!");var n=t.nestedViews;null==n&&(n=[],t.nestedViews=n),p.ListWrapper.insert(n,r,e);var i;if(r>0){var o=n[r-1];i=o.rootNodesOrAppElements.length>0?o.rootNodesOrAppElements[o.rootNodesOrAppElements.length-1]:null}else i=t.nativeElement;if(u.isPresent(i)){var a;a=i instanceof h.AppElement?i.nativeElement:i,e.renderer.attachViewAfter(a,f.flattenNestedViewRenderNodes(e.rootNodesOrAppElements))}t.parentView.changeDetector.addContentChild(e.changeDetector),t.traverseAndSetQueriesAsDirty()},t.prototype._detachViewInContainer=function(e,t){var r=p.ListWrapper.removeAt(e.nestedViews,t);if(r.proto.type===y.ViewType.COMPONENT)throw new d.BaseException("Component views can't be moved!");return e.traverseAndSetQueriesAsDirty(),r.renderer.detachView(f.flattenNestedViewRenderNodes(r.rootNodesOrAppElements)),r.changeDetector.remove(),r},t=a([l.Injectable(),c(1,l.Inject(v.APP_ID)),s("design:paramtypes",[g.RootRenderer,String])],t)}(_);return t.AppViewManager_=b,n.define=i,r.exports}),System.register("angular2/src/core/console",["angular2/src/core/di","angular2/src/facade/lang"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=3>o?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=e("angular2/src/core/di"),c=e("angular2/src/facade/lang"),l=function(){function e(){}return e.prototype.log=function(e){c.print(e)},e=o([s.Injectable(),a("design:paramtypes",[])],e)}();return t.Console=l,n.define=i,r.exports}),System.register("angular2/src/core/zone",["angular2/src/core/zone/ng_zone"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/core/zone/ng_zone");return t.NgZone=o.NgZone,t.NgZoneError=o.NgZoneError,n.define=i,r.exports}),System.register("angular2/src/core/render",["angular2/src/core/render/api"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/core/render/api");return t.RootRenderer=o.RootRenderer,t.Renderer=o.Renderer,t.RenderComponentType=o.RenderComponentType,n.define=i,r.exports}),System.register("angular2/src/core/linker/directive_resolver",["angular2/src/core/di","angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/collection","angular2/src/core/metadata","angular2/src/core/reflection/reflection"],!0,function(e,t,r){function n(e){return e instanceof d.DirectiveMetadata}var i=System.global,o=i.define;i.define=void 0;var a=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=3>o?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},s=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=e("angular2/src/core/di"),l=e("angular2/src/facade/lang"),u=e("angular2/src/facade/exceptions"),p=e("angular2/src/facade/collection"),d=e("angular2/src/core/metadata"),f=e("angular2/src/core/reflection/reflection"),h=function(){function e(){}return e.prototype.resolve=function(e){var t=f.reflector.annotations(c.resolveForwardRef(e));if(l.isPresent(t)){var r=t.find(n);if(l.isPresent(r)){var i=f.reflector.propMetadata(e);return this._mergeWithPropertyMetadata(r,i,e)}}throw new u.BaseException("No Directive annotation found on "+l.stringify(e))},e.prototype._mergeWithPropertyMetadata=function(e,t,r){var n=[],i=[],o={},a={};return p.StringMapWrapper.forEach(t,function(e,t){e.forEach(function(e){if(e instanceof d.InputMetadata&&(l.isPresent(e.bindingPropertyName)?n.push(t+": "+e.bindingPropertyName):n.push(t)),e instanceof d.OutputMetadata&&(l.isPresent(e.bindingPropertyName)?i.push(t+": "+e.bindingPropertyName):i.push(t)),e instanceof d.HostBindingMetadata&&(l.isPresent(e.hostPropertyName)?o["["+e.hostPropertyName+"]"]=t:o["["+t+"]"]=t),e instanceof d.HostListenerMetadata){var r=l.isPresent(e.args)?e.args.join(", "):"";o["("+e.eventName+")"]=t+"("+r+")"}e instanceof d.ContentChildrenMetadata&&(a[t]=e),e instanceof d.ViewChildrenMetadata&&(a[t]=e),e instanceof d.ContentChildMetadata&&(a[t]=e),e instanceof d.ViewChildMetadata&&(a[t]=e)})}),this._merge(e,n,i,o,a,r)},e.prototype._merge=function(e,t,r,n,i,o){var a,s=l.isPresent(e.inputs)?p.ListWrapper.concat(e.inputs,t):t;l.isPresent(e.outputs)?(e.outputs.forEach(function(e){if(p.ListWrapper.contains(r,e))throw new u.BaseException("Output evLine truncated
|
||||
return e!=t},e.operation_identical=function(e,t){return e===t},e.operation_not_identical=function(e,t){return e!==t},e.operation_less_then=function(e,t){return t>e},e.operation_greater_then=function(e,t){return e>t},e.operation_less_or_equals_then=function(e,t){return t>=e},e.operation_greater_or_equals_then=function(e,t){return e>=t},e.cond=function(e,t,r){return e?t:r},e.mapFn=function(e){function t(t){for(var r=c.StringMapWrapper.create(),n=0;n<e.length;++n)c.StringMapWrapper.set(r,e[n],t[n]);return r}switch(e.length){case 0:return function(){return[]};case 1:return function(e){return t([e])};case 2:return function(e,r){return t([e,r])};case 3:return function(e,r,n){return t([e,r,n])};case 4:return function(e,r,n,i){return t([e,r,n,i])};case 5:return function(e,r,n,i,o){return t([e,r,n,i,o])};case 6:return function(e,r,n,i,o,a){return t([e,r,n,i,o,a])};case 7:return function(e,r,n,i,o,a,s){return t([e,r,n,i,o,a,s])};case 8:return function(e,r,n,i,o,a,s,c){return t([e,r,n,i,o,a,s,c])};case 9:return function(e,r,n,i,o,a,s,c,l){return t([e,r,n,i,o,a,s,c,l])};default:throw new s.BaseException("Does not support literal maps with more than 9 elements")}},e.keyedAccess=function(e,t){return e[t[0]]},e.unwrapValue=function(e){return e instanceof f?e.wrapped:e},e.changeDetectionMode=function(e){return l.isDefaultChangeDetectionStrategy(e)?l.ChangeDetectionStrategy.CheckAlways:l.ChangeDetectionStrategy.CheckOnce},e.simpleChange=function(e,t){return n(e,t)},e.isValueBlank=function(e){return a.isBlank(e)},e.s=function(e){return a.isPresent(e)?""+e:""},e.protoByIndex=function(e,t){return 1>t?null:e[t-1]},e.callPipeOnDestroy=function(e){u.implementsOnDestroy(e.pipe)&&e.pipe.ngOnDestroy()},e.bindingTarget=function(e,t,r,n,i){return new p.BindingTarget(e,t,r,n,i)},e.directiveIndex=function(e,t){return new d.DirectiveIndex(e,t)},e.looseNotIdentical=function(e,t){return!a.looseIdentical(e,t)},e.devModeEqual=function(t,r){return c.isListLikeIterable(t)&&c.isListLikeIterable(r)?c.areIterablesEqual(t,r,e.devModeEqual):c.isListLikeIterable(t)||a.isPrimitive(t)||c.isListLikeIterable(r)||a.isPrimitive(r)?a.looseIdentical(t,r):!0},e.uninitialized=a.CONST_EXPR(new Object),e}();return t.ChangeDetectionUtil=_,i.define=o,r.exports}),System.register("angular2/src/core/change_detection/abstract_change_detector",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/core/change_detection/change_detection_util","angular2/src/core/change_detection/change_detector_ref","angular2/src/core/change_detection/exceptions","angular2/src/core/change_detection/parser/locals","angular2/src/core/change_detection/constants","angular2/src/core/profile/profile","angular2/src/core/change_detection/observable_facade","angular2/src/facade/async"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/facade/lang"),a=e("angular2/src/facade/collection"),s=e("angular2/src/core/change_detection/change_detection_util"),c=e("angular2/src/core/change_detection/change_detector_ref"),l=e("angular2/src/core/change_detection/exceptions"),u=e("angular2/src/core/change_detection/parser/locals"),p=e("angular2/src/core/change_detection/constants"),d=e("angular2/src/core/profile/profile"),f=e("angular2/src/core/change_detection/observable_facade"),h=e("angular2/src/facade/async"),g=d.wtfCreateScope("ChangeDetector#check(ascii id, bool throwOnChange)"),m=function(){function e(e,t,r,n,i,o){this.element=e,this.componentElement=t,this.context=r,this.locals=n,this.injector=i,this.expression=o}return e}(),v=function(){function e(e,t,r,n,i){this.id=e,this.numberOfPropertyProtoRecords=t,this.bindingTargets=r,this.directiveIndices=n,this.strategy=i,this.contentChildren=[],this.viewChildren=[],this.state=p.ChangeDetectorState.NeverChecked,this.locals=null,this.mode=null,this.pipes=null,this.ref=new c.ChangeDetectorRef_(this)}return e.prototype.addContentChild=function(e){this.contentChildren.push(e),e.parent=this},e.prototype.removeContentChild=function(e){a.ListWrapper.remove(this.contentChildren,e)},e.prototype.addViewChild=function(e){this.viewChildren.push(e),e.parent=this},e.prototype.removeViewChild=function(e){a.ListWrapper.remove(this.viewChildren,e)},e.prototype.remove=function(){this.parent.removeContentChild(this)},e.prototype.handleEvent=function(e,t,r){this.hydrated()||this.throwDehydratedError();try{var n=new Map;n.set("$event",r);var i=!this.handleEventInternal(e,t,new u.Locals(this.locals,n));return this.markPathToRootAsCheckOnce(),i}catch(a){var s=this.dispatcher.getDebugContext(null,t,null),c=o.isPresent(s)?new l.EventEvaluationErrorContext(s.element,s.componentElement,s.context,s.locals,s.injector):null;throw new l.EventEvaluationError(e,a,a.stack,c)}},e.prototype.handleEventInternal=function(e,t,r){return!1},e.prototype.detectChanges=function(){this.runDetectChanges(!1)},e.prototype.checkNoChanges=function(){o.assertionsEnabled()&&this.runDetectChanges(!0)},e.prototype.runDetectChanges=function(e){if(this.modLine truncated
|
||||
t.push(r.obj2)),c.isPresent(n.provider3)&&n.provider3.key.token===e.selector&&(r.obj3===f.UNDEFINED&&(r.obj3=r.instantiateProvider(n.provider3,n.visibility3)),t.push(r.obj3)),c.isPresent(n.provider4)&&n.provider4.key.token===e.selector&&(r.obj4===f.UNDEFINED&&(r.obj4=r.instantiateProvider(n.provider4,n.visibility4)),t.push(r.obj4)),c.isPresent(n.provider5)&&n.provider5.key.token===e.selector&&(r.obj5===f.UNDEFINED&&(r.obj5=r.instantiateProvider(n.provider5,n.visibility5)),t.push(r.obj5)),c.isPresent(n.provider6)&&n.provider6.key.token===e.selector&&(r.obj6===f.UNDEFINED&&(r.obj6=r.instantiateProvider(n.provider6,n.visibility6)),t.push(r.obj6)),c.isPresent(n.provider7)&&n.provider7.key.token===e.selector&&(r.obj7===f.UNDEFINED&&(r.obj7=r.instantiateProvider(n.provider7,n.visibility7)),t.push(r.obj7)),c.isPresent(n.provider8)&&n.provider8.key.token===e.selector&&(r.obj8===f.UNDEFINED&&(r.obj8=r.instantiateProvider(n.provider8,n.visibility8)),t.push(r.obj8)),c.isPresent(n.provider9)&&n.provider9.key.token===e.selector&&(r.obj9===f.UNDEFINED&&(r.obj9=r.instantiateProvider(n.provider9,n.visibility9)),t.push(r.obj9))},e}(),W=function(){function e(e,t){this.injectorStrategy=e,this._ei=t}return e.prototype.init=function(){var e=this.injectorStrategy,t=e.protoStrategy;e.resetConstructionCounter();for(var r=0;r<t.keyIds.length;r++)t.providers[r]instanceof A&&c.isPresent(t.keyIds[r])&&e.objs[r]===f.UNDEFINED&&(e.objs[r]=e.instantiateProvider(t.providers[r],t.visibilities[r]))},e.prototype.getComponent=function(){return this.injectorStrategy.objs[0]},e.prototype.isComponentKey=function(e){var t=this.injectorStrategy.protoStrategy;return this._ei.proto.firstProviderIsComponent&&c.isPresent(e)&&e.id===t.keyIds[0]},e.prototype.addDirectivesMatchingQuery=function(e,t){for(var r=this.injectorStrategy,n=r.protoStrategy,i=0;i<n.providers.length;i++)n.providers[i].key.token===e.selector&&(r.objs[i]===f.UNDEFINED&&(r.objs[i]=r.instantiateProvider(n.providers[i],n.visibilities[i])),t.push(r.objs[i]))},e}(),U=function(){function e(e,t,r){this.dirIndex=e,this.setter=t,this.query=r}return Object.defineProperty(e.prototype,"usesPropertySyntax",{get:function(){return c.isPresent(this.setter)},enumerable:!0,configurable:!0}),e}();t.ProtoQueryRef=U;var H=function(){function e(e,t){this.protoQueryRef=e,this.originator=t,this.list=new E.QueryList,this.dirty=!0}return Object.defineProperty(e.prototype,"isViewQuery",{get:function(){return this.protoQueryRef.query.isViewQuery},enumerable:!0,configurable:!0}),e.prototype.update=function(){if(this.dirty){if(this._update(),this.dirty=!1,this.protoQueryRef.usesPropertySyntax){var e=this.originator.getDirectiveAtIndex(this.protoQueryRef.dirIndex);this.protoQueryRef.query.first?this.protoQueryRef.setter(e,this.list.length>0?this.list.first:null):this.protoQueryRef.setter(e,this.list)}this.list.notifyOnChanges()}},e.prototype._update=function(){var e=[];if(this.protoQueryRef.query.isViewQuery){var t=this.originator.componentView;c.isPresent(t)&&this._visitView(t,e)}else this._visit(this.originator,e);this.list.reset(e)},e.prototype._visit=function(e,t){for(var r=e.parentView,n=e.proto.index,i=n;i<r.appElements.length;i++){var o=r.appElements[i];if(i>n&&(c.isBlank(o.parent)||o.parent.proto.index<n))break;(this.protoQueryRef.query.descendants||o.parent==this.originator||o==this.originator)&&(this._visitInjector(o,t),this._visitViewContainerViews(o.nestedViews,t))}},e.prototype._visitInjector=function(e,t){this.protoQueryRef.query.isVarBindingQuery?this._aggregateVariableBinding(e,t):this._aggregateDirective(e,t)},e.prototype._visitViewContainerViews=function(e,t){if(c.isPresent(e))for(var r=0;r<e.length;r++)this._visitView(e[r],t)},e.prototype._visitView=function(e,t){for(var r=0;r<e.appElements.length;r++){var n=e.appElements[r];this._visitInjector(n,t),this._visitViewContainerViews(n.nestedViews,t)}},e.prototype._aggregateVariableBinding=function(e,t){for(var r=this.protoQueryRef.query.varBindings,n=0;n<r.length;++n)e.hasVariableBinding(r[n])&&t.push(e.getVariableBinding(r[n]))},e.prototype._aggregateDirective=function(e,t){e.addDirectivesMatchingQuery(this.protoQueryRef.query,t)},e}();t.QueryRef=H;var G=function(e){function t(t){e.call(this),this._appElement=t}return s(t,e),t.prototype.markForCheck=function(){this._appElement.componentView.changeDetector.ref.markForCheck()},t.prototype.detach=function(){this._appElement.componentView.changeDetector.ref.detach()},t.prototype.detectChanges=function(){this._appElement.componentView.changeDetector.ref.detectChanges()},t.prototype.checkNoChanges=function(){this._appElement.componentView.changeDetector.ref.checkNoChanges()},t.prototype.reattach=function(){this._appElement.componentView.changeDetector.ref.reattach()},t}(P.ChangeDetectorRef);return i.define=o,r.exports}),System.register("angular2/src/core/pipes/pipes",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/collection","angular2/src/core/change_detection/pipes"]Line truncated
|
||||
},e.prototype._genPropertyBindingTargets=function(){var e=this._logic.genPropertyBindingTargets(this.propertyBindingTargets,this.genConfig.genDebugInfo);return this.typeName+".gen_propertyBindingTargets = "+e+";"},e.prototype._genDirectiveIndices=function(){var e=this._logic.genDirectiveIndices(this.directiveRecords);return this.typeName+".gen_directiveIndices = "+e+";"},e.prototype._maybeGenHandleEventInternal=function(){var e=this;if(this.eventBindings.length>0){var t=this.eventBindings.map(function(t){return e._genEventBinding(t)}).join("\n");return"\n "+this.typeName+".prototype.handleEventInternal = function(eventName, elIndex, locals) {\n var "+this._names.getPreventDefaultAccesor()+" = false;\n "+this._names.genInitEventLocals()+"\n "+t+"\n return "+this._names.getPreventDefaultAccesor()+";\n }\n "}return""},e.prototype._genEventBinding=function(e){var t=this,r=[];return this._endOfBlockIdxs=[],s.ListWrapper.forEachWithIndex(e.records,function(n,i){var o;o=n.isConditionalSkipRecord()?t._genConditionalSkip(n,t._names.getEventLocalName(e,i)):n.isUnconditionalSkipRecord()?t._genUnconditionalSkip(n):t._genEventBindingEval(e,n),o+=t._genEndOfSkipBlock(i),r.push(o)}),'\n if (eventName === "'+e.eventName+'" && elIndex === '+e.elIndex+") {\n "+r.join("\n")+"\n }"},e.prototype._genEventBindingEval=function(e,t){if(t.lastInBinding){var r=this._logic.genEventBindingEvalValue(e,t),n=this._genMarkPathToRootAsCheckOnce(t),i=this._genUpdatePreventDefault(e,t);return r+"\n"+n+"\n"+i}return this._logic.genEventBindingEvalValue(e,t)},e.prototype._genMarkPathToRootAsCheckOnce=function(e){var t=e.bindingRecord;return t.isDefaultChangeDetection()?"":this._names.getDetectorName(t.directiveRecord.directiveIndex)+".markPathToRootAsCheckOnce();"},e.prototype._genUpdatePreventDefault=function(e,t){var r=this._names.getEventLocalName(e,t.selfIndex);return"if ("+r+" === false) { "+this._names.getPreventDefaultAccesor()+" = true};"},e.prototype._maybeGenDehydrateDirectives=function(){var e=this._names.genPipeOnDestroy(),t=this._logic.genDirectivesOnDestroy(this.directiveRecords),r=this._names.genDehydrateFields();return e||t||r?this.typeName+".prototype.dehydrateDirectives = function(destroyPipes) {\n if (destroyPipes) {\n "+e+"\n "+t+"\n }\n "+r+"\n }":""},e.prototype._maybeGenHydrateDirectives=function(){var e=this._logic.genHydrateDirectives(this.directiveRecords),t=this._logic.genHydrateDetectors(this.directiveRecords);return e||t?this.typeName+".prototype.hydrateDirectives = function(directives) {\n "+e+"\n "+t+"\n }":""},e.prototype._maybeGenAfterContentLifecycleCallbacks=function(){var e=this._logic.genContentLifecycleCallbacks(this.directiveRecords);if(e.length>0){var t=e.join("\n");return"\n "+this.typeName+".prototype.afterContentLifecycleCallbacksInternal = function() {\n "+t+"\n }\n "}return""},e.prototype._maybeGenAfterViewLifecycleCallbacks=function(){var e=this._logic.genViewLifecycleCallbacks(this.directiveRecords);if(e.length>0){var t=e.join("\n");return"\n "+this.typeName+".prototype.afterViewLifecycleCallbacksInternal = function() {\n "+t+"\n }\n "}return""},e.prototype._genAllRecords=function(e){var t=[];this._endOfBlockIdxs=[];for(var r=0;r<e.length;r++){var n=void 0,i=e[r];n=i.isLifeCycleRecord()?this._genDirectiveLifecycle(i):i.isPipeRecord()?this._genPipeCheck(i):i.isConditionalSkipRecord()?this._genConditionalSkip(i,this._names.getLocalName(i.contextIndex)):i.isUnconditionalSkipRecord()?this._genUnconditionalSkip(i):this._genReferenceCheck(i),n="\n "+this._maybeFirstInBinding(i)+"\n "+n+"\n "+this._maybeGenLastInDirective(i)+"\n "+this._genEndOfSkipBlock(r)+"\n ",t.push(n)}return t.join("\n")},e.prototype._genConditionalSkip=function(e,t){var r=e.mode===u.RecordType.SkipRecordsIf?"!":"";return this._endOfBlockIdxs.push(e.fixedArgs[0]-1),"if ("+r+t+") {"},e.prototype._genUnconditionalSkip=function(e){return this._endOfBlockIdxs.pop(),this._endOfBlockIdxs.push(e.fixedArgs[0]-1),"} else {"},e.prototype._genEndOfSkipBlock=function(e){if(!s.ListWrapper.isEmpty(this._endOfBlockIdxs)){var t=s.ListWrapper.last(this._endOfBlockIdxs);if(e===t)return this._endOfBlockIdxs.pop(),"}"}return""},e.prototype._genDirectiveLifecycle=function(e){if("DoCheck"===e.name)return this._genOnCheck(e);if("OnInit"===e.name)return this._genOnInit(e);if("OnChanges"===e.name)return this._genOnChange(e);throw new a.BaseException("Unknown lifecycle event '"+e.name+"'")},e.prototype._genPipeCheck=function(e){var t=this,r=this._names.getLocalName(e.contextIndex),n=e.args.map(function(e){return t._names.getLocalName(e)}).join(", "),i=this._names.getFieldName(e.selfIndex),o=this._names.getLocalName(e.selfIndex),a=this._names.getPipeName(e.selfIndex),s=e.name,c="\n if ("+a+" === "+this.changeDetectionUtilVarName+".uninitialized) {Line truncated
|
||||
return o>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=e("angular2/src/core/di"),c=e("angular2/src/animate/css_animation_builder"),l=e("angular2/src/animate/browser_details"),u=function(){function e(e){this.browserDetails=e}return e.prototype.css=function(){return new c.CssAnimationBuilder(this.browserDetails)},e=o([s.Injectable(),a("design:paramtypes",[l.BrowserDetails])],e)}();return t.AnimationBuilder=u,n.define=i,r.exports}),System.register("angular2/src/core/change_detection/proto_change_detector",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/collection","angular2/src/core/change_detection/parser/ast","angular2/src/core/change_detection/change_detection_util","angular2/src/core/change_detection/dynamic_change_detector","angular2/src/core/change_detection/directive_record","angular2/src/core/change_detection/event_binding","angular2/src/core/change_detection/coalesce","angular2/src/core/change_detection/proto_record"],!0,function(e,t,r){function n(e){var t=new E;return g.ListWrapper.forEachWithIndex(e.bindingRecords,function(r,n){return t.add(r,e.variableNames,n)}),C.coalesce(t.records)}function i(e){var t=g.ListWrapper.concat(["$event"],e.variableNames);return e.eventRecords.map(function(e){var r=S.create(e,t),n=e.implicitReceiver instanceof _.DirectiveIndex?e.implicitReceiver:null;return new b.EventBinding(e.target.name,e.target.elementIndex,n,r)})}function o(e){switch(e){case 0:return v.ChangeDetectionUtil.arrayFn0;case 1:return v.ChangeDetectionUtil.arrayFn1;case 2:return v.ChangeDetectionUtil.arrayFn2;case 3:return v.ChangeDetectionUtil.arrayFn3;case 4:return v.ChangeDetectionUtil.arrayFn4;case 5:return v.ChangeDetectionUtil.arrayFn5;case 6:return v.ChangeDetectionUtil.arrayFn6;case 7:return v.ChangeDetectionUtil.arrayFn7;case 8:return v.ChangeDetectionUtil.arrayFn8;case 9:return v.ChangeDetectionUtil.arrayFn9;default:throw new h.BaseException("Does not support literal maps with more than 9 elements")}}function a(e){var t=e.map(function(e){return f.isString(e)?'"'+e+'"':""+e}).join(", ");return"mapFn(["+t+"])"}function s(e){switch(e){case"+":return"operation_add";case"-":return"operation_subtract";case"*":return"operation_multiply";case"/":return"operation_divide";case"%":return"operation_remainder";case"==":return"operation_equals";case"!=":return"operation_not_equals";case"===":return"operation_identical";case"!==":return"operation_not_identical";case"<":return"operation_less_then";case">":return"operation_greater_then";case"<=":return"operation_less_or_equals_then";case">=":return"operation_greater_or_equals_then";default:throw new h.BaseException("Unsupported operation "+e)}}function c(e){switch(e){case"+":return v.ChangeDetectionUtil.operation_add;case"-":return v.ChangeDetectionUtil.operation_subtract;case"*":return v.ChangeDetectionUtil.operation_multiply;case"/":return v.ChangeDetectionUtil.operation_divide;case"%":return v.ChangeDetectionUtil.operation_remainder;case"==":return v.ChangeDetectionUtil.operation_equals;case"!=":return v.ChangeDetectionUtil.operation_not_equals;case"===":return v.ChangeDetectionUtil.operation_identical;case"!==":return v.ChangeDetectionUtil.operation_not_identical;case"<":return v.ChangeDetectionUtil.operation_less_then;case">":return v.ChangeDetectionUtil.operation_greater_then;case"<=":return v.ChangeDetectionUtil.operation_less_or_equals_then;case">=":return v.ChangeDetectionUtil.operation_greater_or_equals_then;default:throw new h.BaseException("Unsupported operation "+e)}}function l(e){return f.isPresent(e)?""+e:""}function u(e){var t=e.length,r=t>0?e[0]:null,n=t>1?e[1]:null,i=t>2?e[2]:null,o=t>3?e[3]:null,a=t>4?e[4]:null,s=t>5?e[5]:null,c=t>6?e[6]:null,u=t>7?e[7]:null,p=t>8?e[8]:null,d=t>9?e[9]:null;switch(t-1){case 1:return function(e){return r+l(e)+n};case 2:return function(e,t){return r+l(e)+n+l(t)+i};case 3:return function(e,t,a){return r+l(e)+n+l(t)+i+l(a)+o};case 4:return function(e,t,s,c){return r+l(e)+n+l(t)+i+l(s)+o+l(c)+a};case 5:return function(e,t,c,u,p){return r+l(e)+n+l(t)+i+l(c)+o+l(u)+a+l(p)+s};case 6:return function(e,t,u,p,d,f){return r+l(e)+n+l(t)+i+l(u)+o+l(p)+a+l(d)+s+l(f)+c};case 7:return function(e,t,p,d,f,h,g){return r+l(e)+n+l(t)+i+l(p)+o+l(d)+a+l(f)+s+l(h)+c+l(g)+u};case 8:return function(e,t,d,f,h,g,m,v){return r+l(e)+n+l(t)+i+l(d)+o+l(f)+a+l(h)+s+l(g)+c+l(m)+u+l(v)+p};case 9:return function(e,t,f,h,g,m,v,y,_){return r+l(e)+n+l(t)+i+l(f)+o+l(h)+a+l(g)+s+l(m)+c+l(v)+u+l(y)+p+l(_)+d};default:throw new h.BaseException("Does not support more than 9 expressions")}}var p=System.global,d=p.define;p.define=void 0;var f=e("angular2/src/facade/lang"),h=e("angular2/src/facade/exceptions"),g=e("angular2/src/facade/collection"),m=e("angular2/src/core/change_detection/parser/ast"),v=e("angular2/src/core/change_detection/change_detection_util"),y=e("angular2/src/core/change_detLine truncated
|
||||
get:function(){return this._rootComponentTypes},enumerable:!0,configurable:!0}),t._tickScope=P.wtfCreateScope("ApplicationRef#tick()"),t}(D);return t.ApplicationRef_=A,u.define=p,r.exports}),System.register("angular2/src/facade/async",["angular2/src/facade/lang","angular2/src/facade/promise","rxjs/Subject","rxjs/observable/fromPromise","rxjs/operator/toPromise","rxjs/Observable","rxjs/Subject"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},a=e("angular2/src/facade/lang"),s=e("angular2/src/facade/promise");t.PromiseWrapper=s.PromiseWrapper,t.Promise=s.Promise;var c=e("rxjs/Subject"),l=e("rxjs/observable/fromPromise"),u=e("rxjs/operator/toPromise"),p=e("rxjs/Observable");t.Observable=p.Observable;var d=e("rxjs/Subject");t.Subject=d.Subject;var f=function(){function e(){}return e.setTimeout=function(e,t){return a.global.setTimeout(e,t)},e.clearTimeout=function(e){a.global.clearTimeout(e)},e.setInterval=function(e,t){return a.global.setInterval(e,t)},e.clearInterval=function(e){a.global.clearInterval(e)},e}();t.TimerWrapper=f;var h=function(){function e(){}return e.subscribe=function(e,t,r,n){return void 0===n&&(n=function(){}),r="function"==typeof r&&r||a.noop,n="function"==typeof n&&n||a.noop,e.subscribe({next:t,error:r,complete:n})},e.isObservable=function(e){return!!e.subscribe},e.hasSubscribers=function(e){return e.observers.length>0},e.dispose=function(e){e.unsubscribe()},e.callNext=function(e,t){e.next(t)},e.callEmit=function(e,t){e.emit(t)},e.callError=function(e,t){e.error(t)},e.callComplete=function(e){e.complete()},e.fromPromise=function(e){return l.PromiseObservable.create(e)},e.toPromise=function(e){return u.toPromise.call(e)},e}();t.ObservableWrapper=h;var g=function(e){function t(t){void 0===t&&(t=!0),e.call(this),this._isAsync=t}return o(t,e),t.prototype.emit=function(t){e.prototype.next.call(this,t)},t.prototype.next=function(t){e.prototype.next.call(this,t)},t.prototype.subscribe=function(t,r,n){var i,o=function(e){return null},a=function(){return null};return t&&"object"==typeof t?(i=this._isAsync?function(e){setTimeout(function(){return t.next(e)})}:function(e){t.next(e)},t.error&&(o=this._isAsync?function(e){setTimeout(function(){return t.error(e)})}:function(e){t.error(e)}),t.complete&&(a=this._isAsync?function(){setTimeout(function(){return t.complete()})}:function(){t.complete()})):(i=this._isAsync?function(e){setTimeout(function(){return t(e)})}:function(e){t(e)},r&&(o=this._isAsync?function(e){setTimeout(function(){return r(e)})}:function(e){r(e)}),n&&(a=this._isAsync?function(){setTimeout(function(){return n()})}:function(){n()})),e.prototype.subscribe.call(this,i,o,a)},t}(c.Subject);return t.EventEmitter=g,n.define=i,r.exports}),System.register("angular2/src/core/metadata/directives",["angular2/src/facade/lang","angular2/src/core/di/metadata","angular2/src/core/change_detection"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},a=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=3>o?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},s=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=e("angular2/src/facade/lang"),l=e("angular2/src/core/di/metadata"),u=e("angular2/src/core/change_detection"),p=function(e){function t(t){var r=void 0===t?{}:t,n=r.selector,i=r.inputs,o=r.outputs,a=r.properties,s=r.events,c=r.host,l=r.bindings,u=r.providers,p=r.exportAs,d=r.queries;e.call(this),this.selector=n,this._inputs=i,this._properties=a,this._outputs=o,this._events=s,this.host=c,this.exportAs=p,this.queries=d,this._providers=u,this._bindings=l}return o(t,e),Object.defineProperty(t.prototype,"inputs",{get:function(){return c.isPresent(this._properties)&&this._properties.length>0?this._properties:this._inputs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"properties",{get:function(){return this.inputs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"outputs",{get:function(){return c.isPresent(this._events)&&this._events.length>0?this._events:this._outputs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"events",{get:function(){return this.outputs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"providers",{get:function(){return c.isPresent(this._bindings)&&this._bindings.length>0?this.Line truncated
|
||||
n.define=void 0;var o=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=3>o?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=e("angular2/src/facade/lang"),c=e("angular2/core"),l=function(){function e(){}return e.prototype.transform=function(e,t){return void 0===t&&(t=null),s.Json.stringify(e)},e=o([s.CONST(),c.Pipe({name:"json",pure:!1}),c.Injectable(),a("design:paramtypes",[])],e)}();return t.JsonPipe=l,n.define=i,r.exports}),System.register("angular2/src/common/pipes/slice_pipe",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/collection","angular2/core","angular2/src/common/pipes/invalid_pipe_argument_exception"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=3>o?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=e("angular2/src/facade/lang"),c=e("angular2/src/facade/exceptions"),l=e("angular2/src/facade/collection"),u=e("angular2/core"),p=e("angular2/src/common/pipes/invalid_pipe_argument_exception"),d=function(){function e(){}return e.prototype.transform=function(t,r){if(void 0===r&&(r=null),s.isBlank(r)||0==r.length)throw new c.BaseException("Slice pipe requires one argument");if(!this.supports(t))throw new p.InvalidPipeArgumentException(e,t);if(s.isBlank(t))return t;var n=r[0],i=r.length>1?r[1]:null;return s.isString(t)?s.StringWrapper.slice(t,n,i):l.ListWrapper.slice(t,n,i)},e.prototype.supports=function(e){return s.isString(e)||s.isArray(e)},e=o([u.Pipe({name:"slice",pure:!1}),u.Injectable(),a("design:paramtypes",[])],e)}();return t.SlicePipe=d,n.define=i,r.exports}),System.register("angular2/src/facade/intl",[],!0,function(e,t,r){function n(e){return 2==e?"2-digit":"numeric"}function i(e){return 4>e?"short":"long"}function o(e){for(var t,r={},o=0;o<e.length;){for(t=o;t<e.length&&e[t]==e[o];)t++;var a=t-o;switch(e[o]){case"G":r.era=i(a);break;case"y":r.year=n(a);break;case"M":a>=3?r.month=i(a):r.month=n(a);break;case"d":r.day=n(a);break;case"E":r.weekday=i(a);break;case"j":r.hour=n(a);break;case"h":r.hour=n(a),r.hour12=!0;break;case"H":r.hour=n(a),r.hour12=!1;break;case"m":r.minute=n(a);break;case"s":r.second=n(a);break;case"z":r.timeZoneName="long";break;case"Z":r.timeZoneName="short"}o=t}return r}var a=System.global,s=a.define;a.define=void 0,function(e){e[e.Decimal=0]="Decimal",e[e.Percent=1]="Percent",e[e.Currency=2]="Currency"}(t.NumberFormatStyle||(t.NumberFormatStyle={}));var c=t.NumberFormatStyle,l=function(){function e(){}return e.format=function(e,t,r,n){var i=void 0===n?{}:n,o=i.minimumIntegerDigits,a=void 0===o?1:o,s=i.minimumFractionDigits,l=void 0===s?0:s,u=i.maximumFractionDigits,p=void 0===u?3:u,d=i.currency,f=i.currencyAsSymbol,h=void 0===f?!1:f,g={minimumIntegerDigits:a,minimumFractionDigits:l,maximumFractionDigits:p};return g.style=c[r].toLowerCase(),r==c.Currency&&(g.currency=d,g.currencyDisplay=h?"symbol":"code"),new Intl.NumberFormat(t,g).format(e)},e}();t.NumberFormatter=l;var u=new Map,p=function(){function e(){}return e.format=function(e,t,r){var n=t+r;if(u.has(n))return u.get(n).format(e);var i=new Intl.DateTimeFormat(t,o(r));return u.set(n,i),i.format(e)},e}();return t.DateFormatter=p,a.define=s,r.exports}),System.register("angular2/src/common/pipes/number_pipe",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/intl","angular2/core","angular2/src/facade/collection","angular2/src/common/pipes/invalid_pipe_argument_exception"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},a=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=3>o?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},s=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=e("angular2/src/facade/langLine truncated
|
||||
new r)},a=e("angular2/src/common/forms/directives/abstract_control_directive"),s=e("angular2/src/facade/exceptions"),c=function(e){function t(){e.apply(this,arguments),this.name=null,this.valueAccessor=null}return o(t,e),Object.defineProperty(t.prototype,"validator",{get:function(){return s.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"asyncValidator",{get:function(){return s.unimplemented()},enumerable:!0,configurable:!0}),t}(a.AbstractControlDirective);return t.NgControl=c,n.define=i,r.exports}),System.register("angular2/src/common/forms/directives/control_value_accessor",["angular2/core","angular2/src/facade/lang"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/core"),a=e("angular2/src/facade/lang");return t.NG_VALUE_ACCESSOR=a.CONST_EXPR(new o.OpaqueToken("NgValueAccessor")),n.define=i,r.exports}),System.register("angular2/src/common/forms/validators",["angular2/src/facade/lang","angular2/src/facade/promise","angular2/src/facade/async","angular2/src/facade/collection","angular2/core"],!0,function(e,t,r){function n(e){return l.PromiseWrapper.isPromise(e)?e:u.ObservableWrapper.toPromise(e)}function i(e,t){return t.map(function(t){return t(e)})}function o(e){var t=e.reduce(function(e,t){return c.isPresent(t)?p.StringMapWrapper.merge(e,t):e},{});return p.StringMapWrapper.isEmpty(t)?null:t}var a=System.global,s=a.define;a.define=void 0;var c=e("angular2/src/facade/lang"),l=e("angular2/src/facade/promise"),u=e("angular2/src/facade/async"),p=e("angular2/src/facade/collection"),d=e("angular2/core");t.NG_VALIDATORS=c.CONST_EXPR(new d.OpaqueToken("NgValidators")),t.NG_ASYNC_VALIDATORS=c.CONST_EXPR(new d.OpaqueToken("NgAsyncValidators"));var f=function(){function e(){}return e.required=function(e){return c.isBlank(e.value)||""==e.value?{required:!0}:null},e.minLength=function(t){return function(r){if(c.isPresent(e.required(r)))return null;var n=r.value;return n.length<t?{minlength:{requiredLength:t,actualLength:n.length}}:null}},e.maxLength=function(t){return function(r){if(c.isPresent(e.required(r)))return null;var n=r.value;return n.length>t?{maxlength:{requiredLength:t,actualLength:n.length}}:null}},e.nullValidator=function(e){return null},e.compose=function(e){if(c.isBlank(e))return null;var t=e.filter(c.isPresent);return 0==t.length?null:function(e){return o(i(e,t))}},e.composeAsync=function(e){if(c.isBlank(e))return null;var t=e.filter(c.isPresent);return 0==t.length?null:function(e){var r=i(e,t).map(n);return l.PromiseWrapper.all(r).then(o)}},e}();return t.Validators=f,a.define=s,r.exports}),System.register("angular2/src/common/forms/directives/default_value_accessor",["angular2/core","angular2/src/common/forms/directives/control_value_accessor","angular2/src/facade/lang"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=3>o?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=e("angular2/core"),c=e("angular2/src/common/forms/directives/control_value_accessor"),l=e("angular2/src/facade/lang"),u=l.CONST_EXPR(new s.Provider(c.NG_VALUE_ACCESSOR,{useExisting:s.forwardRef(function(){return p}),multi:!0})),p=function(){function e(e,t){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){}}return e.prototype.writeValue=function(e){var t=l.isBlank(e)?"":e;this._renderer.setElementProperty(this._elementRef.nativeElement,"value",t)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e=o([s.Directive({selector:"input:not([type=checkbox])[ngControl],textarea[ngControl],input:not([type=checkbox])[ngFormControl],textarea[ngFormControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]",host:{"(input)":"onChange($event.target.value)","(blur)":"onTouched()"},bindings:[u]}),a("design:paramtypes",[s.Renderer,s.ElementRef])],e)}();return t.DefaultValueAccessor=p,n.define=i,r.exports}),System.register("angular2/src/common/forms/directives/number_value_accessor",["angular2/core","angular2/src/common/forms/directives/control_value_accessor","angular2/src/facade/lang"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=3>o?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},a=this&Line truncated
|
||||
return o>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=e("angular2/core"),c=e("angular2/src/facade/collection"),l=e("angular2/src/facade/lang"),u=e("angular2/src/common/forms/model"),p=function(){function e(){}return e.prototype.group=function(e,t){void 0===t&&(t=null);var r=this._reduceControls(e),n=l.isPresent(t)?c.StringMapWrapper.get(t,"optionals"):null,i=l.isPresent(t)?c.StringMapWrapper.get(t,"validator"):null,o=l.isPresent(t)?c.StringMapWrapper.get(t,"asyncValidator"):null;return new u.ControlGroup(r,n,i,o)},e.prototype.control=function(e,t,r){return void 0===t&&(t=null),void 0===r&&(r=null),new u.Control(e,t,r)},e.prototype.array=function(e,t,r){var n=this;void 0===t&&(t=null),void 0===r&&(r=null);var i=e.map(function(e){return n._createControl(e)});return new u.ControlArray(i,t,r)},e.prototype._reduceControls=function(e){var t=this,r={};return c.StringMapWrapper.forEach(e,function(e,n){r[n]=t._createControl(e)}),r},e.prototype._createControl=function(e){if(e instanceof u.Control||e instanceof u.ControlGroup||e instanceof u.ControlArray)return e;if(l.isArray(e)){var t=e[0],r=e.length>1?e[1]:null,n=e.length>2?e[2]:null;return this.control(t,r,n)}return this.control(e)},e=o([s.Injectable(),a("design:paramtypes",[])],e)}();return t.FormBuilder=p,t.FORM_PROVIDERS=l.CONST_EXPR([p]),t.FORM_BINDINGS=t.FORM_PROVIDERS,n.define=i,r.exports}),System.register("angular2/src/common/common_directives",["angular2/src/facade/lang","angular2/src/common/forms","angular2/src/common/directives"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/facade/lang"),a=e("angular2/src/common/forms"),s=e("angular2/src/common/directives");return t.COMMON_DIRECTIVES=o.CONST_EXPR([s.CORE_DIRECTIVES,a.FORM_DIRECTIVES]),n.define=i,r.exports}),System.register("angular2/src/platform/dom/events/key_events",["angular2/src/platform/dom/dom_adapter","angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/platform/dom/events/event_manager","angular2/src/core/di"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},a=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=3>o?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},s=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=e("angular2/src/platform/dom/dom_adapter"),l=e("angular2/src/facade/lang"),u=e("angular2/src/facade/collection"),p=e("angular2/src/platform/dom/events/event_manager"),d=e("angular2/src/core/di"),f=["alt","control","meta","shift"],h={alt:function(e){return e.altKey},control:function(e){return e.ctrlKey},meta:function(e){return e.metaKey},shift:function(e){return e.shiftKey}},g=function(e){function t(){e.call(this)}return o(t,e),t.prototype.supports=function(e){return l.isPresent(t.parseEventName(e))},t.prototype.addEventListener=function(e,r,n){var i=t.parseEventName(r),o=t.eventCallback(e,u.StringMapWrapper.get(i,"fullKey"),n,this.manager.getZone());return this.manager.getZone().runOutsideAngular(function(){return c.DOM.onAndCancel(e,u.StringMapWrapper.get(i,"domEventName"),o)})},t.parseEventName=function(e){var r=e.toLowerCase().split("."),n=r.shift();if(0===r.length||!l.StringWrapper.equals(n,"keydown")&&!l.StringWrapper.equals(n,"keyup"))return null;var i=t._normalizeKey(r.pop()),o="";if(f.forEach(function(e){u.ListWrapper.contains(r,e)&&(u.ListWrapper.remove(r,e),o+=e+".")}),o+=i,0!=r.length||0===i.length)return null;var a=u.StringMapWrapper.create();return u.StringMapWrapper.set(a,"domEventName",n),u.StringMapWrapper.set(a,"fullKey",o),a},t.getEventFullKey=function(e){var t="",r=c.DOM.getEventKey(e);return r=r.toLowerCase(),l.StringWrapper.equals(r," ")?r="space":l.StringWrapper.equals(r,".")&&(r="dot"),f.forEach(function(n){if(n!=r){var i=u.StringMapWrapper.get(h,n);i(e)&&(t+=n+".")}}),t+=r},t.eventCallback=function(e,r,n,i){return function(e){l.StringWrapper.equals(t.getEventFullKey(e),r)&&i.run(function(){return n(e)})}},t._normalizeKey=function(e){switch(e){case"esc":return"escape";default:return e}},t=a([d.Injectable(),s("design:paramtypes",[])],t)}(p.EventManagerPlugin);return t.KeyEventsPlugin=g,n.define=i,r.exports}),System.register("angular2/src/platform/dom/events/hammer_common",["angular2/src/platform/dom/events/event_manager","angular2/src/facade/collection"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=this&&this.__extendLine truncated
|
||||
})},e.prototype._insertPolyfillRulesInCssText=function(e){return l.StringWrapper.replaceAllMapped(e,d,function(e){var t=e[0];return t=l.StringWrapper.replace(t,e[1],""),t=l.StringWrapper.replace(t,e[2],""),e[3]+t})},e.prototype._scopeCssText=function(e,t,r){var n=this._extractUnscopedRulesFromCssText(e);return e=this._insertPolyfillHostInCssText(e),e=this._convertColonHost(e),e=this._convertColonHostContext(e),e=this._convertShadowDOMSelectors(e),l.isPresent(t)&&(e=this._scopeSelectors(e,t,r)),e=e+"\n"+n,e.trim()},e.prototype._extractUnscopedRulesFromCssText=function(e){for(var t,r="",n=l.RegExpWrapper.matcher(f,e);l.isPresent(t=l.RegExpMatcherWrapper.next(n));){var i=t[0];i=l.StringWrapper.replace(i,t[2],""),i=l.StringWrapper.replace(i,t[1],t[3]),r+=i+"\n\n"}return r},e.prototype._convertColonHost=function(e){return this._convertColonRule(e,v,this._colonHostPartReplacer)},e.prototype._convertColonHostContext=function(e){return this._convertColonRule(e,y,this._colonHostContextPartReplacer)},e.prototype._convertColonRule=function(e,t,r){return l.StringWrapper.replaceAllMapped(e,t,function(e){if(l.isPresent(e[2])){for(var t=e[2].split(","),n=[],i=0;i<t.length;i++){var o=t[i];if(l.isBlank(o))break;o=o.trim(),n.push(r(_,o,e[3]))}return n.join(",")}return _+e[3]})},e.prototype._colonHostContextPartReplacer=function(e,t,r){return l.StringWrapper.contains(t,h)?this._colonHostPartReplacer(e,t,r):e+t+r+", "+t+" "+e+r},e.prototype._colonHostPartReplacer=function(e,t,r){return e+l.StringWrapper.replace(t,h,"")+r},e.prototype._convertShadowDOMSelectors=function(e){for(var t=0;t<b.length;t++)e=l.StringWrapper.replaceAll(e,b[t]," ");return e},e.prototype._scopeSelectors=function(e,t,r){var n=this;return i(e,function(e){var i=e.selector,o=e.content;return"@"!=e.selector[0]||e.selector.startsWith("@page")?i=n._scopeSelector(e.selector,t,r,n.strictStyling):e.selector.startsWith("@media")&&(o=n._scopeSelectors(e.content,t,r)),new T(i,o)})},e.prototype._scopeSelector=function(e,t,r,n){for(var i=[],o=e.split(","),a=0;a<o.length;a++){var s=o[a];s=s.trim(),this._selectorNeedsScoping(s,t)&&(s=n&&!l.StringWrapper.contains(s,_)?this._applyStrictSelectorScope(s,t):this._applySelectorScope(s,t,r)),i.push(s)}return i.join(", ")},e.prototype._selectorNeedsScoping=function(e,t){var r=this._makeScopeMatcher(t);return!l.isPresent(l.RegExpWrapper.firstMatch(r,e))},e.prototype._makeScopeMatcher=function(e){var t=/\[/g,r=/\]/g;return e=l.StringWrapper.replaceAll(e,t,"\\["),e=l.StringWrapper.replaceAll(e,r,"\\]"),l.RegExpWrapper.create("^("+e+")"+C,"m")},e.prototype._applySelectorScope=function(e,t,r){return this._applySimpleSelectorScope(e,t,r)},e.prototype._applySimpleSelectorScope=function(e,t,r){if(l.isPresent(l.RegExpWrapper.firstMatch(w,e))){var n=this.strictStyling?"["+r+"]":t;return e=l.StringWrapper.replace(e,_,n),l.StringWrapper.replaceAll(e,w,n+" ")}return t+" "+e},e.prototype._applyStrictSelectorScope=function(e,t){var r=/\[is=([^\]]*)\]/g;t=l.StringWrapper.replaceAllMapped(t,r,function(e){return e[1]});for(var n=[" ",">","+","~"],i=e,o="["+t+"]",a=0;a<n.length;a++){var s=n[a],u=i.split(s);i=u.map(function(e){var t=l.StringWrapper.replaceAll(e.trim(),w,"");if(t.length>0&&!c.ListWrapper.contains(n,t)&&!l.StringWrapper.contains(t,o)){var r=/([^:]*)(:*)(.*)/g,i=l.RegExpWrapper.firstMatch(r,t);l.isPresent(i)&&(e=i[1]+o+i[2]+i[3])}return e}).join(s)}return i},e.prototype._insertPolyfillHostInCssText=function(e){return e=l.StringWrapper.replaceAll(e,E,g),e=l.StringWrapper.replaceAll(e,P,h)},e}();t.ShadowCss=u;var p=/polyfill-next-selector[^}]*content:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim,d=/(polyfill-rule)[^}]*(content:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,f=/(polyfill-unscoped-rule)[^}]*(content:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,h="-shadowcsshost",g="-shadowcsscontext",m=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",v=l.RegExpWrapper.create("("+h+m,"im"),y=l.RegExpWrapper.create("("+g+m,"im"),_=h+"-no-combinator",b=[/>>>/g,/::shadow/g,/::content/g,/\/deep\//g,/\/shadow-deep\//g,/\/shadow\//g],C="([>\\s~+[.,{:][\\s\\S]*)?$",w=l.RegExpWrapper.create(h,"im"),P=/:host/gim,E=/:host-context/gim,S=/\/\*[\s\S]*?\*\//g,R=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,x=/([{}])/g,O="{",D="}",A="%BLOCK%",T=function(){function e(e,t){this.selector=e,this.content=t}return e}();t.CssRule=T,t.processRules=i;var I=function(){function e(e,t){this.escapedString=e,this.blocks=t}return e}();return a.define=s,r.exports}),System.register("angular2/src/compiler/style_url_resolver",["angular2/src/facade/lang"],!0,function(e,t,r){function n(e){if(s.isBlank(e)||0===e.length||"/"==e[0])return!1;var t=s.RegExpWrapper.firstMatch(u,e);return s.isBlank(t)||"package"==t[1]||"asset"==t[1]}function i(e,t,r){var i=[],o=s.StringWrapper.replaceAllMapped(r,l,function(r){var o=s.isPresent(r[1])?r[1]:r[2];return n(o)?(i.push(e.resolve(t,o)),""):r[0]});return new c(o,i)}var o=System.global,a=o.define;o.define=void 0;var s=e("angular2/src/facade/lang"),c=functiLine truncated
|
||||
l.WrappedValue.wrap(this._latestValue))},e.prototype._subscribe=function(e){var t=this;this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,function(r){return t._updateLatestValue(e,r)})},e.prototype._selectStrategy=function(t){if(s.isPromise(t))return f;if(c.ObservableWrapper.isObservable(t))return h;throw new u.InvalidPipeArgumentException(e,t)},e.prototype._dispose=function(){this._strategy.dispose(this._subscription),this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null},e.prototype._updateLatestValue=function(e,t){e===this._obj&&(this._latestValue=t,this._ref.markForCheck())},e=o([l.Pipe({name:"async",pure:!1}),l.Injectable(),a("design:paramtypes",[l.ChangeDetectorRef])],e)}();return t.AsyncPipe=g,n.define=i,r.exports}),System.register("angular2/src/common/pipes/date_pipe",["angular2/src/facade/lang","angular2/src/facade/intl","angular2/core","angular2/src/facade/collection","angular2/src/common/pipes/invalid_pipe_argument_exception"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=3>o?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=e("angular2/src/facade/lang"),c=e("angular2/src/facade/intl"),l=e("angular2/core"),u=e("angular2/src/facade/collection"),p=e("angular2/src/common/pipes/invalid_pipe_argument_exception"),d="en-US",f=function(){function e(){}return e.prototype.transform=function(t,r){if(s.isBlank(t))return null;if(!this.supports(t))throw new p.InvalidPipeArgumentException(e,t);var n=s.isPresent(r)&&r.length>0?r[0]:"mediumDate";return s.isNumber(t)&&(t=s.DateWrapper.fromMillis(t)),u.StringMapWrapper.contains(e._ALIASES,n)&&(n=u.StringMapWrapper.get(e._ALIASES,n)),c.DateFormatter.format(t,d,n)},e.prototype.supports=function(e){return s.isDate(e)||s.isNumber(e)},e._ALIASES={medium:"yMMMdjms","short":"yMdjm",fullDate:"yMMMMEEEEd",longDate:"yMMMMd",mediumDate:"yMMMd",shortDate:"yMd",mediumTime:"jms",shortTime:"jm"},e=o([s.CONST(),l.Pipe({name:"date",pure:!0}),l.Injectable(),a("design:paramtypes",[])],e)}();return t.DatePipe=f,n.define=i,r.exports}),System.register("angular2/src/common/directives",["angular2/src/common/directives/ng_class","angular2/src/common/directives/ng_for","angular2/src/common/directives/ng_if","angular2/src/common/directives/ng_style","angular2/src/common/directives/ng_switch","angular2/src/common/directives/observable_list_diff","angular2/src/common/directives/core_directives"],!0,function(e,t,r){function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}var i=System.global,o=i.define;i.define=void 0;var a=e("angular2/src/common/directives/ng_class");t.NgClass=a.NgClass;var s=e("angular2/src/common/directives/ng_for");t.NgFor=s.NgFor;var c=e("angular2/src/common/directives/ng_if");t.NgIf=c.NgIf;var l=e("angular2/src/common/directives/ng_style");t.NgStyle=l.NgStyle;var u=e("angular2/src/common/directives/ng_switch");t.NgSwitch=u.NgSwitch,t.NgSwitchWhen=u.NgSwitchWhen,t.NgSwitchDefault=u.NgSwitchDefault,n(e("angular2/src/common/directives/observable_list_diff"));var p=e("angular2/src/common/directives/core_directives");return t.CORE_DIRECTIVES=p.CORE_DIRECTIVES,i.define=o,r.exports}),System.register("angular2/src/common/forms/directives/shared",["angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/common/forms/validators","angular2/src/common/forms/directives/default_value_accessor","angular2/src/common/forms/directives/number_value_accessor","angular2/src/common/forms/directives/checkbox_value_accessor","angular2/src/common/forms/directives/select_control_value_accessor","angular2/src/common/forms/directives/normalize_validator"],!0,function(e,t,r){function n(e,t){var r=f.ListWrapper.clone(t.path);return r.push(e),r}function i(e,t){h.isBlank(e)&&a(t,"Cannot find control"),h.isBlank(t.valueAccessor)&&a(t,"No value accessor for"),e.validator=m.Validators.compose([e.validator,t.validator]),e.asyncValidator=m.Validators.composeAsync([e.asyncValidator,t.asyncValidator]),t.valueAccessor.writeValue(e.value),t.valueAccessor.registerOnChange(function(r){t.viewToModelUpdate(r),e.updateValue(r,{emitModelToViewChange:!1}),e.markAsDirty()}),e.registerOnChange(function(e){return t.valueAccessor.writeValue(e)}),t.valueAccessor.registerOnTouched(function(){return e.markAsTouched()})}function o(e,t){h.isBlank(e)&&a(t,"Cannot find control"),e.validator=m.Validators.compose([e.validator,t.validator]),e.asyncValidator=m.Validators.composeAsync([e.asyncValidator,t.asyncValidator])}function a(e,t){vaLine truncated
|
||||
new y.Expression(a)},e.prototype.createAndSetComponentView=function(e,t,r,n,i,o,a){var s;s=this.component.type.isHost?r.expression+".projectableNodes":"["+o.map(function(e){return y.codeGenFlatArray(e)}).join(",")+"]",a.push(new y.Statement(this.componentViewFactory(i)+"("+e.expression+", "+t.expression+", "+n.expression+", "+s+", null, null, null);"))},e.prototype.getProjectedNodes=function(e,t){return new y.Expression(e.expression+"["+t+"]",!0)},e.prototype.appendProjectedNodes=function(e,t,r,n){n.push(new y.Statement(e.expression+".projectNodes("+t.expression+", "+b.APP_VIEW_MODULE_REF+"flattenNestedViewRenderNodes("+r.expression+"));"))},e.prototype.createViewFactory=function(e,t,r){var n=this.protoViews[t],a=this.component.type.isHost,s=0===t&&!a,c=new S(new y.Expression("renderer"),new y.Expression("viewManager"),new y.Expression("projectableNodes"),a?new y.Expression("rootSelector"):null,new y.Expression("view"),n,r,this);d.templateVisitAll(c,e,new E(s?new y.Expression("parentRenderNode"):null,null,null));var l=n.protoView.expression,u=i(this.component,t),p=this.changeDetectorExpressions.expressions[t],f=["parentRenderer","viewManager","containerEl","projectableNodes","rootSelector","dynamicallyCreatedProviders","rootInjector"],h=[],g="parentRenderer";if(0===t){var m=this._nextVar("renderType");r.push(new y.Statement("var "+m+" = null;"));var v=this._nextVar("styles");r.push(new y.Statement(y.CONST_VAR+" "+v+" = "+this.styles.expression+";"));var _=this.component.template.encapsulation;h.push("if ("+m+" == null) {\n "+m+" = viewManager.createRenderComponentType("+o(_)+", "+v+");\n }"),g="parentRenderer.renderComponent("+m+")"}var C="\n"+y.codeGenFnHeader(f,u)+"{\n "+h.join("\n")+"\n var renderer = "+g+";\n var view = new "+b.APP_VIEW_MODULE_REF+"AppView(\n "+l+", renderer, viewManager,\n projectableNodes,\n containerEl,\n dynamicallyCreatedProviders, rootInjector,\n "+p+"()\n );\n "+b.APP_VIEW_MODULE_REF+"checkSlotCount("+y.escapeValue(this.component.type.name)+", "+this.component.template.ngContentSelectors.length+", projectableNodes);\n "+(s?"var parentRenderNode = renderer.createViewRoot(view.containerAppElement.nativeElement);":"")+"\n "+c.renderStmts.map(function(e){return e.statement}).join("\n")+"\n "+c.appStmts.map(function(e){return e.statement}).join("\n")+"\n\n view.init("+y.codeGenFlatArray(c.rootNodesOrAppElements)+", "+y.codeGenArray(c.renderNodes)+", "+y.codeGenArray(c.appDisposables)+",\n "+y.codeGenArray(c.appElements)+");\n return view;\n}";return r.push(new y.Statement(C)),new y.Expression(u)},e}(),P=function(){function e(e,t,r,n,i){this.component=e,this.styles=t,this.protoViews=r,this.changeDetectorFactories=n,this.componentViewFactory=i}return e.prototype.createText=function(e,t,r,n){return e.createText(t,r)},e.prototype.createElement=function(e,t,r,n,i){var o;return o=u.isPresent(n)?e.selectRootElement(n):e.createElement(t,r)},e.prototype.createTemplateAnchor=function(e,t,r){return e.createTemplateAnchor(t)},e.prototype.createGlobalEventListener=function(e,t,r,n,i){return e.listenGlobal(n.target,n.name,function(e){return t.triggerEventHandlers(n.fullName,e,r)})},e.prototype.createElementEventListener=function(e,t,r,n,i,o){return e.listen(n,i.name,function(e){return t.triggerEventHandlers(i.fullName,e,r)})},e.prototype.setElementAttribute=function(e,t,r,n,i){e.setElementAttribute(t,r,n)},e.prototype.createAppElement=function(e,t,r,n,i,o){return new m.AppElement(e,t,n,r,i)},e.prototype.createAndSetComponentView=function(e,t,r,n,i,o,a){var s;if(this.component.type.isHost)s=r.projectableNodes;else{s=p.ListWrapper.createFixedSize(o.length);for(var c=0;c<o.length;c++)s[c]=y.flattenArray(o[c],[])}this.componentViewFactory(i)(e,t,n,s)},e.prototype.getProjectedNodes=function(e,t){return e[t]},e.prototype.appendProjectedNodes=function(e,t,r,n){e.projectNodes(t,h.flattenNestedViewRenderNodes(r))},e.prototype.createViewFactory=function(e,t,r){var n=this,i=this.protoViews[t],o=i.protoView.type===g.ViewType.COMPONENT,a=null;return function(r,s,c,l,p,f,g){void 0===p&&(p=null),void 0===f&&(f=null),void 0===g&&(g=null),h.checkSlotCount(n.component.type.name,n.component.template.ngContentSelectors.length,l);var m;0===t?(u.isBlank(a)&&(a=s.createRenderComponentType(n.component.template.encapsulation,n.styles)),m=r.renderComponent(a)):m=r;var v=n.changeDetectorFactories[t](),_=new h.AppView(i.protoView,m,s,l,c,f,g,v),b=new S(m,s,l,p,_,i,[],n),C=o?m.createViewRoot(c.nativeElement):null;return d.templateVisitAll(b,e,new E(C,null,null)),_.init(y.flattenArray(b.rootNodesOrAppElements,[]),b.renderNodes,b.appDisposables,b.appElements),_}},e}(),E=function(){function e(e,t,r){if(this.renderNode=e,this.appEl=t,this.component=r,u.isPresent(r)){this.contentNodesByNgContentIndex=p.ListWrapper.createFixedSize(r.template.ngContentSelectors.length);for(var n=0;n<this.contentNodesByNgContentIndex.length;n++)this.contentNodesByNgContentIndex[n]=[]}else this.contentNoLine truncated
|
||||
function n(e,t){return u.isPresent(e)?"@"+e+":"+t:t}function i(e,t,r){return u.isBlank(e)&&(e=m.getHtmlTagDefinition(t).implicitNamespacePrefix,u.isBlank(e)&&u.isPresent(r)&&(e=m.getNsPrefix(r.name))),n(e,t)}var o=System.global,a=o.define;o.define=void 0;var s=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},c=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=3>o?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},l=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},u=e("angular2/src/facade/lang"),p=e("angular2/src/facade/collection"),d=e("angular2/src/compiler/html_ast"),f=e("angular2/src/core/di"),h=e("angular2/src/compiler/html_lexer"),g=e("angular2/src/compiler/parse_util"),m=e("angular2/src/compiler/html_tags"),v=function(e){function t(t,r,n){e.call(this,r,n),this.elementName=t}return s(t,e),t.create=function(e,r,n){return new t(e,r,n)},t}(g.ParseError);t.HtmlTreeError=v;var y=function(){function e(e,t){this.rootNodes=e,this.errors=t}return e}();t.HtmlParseTreeResult=y;var _=function(){function e(){}return e.prototype.parse=function(e,t){var r=h.tokenizeHtml(e,t),n=new b(r.tokens).build();return new y(n.rootNodes,r.errors.concat(n.errors))},e=c([f.Injectable(),l("design:paramtypes",[])],e)}();t.HtmlParser=_;var b=function(){function e(e){this.tokens=e,this.index=-1,this.rootNodes=[],this.errors=[],this.elementStack=[],this._advance()}return e.prototype.build=function(){for(;this.peek.type!==h.HtmlTokenType.EOF;)this.peek.type===h.HtmlTokenType.TAG_OPEN_START?this._consumeStartTag(this._advance()):this.peek.type===h.HtmlTokenType.TAG_CLOSE?this._consumeEndTag(this._advance()):this.peek.type===h.HtmlTokenType.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this.peek.type===h.HtmlTokenType.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this.peek.type===h.HtmlTokenType.TEXT||this.peek.type===h.HtmlTokenType.RAW_TEXT||this.peek.type===h.HtmlTokenType.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._advance();return new y(this.rootNodes,this.errors)},e.prototype._advance=function(){var e=this.peek;return this.index<this.tokens.length-1&&this.index++,this.peek=this.tokens[this.index],e},e.prototype._advanceIf=function(e){return this.peek.type===e?this._advance():null},e.prototype._consumeCdata=function(e){this._consumeText(this._advance()),this._advanceIf(h.HtmlTokenType.CDATA_END)},e.prototype._consumeComment=function(e){this._advanceIf(h.HtmlTokenType.RAW_TEXT),this._advanceIf(h.HtmlTokenType.COMMENT_END)},e.prototype._consumeText=function(e){var t=e.parts[0];if(t.length>0&&"\n"==t[0]){var r=this._getParentElement();u.isPresent(r)&&0==r.children.length&&m.getHtmlTagDefinition(r.name).ignoreFirstLf&&(t=t.substring(1))}t.length>0&&this._addToParent(new d.HtmlTextAst(t,e.sourceSpan))},e.prototype._closeVoidElement=function(){if(this.elementStack.length>0){var e=p.ListWrapper.last(this.elementStack);m.getHtmlTagDefinition(e.name).isVoid&&this.elementStack.pop()}},e.prototype._consumeStartTag=function(e){for(var t=e.parts[0],r=e.parts[1],n=[];this.peek.type===h.HtmlTokenType.ATTR_NAME;)n.push(this._consumeAttr(this._advance()));var o=i(t,r,this._getParentElement()),a=!1;this.peek.type===h.HtmlTokenType.TAG_OPEN_END_VOID?(this._advance(),a=!0,null!=m.getNsPrefix(o)||m.getHtmlTagDefinition(o).isVoid||this.errors.push(v.create(o,e.sourceSpan.start,'Only void and foreign elements can be self closed "'+e.parts[1]+'"'))):this.peek.type===h.HtmlTokenType.TAG_OPEN_END&&(this._advance(),a=!1);var s=this.peek.sourceSpan.start,c=new d.HtmlElementAst(o,n,[],new g.ParseSourceSpan(e.sourceSpan.start,s));this._pushElement(c),a&&this._popElement(o)},e.prototype._pushElement=function(e){if(this.elementStack.length>0){var t=p.ListWrapper.last(this.elementStack);m.getHtmlTagDefinition(t.name).isClosedByChild(e.name)&&this.elementStack.pop()}var r=m.getHtmlTagDefinition(e.name),t=this._getParentElement();if(r.requireExtraParent(u.isPresent(t)?t.name:null)){var n=new d.HtmlElementAst(r.parentToAdd,[],[e],e.sourceSpan);this._addToParent(n),this.elementStack.push(n),this.elementStack.push(e)}else this._addToParent(e),this.elementStack.push(e)},e.prototype._consumeEndTag=function(e){var t=i(e.parts[0],e.parts[1],this._getParentElement());m.getHtmlTagDefinition(t).isVoid?this.errors.push(v.create(t,e.sourceSpan.start,'Void elements do not have end tags "'+e.parts[1]+'"')):this._popElement(t)||this.errors.push(v.create(t,e.sourceSpan.start,'Unexpected closing tag "'+e.parts[1]+'"'))},e.pLine truncated
|
||||
})},e}(),W=function(){function e(){}return e.prototype.visitElement=function(e,t){var r=E.preparseElement(e);if(r.type===E.PreparsedElementType.SCRIPT||r.type===E.PreparsedElementType.STYLE||r.type===E.PreparsedElementType.STYLESHEET)return null;var n=e.attrs.map(function(e){return[e.name,e.value]}),o=i(e.name,n),a=t.findNgContentIndex(o),s=R.htmlVisitAll(this,e.children,G);return new C.ElementAst(e.name,R.htmlVisitAll(this,e.attrs),[],[],[],[],s,a,e.sourceSpan)},e.prototype.visitAttr=function(e,t){return new C.AttrAst(e.name,e.value,e.sourceSpan)},e.prototype.visitText=function(e,t){var r=t.findNgContentIndex(j);return new C.TextAst(e.value,r,e.sourceSpan)},e}(),U=function(){function e(e,t,r,n){this.name=e,this.expression=t,this.isLiteral=r,this.sourceSpan=n}return e}();t.splitClasses=n;var H=function(){function e(e,t){this.ngContentIndexMatcher=e,this.wildcardNgContentIndex=t}return e.create=function(t){if(0===t.length||!t[0].directive.isComponent)return G;for(var r=new w.SelectorMatcher,n=t[0].directive.template.ngContentSelectors,i=null,o=0;o<n.length;o++){var a=n[o];d.StringWrapper.equals(a,"*")?i=o:r.addSelectables(w.CssSelector.parse(n[o]),o)}return new e(r,i)},e.prototype.findNgContentIndex=function(e){var t=[];return this.ngContentIndexMatcher.match(e,function(e,r){t.push(r)}),p.ListWrapper.sort(t),d.isPresent(this.wildcardNgContentIndex)&&t.push(this.wildcardNgContentIndex),t.length>0?t[0]:null},e}(),G=new H(new w.SelectorMatcher,null),q=new W,K=function(e){function t(){e.apply(this,arguments),this.pipes=new Set}return s(t,e),t.prototype.visitPipe=function(e){return this.pipes.add(e.name),e.exp.visit(this),this.visitAll(e.args),null},t}(b.RecursiveAstVisitor);return t.PipeCollector=K,o.define=a,r.exports}),System.register("angular2/common",["angular2/src/common/pipes","angular2/src/common/directives","angular2/src/common/forms","angular2/src/common/common_directives"],!0,function(e,t,r){function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}var i=System.global,o=i.define;return i.define=void 0,n(e("angular2/src/common/pipes")),n(e("angular2/src/common/directives")),n(e("angular2/src/common/forms")),n(e("angular2/src/common/common_directives")),i.define=o,r.exports}),System.register("angular2/src/compiler/template_compiler",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/collection","angular2/src/facade/async","angular2/src/compiler/directive_metadata","angular2/src/compiler/template_ast","angular2/src/core/di","angular2/src/compiler/source_module","angular2/src/compiler/change_detector_compiler","angular2/src/compiler/style_compiler","angular2/src/compiler/view_compiler","angular2/src/compiler/proto_view_compiler","angular2/src/compiler/template_parser","angular2/src/compiler/template_normalizer","angular2/src/compiler/runtime_metadata","angular2/src/core/linker/view","angular2/src/core/change_detection/change_detection","angular2/src/core/linker/resolved_metadata_cache","angular2/src/compiler/util"],!0,function(e,t,r){function n(e){if(!e.isComponent)throw new g.BaseException("Could not compile '"+e.type.name+"' because it is not a component.")}function i(e){var t=e.substring(0,e.length-I.MODULE_SUFFIX.length);return t+".template"+I.MODULE_SUFFIX}function o(e){return"hostViewFactory_"+e.name}function a(e){return C.moduleRef(i(e.type.moduleUrl))+"viewFactory_"+e.type.name+"0"}function s(e){var t={};return e.forEach(function(e){m.StringMapWrapper.forEach(e,function(e,r){t[r]=e})}),t}function c(e){var t=[];return e.forEach(function(e){var r=t.filter(function(t){return t.type.name==e.type.name&&t.type.moduleUrl==e.type.moduleUrl&&t.type.runtime==e.type.runtime}).length>0;r||t.push(e)}),t}function l(e,t){var r=new j;return _.templateVisitAll(r,e),t.filter(function(e){return m.SetWrapper.has(r.collector.pipes,e.name)})}var u=System.global,p=u.define;u.define=void 0;var d=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,a=3>o?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(3>o?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},f=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},h=e("angular2/src/facade/lang"),g=e("angular2/src/facade/exceptions"),m=e("angular2/src/facade/collection"),v=e("angular2/src/facade/async"),y=e("angular2/src/compiler/directive_metadata"),_=e("angular2/src/compiler/template_ast"),b=e("angular2/src/core/di"),C=e("angular2/src/compiler/source_module"),w=e("angular2/src/compiler/change_detector_compiler"),P=e("angular2/src/compiler/style_compiler"),E=e("angular2/src/compiler/view_compiler"),S=e("angular2/src/compiler/proto_view_compiler"),R=e("angular2/src/compiler/template_parser"),x=e("angular2/src/compiler/template_normalizer"),O=e("angular2/src/compiler/runtime_metadatLine truncated
|
||||
Generated
Vendored
-1083
File diff suppressed because it is too large.
Load diff
Generated
Vendored
-1083
File diff suppressed because it is too large.
Load diff
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
"format register";System.register("angular2/src/http/interfaces",[],!0,function(e,t,r){var n=System.global,s=n.define;n.define=void 0;var a=function(){function e(){}return e}();t.ConnectionBackend=a;var o=function(){function e(){}return e}();return t.Connection=o,n.define=s,r.exports}),System.register("angular2/src/http/headers",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/collection"],!0,function(e,t,r){var n=System.global,s=n.define;n.define=void 0;var a=e("angular2/src/facade/lang"),o=e("angular2/src/facade/exceptions"),i=e("angular2/src/facade/collection"),c=function(){function e(t){var r=this;return t instanceof e?void(this._headersMap=t._headersMap):(this._headersMap=new i.Map,void(a.isBlank(t)||i.StringMapWrapper.forEach(t,function(e,t){r._headersMap.set(t,i.isListLikeIterable(e)?e:[e])})))}return e.fromResponseHeaderString=function(t){return t.trim().split("\n").map(function(e){return e.split(":")}).map(function(e){var t=e[0],r=e.slice(1);return[t.trim(),r.join(":").trim()]}).reduce(function(e,t){var r=t[0],n=t[1];return!e.set(r,n)&&e},new e)},e.prototype.append=function(e,t){var r=this._headersMap.get(e),n=i.isListLikeIterable(r)?r:[];n.push(t),this._headersMap.set(e,n)},e.prototype["delete"]=function(e){this._headersMap["delete"](e)},e.prototype.forEach=function(e){this._headersMap.forEach(e)},e.prototype.get=function(e){return i.ListWrapper.first(this._headersMap.get(e))},e.prototype.has=function(e){return this._headersMap.has(e)},e.prototype.keys=function(){return i.MapWrapper.keys(this._headersMap)},e.prototype.set=function(e,t){var r=[];if(i.isListLikeIterable(t)){var n=t.join(",");r.push(n)}else r.push(t);this._headersMap.set(e,r)},e.prototype.values=function(){return i.MapWrapper.values(this._headersMap)},e.prototype.toJSON=function(){return a.Json.stringify(this.values())},e.prototype.getAll=function(e){var t=this._headersMap.get(e);return i.isListLikeIterable(t)?t:[]},e.prototype.entries=function(){throw new o.BaseException('"entries" method is not implemented on Headers class')},e}();return t.Headers=c,n.define=s,r.exports}),System.register("angular2/src/http/enums",[],!0,function(e,t,r){var n=System.global,s=n.define;return n.define=void 0,function(e){e[e.Get=0]="Get",e[e.Post=1]="Post",e[e.Put=2]="Put",e[e.Delete=3]="Delete",e[e.Options=4]="Options",e[e.Head=5]="Head",e[e.Patch=6]="Patch"}(t.RequestMethod||(t.RequestMethod={})),t.RequestMethod,!function(e){e[e.Unsent=0]="Unsent",e[e.Open=1]="Open",e[e.HeadersReceived=2]="HeadersReceived",e[e.Loading=3]="Loading",e[e.Done=4]="Done",e[e.Cancelled=5]="Cancelled"}(t.ReadyState||(t.ReadyState={})),t.ReadyState,!function(e){e[e.Basic=0]="Basic",e[e.Cors=1]="Cors",e[e.Default=2]="Default",e[e.Error=3]="Error",e[e.Opaque=4]="Opaque"}(t.ResponseType||(t.ResponseType={})),t.ResponseType,n.define=s,r.exports}),System.register("angular2/src/http/url_search_params",["angular2/src/facade/lang","angular2/src/facade/collection"],!0,function(e,t,r){function n(e){void 0===e&&(e="");var t=new i.Map;if(e.length>0){var r=e.split("&");r.forEach(function(e){var r=e.split("="),n=r[0],s=r[1],a=o.isPresent(t.get(n))?t.get(n):[];a.push(s),t.set(n,a)})}return t}var s=System.global,a=s.define;s.define=void 0;var o=e("angular2/src/facade/lang"),i=e("angular2/src/facade/collection"),c=function(){function e(e){void 0===e&&(e=""),this.rawParams=e,this.paramsMap=n(e)}return e.prototype.clone=function(){var t=new e;return t.appendAll(this),t},e.prototype.has=function(e){return this.paramsMap.has(e)},e.prototype.get=function(e){var t=this.paramsMap.get(e);return i.isListLikeIterable(t)?i.ListWrapper.first(t):null},e.prototype.getAll=function(e){var t=this.paramsMap.get(e);return o.isPresent(t)?t:[]},e.prototype.set=function(e,t){var r=this.paramsMap.get(e),n=o.isPresent(r)?r:[];i.ListWrapper.clear(n),n.push(t),this.paramsMap.set(e,n)},e.prototype.setAll=function(e){var t=this;e.paramsMap.forEach(function(e,r){var n=t.paramsMap.get(r),s=o.isPresent(n)?n:[];i.ListWrapper.clear(s),s.push(e[0]),t.paramsMap.set(r,s)})},e.prototype.append=function(e,t){var r=this.paramsMap.get(e),n=o.isPresent(r)?r:[];n.push(t),this.paramsMap.set(e,n)},e.prototype.appendAll=function(e){var t=this;e.paramsMap.forEach(function(e,r){for(var n=t.paramsMap.get(r),s=o.isPresent(n)?n:[],a=0;a<e.length;++a)s.push(e[a]);t.paramsMap.set(r,s)})},e.prototype.replaceAll=function(e){var t=this;e.paramsMap.forEach(function(e,r){var n=t.paramsMap.get(r),s=o.isPresent(n)?n:[];i.ListWrapper.clear(s);for(var a=0;a<e.length;++a)s.push(e[a]);t.paramsMap.set(r,s)})},e.prototype.toString=function(){var e=[];return this.paramsMap.forEach(function(t,r){t.forEach(function(t){return e.push(r+"="+t)})}),e.join("&")},e.prototype["delete"]=function(e){this.paramsMap["delete"](e)},e}();return t.URLSearchParams=c,s.define=a,r.exports}),System.register("angular2/src/http/static_response",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/http/http_utils"],!0,functioLine truncated
|
||||
Generated
Vendored
-92
@@ -1,92 +0,0 @@
|
||||
# TL;DR;
|
||||
|
||||
* If you write ES5 use _one_ of the `UMD` bundles.
|
||||
* If you experiment with Angular2 using online prototyping tools like [plnkr](http://plnkr.co/) or similar use `System.register` bundles with SystemJS loader.
|
||||
* If you use build tools like Browserify or WebPack - bundle Angular2 as part of your build.
|
||||
* For all the above cases you must use `angular2-polyfills.js` in a `script` tag to easily include polyfills and external dependencies.
|
||||
|
||||
# Modules, barrels and bundles
|
||||
|
||||
Angular2 source code is authored using the ES2015 standardized module format where one module corresponds to exactly one file. Multiple modules (files) can be logically grouped into so-called "barrels".
|
||||
A bundle is a file that contains all the code for one or more barrels.
|
||||
|
||||
Most bundles come in several flavors:
|
||||
* regular and minified (got `.min` in their name);
|
||||
* regular and "development" (have `.dev` in their name) - "development" bundles contain in-line source maps and don't have minified flavor (minification removes in-lined source maps).
|
||||
|
||||
# Bundles, their content and usage scenarios
|
||||
|
||||
Angular 2 distributes several types of bundles targeted at specific usages:
|
||||
* users writing ES5 code without any transpilation steps
|
||||
* users experimenting with Angular 2 and TypeScript/ES2015 using online tools like plunker, jsbin or similar
|
||||
|
||||
Since each identified scenario has slightly different requirements and constraints there are specific bundles for each use-case.
|
||||
|
||||
## ES5 and ngUpgrade users
|
||||
|
||||
ES5 users and AngularJS 1.x users interested in the `ngUpgrade` path can take advantage of the bundles in the [UMD format](https://github.com/umdjs/umd).
|
||||
Those are coarse-grained bundles that combine many barrels in one final file.
|
||||
|
||||
filename | list of barrels | dev/prod | minified?
|
||||
------------|-------------------|----------|-------------|--------------|-------------
|
||||
`angular2-all.umd.js` | `angular2/core`, `angular2/common`, `angular2/compiler`, `angular2/platform/browser`, `angular2/platform/common_dom`, `angular2/http`, `angular2/router`, `angular2/instrumentation`, `angular2/upgrade`| prod | no
|
||||
`angular2-all.umd.min.js` | `angular2/core`, `angular2/common`, `angular2/compiler`, `angular2/platform/browser`, `angular2/platform/common_dom`, `angular2/http`, `angular2/router`, `angular2/instrumentation`, `angular2/upgrade` | prod | yes
|
||||
`angular2-all.umd.dev.js` | `angular2/core`, `angular2/common`, `angular2/compiler`, `angular2/platform/browser`, `angular2/platform/common_dom`, `angular2/http`, `angular2/router`, `angular2/instrumentation`, `angular2/upgrade` | dev | no
|
||||
`angular2-all-testing.umd.dev.js` | `angular2/core`, `angular2/common`, `angular2/compiler`, `angular2/platform/browser`, `angular2/platform/common_dom`, `angular2/http`, `angular2/router`, `angular2/instrumentation`, `angular2/upgrade`, `angular2/testing`, `angular2/http/testing`, `angular2/router/testing`, `angular2/platform/testing/browser` | dev | no
|
||||
|
||||
**Warning**: bundles in the `UMD` format are _not_ "additive". A single application should use only one bundle from the above list.
|
||||
|
||||
## SystemJS loader users
|
||||
|
||||
[SystemJS loader](https://github.com/systemjs/systemjs) with on-the-fly (in a browser) transpilations support is very useful for quick experiments using tools like plunker, jsbin or similar.
|
||||
For this scenario Angular 2 is distributed with bundles in the [System.register format](https://github.com/ModuleLoader/es6-module-loader/wiki/System.register-Explained):
|
||||
|
||||
filename | list of barrels | dev/prod | minified?
|
||||
------------|-------------------|----------|-------------|--------------|-------------
|
||||
`angular2.js` | `angular2/core`, `angular2/common`, `angular2/compiler`, `angular2/platform/browser`, `angular2/platform/common_dom`, `angular2/instrumentation`| prod | no
|
||||
`angular2.min.js` | `angular2/core`, `angular2/common`, `angular2/compiler`, `angular2/platform/browser`, `angular2/platform/common_dom`, `angular2/instrumentation`| prod | yes
|
||||
`angular2.dev.js` | `angular2/core`, `angular2/common`, `angular2/compiler`, `angular2/platform/browser`, `angular2/platform/common_dom`, `angular2/instrumentation`| dev | no
|
||||
`http.js` | `angular2/http` | prod | no
|
||||
`http.min.js` | `angular2/http` | prod | yes
|
||||
`http.dev.js` | `angular2/http` | dev | no
|
||||
`router.js` | `angular2/router` | prod | no
|
||||
`router.min.js` | `angular2/router` | prod | yes
|
||||
`router.dev.js` | `angular2/router` | dev | no
|
||||
`upgrade.js` | `angular2/upgrade` | prod | no
|
||||
`upgrade.min.js` | `angular2/upgrade` | prod | yes
|
||||
`upgrade.dev.js` | `angular2/upgrade` | dev | no
|
||||
`testing.dev.js` | `angular2/testing`, `angular2/http/testing`, `angular2/router/testing`, `angular2/platform/testing/browser` | dev | no
|
||||
|
||||
**Note**: bundles in the `System.register` format are "additive" - it is quite common to include several bundles in one application.
|
||||
For example people using Angular 2 with `http` and `router` would include: `angular2.js`, `http.js` and `router.js`.
|
||||
|
||||
## Browserify / JSPM / Rollup / WebPack users
|
||||
|
||||
Angular 2 doesn't provide any bundles for use with packaging tools Browserify or WebPack. Those tools are sophisticated enough to build optimal bundles for production use from individual Angular 2 files distributed in the npm package.
|
||||
An example of an Angular 2 project built with WebPack can be found in the [angular2-seed](https://github.com/angular/angular2-seed) repository.
|
||||
|
||||
|
||||
# Polyfills and external dependencies
|
||||
|
||||
## Required Polyfills
|
||||
|
||||
Polyfills are required for Angular 2 to function properly (the exact list depends on the browser used) and external dependencies ([zone.js](https://github.com/angular/zone.js)).
|
||||
To ease setup of Angular 2 applications there is one file - `angular2-polyfills.js` - that combines:
|
||||
* a pollyfill mandatory for all browsers: [reflect-metadata](https://www.npmjs.com/package/reflect-metadata)
|
||||
* [zone.js](https://github.com/angular/zone.js)
|
||||
|
||||
**Note**: `angular2-polyfills.js` contains code that should be loaded into the browser as the very first code of the web application even before the module loader. The preferred solution is to load the mentioned file in a `script` tag as early as possible.
|
||||
|
||||
|
||||
## RxJS
|
||||
|
||||
[RxJS](https://github.com/ReactiveX/RxJS) is a required dependency of Angular 2.
|
||||
|
||||
You should include RxJS in your project by declaring a dependency on the [`rxjs` npm package](https://www.npmjs.com/package/rxjs).
|
||||
|
||||
Depending on if you are using Angular bundles or not you can either use RxJS bundles from `node_modules/rxjs/bundles/` or configure your bundler to pull in the individual files from the npm package.
|
||||
|
||||
|
||||
## ES6 shims (optional)
|
||||
|
||||
Users of pre-ES6 browsers might need to add an ES6 shim (e.g. [es6-shim](https://github.com/paulmillr/es6-shim))
|
||||
Generated
Vendored
-3104
File diff suppressed because it is too large.
Load diff
Generated
Vendored
-3104
File diff suppressed because it is too large.
Load diff
Generated
Vendored
-3
@@ -1,3 +0,0 @@
|
||||
"format register";System.register("angular2/src/router/router_link_transform",["angular2/compiler","angular2/src/core/change_detection/parser/ast","angular2/src/facade/exceptions","angular2/core","angular2/src/core/change_detection/parser/parser"],!0,function(t,e,r){function n(t,e){var r=new y(t,e.trim()).tokenize();return new v(r).generate()}var o=System.global,a=o.define;o.define=void 0;var i=this&&this.__extends||function(t,e){function r(){this.constructor=t}for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},s=this&&this.__decorate||function(t,e,r,n){var o,a=arguments.length,i=3>a?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(i=(3>a?o(i):a>3?o(e,r,i):o(e,r))||i);return a>3&&i&&Object.defineProperty(e,r,i),i},u=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},c=t("angular2/compiler"),l=t("angular2/src/core/change_detection/parser/ast"),p=t("angular2/src/facade/exceptions"),f=t("angular2/core"),h=t("angular2/src/core/change_detection/parser/parser"),g=function(){function t(t){this.value=t}return t}(),m=function(){function t(){}return t}(),d=function(){function t(){}return t}(),_=function(){function t(t){this.ast=t}return t}(),y=function(){function t(t,e){this.parser=t,this.exp=e,this.index=0}return t.prototype.tokenize=function(){for(var t=[];this.index<this.exp.length;)t.push(this._parseToken());return t},t.prototype._parseToken=function(){var t=this.exp[this.index];return"["==t?(this.index++,new m):"]"==t?(this.index++,new d):"("==t?this._parseParams():"/"==t&&0!==this.index?(this.index++,this._parseFixedPart()):this._parseFixedPart()},t.prototype._parseParams=function(){for(var t=this.index;this.index<this.exp.length;++this.index){var e=this.exp[this.index];if(")"==e){var r=this.exp.substring(t+1,this.index);return this.index++,new _(this.parser.parseBinding("{"+r+"}",null).ast)}}throw new p.BaseException("Cannot find ')'")},t.prototype._parseFixedPart=function(){for(var t=this.index,e=!1;this.index<this.exp.length;++this.index){var r=this.exp[this.index];if("("==r||"["==r||"]"==r||"/"==r&&e)break;"."!=r&&"/"!=r&&(e=!0)}var n=this.exp.substring(t,this.index);if(t===this.index||!e||n.startsWith("//"))throw new p.BaseException("Invalid router link");return new g(n)},t}(),v=function(){function t(t){this.tokens=t,this.index=0}return t.prototype.generate=function(){return this._genAuxiliary()},t.prototype._genAuxiliary=function(){for(var t=[];this.index<this.tokens.length;this.index++){var e=this.tokens[this.index];if(e instanceof g)t.push(new l.LiteralPrimitive(e.value));else if(e instanceof _)t.push(e.ast);else{if(e instanceof d)break;e instanceof m&&(this.index++,t.push(this._genAuxiliary()))}}return new l.LiteralArray(t)},t}(),R=function(t){function e(e){t.call(this),this.parser=e}return i(e,t),e.prototype.visitQuote=function(e){return"route"==e.prefix?n(this.parser,e.uninterpretedExpression):t.prototype.visitQuote.call(this,e)},e}(l.AstTransformer);e.parseRouterLinkExpression=n;var P=function(){function t(t){this.astTransformer=new R(t)}return t.prototype.visitNgContent=function(t,e){return t},t.prototype.visitEmbeddedTemplate=function(t,e){return t},t.prototype.visitElement=function(t,e){var r=this,n=t.children.map(function(t){return t.visit(r,e)}),o=t.inputs.map(function(t){return t.visit(r,e)}),a=t.directives.map(function(t){return t.visit(r,e)});return new c.ElementAst(t.name,t.attrs,o,t.outputs,t.exportAsVars,a,n,t.ngContentIndex,t.sourceSpan)},t.prototype.visitVariable=function(t,e){return t},t.prototype.visitEvent=function(t,e){return t},t.prototype.visitElementProperty=function(t,e){return t},t.prototype.visitAttr=function(t,e){return t},t.prototype.visitBoundText=function(t,e){return t},t.prototype.visitText=function(t,e){return t},t.prototype.visitDirective=function(t,e){var r=this,n=t.inputs.map(function(t){return t.visit(r,e)});return new c.DirectiveAst(t.directive,n,t.hostProperties,t.hostEvents,t.exportAsVars,t.sourceSpan)},t.prototype.visitDirectiveProperty=function(t,e){var r=t.value.visit(this.astTransformer);return new c.BoundDirectivePropertyAst(t.directiveName,t.templateName,r,t.sourceSpan)},t=s([f.Injectable(),u("design:paramtypes",[h.Parser])],t)}();return e.RouterLinkTransform=P,o.define=a,r.exports}),System.register("angular2/router/router_link_dsl",["angular2/compiler","angular2/core","angular2/src/router/router_link_transform","angular2/src/facade/lang","angular2/src/router/router_link_transform"],!0,function(t,e,r){var n=System.global,o=n.define;n.define=void 0;var a=t("angular2/compiler"),i=t("angular2/core"),s=t("angular2/src/router/router_link_transform"),u=t("angular2/src/facade/lang"),c=t("angular2/src/router/router_link_transform");return e.RouterLinkTransform=c.RouterLinkTranLine truncated
|
||||
}return t.prototype.recognize=function(t){for(var e,r=t,n={},o=[],a=0;a<this._segments.length;a+=1){var i=this._segments[a];if(e=r,i instanceof m)break;if(l.isPresent(e)){if(o.push(e.path),i instanceof y){n[i.name]=e.toString(),r=null;break}if(i instanceof _)n[i.name]=e.path;else if(!i.match(e.path))return null;r=e.child}else if(!i.match(""))return null}if(this.terminal&&l.isPresent(r))return null;var s,u,c,p=o.join("/");if(l.isPresent(e)){var g=t instanceof h.RootUrl?t:e;c=l.isPresent(g.params)?f.StringMapWrapper.merge(g.params,n):n,u=h.serializeParams(g.params),s=e.auxiliary}else c=n,s=[],u=[];return{urlPath:p,urlParams:u,allParams:c,auxiliary:s,nextSegment:r}},t.prototype.generate=function(t){for(var e=new g(t),r=[],n=0;n<this._segments.length;n++){var o=this._segments[n];o instanceof m||r.push(o.generate(e))}var a=r.join("/"),i=e.getUnused(),s=h.serializeParams(i);return{urlPath:a,urlParams:s}},t}();return e.PathRecognizer=x,u.define=c,r.exports}),System.register("angular2/src/router/component_recognizer",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/collection","angular2/src/facade/async","angular2/src/router/route_recognizer","angular2/src/router/route_config_impl","angular2/src/router/async_route_handler","angular2/src/router/sync_route_handler"],!0,function(t,e,r){var n=System.global,o=n.define;n.define=void 0;var a=t("angular2/src/facade/lang"),i=t("angular2/src/facade/exceptions"),s=t("angular2/src/facade/collection"),u=t("angular2/src/facade/async"),c=t("angular2/src/router/route_recognizer"),l=t("angular2/src/router/route_config_impl"),p=t("angular2/src/router/async_route_handler"),f=t("angular2/src/router/sync_route_handler"),h=function(){function t(){this.names=new s.Map,this.auxNames=new s.Map,this.auxRoutes=new s.Map,this.matchers=[],this.defaultRoute=null}return t.prototype.config=function(t){var e;if(a.isPresent(t.name)&&t.name[0].toUpperCase()!=t.name[0]){var r=t.name[0].toUpperCase()+t.name.substring(1);throw new i.BaseException('Route "'+t.path+'" with name "'+t.name+'" does not begin with an uppercase letter. Route names should be CamelCase like "'+r+'".')}if(t instanceof l.AuxRoute){e=new f.SyncRouteHandler(t.component,t.data);var n=t.path.startsWith("/")?t.path.substring(1):t.path,o=new c.RouteRecognizer(t.path,e);return this.auxRoutes.set(n,o),a.isPresent(t.name)&&this.auxNames.set(t.name,o),o.terminal}var s=!1;if(t instanceof l.Redirect){var u=new c.RedirectRecognizer(t.path,t.redirectTo);return this._assertNoHashCollision(u.hash,t.path),this.matchers.push(u),!0}t instanceof l.Route?(e=new f.SyncRouteHandler(t.component,t.data),s=a.isPresent(t.useAsDefault)&&t.useAsDefault):t instanceof l.AsyncRoute&&(e=new p.AsyncRouteHandler(t.loader,t.data),s=a.isPresent(t.useAsDefault)&&t.useAsDefault);var o=new c.RouteRecognizer(t.path,e);if(this._assertNoHashCollision(o.hash,t.path),s){if(a.isPresent(this.defaultRoute))throw new i.BaseException("Only one route can be default");this.defaultRoute=o}return this.matchers.push(o),a.isPresent(t.name)&&this.names.set(t.name,o),o.terminal},t.prototype._assertNoHashCollision=function(t,e){this.matchers.forEach(function(r){if(t==r.hash)throw new i.BaseException("Configuration '"+e+"' conflicts with existing route '"+r.path+"'")})},t.prototype.recognize=function(t){var e=[];return this.matchers.forEach(function(r){var n=r.recognize(t);a.isPresent(n)&&e.push(n)}),0==e.length&&a.isPresent(t)&&t.auxiliary.length>0?[u.PromiseWrapper.resolve(new c.PathMatch(null,null,t.auxiliary))]:e},t.prototype.recognizeAuxiliary=function(t){var e=this.auxRoutes.get(t.path);return a.isPresent(e)?[e.recognize(t)]:[u.PromiseWrapper.resolve(null)]},t.prototype.hasRoute=function(t){return this.names.has(t)},t.prototype.componentLoaded=function(t){return this.hasRoute(t)&&a.isPresent(this.names.get(t).handler.componentType)},t.prototype.loadComponent=function(t){return this.names.get(t).handler.resolveComponentType()},t.prototype.generate=function(t,e){var r=this.names.get(t);return a.isBlank(r)?null:r.generate(e)},t.prototype.generateAuxiliary=function(t,e){var r=this.auxNames.get(t);return a.isBlank(r)?null:r.generate(e)},t}();return e.ComponentRecognizer=h,n.define=o,r.exports}),System.register("angular2/src/router/route_config_nomalizer",["angular2/src/router/route_config_decorator","angular2/src/facade/lang","angular2/src/facade/exceptions"],!0,function(t,e,r){function n(t,e){if(t instanceof u.AsyncRoute){var r=o(t.loader,e);return new u.AsyncRoute({path:t.path,loader:r,name:t.name,data:t.data,useAsDefault:t.useAsDefault})}if(t instanceof u.Route||t instanceof u.Redirect||t instanceof u.AuxRoute)return t;if(+!!t.component+ +!!t.redirectTo+ +!!t.loader!=1)throw new l.BaseException('Route config should contain exactly one "component", "loader", or "redirectTo" property.');if(t.as&&t.name)throw new l.BaseException('Route config should contain exactly one "as" or "name" property.');if(t.as&&(t.name=t.as),t.loader){var r=o(t.loader,e);returnLine truncated
|
||||
r=o?y:this._outlet.routerCanDeactivate(a),r.then(function(t){return 0==t?!1:f.isPresent(e._childRouter)?e._childRouter._routerCanDeactivate(n):!0})},t.prototype.commit=function(t,e){var r=this;void 0===e&&(e=!1),this._currentInstruction=t;var n=y;if(f.isPresent(this._outlet)&&f.isPresent(t.component)){var o=t.component;n=o.reuse?this._outlet.reuse(o):this.deactivate(t).then(function(t){return r._outlet.activate(o)}),f.isPresent(t.child)&&(n=n.then(function(e){return f.isPresent(r._childRouter)?r._childRouter.commit(t.child):void 0}))}var a=[];return this._auxRouters.forEach(function(e,r){f.isPresent(t.auxInstruction[r])&&a.push(e.commit(t.auxInstruction[r]))}),n.then(function(t){return l.PromiseWrapper.all(a)})},t.prototype._startNavigating=function(){this.navigating=!0},t.prototype._finishNavigating=function(){this.navigating=!1},t.prototype.subscribe=function(t){return l.ObservableWrapper.subscribe(this._subject,t)},t.prototype.deactivate=function(t){var e=this,r=null,n=null;f.isPresent(t)&&(r=t.child,n=t.component);var o=y;return f.isPresent(this._childRouter)&&(o=this._childRouter.deactivate(r)),f.isPresent(this._outlet)&&(o=o.then(function(t){return e._outlet.deactivate(n)})),o},t.prototype.recognize=function(t){var e=this._getAncestorInstructions();return this.registry.recognize(t,e)},t.prototype._getAncestorInstructions=function(){for(var t=[this._currentInstruction],e=this;f.isPresent(e=e.parent);)t.unshift(e._currentInstruction);return t},t.prototype.renavigate=function(){return f.isBlank(this.lastNavigationAttempt)?this._currentNavigation:this.navigateByUrl(this.lastNavigationAttempt)},t.prototype.generate=function(t){var e=this._getAncestorInstructions();return this.registry.generate(t,e)},t}();e.Router=R;var P=function(t){function e(e,r,n){var o=this;t.call(this,e,null,n),this._location=r,this._locationSub=this._location.subscribe(function(t){o.recognize(t.url).then(function(e){o.navigateByInstruction(e,f.isPresent(t.pop)).then(function(r){if(!f.isPresent(t.pop)||"hashchange"==t.type){var n=e.toUrlPath(),a=e.toUrlQuery();n.length>0&&(n="/"+n),"hashchange"==t.type?e.toRootUrl()!=o._location.path()&&o._location.replaceState(n,a):o._location.go(n,a)}})})}),this.registry.configFromComponent(n),this.navigateByUrl(r.path())}return i(e,t),e.prototype.commit=function(e,r){var n=this;void 0===r&&(r=!1);var o=e.toUrlPath(),a=e.toUrlQuery();o.length>0&&(o="/"+o);var i=t.prototype.commit.call(this,e);return r||(i=i.then(function(t){n._location.go(o,a)})),i},e.prototype.dispose=function(){f.isPresent(this._locationSub)&&(l.ObservableWrapper.dispose(this._locationSub),this._locationSub=null)},e=s([g.Injectable(),c(2,g.Inject(m.ROUTER_PRIMARY_COMPONENT)),u("design:paramtypes",[m.RouteRegistry,d.Location,f.Type])],e)}(R);e.RootRouter=P;var x=function(t){function e(e,r){t.call(this,e.registry,e,r),this.parent=e}return i(e,t),e.prototype.navigateByUrl=function(t,e){return void 0===e&&(e=!1),this.parent.navigateByUrl(t,e)},e.prototype.navigateByInstruction=function(t,e){return void 0===e&&(e=!1),this.parent.navigateByInstruction(t,e)},e}(R);return o.define=a,r.exports}),System.register("angular2/router",["angular2/src/router/router","angular2/src/router/router_outlet","angular2/src/router/router_link","angular2/src/router/instruction","angular2/src/router/platform_location","angular2/src/router/route_registry","angular2/src/router/location_strategy","angular2/src/router/hash_location_strategy","angular2/src/router/path_location_strategy","angular2/src/router/location","angular2/src/router/route_config_decorator","angular2/src/router/route_definition","angular2/src/router/lifecycle_annotations","angular2/src/router/instruction","angular2/core","angular2/src/router/router_providers_common","angular2/src/router/router_providers","angular2/src/router/router_outlet","angular2/src/router/router_link","angular2/src/facade/lang"],!0,function(t,e,r){function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}var o=System.global,a=o.define;o.define=void 0;var i=t("angular2/src/router/router");e.Router=i.Router;var s=t("angular2/src/router/router_outlet");e.RouterOutlet=s.RouterOutlet;var u=t("angular2/src/router/router_link");e.RouterLink=u.RouterLink;var c=t("angular2/src/router/instruction");e.RouteParams=c.RouteParams,e.RouteData=c.RouteData;var l=t("angular2/src/router/platform_location");e.PlatformLocation=l.PlatformLocation;var p=t("angular2/src/router/route_registry");e.RouteRegistry=p.RouteRegistry,e.ROUTER_PRIMARY_COMPONENT=p.ROUTER_PRIMARY_COMPONENT;var f=t("angular2/src/router/location_strategy");e.LocationStrategy=f.LocationStrategy,e.APP_BASE_HREF=f.APP_BASE_HREF;var h=t("angular2/src/router/hash_location_strategy");e.HashLocationStrategy=h.HashLocationStrategy;var g=t("angular2/src/router/path_location_strategy");e.PathLocationStrategy=g.PathLocationStrategy;var m=t("angular2/src/router/location");e.Location=m.Location,n(t("angular2/src/router/route_config_decorator")),n(t("angular2/src/router/route_definitLine truncated
|
||||
Generated
Vendored
-2097
File diff suppressed because it is too large.
Load diff
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["../dev/es5/angular2/src/mock/animation_builder_mock.js","../dev/es5/angular2/src/mock/directive_resolver_mock.js","../dev/es5/angular2/src/mock/view_resolver_mock.js","../dev/es5/angular2/src/router/location_strategy.js","../dev/es5/angular2/src/mock/ng_zone_mock.js","../dev/es5/angular2/src/testing/utils.js","../dev/es5/angular2/src/mock/mock_location_strategy.js","../dev/es5/angular2/src/testing/test_component_builder.js","../dev/es5/angular2/platform/testing/browser_static.js","../dev/es5/angular2/platform/testing/browser.js","../dev/es5/angular2/src/mock/location_mock.js","../dev/es5/angular2/router/testing.js","../dev/es5/angular2/src/http/headers.js","../dev/es5/angular2/src/http/enums.js","../dev/es5/angular2/src/http/http_utils.js","../dev/es5/angular2/src/http/static_request.js","../dev/es5/angular2/src/http/backends/mock_backend.js","../dev/es5/angular2/http/testing.js","../dev/es5/angular2/src/testing/fake_async.js","../dev/es5/angular2/src/mock/mock_application_ref.js","../dev/es5/angular2/src/testing/matchers.js","../dev/es5/angular2/src/compiler/xhr_mock.js","../dev/es5/angular2/src/testing/test_injector.js","../dev/es5/angular2/src/testing/testing.js","../dev/es5/angular2/testing.js"],"names":[],"mappings":";AAAA,KAAK,SAAS,AAAC,CAAC,0CAAyC,CAAG,EAAC,sBAAqB,CAAE,yCAAuC,CAAE,6CAA2C,CAAE,iCAA+B,CAAE,uCAAqC,CAAC,CAAG,KAAG,CAAG,UAAS,OAAM,CAAG,CAAA,OAAM,CAAG,CAAA,MAAK;AAA1R,AAAI,IAAA,CAAA,MAAK,EAAI,CAAA,MAAK,OAAO;AAAG,aAAO,EAAI,CAAA,MAAK,OAAO,CAAC;AACpD,OAAK,OAAO,EAAI,UAAQ,CAAC;AADzB,AAAI,IAAA,CAAA,SAAQ,EAAI,CAAA,CAAC,IAAG,GAAK,CAAA,IAAG,UAAU,CAAC,GAAK,UAAU,CAAA,CAAG,CAAA,CAAA,CAAG;AACxD,QAAS,GAAA,CAAA,CAAA,CAAA,EAAK,EAAA;AAAG,SAAI,CAAA,eAAe,AAAC,CAAC,CAAA,CAAC;AAAG,QAAA,CAAE,CAAA,CAAC,EAAI,CAAA,CAAA,CAAE,CAAA,CAAC,CAAC;AAAA,AACrD,WAAS,GAAC,CAAC,AAAC,CAAE;AAAE,SAAG,YAAY,EAAI,EAAA,CAAC;IAAE;AAAA,AACtC,IAAA,UAAU,EAAI,CAAA,CAAA,IAAM,KAAG,CAAA,CAAI,CAAA,MAAK,OAAO,AAAC,CAAC,CAAA,CAAC,CAAA,CAAI,EAAC,EAAC,UAAU,EAAI,CAAA,CAAA,UAAU,CAAG,IAAI,GAAC,AAAC,EAAT,AAAU,CAAC,CAAC;EACxF,CAAC;AACD,AAAI,IAAA,CAAA,UAAS,EAAI,CAAA,CAAC,IAAG,GAAK,CAAA,IAAG,WAAW,CAAC,GAAK,UAAU,UAAS,CAAG,CAAA,MAAK,CAAG,CAAA,GAAE,CAAG,CAAA,IAAG,CAAG;AACnF,AAAI,MAAA,CAAA,CAAA,EAAI,CAAA,SAAQ,OAAO;AAAG,QAAA,EAAI,CAAA,CAAA,EAAI,EAAA,CAAA,CAAI,OAAK,EAAI,CAAA,IAAG,IAAM,KAAG,CAAA,CAAI,CAAA,IAAG,EAAI,CAAA,MAAK,yBAAyB,AAAC,CAAC,MAAK,CAAG,IAAE,CAAC,CAAA,CAAI,KAAG;AAAG,QAAA,CAAC;AAC5H,OAAI,MAAO,QAAM,CAAA,GAAM,SAAO,CAAA,EAAK,CAAA,MAAO,QAAM,SAAS,CAAA,GAAM,WAAS;AAAG,MAAA,EAAI,CAAA,OAAM,SAAS,AAAC,CAAC,UAAS,CAAG,OAAK,CAAG,IAAE,CAAG,KAAG,CAAC,CAAC;;AACzH,UAAS,GAAA,CAAA,CAAA,EAAI,CAAA,UAAS,OAAO,EAAI,EAAA,CAAG,CAAA,CAAA,GAAK,EAAA,CAAG,CAAA,CAAA,EAAE;AAAG,WAAI,CAAA,EAAI,CAAA,UAAS,CAAE,CAAA,CAAC;AAAG,UAAA,EAAI,CAAA,CAAC,CAAA,EAAI,EAAA,CAAA,CAAI,CAAA,CAAA,AAAC,CAAC,CAAA,CAAC,CAAA,CAAI,CAAA,CAAA,EAAI,EAAA,CAAA,CAAI,CAAA,CAAA,AAAC,CAAC,MAAK,CAAG,IAAE,CAAG,EAAA,CAAC,CAAA,CAAI,CAAA,CAAA,AAAC,CAAC,MAAK,CAAG,IAAE,CAAC,CAAC,GAAK,EAAA,CAAC;AAAA,AACjJ,SAAO,CAAA,CAAA,EAAI,EAAA,CAAA,EAAK,EAAA,CAAA,EAAK,CAAA,MAAK,eAAe,AAAC,CAAC,MAAK,CAAG,IAAE,CAAG,EAAA,CAAC,CAAG,EAAA,CAAC;EACjE,CAAC;AACD,AAAI,IAAA,CAAA,UAAS,EAAI,CAAA,CAAC,IAAG,GAAK,CAAA,IAAG,WAAW,CAAC,GAAK,UAAU,CAAA,CAAG,CAAA,CAAA,CAAG;AAC1D,OAAI,MAAO,QAAM,CAAA,GAAM,SAAO,CAAA,EAAK,CAAA,MAAO,QAAM,SAAS,CAAA,GAAM,WAAS;AAAG,WAAO,CAAA,OAAM,SAAS,AAAC,CAAC,CAAA,CAAG,EAAA,CAAC,CAAC;AAAA,EAC5G,CAAC;AACD,AAAI,IAAA,CAAA,IAAG,EAAI,CAAA,OAAM,AAAC,CAAC,sBAAqB,CAAC,CAAC;AAC1C,AAAI,IAAA,CAAA,mBAAkB,EAAI,CAAA,OAAM,AAAC,CAAC,wCAAuC,CAAC,CAAC;AAC3E,AAAI,IAAA,CAAA,uBAAsB,EAAI,CAAA,OAAM,AAAC,CAAC,4CAA2C,CAAC,CAAC;AACnF,AAAI,IAAA,CAAA,WAAU,EAAI,CAAA,OAAM,AAAC,CAAC,gCAA+B,CAAC,CAAC;AAC3D,AAAI,IAAA,CAAA,iBAAgB,EAAI,CAAA,OAAM,AAAC,CAAC,sCAAqC,CAAC,CAAC;AACvE,AAAI,IAAA,CAAA,oBAAmB,EAAI,CAAA,CAAC,SAAU,MAAK,CAAG;AAC1C,YAAQ,AAAC,CAAC,oBAAmB,CAAG,OAAK,CAAC,CAAC;AACvC,WAAS,qBAAmB,CAAC,AAAC,CAAE;AAC5B,WAAK,KAAK,AAAC,CAAC,IAAG,CAAG,KAAG,CAAC,CAAC;IAC3B;AAAA,AACA,uBAAmB,UAAU,IAAI,EAAI,UAAS,AAAC,CAAE;AAAE,WAAO,IAAI,wBAAsB,AAAC,EAAC,CAAC;IAAE,CAAC;AAC1F,uBAAmB,EAAI,CAAA,UAAS,AAAC,CAAC,CAC9B,IAAG,WAAW,AAAC,EAAC,CAChB,CAAA,UAAS,AAAC,CAAC,mBAAkB,CAAG,GAAC,CAAC,CACtC,CAAG,qBAAmB,CAAC,CAAC;AACxB,SAAO,qBAAmB,CAAC;EAC/B,CAAC,AAAC,CAAC,mBAAkB,iBAAiB,CAAC,CAAC;AACxC,QAAM,qBAAqB,EAAI,qBAAmB,CAAC;AACnD,AAAI,IAAA,CAAA,uBAAsB,EAAI,CAAA,CAAC,SAAU,MAAK,CAAG;AAC7C,YAAQ,AAAC,CAAC,uBAAsB,CAAG,OAAK,CAAC,CAAC;AAC1C,WAAS,wBAAsB,CAAC,AAAC,CAAE;AAC/B,WAAK,KAAK,AAAC,CAAC,IAAG,CAAG,KAAG,CAAC,CAAC;IAC3B;AAAA,AACA,0BAAsB,UAAU,MAAM,EAAI,UAAU,OAAM,CAAG;AAAE,WAAO,IAAI,cAAY,AAAC,CAAC,OAAM,CAAG,CAAA,IAAG,KAAK,CAAC,CAAC;IAAE,CAAC;AAC9G,SAAO,wBAAsB,CAAC;EAClC,CAAC,AAAC,CAAC,uBAAsB,oBAAoB,CAAC,CAAC;AAC/C,AAAI,IAAA,CAAA,sBAAqB,EAAI,CAAA,CAAC,SAAU,MAAK,CAAG;AAC5C,YAAQ,AAAC,CAAC,sBAAqB,CAAG,OAAK,CAAC,CAAC;AACzC,WAAS,uBAAqB,CAAC,AAAC,CAAE;AAC9B,WAAK,MAAM,AAAC,CAAC,IAAG,CAAG,UAAQ,CAAC,CAAC;IACjC;AAAA,AACA,yBAAqB,UAAU,6BAA6B,EAAI,UAAS,AAAC,CAAE;AAAE,SAAG,yBAAyB,EAAI,MAAI,CAAC;IAAE,CAAC;AACtH,SAAO,uBAAqB,CAAC;EACjC,CAAC,AAAC,CAAC,iBAAgB,eAAe,CAAC,CAAC;AACpC,AAAI,IAAA,CAAA,aAAYLine truncated
|
||||
Generated
Vendored
-668
@@ -1,668 +0,0 @@
|
||||
// Type definitions for es6-shim v0.31.2
|
||||
// Project: https://github.com/paulmillr/es6-shim
|
||||
// Definitions by: Ron Buckton <http://github.com/rbuckton>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare type PropertyKey = string | number | symbol;
|
||||
|
||||
interface IteratorResult<T> {
|
||||
done: boolean;
|
||||
value?: T;
|
||||
}
|
||||
|
||||
interface IterableShim<T> {
|
||||
/**
|
||||
* Shim for an ES6 iterable. Not intended for direct use by user code.
|
||||
*/
|
||||
"_es6-shim iterator_"(): Iterator<T>;
|
||||
}
|
||||
|
||||
interface Iterator<T> {
|
||||
next(value?: any): IteratorResult<T>;
|
||||
return?(value?: any): IteratorResult<T>;
|
||||
throw?(e?: any): IteratorResult<T>;
|
||||
}
|
||||
|
||||
interface IterableIteratorShim<T> extends IterableShim<T>, Iterator<T> {
|
||||
/**
|
||||
* Shim for an ES6 iterable iterator. Not intended for direct use by user code.
|
||||
*/
|
||||
"_es6-shim iterator_"(): IterableIteratorShim<T>;
|
||||
}
|
||||
|
||||
interface StringConstructor {
|
||||
/**
|
||||
* Return the String value whose elements are, in order, the elements in the List elements.
|
||||
* If length is 0, the empty string is returned.
|
||||
*/
|
||||
fromCodePoint(...codePoints: number[]): string;
|
||||
|
||||
/**
|
||||
* String.raw is intended for use as a tag function of a Tagged Template String. When called
|
||||
* as such the first argument will be a well formed template call site object and the rest
|
||||
* parameter will contain the substitution values.
|
||||
* @param template A well-formed template string call site representation.
|
||||
* @param substitutions A set of substitution values.
|
||||
*/
|
||||
raw(template: TemplateStringsArray, ...substitutions: any[]): string;
|
||||
}
|
||||
|
||||
interface String {
|
||||
/**
|
||||
* Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
|
||||
* value of the UTF-16 encoded code point starting at the string element at position pos in
|
||||
* the String resulting from converting this object to a String.
|
||||
* If there is no element at that position, the result is undefined.
|
||||
* If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
|
||||
*/
|
||||
codePointAt(pos: number): number;
|
||||
|
||||
/**
|
||||
* Returns true if searchString appears as a substring of the result of converting this
|
||||
* object to a String, at one or more positions that are
|
||||
* greater than or equal to position; otherwise, returns false.
|
||||
* @param searchString search string
|
||||
* @param position If position is undefined, 0 is assumed, so as to search all of the String.
|
||||
*/
|
||||
includes(searchString: string, position?: number): boolean;
|
||||
|
||||
/**
|
||||
* Returns true if the sequence of elements of searchString converted to a String is the
|
||||
* same as the corresponding elements of this object (converted to a String) starting at
|
||||
* endPosition – length(this). Otherwise returns false.
|
||||
*/
|
||||
endsWith(searchString: string, endPosition?: number): boolean;
|
||||
|
||||
/**
|
||||
* Returns a String value that is made from count copies appended together. If count is 0,
|
||||
* T is the empty String is returned.
|
||||
* @param count number of copies to append
|
||||
*/
|
||||
repeat(count: number): string;
|
||||
|
||||
/**
|
||||
* Returns true if the sequence of elements of searchString converted to a String is the
|
||||
* same as the corresponding elements of this object (converted to a String) starting at
|
||||
* position. Otherwise returns false.
|
||||
*/
|
||||
startsWith(searchString: string, position?: number): boolean;
|
||||
|
||||
/**
|
||||
* Returns an <a> HTML anchor element and sets the name attribute to the text value
|
||||
* @param name
|
||||
*/
|
||||
anchor(name: string): string;
|
||||
|
||||
/** Returns a <big> HTML element */
|
||||
big(): string;
|
||||
|
||||
/** Returns a <blink> HTML element */
|
||||
blink(): string;
|
||||
|
||||
/** Returns a <b> HTML element */
|
||||
bold(): string;
|
||||
|
||||
/** Returns a <tt> HTML element */
|
||||
fixed(): string
|
||||
|
||||
/** Returns a <font> HTML element and sets the color attribute value */
|
||||
fontcolor(color: string): string
|
||||
|
||||
/** Returns a <font> HTML element and sets the size attribute value */
|
||||
fontsize(size: number): string;
|
||||
|
||||
/** Returns a <font> HTML element and sets the size attribute value */
|
||||
fontsize(size: string): string;
|
||||
|
||||
/** Returns an <i> HTML element */
|
||||
italics(): string;
|
||||
|
||||
/** Returns an <a> HTML element and sets the href attribute value */
|
||||
link(url: string): string;
|
||||
|
||||
/** Returns a <small> HTML element */
|
||||
small(): string;
|
||||
|
||||
/** Returns a <strike> HTML element */
|
||||
strike(): string;
|
||||
|
||||
/** Returns a <sub> HTML element */
|
||||
sub(): string;
|
||||
|
||||
/** Returns a <sup> HTML element */
|
||||
sup(): string;
|
||||
|
||||
/**
|
||||
* Shim for an ES6 iterable. Not intended for direct use by user code.
|
||||
*/
|
||||
"_es6-shim iterator_"(): IterableIteratorShim<string>;
|
||||
}
|
||||
|
||||
interface ArrayConstructor {
|
||||
/**
|
||||
* Creates an array from an array-like object.
|
||||
* @param arrayLike An array-like object to convert to an array.
|
||||
* @param mapfn A mapping function to call on every element of the array.
|
||||
* @param thisArg Value of 'this' used to invoke the mapfn.
|
||||
*/
|
||||
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): Array<U>;
|
||||
|
||||
/**
|
||||
* Creates an array from an iterable object.
|
||||
* @param iterable An iterable object to convert to an array.
|
||||
* @param mapfn A mapping function to call on every element of the array.
|
||||
* @param thisArg Value of 'this' used to invoke the mapfn.
|
||||
*/
|
||||
from<T, U>(iterable: IterableShim<T>, mapfn: (v: T, k: number) => U, thisArg?: any): Array<U>;
|
||||
|
||||
/**
|
||||
* Creates an array from an array-like object.
|
||||
* @param arrayLike An array-like object to convert to an array.
|
||||
*/
|
||||
from<T>(arrayLike: ArrayLike<T>): Array<T>;
|
||||
|
||||
/**
|
||||
* Creates an array from an iterable object.
|
||||
* @param iterable An iterable object to convert to an array.
|
||||
*/
|
||||
from<T>(iterable: IterableShim<T>): Array<T>;
|
||||
|
||||
/**
|
||||
* Returns a new array from a set of elements.
|
||||
* @param items A set of elements to include in the new array object.
|
||||
*/
|
||||
of<T>(...items: T[]): Array<T>;
|
||||
}
|
||||
|
||||
interface Array<T> {
|
||||
/**
|
||||
* Returns the value of the first element in the array where predicate is true, and undefined
|
||||
* otherwise.
|
||||
* @param predicate find calls predicate once for each element of the array, in ascending
|
||||
* order, until it finds one where predicate returns true. If such an element is found, find
|
||||
* immediately returns that element value. Otherwise, find returns undefined.
|
||||
* @param thisArg If provided, it will be used as the this value for each invocation of
|
||||
* predicate. If it is not provided, undefined is used instead.
|
||||
*/
|
||||
find(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): T;
|
||||
|
||||
/**
|
||||
* Returns the index of the first element in the array where predicate is true, and undefined
|
||||
* otherwise.
|
||||
* @param predicate find calls predicate once for each element of the array, in ascending
|
||||
* order, until it finds one where predicate returns true. If such an element is found, find
|
||||
* immediately returns that element value. Otherwise, find returns undefined.
|
||||
* @param thisArg If provided, it will be used as the this value for each invocation of
|
||||
* predicate. If it is not provided, undefined is used instead.
|
||||
*/
|
||||
findIndex(predicate: (value: T) => boolean, thisArg?: any): number;
|
||||
|
||||
/**
|
||||
* Returns the this object after filling the section identified by start and end with value
|
||||
* @param value value to fill array section with
|
||||
* @param start index to start filling the array at. If start is negative, it is treated as
|
||||
* length+start where length is the length of the array.
|
||||
* @param end index to stop filling the array at. If end is negative, it is treated as
|
||||
* length+end.
|
||||
*/
|
||||
fill(value: T, start?: number, end?: number): T[];
|
||||
|
||||
/**
|
||||
* Returns the this object after copying a section of the array identified by start and end
|
||||
* to the same array starting at position target
|
||||
* @param target If target is negative, it is treated as length+target where length is the
|
||||
* length of the array.
|
||||
* @param start If start is negative, it is treated as length+start. If end is negative, it
|
||||
* is treated as length+end.
|
||||
* @param end If not specified, length of the this object is used as its default value.
|
||||
*/
|
||||
copyWithin(target: number, start: number, end?: number): T[];
|
||||
|
||||
/**
|
||||
* Returns an array of key, value pairs for every entry in the array
|
||||
*/
|
||||
entries(): IterableIteratorShim<[number, T]>;
|
||||
|
||||
/**
|
||||
* Returns an list of keys in the array
|
||||
*/
|
||||
keys(): IterableIteratorShim<number>;
|
||||
|
||||
/**
|
||||
* Returns an list of values in the array
|
||||
*/
|
||||
values(): IterableIteratorShim<T>;
|
||||
|
||||
/**
|
||||
* Shim for an ES6 iterable. Not intended for direct use by user code.
|
||||
*/
|
||||
"_es6-shim iterator_"(): IterableIteratorShim<T>;
|
||||
}
|
||||
|
||||
interface NumberConstructor {
|
||||
/**
|
||||
* The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1
|
||||
* that is representable as a Number value, which is approximately:
|
||||
* 2.2204460492503130808472633361816 x 10−16.
|
||||
*/
|
||||
EPSILON: number;
|
||||
|
||||
/**
|
||||
* Returns true if passed value is finite.
|
||||
* Unlike the global isFininte, Number.isFinite doesn't forcibly convert the parameter to a
|
||||
* number. Only finite values of the type number, result in true.
|
||||
* @param number A numeric value.
|
||||
*/
|
||||
isFinite(number: number): boolean;
|
||||
|
||||
/**
|
||||
* Returns true if the value passed is an integer, false otherwise.
|
||||
* @param number A numeric value.
|
||||
*/
|
||||
isInteger(number: number): boolean;
|
||||
|
||||
/**
|
||||
* Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
|
||||
* number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter
|
||||
* to a number. Only values of the type number, that are also NaN, result in true.
|
||||
* @param number A numeric value.
|
||||
*/
|
||||
isNaN(number: number): boolean;
|
||||
|
||||
/**
|
||||
* Returns true if the value passed is a safe integer.
|
||||
* @param number A numeric value.
|
||||
*/
|
||||
isSafeInteger(number: number): boolean;
|
||||
|
||||
/**
|
||||
* The value of the largest integer n such that n and n + 1 are both exactly representable as
|
||||
* a Number value.
|
||||
* The value of Number.MIN_SAFE_INTEGER is 9007199254740991 2^53 − 1.
|
||||
*/
|
||||
MAX_SAFE_INTEGER: number;
|
||||
|
||||
/**
|
||||
* The value of the smallest integer n such that n and n − 1 are both exactly representable as
|
||||
* a Number value.
|
||||
* The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).
|
||||
*/
|
||||
MIN_SAFE_INTEGER: number;
|
||||
|
||||
/**
|
||||
* Converts a string to a floating-point number.
|
||||
* @param string A string that contains a floating-point number.
|
||||
*/
|
||||
parseFloat(string: string): number;
|
||||
|
||||
/**
|
||||
* Converts A string to an integer.
|
||||
* @param s A string to convert into a number.
|
||||
* @param radix A value between 2 and 36 that specifies the base of the number in numString.
|
||||
* If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
|
||||
* All other strings are considered decimal.
|
||||
*/
|
||||
parseInt(string: string, radix?: number): number;
|
||||
}
|
||||
|
||||
interface ObjectConstructor {
|
||||
/**
|
||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
||||
* target object. Returns the target object.
|
||||
* @param target The target object to copy to.
|
||||
* @param sources One or more source objects to copy properties from.
|
||||
*/
|
||||
assign(target: any, ...sources: any[]): any;
|
||||
|
||||
/**
|
||||
* Returns true if the values are the same value, false otherwise.
|
||||
* @param value1 The first value.
|
||||
* @param value2 The second value.
|
||||
*/
|
||||
is(value1: any, value2: any): boolean;
|
||||
|
||||
/**
|
||||
* Sets the prototype of a specified object o to object proto or null. Returns the object o.
|
||||
* @param o The object to change its prototype.
|
||||
* @param proto The value of the new prototype or null.
|
||||
* @remarks Requires `__proto__` support.
|
||||
*/
|
||||
setPrototypeOf(o: any, proto: any): any;
|
||||
}
|
||||
|
||||
interface RegExp {
|
||||
/**
|
||||
* Returns a string indicating the flags of the regular expression in question. This field is read-only.
|
||||
* The characters in this string are sequenced and concatenated in the following order:
|
||||
*
|
||||
* - "g" for global
|
||||
* - "i" for ignoreCase
|
||||
* - "m" for multiline
|
||||
* - "u" for unicode
|
||||
* - "y" for sticky
|
||||
*
|
||||
* If no flags are set, the value is the empty string.
|
||||
*/
|
||||
flags: string;
|
||||
}
|
||||
|
||||
interface Math {
|
||||
/**
|
||||
* Returns the number of leading zero bits in the 32-bit binary representation of a number.
|
||||
* @param x A numeric expression.
|
||||
*/
|
||||
clz32(x: number): number;
|
||||
|
||||
/**
|
||||
* Returns the result of 32-bit multiplication of two numbers.
|
||||
* @param x First number
|
||||
* @param y Second number
|
||||
*/
|
||||
imul(x: number, y: number): number;
|
||||
|
||||
/**
|
||||
* Returns the sign of the x, indicating whether x is positive, negative or zero.
|
||||
* @param x The numeric expression to test
|
||||
*/
|
||||
sign(x: number): number;
|
||||
|
||||
/**
|
||||
* Returns the base 10 logarithm of a number.
|
||||
* @param x A numeric expression.
|
||||
*/
|
||||
log10(x: number): number;
|
||||
|
||||
/**
|
||||
* Returns the base 2 logarithm of a number.
|
||||
* @param x A numeric expression.
|
||||
*/
|
||||
log2(x: number): number;
|
||||
|
||||
/**
|
||||
* Returns the natural logarithm of 1 + x.
|
||||
* @param x A numeric expression.
|
||||
*/
|
||||
log1p(x: number): number;
|
||||
|
||||
/**
|
||||
* Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of
|
||||
* the natural logarithms).
|
||||
* @param x A numeric expression.
|
||||
*/
|
||||
expm1(x: number): number;
|
||||
|
||||
/**
|
||||
* Returns the hyperbolic cosine of a number.
|
||||
* @param x A numeric expression that contains an angle measured in radians.
|
||||
*/
|
||||
cosh(x: number): number;
|
||||
|
||||
/**
|
||||
* Returns the hyperbolic sine of a number.
|
||||
* @param x A numeric expression that contains an angle measured in radians.
|
||||
*/
|
||||
sinh(x: number): number;
|
||||
|
||||
/**
|
||||
* Returns the hyperbolic tangent of a number.
|
||||
* @param x A numeric expression that contains an angle measured in radians.
|
||||
*/
|
||||
tanh(x: number): number;
|
||||
|
||||
/**
|
||||
* Returns the inverse hyperbolic cosine of a number.
|
||||
* @param x A numeric expression that contains an angle measured in radians.
|
||||
*/
|
||||
acosh(x: number): number;
|
||||
|
||||
/**
|
||||
* Returns the inverse hyperbolic sine of a number.
|
||||
* @param x A numeric expression that contains an angle measured in radians.
|
||||
*/
|
||||
asinh(x: number): number;
|
||||
|
||||
/**
|
||||
* Returns the inverse hyperbolic tangent of a number.
|
||||
* @param x A numeric expression that contains an angle measured in radians.
|
||||
*/
|
||||
atanh(x: number): number;
|
||||
|
||||
/**
|
||||
* Returns the square root of the sum of squares of its arguments.
|
||||
* @param values Values to compute the square root for.
|
||||
* If no arguments are passed, the result is +0.
|
||||
* If there is only one argument, the result is the absolute value.
|
||||
* If any argument is +Infinity or -Infinity, the result is +Infinity.
|
||||
* If any argument is NaN, the result is NaN.
|
||||
* If all arguments are either +0 or −0, the result is +0.
|
||||
*/
|
||||
hypot(...values: number[]): number;
|
||||
|
||||
/**
|
||||
* Returns the integral part of the a numeric expression, x, removing any fractional digits.
|
||||
* If x is already an integer, the result is x.
|
||||
* @param x A numeric expression.
|
||||
*/
|
||||
trunc(x: number): number;
|
||||
|
||||
/**
|
||||
* Returns the nearest single precision float representation of a number.
|
||||
* @param x A numeric expression.
|
||||
*/
|
||||
fround(x: number): number;
|
||||
|
||||
/**
|
||||
* Returns an implementation-dependent approximation to the cube root of number.
|
||||
* @param x A numeric expression.
|
||||
*/
|
||||
cbrt(x: number): number;
|
||||
}
|
||||
|
||||
interface PromiseLike<T> {
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>;
|
||||
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): PromiseLike<TResult>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the completion of an asynchronous operation
|
||||
*/
|
||||
interface Promise<T> {
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>;
|
||||
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): Promise<TResult>;
|
||||
|
||||
/**
|
||||
* Attaches a callback for only the rejection of the Promise.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of the callback.
|
||||
*/
|
||||
catch(onrejected?: (reason: any) => T | PromiseLike<T>): Promise<T>;
|
||||
catch(onrejected?: (reason: any) => void): Promise<T>;
|
||||
}
|
||||
|
||||
interface PromiseConstructor {
|
||||
/**
|
||||
* A reference to the prototype.
|
||||
*/
|
||||
prototype: Promise<any>;
|
||||
|
||||
/**
|
||||
* Creates a new Promise.
|
||||
* @param executor A callback used to initialize the promise. This callback is passed two arguments:
|
||||
* a resolve callback used resolve the promise with a value or the result of another promise,
|
||||
* and a reject callback used to reject the promise with a provided reason or error.
|
||||
*/
|
||||
new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
|
||||
|
||||
/**
|
||||
* Creates a Promise that is resolved with an array of results when all of the provided Promises
|
||||
* resolve, or rejected when any Promise is rejected.
|
||||
* @param values An array of Promises.
|
||||
* @returns A new Promise.
|
||||
*/
|
||||
all<T>(values: IterableShim<T | PromiseLike<T>>): Promise<T[]>;
|
||||
|
||||
/**
|
||||
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
|
||||
* or rejected.
|
||||
* @param values An array of Promises.
|
||||
* @returns A new Promise.
|
||||
*/
|
||||
race<T>(values: IterableShim<T | PromiseLike<T>>): Promise<T>;
|
||||
|
||||
/**
|
||||
* Creates a new rejected promise for the provided reason.
|
||||
* @param reason The reason the promise was rejected.
|
||||
* @returns A new rejected Promise.
|
||||
*/
|
||||
reject(reason: any): Promise<void>;
|
||||
|
||||
/**
|
||||
* Creates a new rejected promise for the provided reason.
|
||||
* @param reason The reason the promise was rejected.
|
||||
* @returns A new rejected Promise.
|
||||
*/
|
||||
reject<T>(reason: any): Promise<T>;
|
||||
|
||||
/**
|
||||
* Creates a new resolved promise for the provided value.
|
||||
* @param value A promise.
|
||||
* @returns A promise whose internal state matches the provided promise.
|
||||
*/
|
||||
resolve<T>(value: T | PromiseLike<T>): Promise<T>;
|
||||
|
||||
/**
|
||||
* Creates a new resolved promise .
|
||||
* @returns A resolved promise.
|
||||
*/
|
||||
resolve(): Promise<void>;
|
||||
}
|
||||
|
||||
declare var Promise: PromiseConstructor;
|
||||
|
||||
interface Map<K, V> {
|
||||
clear(): void;
|
||||
delete(key: K): boolean;
|
||||
forEach(callbackfn: (value: V, index: K, map: Map<K, V>) => void, thisArg?: any): void;
|
||||
get(key: K): V;
|
||||
has(key: K): boolean;
|
||||
set(key: K, value?: V): Map<K, V>;
|
||||
size: number;
|
||||
entries(): IterableIteratorShim<[K, V]>;
|
||||
keys(): IterableIteratorShim<K>;
|
||||
values(): IterableIteratorShim<V>;
|
||||
}
|
||||
|
||||
interface MapConstructor {
|
||||
new <K, V>(): Map<K, V>;
|
||||
new <K, V>(iterable: IterableShim<[K, V]>): Map<K, V>;
|
||||
prototype: Map<any, any>;
|
||||
}
|
||||
|
||||
declare var Map: MapConstructor;
|
||||
|
||||
interface Set<T> {
|
||||
add(value: T): Set<T>;
|
||||
clear(): void;
|
||||
delete(value: T): boolean;
|
||||
forEach(callbackfn: (value: T, index: T, set: Set<T>) => void, thisArg?: any): void;
|
||||
has(value: T): boolean;
|
||||
size: number;
|
||||
entries(): IterableIteratorShim<[T, T]>;
|
||||
keys(): IterableIteratorShim<T>;
|
||||
values(): IterableIteratorShim<T>;
|
||||
}
|
||||
|
||||
interface SetConstructor {
|
||||
new <T>(): Set<T>;
|
||||
new <T>(iterable: IterableShim<T>): Set<T>;
|
||||
prototype: Set<any>;
|
||||
}
|
||||
|
||||
declare var Set: SetConstructor;
|
||||
|
||||
interface WeakMap<K, V> {
|
||||
delete(key: K): boolean;
|
||||
get(key: K): V;
|
||||
has(key: K): boolean;
|
||||
set(key: K, value?: V): WeakMap<K, V>;
|
||||
}
|
||||
|
||||
interface WeakMapConstructor {
|
||||
new <K, V>(): WeakMap<K, V>;
|
||||
new <K, V>(iterable: IterableShim<[K, V]>): WeakMap<K, V>;
|
||||
prototype: WeakMap<any, any>;
|
||||
}
|
||||
|
||||
declare var WeakMap: WeakMapConstructor;
|
||||
|
||||
interface WeakSet<T> {
|
||||
add(value: T): WeakSet<T>;
|
||||
delete(value: T): boolean;
|
||||
has(value: T): boolean;
|
||||
}
|
||||
|
||||
interface WeakSetConstructor {
|
||||
new <T>(): WeakSet<T>;
|
||||
new <T>(iterable: IterableShim<T>): WeakSet<T>;
|
||||
prototype: WeakSet<any>;
|
||||
}
|
||||
|
||||
declare var WeakSet: WeakSetConstructor;
|
||||
|
||||
declare module Reflect {
|
||||
function apply(target: Function, thisArgument: any, argumentsList: ArrayLike<any>): any;
|
||||
function construct(target: Function, argumentsList: ArrayLike<any>): any;
|
||||
function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean;
|
||||
function deleteProperty(target: any, propertyKey: PropertyKey): boolean;
|
||||
function enumerate(target: any): IterableIteratorShim<any>;
|
||||
function get(target: any, propertyKey: PropertyKey, receiver?: any): any;
|
||||
function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor;
|
||||
function getPrototypeOf(target: any): any;
|
||||
function has(target: any, propertyKey: PropertyKey): boolean;
|
||||
function isExtensible(target: any): boolean;
|
||||
function ownKeys(target: any): Array<PropertyKey>;
|
||||
function preventExtensions(target: any): boolean;
|
||||
function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
|
||||
function setPrototypeOf(target: any, proto: any): boolean;
|
||||
}
|
||||
|
||||
declare module "es6-shim" {
|
||||
var String: StringConstructor;
|
||||
var Array: ArrayConstructor;
|
||||
var Number: NumberConstructor;
|
||||
var Math: Math;
|
||||
var Object: ObjectConstructor;
|
||||
var Map: MapConstructor;
|
||||
var Set: SetConstructor;
|
||||
var WeakMap: WeakMapConstructor;
|
||||
var WeakSet: WeakSetConstructor;
|
||||
var Promise: PromiseConstructor;
|
||||
module Reflect {
|
||||
function apply(target: Function, thisArgument: any, argumentsList: ArrayLike<any>): any;
|
||||
function construct(target: Function, argumentsList: ArrayLike<any>): any;
|
||||
function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean;
|
||||
function deleteProperty(target: any, propertyKey: PropertyKey): boolean;
|
||||
function enumerate(target: any): Iterator<any>;
|
||||
function get(target: any, propertyKey: PropertyKey, receiver?: any): any;
|
||||
function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor;
|
||||
function getPrototypeOf(target: any): any;
|
||||
function has(target: any, propertyKey: PropertyKey): boolean;
|
||||
function isExtensible(target: any): boolean;
|
||||
function ownKeys(target: any): Array<PropertyKey>;
|
||||
function preventExtensions(target: any): boolean;
|
||||
function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
|
||||
function setPrototypeOf(target: any, proto: any): boolean;
|
||||
}
|
||||
}
|
||||
Generated
Vendored
-534
@@ -1,534 +0,0 @@
|
||||
// Type definitions for Jasmine 2.2
|
||||
// Project: http://jasmine.github.io/
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>, Theodore Brown <https://github.com/theodorejb>, David Pärsson <https://github.com/davidparsson/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
// For ddescribe / iit use : https://github.com/borisyankov/DefinitelyTyped/blob/master/karma-jasmine/karma-jasmine.d.ts
|
||||
|
||||
declare function describe(description: string, specDefinitions: () => void): void;
|
||||
declare function fdescribe(description: string, specDefinitions: () => void): void;
|
||||
declare function xdescribe(description: string, specDefinitions: () => void): void;
|
||||
|
||||
declare function it(expectation: string, assertion?: () => void, timeout?: number): void;
|
||||
declare function it(expectation: string, assertion?: (done: () => void) => void, timeout?: number): void;
|
||||
declare function fit(expectation: string, assertion?: () => void, timeout?: number): void;
|
||||
declare function fit(expectation: string, assertion?: (done: () => void) => void, timeout?: number): void;
|
||||
declare function xit(expectation: string, assertion?: () => void, timeout?: number): void;
|
||||
declare function xit(expectation: string, assertion?: (done: () => void) => void, timeout?: number): void;
|
||||
|
||||
/** If you call the function pending anywhere in the spec body, no matter the expectations, the spec will be marked pending. */
|
||||
declare function pending(reason?: string): void;
|
||||
|
||||
declare function beforeEach(action: () => void, timeout?: number): void;
|
||||
declare function beforeEach(action: (done: () => void) => void, timeout?: number): void;
|
||||
declare function afterEach(action: () => void, timeout?: number): void;
|
||||
declare function afterEach(action: (done: () => void) => void, timeout?: number): void;
|
||||
|
||||
declare function beforeAll(action: () => void, timeout?: number): void;
|
||||
declare function beforeAll(action: (done: () => void) => void, timeout?: number): void;
|
||||
declare function afterAll(action: () => void, timeout?: number): void;
|
||||
declare function afterAll(action: (done: () => void) => void, timeout?: number): void;
|
||||
|
||||
declare function expect(spy: Function): jasmine.Matchers;
|
||||
declare function expect(actual: any): jasmine.Matchers;
|
||||
|
||||
declare function fail(e?: any): void;
|
||||
|
||||
declare function spyOn(object: any, method: string): jasmine.Spy;
|
||||
|
||||
declare function runs(asyncMethod: Function): void;
|
||||
declare function waitsFor(latchMethod: () => boolean, failureMessage?: string, timeout?: number): void;
|
||||
declare function waits(timeout?: number): void;
|
||||
|
||||
declare module jasmine {
|
||||
|
||||
var clock: () => Clock;
|
||||
|
||||
function any(aclass: any): Any;
|
||||
function anything(): Any;
|
||||
function arrayContaining(sample: any[]): ArrayContaining;
|
||||
function objectContaining(sample: any): ObjectContaining;
|
||||
function createSpy(name: string, originalFn?: Function): Spy;
|
||||
function createSpyObj(baseName: string, methodNames: any[]): any;
|
||||
function createSpyObj<T>(baseName: string, methodNames: any[]): T;
|
||||
function pp(value: any): string;
|
||||
function getEnv(): Env;
|
||||
function addCustomEqualityTester(equalityTester: CustomEqualityTester): void;
|
||||
function addMatchers(matchers: CustomMatcherFactories): void;
|
||||
function stringMatching(str: string): Any;
|
||||
function stringMatching(str: RegExp): Any;
|
||||
|
||||
interface Any {
|
||||
|
||||
new (expectedClass: any): any;
|
||||
|
||||
jasmineMatches(other: any): boolean;
|
||||
jasmineToString(): string;
|
||||
}
|
||||
|
||||
// taken from TypeScript lib.core.es6.d.ts, applicable to CustomMatchers.contains()
|
||||
interface ArrayLike<T> {
|
||||
length: number;
|
||||
[n: number]: T;
|
||||
}
|
||||
|
||||
interface ArrayContaining {
|
||||
new (sample: any[]): any;
|
||||
|
||||
asymmetricMatch(other: any): boolean;
|
||||
jasmineToString(): string;
|
||||
}
|
||||
|
||||
interface ObjectContaining {
|
||||
new (sample: any): any;
|
||||
|
||||
jasmineMatches(other: any, mismatchKeys: any[], mismatchValues: any[]): boolean;
|
||||
jasmineToString(): string;
|
||||
}
|
||||
|
||||
interface Block {
|
||||
|
||||
new (env: Env, func: SpecFunction, spec: Spec): any;
|
||||
|
||||
execute(onComplete: () => void): void;
|
||||
}
|
||||
|
||||
interface WaitsBlock extends Block {
|
||||
new (env: Env, timeout: number, spec: Spec): any;
|
||||
}
|
||||
|
||||
interface WaitsForBlock extends Block {
|
||||
new (env: Env, timeout: number, latchFunction: SpecFunction, message: string, spec: Spec): any;
|
||||
}
|
||||
|
||||
interface Clock {
|
||||
install(): void;
|
||||
uninstall(): void;
|
||||
/** Calls to any registered callback are triggered when the clock is ticked forward via the jasmine.clock().tick function, which takes a number of milliseconds. */
|
||||
tick(ms: number): void;
|
||||
mockDate(date?: Date): void;
|
||||
}
|
||||
|
||||
interface CustomEqualityTester {
|
||||
(first: any, second: any): boolean;
|
||||
}
|
||||
|
||||
interface CustomMatcher {
|
||||
compare<T>(actual: T, expected: T): CustomMatcherResult;
|
||||
compare(actual: any, expected: any): CustomMatcherResult;
|
||||
}
|
||||
|
||||
interface CustomMatcherFactory {
|
||||
(util: MatchersUtil, customEqualityTesters: Array<CustomEqualityTester>): CustomMatcher;
|
||||
}
|
||||
|
||||
interface CustomMatcherFactories {
|
||||
[index: string]: CustomMatcherFactory;
|
||||
}
|
||||
|
||||
interface CustomMatcherResult {
|
||||
pass: boolean;
|
||||
message?: string;
|
||||
}
|
||||
|
||||
interface MatchersUtil {
|
||||
equals(a: any, b: any, customTesters?: Array<CustomEqualityTester>): boolean;
|
||||
contains<T>(haystack: ArrayLike<T> | string, needle: any, customTesters?: Array<CustomEqualityTester>): boolean;
|
||||
buildFailureMessage(matcherName: string, isNot: boolean, actual: any, ...expected: Array<any>): string;
|
||||
}
|
||||
|
||||
interface Env {
|
||||
setTimeout: any;
|
||||
clearTimeout: void;
|
||||
setInterval: any;
|
||||
clearInterval: void;
|
||||
updateInterval: number;
|
||||
|
||||
currentSpec: Spec;
|
||||
|
||||
matchersClass: Matchers;
|
||||
|
||||
version(): any;
|
||||
versionString(): string;
|
||||
nextSpecId(): number;
|
||||
addReporter(reporter: Reporter): void;
|
||||
execute(): void;
|
||||
describe(description: string, specDefinitions: () => void): Suite;
|
||||
// ddescribe(description: string, specDefinitions: () => void): Suite; Not a part of jasmine. Angular team adds these
|
||||
beforeEach(beforeEachFunction: () => void): void;
|
||||
beforeAll(beforeAllFunction: () => void): void;
|
||||
currentRunner(): Runner;
|
||||
afterEach(afterEachFunction: () => void): void;
|
||||
afterAll(afterAllFunction: () => void): void;
|
||||
xdescribe(desc: string, specDefinitions: () => void): XSuite;
|
||||
it(description: string, func: () => void): Spec;
|
||||
// iit(description: string, func: () => void): Spec; Not a part of jasmine. Angular team adds these
|
||||
xit(desc: string, func: () => void): XSpec;
|
||||
compareRegExps_(a: RegExp, b: RegExp, mismatchKeys: string[], mismatchValues: string[]): boolean;
|
||||
compareObjects_(a: any, b: any, mismatchKeys: string[], mismatchValues: string[]): boolean;
|
||||
equals_(a: any, b: any, mismatchKeys: string[], mismatchValues: string[]): boolean;
|
||||
contains_(haystack: any, needle: any): boolean;
|
||||
addCustomEqualityTester(equalityTester: CustomEqualityTester): void;
|
||||
addMatchers(matchers: CustomMatcherFactories): void;
|
||||
specFilter(spec: Spec): boolean;
|
||||
}
|
||||
|
||||
interface FakeTimer {
|
||||
|
||||
new (): any;
|
||||
|
||||
reset(): void;
|
||||
tick(millis: number): void;
|
||||
runFunctionsWithinRange(oldMillis: number, nowMillis: number): void;
|
||||
scheduleFunction(timeoutKey: any, funcToCall: () => void, millis: number, recurring: boolean): void;
|
||||
}
|
||||
|
||||
interface HtmlReporter {
|
||||
new (): any;
|
||||
}
|
||||
|
||||
interface HtmlSpecFilter {
|
||||
new (): any;
|
||||
}
|
||||
|
||||
interface Result {
|
||||
type: string;
|
||||
}
|
||||
|
||||
interface NestedResults extends Result {
|
||||
description: string;
|
||||
|
||||
totalCount: number;
|
||||
passedCount: number;
|
||||
failedCount: number;
|
||||
|
||||
skipped: boolean;
|
||||
|
||||
rollupCounts(result: NestedResults): void;
|
||||
log(values: any): void;
|
||||
getItems(): Result[];
|
||||
addResult(result: Result): void;
|
||||
passed(): boolean;
|
||||
}
|
||||
|
||||
interface MessageResult extends Result {
|
||||
values: any;
|
||||
trace: Trace;
|
||||
}
|
||||
|
||||
interface ExpectationResult extends Result {
|
||||
matcherName: string;
|
||||
passed(): boolean;
|
||||
expected: any;
|
||||
actual: any;
|
||||
message: string;
|
||||
trace: Trace;
|
||||
}
|
||||
|
||||
interface Trace {
|
||||
name: string;
|
||||
message: string;
|
||||
stack: any;
|
||||
}
|
||||
|
||||
interface PrettyPrinter {
|
||||
|
||||
new (): any;
|
||||
|
||||
format(value: any): void;
|
||||
iterateObject(obj: any, fn: (property: string, isGetter: boolean) => void): void;
|
||||
emitScalar(value: any): void;
|
||||
emitString(value: string): void;
|
||||
emitArray(array: any[]): void;
|
||||
emitObject(obj: any): void;
|
||||
append(value: any): void;
|
||||
}
|
||||
|
||||
interface StringPrettyPrinter extends PrettyPrinter {
|
||||
}
|
||||
|
||||
interface Queue {
|
||||
|
||||
new (env: any): any;
|
||||
|
||||
env: Env;
|
||||
ensured: boolean[];
|
||||
blocks: Block[];
|
||||
running: boolean;
|
||||
index: number;
|
||||
offset: number;
|
||||
abort: boolean;
|
||||
|
||||
addBefore(block: Block, ensure?: boolean): void;
|
||||
add(block: any, ensure?: boolean): void;
|
||||
insertNext(block: any, ensure?: boolean): void;
|
||||
start(onComplete?: () => void): void;
|
||||
isRunning(): boolean;
|
||||
next_(): void;
|
||||
results(): NestedResults;
|
||||
}
|
||||
|
||||
interface Matchers {
|
||||
|
||||
new (env: Env, actual: any, spec: Env, isNot?: boolean): any;
|
||||
|
||||
env: Env;
|
||||
actual: any;
|
||||
spec: Env;
|
||||
isNot?: boolean;
|
||||
message(): any;
|
||||
|
||||
(expected: any): boolean;
|
||||
toBe(expected: any, expectationFailOutput?: any): boolean;
|
||||
toEqual(expected: any, expectationFailOutput?: any): boolean;
|
||||
toMatch(expected: any, expectationFailOutput?: any): boolean;
|
||||
toBeDefined(expectationFailOutput?: any): boolean;
|
||||
toBeUndefined(expectationFailOutput?: any): boolean;
|
||||
toBeNull(expectationFailOutput?: any): boolean;
|
||||
toBeNaN(): boolean;
|
||||
toBeTruthy(expectationFailOutput?: any): boolean;
|
||||
toBeFalsy(expectationFailOutput?: any): boolean;
|
||||
toHaveBeenCalled(): boolean;
|
||||
toHaveBeenCalledWith(...params: any[]): boolean;
|
||||
toContain(expected: any, expectationFailOutput?: any): boolean;
|
||||
toBeLessThan(expected: any, expectationFailOutput?: any): boolean;
|
||||
toBeGreaterThan(expected: any, expectationFailOutput?: any): boolean;
|
||||
toBeCloseTo(expected: any, precision: any, expectationFailOutput?: any): boolean;
|
||||
toContainHtml(expected: string): boolean;
|
||||
toContainText(expected: string): boolean;
|
||||
toThrow(expected?: any): boolean;
|
||||
toThrowError(expected?: any, message?: string): boolean;
|
||||
not: Matchers;
|
||||
|
||||
Any: Any;
|
||||
}
|
||||
|
||||
interface Reporter {
|
||||
reportRunnerStarting(runner: Runner): void;
|
||||
reportRunnerResults(runner: Runner): void;
|
||||
reportSuiteResults(suite: Suite): void;
|
||||
reportSpecStarting(spec: Spec): void;
|
||||
reportSpecResults(spec: Spec): void;
|
||||
log(str: string): void;
|
||||
}
|
||||
|
||||
interface MultiReporter extends Reporter {
|
||||
addReporter(reporter: Reporter): void;
|
||||
}
|
||||
|
||||
interface Runner {
|
||||
|
||||
new (env: Env): any;
|
||||
|
||||
execute(): void;
|
||||
beforeEach(beforeEachFunction: SpecFunction): void;
|
||||
afterEach(afterEachFunction: SpecFunction): void;
|
||||
beforeAll(beforeAllFunction: SpecFunction): void;
|
||||
afterAll(afterAllFunction: SpecFunction): void;
|
||||
finishCallback(): void;
|
||||
addSuite(suite: Suite): void;
|
||||
add(block: Block): void;
|
||||
specs(): Spec[];
|
||||
suites(): Suite[];
|
||||
topLevelSuites(): Suite[];
|
||||
results(): NestedResults;
|
||||
}
|
||||
|
||||
interface SpecFunction {
|
||||
(spec?: Spec): void;
|
||||
}
|
||||
|
||||
interface SuiteOrSpec {
|
||||
id: number;
|
||||
env: Env;
|
||||
description: string;
|
||||
queue: Queue;
|
||||
}
|
||||
|
||||
interface Spec extends SuiteOrSpec {
|
||||
|
||||
new (env: Env, suite: Suite, description: string): any;
|
||||
|
||||
suite: Suite;
|
||||
|
||||
afterCallbacks: SpecFunction[];
|
||||
spies_: Spy[];
|
||||
|
||||
results_: NestedResults;
|
||||
matchersClass: Matchers;
|
||||
|
||||
getFullName(): string;
|
||||
results(): NestedResults;
|
||||
log(arguments: any): any;
|
||||
runs(func: SpecFunction): Spec;
|
||||
addToQueue(block: Block): void;
|
||||
addMatcherResult(result: Result): void;
|
||||
expect(actual: any): any;
|
||||
waits(timeout: number): Spec;
|
||||
waitsFor(latchFunction: SpecFunction, timeoutMessage?: string, timeout?: number): Spec;
|
||||
fail(e?: any): void;
|
||||
getMatchersClass_(): Matchers;
|
||||
addMatchers(matchersPrototype: CustomMatcherFactories): void;
|
||||
finishCallback(): void;
|
||||
finish(onComplete?: () => void): void;
|
||||
after(doAfter: SpecFunction): void;
|
||||
execute(onComplete?: () => void): any;
|
||||
addBeforesAndAftersToQueue(): void;
|
||||
explodes(): void;
|
||||
spyOn(obj: any, methodName: string, ignoreMethodDoesntExist: boolean): Spy;
|
||||
removeAllSpies(): void;
|
||||
}
|
||||
|
||||
interface XSpec {
|
||||
id: number;
|
||||
runs(): void;
|
||||
}
|
||||
|
||||
interface Suite extends SuiteOrSpec {
|
||||
|
||||
new (env: Env, description: string, specDefinitions: () => void, parentSuite: Suite): any;
|
||||
|
||||
parentSuite: Suite;
|
||||
|
||||
getFullName(): string;
|
||||
finish(onComplete?: () => void): void;
|
||||
beforeEach(beforeEachFunction: SpecFunction): void;
|
||||
afterEach(afterEachFunction: SpecFunction): void;
|
||||
beforeAll(beforeAllFunction: SpecFunction): void;
|
||||
afterAll(afterAllFunction: SpecFunction): void;
|
||||
results(): NestedResults;
|
||||
add(suiteOrSpec: SuiteOrSpec): void;
|
||||
specs(): Spec[];
|
||||
suites(): Suite[];
|
||||
children(): any[];
|
||||
execute(onComplete?: () => void): void;
|
||||
}
|
||||
|
||||
interface XSuite {
|
||||
execute(): void;
|
||||
}
|
||||
|
||||
interface Spy {
|
||||
(...params: any[]): any;
|
||||
|
||||
identity: string;
|
||||
and: SpyAnd;
|
||||
calls: Calls;
|
||||
mostRecentCall: { args: any[]; };
|
||||
argsForCall: any[];
|
||||
wasCalled: boolean;
|
||||
callCount: number;
|
||||
}
|
||||
|
||||
interface SpyAnd {
|
||||
/** By chaining the spy with and.callThrough, the spy will still track all calls to it but in addition it will delegate to the actual implementation. */
|
||||
callThrough(): Spy;
|
||||
/** By chaining the spy with and.returnValue, all calls to the function will return a specific value. */
|
||||
returnValue(val: any): void;
|
||||
/** By chaining the spy with and.callFake, all calls to the spy will delegate to the supplied function. */
|
||||
callFake(fn: Function): Spy;
|
||||
/** By chaining the spy with and.throwError, all calls to the spy will throw the specified value. */
|
||||
throwError(msg: string): void;
|
||||
/** When a calling strategy is used for a spy, the original stubbing behavior can be returned at any time with and.stub. */
|
||||
stub(): Spy;
|
||||
}
|
||||
|
||||
interface Calls {
|
||||
/** By chaining the spy with calls.any(), will return false if the spy has not been called at all, and then true once at least one call happens. **/
|
||||
any(): boolean;
|
||||
/** By chaining the spy with calls.count(), will return the number of times the spy was called **/
|
||||
count(): number;
|
||||
/** By chaining the spy with calls.argsFor(), will return the arguments passed to call number index **/
|
||||
argsFor(index: number): any[];
|
||||
/** By chaining the spy with calls.allArgs(), will return the arguments to all calls **/
|
||||
allArgs(): any[];
|
||||
/** By chaining the spy with calls.all(), will return the context (the this) and arguments passed all calls **/
|
||||
all(): CallInfo[];
|
||||
/** By chaining the spy with calls.mostRecent(), will return the context (the this) and arguments for the most recent call **/
|
||||
mostRecent(): CallInfo;
|
||||
/** By chaining the spy with calls.first(), will return the context (the this) and arguments for the first call **/
|
||||
first(): CallInfo;
|
||||
/** By chaining the spy with calls.reset(), will clears all tracking for a spy **/
|
||||
reset(): void;
|
||||
}
|
||||
|
||||
interface CallInfo {
|
||||
/** The context (the this) for the call */
|
||||
object: any;
|
||||
/** All arguments passed to the call */
|
||||
args: any[];
|
||||
}
|
||||
|
||||
interface Util {
|
||||
inherit(childClass: Function, parentClass: Function): any;
|
||||
formatException(e: any): any;
|
||||
htmlEscape(str: string): string;
|
||||
argsToArray(args: any): any;
|
||||
extend(destination: any, source: any): any;
|
||||
}
|
||||
|
||||
interface JsApiReporter extends Reporter {
|
||||
|
||||
started: boolean;
|
||||
finished: boolean;
|
||||
result: any;
|
||||
messages: any;
|
||||
|
||||
new (): any;
|
||||
|
||||
suites(): Suite[];
|
||||
summarize_(suiteOrSpec: SuiteOrSpec): any;
|
||||
results(): any;
|
||||
resultsForSpec(specId: any): any;
|
||||
log(str: any): any;
|
||||
resultsForSpecs(specIds: any): any;
|
||||
summarizeResult_(result: any): any;
|
||||
}
|
||||
|
||||
interface Jasmine {
|
||||
Spec: Spec;
|
||||
clock: Clock;
|
||||
util: Util;
|
||||
}
|
||||
|
||||
export var HtmlReporter: HtmlReporter;
|
||||
export var HtmlSpecFilter: HtmlSpecFilter;
|
||||
export var DEFAULT_TIMEOUT_INTERVAL: number;
|
||||
|
||||
export interface GlobalPolluter {
|
||||
describe(description: string, specDefinitions: () => void): void;
|
||||
fdescribe(description: string, specDefinitions: () => void): void;
|
||||
xdescribe(description: string, specDefinitions: () => void): void;
|
||||
|
||||
it(expectation: string, assertion?: () => void): void;
|
||||
it(expectation: string, assertion?: (done: () => void) => void): void;
|
||||
fit(expectation: string, assertion?: () => void): void;
|
||||
fit(expectation: string, assertion?: (done: () => void) => void): void;
|
||||
xit(expectation: string, assertion?: () => void): void;
|
||||
xit(expectation: string, assertion?: (done: () => void) => void): void;
|
||||
|
||||
pending(): void;
|
||||
|
||||
beforeEach(action: () => void): void;
|
||||
beforeEach(action: (done: () => void) => void): void;
|
||||
afterEach(action: () => void): void;
|
||||
afterEach(action: (done: () => void) => void): void;
|
||||
|
||||
beforeAll(action: () => void): void;
|
||||
beforeAll(action: (done: () => void) => void): void;
|
||||
afterAll(action: () => void): void;
|
||||
afterAll(action: (done: () => void) => void): void;
|
||||
|
||||
expect(spy: Function): jasmine.Matchers;
|
||||
expect(actual: any): jasmine.Matchers;
|
||||
|
||||
fail(e?: any): void;
|
||||
|
||||
spyOn(object: any, method: string): jasmine.Spy;
|
||||
|
||||
runs(asyncMethod: Function): void;
|
||||
waitsFor(latchMethod: () => boolean, failureMessage?: string, timeout?: number): void;
|
||||
waits(timeout?: number): void;
|
||||
}
|
||||
}
|
||||
Generated
Vendored
-777
@@ -1,777 +0,0 @@
|
||||
"format register";
|
||||
System.register("angular2/src/upgrade/metadata", ["angular2/core"], true, function(require, exports, module) {
|
||||
var global = System.global,
|
||||
__define = global.define;
|
||||
global.define = undefined;
|
||||
var core_1 = require("angular2/core");
|
||||
var COMPONENT_SELECTOR = /^[\w|-]*$/;
|
||||
var SKEWER_CASE = /-(\w)/g;
|
||||
var directiveResolver = new core_1.DirectiveResolver();
|
||||
function getComponentInfo(type) {
|
||||
var resolvedMetadata = directiveResolver.resolve(type);
|
||||
var selector = resolvedMetadata.selector;
|
||||
if (!selector.match(COMPONENT_SELECTOR)) {
|
||||
throw new Error('Only selectors matching element names are supported, got: ' + selector);
|
||||
}
|
||||
var selector = selector.replace(SKEWER_CASE, function(all, letter) {
|
||||
return letter.toUpperCase();
|
||||
});
|
||||
return {
|
||||
type: type,
|
||||
selector: selector,
|
||||
inputs: parseFields(resolvedMetadata.inputs),
|
||||
outputs: parseFields(resolvedMetadata.outputs)
|
||||
};
|
||||
}
|
||||
exports.getComponentInfo = getComponentInfo;
|
||||
function parseFields(names) {
|
||||
var attrProps = [];
|
||||
if (names) {
|
||||
for (var i = 0; i < names.length; i++) {
|
||||
var parts = names[i].split(':');
|
||||
var prop = parts[0].trim();
|
||||
var attr = (parts[1] || parts[0]).trim();
|
||||
var capitalAttr = attr.charAt(0).toUpperCase() + attr.substr(1);
|
||||
attrProps.push({
|
||||
prop: prop,
|
||||
attr: attr,
|
||||
bracketAttr: "[" + attr + "]",
|
||||
parenAttr: "(" + attr + ")",
|
||||
bracketParenAttr: "[(" + attr + ")]",
|
||||
onAttr: "on" + capitalAttr,
|
||||
bindAttr: "bind" + capitalAttr,
|
||||
bindonAttr: "bindon" + capitalAttr
|
||||
});
|
||||
}
|
||||
}
|
||||
return attrProps;
|
||||
}
|
||||
exports.parseFields = parseFields;
|
||||
global.define = __define;
|
||||
return module.exports;
|
||||
});
|
||||
|
||||
System.register("angular2/src/upgrade/util", [], true, function(require, exports, module) {
|
||||
var global = System.global,
|
||||
__define = global.define;
|
||||
global.define = undefined;
|
||||
function stringify(obj) {
|
||||
if (typeof obj == 'function')
|
||||
return obj.name || obj.toString();
|
||||
return '' + obj;
|
||||
}
|
||||
exports.stringify = stringify;
|
||||
function onError(e) {
|
||||
console.log(e, e.stack);
|
||||
throw e;
|
||||
}
|
||||
exports.onError = onError;
|
||||
function controllerKey(name) {
|
||||
return '$' + name + 'Controller';
|
||||
}
|
||||
exports.controllerKey = controllerKey;
|
||||
global.define = __define;
|
||||
return module.exports;
|
||||
});
|
||||
|
||||
System.register("angular2/src/upgrade/constants", [], true, function(require, exports, module) {
|
||||
var global = System.global,
|
||||
__define = global.define;
|
||||
global.define = undefined;
|
||||
exports.NG2_APP_VIEW_MANAGER = 'ng2.AppViewManager';
|
||||
exports.NG2_COMPILER = 'ng2.Compiler';
|
||||
exports.NG2_INJECTOR = 'ng2.Injector';
|
||||
exports.NG2_HOST_VIEW_FACTORY_REF_MAP = 'ng2.HostViewFactoryRefMap';
|
||||
exports.NG2_ZONE = 'ng2.NgZone';
|
||||
exports.NG1_CONTROLLER = '$controller';
|
||||
exports.NG1_SCOPE = '$scope';
|
||||
exports.NG1_ROOT_SCOPE = '$rootScope';
|
||||
exports.NG1_COMPILE = '$compile';
|
||||
exports.NG1_HTTP_BACKEND = '$httpBackend';
|
||||
exports.NG1_INJECTOR = '$injector';
|
||||
exports.NG1_PARSE = '$parse';
|
||||
exports.NG1_TEMPLATE_CACHE = '$templateCache';
|
||||
exports.REQUIRE_INJECTOR = '^' + exports.NG2_INJECTOR;
|
||||
global.define = __define;
|
||||
return module.exports;
|
||||
});
|
||||
|
||||
System.register("angular2/src/upgrade/downgrade_ng2_adapter", ["angular2/core", "angular2/src/upgrade/constants"], true, function(require, exports, module) {
|
||||
var global = System.global,
|
||||
__define = global.define;
|
||||
global.define = undefined;
|
||||
var core_1 = require("angular2/core");
|
||||
var constants_1 = require("angular2/src/upgrade/constants");
|
||||
var INITIAL_VALUE = {__UNINITIALIZED__: true};
|
||||
var DowngradeNg2ComponentAdapter = (function() {
|
||||
function DowngradeNg2ComponentAdapter(id, info, element, attrs, scope, parentInjector, parse, viewManager, hostViewFactory) {
|
||||
this.id = id;
|
||||
this.info = info;
|
||||
this.element = element;
|
||||
this.attrs = attrs;
|
||||
this.scope = scope;
|
||||
this.parentInjector = parentInjector;
|
||||
this.parse = parse;
|
||||
this.viewManager = viewManager;
|
||||
this.hostViewFactory = hostViewFactory;
|
||||
this.component = null;
|
||||
this.inputChangeCount = 0;
|
||||
this.inputChanges = null;
|
||||
this.hostViewRef = null;
|
||||
this.changeDetector = null;
|
||||
this.contentInsertionPoint = null;
|
||||
this.element[0].id = id;
|
||||
this.componentScope = scope.$new();
|
||||
this.childNodes = element.contents();
|
||||
}
|
||||
DowngradeNg2ComponentAdapter.prototype.bootstrapNg2 = function() {
|
||||
var childInjector = this.parentInjector.resolveAndCreateChild([core_1.provide(constants_1.NG1_SCOPE, {useValue: this.componentScope})]);
|
||||
this.contentInsertionPoint = document.createComment('ng1 insertion point');
|
||||
this.hostViewRef = this.viewManager.createRootHostView(this.hostViewFactory, '#' + this.id, childInjector, [[this.contentInsertionPoint]]);
|
||||
var hostElement = this.viewManager.getHostElement(this.hostViewRef);
|
||||
this.changeDetector = this.hostViewRef.changeDetectorRef;
|
||||
this.component = this.viewManager.getComponent(hostElement);
|
||||
};
|
||||
DowngradeNg2ComponentAdapter.prototype.setupInputs = function() {
|
||||
var _this = this;
|
||||
var attrs = this.attrs;
|
||||
var inputs = this.info.inputs;
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
var input = inputs[i];
|
||||
var expr = null;
|
||||
if (attrs.hasOwnProperty(input.attr)) {
|
||||
var observeFn = (function(prop) {
|
||||
var prevValue = INITIAL_VALUE;
|
||||
return function(value) {
|
||||
if (_this.inputChanges !== null) {
|
||||
_this.inputChangeCount++;
|
||||
_this.inputChanges[prop] = new Ng1Change(value, prevValue === INITIAL_VALUE ? value : prevValue);
|
||||
prevValue = value;
|
||||
}
|
||||
_this.component[prop] = value;
|
||||
};
|
||||
})(input.prop);
|
||||
attrs.$observe(input.attr, observeFn);
|
||||
} else if (attrs.hasOwnProperty(input.bindAttr)) {
|
||||
expr = attrs[input.bindAttr];
|
||||
} else if (attrs.hasOwnProperty(input.bracketAttr)) {
|
||||
expr = attrs[input.bracketAttr];
|
||||
} else if (attrs.hasOwnProperty(input.bindonAttr)) {
|
||||
expr = attrs[input.bindonAttr];
|
||||
} else if (attrs.hasOwnProperty(input.bracketParenAttr)) {
|
||||
expr = attrs[input.bracketParenAttr];
|
||||
}
|
||||
if (expr != null) {
|
||||
var watchFn = (function(prop) {
|
||||
return function(value, prevValue) {
|
||||
if (_this.inputChanges != null) {
|
||||
_this.inputChangeCount++;
|
||||
_this.inputChanges[prop] = new Ng1Change(prevValue, value);
|
||||
}
|
||||
_this.component[prop] = value;
|
||||
};
|
||||
})(input.prop);
|
||||
this.componentScope.$watch(expr, watchFn);
|
||||
}
|
||||
}
|
||||
var prototype = this.info.type.prototype;
|
||||
if (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();
|
||||
});
|
||||
};
|
||||
DowngradeNg2ComponentAdapter.prototype.projectContent = function() {
|
||||
var childNodes = this.childNodes;
|
||||
var parent = this.contentInsertionPoint.parentNode;
|
||||
if (parent) {
|
||||
for (var i = 0,
|
||||
ii = childNodes.length; i < ii; i++) {
|
||||
parent.insertBefore(childNodes[i], this.contentInsertionPoint);
|
||||
}
|
||||
}
|
||||
};
|
||||
DowngradeNg2ComponentAdapter.prototype.setupOutputs = function() {
|
||||
var _this = this;
|
||||
var attrs = this.attrs;
|
||||
var outputs = this.info.outputs;
|
||||
for (var j = 0; j < outputs.length; j++) {
|
||||
var output = outputs[j];
|
||||
var expr = null;
|
||||
var assignExpr = false;
|
||||
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;
|
||||
if (attrs.hasOwnProperty(output.onAttr)) {
|
||||
expr = attrs[output.onAttr];
|
||||
} else if (attrs.hasOwnProperty(output.parenAttr)) {
|
||||
expr = attrs[output.parenAttr];
|
||||
} else if (attrs.hasOwnProperty(bindonAttr)) {
|
||||
expr = attrs[bindonAttr];
|
||||
assignExpr = true;
|
||||
} else if (attrs.hasOwnProperty(bracketParenAttr)) {
|
||||
expr = attrs[bracketParenAttr];
|
||||
assignExpr = true;
|
||||
}
|
||||
if (expr != null && assignExpr != null) {
|
||||
var getter = this.parse(expr);
|
||||
var setter = getter.assign;
|
||||
if (assignExpr && !setter) {
|
||||
throw new Error("Expression '" + expr + "' is not assignable!");
|
||||
}
|
||||
var emitter = this.component[output.prop];
|
||||
if (emitter) {
|
||||
emitter.subscribe({next: assignExpr ? (function(setter) {
|
||||
return function(value) {
|
||||
return setter(_this.scope, value);
|
||||
};
|
||||
})(setter) : (function(getter) {
|
||||
return function(value) {
|
||||
return getter(_this.scope, {$event: value});
|
||||
};
|
||||
})(getter)});
|
||||
} else {
|
||||
throw new Error("Missing emitter '" + output.prop + "' on component '" + this.info.selector + "'!");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
DowngradeNg2ComponentAdapter.prototype.registerCleanup = function() {
|
||||
var _this = this;
|
||||
this.element.bind('$remove', function() {
|
||||
return _this.viewManager.destroyRootHostView(_this.hostViewRef);
|
||||
});
|
||||
};
|
||||
return DowngradeNg2ComponentAdapter;
|
||||
})();
|
||||
exports.DowngradeNg2ComponentAdapter = DowngradeNg2ComponentAdapter;
|
||||
var Ng1Change = (function() {
|
||||
function Ng1Change(previousValue, currentValue) {
|
||||
this.previousValue = previousValue;
|
||||
this.currentValue = currentValue;
|
||||
}
|
||||
Ng1Change.prototype.isFirstChange = function() {
|
||||
return this.previousValue === this.currentValue;
|
||||
};
|
||||
return Ng1Change;
|
||||
})();
|
||||
global.define = __define;
|
||||
return module.exports;
|
||||
});
|
||||
|
||||
System.register("angular2/src/upgrade/angular_js", [], true, function(require, exports, module) {
|
||||
var global = System.global,
|
||||
__define = global.define;
|
||||
global.define = undefined;
|
||||
function noNg() {
|
||||
throw new Error('AngularJS v1.x is not loaded!');
|
||||
}
|
||||
var angular = {
|
||||
bootstrap: noNg,
|
||||
module: noNg,
|
||||
element: noNg,
|
||||
version: noNg
|
||||
};
|
||||
try {
|
||||
if (window.hasOwnProperty('angular')) {
|
||||
angular = window.angular;
|
||||
}
|
||||
} catch (e) {}
|
||||
exports.bootstrap = angular.bootstrap;
|
||||
exports.module = angular.module;
|
||||
exports.element = angular.element;
|
||||
exports.version = angular.version;
|
||||
global.define = __define;
|
||||
return module.exports;
|
||||
});
|
||||
|
||||
System.register("angular2/src/upgrade/upgrade_ng1_adapter", ["angular2/core", "angular2/src/upgrade/constants", "angular2/src/upgrade/util", "angular2/src/upgrade/angular_js"], true, function(require, exports, module) {
|
||||
var global = System.global,
|
||||
__define = global.define;
|
||||
global.define = undefined;
|
||||
var core_1 = require("angular2/core");
|
||||
var constants_1 = require("angular2/src/upgrade/constants");
|
||||
var util_1 = require("angular2/src/upgrade/util");
|
||||
var angular = require("angular2/src/upgrade/angular_js");
|
||||
var CAMEL_CASE = /([A-Z])/g;
|
||||
var INITIAL_VALUE = {__UNINITIALIZED__: true};
|
||||
var NOT_SUPPORTED = 'NOT_SUPPORTED';
|
||||
var 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();
|
||||
});
|
||||
var self = this;
|
||||
this.type = core_1.Directive({
|
||||
selector: selector,
|
||||
inputs: this.inputsRename,
|
||||
outputs: this.outputsRename
|
||||
}).Class({
|
||||
constructor: [new core_1.Inject(constants_1.NG1_SCOPE), core_1.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);
|
||||
}],
|
||||
ngOnChanges: function() {},
|
||||
ngDoCheck: function() {}
|
||||
});
|
||||
}
|
||||
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];
|
||||
if (directive.replace)
|
||||
this.notSupported('replace');
|
||||
if (directive.terminal)
|
||||
this.notSupported('terminal');
|
||||
var link = directive.link;
|
||||
if (typeof link == 'object') {
|
||||
if (link.post)
|
||||
this.notSupported('link.post');
|
||||
}
|
||||
return directive;
|
||||
};
|
||||
UpgradeNg1ComponentAdapterBuilder.prototype.notSupported = function(feature) {
|
||||
throw new Error("Upgraded directive '" + this.name + "' does not support '" + feature + "'.");
|
||||
};
|
||||
UpgradeNg1ComponentAdapterBuilder.prototype.extractBindings = function() {
|
||||
var btcIsObject = typeof this.directive.bindToController === 'object';
|
||||
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 (typeof context == 'object') {
|
||||
for (var name in context) {
|
||||
if (context.hasOwnProperty(name)) {
|
||||
var localName = context[name];
|
||||
var type = localName.charAt(0);
|
||||
localName = localName.substr(1) || name;
|
||||
var outputName = 'output_' + name;
|
||||
var outputNameRename = outputName + ': ' + name;
|
||||
var outputNameRenameChange = outputName + ': ' + name + 'Change';
|
||||
var inputName = 'input_' + name;
|
||||
var 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;
|
||||
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) {
|
||||
var _this = this;
|
||||
if (this.directive.template !== undefined) {
|
||||
this.linkFn = compileHtml(this.directive.template);
|
||||
} else if (this.directive.templateUrl) {
|
||||
var url = this.directive.templateUrl;
|
||||
var html = templateCache.get(url);
|
||||
if (html !== undefined) {
|
||||
this.linkFn = compileHtml(html);
|
||||
} else {
|
||||
return new Promise(function(resolve, err) {
|
||||
httpBackend('GET', url, null, function(status, response) {
|
||||
if (status == 200) {
|
||||
resolve(_this.linkFn = compileHtml(templateCache.put(url, response)));
|
||||
} else {
|
||||
err("GET " + url + " returned " + status + ": " + response);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
} else {
|
||||
throw new Error("Directive '" + this.name + "' is not a component, it is missing template.");
|
||||
}
|
||||
return null;
|
||||
function compileHtml(html) {
|
||||
var div = document.createElement('div');
|
||||
div.innerHTML = html;
|
||||
return compile(div.childNodes);
|
||||
}
|
||||
};
|
||||
UpgradeNg1ComponentAdapterBuilder.resolve = function(exportedComponents, injector) {
|
||||
var promises = [];
|
||||
var compile = injector.get(constants_1.NG1_COMPILE);
|
||||
var templateCache = injector.get(constants_1.NG1_TEMPLATE_CACHE);
|
||||
var httpBackend = injector.get(constants_1.NG1_HTTP_BACKEND);
|
||||
var $controller = injector.get(constants_1.NG1_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);
|
||||
if (promise)
|
||||
promises.push(promise);
|
||||
}
|
||||
}
|
||||
return Promise.all(promises);
|
||||
};
|
||||
return UpgradeNg1ComponentAdapterBuilder;
|
||||
})();
|
||||
exports.UpgradeNg1ComponentAdapterBuilder = UpgradeNg1ComponentAdapterBuilder;
|
||||
var UpgradeNg1ComponentAdapter = (function() {
|
||||
function UpgradeNg1ComponentAdapter(linkFn, scope, directive, elementRef, $controller, inputs, outputs, propOuts, checkProperties, propertyMap) {
|
||||
this.directive = directive;
|
||||
this.inputs = inputs;
|
||||
this.outputs = outputs;
|
||||
this.propOuts = propOuts;
|
||||
this.checkProperties = checkProperties;
|
||||
this.propertyMap = propertyMap;
|
||||
this.destinationObj = null;
|
||||
this.checkLastValues = [];
|
||||
var element = elementRef.nativeElement;
|
||||
var childNodes = [];
|
||||
var childNode;
|
||||
while (childNode = element.firstChild) {
|
||||
element.removeChild(childNode);
|
||||
childNodes.push(childNode);
|
||||
}
|
||||
var componentScope = scope.$new(!!directive.scope);
|
||||
var $element = angular.element(element);
|
||||
var controllerType = directive.controller;
|
||||
var controller = null;
|
||||
if (controllerType) {
|
||||
var locals = {
|
||||
$scope: componentScope,
|
||||
$element: $element
|
||||
};
|
||||
controller = $controller(controllerType, locals, null, directive.controllerAs);
|
||||
$element.data(util_1.controllerKey(directive.name), controller);
|
||||
}
|
||||
var link = directive.link;
|
||||
if (typeof link == 'object')
|
||||
link = link.pre;
|
||||
if (link) {
|
||||
var attrs = NOT_SUPPORTED;
|
||||
var transcludeFn = NOT_SUPPORTED;
|
||||
var linkController = this.resolveRequired($element, directive.require);
|
||||
directive.link(componentScope, $element, attrs, linkController, transcludeFn);
|
||||
}
|
||||
this.destinationObj = directive.bindToController && controller ? controller : componentScope;
|
||||
linkFn(componentScope, function(clonedElement, scope) {
|
||||
for (var i = 0,
|
||||
ii = clonedElement.length; i < ii; i++) {
|
||||
element.appendChild(clonedElement[i]);
|
||||
}
|
||||
}, {parentBoundTranscludeFn: function(scope, cloneAttach) {
|
||||
cloneAttach(childNodes);
|
||||
}});
|
||||
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 core_1.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 core_1.EventEmitter();
|
||||
this.checkLastValues.push(INITIAL_VALUE);
|
||||
}
|
||||
}
|
||||
UpgradeNg1ComponentAdapter.prototype.ngOnChanges = function(changes) {
|
||||
for (var name in changes) {
|
||||
if (changes.hasOwnProperty(name)) {
|
||||
var change = changes[name];
|
||||
this.setComponentProperty(name, change.currentValue);
|
||||
}
|
||||
}
|
||||
};
|
||||
UpgradeNg1ComponentAdapter.prototype.ngDoCheck = function() {
|
||||
var count = 0;
|
||||
var destinationObj = this.destinationObj;
|
||||
var lastValues = this.checkLastValues;
|
||||
var checkProperties = this.checkProperties;
|
||||
for (var i = 0; i < checkProperties.length; i++) {
|
||||
var value = destinationObj[checkProperties[i]];
|
||||
var last = lastValues[i];
|
||||
if (value !== last) {
|
||||
if (typeof value == 'number' && isNaN(value) && typeof last == 'number' && isNaN(last)) {} else {
|
||||
var eventEmitter = this[this.propOuts[i]];
|
||||
eventEmitter.emit(lastValues[i] = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return count;
|
||||
};
|
||||
UpgradeNg1ComponentAdapter.prototype.setComponentProperty = function(name, value) {
|
||||
this.destinationObj[this.propertyMap[name]] = value;
|
||||
};
|
||||
UpgradeNg1ComponentAdapter.prototype.resolveRequired = function($element, require) {
|
||||
if (!require) {
|
||||
return undefined;
|
||||
} else if (typeof require == 'string') {
|
||||
var name = require;
|
||||
var isOptional = false;
|
||||
var startParent = false;
|
||||
var searchParents = false;
|
||||
var ch;
|
||||
if (name.charAt(0) == '?') {
|
||||
isOptional = true;
|
||||
name = name.substr(1);
|
||||
}
|
||||
if (name.charAt(0) == '^') {
|
||||
searchParents = true;
|
||||
name = name.substr(1);
|
||||
}
|
||||
if (name.charAt(0) == '^') {
|
||||
startParent = true;
|
||||
name = name.substr(1);
|
||||
}
|
||||
var key = util_1.controllerKey(name);
|
||||
if (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;
|
||||
} else if (require instanceof Array) {
|
||||
var deps = [];
|
||||
for (var 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);
|
||||
};
|
||||
return UpgradeNg1ComponentAdapter;
|
||||
})();
|
||||
global.define = __define;
|
||||
return module.exports;
|
||||
});
|
||||
|
||||
System.register("angular2/src/upgrade/upgrade_adapter", ["angular2/core", "angular2/src/facade/async", "angular2/platform/browser", "angular2/src/upgrade/metadata", "angular2/src/upgrade/util", "angular2/src/upgrade/constants", "angular2/src/upgrade/downgrade_ng2_adapter", "angular2/src/upgrade/upgrade_ng1_adapter", "angular2/src/upgrade/angular_js"], true, function(require, exports, module) {
|
||||
var global = System.global,
|
||||
__define = global.define;
|
||||
global.define = undefined;
|
||||
var core_1 = require("angular2/core");
|
||||
var async_1 = require("angular2/src/facade/async");
|
||||
var browser_1 = require("angular2/platform/browser");
|
||||
var metadata_1 = require("angular2/src/upgrade/metadata");
|
||||
var util_1 = require("angular2/src/upgrade/util");
|
||||
var constants_1 = require("angular2/src/upgrade/constants");
|
||||
var downgrade_ng2_adapter_1 = require("angular2/src/upgrade/downgrade_ng2_adapter");
|
||||
var upgrade_ng1_adapter_1 = require("angular2/src/upgrade/upgrade_ng1_adapter");
|
||||
var angular = require("angular2/src/upgrade/angular_js");
|
||||
var upgradeCount = 0;
|
||||
var UpgradeAdapter = (function() {
|
||||
function UpgradeAdapter() {
|
||||
this.idPrefix = "NG2_UPGRADE_" + upgradeCount++ + "_";
|
||||
this.upgradedComponents = [];
|
||||
this.downgradedComponents = {};
|
||||
this.providers = [];
|
||||
}
|
||||
UpgradeAdapter.prototype.downgradeNg2Component = function(type) {
|
||||
this.upgradedComponents.push(type);
|
||||
var info = metadata_1.getComponentInfo(type);
|
||||
return ng1ComponentDirective(info, "" + this.idPrefix + info.selector + "_c");
|
||||
};
|
||||
UpgradeAdapter.prototype.upgradeNg1Component = function(name) {
|
||||
if (this.downgradedComponents.hasOwnProperty(name)) {
|
||||
return this.downgradedComponents[name].type;
|
||||
} else {
|
||||
return (this.downgradedComponents[name] = new upgrade_ng1_adapter_1.UpgradeNg1ComponentAdapterBuilder(name)).type;
|
||||
}
|
||||
};
|
||||
UpgradeAdapter.prototype.bootstrap = function(element, modules, config) {
|
||||
var _this = this;
|
||||
var upgrade = new UpgradeAdapterRef();
|
||||
var ng1Injector = null;
|
||||
var platformRef = core_1.platform(browser_1.BROWSER_PROVIDERS);
|
||||
var applicationRef = platformRef.application([browser_1.BROWSER_APP_PROVIDERS, core_1.provide(constants_1.NG1_INJECTOR, {useFactory: function() {
|
||||
return ng1Injector;
|
||||
}}), core_1.provide(constants_1.NG1_COMPILE, {useFactory: function() {
|
||||
return ng1Injector.get(constants_1.NG1_COMPILE);
|
||||
}}), this.providers]);
|
||||
var injector = applicationRef.injector;
|
||||
var ngZone = injector.get(core_1.NgZone);
|
||||
var compiler = injector.get(core_1.Compiler);
|
||||
var delayApplyExps = [];
|
||||
var original$applyFn;
|
||||
var rootScopePrototype;
|
||||
var rootScope;
|
||||
var hostViewFactoryRefMap = {};
|
||||
var ng1Module = angular.module(this.idPrefix, modules);
|
||||
var ng1compilePromise = null;
|
||||
ng1Module.value(constants_1.NG2_INJECTOR, injector).value(constants_1.NG2_ZONE, ngZone).value(constants_1.NG2_COMPILER, compiler).value(constants_1.NG2_HOST_VIEW_FACTORY_REF_MAP, hostViewFactoryRefMap).value(constants_1.NG2_APP_VIEW_MANAGER, injector.get(core_1.AppViewManager)).config(['$provide', function(provide) {
|
||||
provide.decorator(constants_1.NG1_ROOT_SCOPE, ['$delegate', function(rootScopeDelegate) {
|
||||
rootScopePrototype = rootScopeDelegate.constructor.prototype;
|
||||
if (rootScopePrototype.hasOwnProperty('$apply')) {
|
||||
original$applyFn = rootScopePrototype.$apply;
|
||||
rootScopePrototype.$apply = function(exp) {
|
||||
return delayApplyExps.push(exp);
|
||||
};
|
||||
} else {
|
||||
throw new Error("Failed to find '$apply' on '$rootScope'!");
|
||||
}
|
||||
return rootScope = rootScopeDelegate;
|
||||
}]);
|
||||
}]).run(['$injector', '$rootScope', function(injector, rootScope) {
|
||||
ng1Injector = injector;
|
||||
async_1.ObservableWrapper.subscribe(ngZone.onTurnDone, function(_) {
|
||||
ngZone.run(function() {
|
||||
return rootScope.$apply();
|
||||
});
|
||||
});
|
||||
ng1compilePromise = upgrade_ng1_adapter_1.UpgradeNg1ComponentAdapterBuilder.resolve(_this.downgradedComponents, injector);
|
||||
}]);
|
||||
angular.element(element).data(util_1.controllerKey(constants_1.NG2_INJECTOR), injector);
|
||||
ngZone.run(function() {
|
||||
angular.bootstrap(element, [_this.idPrefix], config);
|
||||
});
|
||||
Promise.all([this.compileNg2Components(compiler, hostViewFactoryRefMap), ng1compilePromise]).then(function() {
|
||||
ngZone.run(function() {
|
||||
if (rootScopePrototype) {
|
||||
rootScopePrototype.$apply = original$applyFn;
|
||||
while (delayApplyExps.length) {
|
||||
rootScope.$apply(delayApplyExps.shift());
|
||||
}
|
||||
upgrade._bootstrapDone(applicationRef, ng1Injector);
|
||||
rootScopePrototype = null;
|
||||
}
|
||||
});
|
||||
}, util_1.onError);
|
||||
return upgrade;
|
||||
};
|
||||
UpgradeAdapter.prototype.addProvider = function(provider) {
|
||||
this.providers.push(provider);
|
||||
};
|
||||
UpgradeAdapter.prototype.upgradeNg1Provider = function(name, options) {
|
||||
var token = options && options.asToken || name;
|
||||
this.providers.push(core_1.provide(token, {
|
||||
useFactory: function(ng1Injector) {
|
||||
return ng1Injector.get(name);
|
||||
},
|
||||
deps: [constants_1.NG1_INJECTOR]
|
||||
}));
|
||||
};
|
||||
UpgradeAdapter.prototype.downgradeNg2Provider = function(token) {
|
||||
var factory = function(injector) {
|
||||
return injector.get(token);
|
||||
};
|
||||
factory.$inject = [constants_1.NG2_INJECTOR];
|
||||
return factory;
|
||||
};
|
||||
UpgradeAdapter.prototype.compileNg2Components = function(compiler, hostViewFactoryRefMap) {
|
||||
var _this = this;
|
||||
var promises = [];
|
||||
var types = this.upgradedComponents;
|
||||
for (var i = 0; i < types.length; i++) {
|
||||
promises.push(compiler.compileInHost(types[i]));
|
||||
}
|
||||
return Promise.all(promises).then(function(hostViewFactories) {
|
||||
var types = _this.upgradedComponents;
|
||||
for (var i = 0; i < hostViewFactories.length; i++) {
|
||||
hostViewFactoryRefMap[metadata_1.getComponentInfo(types[i]).selector] = hostViewFactories[i];
|
||||
}
|
||||
return hostViewFactoryRefMap;
|
||||
}, util_1.onError);
|
||||
};
|
||||
return UpgradeAdapter;
|
||||
})();
|
||||
exports.UpgradeAdapter = UpgradeAdapter;
|
||||
function ng1ComponentDirective(info, idPrefix) {
|
||||
directiveFactory.$inject = [constants_1.NG2_HOST_VIEW_FACTORY_REF_MAP, constants_1.NG2_APP_VIEW_MANAGER, constants_1.NG1_PARSE];
|
||||
function directiveFactory(hostViewFactoryRefMap, viewManager, parse) {
|
||||
var hostViewFactory = hostViewFactoryRefMap[info.selector];
|
||||
if (!hostViewFactory)
|
||||
throw new Error('Expecting HostViewFactoryRef for: ' + info.selector);
|
||||
var idCount = 0;
|
||||
return {
|
||||
restrict: 'E',
|
||||
require: constants_1.REQUIRE_INJECTOR,
|
||||
link: {post: function(scope, element, attrs, parentInjector, transclude) {
|
||||
var domElement = element[0];
|
||||
var facade = new downgrade_ng2_adapter_1.DowngradeNg2ComponentAdapter(idPrefix + (idCount++), info, element, attrs, scope, parentInjector, parse, viewManager, hostViewFactory);
|
||||
facade.setupInputs();
|
||||
facade.bootstrapNg2();
|
||||
facade.projectContent();
|
||||
facade.setupOutputs();
|
||||
facade.registerCleanup();
|
||||
}}
|
||||
};
|
||||
}
|
||||
return directiveFactory;
|
||||
}
|
||||
var UpgradeAdapterRef = (function() {
|
||||
function UpgradeAdapterRef() {
|
||||
this._readyFn = null;
|
||||
this.ng1RootScope = null;
|
||||
this.ng1Injector = null;
|
||||
this.ng2ApplicationRef = null;
|
||||
this.ng2Injector = null;
|
||||
}
|
||||
UpgradeAdapterRef.prototype._bootstrapDone = function(applicationRef, ng1Injector) {
|
||||
this.ng2ApplicationRef = applicationRef;
|
||||
this.ng2Injector = applicationRef.injector;
|
||||
this.ng1Injector = ng1Injector;
|
||||
this.ng1RootScope = ng1Injector.get(constants_1.NG1_ROOT_SCOPE);
|
||||
this._readyFn && this._readyFn(this);
|
||||
};
|
||||
UpgradeAdapterRef.prototype.ready = function(fn) {
|
||||
this._readyFn = fn;
|
||||
};
|
||||
UpgradeAdapterRef.prototype.dispose = function() {
|
||||
this.ng1Injector.get(constants_1.NG1_ROOT_SCOPE).$destroy();
|
||||
this.ng2ApplicationRef.dispose();
|
||||
};
|
||||
return UpgradeAdapterRef;
|
||||
})();
|
||||
exports.UpgradeAdapterRef = UpgradeAdapterRef;
|
||||
global.define = __define;
|
||||
return module.exports;
|
||||
});
|
||||
|
||||
System.register("angular2/upgrade", ["angular2/src/upgrade/upgrade_adapter"], true, function(require, exports, module) {
|
||||
var global = System.global,
|
||||
__define = global.define;
|
||||
global.define = undefined;
|
||||
var upgrade_adapter_1 = require("angular2/src/upgrade/upgrade_adapter");
|
||||
exports.UpgradeAdapter = upgrade_adapter_1.UpgradeAdapter;
|
||||
exports.UpgradeAdapterRef = upgrade_adapter_1.UpgradeAdapterRef;
|
||||
global.define = __define;
|
||||
return module.exports;
|
||||
});
|
||||
|
||||
//# sourceMappingURLDisabled=upgrade.dev.js.map
|
||||
examples/demo-template/angular2-product-app/src/main/webapp/node_modules/angular2/bundles/upgrade.js
Generated
Vendored
-777
@@ -1,777 +0,0 @@
|
||||
"format register";
|
||||
System.register("angular2/src/upgrade/metadata", ["angular2/core"], true, function(require, exports, module) {
|
||||
var global = System.global,
|
||||
__define = global.define;
|
||||
global.define = undefined;
|
||||
var core_1 = require("angular2/core");
|
||||
var COMPONENT_SELECTOR = /^[\w|-]*$/;
|
||||
var SKEWER_CASE = /-(\w)/g;
|
||||
var directiveResolver = new core_1.DirectiveResolver();
|
||||
function getComponentInfo(type) {
|
||||
var resolvedMetadata = directiveResolver.resolve(type);
|
||||
var selector = resolvedMetadata.selector;
|
||||
if (!selector.match(COMPONENT_SELECTOR)) {
|
||||
throw new Error('Only selectors matching element names are supported, got: ' + selector);
|
||||
}
|
||||
var selector = selector.replace(SKEWER_CASE, function(all, letter) {
|
||||
return letter.toUpperCase();
|
||||
});
|
||||
return {
|
||||
type: type,
|
||||
selector: selector,
|
||||
inputs: parseFields(resolvedMetadata.inputs),
|
||||
outputs: parseFields(resolvedMetadata.outputs)
|
||||
};
|
||||
}
|
||||
exports.getComponentInfo = getComponentInfo;
|
||||
function parseFields(names) {
|
||||
var attrProps = [];
|
||||
if (names) {
|
||||
for (var i = 0; i < names.length; i++) {
|
||||
var parts = names[i].split(':');
|
||||
var prop = parts[0].trim();
|
||||
var attr = (parts[1] || parts[0]).trim();
|
||||
var capitalAttr = attr.charAt(0).toUpperCase() + attr.substr(1);
|
||||
attrProps.push({
|
||||
prop: prop,
|
||||
attr: attr,
|
||||
bracketAttr: "[" + attr + "]",
|
||||
parenAttr: "(" + attr + ")",
|
||||
bracketParenAttr: "[(" + attr + ")]",
|
||||
onAttr: "on" + capitalAttr,
|
||||
bindAttr: "bind" + capitalAttr,
|
||||
bindonAttr: "bindon" + capitalAttr
|
||||
});
|
||||
}
|
||||
}
|
||||
return attrProps;
|
||||
}
|
||||
exports.parseFields = parseFields;
|
||||
global.define = __define;
|
||||
return module.exports;
|
||||
});
|
||||
|
||||
System.register("angular2/src/upgrade/util", [], true, function(require, exports, module) {
|
||||
var global = System.global,
|
||||
__define = global.define;
|
||||
global.define = undefined;
|
||||
function stringify(obj) {
|
||||
if (typeof obj == 'function')
|
||||
return obj.name || obj.toString();
|
||||
return '' + obj;
|
||||
}
|
||||
exports.stringify = stringify;
|
||||
function onError(e) {
|
||||
console.log(e, e.stack);
|
||||
throw e;
|
||||
}
|
||||
exports.onError = onError;
|
||||
function controllerKey(name) {
|
||||
return '$' + name + 'Controller';
|
||||
}
|
||||
exports.controllerKey = controllerKey;
|
||||
global.define = __define;
|
||||
return module.exports;
|
||||
});
|
||||
|
||||
System.register("angular2/src/upgrade/constants", [], true, function(require, exports, module) {
|
||||
var global = System.global,
|
||||
__define = global.define;
|
||||
global.define = undefined;
|
||||
exports.NG2_APP_VIEW_MANAGER = 'ng2.AppViewManager';
|
||||
exports.NG2_COMPILER = 'ng2.Compiler';
|
||||
exports.NG2_INJECTOR = 'ng2.Injector';
|
||||
exports.NG2_HOST_VIEW_FACTORY_REF_MAP = 'ng2.HostViewFactoryRefMap';
|
||||
exports.NG2_ZONE = 'ng2.NgZone';
|
||||
exports.NG1_CONTROLLER = '$controller';
|
||||
exports.NG1_SCOPE = '$scope';
|
||||
exports.NG1_ROOT_SCOPE = '$rootScope';
|
||||
exports.NG1_COMPILE = '$compile';
|
||||
exports.NG1_HTTP_BACKEND = '$httpBackend';
|
||||
exports.NG1_INJECTOR = '$injector';
|
||||
exports.NG1_PARSE = '$parse';
|
||||
exports.NG1_TEMPLATE_CACHE = '$templateCache';
|
||||
exports.REQUIRE_INJECTOR = '^' + exports.NG2_INJECTOR;
|
||||
global.define = __define;
|
||||
return module.exports;
|
||||
});
|
||||
|
||||
System.register("angular2/src/upgrade/downgrade_ng2_adapter", ["angular2/core", "angular2/src/upgrade/constants"], true, function(require, exports, module) {
|
||||
var global = System.global,
|
||||
__define = global.define;
|
||||
global.define = undefined;
|
||||
var core_1 = require("angular2/core");
|
||||
var constants_1 = require("angular2/src/upgrade/constants");
|
||||
var INITIAL_VALUE = {__UNINITIALIZED__: true};
|
||||
var DowngradeNg2ComponentAdapter = (function() {
|
||||
function DowngradeNg2ComponentAdapter(id, info, element, attrs, scope, parentInjector, parse, viewManager, hostViewFactory) {
|
||||
this.id = id;
|
||||
this.info = info;
|
||||
this.element = element;
|
||||
this.attrs = attrs;
|
||||
this.scope = scope;
|
||||
this.parentInjector = parentInjector;
|
||||
this.parse = parse;
|
||||
this.viewManager = viewManager;
|
||||
this.hostViewFactory = hostViewFactory;
|
||||
this.component = null;
|
||||
this.inputChangeCount = 0;
|
||||
this.inputChanges = null;
|
||||
this.hostViewRef = null;
|
||||
this.changeDetector = null;
|
||||
this.contentInsertionPoint = null;
|
||||
this.element[0].id = id;
|
||||
this.componentScope = scope.$new();
|
||||
this.childNodes = element.contents();
|
||||
}
|
||||
DowngradeNg2ComponentAdapter.prototype.bootstrapNg2 = function() {
|
||||
var childInjector = this.parentInjector.resolveAndCreateChild([core_1.provide(constants_1.NG1_SCOPE, {useValue: this.componentScope})]);
|
||||
this.contentInsertionPoint = document.createComment('ng1 insertion point');
|
||||
this.hostViewRef = this.viewManager.createRootHostView(this.hostViewFactory, '#' + this.id, childInjector, [[this.contentInsertionPoint]]);
|
||||
var hostElement = this.viewManager.getHostElement(this.hostViewRef);
|
||||
this.changeDetector = this.hostViewRef.changeDetectorRef;
|
||||
this.component = this.viewManager.getComponent(hostElement);
|
||||
};
|
||||
DowngradeNg2ComponentAdapter.prototype.setupInputs = function() {
|
||||
var _this = this;
|
||||
var attrs = this.attrs;
|
||||
var inputs = this.info.inputs;
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
var input = inputs[i];
|
||||
var expr = null;
|
||||
if (attrs.hasOwnProperty(input.attr)) {
|
||||
var observeFn = (function(prop) {
|
||||
var prevValue = INITIAL_VALUE;
|
||||
return function(value) {
|
||||
if (_this.inputChanges !== null) {
|
||||
_this.inputChangeCount++;
|
||||
_this.inputChanges[prop] = new Ng1Change(value, prevValue === INITIAL_VALUE ? value : prevValue);
|
||||
prevValue = value;
|
||||
}
|
||||
_this.component[prop] = value;
|
||||
};
|
||||
})(input.prop);
|
||||
attrs.$observe(input.attr, observeFn);
|
||||
} else if (attrs.hasOwnProperty(input.bindAttr)) {
|
||||
expr = attrs[input.bindAttr];
|
||||
} else if (attrs.hasOwnProperty(input.bracketAttr)) {
|
||||
expr = attrs[input.bracketAttr];
|
||||
} else if (attrs.hasOwnProperty(input.bindonAttr)) {
|
||||
expr = attrs[input.bindonAttr];
|
||||
} else if (attrs.hasOwnProperty(input.bracketParenAttr)) {
|
||||
expr = attrs[input.bracketParenAttr];
|
||||
}
|
||||
if (expr != null) {
|
||||
var watchFn = (function(prop) {
|
||||
return function(value, prevValue) {
|
||||
if (_this.inputChanges != null) {
|
||||
_this.inputChangeCount++;
|
||||
_this.inputChanges[prop] = new Ng1Change(prevValue, value);
|
||||
}
|
||||
_this.component[prop] = value;
|
||||
};
|
||||
})(input.prop);
|
||||
this.componentScope.$watch(expr, watchFn);
|
||||
}
|
||||
}
|
||||
var prototype = this.info.type.prototype;
|
||||
if (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();
|
||||
});
|
||||
};
|
||||
DowngradeNg2ComponentAdapter.prototype.projectContent = function() {
|
||||
var childNodes = this.childNodes;
|
||||
var parent = this.contentInsertionPoint.parentNode;
|
||||
if (parent) {
|
||||
for (var i = 0,
|
||||
ii = childNodes.length; i < ii; i++) {
|
||||
parent.insertBefore(childNodes[i], this.contentInsertionPoint);
|
||||
}
|
||||
}
|
||||
};
|
||||
DowngradeNg2ComponentAdapter.prototype.setupOutputs = function() {
|
||||
var _this = this;
|
||||
var attrs = this.attrs;
|
||||
var outputs = this.info.outputs;
|
||||
for (var j = 0; j < outputs.length; j++) {
|
||||
var output = outputs[j];
|
||||
var expr = null;
|
||||
var assignExpr = false;
|
||||
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;
|
||||
if (attrs.hasOwnProperty(output.onAttr)) {
|
||||
expr = attrs[output.onAttr];
|
||||
} else if (attrs.hasOwnProperty(output.parenAttr)) {
|
||||
expr = attrs[output.parenAttr];
|
||||
} else if (attrs.hasOwnProperty(bindonAttr)) {
|
||||
expr = attrs[bindonAttr];
|
||||
assignExpr = true;
|
||||
} else if (attrs.hasOwnProperty(bracketParenAttr)) {
|
||||
expr = attrs[bracketParenAttr];
|
||||
assignExpr = true;
|
||||
}
|
||||
if (expr != null && assignExpr != null) {
|
||||
var getter = this.parse(expr);
|
||||
var setter = getter.assign;
|
||||
if (assignExpr && !setter) {
|
||||
throw new Error("Expression '" + expr + "' is not assignable!");
|
||||
}
|
||||
var emitter = this.component[output.prop];
|
||||
if (emitter) {
|
||||
emitter.subscribe({next: assignExpr ? (function(setter) {
|
||||
return function(value) {
|
||||
return setter(_this.scope, value);
|
||||
};
|
||||
})(setter) : (function(getter) {
|
||||
return function(value) {
|
||||
return getter(_this.scope, {$event: value});
|
||||
};
|
||||
})(getter)});
|
||||
} else {
|
||||
throw new Error("Missing emitter '" + output.prop + "' on component '" + this.info.selector + "'!");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
DowngradeNg2ComponentAdapter.prototype.registerCleanup = function() {
|
||||
var _this = this;
|
||||
this.element.bind('$remove', function() {
|
||||
return _this.viewManager.destroyRootHostView(_this.hostViewRef);
|
||||
});
|
||||
};
|
||||
return DowngradeNg2ComponentAdapter;
|
||||
})();
|
||||
exports.DowngradeNg2ComponentAdapter = DowngradeNg2ComponentAdapter;
|
||||
var Ng1Change = (function() {
|
||||
function Ng1Change(previousValue, currentValue) {
|
||||
this.previousValue = previousValue;
|
||||
this.currentValue = currentValue;
|
||||
}
|
||||
Ng1Change.prototype.isFirstChange = function() {
|
||||
return this.previousValue === this.currentValue;
|
||||
};
|
||||
return Ng1Change;
|
||||
})();
|
||||
global.define = __define;
|
||||
return module.exports;
|
||||
});
|
||||
|
||||
System.register("angular2/src/upgrade/angular_js", [], true, function(require, exports, module) {
|
||||
var global = System.global,
|
||||
__define = global.define;
|
||||
global.define = undefined;
|
||||
function noNg() {
|
||||
throw new Error('AngularJS v1.x is not loaded!');
|
||||
}
|
||||
var angular = {
|
||||
bootstrap: noNg,
|
||||
module: noNg,
|
||||
element: noNg,
|
||||
version: noNg
|
||||
};
|
||||
try {
|
||||
if (window.hasOwnProperty('angular')) {
|
||||
angular = window.angular;
|
||||
}
|
||||
} catch (e) {}
|
||||
exports.bootstrap = angular.bootstrap;
|
||||
exports.module = angular.module;
|
||||
exports.element = angular.element;
|
||||
exports.version = angular.version;
|
||||
global.define = __define;
|
||||
return module.exports;
|
||||
});
|
||||
|
||||
System.register("angular2/src/upgrade/upgrade_ng1_adapter", ["angular2/core", "angular2/src/upgrade/constants", "angular2/src/upgrade/util", "angular2/src/upgrade/angular_js"], true, function(require, exports, module) {
|
||||
var global = System.global,
|
||||
__define = global.define;
|
||||
global.define = undefined;
|
||||
var core_1 = require("angular2/core");
|
||||
var constants_1 = require("angular2/src/upgrade/constants");
|
||||
var util_1 = require("angular2/src/upgrade/util");
|
||||
var angular = require("angular2/src/upgrade/angular_js");
|
||||
var CAMEL_CASE = /([A-Z])/g;
|
||||
var INITIAL_VALUE = {__UNINITIALIZED__: true};
|
||||
var NOT_SUPPORTED = 'NOT_SUPPORTED';
|
||||
var 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();
|
||||
});
|
||||
var self = this;
|
||||
this.type = core_1.Directive({
|
||||
selector: selector,
|
||||
inputs: this.inputsRename,
|
||||
outputs: this.outputsRename
|
||||
}).Class({
|
||||
constructor: [new core_1.Inject(constants_1.NG1_SCOPE), core_1.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);
|
||||
}],
|
||||
ngOnChanges: function() {},
|
||||
ngDoCheck: function() {}
|
||||
});
|
||||
}
|
||||
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];
|
||||
if (directive.replace)
|
||||
this.notSupported('replace');
|
||||
if (directive.terminal)
|
||||
this.notSupported('terminal');
|
||||
var link = directive.link;
|
||||
if (typeof link == 'object') {
|
||||
if (link.post)
|
||||
this.notSupported('link.post');
|
||||
}
|
||||
return directive;
|
||||
};
|
||||
UpgradeNg1ComponentAdapterBuilder.prototype.notSupported = function(feature) {
|
||||
throw new Error("Upgraded directive '" + this.name + "' does not support '" + feature + "'.");
|
||||
};
|
||||
UpgradeNg1ComponentAdapterBuilder.prototype.extractBindings = function() {
|
||||
var btcIsObject = typeof this.directive.bindToController === 'object';
|
||||
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 (typeof context == 'object') {
|
||||
for (var name in context) {
|
||||
if (context.hasOwnProperty(name)) {
|
||||
var localName = context[name];
|
||||
var type = localName.charAt(0);
|
||||
localName = localName.substr(1) || name;
|
||||
var outputName = 'output_' + name;
|
||||
var outputNameRename = outputName + ': ' + name;
|
||||
var outputNameRenameChange = outputName + ': ' + name + 'Change';
|
||||
var inputName = 'input_' + name;
|
||||
var 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;
|
||||
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) {
|
||||
var _this = this;
|
||||
if (this.directive.template !== undefined) {
|
||||
this.linkFn = compileHtml(this.directive.template);
|
||||
} else if (this.directive.templateUrl) {
|
||||
var url = this.directive.templateUrl;
|
||||
var html = templateCache.get(url);
|
||||
if (html !== undefined) {
|
||||
this.linkFn = compileHtml(html);
|
||||
} else {
|
||||
return new Promise(function(resolve, err) {
|
||||
httpBackend('GET', url, null, function(status, response) {
|
||||
if (status == 200) {
|
||||
resolve(_this.linkFn = compileHtml(templateCache.put(url, response)));
|
||||
} else {
|
||||
err("GET " + url + " returned " + status + ": " + response);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
} else {
|
||||
throw new Error("Directive '" + this.name + "' is not a component, it is missing template.");
|
||||
}
|
||||
return null;
|
||||
function compileHtml(html) {
|
||||
var div = document.createElement('div');
|
||||
div.innerHTML = html;
|
||||
return compile(div.childNodes);
|
||||
}
|
||||
};
|
||||
UpgradeNg1ComponentAdapterBuilder.resolve = function(exportedComponents, injector) {
|
||||
var promises = [];
|
||||
var compile = injector.get(constants_1.NG1_COMPILE);
|
||||
var templateCache = injector.get(constants_1.NG1_TEMPLATE_CACHE);
|
||||
var httpBackend = injector.get(constants_1.NG1_HTTP_BACKEND);
|
||||
var $controller = injector.get(constants_1.NG1_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);
|
||||
if (promise)
|
||||
promises.push(promise);
|
||||
}
|
||||
}
|
||||
return Promise.all(promises);
|
||||
};
|
||||
return UpgradeNg1ComponentAdapterBuilder;
|
||||
})();
|
||||
exports.UpgradeNg1ComponentAdapterBuilder = UpgradeNg1ComponentAdapterBuilder;
|
||||
var UpgradeNg1ComponentAdapter = (function() {
|
||||
function UpgradeNg1ComponentAdapter(linkFn, scope, directive, elementRef, $controller, inputs, outputs, propOuts, checkProperties, propertyMap) {
|
||||
this.directive = directive;
|
||||
this.inputs = inputs;
|
||||
this.outputs = outputs;
|
||||
this.propOuts = propOuts;
|
||||
this.checkProperties = checkProperties;
|
||||
this.propertyMap = propertyMap;
|
||||
this.destinationObj = null;
|
||||
this.checkLastValues = [];
|
||||
var element = elementRef.nativeElement;
|
||||
var childNodes = [];
|
||||
var childNode;
|
||||
while (childNode = element.firstChild) {
|
||||
element.removeChild(childNode);
|
||||
childNodes.push(childNode);
|
||||
}
|
||||
var componentScope = scope.$new(!!directive.scope);
|
||||
var $element = angular.element(element);
|
||||
var controllerType = directive.controller;
|
||||
var controller = null;
|
||||
if (controllerType) {
|
||||
var locals = {
|
||||
$scope: componentScope,
|
||||
$element: $element
|
||||
};
|
||||
controller = $controller(controllerType, locals, null, directive.controllerAs);
|
||||
$element.data(util_1.controllerKey(directive.name), controller);
|
||||
}
|
||||
var link = directive.link;
|
||||
if (typeof link == 'object')
|
||||
link = link.pre;
|
||||
if (link) {
|
||||
var attrs = NOT_SUPPORTED;
|
||||
var transcludeFn = NOT_SUPPORTED;
|
||||
var linkController = this.resolveRequired($element, directive.require);
|
||||
directive.link(componentScope, $element, attrs, linkController, transcludeFn);
|
||||
}
|
||||
this.destinationObj = directive.bindToController && controller ? controller : componentScope;
|
||||
linkFn(componentScope, function(clonedElement, scope) {
|
||||
for (var i = 0,
|
||||
ii = clonedElement.length; i < ii; i++) {
|
||||
element.appendChild(clonedElement[i]);
|
||||
}
|
||||
}, {parentBoundTranscludeFn: function(scope, cloneAttach) {
|
||||
cloneAttach(childNodes);
|
||||
}});
|
||||
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 core_1.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 core_1.EventEmitter();
|
||||
this.checkLastValues.push(INITIAL_VALUE);
|
||||
}
|
||||
}
|
||||
UpgradeNg1ComponentAdapter.prototype.ngOnChanges = function(changes) {
|
||||
for (var name in changes) {
|
||||
if (changes.hasOwnProperty(name)) {
|
||||
var change = changes[name];
|
||||
this.setComponentProperty(name, change.currentValue);
|
||||
}
|
||||
}
|
||||
};
|
||||
UpgradeNg1ComponentAdapter.prototype.ngDoCheck = function() {
|
||||
var count = 0;
|
||||
var destinationObj = this.destinationObj;
|
||||
var lastValues = this.checkLastValues;
|
||||
var checkProperties = this.checkProperties;
|
||||
for (var i = 0; i < checkProperties.length; i++) {
|
||||
var value = destinationObj[checkProperties[i]];
|
||||
var last = lastValues[i];
|
||||
if (value !== last) {
|
||||
if (typeof value == 'number' && isNaN(value) && typeof last == 'number' && isNaN(last)) {} else {
|
||||
var eventEmitter = this[this.propOuts[i]];
|
||||
eventEmitter.emit(lastValues[i] = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return count;
|
||||
};
|
||||
UpgradeNg1ComponentAdapter.prototype.setComponentProperty = function(name, value) {
|
||||
this.destinationObj[this.propertyMap[name]] = value;
|
||||
};
|
||||
UpgradeNg1ComponentAdapter.prototype.resolveRequired = function($element, require) {
|
||||
if (!require) {
|
||||
return undefined;
|
||||
} else if (typeof require == 'string') {
|
||||
var name = require;
|
||||
var isOptional = false;
|
||||
var startParent = false;
|
||||
var searchParents = false;
|
||||
var ch;
|
||||
if (name.charAt(0) == '?') {
|
||||
isOptional = true;
|
||||
name = name.substr(1);
|
||||
}
|
||||
if (name.charAt(0) == '^') {
|
||||
searchParents = true;
|
||||
name = name.substr(1);
|
||||
}
|
||||
if (name.charAt(0) == '^') {
|
||||
startParent = true;
|
||||
name = name.substr(1);
|
||||
}
|
||||
var key = util_1.controllerKey(name);
|
||||
if (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;
|
||||
} else if (require instanceof Array) {
|
||||
var deps = [];
|
||||
for (var 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);
|
||||
};
|
||||
return UpgradeNg1ComponentAdapter;
|
||||
})();
|
||||
global.define = __define;
|
||||
return module.exports;
|
||||
});
|
||||
|
||||
System.register("angular2/src/upgrade/upgrade_adapter", ["angular2/core", "angular2/src/facade/async", "angular2/platform/browser", "angular2/src/upgrade/metadata", "angular2/src/upgrade/util", "angular2/src/upgrade/constants", "angular2/src/upgrade/downgrade_ng2_adapter", "angular2/src/upgrade/upgrade_ng1_adapter", "angular2/src/upgrade/angular_js"], true, function(require, exports, module) {
|
||||
var global = System.global,
|
||||
__define = global.define;
|
||||
global.define = undefined;
|
||||
var core_1 = require("angular2/core");
|
||||
var async_1 = require("angular2/src/facade/async");
|
||||
var browser_1 = require("angular2/platform/browser");
|
||||
var metadata_1 = require("angular2/src/upgrade/metadata");
|
||||
var util_1 = require("angular2/src/upgrade/util");
|
||||
var constants_1 = require("angular2/src/upgrade/constants");
|
||||
var downgrade_ng2_adapter_1 = require("angular2/src/upgrade/downgrade_ng2_adapter");
|
||||
var upgrade_ng1_adapter_1 = require("angular2/src/upgrade/upgrade_ng1_adapter");
|
||||
var angular = require("angular2/src/upgrade/angular_js");
|
||||
var upgradeCount = 0;
|
||||
var UpgradeAdapter = (function() {
|
||||
function UpgradeAdapter() {
|
||||
this.idPrefix = "NG2_UPGRADE_" + upgradeCount++ + "_";
|
||||
this.upgradedComponents = [];
|
||||
this.downgradedComponents = {};
|
||||
this.providers = [];
|
||||
}
|
||||
UpgradeAdapter.prototype.downgradeNg2Component = function(type) {
|
||||
this.upgradedComponents.push(type);
|
||||
var info = metadata_1.getComponentInfo(type);
|
||||
return ng1ComponentDirective(info, "" + this.idPrefix + info.selector + "_c");
|
||||
};
|
||||
UpgradeAdapter.prototype.upgradeNg1Component = function(name) {
|
||||
if (this.downgradedComponents.hasOwnProperty(name)) {
|
||||
return this.downgradedComponents[name].type;
|
||||
} else {
|
||||
return (this.downgradedComponents[name] = new upgrade_ng1_adapter_1.UpgradeNg1ComponentAdapterBuilder(name)).type;
|
||||
}
|
||||
};
|
||||
UpgradeAdapter.prototype.bootstrap = function(element, modules, config) {
|
||||
var _this = this;
|
||||
var upgrade = new UpgradeAdapterRef();
|
||||
var ng1Injector = null;
|
||||
var platformRef = core_1.platform(browser_1.BROWSER_PROVIDERS);
|
||||
var applicationRef = platformRef.application([browser_1.BROWSER_APP_PROVIDERS, core_1.provide(constants_1.NG1_INJECTOR, {useFactory: function() {
|
||||
return ng1Injector;
|
||||
}}), core_1.provide(constants_1.NG1_COMPILE, {useFactory: function() {
|
||||
return ng1Injector.get(constants_1.NG1_COMPILE);
|
||||
}}), this.providers]);
|
||||
var injector = applicationRef.injector;
|
||||
var ngZone = injector.get(core_1.NgZone);
|
||||
var compiler = injector.get(core_1.Compiler);
|
||||
var delayApplyExps = [];
|
||||
var original$applyFn;
|
||||
var rootScopePrototype;
|
||||
var rootScope;
|
||||
var hostViewFactoryRefMap = {};
|
||||
var ng1Module = angular.module(this.idPrefix, modules);
|
||||
var ng1compilePromise = null;
|
||||
ng1Module.value(constants_1.NG2_INJECTOR, injector).value(constants_1.NG2_ZONE, ngZone).value(constants_1.NG2_COMPILER, compiler).value(constants_1.NG2_HOST_VIEW_FACTORY_REF_MAP, hostViewFactoryRefMap).value(constants_1.NG2_APP_VIEW_MANAGER, injector.get(core_1.AppViewManager)).config(['$provide', function(provide) {
|
||||
provide.decorator(constants_1.NG1_ROOT_SCOPE, ['$delegate', function(rootScopeDelegate) {
|
||||
rootScopePrototype = rootScopeDelegate.constructor.prototype;
|
||||
if (rootScopePrototype.hasOwnProperty('$apply')) {
|
||||
original$applyFn = rootScopePrototype.$apply;
|
||||
rootScopePrototype.$apply = function(exp) {
|
||||
return delayApplyExps.push(exp);
|
||||
};
|
||||
} else {
|
||||
throw new Error("Failed to find '$apply' on '$rootScope'!");
|
||||
}
|
||||
return rootScope = rootScopeDelegate;
|
||||
}]);
|
||||
}]).run(['$injector', '$rootScope', function(injector, rootScope) {
|
||||
ng1Injector = injector;
|
||||
async_1.ObservableWrapper.subscribe(ngZone.onTurnDone, function(_) {
|
||||
ngZone.run(function() {
|
||||
return rootScope.$apply();
|
||||
});
|
||||
});
|
||||
ng1compilePromise = upgrade_ng1_adapter_1.UpgradeNg1ComponentAdapterBuilder.resolve(_this.downgradedComponents, injector);
|
||||
}]);
|
||||
angular.element(element).data(util_1.controllerKey(constants_1.NG2_INJECTOR), injector);
|
||||
ngZone.run(function() {
|
||||
angular.bootstrap(element, [_this.idPrefix], config);
|
||||
});
|
||||
Promise.all([this.compileNg2Components(compiler, hostViewFactoryRefMap), ng1compilePromise]).then(function() {
|
||||
ngZone.run(function() {
|
||||
if (rootScopePrototype) {
|
||||
rootScopePrototype.$apply = original$applyFn;
|
||||
while (delayApplyExps.length) {
|
||||
rootScope.$apply(delayApplyExps.shift());
|
||||
}
|
||||
upgrade._bootstrapDone(applicationRef, ng1Injector);
|
||||
rootScopePrototype = null;
|
||||
}
|
||||
});
|
||||
}, util_1.onError);
|
||||
return upgrade;
|
||||
};
|
||||
UpgradeAdapter.prototype.addProvider = function(provider) {
|
||||
this.providers.push(provider);
|
||||
};
|
||||
UpgradeAdapter.prototype.upgradeNg1Provider = function(name, options) {
|
||||
var token = options && options.asToken || name;
|
||||
this.providers.push(core_1.provide(token, {
|
||||
useFactory: function(ng1Injector) {
|
||||
return ng1Injector.get(name);
|
||||
},
|
||||
deps: [constants_1.NG1_INJECTOR]
|
||||
}));
|
||||
};
|
||||
UpgradeAdapter.prototype.downgradeNg2Provider = function(token) {
|
||||
var factory = function(injector) {
|
||||
return injector.get(token);
|
||||
};
|
||||
factory.$inject = [constants_1.NG2_INJECTOR];
|
||||
return factory;
|
||||
};
|
||||
UpgradeAdapter.prototype.compileNg2Components = function(compiler, hostViewFactoryRefMap) {
|
||||
var _this = this;
|
||||
var promises = [];
|
||||
var types = this.upgradedComponents;
|
||||
for (var i = 0; i < types.length; i++) {
|
||||
promises.push(compiler.compileInHost(types[i]));
|
||||
}
|
||||
return Promise.all(promises).then(function(hostViewFactories) {
|
||||
var types = _this.upgradedComponents;
|
||||
for (var i = 0; i < hostViewFactories.length; i++) {
|
||||
hostViewFactoryRefMap[metadata_1.getComponentInfo(types[i]).selector] = hostViewFactories[i];
|
||||
}
|
||||
return hostViewFactoryRefMap;
|
||||
}, util_1.onError);
|
||||
};
|
||||
return UpgradeAdapter;
|
||||
})();
|
||||
exports.UpgradeAdapter = UpgradeAdapter;
|
||||
function ng1ComponentDirective(info, idPrefix) {
|
||||
directiveFactory.$inject = [constants_1.NG2_HOST_VIEW_FACTORY_REF_MAP, constants_1.NG2_APP_VIEW_MANAGER, constants_1.NG1_PARSE];
|
||||
function directiveFactory(hostViewFactoryRefMap, viewManager, parse) {
|
||||
var hostViewFactory = hostViewFactoryRefMap[info.selector];
|
||||
if (!hostViewFactory)
|
||||
throw new Error('Expecting HostViewFactoryRef for: ' + info.selector);
|
||||
var idCount = 0;
|
||||
return {
|
||||
restrict: 'E',
|
||||
require: constants_1.REQUIRE_INJECTOR,
|
||||
link: {post: function(scope, element, attrs, parentInjector, transclude) {
|
||||
var domElement = element[0];
|
||||
var facade = new downgrade_ng2_adapter_1.DowngradeNg2ComponentAdapter(idPrefix + (idCount++), info, element, attrs, scope, parentInjector, parse, viewManager, hostViewFactory);
|
||||
facade.setupInputs();
|
||||
facade.bootstrapNg2();
|
||||
facade.projectContent();
|
||||
facade.setupOutputs();
|
||||
facade.registerCleanup();
|
||||
}}
|
||||
};
|
||||
}
|
||||
return directiveFactory;
|
||||
}
|
||||
var UpgradeAdapterRef = (function() {
|
||||
function UpgradeAdapterRef() {
|
||||
this._readyFn = null;
|
||||
this.ng1RootScope = null;
|
||||
this.ng1Injector = null;
|
||||
this.ng2ApplicationRef = null;
|
||||
this.ng2Injector = null;
|
||||
}
|
||||
UpgradeAdapterRef.prototype._bootstrapDone = function(applicationRef, ng1Injector) {
|
||||
this.ng2ApplicationRef = applicationRef;
|
||||
this.ng2Injector = applicationRef.injector;
|
||||
this.ng1Injector = ng1Injector;
|
||||
this.ng1RootScope = ng1Injector.get(constants_1.NG1_ROOT_SCOPE);
|
||||
this._readyFn && this._readyFn(this);
|
||||
};
|
||||
UpgradeAdapterRef.prototype.ready = function(fn) {
|
||||
this._readyFn = fn;
|
||||
};
|
||||
UpgradeAdapterRef.prototype.dispose = function() {
|
||||
this.ng1Injector.get(constants_1.NG1_ROOT_SCOPE).$destroy();
|
||||
this.ng2ApplicationRef.dispose();
|
||||
};
|
||||
return UpgradeAdapterRef;
|
||||
})();
|
||||
exports.UpgradeAdapterRef = UpgradeAdapterRef;
|
||||
global.define = __define;
|
||||
return module.exports;
|
||||
});
|
||||
|
||||
System.register("angular2/upgrade", ["angular2/src/upgrade/upgrade_adapter"], true, function(require, exports, module) {
|
||||
var global = System.global,
|
||||
__define = global.define;
|
||||
global.define = undefined;
|
||||
var upgrade_adapter_1 = require("angular2/src/upgrade/upgrade_adapter");
|
||||
exports.UpgradeAdapter = upgrade_adapter_1.UpgradeAdapter;
|
||||
exports.UpgradeAdapterRef = upgrade_adapter_1.UpgradeAdapterRef;
|
||||
global.define = __define;
|
||||
return module.exports;
|
||||
});
|
||||
|
||||
//# sourceMappingURLDisabled=upgrade.js.map
|
||||
Generated
Vendored
-1
@@ -1 +0,0 @@
|
||||
"format register";System.register("angular2/src/upgrade/metadata",["angular2/core"],!0,function(t,e,r){function n(t){var e=c.resolve(t),r=e.selector;if(!r.match(p))throw new Error("Only selectors matching element names are supported, got: "+r);var r=r.replace(u,function(t,e){return e.toUpperCase()});return{type:t,selector:r,inputs:o(e.inputs),outputs:o(e.outputs)}}function o(t){var e=[];if(t)for(var r=0;r<t.length;r++){var n=t[r].split(":"),o=n[0].trim(),i=(n[1]||n[0]).trim(),a=i.charAt(0).toUpperCase()+i.substr(1);e.push({prop:o,attr:i,bracketAttr:"["+i+"]",parenAttr:"("+i+")",bracketParenAttr:"[("+i+")]",onAttr:"on"+a,bindAttr:"bind"+a,bindonAttr:"bindon"+a})}return e}var i=System.global,a=i.define;i.define=void 0;var s=t("angular2/core"),p=/^[\w|-]*$/,u=/-(\w)/g,c=new s.DirectiveResolver;return e.getComponentInfo=n,e.parseFields=o,i.define=a,r.exports}),System.register("angular2/src/upgrade/util",[],!0,function(t,e,r){function n(t){return"function"==typeof t?t.name||t.toString():""+t}function o(t){throw console.log(t,t.stack),t}function i(t){return"$"+t+"Controller"}var a=System.global,s=a.define;return a.define=void 0,e.stringify=n,e.onError=o,e.controllerKey=i,a.define=s,r.exports}),System.register("angular2/src/upgrade/constants",[],!0,function(t,e,r){var n=System.global,o=n.define;return n.define=void 0,e.NG2_APP_VIEW_MANAGER="ng2.AppViewManager",e.NG2_COMPILER="ng2.Compiler",e.NG2_INJECTOR="ng2.Injector",e.NG2_HOST_VIEW_FACTORY_REF_MAP="ng2.HostViewFactoryRefMap",e.NG2_ZONE="ng2.NgZone",e.NG1_CONTROLLER="$controller",e.NG1_SCOPE="$scope",e.NG1_ROOT_SCOPE="$rootScope",e.NG1_COMPILE="$compile",e.NG1_HTTP_BACKEND="$httpBackend",e.NG1_INJECTOR="$injector",e.NG1_PARSE="$parse",e.NG1_TEMPLATE_CACHE="$templateCache",e.REQUIRE_INJECTOR="^"+e.NG2_INJECTOR,n.define=o,r.exports}),System.register("angular2/src/upgrade/downgrade_ng2_adapter",["angular2/core","angular2/src/upgrade/constants"],!0,function(t,e,r){var n=System.global,o=n.define;n.define=void 0;var i=t("angular2/core"),a=t("angular2/src/upgrade/constants"),s={__UNINITIALIZED__:!0},p=function(){function t(t,e,r,n,o,i,a,s,p){this.id=t,this.info=e,this.element=r,this.attrs=n,this.scope=o,this.parentInjector=i,this.parse=a,this.viewManager=s,this.hostViewFactory=p,this.component=null,this.inputChangeCount=0,this.inputChanges=null,this.hostViewRef=null,this.changeDetector=null,this.contentInsertionPoint=null,this.element[0].id=t,this.componentScope=o.$new(),this.childNodes=r.contents()}return t.prototype.bootstrapNg2=function(){var t=this.parentInjector.resolveAndCreateChild([i.provide(a.NG1_SCOPE,{useValue:this.componentScope})]);this.contentInsertionPoint=document.createComment("ng1 insertion point"),this.hostViewRef=this.viewManager.createRootHostView(this.hostViewFactory,"#"+this.id,t,[[this.contentInsertionPoint]]);var e=this.viewManager.getHostElement(this.hostViewRef);this.changeDetector=this.hostViewRef.changeDetectorRef,this.component=this.viewManager.getComponent(e)},t.prototype.setupInputs=function(){for(var t=this,e=this.attrs,r=this.info.inputs,n=0;n<r.length;n++){var o=r[n],i=null;if(e.hasOwnProperty(o.attr)){var a=function(e){var r=s;return function(n){null!==t.inputChanges&&(t.inputChangeCount++,t.inputChanges[e]=new u(n,r===s?n:r),r=n),t.component[e]=n}}(o.prop);e.$observe(o.attr,a)}else e.hasOwnProperty(o.bindAttr)?i=e[o.bindAttr]:e.hasOwnProperty(o.bracketAttr)?i=e[o.bracketAttr]:e.hasOwnProperty(o.bindonAttr)?i=e[o.bindonAttr]:e.hasOwnProperty(o.bracketParenAttr)&&(i=e[o.bracketParenAttr]);if(null!=i){var p=function(e){return function(r,n){null!=t.inputChanges&&(t.inputChangeCount++,t.inputChanges[e]=new u(n,r)),t.component[e]=r}}(o.prop);this.componentScope.$watch(i,p)}}var c=this.info.type.prototype;c&&c.ngOnChanges&&(this.inputChanges={},this.componentScope.$watch(function(){return t.inputChangeCount},function(){var e=t.inputChanges;t.inputChanges={},t.component.ngOnChanges(e)})),this.componentScope.$watch(function(){return t.changeDetector&&t.changeDetector.detectChanges()})},t.prototype.projectContent=function(){var t=this.childNodes,e=this.contentInsertionPoint.parentNode;if(e)for(var r=0,n=t.length;n>r;r++)e.insertBefore(t[r],this.contentInsertionPoint)},t.prototype.setupOutputs=function(){for(var t=this,e=this.attrs,r=this.info.outputs,n=0;n<r.length;n++){var o=r[n],i=null,a=!1,s=o.bindonAttr?o.bindonAttr.substring(0,o.bindonAttr.length-6):null,p=o.bracketParenAttr?"[("+o.bracketParenAttr.substring(2,o.bracketParenAttr.length-8)+")]":null;if(e.hasOwnProperty(o.onAttr)?i=e[o.onAttr]:e.hasOwnProperty(o.parenAttr)?i=e[o.parenAttr]:e.hasOwnProperty(s)?(i=e[s],a=!0):e.hasOwnProperty(p)&&(i=e[p],a=!0),null!=i&&null!=a){var u=this.parse(i),c=u.assign;if(a&&!c)throw new Error("Expression '"+i+"' is not assignable!");var l=this.component[o.prop];if(!l)throw new Error("Missing emitter '"+o.prop+"' on component '"+this.info.selector+"'!");l.subscribe({next:a?function(e){return function(r){return e(t.scope,r)}}(c):function(e){return functLine truncated
|
||||
Generated
Vendored
-23371
File diff suppressed because it is too large.
Load diff
Generated
Vendored
-38382
File diff suppressed because it is too large.
Load diff
Generated
Vendored
-4
@@ -1,4 +0,0 @@
|
||||
export * from './src/common/pipes';
|
||||
export * from './src/common/directives';
|
||||
export * from './src/common/forms';
|
||||
export * from './src/common/common_directives';
|
||||
Generated
Vendored
-8
@@ -1,8 +0,0 @@
|
||||
'use strict';function __export(m) {
|
||||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||
}
|
||||
__export(require('./src/common/pipes'));
|
||||
__export(require('./src/common/directives'));
|
||||
__export(require('./src/common/forms'));
|
||||
__export(require('./src/common/common_directives'));
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYW5ndWxhcjIvY29tbW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLGlCQUFjLG9CQUFvQixDQUFDLEVBQUE7QUFDbkMsaUJBQWMseUJBQXlCLENBQUMsRUFBQTtBQUN4QyxpQkFBYyxvQkFBb0IsQ0FBQyxFQUFBO0FBQ25DLGlCQUFjLGdDQUFnQyxDQUFDLEVBQUEiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL3NyYy9jb21tb24vcGlwZXMnO1xuZXhwb3J0ICogZnJvbSAnLi9zcmMvY29tbW9uL2RpcmVjdGl2ZXMnO1xuZXhwb3J0ICogZnJvbSAnLi9zcmMvY29tbW9uL2Zvcm1zJztcbmV4cG9ydCAqIGZyb20gJy4vc3JjL2NvbW1vbi9jb21tb25fZGlyZWN0aXZlcyc7Il19
|
||||
Generated
Vendored
-8
@@ -1,8 +0,0 @@
|
||||
/**
|
||||
* @module
|
||||
* @description
|
||||
* Starting point to import all compiler APIs.
|
||||
*/
|
||||
export * from './src/compiler/url_resolver';
|
||||
export * from './src/compiler/xhr';
|
||||
export * from './src/compiler/compiler';
|
||||
Generated
Vendored
-12
@@ -1,12 +0,0 @@
|
||||
'use strict';function __export(m) {
|
||||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||
}
|
||||
/**
|
||||
* @module
|
||||
* @description
|
||||
* Starting point to import all compiler APIs.
|
||||
*/
|
||||
__export(require('./src/compiler/url_resolver'));
|
||||
__export(require('./src/compiler/xhr'));
|
||||
__export(require('./src/compiler/compiler'));
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcGlsZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhbmd1bGFyMi9jb21waWxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTs7OztHQUlHO0FBQ0gsaUJBQWMsNkJBQTZCLENBQUMsRUFBQTtBQUM1QyxpQkFBYyxvQkFBb0IsQ0FBQyxFQUFBO0FBQ25DLGlCQUFjLHlCQUF5QixDQUFDLEVBQUEiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBtb2R1bGVcbiAqIEBkZXNjcmlwdGlvblxuICogU3RhcnRpbmcgcG9pbnQgdG8gaW1wb3J0IGFsbCBjb21waWxlciBBUElzLlxuICovXG5leHBvcnQgKiBmcm9tICcuL3NyYy9jb21waWxlci91cmxfcmVzb2x2ZXInO1xuZXhwb3J0ICogZnJvbSAnLi9zcmMvY29tcGlsZXIveGhyJztcbmV4cG9ydCAqIGZyb20gJy4vc3JjL2NvbXBpbGVyL2NvbXBpbGVyJzsiXX0=
|
||||
Generated
Vendored
-24
@@ -1,24 +0,0 @@
|
||||
/**
|
||||
* @module
|
||||
* @description
|
||||
* Starting point to import all public core APIs.
|
||||
*/
|
||||
export * from './src/core/metadata';
|
||||
export * from './src/core/util';
|
||||
export * from './src/core/prod_mode';
|
||||
export * from './src/core/di';
|
||||
export * from './src/facade/facade';
|
||||
export { enableProdMode } from 'angular2/src/facade/lang';
|
||||
export { platform, createNgZone, PlatformRef, ApplicationRef } from './src/core/application_ref';
|
||||
export { APP_ID, APP_COMPONENT, APP_INITIALIZER, PACKAGE_ROOT_URL, PLATFORM_INITIALIZER } from './src/core/application_tokens';
|
||||
export * from './src/core/zone';
|
||||
export * from './src/core/render';
|
||||
export * from './src/core/linker';
|
||||
export { DebugElement, DebugNode, asNativeElements } from './src/core/debug/debug_node';
|
||||
export * from './src/core/testability/testability';
|
||||
export * from './src/core/change_detection';
|
||||
export * from './src/core/platform_directives_and_pipes';
|
||||
export * from './src/core/platform_common_providers';
|
||||
export * from './src/core/application_common_providers';
|
||||
export * from './src/core/reflection/reflection';
|
||||
import "./manual_typings/globals-es6.d.ts";
|
||||
Generated
Vendored
-40
@@ -1,40 +0,0 @@
|
||||
'use strict';function __export(m) {
|
||||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||
}
|
||||
/**
|
||||
* @module
|
||||
* @description
|
||||
* Starting point to import all public core APIs.
|
||||
*/
|
||||
__export(require('./src/core/metadata'));
|
||||
__export(require('./src/core/util'));
|
||||
__export(require('./src/core/prod_mode'));
|
||||
__export(require('./src/core/di'));
|
||||
__export(require('./src/facade/facade'));
|
||||
var lang_1 = require('angular2/src/facade/lang');
|
||||
exports.enableProdMode = lang_1.enableProdMode;
|
||||
var application_ref_1 = require('./src/core/application_ref');
|
||||
exports.platform = application_ref_1.platform;
|
||||
exports.createNgZone = application_ref_1.createNgZone;
|
||||
exports.PlatformRef = application_ref_1.PlatformRef;
|
||||
exports.ApplicationRef = application_ref_1.ApplicationRef;
|
||||
var application_tokens_1 = require('./src/core/application_tokens');
|
||||
exports.APP_ID = application_tokens_1.APP_ID;
|
||||
exports.APP_COMPONENT = application_tokens_1.APP_COMPONENT;
|
||||
exports.APP_INITIALIZER = application_tokens_1.APP_INITIALIZER;
|
||||
exports.PACKAGE_ROOT_URL = application_tokens_1.PACKAGE_ROOT_URL;
|
||||
exports.PLATFORM_INITIALIZER = application_tokens_1.PLATFORM_INITIALIZER;
|
||||
__export(require('./src/core/zone'));
|
||||
__export(require('./src/core/render'));
|
||||
__export(require('./src/core/linker'));
|
||||
var debug_node_1 = require('./src/core/debug/debug_node');
|
||||
exports.DebugElement = debug_node_1.DebugElement;
|
||||
exports.DebugNode = debug_node_1.DebugNode;
|
||||
exports.asNativeElements = debug_node_1.asNativeElements;
|
||||
__export(require('./src/core/testability/testability'));
|
||||
__export(require('./src/core/change_detection'));
|
||||
__export(require('./src/core/platform_directives_and_pipes'));
|
||||
__export(require('./src/core/platform_common_providers'));
|
||||
__export(require('./src/core/application_common_providers'));
|
||||
__export(require('./src/core/reflection/reflection'));
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29yZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImFuZ3VsYXIyL2NvcmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUE7Ozs7R0FJRztBQUNILGlCQUFjLHFCQUFxQixDQUFDLEVBQUE7QUFDcEMsaUJBQWMsaUJBQWlCLENBQUMsRUFBQTtBQUNoQyxpQkFBYyxzQkFBc0IsQ0FBQyxFQUFBO0FBQ3JDLGlCQUFjLGVBQWUsQ0FBQyxFQUFBO0FBQzlCLGlCQUFjLHFCQUFxQixDQUFDLEVBQUE7QUFDcEMscUJBQTZCLDBCQUEwQixDQUFDO0FBQWhELCtDQUFnRDtBQUN4RCxnQ0FBa0UsNEJBQTRCLENBQUM7QUFBdkYsOENBQVE7QUFBRSxzREFBWTtBQUFFLG9EQUFXO0FBQUUsMERBQWtEO0FBQy9GLG1DQU1PLCtCQUErQixDQUFDO0FBTHJDLDZDQUFNO0FBQ04sMkRBQWE7QUFDYiwrREFBZTtBQUNmLGlFQUFnQjtBQUNoQix5RUFDcUM7QUFDdkMsaUJBQWMsaUJBQWlCLENBQUMsRUFBQTtBQUNoQyxpQkFBYyxtQkFBbUIsQ0FBQyxFQUFBO0FBQ2xDLGlCQUFjLG1CQUFtQixDQUFDLEVBQUE7QUFDbEMsMkJBQXdELDZCQUE2QixDQUFDO0FBQTlFLGlEQUFZO0FBQUUsMkNBQVM7QUFBRSx5REFBcUQ7QUFDdEYsaUJBQWMsb0NBQW9DLENBQUMsRUFBQTtBQUNuRCxpQkFBYyw2QkFBNkIsQ0FBQyxFQUFBO0FBQzVDLGlCQUFjLDBDQUEwQyxDQUFDLEVBQUE7QUFDekQsaUJBQWMsc0NBQXNDLENBQUMsRUFBQTtBQUNyRCxpQkFBYyx5Q0FBeUMsQ0FBQyxFQUFBO0FBQ3hELGlCQUFjLGtDQUFrQyxDQUFDLEVBQUEiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBtb2R1bGVcbiAqIEBkZXNjcmlwdGlvblxuICogU3RhcnRpbmcgcG9pbnQgdG8gaW1wb3J0IGFsbCBwdWJsaWMgY29yZSBBUElzLlxuICovXG5leHBvcnQgKiBmcm9tICcuL3NyYy9jb3JlL21ldGFkYXRhJztcbmV4cG9ydCAqIGZyb20gJy4vc3JjL2NvcmUvdXRpbCc7XG5leHBvcnQgKiBmcm9tICcuL3NyYy9jb3JlL3Byb2RfbW9kZSc7XG5leHBvcnQgKiBmcm9tICcuL3NyYy9jb3JlL2RpJztcbmV4cG9ydCAqIGZyb20gJy4vc3JjL2ZhY2FkZS9mYWNhZGUnO1xuZXhwb3J0IHtlbmFibGVQcm9kTW9kZX0gZnJvbSAnYW5ndWxhcjIvc3JjL2ZhY2FkZS9sYW5nJztcbmV4cG9ydCB7cGxhdGZvcm0sIGNyZWF0ZU5nWm9uZSwgUGxhdGZvcm1SZWYsIEFwcGxpY2F0aW9uUmVmfSBmcm9tICcuL3NyYy9jb3JlL2FwcGxpY2F0aW9uX3JlZic7XG5leHBvcnQge1xuICBBUFBfSUQsXG4gIEFQUF9DT01QT05FTlQsXG4gIEFQUF9JTklUSUFMSVpFUixcbiAgUEFDS0FHRV9ST09UX1VSTCxcbiAgUExBVEZPUk1fSU5JVElBTElaRVJcbn0gZnJvbSAnLi9zcmMvY29yZS9hcHBsaWNhdGlvbl90b2tlbnMnO1xuZXhwb3J0ICogZnJvbSAnLi9zcmMvY29yZS96b25lJztcbmV4cG9ydCAqIGZyb20gJy4vc3JjL2NvcmUvcmVuZGVyJztcbmV4cG9ydCAqIGZyb20gJy4vc3JjL2NvcmUvbGlua2VyJztcbmV4cG9ydCB7RGVidWdFbGVtZW50LCBEZWJ1Z05vZGUsIGFzTmF0aXZlRWxlbWVudHN9IGZyb20gJy4vc3JjL2NvcmUvZGVidWcvZGVidWdfbm9kZSc7XG5leHBvcnQgKiBmcm9tICcuL3NyYy9jb3JlL3Rlc3RhYmlsaXR5L3Rlc3RhYmlsaXR5JztcbmV4cG9ydCAqIGZyb20gJy4vc3JjL2NvcmUvY2hhbmdlX2RldGVjdGlvbic7XG5leHBvcnQgKiBmcm9tICcuL3NyYy9jb3JlL3BsYXRmb3JtX2RpcmVjdGl2ZXNfYW5kX3BpcGVzJztcbmV4cG9ydCAqIGZyb20gJy4vc3JjL2NvcmUvcGxhdGZvcm1fY29tbW9uX3Byb3ZpZGVycyc7XG5leHBvcnQgKiBmcm9tICcuL3NyYy9jb3JlL2FwcGxpY2F0aW9uX2NvbW1vbl9wcm92aWRlcnMnO1xuZXhwb3J0ICogZnJvbSAnLi9zcmMvY29yZS9yZWZsZWN0aW9uL3JlZmxlY3Rpb24nO1xuIl19
|
||||
Generated
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
Angular2
|
||||
=========
|
||||
|
||||
The sources for this package are in the main [Angular2](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo. This is the repository for the upcoming 2.0 version. If you're looking for the current official version of Angular you should go to [angular/angular.js](https://github.com/angular/angular.js)
|
||||
|
||||
License: Apache MIT 2.0
|
||||
Generated
Vendored
-15
@@ -1,15 +0,0 @@
|
||||
Angular2
|
||||
=========
|
||||
|
||||
The sources for this package are in the main [Angular2](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo. This is the repository for the upcoming 2.0 version. If you're looking for the current official version of Angular you should go to [angular/angular.js](https://github.com/angular/angular.js)
|
||||
|
||||
This package contains different sources for different users:
|
||||
|
||||
1. The files located in the root folder can be consumed using CommonJS.
|
||||
2. The files under `/es6` are es6 compatible files that can be transpiled to
|
||||
es5 using any transpiler. This contains:
|
||||
* `dev/`: a development version that includes runtime type assertions
|
||||
* `prod/`: a production version that does not include runtime type assertions
|
||||
3. The files under `/ts` are the TypeScript source files.
|
||||
|
||||
License: Apache MIT 2.0
|
||||
examples/demo-template/angular2-product-app/src/main/webapp/node_modules/angular2/es6/dev/animate.js
Generated
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
export { Animation } from './src/animate/animation';
|
||||
export { AnimationBuilder } from './src/animate/animation_builder';
|
||||
export { BrowserDetails } from './src/animate/browser_details';
|
||||
export { CssAnimationBuilder } from './src/animate/css_animation_builder';
|
||||
export { CssAnimationOptions } from './src/animate/css_animation_options';
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5pbWF0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImFuZ3VsYXIyL2FuaW1hdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsU0FBUSxTQUFTLFFBQU8seUJBQXlCLENBQUM7QUFDbEQsU0FBUSxnQkFBZ0IsUUFBTyxpQ0FBaUMsQ0FBQztBQUNqRSxTQUFRLGNBQWMsUUFBTywrQkFBK0IsQ0FBQztBQUM3RCxTQUFRLG1CQUFtQixRQUFPLHFDQUFxQyxDQUFDO0FBQ3hFLFNBQVEsbUJBQW1CLFFBQU8scUNBQXFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQge0FuaW1hdGlvbn0gZnJvbSAnLi9zcmMvYW5pbWF0ZS9hbmltYXRpb24nO1xuZXhwb3J0IHtBbmltYXRpb25CdWlsZGVyfSBmcm9tICcuL3NyYy9hbmltYXRlL2FuaW1hdGlvbl9idWlsZGVyJztcbmV4cG9ydCB7QnJvd3NlckRldGFpbHN9IGZyb20gJy4vc3JjL2FuaW1hdGUvYnJvd3Nlcl9kZXRhaWxzJztcbmV4cG9ydCB7Q3NzQW5pbWF0aW9uQnVpbGRlcn0gZnJvbSAnLi9zcmMvYW5pbWF0ZS9jc3NfYW5pbWF0aW9uX2J1aWxkZXInO1xuZXhwb3J0IHtDc3NBbmltYXRpb25PcHRpb25zfSBmcm9tICcuL3NyYy9hbmltYXRlL2Nzc19hbmltYXRpb25fb3B0aW9ucyc7XG4iXX0=
|
||||
Generated
Vendored
-2
@@ -1,2 +0,0 @@
|
||||
export * from 'angular2/src/mock/animation_builder_mock';
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdGluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImFuZ3VsYXIyL2FuaW1hdGUvdGVzdGluZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDBDQUEwQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnYW5ndWxhcjIvc3JjL21vY2svYW5pbWF0aW9uX2J1aWxkZXJfbW9jayc7XG4iXX0=
|
||||
Generated
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
/**
|
||||
* See {@link bootstrap} for more information.
|
||||
* @deprecated
|
||||
*/
|
||||
export { bootstrap } from 'angular2/platform/browser';
|
||||
export { AngularEntrypoint } from 'angular2/src/core/angular_entrypoint';
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm9vdHN0cmFwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYW5ndWxhcjIvYm9vdHN0cmFwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7R0FHRztBQUNILFNBQVEsU0FBUyxRQUFPLDJCQUEyQixDQUFDO0FBQ3BELFNBQVEsaUJBQWlCLFFBQU8sc0NBQXNDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIFNlZSB7QGxpbmsgYm9vdHN0cmFwfSBmb3IgbW9yZSBpbmZvcm1hdGlvbi5cbiAqIEBkZXByZWNhdGVkXG4gKi9cbmV4cG9ydCB7Ym9vdHN0cmFwfSBmcm9tICdhbmd1bGFyMi9wbGF0Zm9ybS9icm93c2VyJztcbmV4cG9ydCB7QW5ndWxhckVudHJ5cG9pbnR9IGZyb20gJ2FuZ3VsYXIyL3NyYy9jb3JlL2FuZ3VsYXJfZW50cnlwb2ludCc7XG4iXX0=
|
||||
Generated
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
/**
|
||||
* See {@link bootstrap} for more information.
|
||||
* @deprecated
|
||||
*/
|
||||
export { bootstrapStatic } from 'angular2/platform/browser_static';
|
||||
export { AngularEntrypoint } from 'angular2/src/core/angular_entrypoint';
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm9vdHN0cmFwX3N0YXRpYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImFuZ3VsYXIyL2Jvb3RzdHJhcF9zdGF0aWMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7OztHQUdHO0FBQ0gsU0FBUSxlQUFlLFFBQU8sa0NBQWtDLENBQUM7QUFDakUsU0FBUSxpQkFBaUIsUUFBTyxzQ0FBc0MsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogU2VlIHtAbGluayBib290c3RyYXB9IGZvciBtb3JlIGluZm9ybWF0aW9uLlxuICogQGRlcHJlY2F0ZWRcbiAqL1xuZXhwb3J0IHtib290c3RyYXBTdGF0aWN9IGZyb20gJ2FuZ3VsYXIyL3BsYXRmb3JtL2Jyb3dzZXJfc3RhdGljJztcbmV4cG9ydCB7QW5ndWxhckVudHJ5cG9pbnR9IGZyb20gJ2FuZ3VsYXIyL3NyYy9jb3JlL2FuZ3VsYXJfZW50cnlwb2ludCc7XG4iXX0=
|
||||
Generated
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
export * from './src/common/pipes';
|
||||
export * from './src/common/directives';
|
||||
export * from './src/common/forms';
|
||||
export * from './src/common/common_directives';
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYW5ndWxhcjIvY29tbW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsb0JBQW9CLENBQUM7QUFDbkMsY0FBYyx5QkFBeUIsQ0FBQztBQUN4QyxjQUFjLG9CQUFvQixDQUFDO0FBQ25DLGNBQWMsZ0NBQWdDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL3NyYy9jb21tb24vcGlwZXMnO1xuZXhwb3J0ICogZnJvbSAnLi9zcmMvY29tbW9uL2RpcmVjdGl2ZXMnO1xuZXhwb3J0ICogZnJvbSAnLi9zcmMvY29tbW9uL2Zvcm1zJztcbmV4cG9ydCAqIGZyb20gJy4vc3JjL2NvbW1vbi9jb21tb25fZGlyZWN0aXZlcyc7Il19
|
||||
Generated
Vendored
-9
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* @module
|
||||
* @description
|
||||
* Starting point to import all compiler APIs.
|
||||
*/
|
||||
export * from './src/compiler/url_resolver';
|
||||
export * from './src/compiler/xhr';
|
||||
export * from './src/compiler/compiler';
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcGlsZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhbmd1bGFyMi9jb21waWxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7OztHQUlHO0FBQ0gsY0FBYyw2QkFBNkIsQ0FBQztBQUM1QyxjQUFjLG9CQUFvQixDQUFDO0FBQ25DLGNBQWMseUJBQXlCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBtb2R1bGVcbiAqIEBkZXNjcmlwdGlvblxuICogU3RhcnRpbmcgcG9pbnQgdG8gaW1wb3J0IGFsbCBjb21waWxlciBBUElzLlxuICovXG5leHBvcnQgKiBmcm9tICcuL3NyYy9jb21waWxlci91cmxfcmVzb2x2ZXInO1xuZXhwb3J0ICogZnJvbSAnLi9zcmMvY29tcGlsZXIveGhyJztcbmV4cG9ydCAqIGZyb20gJy4vc3JjL2NvbXBpbGVyL2NvbXBpbGVyJzsiXX0=
|
||||
Generated
Vendored
-24
@@ -1,24 +0,0 @@
|
||||
/**
|
||||
* @module
|
||||
* @description
|
||||
* Starting point to import all public core APIs.
|
||||
*/
|
||||
export * from './src/core/metadata';
|
||||
export * from './src/core/util';
|
||||
export * from './src/core/prod_mode';
|
||||
export * from './src/core/di';
|
||||
export * from './src/facade/facade';
|
||||
export { enableProdMode } from 'angular2/src/facade/lang';
|
||||
export { platform, createNgZone, PlatformRef, ApplicationRef } from './src/core/application_ref';
|
||||
export { APP_ID, APP_COMPONENT, APP_INITIALIZER, PACKAGE_ROOT_URL, PLATFORM_INITIALIZER } from './src/core/application_tokens';
|
||||
export * from './src/core/zone';
|
||||
export * from './src/core/render';
|
||||
export * from './src/core/linker';
|
||||
export { DebugElement, DebugNode, asNativeElements } from './src/core/debug/debug_node';
|
||||
export * from './src/core/testability/testability';
|
||||
export * from './src/core/change_detection';
|
||||
export * from './src/core/platform_directives_and_pipes';
|
||||
export * from './src/core/platform_common_providers';
|
||||
export * from './src/core/application_common_providers';
|
||||
export * from './src/core/reflection/reflection';
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29yZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImFuZ3VsYXIyL2NvcmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7R0FJRztBQUNILGNBQWMscUJBQXFCLENBQUM7QUFDcEMsY0FBYyxpQkFBaUIsQ0FBQztBQUNoQyxjQUFjLHNCQUFzQixDQUFDO0FBQ3JDLGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMscUJBQXFCLENBQUM7QUFDcEMsU0FBUSxjQUFjLFFBQU8sMEJBQTBCLENBQUM7QUFDeEQsU0FBUSxRQUFRLEVBQUUsWUFBWSxFQUFFLFdBQVcsRUFBRSxjQUFjLFFBQU8sNEJBQTRCLENBQUM7QUFDL0YsU0FDRSxNQUFNLEVBQ04sYUFBYSxFQUNiLGVBQWUsRUFDZixnQkFBZ0IsRUFDaEIsb0JBQW9CLFFBQ2YsK0JBQStCLENBQUM7QUFDdkMsY0FBYyxpQkFBaUIsQ0FBQztBQUNoQyxjQUFjLG1CQUFtQixDQUFDO0FBQ2xDLGNBQWMsbUJBQW1CLENBQUM7QUFDbEMsU0FBUSxZQUFZLEVBQUUsU0FBUyxFQUFFLGdCQUFnQixRQUFPLDZCQUE2QixDQUFDO0FBQ3RGLGNBQWMsb0NBQW9DLENBQUM7QUFDbkQsY0FBYyw2QkFBNkIsQ0FBQztBQUM1QyxjQUFjLDBDQUEwQyxDQUFDO0FBQ3pELGNBQWMsc0NBQXNDLENBQUM7QUFDckQsY0FBYyx5Q0FBeUMsQ0FBQztBQUN4RCxjQUFjLGtDQUFrQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbW9kdWxlXG4gKiBAZGVzY3JpcHRpb25cbiAqIFN0YXJ0aW5nIHBvaW50IHRvIGltcG9ydCBhbGwgcHVibGljIGNvcmUgQVBJcy5cbiAqL1xuZXhwb3J0ICogZnJvbSAnLi9zcmMvY29yZS9tZXRhZGF0YSc7XG5leHBvcnQgKiBmcm9tICcuL3NyYy9jb3JlL3V0aWwnO1xuZXhwb3J0ICogZnJvbSAnLi9zcmMvY29yZS9wcm9kX21vZGUnO1xuZXhwb3J0ICogZnJvbSAnLi9zcmMvY29yZS9kaSc7XG5leHBvcnQgKiBmcm9tICcuL3NyYy9mYWNhZGUvZmFjYWRlJztcbmV4cG9ydCB7ZW5hYmxlUHJvZE1vZGV9IGZyb20gJ2FuZ3VsYXIyL3NyYy9mYWNhZGUvbGFuZyc7XG5leHBvcnQge3BsYXRmb3JtLCBjcmVhdGVOZ1pvbmUsIFBsYXRmb3JtUmVmLCBBcHBsaWNhdGlvblJlZn0gZnJvbSAnLi9zcmMvY29yZS9hcHBsaWNhdGlvbl9yZWYnO1xuZXhwb3J0IHtcbiAgQVBQX0lELFxuICBBUFBfQ09NUE9ORU5ULFxuICBBUFBfSU5JVElBTElaRVIsXG4gIFBBQ0tBR0VfUk9PVF9VUkwsXG4gIFBMQVRGT1JNX0lOSVRJQUxJWkVSXG59IGZyb20gJy4vc3JjL2NvcmUvYXBwbGljYXRpb25fdG9rZW5zJztcbmV4cG9ydCAqIGZyb20gJy4vc3JjL2NvcmUvem9uZSc7XG5leHBvcnQgKiBmcm9tICcuL3NyYy9jb3JlL3JlbmRlcic7XG5leHBvcnQgKiBmcm9tICcuL3NyYy9jb3JlL2xpbmtlcic7XG5leHBvcnQge0RlYnVnRWxlbWVudCwgRGVidWdOb2RlLCBhc05hdGl2ZUVsZW1lbnRzfSBmcm9tICcuL3NyYy9jb3JlL2RlYnVnL2RlYnVnX25vZGUnO1xuZXhwb3J0ICogZnJvbSAnLi9zcmMvY29yZS90ZXN0YWJpbGl0eS90ZXN0YWJpbGl0eSc7XG5leHBvcnQgKiBmcm9tICcuL3NyYy9jb3JlL2NoYW5nZV9kZXRlY3Rpb24nO1xuZXhwb3J0ICogZnJvbSAnLi9zcmMvY29yZS9wbGF0Zm9ybV9kaXJlY3RpdmVzX2FuZF9waXBlcyc7XG5leHBvcnQgKiBmcm9tICcuL3NyYy9jb3JlL3BsYXRmb3JtX2NvbW1vbl9wcm92aWRlcnMnO1xuZXhwb3J0ICogZnJvbSAnLi9zcmMvY29yZS9hcHBsaWNhdGlvbl9jb21tb25fcHJvdmlkZXJzJztcbmV4cG9ydCAqIGZyb20gJy4vc3JjL2NvcmUvcmVmbGVjdGlvbi9yZWZsZWN0aW9uJztcbiJdfQ==
|
||||
Generated
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
# API Examples
|
||||
|
||||
This folder contains small example apps that get in-lined into our API docs.
|
||||
These examples are written with idiomatic TypeScript, and are not transpiled to Dart.
|
||||
Each example contains tests for application behavior (as opposed to testing Angular's
|
||||
behavior) just like an Angular application developer would write.
|
||||
Generated
Vendored
-44
@@ -1,44 +0,0 @@
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
import { Component } from 'angular2/core';
|
||||
import { MinLengthValidator, MaxLengthValidator } from 'angular2/common';
|
||||
// #docregion min
|
||||
let MinLengthTestComponent = class {
|
||||
};
|
||||
MinLengthTestComponent = __decorate([
|
||||
Component({
|
||||
selector: 'min-cmp',
|
||||
directives: [MinLengthValidator],
|
||||
template: `
|
||||
<form>
|
||||
<p>Year: <input ngControl="year" minlength="2"></p>
|
||||
</form>
|
||||
`
|
||||
}),
|
||||
__metadata('design:paramtypes', [])
|
||||
], MinLengthTestComponent);
|
||||
// #enddocregion
|
||||
// #docregion max
|
||||
let MaxLengthTestComponent = class {
|
||||
};
|
||||
MaxLengthTestComponent = __decorate([
|
||||
Component({
|
||||
selector: 'max-cmp',
|
||||
directives: [MaxLengthValidator],
|
||||
template: `
|
||||
<form>
|
||||
<p>Year: <input ngControl="year" maxlength="4"></p>
|
||||
</form>
|
||||
`
|
||||
}),
|
||||
__metadata('design:paramtypes', [])
|
||||
], MaxLengthTestComponent);
|
||||
// #enddocregion
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdG9ycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImFuZ3VsYXIyL2V4YW1wbGVzL2NvbW1vbi9mb3Jtcy90cy92YWxpZGF0b3JzL3ZhbGlkYXRvcnMudHMiXSwibmFtZXMiOlsiTWluTGVuZ3RoVGVzdENvbXBvbmVudCIsIk1heExlbmd0aFRlc3RDb21wb25lbnQiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztPQUFPLEVBQUMsU0FBUyxFQUFDLE1BQU0sZUFBZTtPQUNoQyxFQUFDLGtCQUFrQixFQUFFLGtCQUFrQixFQUFDLE1BQU0saUJBQWlCO0FBRXRFLGlCQUFpQjtBQUNqQjtBQVVBQSxDQUFDQTtBQVZEO0lBQUMsU0FBUyxDQUFDO1FBQ1QsUUFBUSxFQUFFLFNBQVM7UUFDbkIsVUFBVSxFQUFFLENBQUMsa0JBQWtCLENBQUM7UUFDaEMsUUFBUSxFQUFFOzs7O0NBSVg7S0FDQSxDQUFDOzsyQkFFRDtBQUNELGdCQUFnQjtBQUVoQixpQkFBaUI7QUFDakI7QUFVQUMsQ0FBQ0E7QUFWRDtJQUFDLFNBQVMsQ0FBQztRQUNULFFBQVEsRUFBRSxTQUFTO1FBQ25CLFVBQVUsRUFBRSxDQUFDLGtCQUFrQixDQUFDO1FBQ2hDLFFBQVEsRUFBRTs7OztDQUlYO0tBQ0EsQ0FBQzs7MkJBRUQ7QUFDRCxnQkFBZ0IiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge0NvbXBvbmVudH0gZnJvbSAnYW5ndWxhcjIvY29yZSc7XG5pbXBvcnQge01pbkxlbmd0aFZhbGlkYXRvciwgTWF4TGVuZ3RoVmFsaWRhdG9yfSBmcm9tICdhbmd1bGFyMi9jb21tb24nO1xuXG4vLyAjZG9jcmVnaW9uIG1pblxuQENvbXBvbmVudCh7XG4gIHNlbGVjdG9yOiAnbWluLWNtcCcsXG4gIGRpcmVjdGl2ZXM6IFtNaW5MZW5ndGhWYWxpZGF0b3JdLFxuICB0ZW1wbGF0ZTogYFxuPGZvcm0+XG4gIDxwPlllYXI6IDxpbnB1dCBuZ0NvbnRyb2w9XCJ5ZWFyXCIgbWlubGVuZ3RoPVwiMlwiPjwvcD5cbjwvZm9ybT5cbmBcbn0pXG5jbGFzcyBNaW5MZW5ndGhUZXN0Q29tcG9uZW50IHtcbn1cbi8vICNlbmRkb2NyZWdpb25cblxuLy8gI2RvY3JlZ2lvbiBtYXhcbkBDb21wb25lbnQoe1xuICBzZWxlY3RvcjogJ21heC1jbXAnLFxuICBkaXJlY3RpdmVzOiBbTWF4TGVuZ3RoVmFsaWRhdG9yXSxcbiAgdGVtcGxhdGU6IGBcbjxmb3JtPlxuICA8cD5ZZWFyOiA8aW5wdXQgbmdDb250cm9sPVwieWVhclwiIG1heGxlbmd0aD1cIjRcIj48L3A+XG48L2Zvcm0+XG5gXG59KVxuY2xhc3MgTWF4TGVuZ3RoVGVzdENvbXBvbmVudCB7XG59XG4vLyAjZW5kZG9jcmVnaW9uXG4iXX0=
|
||||
Generated
Vendored
-17
@@ -1,17 +0,0 @@
|
||||
import { provide } from 'angular2/core';
|
||||
import { bootstrap } from 'angular2/bootstrap';
|
||||
import { UrlResolver } from 'angular2/compiler';
|
||||
var MyApp;
|
||||
// #docregion url_resolver
|
||||
class MyUrlResolver extends UrlResolver {
|
||||
resolve(baseUrl, url) {
|
||||
// Serve CSS files from a special CDN.
|
||||
if (url.substr(-4) === '.css') {
|
||||
return super.resolve('http://cdn.myapp.com/css/', url);
|
||||
}
|
||||
return super.resolve(baseUrl, url);
|
||||
}
|
||||
}
|
||||
bootstrap(MyApp, [provide(UrlResolver, { useClass: MyUrlResolver })]);
|
||||
// #enddocregion
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXJsX3Jlc29sdmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYW5ndWxhcjIvZXhhbXBsZXMvY29tcGlsZXIvdHMvdXJsX3Jlc29sdmVyL3VybF9yZXNvbHZlci50cyJdLCJuYW1lcyI6WyJNeVVybFJlc29sdmVyIiwiTXlVcmxSZXNvbHZlci5yZXNvbHZlIl0sIm1hcHBpbmdzIjoiT0FBTyxFQUFDLE9BQU8sRUFBQyxNQUFNLGVBQWU7T0FDOUIsRUFBQyxTQUFTLEVBQUMsTUFBTSxvQkFBb0I7T0FDckMsRUFBQyxXQUFXLEVBQUMsTUFBTSxtQkFBbUI7QUFFN0MsSUFBSSxLQUFLLENBQUM7QUFFViwwQkFBMEI7QUFDMUIsNEJBQTRCLFdBQVc7SUFDckNBLE9BQU9BLENBQUNBLE9BQWVBLEVBQUVBLEdBQVdBO1FBQ2xDQyxzQ0FBc0NBO1FBQ3RDQSxFQUFFQSxDQUFDQSxDQUFDQSxHQUFHQSxDQUFDQSxNQUFNQSxDQUFDQSxDQUFDQSxDQUFDQSxDQUFDQSxLQUFLQSxNQUFNQSxDQUFDQSxDQUFDQSxDQUFDQTtZQUM5QkEsTUFBTUEsQ0FBQ0EsS0FBS0EsQ0FBQ0EsT0FBT0EsQ0FBQ0EsMkJBQTJCQSxFQUFFQSxHQUFHQSxDQUFDQSxDQUFDQTtRQUN6REEsQ0FBQ0E7UUFDREEsTUFBTUEsQ0FBQ0EsS0FBS0EsQ0FBQ0EsT0FBT0EsQ0FBQ0EsT0FBT0EsRUFBRUEsR0FBR0EsQ0FBQ0EsQ0FBQ0E7SUFDckNBLENBQUNBO0FBQ0hELENBQUNBO0FBRUQsU0FBUyxDQUFDLEtBQUssRUFBRSxDQUFDLE9BQU8sQ0FBQyxXQUFXLEVBQUUsRUFBQyxRQUFRLEVBQUUsYUFBYSxFQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDcEUsZ0JBQWdCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtwcm92aWRlfSBmcm9tICdhbmd1bGFyMi9jb3JlJztcbmltcG9ydCB7Ym9vdHN0cmFwfSBmcm9tICdhbmd1bGFyMi9ib290c3RyYXAnO1xuaW1wb3J0IHtVcmxSZXNvbHZlcn0gZnJvbSAnYW5ndWxhcjIvY29tcGlsZXInO1xuXG52YXIgTXlBcHA7XG5cbi8vICNkb2NyZWdpb24gdXJsX3Jlc29sdmVyXG5jbGFzcyBNeVVybFJlc29sdmVyIGV4dGVuZHMgVXJsUmVzb2x2ZXIge1xuICByZXNvbHZlKGJhc2VVcmw6IHN0cmluZywgdXJsOiBzdHJpbmcpOiBzdHJpbmcge1xuICAgIC8vIFNlcnZlIENTUyBmaWxlcyBmcm9tIGEgc3BlY2lhbCBDRE4uXG4gICAgaWYgKHVybC5zdWJzdHIoLTQpID09PSAnLmNzcycpIHtcbiAgICAgIHJldHVybiBzdXBlci5yZXNvbHZlKCdodHRwOi8vY2RuLm15YXBwLmNvbS9jc3MvJywgdXJsKTtcbiAgICB9XG4gICAgcmV0dXJuIHN1cGVyLnJlc29sdmUoYmFzZVVybCwgdXJsKTtcbiAgfVxufVxuXG5ib290c3RyYXAoTXlBcHAsIFtwcm92aWRlKFVybFJlc29sdmVyLCB7dXNlQ2xhc3M6IE15VXJsUmVzb2x2ZXJ9KV0pO1xuLy8gI2VuZGRvY3JlZ2lvblxuIl19
|
||||
Loaded 100 of 9320 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user