"format register";System.register("angular2/src/facade/lang",[],!0,function(e,t,r){function n(e){return e.name}function i(){M=!0}function o(){if(M)throw"Cannot enable prod mode after platform setup.";j=!1}function a(){return j}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 V.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;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 T(){if(u(z))if(l(Symbol)&&l(Symbol.iterator))z=Symbol.iterator;else for(var e=Object.getOwnPropertyNames(Map.prototype),t=0;t=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;te?-1:e>t?1:0},e}();t.StringWrapper=B;var L=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=L;var F=function(e){function t(t){e.call(this),this.message=t}return N(t,e),t.prototype.toString=function(){return this.message},t}(Error);t.NumberParseError=F;var W=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 F("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 F("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=W,t.RegExp=V.RegExp;var U=function(){function e(){}return e.create=function(e,t){return void 0===t&&(t=""),t=t.replace(/g/g,""),new V.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,e.test(t)},e.matcher=function(e,t){return e.lastIndex=0,{re:e,input:t}},e}();t.RegExpWrapper=U;var H=function(){function e(){}return e.next=function(e){return e.re.exec(e.input)},e}();t.RegExpMatcherWrapper=H;var q=function(){function e(){}return e.apply=function(e,t){return e.apply(null,t)},e}();t.FunctionWrapper=q,t.looseIdentical=P,t.getMapKey=E,t.normalizeBlank=S,t.normalizeBool=R,t.isJsObject=x,t.print=O;var G=function(){function e(){}return e.parse=function(e){return V.JSON.parse(e)},e.stringify=function(e){return V.JSON.stringify(e,null,2)},e}();t.Json=G;var K=function(){function e(){}return e.create=function(e,r,n,i,o,a,s){return void 0===r&&(r=1),void 0===n&&(n=1),void 0===i&&(i=0),void 0===o&&(o=0),void 0===a&&(a=0),void 0===s&&(s=0),new t.Date(e,r-1,n,i,o,a,s)},e.fromISOString=function(e){return new t.Date(e)},e.fromMillis=function(e){return new t.Date(e)},e.toMillis=function(e){return e.getTime()},e.now=function(){return new t.Date},e.toJson=function(e){return e.toJSON()},e}();t.DateWrapper=K,t.setValueOnPath=D;var z=null;return t.getSymbolIterator=T,A.define=I,r.exports}),System.register("angular2/src/core/di/metadata",["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/facade/lang"),c=function(){function e(e){this.token=e}return e.prototype.toString=function(){return"@Inject("+s.stringify(this.token)+")"},e=o([s.CONST(),a("design:paramtypes",[Object])],e)}();t.InjectMetadata=c;var l=function(){function e(){}return e.prototype.toString=function(){return"@Optional()"},e=o([s.CONST(),a("design:paramtypes",[])],e)}();t.OptionalMetadata=l;var u=function(){function e(){}return Object.defineProperty(e.prototype,"token",{get:function(){return null},enumerable:!0,configurable:!0}),e=o([s.CONST(),a("design:paramtypes",[])],e)}();t.DependencyMetadata=u;var p=function(){function e(){}return e=o([s.CONST(),a("design:paramtypes",[])],e)}();t.InjectableMetadata=p;var d=function(){function e(){}return e.prototype.toString=function(){return"@Self()"},e=o([s.CONST(),a("design:paramtypes",[])],e)}();t.SelfMetadata=d;var f=function(){function e(){}return e.prototype.toString=function(){return"@SkipSelf()"},e=o([s.CONST(),a("design:paramtypes",[])],e)}();t.SkipSelfMetadata=f;var h=function(){function e(){}return e.prototype.toString=function(){return"@Host()"},e=o([s.CONST(),a("design:paramtypes",[])],e)}();return t.HostMetadata=h,n.define=i,r.exports}),System.register("angular2/src/core/util/decorators",["angular2/src/facade/lang"],!0,function(e,t,r){function n(e){return p.isFunction(e)&&e.hasOwnProperty("annotation")&&(e=e.annotation),e}function i(e,t){if(e===Object||e===String||e===Function||e===Number||e===Array)throw new Error("Can not use native "+p.stringify(e)+" as constructor");if(p.isFunction(e))return e;if(e instanceof Array){var r=e,i=e[e.length-1];if(!p.isFunction(i))throw new Error("Last position of Class method array must be Function in key "+t+" was '"+p.stringify(i)+"'");var o=r.length-1;if(o!=i.length)throw new Error("Number of annotations ("+o+") does not match number of arguments ("+i.length+") in the function: "+p.stringify(i));for(var a=[],s=0,c=r.length-1;c>s;s++){var l=[];a.push(l);var u=r[s];if(u instanceof Array)for(var f=0;f-1?(e.splice(r,1),!0):!1},e.clear=function(e){e.length=0},e.isEmpty=function(e){return 0==e.length},e.fill=function(e,t,r,n){void 0===r&&(r=0),void 0===n&&(n=null),e.fill(t,r,null===n?e.length:n)},e.equals=function(e,t){if(e.length!=t.length)return!1;for(var r=0;rn&&(r=o,n=a)}}return r},e}();t.ListWrapper=h,t.isListLikeIterable=n,t.iterateListLike=i;var g=function(){var e=new t.Set([1,2,3]);return 3===e.size?function(e){return new t.Set(e)}:function(e){var r=new t.Set(e);if(r.size!==e.length)for(var n=0;n1){var t=n(c.ListWrapper.reversed(e)),r=t.map(function(e){return l.stringify(e.token)});return" ("+r.join(" -> ")+")"}return""}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=e("angular2/src/facade/collection"),l=e("angular2/src/facade/lang"),u=e("angular2/src/facade/exceptions"),p=function(e){function t(t,r,n){e.call(this,"DI Exception"),this.keys=[r],this.injectors=[t],this.constructResolvingMessage=n,this.message=this.constructResolvingMessage(this.keys)}return s(t,e),t.prototype.addKey=function(e,t){this.injectors.push(e),this.keys.push(t),this.message=this.constructResolvingMessage(this.keys)},Object.defineProperty(t.prototype,"context",{get:function(){return this.injectors[this.injectors.length-1].debugContext()},enumerable:!0,configurable:!0}),t}(u.BaseException);t.AbstractProviderError=p;var d=function(e){function t(t,r){e.call(this,t,r,function(e){var t=l.stringify(c.ListWrapper.first(e).token);return"No provider for "+t+"!"+i(e)})}return s(t,e),t}(p);t.NoProviderError=d;var f=function(e){function t(t,r){e.call(this,t,r,function(e){return"Cannot instantiate cyclic dependency!"+i(e)})}return s(t,e),t}(p);t.CyclicDependencyError=f;var h=function(e){function t(t,r,n,i){e.call(this,"DI Exception",r,n,null),this.keys=[i],this.injectors=[t]}return s(t,e),t.prototype.addKey=function(e,t){this.injectors.push(e),this.keys.push(t)},Object.defineProperty(t.prototype,"wrapperMessage",{get:function(){var e=l.stringify(c.ListWrapper.first(this.keys).token);return"Error during instantiation of "+e+"!"+i(this.keys)+"."},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"causeKey",{get:function(){return this.keys[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this.injectors[this.injectors.length-1].debugContext()},enumerable:!0,configurable:!0}),t}(u.WrappedException);t.InstantiationError=h;var g=function(e){function t(t){e.call(this,"Invalid provider - only instances of Provider and Type are allowed, got: "+t.toString())}return s(t,e),t}(u.BaseException);t.InvalidProviderError=g;var m=function(e){function t(r,n){e.call(this,t._genMessage(r,n))}return s(t,e),t._genMessage=function(e,t){for(var r=[],n=0,i=t.length;i>n;n++){var o=t[n];l.isBlank(o)||0==o.length?r.push("?"):r.push(o.map(l.stringify).join(" "))}return"Cannot resolve all parameters for "+l.stringify(e)+"("+r.join(", ")+"). Make sure they all have valid type or annotations."},t}(u.BaseException);t.NoAnnotationError=m;var v=function(e){function t(t){e.call(this,"Index "+t+" is out-of-bounds.")}return s(t,e),t}(u.BaseException);t.OutOfBoundsError=v;var y=function(e){function t(t,r){e.call(this,"Cannot mix multi providers and regular providers, got: "+t.toString()+" "+r.toString())}return s(t,e),t}(u.BaseException);return t.MixingMultiProvidersWithRegularProvidersError=y,o.define=a,r.exports}),System.register("angular2/src/core/di/opaque_token",["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/facade/lang"),c=function(){function e(e){this._desc=e}return e.prototype.toString=function(){return"Token "+this._desc},e=o([s.CONST(),a("design:paramtypes",[String])],e)}();return t.OpaqueToken=c,n.define=i,r.exports}),System.register("angular2/src/animate/css_animation_options",[],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=function(){function e(){this.classesToAdd=[],this.classesToRemove=[],this.animationClasses=[]}return e}();return t.CssAnimationOptions=o,n.define=i,r.exports}),System.register("angular2/src/facade/math",["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/facade/lang");return t.Math=o.global.Math,t.NaN=typeof t.NaN,n.define=i,r.exports}),System.register("angular2/src/platform/dom/util",["angular2/src/facade/lang"],!0,function(e,t,r){function n(e){return s.StringWrapper.replaceAllMapped(e,c,function(e){return"-"+e[1].toLowerCase()})}function i(e){return s.StringWrapper.replaceAllMapped(e,l,function(e){return e[1].toUpperCase()})}var o=System.global,a=o.define;o.define=void 0;var s=e("angular2/src/facade/lang"),c=/([A-Z])/g,l=/-([a-z])/g;return t.camelCaseToDashCase=n,t.dashCaseToCamelCase=i,o.define=a,r.exports}),System.register("angular2/src/animate/browser_details",["angular2/src/core/di","angular2/src/facade/math","angular2/src/platform/dom/dom_adapter"],!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/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/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._selector)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isVarBindingQuery",{get:function(){return c.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("+c.stringify(this.selector)+")"},t=a([c.CONST(),s("design:paramtypes",[Object,Object])],t)}(u.DependencyMetadata);t.QueryMetadata=d;var f=function(e){function t(t,r){var n=(void 0===r?{}:r).descendants,i=void 0===n?!1:n;e.call(this,t,{descendants:i})}return o(t,e),t=a([c.CONST(),s("design:paramtypes",[Object,Object])],t)}(d);t.ContentChildrenMetadata=f;var h=function(e){function t(t){e.call(this,t,{descendants:!0,first:!0})}return o(t,e),t=a([c.CONST(),s("design:paramtypes",[Object])],t)}(d);t.ContentChildMetadata=h;var g=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,t,{descendants:o,first:s})}return o(t,e),Object.defineProperty(t.prototype,"isViewQuery",{get:function(){return!0},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"@ViewQuery("+c.stringify(this.selector)+")"},t=a([c.CONST(),s("design:paramtypes",[Object,Object])],t)}(d);t.ViewQueryMetadata=g;var m=function(e){function t(t){e.call(this,t,{descendants:!0})}return o(t,e),t=a([c.CONST(),s("design:paramtypes",[Object])],t)}(g);t.ViewChildrenMetadata=m;var v=function(e){function t(t){e.call(this,t,{descendants:!0,first:!0})}return o(t,e),t=a([c.CONST(),s("design:paramtypes",[Object])],t)}(g);return t.ViewChildMetadata=v,n.define=i,r.exports}),System.register("angular2/src/core/change_detection/differs/iterable_differs",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/collection","angular2/src/core/di"],!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/src/core/di"),p=function(){function e(e){this.factories=e}return e.create=function(t,r){if(s.isPresent(r)){var n=l.ListWrapper.clone(r.factories);return t=t.concat(n),new e(t)}return new e(t)},e.extend=function(t){return new u.Provider(e,{useFactory:function(r){if(s.isBlank(r))throw new c.BaseException("Cannot extend IterableDiffers without a parent injector");return e.create(t,r)},deps:[[e,new u.SkipSelfMetadata,new u.OptionalMetadata]]})},e.prototype.find=function(e){var t=this.factories.find(function(t){return t.supports(e)});if(s.isPresent(t))return t;throw new c.BaseException("Cannot find a differ supporting object '"+e+"'")},e=o([u.Injectable(),s.CONST(),a("design:paramtypes",[Array])],e)}();return t.IterableDiffers=p,n.define=i,r.exports}),System.register("angular2/src/core/change_detection/differs/default_iterable_differ",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/collection","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/facade/lang"),c=e("angular2/src/facade/exceptions"),l=e("angular2/src/facade/collection"),u=e("angular2/src/facade/lang"),p=function(){function e(){}return e.prototype.supports=function(e){return l.isListLikeIterable(e)},e.prototype.create=function(e){return new d},e=o([s.CONST(),a("design:paramtypes",[])],e)}();t.DefaultIterableDifferFactory=p;var d=function(){function e(){this._collection=null,this._length=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}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(u.isBlank(e)&&(e=[]),!l.isListLikeIterable(e))throw new c.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 r,n,i=this._itHead,o=!1;if(u.isArray(e)){var a=e;for(this._length=e.length,r=0;r"+u.stringify(this.currentIndex)+"]"},e}();t.CollectionChangeRecord=f;var h=function(){function e(){this._head=null,this._tail=null}return e.prototype.add=function(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)},e.prototype.get=function(e,t){var r;for(r=this._head;null!==r;r=r._nextDup)if((null===t||to?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/src/core/di"),p=function(){function e(e){this.factories=e}return e.create=function(t,r){if(s.isPresent(r)){var n=l.ListWrapper.clone(r.factories);return t=t.concat(n),new e(t)}return new e(t)},e.extend=function(t){return new u.Provider(e,{useFactory:function(r){if(s.isBlank(r))throw new c.BaseException("Cannot extend KeyValueDiffers without a parent injector");return e.create(t,r)},deps:[[e,new u.SkipSelfMetadata,new u.OptionalMetadata]]})},e.prototype.find=function(e){var t=this.factories.find(function(t){return t.supports(e)});if(s.isPresent(t))return t;throw new c.BaseException("Cannot find a differ supporting object '"+e+"'")},e=o([u.Injectable(),s.CONST(),a("design:paramtypes",[Array])],e)}();return t.KeyValueDiffers=p,n.define=i,r.exports}),System.register("angular2/src/core/change_detection/differs/default_keyvalue_differ",["angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/facade/exceptions"],!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/collection"),c=e("angular2/src/facade/lang"),l=e("angular2/src/facade/exceptions"),u=function(){function e(){}return e.prototype.supports=function(e){return e instanceof Map||c.isJsObject(e)},e.prototype.create=function(e){return new p},e=o([c.CONST(),a("design:paramtypes",[])],e)}();t.DefaultKeyValueDifferFactory=u;var p=function(){function e(){this._records=new Map,this._mapHead=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}return Object.defineProperty(e.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead},enumerable:!0,configurable:!0}),e.prototype.forEachItem=function(e){var t;for(t=this._mapHead;null!==t;t=t._next)e(t)},e.prototype.forEachPreviousItem=function(e){var t;for(t=this._previousMapHead;null!==t;t=t._nextPrevious)e(t)},e.prototype.forEachChangedItem=function(e){var t;for(t=this._changesHead;null!==t;t=t._nextChanged)e(t)},e.prototype.forEachAddedItem=function(e){var t;for(t=this._additionsHead;null!==t;t=t._nextAdded)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=s.MapWrapper.createFromPairs([])),!(e instanceof Map||c.isJsObject(e)))throw new l.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 r=this._records,n=this._mapHead,i=null,o=null,a=!1;return this._forEach(e,function(e,s){var l;null!==n&&s===n.key?(l=n,c.looseIdentical(e,n.currentValue)||(n.previousValue=n.currentValue,n.currentValue=e,t._addToChanges(n))):(a=!0,null!==n&&(n._next=null,t._removeFromSeq(i,n),t._addToRemovals(n)),r.has(s)?l=r.get(s):(l=new d(s),r.set(s,l),l.currentValue=e,t._addToAdditions(l))),a&&(t._isInRemovals(l)&&t._removeFromRemovals(l),null==o?t._mapHead=l:o._next=l),i=n,o=l,n=null===n?null:n._next}),this._truncate(i,n),this.isDirty},e.prototype._reset=function(){if(this.isDirty){var e;for(e=this._previousMapHead=this._mapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=this._removalsTail=null}},e.prototype._truncate=function(e,t){for(;null!==t;){null===e?this._mapHead=null:e._next=null;var r=t._next;this._addToRemovals(t),e=t,t=r}for(var n=this._removalsHead;null!==n;n=n._nextRemoved)n.previousValue=n.currentValue,n.currentValue=null,this._records["delete"](n.key)},e.prototype._isInRemovals=function(e){return e===this._removalsHead||null!==e._nextRemoved||null!==e._prevRemoved},e.prototype._addToRemovals=function(e){null===this._removalsHead?this._removalsHead=this._removalsTail=e:(this._removalsTail._nextRemoved=e,e._prevRemoved=this._removalsTail,this._removalsTail=e)},e.prototype._removeFromSeq=function(e,t){var r=t._next;null===e?this._mapHead=r:e._next=r},e.prototype._removeFromRemovals=function(e){var t=e._prevRemoved,r=e._nextRemoved;null===t?this._removalsHead=r:t._nextRemoved=r,null===r?this._removalsTail=t:r._prevRemoved=t,e._prevRemoved=e._nextRemoved=null},e.prototype._addToAdditions=function(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)},e.prototype._addToChanges=function(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)},e.prototype.toString=function(){var e,t=[],r=[],n=[],i=[],o=[];for(e=this._mapHead;null!==e;e=e._next)t.push(c.stringify(e));for(e=this._previousMapHead;null!==e;e=e._nextPrevious)r.push(c.stringify(e));for(e=this._changesHead;null!==e;e=e._nextChanged)n.push(c.stringify(e));for(e=this._additionsHead;null!==e;e=e._nextAdded)i.push(c.stringify(e));for(e=this._removalsHead;null!==e;e=e._nextRemoved)o.push(c.stringify(e));return"map: "+t.join(", ")+"\nprevious: "+r.join(", ")+"\nadditions: "+i.join(", ")+"\nchanges: "+n.join(", ")+"\nremovals: "+o.join(", ")+"\n"},e.prototype._forEach=function(e,t){e instanceof Map?e.forEach(t):s.StringMapWrapper.forEach(e,t)},e}();t.DefaultKeyValueDiffer=p;var d=function(){function e(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._nextAdded=null,this._nextRemoved=null,this._prevRemoved=null,this._nextChanged=null}return e.prototype.toString=function(){return c.looseIdentical(this.previousValue,this.currentValue)?c.stringify(this.key):c.stringify(this.key)+"["+c.stringify(this.previousValue)+"->"+c.stringify(this.currentValue)+"]"},e}();return t.KVChangeRecord=d,n.define=i,r.exports}),System.register("angular2/src/core/change_detection/parser/ast",["angular2/src/facade/collection"],!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/collection"),s=function(){function e(){}return e.prototype.visit=function(e){return null},e.prototype.toString=function(){return"AST"},e}();t.AST=s;var c=function(e){function t(t,r,n){e.call(this),this.prefix=t,this.uninterpretedExpression=r,this.location=n}return o(t,e),t.prototype.visit=function(e){return e.visitQuote(this)},t.prototype.toString=function(){return"Quote"},t}(s);t.Quote=c;var l=function(e){function t(){e.apply(this,arguments)}return o(t,e),t.prototype.visit=function(e){},t}(s);t.EmptyExpr=l;var u=function(e){function t(){e.apply(this,arguments)}return o(t,e),t.prototype.visit=function(e){return e.visitImplicitReceiver(this)},t}(s);t.ImplicitReceiver=u;var p=function(e){function t(t){e.call(this),this.expressions=t}return o(t,e),t.prototype.visit=function(e){return e.visitChain(this)},t}(s);t.Chain=p;var d=function(e){function t(t,r,n){e.call(this),this.condition=t,this.trueExp=r,this.falseExp=n}return o(t,e),t.prototype.visit=function(e){return e.visitConditional(this)},t}(s);t.Conditional=d;var f=function(e){function t(t,r,n){e.call(this),this.receiver=t,this.name=r,this.getter=n}return o(t,e),t.prototype.visit=function(e){return e.visitPropertyRead(this)},t}(s);t.PropertyRead=f;var h=function(e){function t(t,r,n,i){e.call(this),this.receiver=t,this.name=r,this.setter=n,this.value=i}return o(t,e),t.prototype.visit=function(e){return e.visitPropertyWrite(this)},t}(s);t.PropertyWrite=h;var g=function(e){function t(t,r,n){e.call(this),this.receiver=t,this.name=r,this.getter=n}return o(t,e),t.prototype.visit=function(e){return e.visitSafePropertyRead(this)},t}(s);t.SafePropertyRead=g;var m=function(e){function t(t,r){e.call(this),this.obj=t,this.key=r}return o(t,e),t.prototype.visit=function(e){return e.visitKeyedRead(this)},t}(s);t.KeyedRead=m;var v=function(e){function t(t,r,n){e.call(this),this.obj=t,this.key=r,this.value=n}return o(t,e),t.prototype.visit=function(e){return e.visitKeyedWrite(this)},t}(s);t.KeyedWrite=v;var y=function(e){function t(t,r,n){e.call(this),this.exp=t,this.name=r,this.args=n}return o(t,e),t.prototype.visit=function(e){return e.visitPipe(this)},t}(s);t.BindingPipe=y;var _=function(e){function t(t){e.call(this),this.value=t}return o(t,e),t.prototype.visit=function(e){return e.visitLiteralPrimitive(this)},t}(s);t.LiteralPrimitive=_;var b=function(e){function t(t){e.call(this),this.expressions=t}return o(t,e),t.prototype.visit=function(e){return e.visitLiteralArray(this)},t}(s);t.LiteralArray=b;var C=function(e){function t(t,r){e.call(this),this.keys=t,this.values=r}return o(t,e),t.prototype.visit=function(e){return e.visitLiteralMap(this)},t}(s);t.LiteralMap=C;var w=function(e){function t(t,r){e.call(this),this.strings=t,this.expressions=r}return o(t,e),t.prototype.visit=function(e){return e.visitInterpolation(this)},t}(s);t.Interpolation=w;var P=function(e){function t(t,r,n){e.call(this),this.operation=t,this.left=r,this.right=n}return o(t,e),t.prototype.visit=function(e){return e.visitBinary(this)},t}(s);t.Binary=P;var E=function(e){function t(t){e.call(this),this.expression=t}return o(t,e),t.prototype.visit=function(e){return e.visitPrefixNot(this)},t}(s);t.PrefixNot=E;var S=function(e){function t(t,r,n,i){e.call(this),this.receiver=t,this.name=r,this.fn=n,this.args=i}return o(t,e),t.prototype.visit=function(e){return e.visitMethodCall(this)},t}(s);t.MethodCall=S;var R=function(e){function t(t,r,n,i){e.call(this),this.receiver=t,this.name=r,this.fn=n,this.args=i}return o(t,e),t.prototype.visit=function(e){return e.visitSafeMethodCall(this)},t}(s);t.SafeMethodCall=R;var x=function(e){function t(t,r){e.call(this),this.target=t,this.args=r}return o(t,e),t.prototype.visit=function(e){return e.visitFunctionCall(this)},t}(s);t.FunctionCall=x;var O=function(e){function t(t,r,n){e.call(this),this.ast=t,this.source=r,this.location=n}return o(t,e),t.prototype.visit=function(e){return this.ast.visit(e)},t.prototype.toString=function(){return this.source+" in "+this.location},t}(s);t.ASTWithSource=O;var D=function(){function e(e,t,r,n){this.key=e,this.keyIsVar=t,this.name=r,this.expression=n}return e}();t.TemplateBinding=D;var T=function(){function e(){}return e.prototype.visitBinary=function(e){return e.left.visit(this),e.right.visit(this),null},e.prototype.visitChain=function(e){return this.visitAll(e.expressions)},e.prototype.visitConditional=function(e){return e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this),null},e.prototype.visitPipe=function(e){return e.exp.visit(this),this.visitAll(e.args),null},e.prototype.visitFunctionCall=function(e){return e.target.visit(this),this.visitAll(e.args),null},e.prototype.visitImplicitReceiver=function(e){return null},e.prototype.visitInterpolation=function(e){return this.visitAll(e.expressions)},e.prototype.visitKeyedRead=function(e){return e.obj.visit(this),e.key.visit(this),null},e.prototype.visitKeyedWrite=function(e){return e.obj.visit(this),e.key.visit(this),e.value.visit(this),null},e.prototype.visitLiteralArray=function(e){return this.visitAll(e.expressions)},e.prototype.visitLiteralMap=function(e){return this.visitAll(e.values)},e.prototype.visitLiteralPrimitive=function(e){return null},e.prototype.visitMethodCall=function(e){return e.receiver.visit(this),this.visitAll(e.args)},e.prototype.visitPrefixNot=function(e){return e.expression.visit(this),null},e.prototype.visitPropertyRead=function(e){return e.receiver.visit(this),null},e.prototype.visitPropertyWrite=function(e){return e.receiver.visit(this),e.value.visit(this),null},e.prototype.visitSafePropertyRead=function(e){return e.receiver.visit(this),null},e.prototype.visitSafeMethodCall=function(e){return e.receiver.visit(this),this.visitAll(e.args)},e.prototype.visitAll=function(e){var t=this;return e.forEach(function(e){return e.visit(t)}),null},e.prototype.visitQuote=function(e){return null},e}();t.RecursiveAstVisitor=T;var A=function(){function e(){}return e.prototype.visitImplicitReceiver=function(e){return e},e.prototype.visitInterpolation=function(e){return new w(e.strings,this.visitAll(e.expressions))},e.prototype.visitLiteralPrimitive=function(e){return new _(e.value)},e.prototype.visitPropertyRead=function(e){return new f(e.receiver.visit(this),e.name,e.getter)},e.prototype.visitPropertyWrite=function(e){return new h(e.receiver.visit(this),e.name,e.setter,e.value)},e.prototype.visitSafePropertyRead=function(e){return new g(e.receiver.visit(this),e.name,e.getter)},e.prototype.visitMethodCall=function(e){return new S(e.receiver.visit(this),e.name,e.fn,this.visitAll(e.args))},e.prototype.visitSafeMethodCall=function(e){return new R(e.receiver.visit(this),e.name,e.fn,this.visitAll(e.args))},e.prototype.visitFunctionCall=function(e){return new x(e.target.visit(this),this.visitAll(e.args))},e.prototype.visitLiteralArray=function(e){return new b(this.visitAll(e.expressions))},e.prototype.visitLiteralMap=function(e){return new C(e.keys,this.visitAll(e.values))},e.prototype.visitBinary=function(e){return new P(e.operation,e.left.visit(this),e.right.visit(this))},e.prototype.visitPrefixNot=function(e){return new E(e.expression.visit(this))},e.prototype.visitConditional=function(e){return new d(e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this))},e.prototype.visitPipe=function(e){return new y(e.exp.visit(this),e.name,this.visitAll(e.args))},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=t.$TAB&&e<=t.$SPACE||e==G}function u(e){return e>=j&&q>=e||e>=A&&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>=j&&q>=e||e>=A&&k>=e||e>=D&&T>=e||e==V||e==t.$$}function f(e){return e>=D&&T>=e}function h(e){return e==M||e==I}function g(e){return e==t.$MINUS||e==t.$PLUS}function m(e){switch(e){case L:return t.$LF;case B: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,T=57,A=65,I=69,k=90;t.$LBRACKET=91,t.$BACKSLASH=92,t.$RBRACKET=93;var N=94,V=95,j=97,M=101,B=102,L=110,F=114,W=116,U=117,H=118,q=122;t.$LBRACE=123,t.$BAR=124,t.$RBRACE=125;var G=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(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}return e.prototype.advance=function(){this.peek=++this.index>=this.length?t.$EOF:E.StringWrapper.charCodeAt(this.input,this.index)},e.prototype.scanToken=function(){for(var e=this.input,r=this.length,i=this.peek,o=this.index;i<=t.$SPACE;){if(++o>=r){i=t.$EOF;break}i=E.StringWrapper.charCodeAt(e,o)}if(this.peek=i,this.index=o,o>=r)return null;if(u(i))return this.scanIdentifier();if(f(i))return this.scanNumber(o);var a=o;switch(i){case t.$PERIOD:return this.advance(),f(this.peek)?this.scanNumber(a):n(a,t.$PERIOD);case t.$LPAREN:case t.$RPAREN:case t.$LBRACE:case t.$RBRACE:case t.$LBRACKET:case t.$RBRACKET:case t.$COMMA:case t.$COLON:case t.$SEMICOLON:return this.scanCharacter(a,i);case t.$SQ:case t.$DQ:return this.scanString();case t.$HASH:case t.$PLUS:case t.$MINUS:case t.$STAR:case t.$SLASH:case t.$PERCENT:case N:return this.scanOperator(a,E.StringWrapper.fromCharCode(i));case t.$QUESTION:return this.scanComplexOperator(a,"?",t.$PERIOD,".");case t.$LT:case t.$GT:return this.scanComplexOperator(a,E.StringWrapper.fromCharCode(i),t.$EQ,"=");case t.$BANG:case t.$EQ:return this.scanComplexOperator(a,E.StringWrapper.fromCharCode(i),t.$EQ,"=",t.$EQ,"=");case t.$AMPERSAND:return this.scanComplexOperator(a,"&",t.$AMPERSAND,"&");case t.$BAR:return this.scanComplexOperator(a,"|",t.$BAR,"|");case G:for(;l(this.peek);)this.advance();return this.scanToken()}return this.error("Unexpected character ["+E.StringWrapper.fromCharCode(i)+"]",0),null},e.prototype.scanCharacter=function(e,t){return assert(this.peek==t),this.advance(),n(e,t)},e.prototype.scanOperator=function(e,t){return assert(this.peek==E.StringWrapper.charCodeAt(t,0)),assert(P.SetWrapper.has($,t)),this.advance(),a(e,t)},e.prototype.scanComplexOperator=function(e,t,r,n,i,o){assert(this.peek==E.StringWrapper.charCodeAt(t,0)),this.advance();var s=t;return this.peek==r&&(this.advance(),s+=n),E.isPresent(i)&&this.peek==i&&(this.advance(),s+=o),assert(P.SetWrapper.has($,s)),a(e,s)},e.prototype.scanIdentifier=function(){assert(u(this.peek));var e=this.index;for(this.advance();d(this.peek);)this.advance();var t=this.input.substring(e,this.index);return P.SetWrapper.has(Q,t)?o(e,t):i(e,t)},e.prototype.scanNumber=function(e){assert(f(this.peek));var r=this.index===e;for(this.advance();;){if(f(this.peek));else if(this.peek==t.$PERIOD)r=!1;else{if(!h(this.peek))break;this.advance(),g(this.peek)&&this.advance(),f(this.peek)||this.error("Invalid exponent",-1),r=!1}this.advance()}var n=this.input.substring(e,this.index),i=r?E.NumberWrapper.parseIntAutoRadix(n):E.NumberWrapper.parseFloat(n);return c(e,i)},e.prototype.scanString=function(){assert(this.peek==t.$SQ||this.peek==t.$DQ);var e=this.index,r=this.peek;this.advance();for(var n,i=this.index,o=this.input;this.peek!=r;)if(this.peek==t.$BACKSLASH){null==n&&(n=new E.StringJoiner),n.add(o.substring(i,this.index)),this.advance();var a;if(this.peek==U){var c=o.substring(this.index+1,this.index+5);try{a=E.NumberWrapper.parseInt(c,16)}catch(l){this.error("Invalid unicode escape [\\u"+c+"]",0)}for(var u=0;5>u;u++)this.advance()}else a=m(this.peek),this.advance();n.add(E.StringWrapper.fromCharCode(a)),i=this.index}else this.peek==t.$EOF?this.error("Unterminated quote",0):this.advance();var p=o.substring(i,this.index);this.advance();var d=p;return null!=n&&(n.add(p),d=n.toString()),s(e,d)},e.prototype.error=function(e,t){var r=this.index+t;throw new K("Lexer Error: "+e+" at column "+r+" in expression ["+this.input+"]")},e}();t.isIdentifier=p;var $=P.SetWrapper.createFromList(["+","-","*","/","%","^","=","==","!=","===","!==","<",">","<=",">=","&&","||","&","|","!","?","#","?."]),Q=P.SetWrapper.createFromList(["var","null","undefined","true","false","if","else"]);return v.define=y,r.exports}),System.register("angular2/src/core/change_detection/parser/parser",["angular2/src/core/di/decorators","angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/collection","angular2/src/core/change_detection/parser/lexer","angular2/src/core/reflection/reflection","angular2/src/core/change_detection/parser/ast"],!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/core/di/decorators"),l=e("angular2/src/facade/lang"),u=e("angular2/src/facade/exceptions"),p=e("angular2/src/facade/collection"),d=e("angular2/src/core/change_detection/parser/lexer"),f=e("angular2/src/core/reflection/reflection"),h=e("angular2/src/core/change_detection/parser/ast"),g=new h.ImplicitReceiver,m=/\{\{(.*?)\}\}/g,v=function(e){function t(t,r,n,i){e.call(this,"Parser Error: "+t+" "+n+" ["+r+"] in "+i)}return o(t,e),t}(u.BaseException),y=function(){function e(e,t){void 0===t&&(t=null),this._lexer=e,this._reflector=l.isPresent(t)?t:f.reflector}return e.prototype.parseAction=function(e,t){this._checkNoInterpolation(e,t);var r=this._lexer.tokenize(e),n=new _(e,t,r,this._reflector,!0).parseChain();return new h.ASTWithSource(n,e,t)},e.prototype.parseBinding=function(e,t){var r=this._parseBindingAst(e,t);return new h.ASTWithSource(r,e,t)},e.prototype.parseSimpleBinding=function(e,t){var r=this._parseBindingAst(e,t);if(!b.check(r))throw new v("Host binding expression can only contain field access and constants",e,t);return new h.ASTWithSource(r,e,t)},e.prototype._parseBindingAst=function(e,t){var r=this._parseQuote(e,t);if(l.isPresent(r))return r;this._checkNoInterpolation(e,t);var n=this._lexer.tokenize(e);return new _(e,t,n,this._reflector,!1).parseChain()},e.prototype._parseQuote=function(e,t){if(l.isBlank(e))return null;var r=e.indexOf(":");if(-1==r)return null;var n=e.substring(0,r).trim();if(!d.isIdentifier(n))return null;var i=e.substring(r+1);return new h.Quote(n,i,t)},e.prototype.parseTemplateBindings=function(e,t){var r=this._lexer.tokenize(e);return new _(e,t,r,this._reflector,!1).parseTemplateBindings()},e.prototype.parseInterpolation=function(e,t){var r=l.StringWrapper.split(e,m);if(r.length<=1)return null;for(var n=[],i=[],o=0;o0))throw new v("Blank expressions are not allowed in interpolated strings",e,"at column "+this._findInterpolationErrorColumn(r,o)+" in",t);var s=this._lexer.tokenize(a),c=new _(e,t,s,this._reflector,!1).parseChain();i.push(c)}}return new h.ASTWithSource(new h.Interpolation(n,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 r=l.StringWrapper.split(e,m);if(r.length>1)throw new v("Got interpolation ({{}}) where expression was expected",e,"at column "+this._findInterpolationErrorColumn(r,1)+" in",t)},e.prototype._findInterpolationErrorColumn=function(e,t){for(var r="",n=0;t>n;n++)r+=n%2===0?e[n]:"{{"+e[n]+"}}";return r.length},e=a([c.Injectable(),s("design:paramtypes",[d.Lexer,f.Reflector])],e)}();t.Parser=y;var _=function(){function e(e,t,r,n,i){this.input=e,this.location=t,this.tokens=r,this.reflector=n,this.parseAction=i,this.index=0}return e.prototype.peek=function(e){var t=this.index+e;return t"))e=new h.Binary(">",e,this.parseAdditive());else if(this.optionalOperator("<="))e=new h.Binary("<=",e,this.parseAdditive());else{if(!this.optionalOperator(">="))return e;e=new h.Binary(">=",e,this.parseAdditive())}},e.prototype.parseAdditive=function(){for(var e=this.parseMultiplicative();;)if(this.optionalOperator("+"))e=new h.Binary("+",e,this.parseMultiplicative());else{if(!this.optionalOperator("-"))return e;e=new h.Binary("-",e,this.parseMultiplicative())}},e.prototype.parseMultiplicative=function(){for(var e=this.parsePrefix();;)if(this.optionalOperator("*"))e=new h.Binary("*",e,this.parsePrefix());else if(this.optionalOperator("%"))e=new h.Binary("%",e,this.parsePrefix());else{if(!this.optionalOperator("/"))return e;e=new h.Binary("/",e,this.parsePrefix())}},e.prototype.parsePrefix=function(){return this.optionalOperator("+")?this.parsePrefix():this.optionalOperator("-")?new h.Binary("-",new h.LiteralPrimitive(0),this.parsePrefix()):this.optionalOperator("!")?new h.PrefixNot(this.parsePrefix()):this.parseCallChain()},e.prototype.parseCallChain=function(){for(var e=this.parsePrimary();;)if(this.optionalCharacter(d.$PERIOD))e=this.parseAccessMemberOrMethodCall(e,!1);else if(this.optionalOperator("?."))e=this.parseAccessMemberOrMethodCall(e,!0);else if(this.optionalCharacter(d.$LBRACKET)){var t=this.parsePipe();if(this.expectCharacter(d.$RBRACKET),this.optionalOperator("=")){var r=this.parseConditional();e=new h.KeyedWrite(e,t,r)}else e=new h.KeyedRead(e,t)}else{if(!this.optionalCharacter(d.$LPAREN))return e;var n=this.parseCallArguments();this.expectCharacter(d.$RPAREN),e=new h.FunctionCall(e,n)}},e.prototype.parsePrimary=function(){if(this.optionalCharacter(d.$LPAREN)){var e=this.parsePipe();return this.expectCharacter(d.$RPAREN),e}if(this.next.isKeywordNull()||this.next.isKeywordUndefined())return this.advance(),new h.LiteralPrimitive(null);if(this.next.isKeywordTrue())return this.advance(),new h.LiteralPrimitive(!0);if(this.next.isKeywordFalse())return this.advance(),new h.LiteralPrimitive(!1);if(this.optionalCharacter(d.$LBRACKET)){var t=this.parseExpressionList(d.$RBRACKET);return this.expectCharacter(d.$RBRACKET),new h.LiteralArray(t)}if(this.next.isCharacter(d.$LBRACE))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(g,!1);if(this.next.isNumber()){var r=this.next.toNumber();return this.advance(),new h.LiteralPrimitive(r)}if(this.next.isString()){var n=this.next.toString();return this.advance(),new h.LiteralPrimitive(n)}throw this.index>=this.tokens.length?this.error("Unexpected end of expression: "+this.input):this.error("Unexpected token "+this.next),new u.BaseException("Fell through all cases in parsePrimary")},e.prototype.parseExpressionList=function(e){var t=[];if(!this.next.isCharacter(e))do t.push(this.parsePipe());while(this.optionalCharacter(d.$COMMA));return t},e.prototype.parseLiteralMap=function(){var e=[],t=[];if(this.expectCharacter(d.$LBRACE),!this.optionalCharacter(d.$RBRACE)){do{var r=this.expectIdentifierOrKeywordOrString();e.push(r),this.expectCharacter(d.$COLON),t.push(this.parsePipe())}while(this.optionalCharacter(d.$COMMA));this.expectCharacter(d.$RBRACE)}return new h.LiteralMap(e,t)},e.prototype.parseAccessMemberOrMethodCall=function(e,t){void 0===t&&(t=!1);var r=this.expectIdentifierOrKeyword();if(this.optionalCharacter(d.$LPAREN)){var n=this.parseCallArguments();this.expectCharacter(d.$RPAREN);var i=this.reflector.method(r);return t?new h.SafeMethodCall(e,r,i,n):new h.MethodCall(e,r,i,n)}if(!t){if(this.optionalOperator("=")){this.parseAction||this.error("Bindings cannot contain assignments");var o=this.parseConditional();return new h.PropertyWrite(e,r,this.reflector.setter(r),o)}return new h.PropertyRead(e,r,this.reflector.getter(r))}return this.optionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),null):new h.SafePropertyRead(e,r,this.reflector.getter(r))},e.prototype.parseCallArguments=function(){if(this.next.isCharacter(d.$RPAREN))return[];var e=[];do e.push(this.parsePipe());while(this.optionalCharacter(d.$COMMA));return e},e.prototype.parseBlockContent=function(){this.parseAction||this.error("Binding expression cannot contain chained expression");for(var e=[];this.index0);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;ii+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.equals(t.args,e.args)})}function s(e,t,r){var n=e.args.map(function(e){return c(r,e)}),i=c(r,e.contextIndex),o=t.length+1;return new g.ProtoRecord(e.mode,e.name,e.funcOrValue,n,e.fixedArgs,i,e.directiveIndex,o,e.bindingRecord,e.lastInBinding,e.lastInDirective,e.argumentToPureFunction,e.referencedBySelf,e.propertyBindingIndex)}function c(e,t){var r=e.get(t);return f.isPresent(r)?r:t}function l(e,t,r){return new g.ProtoRecord(g.RecordType.Self,"self",null,[],e.fixedArgs,t,e.directiveIndex,r,e.bindingRecord,e.lastInBinding,e.lastInDirective,!1,!1,e.propertyBindingIndex)}function u(e,t){var r=f.isBlank(e.directiveIndex)?null:e.directiveIndex.directiveIndex,n=f.isBlank(e.directiveIndex)?null:e.directiveIndex.elementIndex,i=f.isBlank(t.directiveIndex)?null:t.directiveIndex.directiveIndex,o=f.isBlank(t.directiveIndex)?null:t.directiveIndex.elementIndex;return r===i&&n===o}var p=System.global,d=p.define;p.define=void 0;var f=e("angular2/src/facade/lang"),h=e("angular2/src/facade/collection"),g=e("angular2/src/core/change_detection/proto_record");return t.coalesce=n,p.define=d,r.exports}),System.register("angular2/src/core/change_detection/codegen_name_util",["angular2/src/facade/lang","angular2/src/facade/collection"],!0,function(e,t,r){function n(e){return a.StringWrapper.replaceAll(e,v,"")}var i=System.global,o=i.define;i.define=void 0;var a=e("angular2/src/facade/lang"),s=e("angular2/src/facade/collection"),c="state",l="propertyBindingIndex",u="directiveIndices",p="dispatcher",d="locals",f="mode",h="pipes",g="protos";t.CONTEXT_ACCESSOR="context",t.CONTEXT_INDEX=0;var m="this.",v=/\W/g;t.sanitizeName=n;var y=function(){function e(e,r,i,o){this._records=e,this._eventBindings=r,this._directiveRecords=i,this._utilName=o,this._sanitizedEventNames=new s.Map,this._sanitizedNames=s.ListWrapper.createFixedSize(this._records.length+1),this._sanitizedNames[t.CONTEXT_INDEX]=t.CONTEXT_ACCESSOR;for(var a=0,c=this._records.length;c>a;++a)this._sanitizedNames[a+1]=n(""+this._records[a].name+a);for(var l=0;la;++a)p.push(n(""+u.records[a].name+a+"_"+l));this._sanitizedEventNames.set(u,p)}}return e.prototype._addFieldPrefix=function(e){return""+m+e},e.prototype.getDispatcherName=function(){return this._addFieldPrefix(p)},e.prototype.getPipesAccessorName=function(){return this._addFieldPrefix(h)},e.prototype.getProtosName=function(){return this._addFieldPrefix(g)},e.prototype.getDirectivesAccessorName=function(){return this._addFieldPrefix(u)},e.prototype.getLocalsAccessorName=function(){return this._addFieldPrefix(d)},e.prototype.getStateName=function(){return this._addFieldPrefix(c)},e.prototype.getModeName=function(){return this._addFieldPrefix(f)},e.prototype.getPropertyBindingIndex=function(){return this._addFieldPrefix(l)},e.prototype.getLocalName=function(e){return"l_"+this._sanitizedNames[e]},e.prototype.getEventLocalName=function(e,t){return"l_"+this._sanitizedEventNames.get(e)[t]},e.prototype.getChangeName=function(e){return"c_"+this._sanitizedNames[e]},e.prototype.genInitLocals=function(){for(var e=[],r=[],n=0,i=this.getFieldCount();i>n;++n)if(n==t.CONTEXT_INDEX)e.push(this.getLocalName(n)+" = "+this.getFieldName(n));else{var o=this._records[n-1];if(o.argumentToPureFunction){var a=this.getChangeName(n);e.push(this.getLocalName(n)+","+a),r.push(a)}else e.push(""+this.getLocalName(n))}var c=s.ListWrapper.isEmpty(r)?"":r.join("=")+" = false;";return"var "+e.join(",")+";"+c},e.prototype.genInitEventLocals=function(){var e=this,r=[this.getLocalName(t.CONTEXT_INDEX)+" = "+this.getFieldName(t.CONTEXT_INDEX)];return this._sanitizedEventNames.forEach(function(n,i){for(var o=0;o1?"var "+r.join(",")+";":""},e.prototype.getPreventDefaultAccesor=function(){return"preventDefault"},e.prototype.getFieldCount=function(){return this._sanitizedNames.length},e.prototype.getFieldName=function(e){return this._addFieldPrefix(this._sanitizedNames[e])},e.prototype.getAllFieldNames=function(){for(var e=[],t=0,r=this.getFieldCount();r>t;++t)(0===t||this._records[t-1].shouldBeChecked())&&e.push(this.getFieldName(t));for(var n=0,i=this._records.length;i>n;++n){var o=this._records[n];o.isPipeRecord()&&e.push(this.getPipeName(o.selfIndex))}for(var a=0,s=this._directiveRecords.length;s>a;++a){var c=this._directiveRecords[a];e.push(this.getDirectiveName(c.directiveIndex)),c.isDefaultChangeDetection()||e.push(this.getDetectorName(c.directiveIndex))}return e},e.prototype.genDehydrateFields=function(){var e=this.getAllFieldNames();return s.ListWrapper.removeAt(e,t.CONTEXT_INDEX),s.ListWrapper.isEmpty(e)?"":(e.push(this._utilName+".uninitialized;"),e.join(" = "))},e.prototype.genPipeOnDestroy=function(){var e=this;return this._records.filter(function(e){return e.isPipeRecord()}).map(function(t){return e._utilName+".callPipeOnDestroy("+e.getPipeName(t.selfIndex)+");"}).join("\n")},e.prototype.getPipeName=function(e){return this._addFieldPrefix(this._sanitizedNames[e]+"_pipe")},e.prototype.getDirectiveName=function(e){return this._addFieldPrefix("directive_"+e.name)},e.prototype.getDetectorName=function(e){return this._addFieldPrefix("detector_"+e.name)},e}();return t.CodegenNameUtil=y,i.define=o,r.exports}),System.register("angular2/src/core/change_detection/codegen_facade",[],!0,function(e,t,r){function n(e){return JSON.stringify(e)}function i(e){return"'"+e+"'"}function o(e){return e.join(" + ")}var a=System.global,s=a.define;return a.define=void 0,t.codify=n,t.rawString=i,t.combineGeneratedStrings=o,a.define=s,r.exports}),System.register("angular2/src/core/metadata/view",["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/facade/lang");!function(e){e[e.Emulated=0]="Emulated",e[e.Native=1]="Native",e[e.None=2]="None"}(t.ViewEncapsulation||(t.ViewEncapsulation={}));var c=t.ViewEncapsulation;t.VIEW_ENCAPSULATION_VALUES=[c.Emulated,c.Native,c.None];var l=function(){function e(e){var t=void 0===e?{}:e,r=t.templateUrl,n=t.template,i=t.directives,o=t.pipes,a=t.encapsulation,s=t.styles,c=t.styleUrls;this.templateUrl=r,this.template=n,this.styleUrls=c,this.styles=s,this.directives=i,this.pipes=o,this.encapsulation=a}return e=o([s.CONST(),a("design:paramtypes",[Object])],e)}();return t.ViewMetadata=l,n.define=i,r.exports}),System.register("angular2/src/core/util",["angular2/src/core/util/decorators"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/core/util/decorators");return t.Class=o.Class,n.define=i,r.exports}),System.register("angular2/src/core/prod_mode",["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/facade/lang");return t.enableProdMode=o.enableProdMode,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/zone/ng_zone",["angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/facade/async","angular2/src/core/profile/profile"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/facade/collection"),a=e("angular2/src/facade/lang"),s=e("angular2/src/facade/async"),c=e("angular2/src/core/profile/profile"),l=function(){function e(e,t){this.error=e,this.stackTrace=t}return e}();t.NgZoneError=l;var u=function(){function e(e){var t=e.enableLongStackTrace;this._runScope=c.wtfCreateScope("NgZone#run()"),this._microtaskScope=c.wtfCreateScope("NgZone#microtask()"),this._pendingMicrotasks=0,this._hasExecutedCodeInInnerZone=!1,this._nestedRun=0,this._inVmTurnDone=!1,this._pendingTimeouts=[],a.global.zone?(this._disabled=!1,this._mountZone=a.global.zone,this._innerZone=this._createInnerZone(this._mountZone,t)):(this._disabled=!0,this._mountZone=null),this._onTurnStartEvents=new s.EventEmitter(!1),this._onTurnDoneEvents=new s.EventEmitter(!1),this._onEventDoneEvents=new s.EventEmitter(!1),this._onErrorEvents=new s.EventEmitter(!1)}return e.prototype.overrideOnTurnStart=function(e){this._onTurnStart=a.normalizeBlank(e)},Object.defineProperty(e.prototype,"onTurnStart",{get:function(){return this._onTurnStartEvents},enumerable:!0,configurable:!0}),e.prototype._notifyOnTurnStart=function(e){var t=this;e.call(this._innerZone,function(){t._onTurnStartEvents.emit(null)})},e.prototype.overrideOnTurnDone=function(e){this._onTurnDone=a.normalizeBlank(e)},Object.defineProperty(e.prototype,"onTurnDone",{get:function(){return this._onTurnDoneEvents},enumerable:!0,configurable:!0}),e.prototype._notifyOnTurnDone=function(e){var t=this;e.call(this._innerZone,function(){t._onTurnDoneEvents.emit(null)})},e.prototype.overrideOnEventDone=function(e,t){var r=this;void 0===t&&(t=!1);var n=a.normalizeBlank(e);t?this._onEventDone=function(){r._pendingTimeouts.length||n()}:this._onEventDone=n},Object.defineProperty(e.prototype,"onEventDone",{get:function(){return this._onEventDoneEvents},enumerable:!0,configurable:!0}),e.prototype._notifyOnEventDone=function(){var e=this;this.runOutsideAngular(function(){e._onEventDoneEvents.emit(null)})},Object.defineProperty(e.prototype,"hasPendingMicrotasks",{get:function(){return this._pendingMicrotasks>0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasPendingTimers",{get:function(){return this._pendingTimeouts.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasPendingAsyncTasks",{get:function(){return this.hasPendingMicrotasks||this.hasPendingTimers},enumerable:!0,configurable:!0}),e.prototype.overrideOnErrorHandler=function(e){this._onErrorHandler=a.normalizeBlank(e)},Object.defineProperty(e.prototype,"onError",{get:function(){return this._onErrorEvents},enumerable:!0,configurable:!0}),e.prototype.run=function(e){if(this._disabled)return e();var t=this._runScope();try{return this._innerZone.run(e)}finally{c.wtfLeave(t)}},e.prototype.runOutsideAngular=function(e){return this._disabled?e():this._mountZone.run(e)},e.prototype._createInnerZone=function(e,t){var r,n=this._microtaskScope,i=this;return r=t?o.StringMapWrapper.merge(Zone.longStackTraceZone,{onError:function(e){i._notifyOnError(this,e)}}):{onError:function(e){i._notifyOnError(this,e)}},e.fork(r).fork({$run:function(e){return function(){try{return i._nestedRun++,i._hasExecutedCodeInInnerZone||(i._hasExecutedCodeInInnerZone=!0,i._notifyOnTurnStart(e),i._onTurnStart&&e.call(i._innerZone,i._onTurnStart)),e.apply(this,arguments)}finally{if(i._nestedRun--,0==i._pendingMicrotasks&&0==i._nestedRun&&!this._inVmTurnDone){if(i._hasExecutedCodeInInnerZone)try{this._inVmTurnDone=!0,i._notifyOnTurnDone(e),i._onTurnDone&&e.call(i._innerZone,i._onTurnDone)}finally{this._inVmTurnDone=!1,i._hasExecutedCodeInInnerZone=!1}0===i._pendingMicrotasks&&(i._notifyOnEventDone(),a.isPresent(i._onEventDone)&&i.runOutsideAngular(i._onEventDone))}}}},$scheduleMicrotask:function(e){return function(t){i._pendingMicrotasks++;var r=function(){var e=n();try{t()}finally{i._pendingMicrotasks--,c.wtfLeave(e)}};e.call(this,r)}},$setTimeout:function(e){return function(t,r){for(var n=[],a=2;a")),t.APP_COMPONENT=c.CONST_EXPR(new s.OpaqueToken("AppComponent")),t.APP_ID=c.CONST_EXPR(new s.OpaqueToken("AppId")),t.APP_ID_RANDOM_PROVIDER=c.CONST_EXPR(new s.Provider(t.APP_ID,{useFactory:n,deps:[]})),t.PLATFORM_INITIALIZER=c.CONST_EXPR(new s.OpaqueToken("Platform Initializer")),t.APP_INITIALIZER=c.CONST_EXPR(new s.OpaqueToken("Application Initializer")),t.PACKAGE_ROOT_URL=c.CONST_EXPR(new s.OpaqueToken("Application Packages Root URL")),o.define=a,r.exports}),System.register("angular2/src/core/testability/testability",["angular2/src/core/di","angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/core/zone/ng_zone","angular2/src/facade/async"],!0,function(e,t,r){function n(e){v=e}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/collection"),u=e("angular2/src/facade/lang"),p=e("angular2/src/facade/exceptions"),d=e("angular2/src/core/zone/ng_zone"),f=e("angular2/src/facade/async"),h=function(){function e(e){this._pendingCount=0,this._callbacks=[],this._isAngularEventPending=!1,this._watchAngularEvents(e)}return e.prototype._watchAngularEvents=function(e){var t=this;f.ObservableWrapper.subscribe(e.onTurnStart,function(e){t._isAngularEventPending=!0}),e.runOutsideAngular(function(){f.ObservableWrapper.subscribe(e.onEventDone,function(r){e.hasPendingTimers||(t._isAngularEventPending=!1,t._runCallbacksIfReady())})})},e.prototype.increasePendingRequestCount=function(){return this._pendingCount+=1,this._pendingCount},e.prototype.decreasePendingRequestCount=function(){if(this._pendingCount-=1,this._pendingCount<0)throw new p.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;this.isStable()&&f.PromiseWrapper.resolve(null).then(function(t){for(;0!==e._callbacks.length;)e._callbacks.pop()()})},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,r){return[]},e.prototype.findProviders=function(e,t,r){return[]},e=a([c.Injectable(),s("design:paramtypes",[d.NgZone])],e)}();t.Testability=h;var g=function(){function e(){this._applications=new l.Map,v.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 l.MapWrapper.values(this._applications)},e.prototype.findTestabilityInTree=function(e,t){return void 0===t&&(t=!0),v.findTestabilityInTree(this,e,t)},e=a([c.Injectable(),s("design:paramtypes",[])],e)}();t.TestabilityRegistry=g;var m=function(){function e(){}return e.prototype.addToWindow=function(e){},e.prototype.findTestabilityInTree=function(e,t,r){return null},e=a([u.CONST(),s("design:paramtypes",[])],e)}();t.setTestabilityGetter=n;var v=u.CONST_EXPR(new m);return i.define=o,r.exports}),System.register("angular2/src/core/render/api",["angular2/src/facade/exceptions"],!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/exceptions"),s=function(){function e(){}return e}();t.RenderProtoViewRef=s;var c=function(){function e(){}return e}();t.RenderFragmentRef=c;var l=function(){function e(){}return e}();t.RenderViewRef=l;var u=function(){function e(){}return e}();t.RenderTemplateCmd=u;var p=function(e){function t(){e.apply(this,arguments)}return o(t,e),Object.defineProperty(t.prototype,"ngContentIndex",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isBound",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),t}(u);t.RenderBeginCmd=p;var d=function(e){function t(){e.apply(this,arguments)}return o(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),t}(p);t.RenderTextCmd=d;var f=function(e){function t(){e.apply(this,arguments)}return o(t,e),Object.defineProperty(t.prototype,"index",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngContentIndex",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),t}(u);t.RenderNgContentCmd=f;var h=function(e){function t(){e.apply(this,arguments)}return o(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"attrNameAndValues",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"eventTargetAndNames",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),t}(p);t.RenderBeginElementCmd=h;var g=function(e){function t(){e.apply(this,arguments)}return o(t,e),Object.defineProperty(t.prototype,"templateId",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),t}(h);t.RenderBeginComponentCmd=g;var m=function(e){function t(){e.apply(this,arguments)}return o(t,e),Object.defineProperty(t.prototype,"isMerged",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),t}(h);t.RenderEmbeddedTemplateCmd=m;var v=function(){function e(e,t){this.viewRef=e,this.fragmentRefs=t}return e}();t.RenderViewWithFragments=v;var y=function(){function e(e,t,r,n,i){this.id=e,this.shortId=t,this.encapsulation=r,this.commands=n,this.styles=i}return e}();t.RenderComponentTemplate=y;var _=function(){function e(){}return e}();return t.Renderer=_,n.define=i,r.exports}),System.register("angular2/src/core/pipes/pipe_provider",["angular2/src/core/di/provider","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=e("angular2/src/core/di/provider"),s=e("angular2/src/core/di"),c=function(e){function t(t,r,n,i,o){e.call(this,n,i,o),this.name=t,this.pure=r}return o(t,e),t.createFromType=function(e,r){var n=new s.Provider(e,{useClass:e}),i=a.resolveProvider(n);return new t(r.name,r.pure,i.key,i.resolvedFactories,i.multiProvider)},t}(a.ResolvedProvider_);return t.PipeProvider=c,n.define=i,r.exports}),System.register("angular2/src/core/change_detection/pipes",[],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=function(){function e(e,t){this.pipe=e,this.pure=t}return e}();return t.SelectedPipe=o,n.define=i,r.exports}),System.register("angular2/src/core/linker/view_ref",["angular2/src/facade/lang","angular2/src/facade/exceptions"],!0,function(e,t,r){function n(e){return e._view}function i(e){return c.isPresent(e)?e._protoView:null}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=e("angular2/src/facade/lang"),l=e("angular2/src/facade/exceptions");t.internalView=n,t.internalProtoView=i;var u=function(){function e(){}return Object.defineProperty(e.prototype,"changeDetectorRef",{get:function(){return l.unimplemented()},set:function(e){l.unimplemented()},enumerable:!0,configurable:!0}),e}();t.ViewRef=u;var p=function(e){function t(t){e.call(this),this._changeDetectorRef=null,this._view=t}return s(t,e),Object.defineProperty(t.prototype,"render",{get:function(){return this._view.render},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderFragment",{get:function(){return this._view.renderFragment},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"changeDetectorRef",{get:function(){return null===this._changeDetectorRef&&(this._changeDetectorRef=this._view.changeDetector.ref),this._changeDetectorRef},enumerable:!0,configurable:!0}),t.prototype.setLocal=function(e,t){this._view.setLocal(e,t)},t}(u);t.ViewRef_=p;var d=function(){function e(){}return e}();t.ProtoViewRef=d;var f=function(e){function t(t){e.call(this),this._protoView=t}return s(t,e),t}(d);return t.ProtoViewRef_=f,o.define=a,r.exports}),System.register("angular2/src/core/render/util",["angular2/src/facade/lang"],!0,function(e,t,r){function n(e){return s.StringWrapper.replaceAllMapped(e,c,function(e){return"-"+e[1].toLowerCase()})}function i(e){return s.StringWrapper.replaceAllMapped(e,l,function(e){return e[1].toUpperCase()})}var o=System.global,a=o.define;o.define=void 0;var s=e("angular2/src/facade/lang"),c=/([A-Z])/g,l=/-([a-z])/g;return t.camelCaseToDashCase=n,t.dashCaseToCamelCase=i,o.define=a,r.exports}),System.register("angular2/src/core/linker/element_binder",["angular2/src/facade/lang","angular2/src/facade/exceptions"],!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/exceptions"),s=function(){function e(e,t,r,n,i,s){if(this.index=e,this.parent=t,this.distanceToParent=r,this.protoElementInjector=n,this.componentDirective=i,this.nestedProtoView=s,o.isBlank(e))throw new a.BaseException("null index not allowed.")}return e}();return t.ElementBinder=s,n.define=i,r.exports}),System.register("angular2/src/core/linker/element_ref",["angular2/src/facade/exceptions"],!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/exceptions"),s=function(){function e(){}return Object.defineProperty(e.prototype,"nativeElement",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderView",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),e}();t.ElementRef=s;var c=function(e){function t(t,r,n){e.call(this),this.parentView=t,this.boundElementIndex=r,this._renderer=n}return o(t,e),Object.defineProperty(t.prototype,"renderView",{get:function(){return this.parentView.render},set:function(e){a.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nativeElement",{get:function(){return this._renderer.getNativeElementSync(this)},enumerable:!0,configurable:!0}),t}(s);return t.ElementRef_=c,n.define=i,r.exports}),System.register("angular2/src/core/linker/template_ref",["angular2/src/core/linker/view_ref"],!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/core/linker/view_ref"),s=function(){function e(){}return e}();t.TemplateRef=s;var c=function(e){function t(t){e.call(this),this.elementRef=t}return o(t,e),t.prototype._getProtoView=function(){var e=this.elementRef,t=a.internalView(e.parentView);return t.proto.elementBinders[e.boundElementIndex-t.elementOffset].nestedProtoView},Object.defineProperty(t.prototype,"protoViewRef",{get:function(){return this._getProtoView().ref},enumerable:!0,configurable:!0}),t.prototype.hasLocal=function(e){return this._getProtoView().templateVariableBindings.has(e)},t}(s);return t.TemplateRef_=c,n.define=i,r.exports}),System.register("angular2/src/core/linker/view_pool",["angular2/src/core/di","angular2/src/facade/lang","angular2/src/facade/collection"],!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=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},c=e("angular2/src/core/di"),l=e("angular2/src/facade/lang"),u=e("angular2/src/facade/collection");t.APP_VIEW_POOL_CAPACITY=l.CONST_EXPR(new c.OpaqueToken("AppViewPool.viewPoolCapacity"));var p=function(){function e(e){this._pooledViewsPerProtoView=new u.Map,this._poolCapacityPerProtoView=e}return e.prototype.getView=function(e){var t=this._pooledViewsPerProtoView.get(e);return l.isPresent(t)&&t.length>0?t.pop():null},e.prototype.returnView=function(e){var t=e.proto,r=this._pooledViewsPerProtoView.get(t);l.isBlank(r)&&(r=[],this._pooledViewsPerProtoView.set(t,r));var n=r.lengtho?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=function(){function e(){}return e.prototype.onViewCreated=function(e){},e.prototype.onViewDestroyed=function(e){},e=o([s.Injectable(),a("design:paramtypes",[])],e)}();return t.AppViewListener=c,n.define=i,r.exports}),System.register("angular2/src/core/linker/view_container_ref",["angular2/src/facade/collection","angular2/src/facade/exceptions","angular2/src/facade/lang","angular2/src/core/linker/view_ref"],!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/collection"),s=e("angular2/src/facade/exceptions"),c=e("angular2/src/facade/lang"),l=e("angular2/src/core/linker/view_ref"),u=function(){ function e(){}return e.prototype.clear=function(){for(var e=this.length-1;e>=0;e--)this.remove(e)},Object.defineProperty(e.prototype,"length",{get:function(){return s.unimplemented()},enumerable:!0,configurable:!0}),e}();t.ViewContainerRef=u;var p=function(e){function t(t,r){e.call(this),this.viewManager=t,this.element=r}return o(t,e),t.prototype._getViews=function(){var e=this.element,t=l.internalView(e.parentView).viewContainers[e.boundElementIndex];return c.isPresent(t)?t.views:[]},t.prototype.get=function(e){return this._getViews()[e].ref},Object.defineProperty(t.prototype,"length",{get:function(){return this._getViews().length},enumerable:!0,configurable:!0}),t.prototype.createEmbeddedView=function(e,t){return void 0===t&&(t=-1),-1==t&&(t=this.length),this.viewManager.createEmbeddedViewInContainer(this.element,t,e)},t.prototype.createHostView=function(e,t,r){return void 0===e&&(e=null),void 0===t&&(t=-1),void 0===r&&(r=null),-1==t&&(t=this.length),this.viewManager.createHostViewInContainer(this.element,t,e,r)},t.prototype.insert=function(e,t){return void 0===t&&(t=-1),-1==t&&(t=this.length),this.viewManager.attachViewInContainer(this.element,t,e)},t.prototype.indexOf=function(e){return a.ListWrapper.indexOf(this._getViews(),l.internalView(e))},t.prototype.remove=function(e){void 0===e&&(e=-1),-1==e&&(e=this.length-1),this.viewManager.destroyViewInContainer(this.element,e)},t.prototype.detach=function(e){return void 0===e&&(e=-1),-1==e&&(e=this.length-1),this.viewManager.detachViewInContainer(this.element,e)},t}(u);return t.ViewContainerRef_=p,n.define=i,r.exports}),System.register("angular2/src/core/linker/interfaces",[],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0,function(e){e[e.OnInit=0]="OnInit",e[e.OnDestroy=1]="OnDestroy",e[e.DoCheck=2]="DoCheck",e[e.OnChanges=3]="OnChanges",e[e.AfterContentInit=4]="AfterContentInit",e[e.AfterContentChecked=5]="AfterContentChecked",e[e.AfterViewInit=6]="AfterViewInit",e[e.AfterViewChecked=7]="AfterViewChecked"}(t.LifecycleHooks||(t.LifecycleHooks={}));var o=t.LifecycleHooks;return t.LIFECYCLE_HOOKS_VALUES=[o.OnInit,o.OnDestroy,o.DoCheck,o.OnChanges,o.AfterContentInit,o.AfterContentChecked,o.AfterViewInit,o.AfterViewChecked],n.define=i,r.exports}),System.register("angular2/src/core/linker/query_list",["angular2/src/facade/collection","angular2/src/facade/lang","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/collection"),a=e("angular2/src/facade/lang"),s=e("angular2/src/facade/async"),c=function(){function e(){this._results=[],this._emitter=new s.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 o.ListWrapper.first(this._results)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"last",{get:function(){return o.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 o.ListWrapper.clone(this._results)},e.prototype[a.getSymbolIterator()]=function(){return this._results[a.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}();return t.QueryList=c,n.define=i,r.exports}),System.register("angular2/src/core/linker/event_config",[],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0,t.EVENT_TARGET_SEPARATOR=":";var o=function(){function e(e,t,r){this.fieldName=e,this.eventName=t,this.isLongForm=r}return e.parse=function(r){var n=r,i=r,o=!1,a=r.indexOf(t.EVENT_TARGET_SEPARATOR);return a>-1&&(n=r.substring(0,a).trim(),i=r.substring(a+1).trim(),o=!0),new e(n,i,o)},e.prototype.getFullName=function(){return this.isLongForm?""+this.fieldName+t.EVENT_TARGET_SEPARATOR+this.eventName:this.eventName},e}();return t.EventConfig=o,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)}}throw new u.BaseException("No Directive annotation found on "+l.stringify(e))},e.prototype._mergeWithPropertyMetadata=function(e,t){var r=[],n=[],i={},o={};return p.StringMapWrapper.forEach(t,function(e,t){e.forEach(function(e){if(e instanceof d.InputMetadata&&(l.isPresent(e.bindingPropertyName)?r.push(t+": "+e.bindingPropertyName):r.push(t)),e instanceof d.OutputMetadata&&(l.isPresent(e.bindingPropertyName)?n.push(t+": "+e.bindingPropertyName):n.push(t)),e instanceof d.HostBindingMetadata&&(l.isPresent(e.hostPropertyName)?i["["+e.hostPropertyName+"]"]=t:i["["+t+"]"]=t),e instanceof d.HostListenerMetadata){var a=l.isPresent(e.args)?e.args.join(", "):"";i["("+e.eventName+")"]=t+"("+a+")"}e instanceof d.ContentChildrenMetadata&&(o[t]=e),e instanceof d.ViewChildrenMetadata&&(o[t]=e),e instanceof d.ContentChildMetadata&&(o[t]=e),e instanceof d.ViewChildMetadata&&(o[t]=e)})}),this._merge(e,r,n,i,o)},e.prototype._merge=function(e,t,r,n,i){var o=l.isPresent(e.inputs)?p.ListWrapper.concat(e.inputs,t):t,a=l.isPresent(e.outputs)?p.ListWrapper.concat(e.outputs,r):r,s=l.isPresent(e.host)?p.StringMapWrapper.merge(e.host,n):n,c=l.isPresent(e.queries)?p.StringMapWrapper.merge(e.queries,i):i;return e instanceof d.ComponentMetadata?new d.ComponentMetadata({selector:e.selector,inputs:o,outputs:a,host:s,exportAs:e.exportAs,moduleId:e.moduleId,queries:c,changeDetection:e.changeDetection,providers:e.providers,viewProviders:e.viewProviders}):new d.DirectiveMetadata({selector:e.selector,inputs:o,outputs:a,host:s,exportAs:e.exportAs,queries:c,providers:e.providers})},e=a([c.Injectable(),s("design:paramtypes",[])],e)}();return t.DirectiveResolver=h,i.define=o,r.exports}),System.register("angular2/src/core/linker/view_resolver",["angular2/src/core/di","angular2/src/core/metadata/view","angular2/src/core/metadata/directives","angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/collection","angular2/src/core/reflection/reflection"],!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/core/metadata/view"),l=e("angular2/src/core/metadata/directives"),u=e("angular2/src/facade/lang"),p=e("angular2/src/facade/exceptions"),d=e("angular2/src/facade/collection"),f=e("angular2/src/core/reflection/reflection"),h=function(){function e(){this._cache=new d.Map}return e.prototype.resolve=function(e){var t=this._cache.get(e);return u.isBlank(t)&&(t=this._resolve(e),this._cache.set(e,t)),t},e.prototype._resolve=function(e){var t,r;if(f.reflector.annotations(e).forEach(function(e){e instanceof c.ViewMetadata&&(r=e),e instanceof l.ComponentMetadata&&(t=e)}),!u.isPresent(t)){if(u.isBlank(r))throw new p.BaseException("No View decorator found on component '"+u.stringify(e)+"'");return r}if(u.isBlank(t.template)&&u.isBlank(t.templateUrl)&&u.isBlank(r))throw new p.BaseException("Component '"+u.stringify(e)+"' must have either 'template', 'templateUrl', or '@View' set.");if(u.isPresent(t.template)&&u.isPresent(r))this._throwMixingViewAndComponent("template",e);else if(u.isPresent(t.templateUrl)&&u.isPresent(r))this._throwMixingViewAndComponent("templateUrl",e);else if(u.isPresent(t.directives)&&u.isPresent(r))this._throwMixingViewAndComponent("directives",e);else if(u.isPresent(t.pipes)&&u.isPresent(r))this._throwMixingViewAndComponent("pipes",e);else if(u.isPresent(t.encapsulation)&&u.isPresent(r))this._throwMixingViewAndComponent("encapsulation",e);else if(u.isPresent(t.styles)&&u.isPresent(r))this._throwMixingViewAndComponent("styles",e);else{if(!u.isPresent(t.styleUrls)||!u.isPresent(r))return u.isPresent(r)?r:new c.ViewMetadata({templateUrl:t.templateUrl,template:t.template,directives:t.directives,pipes:t.pipes,encapsulation:t.encapsulation,styles:t.styles,styleUrls:t.styleUrls});this._throwMixingViewAndComponent("styleUrls",e)}return null},e.prototype._throwMixingViewAndComponent=function(e,t){throw new p.BaseException("Component '"+u.stringify(t)+"' cannot have both '"+e+"' and '@View' set at the same time\"")},e=o([s.Injectable(),a("design:paramtypes",[])],e)}();return t.ViewResolver=h,n.define=i,r.exports}),System.register("angular2/src/core/linker/pipe_resolver",["angular2/src/core/di","angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/core/metadata","angular2/src/core/reflection/reflection"],!0,function(e,t,r){function n(e){return e instanceof p.PipeMetadata}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/core/metadata"),d=e("angular2/src/core/reflection/reflection"),f=function(){function e(){}return e.prototype.resolve=function(e){var t=d.reflector.annotations(c.resolveForwardRef(e));if(l.isPresent(t)){var r=t.find(n);if(l.isPresent(r))return r}throw new u.BaseException("No Pipe decorator found on "+l.stringify(e))},e=a([c.Injectable(),s("design:paramtypes",[])],e)}();return t.PipeResolver=f,i.define=o,r.exports}),System.register("angular2/src/core/platform_directives_and_pipes",["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.PLATFORM_DIRECTIVES=a.CONST_EXPR(new o.OpaqueToken("Platform Directives")),t.PLATFORM_PIPES=a.CONST_EXPR(new o.OpaqueToken("Platform Pipes")),n.define=i,r.exports}),System.register("angular2/src/core/linker/template_commands",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/core/render/api","angular2/src/core/metadata","angular2/src/core/metadata"],!0,function(e,t,r){function n(e,t,r){void 0===r&&(r=null);for(var n=0;no?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},l=e("angular2/src/facade/lang"),u=e("angular2/src/facade/exceptions"),p=e("angular2/src/core/render/api"),d=(e("angular2/src/core/metadata"),e("angular2/src/core/metadata"));t.ViewEncapsulation=d.ViewEncapsulation;var f=function(){function e(e){this.template=e}return e=s([l.CONST(),c("design:paramtypes",[h])],e)}();t.CompiledHostTemplate=f;var h=function(){function e(e,t,r,n){this.id=e,this.changeDetectorFactory=t,this.commands=r,this.styles=n}return e=s([l.CONST(),c("design:paramtypes",[String,Function,Array,Array])],e)}();t.CompiledComponentTemplate=h;var g=l.CONST_EXPR([]),m=function(){function e(e,t,r){this.value=e,this.isBound=t,this.ngContentIndex=r}return e.prototype.visit=function(e,t){return e.visitText(this,t)},e=s([l.CONST(),c("design:paramtypes",[String,Boolean,Number])],e)}();t.TextCmd=m;var v=function(){function e(e,t){this.index=e,this.ngContentIndex=t,this.isBound=!1}return e.prototype.visit=function(e,t){return e.visitNgContent(this,t)},e=s([l.CONST(),c("design:paramtypes",[Number,Number])],e)}();t.NgContentCmd=v;var y=function(e){function t(){e.apply(this,arguments)}return a(t,e),Object.defineProperty(t.prototype,"variableNameAndValues",{get:function(){return u.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"eventTargetAndNames",{get:function(){return u.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"directives",{get:function(){return u.unimplemented()},enumerable:!0,configurable:!0}),t}(p.RenderBeginElementCmd);t.IBeginElementCmd=y;var _=function(){function e(e,t,r,n,i,o,a){this.name=e,this.attrNameAndValues=t,this.eventTargetAndNames=r,this.variableNameAndValues=n,this.directives=i,this.isBound=o,this.ngContentIndex=a}return e.prototype.visit=function(e,t){return e.visitBeginElement(this,t)},e=s([l.CONST(),c("design:paramtypes",[String,Array,Array,Array,Array,Boolean,Number])],e)}();t.BeginElementCmd=_;var b=function(){function e(){}return e.prototype.visit=function(e,t){return e.visitEndElement(t)},e=s([l.CONST(),c("design:paramtypes",[])],e)}();t.EndElementCmd=b;var C=function(){function e(e,t,r,n,i,o,a,s){this.name=e,this.attrNameAndValues=t,this.eventTargetAndNames=r,this.variableNameAndValues=n,this.directives=i,this.encapsulation=o,this.ngContentIndex=a,this.templateGetter=s,this.isBound=!0}return Object.defineProperty(e.prototype,"templateId",{get:function(){return this.templateGetter().id},enumerable:!0,configurable:!0}),e.prototype.visit=function(e,t){return e.visitBeginComponent(this,t)},e=s([l.CONST(),c("design:paramtypes",[String,Array,Array,Array,Array,Number,Number,Function])],e)}();t.BeginComponentCmd=C;var w=function(){function e(){}return e.prototype.visit=function(e,t){return e.visitEndComponent(t)},e=s([l.CONST(),c("design:paramtypes",[])],e)}();t.EndComponentCmd=w;var P=function(){function e(e,t,r,n,i,o,a){this.attrNameAndValues=e,this.variableNameAndValues=t,this.directives=r,this.isMerged=n,this.ngContentIndex=i,this.changeDetectorFactory=o,this.children=a,this.isBound=!0,this.name=null,this.eventTargetAndNames=g}return e.prototype.visit=function(e,t){return e.visitEmbeddedTemplate(this,t)},e=s([l.CONST(),c("design:paramtypes",[Array,Array,Array,Boolean,Number,Function,Array])],e)}();return t.EmbeddedTemplateCmd=P,t.visitAllCommands=n,i.define=o,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.Renderer=o.Renderer,t.RenderViewRef=o.RenderViewRef,t.RenderProtoViewRef=o.RenderProtoViewRef,t.RenderFragmentRef=o.RenderFragmentRef,t.RenderViewWithFragments=o.RenderViewWithFragments,t.RenderTemplateCmd=o.RenderTemplateCmd,t.RenderTextCmd=o.RenderTextCmd,t.RenderNgContentCmd=o.RenderNgContentCmd,t.RenderBeginElementCmd=o.RenderBeginElementCmd,t.RenderBeginComponentCmd=o.RenderBeginComponentCmd,t.RenderEmbeddedTemplateCmd=o.RenderEmbeddedTemplateCmd,t.RenderBeginCmd=o.RenderBeginCmd,t.RenderComponentTemplate=o.RenderComponentTemplate,n.define=i,r.exports}),System.register("angular2/src/core/linker",["angular2/src/core/linker/directive_resolver","angular2/src/core/linker/view_resolver","angular2/src/core/linker/compiler","angular2/src/core/linker/view_manager","angular2/src/core/linker/query_list","angular2/src/core/linker/dynamic_component_loader","angular2/src/core/linker/element_ref","angular2/src/core/linker/template_ref","angular2/src/core/linker/view_ref","angular2/src/core/linker/view_container_ref","angular2/src/core/linker/dynamic_component_loader"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/core/linker/directive_resolver");t.DirectiveResolver=o.DirectiveResolver;var a=e("angular2/src/core/linker/view_resolver");t.ViewResolver=a.ViewResolver;var s=e("angular2/src/core/linker/compiler");t.Compiler=s.Compiler;var c=e("angular2/src/core/linker/view_manager");t.AppViewManager=c.AppViewManager;var l=e("angular2/src/core/linker/query_list");t.QueryList=l.QueryList;var u=e("angular2/src/core/linker/dynamic_component_loader");t.DynamicComponentLoader=u.DynamicComponentLoader;var p=e("angular2/src/core/linker/element_ref");t.ElementRef=p.ElementRef;var d=e("angular2/src/core/linker/template_ref");t.TemplateRef=d.TemplateRef;var f=e("angular2/src/core/linker/view_ref");t.ViewRef=f.ViewRef,t.ProtoViewRef=f.ProtoViewRef;var h=e("angular2/src/core/linker/view_container_ref");t.ViewContainerRef=h.ViewContainerRef;var g=e("angular2/src/core/linker/dynamic_component_loader");return t.ComponentRef=g.ComponentRef,n.define=i,r.exports}),System.register("angular2/src/core/debug/debug_element",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/core/linker/view","angular2/src/core/linker/view_ref"],!0,function(e,t,r){function n(e){return new f(p.internalView(e.parentView),e.boundElementIndex)}function i(e){return e.map(function(e){return e.nativeElement})}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=e("angular2/src/facade/lang"),l=e("angular2/src/facade/exceptions"),u=e("angular2/src/core/linker/view"),p=e("angular2/src/core/linker/view_ref"),d=function(){function e(){}return Object.defineProperty(e.prototype,"componentInstance",{get:function(){return l.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nativeElement",{get:function(){return l.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"elementRef",{get:function(){return l.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return l.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentViewChildren",{get:function(){return l.unimplemented()},enumerable:!0,configurable:!0}),e.prototype.query=function(e,t){void 0===t&&(t=h.all);var r=this.queryAll(e,t);return r.length>0?r[0]:null},e.prototype.queryAll=function(e,t){void 0===t&&(t=h.all);var r=t(this);return r.filter(e)},e}();t.DebugElement=d;var f=function(e){function t(t,r){e.call(this),this._parentView=t,this._boundElementIndex=r,this._elementInjector=this._parentView.elementInjectors[this._boundElementIndex]}return s(t,e),Object.defineProperty(t.prototype,"componentInstance",{get:function(){return c.isPresent(this._elementInjector)?this._elementInjector.getComponent():null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nativeElement",{get:function(){return this.elementRef.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"elementRef",{get:function(){return this._parentView.elementRefs[this._boundElementIndex]},enumerable:!0,configurable:!0}),t.prototype.getDirectiveInstance=function(e){return this._elementInjector.getDirectiveAtIndex(e)},Object.defineProperty(t.prototype,"children",{get:function(){return this._getChildElements(this._parentView,this._boundElementIndex)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentViewChildren",{get:function(){var e=this._parentView.getNestedView(this._boundElementIndex);return c.isPresent(e)&&e.proto.type===u.ViewType.COMPONENT?this._getChildElements(e,null):[]},enumerable:!0,configurable:!0}),t.prototype.triggerEventHandler=function(e,t){this._parentView.triggerEventHandlers(e,t,this._boundElementIndex)},t.prototype.hasDirective=function(e){return c.isPresent(this._elementInjector)?this._elementInjector.hasDirective(e):!1},t.prototype.inject=function(e){return c.isPresent(this._elementInjector)?this._elementInjector.get(e):null},t.prototype.getLocal=function(e){return this._parentView.locals.get(e)},t.prototype._getChildElements=function(e,r){var n=this,i=[],o=null;c.isPresent(r)&&(o=e.proto.elementBinders[r-e.elementOffset]);for(var a=0;ao?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=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},c=e("angular2/src/facade/lang"),l=e("angular2/src/facade/exceptions"),u=e("angular2/src/core/di"),p=e("angular2/src/core/zone/ng_zone"),d=e("angular2/src/facade/collection");t.EVENT_MANAGER_PLUGINS=c.CONST_EXPR(new u.OpaqueToken("EventManagerPlugins"));var f=function(){function e(e,t){var r=this;this._zone=t,e.forEach(function(e){return e.manager=r}),this._plugins=d.ListWrapper.reversed(e)}return e.prototype.addEventListener=function(e,t,r){var n=this._findPluginFor(t);n.addEventListener(e,t,r)},e.prototype.addGlobalEventListener=function(e,t,r){var n=this._findPluginFor(t);return n.addGlobalEventListener(e,t,r)},e.prototype.getZone=function(){return this._zone},e.prototype._findPluginFor=function(e){for(var t=this._plugins,r=0;ro?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/core"),u=e("angular2/src/platform/dom/events/event_manager"),p=function(e){ function t(){e.apply(this,arguments)}return o(t,e),t.prototype.supports=function(e){return!0},t.prototype.addEventListener=function(e,t,r){var n=this.manager.getZone(),i=function(e){return n.run(function(){return r(e)})};this.manager.getZone().runOutsideAngular(function(){c.DOM.on(e,t,i)})},t.prototype.addGlobalEventListener=function(e,t,r){var n=c.DOM.getGlobalEventTarget(e),i=this.manager.getZone(),o=function(e){return i.run(function(){return r(e)})};return this.manager.getZone().runOutsideAngular(function(){return c.DOM.onAndCancel(n,t,o)})},t=a([l.Injectable(),s("design:paramtypes",[])],t)}(u.EventManagerPlugin);return t.DomEventsPlugin=p,n.define=i,r.exports}),System.register("angular2/src/platform/dom/debug/by",["angular2/src/facade/lang","angular2/src/platform/dom/dom_adapter"],!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/platform/dom/dom_adapter"),s=function(){function e(){}return e.all=function(){return function(e){return!0}},e.css=function(e){return function(t){return o.isPresent(t.nativeElement)?a.DOM.elementMatches(t.nativeElement,e):!1}},e.directive=function(e){return function(t){return t.hasDirective(e)}},e}();return t.By=s,n.define=i,r.exports}),System.register("angular2/src/platform/dom/debug/debug_element_view_listener",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/core/di","angular2/src/core/linker/view_listener","angular2/src/platform/dom/dom_adapter","angular2/src/core/render/api","angular2/src/core/debug/debug_element"],!0,function(e,t,r){function n(e,t){u.isPresent(e)&&h.DOM.isElementNode(e)&&h.DOM.setData(e,v,t.join(_))}function i(e){var t=h.DOM.getData(e,v);return u.isPresent(t)?t.split(_).map(function(e){return u.NumberWrapper.parseInt(e,10)}):null}function o(e){var t=i(e);if(u.isPresent(t)){var r=C.get(t[0]);if(u.isPresent(r))return new m.DebugElement_(r,t[1])}return null}var a=System.global,s=a.define;a.define=void 0;var 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/core/di"),f=e("angular2/src/core/linker/view_listener"),h=e("angular2/src/platform/dom/dom_adapter"),g=e("angular2/src/core/render/api"),m=e("angular2/src/core/debug/debug_element"),v="ngid",y="ng.probe",_="#",b=new p.Map,C=new p.Map,w=0;t.inspectNativeElement=o;var P=function(){function e(e){this._renderer=e,h.DOM.setGlobalVar(y,o)}return e.prototype.onViewCreated=function(e){var t=w++;C.set(t,e),b.set(e,t);for(var r=0;rt;t++)l.DOM.addClass(this.element,e[t])},e.prototype.removeClasses=function(e){for(var t=0,r=e.length;r>t;t++)l.DOM.removeClass(this.element,e[t])},e.prototype.addEvents=function(){var e=this;this.totalTime>0?this.eventClearFunctions.push(l.DOM.onAndCancel(this.element,l.DOM.getTransitionEnd(),function(t){return e.handleAnimationEvent(t)})):this.handleAnimationCompleted()},e.prototype.handleAnimationEvent=function(e){var t=a.Math.round(1e3*e.elapsedTime);this.browserDetails.elapsedTimeIncludesDelay||(t+=this.computedDelay),e.stopPropagation(),t>=this.totalTime&&this.handleAnimationCompleted()},e.prototype.handleAnimationCompleted=function(){this.removeClasses(this.data.animationClasses),this.callbacks.forEach(function(e){return e()}),this.callbacks=[],this.eventClearFunctions.forEach(function(e){return e()}),this.eventClearFunctions=[],this.completed=!0},e.prototype.onComplete=function(e){return this.completed?e():this.callbacks.push(e),this},e.prototype.parseDurationString=function(e){var t=0;if(null==e||e.length<2)return t;if("ms"==e.substring(e.length-2)){var r=o.NumberWrapper.parseInt(this.stripLetters(e),10);r>t&&(t=r)}else if("s"==e.substring(e.length-1)){var n=1e3*o.NumberWrapper.parseFloat(this.stripLetters(e)),r=a.Math.floor(n);r>t&&(t=r)}return t},e.prototype.stripLetters=function(e){return o.StringWrapper.replaceAll(e,o.RegExpWrapper.create("[^0-9]+$",""),"")},e}();return t.Animation=u,n.define=i,r.exports}),System.register("angular2/src/platform/dom/shared_styles_host",["angular2/src/platform/dom/dom_adapter","angular2/src/core/di","angular2/src/facade/collection","angular2/src/platform/dom/dom_tokens"],!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=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},l=e("angular2/src/platform/dom/dom_adapter"),u=e("angular2/src/core/di"),p=e("angular2/src/facade/collection"),d=e("angular2/src/platform/dom/dom_tokens"),f=function(){function e(){this._styles=[],this._stylesSet=new Set}return e.prototype.addStyles=function(e){var t=this,r=[];e.forEach(function(e){p.SetWrapper.has(t._stylesSet,e)||(t._stylesSet.add(e),t._styles.push(e),r.push(e))}),this.onStylesAdded(r)},e.prototype.onStylesAdded=function(e){},e.prototype.getAllStyles=function(){return this._styles},e=a([u.Injectable(),s("design:paramtypes",[])],e)}();t.SharedStylesHost=f;var h=function(e){function t(t){e.call(this),this._hostNodes=new Set,this._hostNodes.add(t.head)}return o(t,e),t.prototype._addStylesToHost=function(e,t){for(var r=0;re},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;nt?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.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/constants","angular2/src/core/profile/profile","angular2/src/core/change_detection/observable_facade"],!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/constants"),p=e("angular2/src/core/profile/profile"),d=e("angular2/src/core/change_detection/observable_facade"),f=p.wtfCreateScope("ChangeDetector#check(ascii id, bool throwOnChange)"),h=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}(),g=function(){function e(e,t,r,n,i,o){this.id=e,this.dispatcher=t,this.numberOfPropertyProtoRecords=r,this.bindingTargets=n,this.directiveIndices=i,this.strategy=o,this.contentChildren=[],this.viewChildren=[],this.state=u.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){var n=this.handleEventInternal(e,t,r);return this.markPathToRootAsCheckOnce(),n},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.mode!==u.ChangeDetectionStrategy.Detached&&this.mode!==u.ChangeDetectionStrategy.Checked&&this.state!==u.ChangeDetectorState.Errored){var t=f(this.id,e);this.detectChangesInRecords(e),this._detectChangesContentChildren(e),e||this.afterContentLifecycleCallbacks(),this._detectChangesInViewChildren(e),e||this.afterViewLifecycleCallbacks(),this.mode===u.ChangeDetectionStrategy.CheckOnce&&(this.mode=u.ChangeDetectionStrategy.Checked),this.state=u.ChangeDetectorState.CheckedBefore,p.wtfLeave(t)}},e.prototype.detectChangesInRecords=function(e){this.hydrated()||this.throwDehydratedError();try{this.detectChangesInRecordsInternal(e)}catch(t){t instanceof l.ExpressionChangedAfterItHasBeenCheckedException||(this.state=u.ChangeDetectorState.Errored),this._throwError(t,t.stack)}},e.prototype.detectChangesInRecordsInternal=function(e){},e.prototype.hydrate=function(e,t,r,n){this.mode=s.ChangeDetectionUtil.changeDetectionMode(this.strategy),this.context=e,this.strategy===u.ChangeDetectionStrategy.OnPushObserve&&this.observeComponent(e),this.locals=t,this.pipes=n,this.hydrateDirectives(r),this.state=u.ChangeDetectorState.NeverChecked},e.prototype.hydrateDirectives=function(e){},e.prototype.dehydrate=function(){this.dehydrateDirectives(!0),this.strategy===u.ChangeDetectionStrategy.OnPushObserve&&this._unsubsribeFromObservables(),this.context=null,this.locals=null,this.pipes=null},e.prototype.dehydrateDirectives=function(e){},e.prototype.hydrated=function(){return o.isPresent(this.context)},e.prototype.afterContentLifecycleCallbacks=function(){this.dispatcher.notifyAfterContentChecked(),this.afterContentLifecycleCallbacksInternal()},e.prototype.afterContentLifecycleCallbacksInternal=function(){},e.prototype.afterViewLifecycleCallbacks=function(){this.dispatcher.notifyAfterViewChecked(),this.afterViewLifecycleCallbacksInternal()},e.prototype.afterViewLifecycleCallbacksInternal=function(){},e.prototype._detectChangesContentChildren=function(e){for(var t=this.contentChildren,r=0;r=0;--n){var i=e[n];i.callAfterContentInit&&t.push("if("+this._names.getStateName()+" "+r+" "+this._changeDetectorStateName+".NeverChecked) "+this._names.getDirectiveName(i.directiveIndex)+".ngAfterContentInit();"),i.callAfterContentChecked&&t.push(this._names.getDirectiveName(i.directiveIndex)+".ngAfterContentChecked();")}return t},e.prototype.genViewLifecycleCallbacks=function(e){for(var t=[],r=o.IS_DART?"==":"===",n=e.length-1;n>=0;--n){var i=e[n];i.callAfterViewInit&&t.push("if("+this._names.getStateName()+" "+r+" "+this._changeDetectorStateName+".NeverChecked) "+this._names.getDirectiveName(i.directiveIndex)+".ngAfterViewInit();"),i.callAfterViewChecked&&t.push(this._names.getDirectiveName(i.directiveIndex)+".ngAfterViewChecked();")}return t},e}();return t.CodegenLogicUtil=u,n.define=i,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"],!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/exceptions"),s=e("angular2/src/facade/collection"),c=e("angular2/src/core/change_detection/pipes"),l=function(){function e(e){this.config=e,this.config=e}return e.fromProviders=function(t){var r={};return t.forEach(function(e){return r[e.name]=e}),new e(r)},e.prototype.get=function(e){var t=this.config[e];if(o.isBlank(t))throw new a.BaseException("Cannot find pipe '"+e+"'.");return t},e}();t.ProtoPipes=l;var u=function(){function e(e,t){this.proto=e,this.injector=t,this._config={}}return e.prototype.get=function(e){var t=s.StringMapWrapper.get(this._config,e);if(o.isPresent(t))return t;var r=this.proto.get(e),n=this.injector.instantiateResolved(r),i=new c.SelectedPipe(n,r.pure);return r.pure&&s.StringMapWrapper.set(this._config,e,i),i},e}();return t.Pipes=u,n.define=i,r.exports}),System.register("angular2/src/core/linker/view",["angular2/src/facade/collection","angular2/src/core/change_detection/change_detection","angular2/src/core/change_detection/interfaces","angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/core/linker/view_ref","angular2/src/core/render/util","angular2/src/core/linker/view_ref","angular2/src/core/change_detection/interfaces"],!0,function(e,t,r){function n(e){for(var t={},r=e;u.isPresent(r);)t=s.StringMapWrapper.merge(t,s.MapWrapper.toStringMap(r.current)),r=r.parent;return t}var i=System.global,o=i.define;i.define=void 0;var a=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)},s=e("angular2/src/facade/collection"),c=e("angular2/src/core/change_detection/change_detection"),l=e("angular2/src/core/change_detection/interfaces"),u=e("angular2/src/facade/lang"),p=e("angular2/src/facade/exceptions"),d=e("angular2/src/core/linker/view_ref"),f=e("angular2/src/core/render/util"),h=e("angular2/src/core/linker/view_ref"),g=e("angular2/src/core/change_detection/interfaces");t.DebugContext=g.DebugContext;var m="ng-reflect-";!function(e){e[e.HOST=0]="HOST",e[e.COMPONENT=1]="COMPONENT",e[e.EMBEDDED=2]="EMBEDDED"}(t.ViewType||(t.ViewType={}));var v=(t.ViewType,function(){function e(){this.views=[]}return e}());t.AppViewContainer=v;var y=function(){function e(e,t,r,n,i,o,a,l,u){this.renderer=e,this.proto=t,this.viewOffset=r,this.elementOffset=n,this.textOffset=i,this.render=a,this.renderFragment=l,this.containerElementInjector=u,this.views=null,this.elementInjectors=null,this.viewContainers=null,this.preBuiltObjects=null,this.changeDetector=null,this.context=null,this.ref=new h.ViewRef_(this),this.locals=new c.Locals(null,s.MapWrapper.clone(o))}return e.prototype.init=function(e,t,r,n,i,o,a){this.changeDetector=e,this.elementInjectors=t,this.rootElementInjectors=r,this.preBuiltObjects=n,this.views=i,this.elementRefs=o,this.viewContainers=a},e.prototype.setLocal=function(e,t){if(!this.hydrated())throw new p.BaseException("Cannot set locals on dehydrated view.");if(this.proto.templateVariableBindings.has(e)){var r=this.proto.templateVariableBindings.get(e);this.locals.set(r,t)}},e.prototype.hydrated=function(){return u.isPresent(this.context)},e.prototype.triggerEventHandlers=function(e,t,r){var n=new s.Map;n.set("$event",t),this.dispatchEvent(r,e,n)},e.prototype.notifyOnBinding=function(e,t){if(e.isTextNode())this.renderer.setText(this.render,e.elementIndex+this.textOffset,t);else{var r=this.elementRefs[this.elementOffset+e.elementIndex];if(e.isElementProperty())this.renderer.setElementProperty(r,e.name,t);else if(e.isElementAttribute())this.renderer.setElementAttribute(r,e.name,u.isPresent(t)?""+t:null);else if(e.isElementClass())this.renderer.setElementClass(r,e.name,t);else{if(!e.isElementStyle())throw new p.BaseException("Unsupported directive record");var n=u.isPresent(e.unit)?e.unit:"";this.renderer.setElementStyle(r,e.name,u.isPresent(t)?""+t+n:null)}}},e.prototype.logBindingUpdate=function(e,t){if(e.isDirective()||e.isElementProperty()){var r=this.elementRefs[this.elementOffset+e.elementIndex];this.renderer.setBindingDebugInfo(r,""+m+f.camelCaseToDashCase(e.name),""+t)}},e.prototype.notifyAfterContentChecked=function(){for(var e=this.proto.elementBinders.length,t=this.elementInjectors,r=e-1;r>=0;r--)u.isPresent(t[r+this.elementOffset])&&t[r+this.elementOffset].ngAfterContentChecked()},e.prototype.notifyAfterViewChecked=function(){for(var e=this.proto.elementBinders.length,t=this.elementInjectors,r=e-1;r>=0;r--)u.isPresent(t[r+this.elementOffset])&&t[r+this.elementOffset].ngAfterViewChecked()},e.prototype.getDirectiveFor=function(e){var t=this.elementInjectors[this.elementOffset+e.elementIndex];return t.getDirectiveAtIndex(e.directiveIndex)},e.prototype.getNestedView=function(e){var t=this.elementInjectors[e];return u.isPresent(t)?t.getNestedView():null},e.prototype.getContainerElement=function(){return u.isPresent(this.containerElementInjector)?this.containerElementInjector.getElementRef():null},e.prototype.getDebugContext=function(e,t){try{var r=this.elementOffset+e,i=ro?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/collection"),l=e("angular2/src/core/linker/element_injector"),u=e("angular2/src/facade/lang"),p=e("angular2/src/core/linker/view"),d=e("angular2/src/core/linker/element_ref"),f=e("angular2/src/core/linker/template_ref"),h=e("angular2/src/core/pipes/pipes"),g=function(){function e(){}return e.prototype.getComponentInstance=function(e,t){var r=e.elementInjectors[t];return r.getComponent()},e.prototype.createView=function(e,t,r,n){for(var i=t.fragmentRefs,o=t.viewRef,a=e.mergeInfo.elementCount,s=e.mergeInfo.viewCount,h=c.ListWrapper.createFixedSize(a),g=c.ListWrapper.createFixedSize(a),m=c.ListWrapper.createFixedSize(a),v=c.ListWrapper.createFixedSize(a),y=c.ListWrapper.createFixedSize(s),_=0,b=0,C=0,w=c.ListWrapper.createFixedSize(s),P=0;s>P;P++){var E=w[P],S=u.isPresent(E)?v[E]:null,R=u.isPresent(S)?m[E].view:null,x=u.isPresent(E)?R.proto.elementBinders[E-R.elementOffset].nestedProtoView:e,O=null;(0===P||x.type===p.ViewType.EMBEDDED)&&(O=i[C++]);var D=new p.AppView(n,x,P,_,b,x.protoLocals,o,O,S);y[P]=D,u.isPresent(E)&&(m[E].nestedView=D);for(var T=[],A=P+1,I=0;I=0;l--)u.isPresent(s.parent)&&o.rootElementInjectors[l].link(s.parent);s.traverseAndSetQueriesAsDirty()},e.prototype.detachViewInContainer=function(e,t,r){var n=e.viewContainers[t],i=n.views[r];e.elementInjectors[t].traverseAndSetQueriesAsDirty(),i.changeDetector.remove(),c.ListWrapper.removeAt(n.views,r);for(var o=0;o=o;){var s=e.views[o],c=s.proto;if(s!==e&&s.proto.type===p.ViewType.EMBEDDED)o+=s.proto.mergeInfo.viewCount;else{s!==e&&(t=null,i=null,r=s.containerElementInjector,n=r.getComponent()),s.context=n,s.locals.parent=i;for(var l=c.elementBinders,d=0;d=r;r++){var n=e.views[r];if(n.hydrated()){u.isPresent(n.locals)&&n.locals.clearValues(),n.context=null,n.changeDetector.dehydrate();for(var i=n.proto.elementBinders,o=0;oi.length){var u,d=h.ListWrapper.createFixedSize(l);for(u=0;uo?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},_=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},b=e("angular2/src/facade/lang"),C=e("angular2/src/facade/exceptions"),w=e("angular2/src/facade/collection"),P=e("angular2/src/core/reflection/reflection"),E=e("angular2/src/core/di/key"),S=e("angular2/src/core/di/metadata"),R=e("angular2/src/core/di/exceptions"),x=e("angular2/src/core/di/forward_ref"),O=function(){function e(e,t,r,n,i){this.key=e,this.optional=t,this.lowerBoundVisibility=r,this.upperBoundVisibility=n,this.properties=i}return e.fromKey=function(t){return new e(t,!1,null,null,[])},e}();t.Dependency=O;var D=b.CONST_EXPR([]),T=function(){function e(e,t){var r=t.useClass,n=t.useValue,i=t.useExisting,o=t.useFactory,a=t.deps,s=t.multi;this.token=e,this.useClass=r,this.useValue=n,this.useExisting=i,this.useFactory=o,this.dependencies=a,this._multi=s}return Object.defineProperty(e.prototype,"multi",{get:function(){return b.normalizeBool(this._multi)},enumerable:!0,configurable:!0}),e=y([b.CONST(),_("design:paramtypes",[Object,Object])],e)}();t.Provider=T;var A=function(e){function t(t,r){var n=r.toClass,i=r.toValue,o=r.toAlias,a=r.toFactory,s=r.deps,c=r.multi;e.call(this,t,{useClass:n,useValue:i,useExisting:o,useFactory:a,deps:s,multi:c})}return v(t,e),Object.defineProperty(t.prototype,"toClass",{get:function(){return this.useClass},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"toAlias",{get:function(){return this.useExisting},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"toFactory",{get:function(){return this.useFactory},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"toValue",{get:function(){return this.useValue},enumerable:!0,configurable:!0}),t=y([b.CONST(),_("design:paramtypes",[Object,Object])],t)}(T);t.Binding=A;var I=function(){function e(e,t,r){this.key=e,this.resolvedFactories=t,this.multiProvider=r}return Object.defineProperty(e.prototype,"resolvedFactory",{get:function(){return this.resolvedFactories[0]},enumerable:!0,configurable:!0}),e}();t.ResolvedProvider_=I;var k=function(){function e(e,t){this.factory=e,this.dependencies=t}return e}();t.ResolvedFactory=k,t.bind=n,t.provide=i;var N=function(){function e(e){this.token=e}return e.prototype.toClass=function(e){if(!b.isType(e))throw new C.BaseException('Trying to create a class provider but "'+b.stringify(e)+'" is not a class!');return new T(this.token,{useClass:e})},e.prototype.toValue=function(e){return new T(this.token,{useValue:e})},e.prototype.toAlias=function(e){if(b.isBlank(e))throw new C.BaseException("Can not alias "+b.stringify(this.token)+" to a blank value!");return new T(this.token,{useExisting:e})},e.prototype.toFactory=function(e,t){if(!b.isFunction(e))throw new C.BaseException('Trying to create a factory provider but "'+b.stringify(e)+'" is not a function!');return new T(this.token,{useFactory:e,deps:t})},e}();t.ProviderBuilder=N,t.resolveFactory=o,t.resolveProvider=a,t.resolveProviders=s;var V=function(){function e(e,t){this.key=e,this.resolvedFactory=t}return e}();return g.define=m,r.exports}),System.register("angular2/src/animate/css_animation_builder",["angular2/src/animate/css_animation_options","angular2/src/animate/animation"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/animate/css_animation_options"),a=e("angular2/src/animate/animation"),s=function(){function e(e){this.browserDetails=e,this.data=new o.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 a.Animation(e,this.data,this.browserDetails)},e}();return t.CssAnimationBuilder=s,n.define=i,r.exports}),System.register("angular2/src/core/change_detection/dynamic_change_detector",["angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/collection","angular2/src/core/change_detection/abstract_change_detector","angular2/src/core/change_detection/change_detection_util","angular2/src/core/change_detection/constants","angular2/src/core/change_detection/proto_record"],!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/exceptions"),c=e("angular2/src/facade/collection"),l=e("angular2/src/core/change_detection/abstract_change_detector"),u=e("angular2/src/core/change_detection/change_detection_util"),p=e("angular2/src/core/change_detection/constants"),d=e("angular2/src/core/change_detection/proto_record"),f=function(e){function t(t,r,n,i,o,a,s,l,u,p){e.call(this,t,r,n,i,o,a),this._records=s,this._eventBindings=l,this._directiveRecords=u,this._genConfig=p,this.directives=null;var d=s.length+1;this.values=c.ListWrapper.createFixedSize(d),this.localPipes=c.ListWrapper.createFixedSize(d),this.prevContexts=c.ListWrapper.createFixedSize(d),this.changes=c.ListWrapper.createFixedSize(d),this.dehydrateDirectives(!1)}return o(t,e),t.prototype.handleEventInternal=function(e,t,r){var n=this,i=!1;return this._matchingEventBindings(e,t).forEach(function(e){var t=n._processEventBinding(e,r);t===!1&&(i=!0)}),i},t.prototype._processEventBinding=function(e,t){var r=c.ListWrapper.createFixedSize(e.records.length);r[0]=this.values[0];for(var n=0;n=0;--t){var r=e[t];r.callAfterContentInit&&this.state==p.ChangeDetectorState.NeverChecked&&this._getDirectiveFor(r.directiveIndex).ngAfterContentInit(),r.callAfterContentChecked&&this._getDirectiveFor(r.directiveIndex).ngAfterContentChecked()}},t.prototype.afterViewLifecycleCallbacksInternal=function(){for(var e=this._directiveRecords,t=e.length-1;t>=0;--t){var r=e[t];r.callAfterViewInit&&this.state==p.ChangeDetectorState.NeverChecked&&this._getDirectiveFor(r.directiveIndex).ngAfterViewInit(),r.callAfterViewChecked&&this._getDirectiveFor(r.directiveIndex).ngAfterViewChecked()}},t.prototype._updateDirectiveOrElement=function(t,r){if(a.isBlank(r.directiveRecord))e.prototype.notifyDispatcher.call(this,t.currentValue);else{var n=r.directiveRecord.directiveIndex;r.setter(this._getDirectiveFor(n),t.currentValue)}this._genConfig.logBindingUpdate&&e.prototype.logBindingUpdate.call(this,t.currentValue)},t.prototype._addChange=function(t,r,n){return t.callOnChanges()?e.prototype.addChange.call(this,n,r.previousValue,r.currentValue):n},t.prototype._getDirectiveFor=function(e){return this.directives.getDirectiveFor(e)},t.prototype._getDetectorFor=function(e){return this.directives.getDetectorFor(e)},t.prototype._check=function(e,t,r,n){return e.isPipeRecord()?this._pipeCheck(e,t,r):this._referenceCheck(e,t,r,n)},t.prototype._referenceCheck=function(t,r,n,i){if(this._pureFuncAndArgsDidNotChange(t))return this._setChanged(t,!1),null;var o=this._calculateCurrValue(t,n,i);if(this.strategy===p.ChangeDetectionStrategy.OnPushObserve&&e.prototype.observeValue.call(this,o,t.selfIndex),t.shouldBeChecked()){var a=this._readSelf(t,n);if(u.ChangeDetectionUtil.looseNotIdentical(a,o)){if(t.lastInBinding){var s=u.ChangeDetectionUtil.simpleChange(a,o);return r&&this.throwOnChangeError(a,o),this._writeSelf(t,o,n),this._setChanged(t,!0),s}return this._writeSelf(t,o,n),this._setChanged(t,!0),null}return this._setChanged(t,!1),null}return this._writeSelf(t,o,n),this._setChanged(t,!0),null},t.prototype._calculateCurrValue=function(e,t,r){switch(e.mode){case d.RecordType.Self:return this._readContext(e,t);case d.RecordType.Const:return e.funcOrValue;case d.RecordType.PropertyRead:var n=this._readContext(e,t);return e.funcOrValue(n);case d.RecordType.SafeProperty:var n=this._readContext(e,t);return a.isBlank(n)?null:e.funcOrValue(n);case d.RecordType.PropertyWrite:var n=this._readContext(e,t),i=this._readArgs(e,t)[0];return e.funcOrValue(n,i),i;case d.RecordType.KeyedWrite:var n=this._readContext(e,t),o=this._readArgs(e,t)[0],i=this._readArgs(e,t)[1];return n[o]=i,i;case d.RecordType.Local:return r.get(e.name);case d.RecordType.InvokeMethod:var n=this._readContext(e,t),c=this._readArgs(e,t);return e.funcOrValue(n,c);case d.RecordType.SafeMethodInvoke:var n=this._readContext(e,t);if(a.isBlank(n))return null;var c=this._readArgs(e,t);return e.funcOrValue(n,c);case d.RecordType.KeyedRead:var l=this._readArgs(e,t)[0];return this._readContext(e,t)[l];case d.RecordType.Chain:var c=this._readArgs(e,t);return c[c.length-1];case d.RecordType.InvokeClosure:return a.FunctionWrapper.apply(this._readContext(e,t),this._readArgs(e,t));case d.RecordType.Interpolate:case d.RecordType.PrimitiveOp:case d.RecordType.CollectionLiteral:return a.FunctionWrapper.apply(e.funcOrValue,this._readArgs(e,t));default:throw new s.BaseException("Unknown operation "+e.mode)}},t.prototype._pipeCheck=function(e,t,r){var n=this._readContext(e,r),i=this._pipeFor(e,n);if(!i.pure||this._argsOrContextChanged(e)){var o=this._readArgs(e,r),a=i.pipe.transform(n,o);if(e.shouldBeChecked()){var s=this._readSelf(e,r);if(u.ChangeDetectionUtil.looseNotIdentical(s,a)){if(a=u.ChangeDetectionUtil.unwrapValue(a),e.lastInBinding){var c=u.ChangeDetectionUtil.simpleChange(s,a);return t&&this.throwOnChangeError(s,a),this._writeSelf(e,a,r),this._setChanged(e,!0),c}return this._writeSelf(e,a,r),this._setChanged(e,!0),null}return this._setChanged(e,!1),null}return this._writeSelf(e,a,r),this._setChanged(e,!0),null}},t.prototype._pipeFor=function(e,t){var r=this._readPipe(e);if(a.isPresent(r))return r;var n=this.pipes.get(e.name);return this._writePipe(e,n),n},t.prototype._readContext=function(e,t){return-1==e.contextIndex?this._getDirectiveFor(e.directiveIndex):t[e.contextIndex]},t.prototype._readSelf=function(e,t){return t[e.selfIndex]},t.prototype._writeSelf=function(e,t,r){r[e.selfIndex]=t},t.prototype._readPipe=function(e){return this.localPipes[e.selfIndex]},t.prototype._writePipe=function(e,t){this.localPipes[e.selfIndex]=t},t.prototype._setChanged=function(e,t){e.argumentToPureFunction&&(this.changes[e.selfIndex]=t)},t.prototype._pureFuncAndArgsDidNotChange=function(e){return e.isPureFunction()&&!this._argsChanged(e)},t.prototype._argsChanged=function(e){for(var t=e.args,r=0;r0){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();e&&(e="if (destroyPipes) { "+e+" }");var t=this._names.genDehydrateFields();return e||t?this.typeName+".prototype.dehydrateDirectives = function(destroyPipes) {\n "+e+"\n "+t+"\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;ro?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=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},l=e("angular2/src/core/di"),u=e("angular2/src/facade/lang"),p=e("angular2/src/facade/exceptions"),d=e("angular2/src/core/linker/view"),f=e("angular2/src/core/linker/view_ref"),h=e("angular2/src/core/render/api"),g=e("angular2/src/core/linker/view_manager_utils"),m=e("angular2/src/core/linker/view_pool"),v=e("angular2/src/core/linker/view_listener"),y=e("angular2/src/core/profile/profile"),_=e("angular2/src/core/linker/proto_view_factory"),b=function(){function e(){}return e.prototype.getHostElement=function(e){var t=f.internalView(e);if(t.proto.type!==d.ViewType.HOST)throw new p.BaseException("This operation is only allowed on host views");return t.elementRefs[t.elementOffset]},e}();t.AppViewManager=b;var C=function(e){function t(t,r,n,i,o){e.call(this),this._viewPool=t,this._viewListener=r,this._utils=n,this._renderer=i,this._createRootHostViewScope=y.wtfCreateScope("AppViewManager#createRootHostView()"),this._destroyRootHostViewScope=y.wtfCreateScope("AppViewManager#destroyRootHostView()"),this._createEmbeddedViewInContainerScope=y.wtfCreateScope("AppViewManager#createEmbeddedViewInContainer()"),this._createHostViewInContainerScope=y.wtfCreateScope("AppViewManager#createHostViewInContainer()"),this._destroyViewInContainerScope=y.wtfCreateScope("AppViewMananger#destroyViewInContainer()"),this._attachViewInContainerScope=y.wtfCreateScope("AppViewMananger#attachViewInContainer()"),this._detachViewInContainerScope=y.wtfCreateScope("AppViewMananger#detachViewInContainer()"),this._protoViewFactory=o}return o(t,e),t.prototype.getViewContainer=function(e){var t=f.internalView(e.parentView);return t.elementInjectors[e.boundElementIndex].getViewContainerRef()},t.prototype.getNamedElementInComponentView=function(e,t){var r=f.internalView(e.parentView),n=e.boundElementIndex,i=r.getNestedView(n);if(u.isBlank(i))throw new p.BaseException("There is no component directive at element "+n);var o=i.proto.variableLocations.get(t);if(u.isBlank(o))throw new p.BaseException("Could not find variable "+t);return i.elementRefs[i.elementOffset+o]},t.prototype.getComponent=function(e){var t=f.internalView(e.parentView),r=e.boundElementIndex;return this._utils.getComponentInstance(t,r)},t.prototype.createRootHostView=function(e,t,r){var n=this._createRootHostViewScope(),i=f.internalProtoView(e);this._protoViewFactory.initializeProtoViewIfNeeded(i);var o=t;u.isBlank(o)&&(o=i.elementBinders[0].componentDirective.metadata.selector);var a=this._renderer.createRootHostView(i.render,i.mergeInfo.embeddedViewCount+1,o),s=this._createMainView(i,a);return this._renderer.hydrateView(s.render),this._utils.hydrateRootHostView(s,r),y.wtfLeave(n,s.ref)},t.prototype.destroyRootHostView=function(e){var t=this._destroyRootHostViewScope(),r=f.internalView(e);this._renderer.detachFragment(r.renderFragment),this._renderer.dehydrateView(r.render),this._viewDehydrateRecurse(r),this._viewListener.onViewDestroyed(r),this._renderer.destroyView(r.render),y.wtfLeave(t)},t.prototype.createEmbeddedViewInContainer=function(e,t,r){var n=this._createEmbeddedViewInContainerScope(),i=f.internalProtoView(r.protoViewRef);if(i.type!==d.ViewType.EMBEDDED)throw new p.BaseException("This method can only be called with embedded ProtoViews!");return this._protoViewFactory.initializeProtoViewIfNeeded(i),y.wtfLeave(n,this._createViewInContainer(e,t,i,r.elementRef,null))},t.prototype.createHostViewInContainer=function(e,t,r,n){var i=this._createHostViewInContainerScope(),o=f.internalProtoView(r);if(o.type!==d.ViewType.HOST)throw new p.BaseException("This method can only be called with host ProtoViews!");return this._protoViewFactory.initializeProtoViewIfNeeded(o),y.wtfLeave(i,this._createViewInContainer(e,t,o,e,n))},t.prototype._createViewInContainer=function(e,t,r,n,i){var o,a=f.internalView(e.parentView),s=e.boundElementIndex,c=f.internalView(n.parentView),l=n.boundElementIndex,p=c.getNestedView(l);r.type===d.ViewType.EMBEDDED&&u.isPresent(p)&&!p.hydrated()?(o=p,this._attachRenderView(a,s,t,o)):(o=this._createPooledView(r),this._attachRenderView(a,s,t,o),this._renderer.hydrateView(o.render)),this._utils.attachViewInContainer(a,s,c,l,t,o);try{this._utils.hydrateViewInContainer(a,s,c,l,t,i)}catch(h){throw this._utils.detachViewInContainer(a,s,t),h}return o.ref},t.prototype._attachRenderView=function(e,t,r,n){var i=e.elementRefs[t];if(0===r)this._renderer.attachFragmentAfterElement(i,n.renderFragment);else{var o=e.viewContainers[t].views[r-1];this._renderer.attachFragmentAfterFragment(o.renderFragment,n.renderFragment)}},t.prototype.destroyViewInContainer=function(e,t){var r=this._destroyViewInContainerScope(),n=f.internalView(e.parentView),i=e.boundElementIndex;this._destroyViewInContainer(n,i,t),y.wtfLeave(r)},t.prototype.attachViewInContainer=function(e,t,r){var n=this._attachViewInContainerScope(),i=f.internalView(r),o=f.internalView(e.parentView),a=e.boundElementIndex;return this._utils.attachViewInContainer(o,a,null,null,t,i),this._attachRenderView(o,a,t,i),y.wtfLeave(n,r)},t.prototype.detachViewInContainer=function(e,t){var r=this._detachViewInContainerScope(),n=f.internalView(e.parentView),i=e.boundElementIndex,o=n.viewContainers[i],a=o.views[t];return this._utils.detachViewInContainer(n,i,t),this._renderer.detachFragment(a.renderFragment),y.wtfLeave(r,a.ref)},t.prototype._createMainView=function(e,t){var r=this._utils.createView(e,t,this,this._renderer);return this._renderer.setEventDispatcher(r.render,r),this._viewListener.onViewCreated(r),r},t.prototype._createPooledView=function(e){var t=this._viewPool.getView(e);return u.isBlank(t)&&(t=this._createMainView(e,this._renderer.createView(e.render,e.mergeInfo.embeddedViewCount+1))),t},t.prototype._destroyPooledView=function(e){var t=this._viewPool.returnView(e);t||(this._viewListener.onViewDestroyed(e),this._renderer.destroyView(e.render))},t.prototype._destroyViewInContainer=function(e,t,r){var n=e.viewContainers[t],i=n.views[r];this._viewDehydrateRecurse(i),this._utils.detachViewInContainer(e,t,r),i.viewOffset>0?this._renderer.detachFragment(i.renderFragment):(this._renderer.dehydrateView(i.render),this._renderer.detachFragment(i.renderFragment),this._destroyPooledView(i))},t.prototype._viewDehydrateRecurse=function(e){e.hydrated()&&this._utils.dehydrateView(e);for(var t=e.viewContainers,r=e.viewOffset,n=e.viewOffset+e.proto.mergeInfo.viewCount-1,i=e.elementOffset,o=r;n>=o;o++)for(var a=e.views[o],s=0;s=0;l--)this._destroyViewInContainer(a,i,l)}},t=a([l.Injectable(),c(4,l.Inject(l.forwardRef(function(){return _.ProtoViewFactory}))),s("design:paramtypes",[m.AppViewPool,v.AppViewListener,g.AppViewManagerUtils,h.Renderer,Object])],t)}(b);return t.AppViewManager_=C,n.define=i,r.exports}),System.register("angular2/src/core/di/injector",["angular2/src/facade/collection","angular2/src/core/di/provider","angular2/src/core/di/exceptions","angular2/src/facade/lang","angular2/src/core/di/key","angular2/src/core/di/metadata"],!0,function(e,t,r){function n(e,t){return e===t||t===h.PublicAndPrivate||e===h.PublicAndPrivate}function i(e,t){for(var r=[],n=0;n0&&(this.provider0=t[0].provider,this.keyId0=t[0].getKeyId(),this.visibility0=t[0].visibility),r>1&&(this.provider1=t[1].provider,this.keyId1=t[1].getKeyId(),this.visibility1=t[1].visibility),r>2&&(this.provider2=t[2].provider,this.keyId2=t[2].getKeyId(),this.visibility2=t[2].visibility),r>3&&(this.provider3=t[3].provider,this.keyId3=t[3].getKeyId(),this.visibility3=t[3].visibility),r>4&&(this.provider4=t[4].provider,this.keyId4=t[4].getKeyId(),this.visibility4=t[4].visibility),r>5&&(this.provider5=t[5].provider,this.keyId5=t[5].getKeyId(),this.visibility5=t[5].visibility),r>6&&(this.provider6=t[6].provider,this.keyId6=t[6].getKeyId(),this.visibility6=t[6].visibility),r>7&&(this.provider7=t[7].provider,this.keyId7=t[7].getKeyId(),this.visibility7=t[7].visibility),r>8&&(this.provider8=t[8].provider,this.keyId8=t[8].getKeyId(),this.visibility8=t[8].visibility),r>9&&(this.provider9=t[9].provider,this.keyId9=t[9].getKeyId(),this.visibility9=t[9].visibility)}return e.prototype.getProviderAtIndex=function(e){if(0==e)return this.provider0;if(1==e)return this.provider1;if(2==e)return this.provider2;if(3==e)return this.provider3;if(4==e)return this.provider4;if(5==e)return this.provider5;if(6==e)return this.provider6;if(7==e)return this.provider7;if(8==e)return this.provider8;if(9==e)return this.provider9;throw new l.OutOfBoundsError(e)},e.prototype.createInjectorStrategy=function(e){return new y(e,this)},e}();t.ProtoInjectorInlineStrategy=g;var m=function(){function e(e,t){var r=t.length;this.providers=s.ListWrapper.createFixedSize(r),this.keyIds=s.ListWrapper.createFixedSize(r),this.visibilities=s.ListWrapper.createFixedSize(r);for(var n=0;r>n;n++)this.providers[n]=t[n].provider,this.keyIds[n]=t[n].getKeyId(),this.visibilities[n]=t[n].visibility}return e.prototype.getProviderAtIndex=function(e){if(0>e||e>=this.providers.length)throw new l.OutOfBoundsError(e);return this.providers[e]},e.prototype.createInjectorStrategy=function(e){return new _(this,e)},e}();t.ProtoInjectorDynamicStrategy=m;var v=function(){function e(e){this.numberOfProviders=e.length,this._strategy=e.length>f?new m(this,e):new g(this,e)}return e.prototype.getProviderAtIndex=function(e){return this._strategy.getProviderAtIndex(e)},e}();t.ProtoInjector=v;var y=function(){function e(e,r){this.injector=e,this.protoStrategy=r,this.obj0=t.UNDEFINED,this.obj1=t.UNDEFINED,this.obj2=t.UNDEFINED,this.obj3=t.UNDEFINED,this.obj4=t.UNDEFINED,this.obj5=t.UNDEFINED,this.obj6=t.UNDEFINED,this.obj7=t.UNDEFINED,this.obj8=t.UNDEFINED,this.obj9=t.UNDEFINED}return e.prototype.resetConstructionCounter=function(){this.injector._constructionCounter=0},e.prototype.instantiateProvider=function(e,t){return this.injector._new(e,t)},e.prototype.attach=function(e,t){var r=this.injector;r._parent=e,r._isHost=t},e.prototype.getObjByKeyId=function(e,r){var i=this.protoStrategy,o=this.injector;return i.keyId0===e&&n(i.visibility0,r)?(this.obj0===t.UNDEFINED&&(this.obj0=o._new(i.provider0,i.visibility0)),this.obj0):i.keyId1===e&&n(i.visibility1,r)?(this.obj1===t.UNDEFINED&&(this.obj1=o._new(i.provider1,i.visibility1)),this.obj1):i.keyId2===e&&n(i.visibility2,r)?(this.obj2===t.UNDEFINED&&(this.obj2=o._new(i.provider2,i.visibility2)),this.obj2):i.keyId3===e&&n(i.visibility3,r)?(this.obj3===t.UNDEFINED&&(this.obj3=o._new(i.provider3,i.visibility3)),this.obj3):i.keyId4===e&&n(i.visibility4,r)?(this.obj4===t.UNDEFINED&&(this.obj4=o._new(i.provider4,i.visibility4)),this.obj4):i.keyId5===e&&n(i.visibility5,r)?(this.obj5===t.UNDEFINED&&(this.obj5=o._new(i.provider5,i.visibility5)),this.obj5):i.keyId6===e&&n(i.visibility6,r)?(this.obj6===t.UNDEFINED&&(this.obj6=o._new(i.provider6,i.visibility6)),this.obj6):i.keyId7===e&&n(i.visibility7,r)?(this.obj7===t.UNDEFINED&&(this.obj7=o._new(i.provider7,i.visibility7)),this.obj7):i.keyId8===e&&n(i.visibility8,r)?(this.obj8===t.UNDEFINED&&(this.obj8=o._new(i.provider8,i.visibility8)),this.obj8):i.keyId9===e&&n(i.visibility9,r)?(this.obj9===t.UNDEFINED&&(this.obj9=o._new(i.provider9,i.visibility9)),this.obj9):t.UNDEFINED},e.prototype.getObjAtIndex=function(e){if(0==e)return this.obj0;if(1==e)return this.obj1;if(2==e)return this.obj2;if(3==e)return this.obj3;if(4==e)return this.obj4;if(5==e)return this.obj5; if(6==e)return this.obj6;if(7==e)return this.obj7;if(8==e)return this.obj8;if(9==e)return this.obj9;throw new l.OutOfBoundsError(e)},e.prototype.getMaxNumberOfObjects=function(){return f},e}();t.InjectorInlineStrategy=y;var _=function(){function e(e,r){this.protoStrategy=e,this.injector=r,this.objs=s.ListWrapper.createFixedSize(e.providers.length),s.ListWrapper.fill(this.objs,t.UNDEFINED)}return e.prototype.resetConstructionCounter=function(){this.injector._constructionCounter=0},e.prototype.instantiateProvider=function(e,t){return this.injector._new(e,t)},e.prototype.attach=function(e,t){var r=this.injector;r._parent=e,r._isHost=t},e.prototype.getObjByKeyId=function(e,r){for(var i=this.protoStrategy,o=0;oe||e>=this.objs.length)throw new l.OutOfBoundsError(e);return this.objs[e]},e.prototype.getMaxNumberOfObjects=function(){return this.objs.length},e}();t.InjectorDynamicStrategy=_;var b=function(){function e(e,t){this.provider=e,this.visibility=t}return e.prototype.getKeyId=function(){return this.provider.key.id},e}();t.ProviderWithVisibility=b;var C=function(){function e(e,t,r,n){void 0===t&&(t=null),void 0===r&&(r=null),void 0===n&&(n=null),this._depProvider=r,this._debugContext=n,this._isHost=!1,this._constructionCounter=0,this._proto=e,this._parent=t,this._strategy=e._strategy.createInjectorStrategy(this)}return e.resolve=function(e){return c.resolveProviders(e)},e.resolveAndCreate=function(t){var r=e.resolve(t);return e.fromResolvedProviders(r)},e.fromResolvedProviders=function(t){var r=t.map(function(e){return new b(e,h.Public)}),n=new v(r);return new e(n,null,null)},e.fromResolvedBindings=function(t){return e.fromResolvedProviders(t)},e.prototype.debugContext=function(){return this._debugContext()},e.prototype.get=function(e){return this._getByKey(p.Key.get(e),null,null,!1,h.PublicAndPrivate)},e.prototype.getOptional=function(e){return this._getByKey(p.Key.get(e),null,null,!0,h.PublicAndPrivate)},e.prototype.getAt=function(e){return this._strategy.getObjAtIndex(e)},Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"internalStrategy",{get:function(){return this._strategy},enumerable:!0,configurable:!0}),e.prototype.resolveAndCreateChild=function(t){var r=e.resolve(t);return this.createChildFromResolved(r)},e.prototype.createChildFromResolved=function(t){var r=t.map(function(e){return new b(e,h.Public)}),n=new v(r),i=new e(n,null,null);return i._parent=this,i},e.prototype.resolveAndInstantiate=function(t){return this.instantiateResolved(e.resolve([t])[0])},e.prototype.instantiateResolved=function(e){return this._instantiateProvider(e,h.PublicAndPrivate)},e.prototype._new=function(e,t){if(this._constructionCounter++>this._strategy.getMaxNumberOfObjects())throw new l.CyclicDependencyError(this,e.key);return this._instantiateProvider(e,t)},e.prototype._instantiateProvider=function(e,t){if(e.multiProvider){for(var r=s.ListWrapper.createFixedSize(e.resolvedFactories.length),n=0;n0?this._getByDependency(e,S[0],r):null,i=R>1?this._getByDependency(e,S[1],r):null,o=R>2?this._getByDependency(e,S[2],r):null,a=R>3?this._getByDependency(e,S[3],r):null,s=R>4?this._getByDependency(e,S[4],r):null,c=R>5?this._getByDependency(e,S[5],r):null,u=R>6?this._getByDependency(e,S[6],r):null,p=R>7?this._getByDependency(e,S[7],r):null,d=R>8?this._getByDependency(e,S[8],r):null,f=R>9?this._getByDependency(e,S[9],r):null,h=R>10?this._getByDependency(e,S[10],r):null,g=R>11?this._getByDependency(e,S[11],r):null,m=R>12?this._getByDependency(e,S[12],r):null,v=R>13?this._getByDependency(e,S[13],r):null,y=R>14?this._getByDependency(e,S[14],r):null,_=R>15?this._getByDependency(e,S[15],r):null,b=R>16?this._getByDependency(e,S[16],r):null,C=R>17?this._getByDependency(e,S[17],r):null,w=R>18?this._getByDependency(e,S[18],r):null,P=R>19?this._getByDependency(e,S[19],r):null}catch(x){throw(x instanceof l.AbstractProviderError||x instanceof l.InstantiationError)&&x.addKey(this,e.key),x}var O;try{switch(R){case 0:O=E();break;case 1:O=E(n);break;case 2:O=E(n,i);break;case 3:O=E(n,i,o);break;case 4:O=E(n,i,o,a);break;case 5:O=E(n,i,o,a,s);break;case 6:O=E(n,i,o,a,s,c);break;case 7:O=E(n,i,o,a,s,c,u);break;case 8:O=E(n,i,o,a,s,c,u,p);break;case 9:O=E(n,i,o,a,s,c,u,p,d);break;case 10:O=E(n,i,o,a,s,c,u,p,d,f);break;case 11:O=E(n,i,o,a,s,c,u,p,d,f,h);break;case 12:O=E(n,i,o,a,s,c,u,p,d,f,h,g);break;case 13:O=E(n,i,o,a,s,c,u,p,d,f,h,g,m);break;case 14:O=E(n,i,o,a,s,c,u,p,d,f,h,g,m,v);break;case 15:O=E(n,i,o,a,s,c,u,p,d,f,h,g,m,v,y);break;case 16:O=E(n,i,o,a,s,c,u,p,d,f,h,g,m,v,y,_);break;case 17:O=E(n,i,o,a,s,c,u,p,d,f,h,g,m,v,y,_,b);break;case 18:O=E(n,i,o,a,s,c,u,p,d,f,h,g,m,v,y,_,b,C);break;case 19:O=E(n,i,o,a,s,c,u,p,d,f,h,g,m,v,y,_,b,C,w);break;case 20:O=E(n,i,o,a,s,c,u,p,d,f,h,g,m,v,y,_,b,C,w,P)}}catch(x){throw new l.InstantiationError(this,x,x.stack,e.key)}return O},e.prototype._getByDependency=function(e,r,n){var i=u.isPresent(this._depProvider)?this._depProvider.getDependency(this,e,r):t.UNDEFINED;return i!==t.UNDEFINED?i:this._getByKey(r.key,r.lowerBoundVisibility,r.upperBoundVisibility,r.optional,n)},e.prototype._getByKey=function(e,t,r,n,i){return e===w?this:r instanceof d.SelfMetadata?this._getByKeySelf(e,n,i):r instanceof d.HostMetadata?this._getByKeyHost(e,n,i,t):this._getByKeyDefault(e,n,i,t)},e.prototype._throwOrNull=function(e,t){if(t)return null;throw new l.NoProviderError(this,e)},e.prototype._getByKeySelf=function(e,r,n){var i=this._strategy.getObjByKeyId(e.id,n);return i!==t.UNDEFINED?i:this._throwOrNull(e,r)},e.prototype._getByKeyHost=function(e,r,n,i){var o=this;if(i instanceof d.SkipSelfMetadata){if(o._isHost)return this._getPrivateDependency(e,r,o);o=o._parent}for(;null!=o;){var a=o._strategy.getObjByKeyId(e.id,n);if(a!==t.UNDEFINED)return a;if(u.isPresent(o._parent)&&o._isHost)return this._getPrivateDependency(e,r,o);o=o._parent}return this._throwOrNull(e,r)},e.prototype._getPrivateDependency=function(e,r,n){var i=n._parent._strategy.getObjByKeyId(e.id,h.Private);return i!==t.UNDEFINED?i:this._throwOrNull(e,r)},e.prototype._getByKeyDefault=function(e,r,n,i){var o=this;for(i instanceof d.SkipSelfMetadata&&(n=o._isHost?h.PublicAndPrivate:h.Public,o=o._parent);null!=o;){var a=o._strategy.getObjByKeyId(e.id,n);if(a!==t.UNDEFINED)return a;n=o._isHost?h.PublicAndPrivate:h.Public,o=o._parent}return this._throwOrNull(e,r)},Object.defineProperty(e.prototype,"displayName",{get:function(){return"Injector(providers: ["+i(this,function(e){return' "'+e.key.displayName+'" '}).join(", ")+"])"},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return this.displayName},e}();t.Injector=C;var w=p.Key.get(C);return o.define=a,r.exports}),System.register("angular2/src/animate/animation_builder",["angular2/src/core/di","angular2/src/animate/css_animation_builder","angular2/src/animate/browser_details"],!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/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_detection/dynamic_change_detector"),_=e("angular2/src/core/change_detection/directive_record"),b=e("angular2/src/core/change_detection/event_binding"),C=e("angular2/src/core/change_detection/coalesce"),w=e("angular2/src/core/change_detection/proto_record"),P=function(){function e(e){this._definition=e,this._propertyBindingRecords=n(e),this._eventBindingRecords=i(e),this._propertyBindingTargets=this._definition.bindingRecords.map(function(e){return e.target}),this._directiveIndices=this._definition.directiveRecords.map(function(e){return e.directiveIndex})}return e.prototype.instantiate=function(e){return new y.DynamicChangeDetector(this._definition.id,e,this._propertyBindingRecords.length,this._propertyBindingTargets,this._directiveIndices,this._definition.strategy,this._propertyBindingRecords,this._eventBindingRecords,this._definition.directiveRecords,this._definition.genConfig)},e}();t.DynamicProtoChangeDetector=P,t.createPropertyRecords=n,t.createEventRecords=i;var E=function(){function e(){this.records=[]}return e.prototype.add=function(e,t,r){var n=g.ListWrapper.last(this.records);f.isPresent(n)&&n.bindingRecord.directiveRecord==e.directiveRecord&&(n.lastInDirective=!1);var i=this.records.length;this._appendRecords(e,t,r);var o=g.ListWrapper.last(this.records);f.isPresent(o)&&o!==n&&(o.lastInBinding=!0,o.lastInDirective=!0,this._setArgumentToPureFunction(i))},e.prototype._setArgumentToPureFunction=function(e){for(var t=this,r=e;r1)throw new u.BaseException("A directive injectable can contain only one of the following @Attribute or @Query.")},t.createFrom=function(e){return new t(e.key,e.optional,e.lowerBoundVisibility,e.upperBoundVisibility,e.properties,t._attributeName(e.properties),t._query(e.properties))},t._attributeName=function(e){var t=e.find(function(e){return e instanceof m.AttributeMetadata});return l.isPresent(t)?t.attributeName:null},t._query=function(e){return e.find(function(e){return e instanceof m.QueryMetadata})},t}(f.Dependency);t.DirectiveDependency=I;var k=function(e){function t(t,r,n,i,o,a){e.call(this,t,[new g.ResolvedFactory(r,n)],!1),this.metadata=i,this.providers=o,this.viewProviders=a,this.callOnDestroy=w.hasLifecycleHook(O.LifecycleHooks.OnDestroy,t.token)}return c(t,e),Object.defineProperty(t.prototype,"displayName",{get:function(){return this.key.displayName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queries",{get:function(){if(l.isBlank(this.metadata.queries))return[];var e=[];return d.StringMapWrapper.forEach(this.metadata.queries,function(t,r){var n=S.reflector.setter(r);e.push(new V(n,t))}),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"eventEmitters",{get:function(){return l.isPresent(this.metadata)&&l.isPresent(this.metadata.outputs)?this.metadata.outputs:[]},enumerable:!0,configurable:!0}),t.createFromProvider=function(e,r){l.isBlank(r)&&(r=new C.DirectiveMetadata);var n=g.resolveProvider(e),i=n.resolvedFactories[0],o=i.dependencies.map(I.createFrom),a=l.isPresent(r.providers)?r.providers:[],s=r instanceof C.ComponentMetadata&&l.isPresent(r.viewProviders)?r.viewProviders:[];return new t(n.key,i.factory,o,r,a,s)},t.createFromType=function(e,r){var n=new f.Provider(e,{useClass:e});return t.createFromProvider(n,r)},t}(g.ResolvedProvider_);t.DirectiveProvider=k;var N=function(){function e(e,t,r,n){this.viewManager=e,this.view=t,this.elementRef=r,this.templateRef=n,this.nestedView=null}return e}();t.PreBuiltObjects=N;var V=function(){function e(e,t){this.setter=e,this.metadata=t}return e}();t.QueryMetadataWithSetter=V;var j=function(){function e(e,t){this.eventName=e,this.getter=t}return e.prototype.subscribe=function(e,t,r){var n=this,i=this.getter(r);return p.ObservableWrapper.subscribe(i,function(r){return e.triggerEventHandlers(n.eventName,r,t)})},e}();t.EventEmitterAccessor=j;var M=function(){function e(e,t,r,o,a,s){this.parent=e,this.index=t,this.distanceToParent=o,this.directiveVariableBindings=s,this._firstProviderIsComponent=a;var c=r.length;this.protoInjector=new h.ProtoInjector(r),this.eventEmitterAccessors=d.ListWrapper.createFixedSize(c);for(var l=0;c>l;++l)this.eventEmitterAccessors[l]=n(r[l]);this.protoQueryRefs=i(r)}return e.create=function(t,r,n,i,o,a){var s=[];return e._createDirectiveProviderWithVisibility(n,s,i),i&&e._createViewProvidersWithVisibility(n,s),e._createProvidersWithVisibility(n,s),new e(t,r,s,o,i,a)},e._createDirectiveProviderWithVisibility=function(t,r,n){t.forEach(function(i){r.push(e._createProviderWithVisibility(n,i,t,i))})},e._createProvidersWithVisibility=function(e,t){var r=[];e.forEach(function(e){r=d.ListWrapper.concat(r,e.providers)});var n=f.Injector.resolve(r);n.forEach(function(e){return t.push(new h.ProviderWithVisibility(e,h.Visibility.Public))})},e._createProviderWithVisibility=function(e,t,r,n){var i=e&&r[0]===t;return new h.ProviderWithVisibility(n,i?h.Visibility.PublicAndPrivate:h.Visibility.Public)},e._createViewProvidersWithVisibility=function(e,t){var r=f.Injector.resolve(e[0].viewProviders);r.forEach(function(e){return t.push(new h.ProviderWithVisibility(e,h.Visibility.Private))})},e.prototype.instantiate=function(e){return new L(this,e)},e.prototype.directParent=function(){return this.distanceToParent<2?this.parent:null},Object.defineProperty(e.prototype,"hasBindings",{get:function(){return this.eventEmitterAccessors.length>0},enumerable:!0,configurable:!0}),e.prototype.getProviderAtIndex=function(e){return this.protoInjector.getProviderAtIndex(e)},e}();t.ProtoElementInjector=M;var B=function(){function e(e,t,r){this.element=e,this.componentElement=t,this.injector=r}return e}(),L=function(e){function t(t,r){var n=this;e.call(this,r),this._preBuiltObjects=null,this._proto=t,this._injector=new f.Injector(this._proto.protoInjector,null,this,function(){return n._debugContext()});var i=this._injector.internalStrategy;this._strategy=i instanceof h.InjectorInlineStrategy?new q(i,this):new G(i,this),this.hydrated=!1,this._queryStrategy=this._buildQueryStrategy()}return c(t,e),t.prototype.dehydrate=function(){this.hydrated=!1,this._host=null,this._preBuiltObjects=null,this._strategy.callOnDestroy(),this._strategy.dehydrate(),this._queryStrategy.dehydrate()},t.prototype.hydrate=function(e,t,r){this._host=t,this._preBuiltObjects=r,this._reattachInjectors(e),this._queryStrategy.hydrate(),this._strategy.hydrate(),this.hydrated=!0},t.prototype._debugContext=function(){var e=this._preBuiltObjects,t=e.elementRef.boundElementIndex-e.view.elementOffset,r=this._preBuiltObjects.view.getDebugContext(t,null);return l.isPresent(r)?new B(r.element,r.componentElement,r.injector):null},t.prototype._reattachInjectors=function(e){l.isPresent(this._parent)?l.isPresent(e)?(this._reattachInjector(this._injector,e,!1),this._reattachInjector(e,this._parent._injector,!1)):this._reattachInjector(this._injector,this._parent._injector,!1):l.isPresent(this._host)?l.isPresent(e)?(this._reattachInjector(this._injector,e,!1),this._reattachInjector(e,this._host._injector,!0)):this._reattachInjector(this._injector,this._host._injector,!0):l.isPresent(e)&&this._reattachInjector(this._injector,e,!0)},t.prototype._reattachInjector=function(e,t,r){e.internalStrategy.attach(t,r)},t.prototype.hasVariableBinding=function(e){var t=this._proto.directiveVariableBindings;return l.isPresent(t)&&t.has(e)},t.prototype.getVariableBinding=function(e){var t=this._proto.directiveVariableBindings.get(e);return l.isPresent(t)?this.getDirectiveAtIndex(t):this.getElementRef()},t.prototype.get=function(e){return this._injector.get(e)},t.prototype.hasDirective=function(e){return l.isPresent(this._injector.getOptional(e))},t.prototype.getEventEmitterAccessors=function(){return this._proto.eventEmitterAccessors},t.prototype.getDirectiveVariableBindings=function(){return this._proto.directiveVariableBindings},t.prototype.getComponent=function(){return this._strategy.getComponent()},t.prototype.getInjector=function(){return this._injector},t.prototype.getElementRef=function(){return this._preBuiltObjects.elementRef},t.prototype.getViewContainerRef=function(){return new D.ViewContainerRef_(this._preBuiltObjects.viewManager,this.getElementRef())},t.prototype.getNestedView=function(){return this._preBuiltObjects.nestedView},t.prototype.getView=function(){return this._preBuiltObjects.view},t.prototype.directParent=function(){return this._proto.distanceToParent<2?this.parent:null},t.prototype.isComponentKey=function(e){return this._strategy.isComponentKey(e)},t.prototype.getDependency=function(e,t,r){var n=r.key;if(t instanceof k){var i=r,o=t,a=T.instance();if(n.id===a.viewManagerId)return this._preBuiltObjects.viewManager;if(l.isPresent(i.attributeName))return this._buildAttribute(i);if(l.isPresent(i.queryDecorator))return this._queryStrategy.findQuery(i.queryDecorator).list;if(i.key.id===T.instance().changeDetectorRefId){if(o.metadata instanceof C.ComponentMetadata){var s=this._preBuiltObjects.view.getNestedView(this._preBuiltObjects.elementRef.boundElementIndex);return s.changeDetector.ref}return this._preBuiltObjects.view.changeDetector.ref}if(i.key.id===T.instance().elementRefId)return this.getElementRef(); if(i.key.id===T.instance().viewContainerId)return this.getViewContainerRef();if(i.key.id===T.instance().templateRefId){if(l.isBlank(this._preBuiltObjects.templateRef)){if(i.optional)return null;throw new f.NoProviderError(null,i.key)}return this._preBuiltObjects.templateRef}}else if(t instanceof x.PipeProvider&&r.key.id===T.instance().changeDetectorRefId){var s=this._preBuiltObjects.view.getNestedView(this._preBuiltObjects.elementRef.boundElementIndex);return s.changeDetector.ref}return h.UNDEFINED},t.prototype._buildAttribute=function(e){var t=this._proto.attributes;return l.isPresent(t)&&t.has(e.attributeName)?t.get(e.attributeName):null},t.prototype.addDirectivesMatchingQuery=function(e,t){var r=l.isBlank(this._preBuiltObjects)?null:this._preBuiltObjects.templateRef;e.selector===b.TemplateRef&&l.isPresent(r)&&t.push(r),this._strategy.addDirectivesMatchingQuery(e,t)},t.prototype._buildQueryStrategy=function(){return 0===this._proto.protoQueryRefs.length?W:this._proto.protoQueryRefs.length<=U.NUMBER_OF_SUPPORTED_QUERIES?new U(this):new H(this)},t.prototype.link=function(e){e.addChild(this)},t.prototype.unlink=function(){this.remove()},t.prototype.getDirectiveAtIndex=function(e){return this._injector.getAt(e)},t.prototype.hasInstances=function(){return this._proto.hasBindings&&this.hydrated},t.prototype.getHost=function(){return this._host},t.prototype.getBoundElementIndex=function(){return this._proto.index},t.prototype.getRootViewInjectors=function(){if(!this.hydrated)return[];var e=this._preBuiltObjects.view,t=e.getNestedView(e.elementOffset+this.getBoundElementIndex());return l.isPresent(t)?t.rootElementInjectors:[]},t.prototype.ngAfterViewChecked=function(){this._queryStrategy.updateViewQueries()},t.prototype.ngAfterContentChecked=function(){this._queryStrategy.updateContentQueries()},t.prototype.traverseAndSetQueriesAsDirty=function(){for(var e=this;l.isPresent(e);)e._setQueriesAsDirty(),e=e.parent},t.prototype._setQueriesAsDirty=function(){this._queryStrategy.setContentQueriesAsDirty(),l.isPresent(this._host)&&this._host._queryStrategy.setViewQueriesAsDirty()},t}(A);t.ElementInjector=L;var F=function(){function e(){}return e.prototype.setContentQueriesAsDirty=function(){},e.prototype.setViewQueriesAsDirty=function(){},e.prototype.hydrate=function(){},e.prototype.dehydrate=function(){},e.prototype.updateContentQueries=function(){},e.prototype.updateViewQueries=function(){},e.prototype.findQuery=function(e){throw new u.BaseException("Cannot find query for directive "+e+".")},e}(),W=new F,U=function(){function e(e){var t=e._proto.protoQueryRefs;t.length>0&&(this.query0=new z(t[0],e)),t.length>1&&(this.query1=new z(t[1],e)),t.length>2&&(this.query2=new z(t[2],e))}return e.prototype.setContentQueriesAsDirty=function(){l.isPresent(this.query0)&&!this.query0.isViewQuery&&(this.query0.dirty=!0),l.isPresent(this.query1)&&!this.query1.isViewQuery&&(this.query1.dirty=!0),l.isPresent(this.query2)&&!this.query2.isViewQuery&&(this.query2.dirty=!0)},e.prototype.setViewQueriesAsDirty=function(){l.isPresent(this.query0)&&this.query0.isViewQuery&&(this.query0.dirty=!0),l.isPresent(this.query1)&&this.query1.isViewQuery&&(this.query1.dirty=!0),l.isPresent(this.query2)&&this.query2.isViewQuery&&(this.query2.dirty=!0)},e.prototype.hydrate=function(){l.isPresent(this.query0)&&this.query0.hydrate(),l.isPresent(this.query1)&&this.query1.hydrate(),l.isPresent(this.query2)&&this.query2.hydrate()},e.prototype.dehydrate=function(){l.isPresent(this.query0)&&this.query0.dehydrate(),l.isPresent(this.query1)&&this.query1.dehydrate(),l.isPresent(this.query2)&&this.query2.dehydrate()},e.prototype.updateContentQueries=function(){l.isPresent(this.query0)&&!this.query0.isViewQuery&&this.query0.update(),l.isPresent(this.query1)&&!this.query1.isViewQuery&&this.query1.update(),l.isPresent(this.query2)&&!this.query2.isViewQuery&&this.query2.update()},e.prototype.updateViewQueries=function(){l.isPresent(this.query0)&&this.query0.isViewQuery&&this.query0.update(),l.isPresent(this.query1)&&this.query1.isViewQuery&&this.query1.update(),l.isPresent(this.query2)&&this.query2.isViewQuery&&this.query2.update()},e.prototype.findQuery=function(e){if(l.isPresent(this.query0)&&this.query0.protoQueryRef.query===e)return this.query0;if(l.isPresent(this.query1)&&this.query1.protoQueryRef.query===e)return this.query1;if(l.isPresent(this.query2)&&this.query2.protoQueryRef.query===e)return this.query2;throw new u.BaseException("Cannot find query for directive "+e+".")},e.NUMBER_OF_SUPPORTED_QUERIES=3,e}(),H=function(){function e(e){this.queries=e._proto.protoQueryRefs.map(function(t){return new z(t,e)})}return e.prototype.setContentQueriesAsDirty=function(){for(var e=0;e0?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.getView(),r=t.getNestedView(t.elementOffset+this.originator.getBoundElementIndex());l.isPresent(r)&&this._visitView(r,e)}else this._visit(this.originator,e);this.list.reset(e)},e.prototype._visit=function(e,t){for(var r=e.getView(),n=r.elementOffset+e._proto.index,i=n;in&&(l.isBlank(o)||l.isBlank(o.parent)||r.elementOffset+o.parent._proto.index0&&(u=r[r.length-i]),m.isBlank(u)&&(i=-1),o>0){var d=r[r.length-o];m.isPresent(d)&&(p=d.protoElementInjector)}m.isBlank(p)&&(o=-1);var f=null,h=!1,g=l.directives.map(function(t){return a(e,t)});l instanceof D.BeginComponentCmd?f=g[0]:l instanceof D.EmbeddedTemplateCmd&&(h=!0);var v=null,y=l.variableNameAndValues.length>0;if(g.length>0||y||h){var _=new Map;h||(_=s(l.variableNameAndValues,g)),v=P.ProtoElementInjector.create(p,n,g,m.isPresent(f),o,_),v.attributes=c(l.attrNameAndValues,!1)}return new w.ElementBinder(n,u,i,v,f,t)}function a(e,t){var r=e.resolve(t);return P.DirectiveProvider.createFromType(t,r)}function s(e,t){for(var r=new Map,n=0;no?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},h=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},g=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},m=e("angular2/src/facade/lang"),v=e("angular2/src/core/render/api"),y=e("angular2/src/core/di"),_=e("angular2/src/core/pipes/pipe_provider"),b=e("angular2/src/core/pipes/pipes"),C=e("angular2/src/core/linker/view"),w=e("angular2/src/core/linker/element_binder"),P=e("angular2/src/core/linker/element_injector"),E=e("angular2/src/core/linker/directive_resolver"),S=e("angular2/src/core/linker/view_resolver"),R=e("angular2/src/core/linker/pipe_resolver"),x=e("angular2/src/core/metadata/view"),O=e("angular2/src/core/platform_directives_and_pipes"),D=e("angular2/src/core/linker/template_commands"),T=e("angular2/src/core/render/api"),A=e("angular2/src/core/application_tokens"),I=function(){function e(e,t,r,n,i,o){this._renderer=e,this._platformPipes=t,this._directiveResolver=r,this._viewResolver=n,this._pipeResolver=i,this._appId=o,this._cache=new Map,this._nextTemplateId=0}return e.prototype.clearCache=function(){this._cache.clear()},e.prototype.createHost=function(e){var t=e.template,r=this._cache.get(t.id);if(m.isBlank(r)){var n={},i=this._appId+"-"+this._nextTemplateId++;this._renderer.registerComponentTemplate(new v.RenderComponentTemplate(t.id,i,x.ViewEncapsulation.None,t.commands,[])),r=new C.AppProtoView(t.id,t.commands,C.ViewType.HOST,!0,t.changeDetectorFactory,null,new b.ProtoPipes(n)),this._cache.set(t.id,r)}return r},e.prototype._createComponent=function(e){var t=this,r=this._cache.get(e.templateId);if(m.isBlank(r)){var n=e.directives[0],i=this._viewResolver.resolve(n),o=e.templateGetter(),a=u(o.styles,[]),s=this._appId+"-"+this._nextTemplateId++;this._renderer.registerComponentTemplate(new v.RenderComponentTemplate(o.id,s,e.encapsulation,o.commands,a));var c=this._flattenPipes(i).map(function(e){return t._bindPipe(e)});r=new C.AppProtoView(o.id,o.commands,C.ViewType.COMPONENT,!0,o.changeDetectorFactory,null,b.ProtoPipes.fromProviders(c)),this._cache.set(o.id,r),this._initializeProtoView(r,null)}return r},e.prototype._createEmbeddedTemplate=function(e,t){var r=new C.AppProtoView(t.templateId,e.children,C.ViewType.EMBEDDED,e.isMerged,e.changeDetectorFactory,c(e.variableNameAndValues,!0),new b.ProtoPipes(t.pipes.config));return e.isMerged&&this.initializeProtoViewIfNeeded(r),r},e.prototype.initializeProtoViewIfNeeded=function(e){if(!e.isInitialized()){var t=this._renderer.createProtoView(e.templateId,e.templateCmds);this._initializeProtoView(e,t)}},e.prototype._initializeProtoView=function(e,t){var r=new k(e,this._directiveResolver,this);D.visitAllCommands(r,e.templateCmds);var n=new C.AppProtoViewMergeInfo(r.mergeEmbeddedViewCount,r.mergeElementCount,r.mergeViewCount);e.init(t,r.elementBinders,r.boundTextCount,n,r.variableLocations)},e.prototype._bindPipe=function(e){var t=this._pipeResolver.resolve(e);return _.PipeProvider.createFromType(e,t)},e.prototype._flattenPipes=function(e){var t=[];return m.isPresent(this._platformPipes)&&l(this._platformPipes,t),m.isPresent(e.pipes)&&l(e.pipes,t),t},e=f([y.Injectable(),g(1,y.Optional()),g(1,y.Inject(O.PLATFORM_PIPES)),g(5,y.Inject(A.APP_ID)),h("design:paramtypes",[T.Renderer,Array,E.DirectiveResolver,S.ViewResolver,R.PipeResolver,String])],e)}();t.ProtoViewFactory=I;var k=function(){function e(e,t,r){this._protoView=e,this._directiveResolver=t,this._protoViewFactory=r,this.variableLocations=new Map,this.boundTextCount=0,this.boundElementIndex=0,this.elementBinderStack=[],this.distanceToParentElementBinder=0,this.distanceToParentProtoElementInjector=0,this.elementBinders=[],this.mergeEmbeddedViewCount=0,this.mergeElementCount=0,this.mergeViewCount=1}return e.prototype.visitText=function(e,t){return e.isBound&&this.boundTextCount++,null},e.prototype.visitNgContent=function(e,t){return null},e.prototype.visitBeginElement=function(e,t){return e.isBound?this._visitBeginBoundElement(e,null):this._visitBeginElement(e,null,null),null},e.prototype.visitEndElement=function(e){return this._visitEndElement()},e.prototype.visitBeginComponent=function(e,t){var r=n(this._protoViewFactory,e);return this._visitBeginBoundElement(e,r)},e.prototype.visitEndComponent=function(e){return this._visitEndElement()},e.prototype.visitEmbeddedTemplate=function(e,t){var r=i(this._protoViewFactory,e,this._protoView);return e.isMerged&&this.mergeEmbeddedViewCount++,this._visitBeginBoundElement(e,r),this._visitEndElement()},e.prototype._visitBeginBoundElement=function(e,t){m.isPresent(t)&&t.isMergable&&(this.mergeElementCount+=t.mergeInfo.elementCount,this.mergeViewCount+=t.mergeInfo.viewCount,this.mergeEmbeddedViewCount+=t.mergeInfo.embeddedViewCount);var r=o(this._directiveResolver,t,this.elementBinderStack,this.boundElementIndex,this.distanceToParentElementBinder,this.distanceToParentProtoElementInjector,e);this.elementBinders.push(r);for(var n=r.protoElementInjector,i=0;io?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/core/linker/proto_view_factory"),p=e("angular2/src/core/di"),d=e("angular2/src/facade/lang"),f=e("angular2/src/facade/exceptions"),h=e("angular2/src/facade/async"),g=e("angular2/src/core/reflection/reflection"),m=e("angular2/src/core/linker/template_commands"),v=function(){function e(){}return e}();t.Compiler=v;var y=function(e){function t(t){e.call(this),this._protoViewFactory=t}return s(t,e),t.prototype.compileInHost=function(e){var t=g.reflector.annotations(e),r=t.find(n);if(d.isBlank(r))throw new f.BaseException("No precompiled template for component "+d.stringify(e)+" found");return h.PromiseWrapper.resolve(this._createProtoView(r))},t.prototype._createProtoView=function(e){return this._protoViewFactory.createHost(e).ref},t.prototype.clearCache=function(){this._protoViewFactory.clearCache()},t=c([p.Injectable(),l("design:paramtypes",[u.ProtoViewFactory])],t)}(v);return t.Compiler_=y,t.internalCreateProtoView=i,o.define=a,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._bindings:this._providers},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bindings",{get:function(){return this.providers},enumerable:!0,configurable:!0}),t=a([c.CONST(),s("design:paramtypes",[Object])],t)}(l.InjectableMetadata);t.DirectiveMetadata=p;var d=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.exportAs,p=r.moduleId,d=r.bindings,f=r.providers,h=r.viewBindings,g=r.viewProviders,m=r.changeDetection,v=void 0===m?u.ChangeDetectionStrategy.Default:m,y=r.queries,_=r.templateUrl,b=r.template,C=r.styleUrls,w=r.styles,P=r.directives,E=r.pipes,S=r.encapsulation;e.call(this,{selector:n,inputs:i,outputs:o,properties:a,events:s,host:c,exportAs:l,bindings:d,providers:f,queries:y}),this.changeDetection=v,this._viewProviders=g,this._viewBindings=h,this.templateUrl=_,this.template=b,this.styleUrls=C,this.styles=w,this.directives=P,this.pipes=E,this.encapsulation=S,this.moduleId=p}return o(t,e),Object.defineProperty(t.prototype,"viewProviders",{get:function(){return c.isPresent(this._viewBindings)&&this._viewBindings.length>0?this._viewBindings:this._viewProviders},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"viewBindings",{get:function(){return this.viewProviders},enumerable:!0,configurable:!0}),t=a([c.CONST(),s("design:paramtypes",[Object])],t)}(p);t.ComponentMetadata=d;var f=function(e){function t(t){var r=t.name,n=t.pure;e.call(this),this.name=r,this._pure=n}return o(t,e),Object.defineProperty(t.prototype,"pure",{get:function(){return c.isPresent(this._pure)?this._pure:!0},enumerable:!0,configurable:!0}),t=a([c.CONST(),s("design:paramtypes",[Object])],t)}(l.InjectableMetadata);t.PipeMetadata=f;var h=function(){function e(e){this.bindingPropertyName=e}return e=a([c.CONST(),s("design:paramtypes",[String])],e)}();t.InputMetadata=h;var g=function(){function e(e){this.bindingPropertyName=e}return e=a([c.CONST(),s("design:paramtypes",[String])],e)}();t.OutputMetadata=g;var m=function(){function e(e){this.hostPropertyName=e}return e=a([c.CONST(),s("design:paramtypes",[String])],e)}();t.HostBindingMetadata=m;var v=function(){function e(e,t){this.eventName=e,this.args=t}return e=a([c.CONST(),s("design:paramtypes",[String,Array])],e)}();return t.HostListenerMetadata=v,n.define=i,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/linker/dynamic_component_loader",["angular2/src/core/di","angular2/src/core/linker/compiler","angular2/src/facade/lang","angular2/src/core/linker/view_manager"],!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/core/di"),l=e("angular2/src/core/linker/compiler"),u=e("angular2/src/facade/lang"),p=e("angular2/src/core/linker/view_manager"),d=function(){function e(){}return Object.defineProperty(e.prototype,"hostView",{get:function(){return this.location.parentView},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hostComponent",{get:function(){return this.instance},enumerable:!0,configurable:!0}),e}();t.ComponentRef=d;var f=function(e){function t(t,r,n,i,o){e.call(this),this._dispose=o,this.location=t,this.instance=r,this.componentType=n,this.injector=i}return o(t,e),Object.defineProperty(t.prototype,"hostComponentType",{get:function(){return this.componentType},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this._dispose()},t}(d);t.ComponentRef_=f;var h=function(){function e(){}return e}();t.DynamicComponentLoader=h;var g=function(e){function t(t,r){e.call(this),this._compiler=t,this._viewManager=r}return o(t,e),t.prototype.loadAsRoot=function(e,t,r,n){var i=this;return this._compiler.compileInHost(e).then(function(o){var a=i._viewManager.createRootHostView(o,t,r),s=i._viewManager.getHostElement(a),c=i._viewManager.getComponent(s),l=function(){u.isPresent(n)&&n(),i._viewManager.destroyRootHostView(a)};return new f(s,c,e,r,l)})},t.prototype.loadIntoLocation=function(e,t,r,n){return void 0===n&&(n=null),this.loadNextToLocation(e,this._viewManager.getNamedElementInComponentView(t,r),n)},t.prototype.loadNextToLocation=function(e,t,r){var n=this;return void 0===r&&(r=null),this._compiler.compileInHost(e).then(function(i){var o=n._viewManager.getViewContainer(t),a=o.createHostView(i,o.length,r),s=n._viewManager.getHostElement(a),c=n._viewManager.getComponent(s),l=function(){var e=o.indexOf(a);-1!==e&&o.remove(e)};return new f(s,c,e,null,l)})},t=a([c.Injectable(),s("design:paramtypes",[l.Compiler,p.AppViewManager])],t)}(h);return t.DynamicComponentLoader_=g,n.define=i,r.exports}),System.register("angular2/src/core/metadata",["angular2/src/core/metadata/di","angular2/src/core/metadata/directives","angular2/src/core/metadata/view","angular2/src/core/metadata/di","angular2/src/core/metadata/directives","angular2/src/core/metadata/view","angular2/src/core/util/decorators"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/core/metadata/di");t.QueryMetadata=o.QueryMetadata,t.ContentChildrenMetadata=o.ContentChildrenMetadata,t.ContentChildMetadata=o.ContentChildMetadata,t.ViewChildrenMetadata=o.ViewChildrenMetadata,t.ViewQueryMetadata=o.ViewQueryMetadata,t.ViewChildMetadata=o.ViewChildMetadata,t.AttributeMetadata=o.AttributeMetadata;var a=e("angular2/src/core/metadata/directives");t.ComponentMetadata=a.ComponentMetadata,t.DirectiveMetadata=a.DirectiveMetadata,t.PipeMetadata=a.PipeMetadata,t.InputMetadata=a.InputMetadata,t.OutputMetadata=a.OutputMetadata,t.HostBindingMetadata=a.HostBindingMetadata,t.HostListenerMetadata=a.HostListenerMetadata;var s=e("angular2/src/core/metadata/view");t.ViewMetadata=s.ViewMetadata,t.ViewEncapsulation=s.ViewEncapsulation;var c=e("angular2/src/core/metadata/di"),l=e("angular2/src/core/metadata/directives"),u=e("angular2/src/core/metadata/view"),p=e("angular2/src/core/util/decorators");return t.Component=p.makeDecorator(l.ComponentMetadata,function(e){return e.View=t.View}),t.Directive=p.makeDecorator(l.DirectiveMetadata),t.View=p.makeDecorator(u.ViewMetadata,function(e){return e.View=t.View}),t.Attribute=p.makeParamDecorator(c.AttributeMetadata),t.Query=p.makeParamDecorator(c.QueryMetadata),t.ContentChildren=p.makePropDecorator(c.ContentChildrenMetadata),t.ContentChild=p.makePropDecorator(c.ContentChildMetadata),t.ViewChildren=p.makePropDecorator(c.ViewChildrenMetadata),t.ViewChild=p.makePropDecorator(c.ViewChildMetadata),t.ViewQuery=p.makeParamDecorator(c.ViewQueryMetadata),t.Pipe=p.makeDecorator(l.PipeMetadata),t.Input=p.makePropDecorator(l.InputMetadata),t.Output=p.makePropDecorator(l.OutputMetadata),t.HostBinding=p.makePropDecorator(l.HostBindingMetadata),t.HostListener=p.makePropDecorator(l.HostListenerMetadata),n.define=i,r.exports}),System.register("angular2/src/facade/facade",["angular2/src/facade/lang","angular2/src/facade/async","angular2/src/facade/exceptions","angular2/src/facade/exception_handler"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/facade/lang");t.Type=o.Type;var a=e("angular2/src/facade/async");t.EventEmitter=a.EventEmitter;var s=e("angular2/src/facade/exceptions");t.WrappedException=s.WrappedException;var c=e("angular2/src/facade/exception_handler");return t.ExceptionHandler=c.ExceptionHandler,n.define=i,r.exports}),System.register("angular2/src/core/application_ref",["angular2/src/core/zone/ng_zone","angular2/src/facade/lang","angular2/src/core/di","angular2/src/core/application_tokens","angular2/src/facade/async","angular2/src/facade/collection","angular2/src/core/testability/testability","angular2/src/core/linker/dynamic_component_loader","angular2/src/facade/exceptions","angular2/src/core/linker/view_ref","angular2/src/core/console","angular2/src/core/profile/profile","angular2/src/facade/lang"],!0,function(e,t,r){function n(e){return[g.provide(m.APP_COMPONENT,{useValue:e}),g.provide(m.APP_COMPONENT_REF_PROMISE,{useFactory:function(t,r,n){var i;return t.loadAsRoot(e,null,n,function(){r._unloadComponent(i)}).then(function(e){return i=e,h.isPresent(e.location.nativeElement)&&n.get(_.TestabilityRegistry).registerApplication(e.location.nativeElement,n.get(_.Testability)),e})},deps:[b.DynamicComponentLoader,T,g.Injector]}),g.provide(e,{useFactory:function(e){return e.then(function(e){return e.instance})},deps:[m.APP_COMPONENT_REF_PROMISE]})]}function i(){return new f.NgZone({enableLongStackTrace:h.assertionsEnabled()})}function o(e){if(S.lockMode(),h.isPresent(R)){if(y.ListWrapper.equals(x,e))return R;throw new C.BaseException("platform cannot be initialized with different sets of providers.")}return s(e)}function a(){h.isPresent(R)&&(R.dispose(),R=null)}function s(e){x=e;var t=g.Injector.resolveAndCreate(e);return R=new D(t,function(){R=null,x=null}),c(t),R}function c(e){var t=e.getOptional(m.PLATFORM_INITIALIZER);h.isPresent(t)&&t.forEach(function(e){return e()})}function l(e){var t=e.getOptional(m.APP_INITIALIZER);h.isPresent(t)&&t.forEach(function(e){return e()})}var u=System.global,p=u.define;u.define=void 0;var d=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)},f=e("angular2/src/core/zone/ng_zone"),h=e("angular2/src/facade/lang"),g=e("angular2/src/core/di"),m=e("angular2/src/core/application_tokens"),v=e("angular2/src/facade/async"),y=e("angular2/src/facade/collection"),_=e("angular2/src/core/testability/testability"),b=e("angular2/src/core/linker/dynamic_component_loader"),C=e("angular2/src/facade/exceptions"),w=e("angular2/src/core/linker/view_ref"),P=e("angular2/src/core/console"),E=e("angular2/src/core/profile/profile"),S=e("angular2/src/facade/lang");t.createNgZone=i;var R,x;t.platform=o,t.disposePlatform=a;var O=function(){function e(){}return Object.defineProperty(e.prototype,"injector",{get:function(){return C.unimplemented()},enumerable:!0,configurable:!0}),e}();t.PlatformRef=O;var D=function(e){function t(t,r){e.call(this),this._injector=t,this._dispose=r,this._applications=[],this._disposeListeners=[]}return d(t,e),t.prototype.registerDisposeListener=function(e){this._disposeListeners.push(e)},Object.defineProperty(t.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),t.prototype.application=function(e){var t=this._initApp(i(),e);return t},t.prototype.asyncApplication=function(e,t){var r=this,n=i(),o=v.PromiseWrapper.completer();return n.run(function(){v.PromiseWrapper.then(e(n),function(e){h.isPresent(t)&&(e=y.ListWrapper.concat(e,t)),o.resolve(r._initApp(n,e))})}),o.promise},t.prototype._initApp=function(e,t){var r,n,i=this;return e.run(function(){t=y.ListWrapper.concat(t,[g.provide(f.NgZone,{useValue:e}),g.provide(T,{useFactory:function(){return n},deps:[]})]);var o;try{r=i.injector.resolveAndCreateChild(t),o=r.get(C.ExceptionHandler),e.overrideOnErrorHandler(function(e,t){return o.call(e,t)})}catch(a){h.isPresent(o)?o.call(a,a.stack):h.print(a.toString())}}),n=new A(this,e,r),this._applications.push(n),l(r),n},t.prototype.dispose=function(){y.ListWrapper.clone(this._applications).forEach(function(e){return e.dispose()}),this._disposeListeners.forEach(function(e){return e()}),this._dispose()},t.prototype._applicationDisposed=function(e){y.ListWrapper.remove(this._applications,e)},t}(O);t.PlatformRef_=D;var T=function(){function e(){}return Object.defineProperty(e.prototype,"injector",{get:function(){return C.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"zone",{get:function(){return C.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentTypes",{get:function(){return C.unimplemented()},enumerable:!0,configurable:!0}),e}();t.ApplicationRef=T;var A=function(e){function t(t,r,n){var i=this;e.call(this),this._platform=t,this._zone=r,this._injector=n,this._bootstrapListeners=[],this._disposeListeners=[],this._rootComponents=[],this._rootComponentTypes=[],this._changeDetectorRefs=[],this._runningTick=!1,this._enforceNoNewChanges=!1,h.isPresent(this._zone)&&v.ObservableWrapper.subscribe(this._zone.onTurnDone,function(e){i._zone.run(function(){i.tick()})}),this._enforceNoNewChanges=h.assertionsEnabled()}return d(t,e),t.prototype.registerBootstrapListener=function(e){this._bootstrapListeners.push(e)},t.prototype.registerDisposeListener=function(e){this._disposeListeners.push(e)},t.prototype.registerChangeDetector=function(e){this._changeDetectorRefs.push(e)},t.prototype.unregisterChangeDetector=function(e){y.ListWrapper.remove(this._changeDetectorRefs,e)},t.prototype.bootstrap=function(e,t){var r=this,i=v.PromiseWrapper.completer();return this._zone.run(function(){var o=n(e);h.isPresent(t)&&o.push(t);var a=r._injector.get(C.ExceptionHandler);r._rootComponentTypes.push(e);try{var s=r._injector.resolveAndCreateChild(o),c=s.get(m.APP_COMPONENT_REF_PROMISE),l=function(e){r._loadComponent(e),i.resolve(e)},u=v.PromiseWrapper.then(c,l);h.IS_DART&&v.PromiseWrapper.then(u,function(e){}),v.PromiseWrapper.then(u,null,function(e,t){return i.reject(e,t)})}catch(p){a.call(p,p.stack),i.reject(p,p.stack)}}),i.promise.then(function(e){var t=r._injector.get(P.Console),n=h.assertionsEnabled()?"in the development mode. Call enableProdMode() to enable the production mode.":"in the production mode. Call enableDevMode() to enable the development mode.";return t.log("Angular 2 is running "+n),e})},t.prototype._loadComponent=function(e){var t=w.internalView(e.hostView).changeDetector;this._changeDetectorRefs.push(t.ref),this.tick(),this._rootComponents.push(e),this._bootstrapListeners.forEach(function(t){return t(e)})},t.prototype._unloadComponent=function(e){y.ListWrapper.contains(this._rootComponents,e)&&(this.unregisterChangeDetector(w.internalView(e.hostView).changeDetector.ref),y.ListWrapper.remove(this._rootComponents,e))},Object.defineProperty(t.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"zone",{get:function(){return this._zone},enumerable:!0,configurable:!0}),t.prototype.tick=function(){if(this._runningTick)throw new C.BaseException("ApplicationRef.tick is called recursively");var e=t._tickScope();try{this._runningTick=!0,this._changeDetectorRefs.forEach(function(e){return e.detectChanges()}),this._enforceNoNewChanges&&this._changeDetectorRefs.forEach(function(e){return e.checkNoChanges()})}finally{this._runningTick=!1,E.wtfLeave(e)}},t.prototype.dispose=function(){y.ListWrapper.clone(this._rootComponents).forEach(function(e){return e.dispose()}),this._disposeListeners.forEach(function(e){return e()}),this._platform._applicationDisposed(this)},Object.defineProperty(t.prototype,"componentTypes",{get:function(){return this._rootComponentTypes},enumerable:!0,configurable:!0}),t._tickScope=E.wtfCreateScope("ApplicationRef#tick()"),t}(T);return t.ApplicationRef_=A,u.define=p,r.exports}),System.register("angular2/core",["angular2/src/core/metadata","angular2/src/core/util","angular2/src/core/prod_mode","angular2/src/core/di","angular2/src/facade/facade","angular2/src/facade/lang","angular2/src/core/application_ref","angular2/src/core/application_tokens","angular2/src/core/zone","angular2/src/core/render","angular2/src/core/linker","angular2/src/core/debug/debug_element","angular2/src/core/testability/testability","angular2/src/core/change_detection","angular2/src/core/platform_directives_and_pipes","angular2/src/core/platform_common_providers","angular2/src/core/application_common_providers","angular2/src/core/reflection/reflection"],!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,n(e("angular2/src/core/metadata")),n(e("angular2/src/core/util")),n(e("angular2/src/core/prod_mode")),n(e("angular2/src/core/di")),n(e("angular2/src/facade/facade"));var a=e("angular2/src/facade/lang");t.enableProdMode=a.enableProdMode;var s=e("angular2/src/core/application_ref");t.platform=s.platform,t.createNgZone=s.createNgZone,t.PlatformRef=s.PlatformRef,t.ApplicationRef=s.ApplicationRef;var c=e("angular2/src/core/application_tokens");t.APP_ID=c.APP_ID,t.APP_COMPONENT=c.APP_COMPONENT,t.APP_INITIALIZER=c.APP_INITIALIZER,t.PACKAGE_ROOT_URL=c.PACKAGE_ROOT_URL,t.PLATFORM_INITIALIZER=c.PLATFORM_INITIALIZER,n(e("angular2/src/core/zone")),n(e("angular2/src/core/render")),n(e("angular2/src/core/linker"));var l=e("angular2/src/core/debug/debug_element");return t.DebugElement=l.DebugElement,t.Scope=l.Scope,t.inspectElement=l.inspectElement,t.asNativeElements=l.asNativeElements,n(e("angular2/src/core/testability/testability")),n(e("angular2/src/core/change_detection")),n(e("angular2/src/core/platform_directives_and_pipes")),n(e("angular2/src/core/platform_common_providers")),n(e("angular2/src/core/application_common_providers")),n(e("angular2/src/core/reflection/reflection")),i.define=o,r.exports}),System.register("angular2/src/platform/dom/dom_renderer",["angular2/src/core/di","angular2/src/animate/animation_builder","angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/platform/dom/shared_styles_host","angular2/src/core/profile/profile","angular2/core","angular2/src/platform/dom/events/event_manager","angular2/src/platform/dom/dom_tokens","angular2/src/core/render/view_factory","angular2/src/core/render/view","angular2/src/core/metadata","angular2/src/platform/dom/dom_adapter","angular2/src/platform/dom/util"],!0,function(e,t,r){function n(e){return e}function i(e){return e.nodes}function o(e,t){var r=R.DOM.parentElement(e);if(t.length>0&&m.isPresent(r)){var n=R.DOM.nextSibling(e);if(m.isPresent(n))for(var i=0;io?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},d=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},f=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},h=e("angular2/src/core/di"),g=e("angular2/src/animate/animation_builder"),m=e("angular2/src/facade/lang"),v=e("angular2/src/facade/exceptions"),y=e("angular2/src/platform/dom/shared_styles_host"),_=e("angular2/src/core/profile/profile"),b=e("angular2/core"),C=e("angular2/src/platform/dom/events/event_manager"),w=e("angular2/src/platform/dom/dom_tokens"),P=e("angular2/src/core/render/view_factory"),E=e("angular2/src/core/render/view"),S=e("angular2/src/core/metadata"),R=e("angular2/src/platform/dom/dom_adapter"),x=e("angular2/src/platform/dom/util"),O=m.CONST_EXPR({xlink:"http://www.w3.org/1999/xlink",svg:"http://www.w3.org/2000/svg"}),D="template bindings={}",T=/^template bindings=(.*)$/g,A=function(e){function t(){e.apply(this,arguments)}return u(t,e),t.prototype.getNativeElementSync=function(e){return n(e.renderView).boundElements[e.boundElementIndex]},t.prototype.getRootNodes=function(e){return i(e)},t.prototype.attachFragmentAfterFragment=function(e,t){var r=i(e);if(r.length>0){var n=r[r.length-1],a=i(t);o(n,a),this.animateNodesEnter(a)}},t.prototype.animateNodesEnter=function(e){for(var t=0;to?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=e("angular2/src/common/pipes/invalid_pipe_argument_exception"),u=function(){function e(){}return e.prototype.transform=function(t,r){ if(void 0===r&&(r=null),s.isBlank(t))return t;if(!s.isString(t))throw new l.InvalidPipeArgumentException(e,t);return t.toUpperCase()},e=o([s.CONST(),c.Pipe({name:"uppercase"}),c.Injectable(),a("design:paramtypes",[])],e)}();return t.UpperCasePipe=u,n.define=i,r.exports}),System.register("angular2/src/common/pipes/lowercase_pipe",["angular2/src/facade/lang","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/core"),l=e("angular2/src/common/pipes/invalid_pipe_argument_exception"),u=function(){function e(){}return e.prototype.transform=function(t,r){if(void 0===r&&(r=null),s.isBlank(t))return t;if(!s.isString(t))throw new l.InvalidPipeArgumentException(e,t);return t.toLowerCase()},e=o([s.CONST(),c.Pipe({name:"lowercase"}),c.Injectable(),a("design:paramtypes",[])],e)}();return t.LowerCasePipe=u,n.define=i,r.exports}),System.register("angular2/src/common/pipes/json_pipe",["angular2/src/facade/lang","angular2/core"],!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/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=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/lang"),l=e("angular2/src/facade/exceptions"),u=e("angular2/src/facade/intl"),p=e("angular2/core"),d=e("angular2/src/facade/collection"),f=e("angular2/src/common/pipes/invalid_pipe_argument_exception"),h="en-US",g=c.RegExpWrapper.create("^(\\d+)?\\.((\\d+)(\\-(\\d+))?)?$"),m=function(){function e(){}return e._format=function(t,r,n,i,o){if(void 0===i&&(i=null),void 0===o&&(o=!1),c.isBlank(t))return null;if(!c.isNumber(t))throw new f.InvalidPipeArgumentException(e,t);var a=1,s=0,p=3;if(c.isPresent(n)){var d=c.RegExpWrapper.firstMatch(g,n);if(c.isBlank(d))throw new l.BaseException(n+" is not a valid digit info for number pipes");c.isPresent(d[1])&&(a=c.NumberWrapper.parseIntAutoRadix(d[1])),c.isPresent(d[3])&&(s=c.NumberWrapper.parseIntAutoRadix(d[3])),c.isPresent(d[5])&&(p=c.NumberWrapper.parseIntAutoRadix(d[5]))}return u.NumberFormatter.format(t,h,r,{minimumIntegerDigits:a,minimumFractionDigits:s,maximumFractionDigits:p,currency:i,currencyAsSymbol:o})},e=a([c.CONST(),p.Injectable(),s("design:paramtypes",[])],e)}();t.NumberPipe=m;var v=function(e){function t(){e.apply(this,arguments)}return o(t,e),t.prototype.transform=function(e,t){var r=d.ListWrapper.first(t);return m._format(e,u.NumberFormatStyle.Decimal,r)},t=a([c.CONST(),p.Pipe({name:"number"}),p.Injectable(),s("design:paramtypes",[])],t)}(m);t.DecimalPipe=v;var y=function(e){function t(){e.apply(this,arguments)}return o(t,e),t.prototype.transform=function(e,t){var r=d.ListWrapper.first(t);return m._format(e,u.NumberFormatStyle.Percent,r)},t=a([c.CONST(),p.Pipe({name:"percent"}),p.Injectable(),s("design:paramtypes",[])],t)}(m);t.PercentPipe=y;var _=function(e){function t(){e.apply(this,arguments)}return o(t,e),t.prototype.transform=function(e,t){var r=c.isPresent(t)&&t.length>0?t[0]:"USD",n=c.isPresent(t)&&t.length>1?t[1]:!1,i=c.isPresent(t)&&t.length>2?t[2]:null;return m._format(e,u.NumberFormatStyle.Currency,i,r,n)},t=a([c.CONST(),p.Pipe({name:"currency"}),p.Injectable(),s("design:paramtypes",[])],t)}(m);return t.CurrencyPipe=_,n.define=i,r.exports}),System.register("angular2/src/common/directives/ng_class",["angular2/src/facade/lang","angular2/core","angular2/src/facade/collection"],!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/core"),l=e("angular2/src/facade/collection"),u=function(){function e(e,t,r,n){this._iterableDiffers=e,this._keyValueDiffers=t,this._ngEl=r,this._renderer=n,this._initialClasses=[]}return Object.defineProperty(e.prototype,"initialClasses",{set:function(e){this._applyInitialClasses(!0),this._initialClasses=s.isPresent(e)&&s.isString(e)?e.split(" "):[],this._applyInitialClasses(!1),this._applyClasses(this._rawClass,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rawClass",{set:function(e){this._cleanupClasses(this._rawClass),s.isString(e)&&(e=e.split(" ")),this._rawClass=e,s.isPresent(e)?l.isListLikeIterable(e)?(this._differ=this._iterableDiffers.find(e).create(null),this._mode="iterable"):(this._differ=this._keyValueDiffers.find(e).create(null),this._mode="keyValue"):this._differ=null},enumerable:!0,configurable:!0}),e.prototype.ngDoCheck=function(){if(s.isPresent(this._differ)){var e=this._differ.diff(this._rawClass);s.isPresent(e)&&("iterable"==this._mode?this._applyIterableChanges(e):this._applyKeyValueChanges(e))}},e.prototype.ngOnDestroy=function(){this._cleanupClasses(this._rawClass)},e.prototype._cleanupClasses=function(e){this._applyClasses(e,!0),this._applyInitialClasses(!1)},e.prototype._applyKeyValueChanges=function(e){var t=this;e.forEachAddedItem(function(e){t._toggleClass(e.key,e.currentValue)}),e.forEachChangedItem(function(e){t._toggleClass(e.key,e.currentValue)}),e.forEachRemovedItem(function(e){e.previousValue&&t._toggleClass(e.key,!1)})},e.prototype._applyIterableChanges=function(e){var t=this;e.forEachAddedItem(function(e){t._toggleClass(e.item,!0)}),e.forEachRemovedItem(function(e){t._toggleClass(e.item,!1)})},e.prototype._applyInitialClasses=function(e){var t=this;this._initialClasses.forEach(function(r){return t._toggleClass(r,!e)})},e.prototype._applyClasses=function(e,t){var r=this;s.isPresent(e)&&(s.isArray(e)?e.forEach(function(e){return r._toggleClass(e,!t)}):e instanceof Set?e.forEach(function(e){return r._toggleClass(e,!t)}):l.StringMapWrapper.forEach(e,function(e,n){e&&r._toggleClass(n,!t)}))},e.prototype._toggleClass=function(e,t){if(e=e.trim(),e.length>0)if(e.indexOf(" ")>-1)for(var r=e.split(/\s+/g),n=0,i=r.length;i>n;n++)this._renderer.setElementClass(this._ngEl,r[n],t);else this._renderer.setElementClass(this._ngEl,e,t)},e=o([c.Directive({selector:"[ngClass]",inputs:["rawClass: ngClass","initialClasses: class"]}),a("design:paramtypes",[c.IterableDiffers,c.KeyValueDiffers,c.ElementRef,c.Renderer])],e)}();return t.NgClass=u,n.define=i,r.exports}),System.register("angular2/src/common/directives/ng_for",["angular2/core","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/facade/lang"),l=function(){function e(e,t,r,n){this._viewContainer=e,this._templateRef=t,this._iterableDiffers=r,this._cdr=n}return Object.defineProperty(e.prototype,"ngForOf",{set:function(e){this._ngForOf=e,c.isBlank(this._differ)&&c.isPresent(e)&&(this._differ=this._iterableDiffers.find(e).create(this._cdr))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngForTemplate",{set:function(e){c.isPresent(e)&&(this._templateRef=e)},enumerable:!0,configurable:!0}),e.prototype.ngDoCheck=function(){if(c.isPresent(this._differ)){var e=this._differ.diff(this._ngForOf);c.isPresent(e)&&this._applyChanges(e)}},e.prototype._applyChanges=function(e){var t=[];e.forEachRemovedItem(function(e){return t.push(new u(e,null))}),e.forEachMovedItem(function(e){return t.push(new u(e,null))});var r=this._bulkRemove(t);e.forEachAddedItem(function(e){return r.push(new u(e,null))}),this._bulkInsert(r);for(var n=0;nn;n++)this._viewContainer.get(n).setLocal("last",n===i-1)},e.prototype._perViewChange=function(e,t){e.setLocal("$implicit",t.item),e.setLocal("index",t.currentIndex),e.setLocal("even",t.currentIndex%2==0),e.setLocal("odd",t.currentIndex%2==1)},e.prototype._bulkRemove=function(e){e.sort(function(e,t){return e.record.previousIndex-t.record.previousIndex});for(var t=[],r=e.length-1;r>=0;r--){var n=e[r];c.isPresent(n.record.currentIndex)?(n.view=this._viewContainer.detach(n.record.previousIndex),t.push(n)):this._viewContainer.remove(n.record.previousIndex)}return t},e.prototype._bulkInsert=function(e){e.sort(function(e,t){return e.record.currentIndex-t.record.currentIndex});for(var t=0;to?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/facade/lang"),l=function(){function e(e,t){this._viewContainer=e,this._templateRef=t,this._prevCondition=null}return Object.defineProperty(e.prototype,"ngIf",{set:function(e){!e||!c.isBlank(this._prevCondition)&&this._prevCondition?e||!c.isBlank(this._prevCondition)&&!this._prevCondition||(this._prevCondition=!1,this._viewContainer.clear()):(this._prevCondition=!0,this._viewContainer.createEmbeddedView(this._templateRef))},enumerable:!0,configurable:!0}),e=o([s.Directive({selector:"[ngIf]",inputs:["ngIf"]}),a("design:paramtypes",[s.ViewContainerRef,s.TemplateRef])],e)}();return t.NgIf=l,n.define=i,r.exports}),System.register("angular2/src/common/directives/ng_style",["angular2/core","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/facade/lang"),l=function(){function e(e,t,r){this._differs=e,this._ngEl=t,this._renderer=r}return Object.defineProperty(e.prototype,"rawStyle",{set:function(e){this._rawStyle=e,c.isBlank(this._differ)&&c.isPresent(e)&&(this._differ=this._differs.find(this._rawStyle).create(null))},enumerable:!0,configurable:!0}),e.prototype.ngDoCheck=function(){if(c.isPresent(this._differ)){var e=this._differ.diff(this._rawStyle);c.isPresent(e)&&this._applyChanges(e)}},e.prototype._applyChanges=function(e){var t=this;e.forEachAddedItem(function(e){t._setStyle(e.key,e.currentValue)}),e.forEachChangedItem(function(e){t._setStyle(e.key,e.currentValue)}),e.forEachRemovedItem(function(e){t._setStyle(e.key,null)})},e.prototype._setStyle=function(e,t){this._renderer.setElementStyle(this._ngEl,e,t)},e=o([s.Directive({selector:"[ngStyle]",inputs:["rawStyle: ngStyle"]}),a("design:paramtypes",[s.KeyValueDiffers,s.ElementRef,s.Renderer])],e)}();return t.NgStyle=l,n.define=i,r.exports}),System.register("angular2/src/common/directives/ng_switch",["angular2/core","angular2/src/facade/lang","angular2/src/facade/collection"],!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=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},c=e("angular2/core"),l=e("angular2/src/facade/lang"),u=e("angular2/src/facade/collection"),p=l.CONST_EXPR(new Object),d=function(){function e(e,t){this._viewContainerRef=e,this._templateRef=t}return e.prototype.create=function(){this._viewContainerRef.createEmbeddedView(this._templateRef)},e.prototype.destroy=function(){this._viewContainerRef.clear()},e}(),f=function(){function e(){this._useDefault=!1,this._valueViews=new u.Map,this._activeViews=[]}return Object.defineProperty(e.prototype,"ngSwitch",{set:function(e){this._emptyAllActiveViews(),this._useDefault=!1;var t=this._valueViews.get(e);l.isBlank(t)&&(this._useDefault=!0,t=l.normalizeBlank(this._valueViews.get(p))),this._activateViews(t),this._switchValue=e},enumerable:!0,configurable:!0}),e.prototype._onWhenValueChanged=function(e,t,r){this._deregisterView(e,r),this._registerView(t,r),e===this._switchValue?(r.destroy(),u.ListWrapper.remove(this._activeViews,r)):t===this._switchValue&&(this._useDefault&&(this._useDefault=!1,this._emptyAllActiveViews()),r.create(),this._activeViews.push(r)),0!==this._activeViews.length||this._useDefault||(this._useDefault=!0,this._activateViews(this._valueViews.get(p)))},e.prototype._emptyAllActiveViews=function(){for(var e=this._activeViews,t=0;tt?{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,"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&&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){this._renderer.setElementProperty(this._elementRef,"value",e)},e.prototype.registerOnChange=function(e){this.onChange=function(t){e(l.NumberWrapper.parseFloat(t))}},e.prototype.registerOnTouched=function(e){this.onTouched=e},e=o([s.Directive({selector:"input[type=number][ngControl],input[type=number][ngFormControl],input[type=number][ngModel]",host:{"(change)":"onChange($event.target.value)","(input)":"onChange($event.target.value)","(blur)":"onTouched()"},bindings:[u]}),a("design:paramtypes",[s.Renderer,s.ElementRef])],e)}();return t.NumberValueAccessor=p,n.define=i,r.exports}),System.register("angular2/src/common/forms/directives/checkbox_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){this._renderer.setElementProperty(this._elementRef,"checked",e)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e=o([s.Directive({selector:"input[type=checkbox][ngControl],input[type=checkbox][ngFormControl],input[type=checkbox][ngModel]",host:{"(change)":"onChange($event.target.checked)","(blur)":"onTouched()"},bindings:[u]}),a("design:paramtypes",[s.Renderer,s.ElementRef])],e)}();return t.CheckboxControlValueAccessor=p,n.define=i,r.exports}),System.register("angular2/src/common/forms/directives/select_control_value_accessor",["angular2/core","angular2/src/facade/async","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=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},c=e("angular2/core"),l=e("angular2/src/facade/async"),u=e("angular2/src/common/forms/directives/control_value_accessor"),p=e("angular2/src/facade/lang"),d=p.CONST_EXPR(new c.Provider(u.NG_VALUE_ACCESSOR,{useExisting:c.forwardRef(function(){return h}),multi:!0})),f=function(){function e(){}return e=o([c.Directive({selector:"option"}),a("design:paramtypes",[])],e)}();t.NgSelectOption=f;var h=function(){function e(e,t,r){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){},this._updateValueWhenListOfOptionsChanges(r)}return e.prototype.writeValue=function(e){this.value=e,this._renderer.setElementProperty(this._elementRef,"value",e)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype._updateValueWhenListOfOptionsChanges=function(e){var t=this;l.ObservableWrapper.subscribe(e.changes,function(e){return t.writeValue(t.value)})},e=o([c.Directive({selector:"select[ngControl],select[ngFormControl],select[ngModel]",host:{"(change)":"onChange($event.target.value)","(input)":"onChange($event.target.value)","(blur)":"onTouched()"},bindings:[d]}),s(2,c.Query(f,{descendants:!0})),a("design:paramtypes",[c.Renderer,c.ElementRef,c.QueryList])],e)}();return t.SelectControlValueAccessor=h,n.define=i,r.exports}),System.register("angular2/src/common/forms/directives/normalize_validator",[],!0,function(e,t,r){function n(e){return void 0!==e.validate?function(t){return e.validate(t)}:e}var i=System.global,o=i.define;return i.define=void 0,t.normalizeValidator=n,i.define=o,r.exports}),System.register("angular2/src/common/forms/directives/ng_form_control",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/facade/async","angular2/core","angular2/src/common/forms/directives/ng_control","angular2/src/common/forms/validators","angular2/src/common/forms/directives/control_value_accessor","angular2/src/common/forms/directives/shared"],!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=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},l=e("angular2/src/facade/lang"),u=e("angular2/src/facade/collection"),p=e("angular2/src/facade/async"),d=e("angular2/core"),f=e("angular2/src/common/forms/directives/ng_control"),h=e("angular2/src/common/forms/validators"),g=e("angular2/src/common/forms/directives/control_value_accessor"),m=e("angular2/src/common/forms/directives/shared"),v=l.CONST_EXPR(new d.Provider(f.NgControl,{useExisting:d.forwardRef(function(){return y})})),y=function(e){function t(t,r,n){e.call(this),this._validators=t,this._asyncValidators=r,this.update=new p.EventEmitter,this.valueAccessor=m.selectValueAccessor(this,n)}return o(t,e),t.prototype.ngOnChanges=function(e){this._isControlChanged(e)&&(m.setUpControl(this.form,this),this.form.updateValueAndValidity({emitEvent:!1})),m.isPropertyUpdated(e,this.viewModel)&&(this.form.updateValue(this.model),this.viewModel=this.model)},Object.defineProperty(t.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validator",{get:function(){return m.composeValidators(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"asyncValidator",{get:function(){return m.composeAsyncValidators(this._asyncValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),t.prototype.viewToModelUpdate=function(e){this.viewModel=e,p.ObservableWrapper.callEmit(this.update,e)},t.prototype._isControlChanged=function(e){return u.StringMapWrapper.contains(e,"form")},t=a([d.Directive({selector:"[ngFormControl]",bindings:[v],inputs:["form: ngFormControl","model: ngModel"],outputs:["update: ngModelChange"],exportAs:"ngForm"}),c(0,d.Optional()),c(0,d.Self()),c(0,d.Inject(h.NG_VALIDATORS)),c(1,d.Optional()),c(1,d.Self()),c(1,d.Inject(h.NG_ASYNC_VALIDATORS)),c(2,d.Optional()),c(2,d.Self()),c(2,d.Inject(g.NG_VALUE_ACCESSOR)),s("design:paramtypes",[Array,Array,Array])],t)}(f.NgControl);return t.NgFormControl=y,n.define=i,r.exports}),System.register("angular2/src/common/forms/directives/ng_model",["angular2/src/facade/lang","angular2/src/facade/async","angular2/core","angular2/src/common/forms/directives/control_value_accessor","angular2/src/common/forms/directives/ng_control","angular2/src/common/forms/model","angular2/src/common/forms/validators","angular2/src/common/forms/directives/shared"],!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=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},l=e("angular2/src/facade/lang"),u=e("angular2/src/facade/async"),p=e("angular2/core"),d=e("angular2/src/common/forms/directives/control_value_accessor"),f=e("angular2/src/common/forms/directives/ng_control"),h=e("angular2/src/common/forms/model"),g=e("angular2/src/common/forms/validators"),m=e("angular2/src/common/forms/directives/shared"),v=l.CONST_EXPR(new p.Provider(f.NgControl,{useExisting:p.forwardRef(function(){return y})})),y=function(e){function t(t,r,n){e.call(this),this._validators=t,this._asyncValidators=r,this._control=new h.Control,this._added=!1,this.update=new u.EventEmitter,this.valueAccessor=m.selectValueAccessor(this,n)}return o(t,e),t.prototype.ngOnChanges=function(e){this._added||(m.setUpControl(this._control,this),this._control.updateValueAndValidity({emitEvent:!1}),this._added=!0),m.isPropertyUpdated(e,this.viewModel)&&(this._control.updateValue(this.model),this.viewModel=this.model)},Object.defineProperty(t.prototype,"control",{get:function(){return this._control},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validator",{get:function(){return m.composeValidators(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"asyncValidator",{get:function(){return m.composeAsyncValidators(this._asyncValidators)},enumerable:!0,configurable:!0}),t.prototype.viewToModelUpdate=function(e){this.viewModel=e,u.ObservableWrapper.callEmit(this.update,e)},t=a([p.Directive({selector:"[ngModel]:not([ngControl]):not([ngFormControl])",bindings:[v],inputs:["model: ngModel"],outputs:["update: ngModelChange"],exportAs:"ngForm"}),c(0,p.Optional()),c(0,p.Self()),c(0,p.Inject(g.NG_VALIDATORS)),c(1,p.Optional()),c(1,p.Self()),c(1,p.Inject(g.NG_ASYNC_VALIDATORS)),c(2,p.Optional()),c(2,p.Self()),c(2,p.Inject(d.NG_VALUE_ACCESSOR)),s("design:paramtypes",[Array,Array,Array])],t)}(f.NgControl);return t.NgModel=y,n.define=i,r.exports}),System.register("angular2/src/common/forms/directives/ng_control_group",["angular2/core","angular2/src/facade/lang","angular2/src/common/forms/directives/control_container","angular2/src/common/forms/directives/shared","angular2/src/common/forms/validators"],!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=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},l=e("angular2/core"),u=e("angular2/src/facade/lang"),p=e("angular2/src/common/forms/directives/control_container"),d=e("angular2/src/common/forms/directives/shared"),f=e("angular2/src/common/forms/validators"),h=u.CONST_EXPR(new l.Provider(p.ControlContainer,{useExisting:l.forwardRef(function(){return g})})),g=function(e){function t(t,r,n){e.call(this),this._validators=r,this._asyncValidators=n,this._parent=t}return o(t,e),t.prototype.ngOnInit=function(){this.formDirective.addControlGroup(this)},t.prototype.ngOnDestroy=function(){this.formDirective.removeControlGroup(this)},Object.defineProperty(t.prototype,"control",{get:function(){return this.formDirective.getControlGroup(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return d.controlPath(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"formDirective",{get:function(){return this._parent.formDirective},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validator",{get:function(){return d.composeValidators(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"asyncValidator",{get:function(){return d.composeAsyncValidators(this._asyncValidators)},enumerable:!0,configurable:!0}),t=a([l.Directive({selector:"[ngControlGroup]",providers:[h],inputs:["name: ngControlGroup"],exportAs:"ngForm"}),c(0,l.Host()),c(0,l.SkipSelf()),c(1,l.Optional()),c(1,l.Self()),c(1,l.Inject(f.NG_VALIDATORS)),c(2,l.Optional()),c(2,l.Self()),c(2,l.Inject(f.NG_ASYNC_VALIDATORS)),s("design:paramtypes",[p.ControlContainer,Array,Array])],t)}(p.ControlContainer);return t.NgControlGroup=g,n.define=i,r.exports}),System.register("angular2/src/common/forms/directives/ng_form_model",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/facade/async","angular2/core","angular2/src/common/forms/directives/control_container","angular2/src/common/forms/directives/shared","angular2/src/common/forms/validators"],!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=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},l=e("angular2/src/facade/lang"),u=e("angular2/src/facade/collection"),p=e("angular2/src/facade/async"),d=e("angular2/core"),f=e("angular2/src/common/forms/directives/control_container"),h=e("angular2/src/common/forms/directives/shared"),g=e("angular2/src/common/forms/validators"),m=l.CONST_EXPR(new d.Provider(f.ControlContainer,{useExisting:d.forwardRef(function(){return v})})),v=function(e){function t(t,r){e.call(this),this._validators=t,this._asyncValidators=r,this.form=null,this.directives=[],this.ngSubmit=new p.EventEmitter}return o(t,e),t.prototype.ngOnChanges=function(e){if(u.StringMapWrapper.contains(e,"form")){var t=h.composeValidators(this._validators);this.form.validator=g.Validators.compose([this.form.validator,t]);var r=h.composeAsyncValidators(this._asyncValidators);this.form.asyncValidator=g.Validators.composeAsync([this.form.asyncValidator,r]),this.form.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}this._updateDomValue()},Object.defineProperty(t.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),t.prototype.addControl=function(e){var t=this.form.find(e.path);h.setUpControl(t,e),t.updateValueAndValidity({emitEvent:!1}),this.directives.push(e)},t.prototype.getControl=function(e){return this.form.find(e.path)},t.prototype.removeControl=function(e){u.ListWrapper.remove(this.directives,e)},t.prototype.addControlGroup=function(e){var t=this.form.find(e.path);h.setUpControlGroup(t,e),t.updateValueAndValidity({emitEvent:!1})},t.prototype.removeControlGroup=function(e){},t.prototype.getControlGroup=function(e){return this.form.find(e.path)},t.prototype.updateModel=function(e,t){var r=this.form.find(e.path);r.updateValue(t)},t.prototype.onSubmit=function(){return p.ObservableWrapper.callEmit(this.ngSubmit,null),!1},t.prototype._updateDomValue=function(){var e=this;this.directives.forEach(function(t){var r=e.form.find(t.path);t.valueAccessor.writeValue(r.value)})},t=a([d.Directive({selector:"[ngFormModel]",bindings:[m],inputs:["form: ngFormModel"],host:{"(submit)":"onSubmit()"},outputs:["ngSubmit"],exportAs:"ngForm"}),c(0,d.Optional()),c(0,d.Self()),c(0,d.Inject(g.NG_VALIDATORS)),c(1,d.Optional()),c(1,d.Self()),c(1,d.Inject(g.NG_ASYNC_VALIDATORS)),s("design:paramtypes",[Array,Array])],t)}(f.ControlContainer);return t.NgFormModel=v,n.define=i,r.exports}),System.register("angular2/src/common/forms/directives/ng_form",["angular2/src/facade/async","angular2/src/facade/collection","angular2/src/facade/lang","angular2/core","angular2/src/common/forms/directives/control_container","angular2/src/common/forms/model","angular2/src/common/forms/directives/shared","angular2/src/common/forms/validators"],!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=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},l=e("angular2/src/facade/async"),u=e("angular2/src/facade/collection"),p=e("angular2/src/facade/lang"),d=e("angular2/core"),f=e("angular2/src/common/forms/directives/control_container"),h=e("angular2/src/common/forms/model"),g=e("angular2/src/common/forms/directives/shared"),m=e("angular2/src/common/forms/validators"),v=p.CONST_EXPR(new d.Provider(f.ControlContainer,{useExisting:d.forwardRef(function(){return y})})),y=function(e){function t(t,r){e.call(this),this.ngSubmit=new l.EventEmitter,this.form=new h.ControlGroup({},null,g.composeValidators(t),g.composeAsyncValidators(r))}return o(t,e),Object.defineProperty(t.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"controls",{get:function(){return this.form.controls},enumerable:!0,configurable:!0}),t.prototype.addControl=function(e){var t=this;l.PromiseWrapper.scheduleMicrotask(function(){var r=t._findContainer(e.path),n=new h.Control;g.setUpControl(n,e),r.addControl(e.name,n),n.updateValueAndValidity({emitEvent:!1})})},t.prototype.getControl=function(e){return this.form.find(e.path)},t.prototype.removeControl=function(e){var t=this;l.PromiseWrapper.scheduleMicrotask(function(){var r=t._findContainer(e.path);p.isPresent(r)&&(r.removeControl(e.name),r.updateValueAndValidity({emitEvent:!1}))})},t.prototype.addControlGroup=function(e){var t=this;l.PromiseWrapper.scheduleMicrotask(function(){var r=t._findContainer(e.path),n=new h.ControlGroup({});g.setUpControlGroup(n,e),r.addControl(e.name,n),n.updateValueAndValidity({emitEvent:!1})})},t.prototype.removeControlGroup=function(e){var t=this;l.PromiseWrapper.scheduleMicrotask(function(){var r=t._findContainer(e.path);p.isPresent(r)&&(r.removeControl(e.name),r.updateValueAndValidity({emitEvent:!1}))})},t.prototype.getControlGroup=function(e){return this.form.find(e.path)},t.prototype.updateModel=function(e,t){var r=this;l.PromiseWrapper.scheduleMicrotask(function(){var n=r.form.find(e.path);n.updateValue(t)})},t.prototype.onSubmit=function(){return l.ObservableWrapper.callEmit(this.ngSubmit,null),!1},t.prototype._findContainer=function(e){return e.pop(),u.ListWrapper.isEmpty(e)?this.form:this.form.find(e)},t=a([d.Directive({selector:"form:not([ngNoForm]):not([ngFormModel]),ngForm,[ngForm]",bindings:[v],host:{"(submit)":"onSubmit()"},outputs:["ngSubmit"],exportAs:"ngForm"}),c(0,d.Optional()),c(0,d.Self()),c(0,d.Inject(m.NG_VALIDATORS)),c(1,d.Optional()),c(1,d.Self()),c(1,d.Inject(m.NG_ASYNC_VALIDATORS)),s("design:paramtypes",[Array,Array])],t)}(f.ControlContainer);return t.NgForm=y,n.define=i,r.exports}),System.register("angular2/src/common/forms/directives/ng_control_status",["angular2/core","angular2/src/common/forms/directives/ng_control","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=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},c=e("angular2/core"),l=e("angular2/src/common/forms/directives/ng_control"),u=e("angular2/src/facade/lang"),p=function(){function e(e){this._cd=e}return Object.defineProperty(e.prototype,"ngClassUntouched",{get:function(){return u.isPresent(this._cd.control)?this._cd.control.untouched:!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassTouched",{get:function(){return u.isPresent(this._cd.control)?this._cd.control.touched:!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassPristine",{get:function(){return u.isPresent(this._cd.control)?this._cd.control.pristine:!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassDirty",{get:function(){return u.isPresent(this._cd.control)?this._cd.control.dirty:!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassValid",{get:function(){return u.isPresent(this._cd.control)?this._cd.control.valid:!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassInvalid",{get:function(){return u.isPresent(this._cd.control)?!this._cd.control.valid:!1},enumerable:!0,configurable:!0}),e=o([c.Directive({selector:"[ngControl],[ngModel],[ngFormControl]",host:{"[class.ng-untouched]":"ngClassUntouched","[class.ng-touched]":"ngClassTouched","[class.ng-pristine]":"ngClassPristine","[class.ng-dirty]":"ngClassDirty","[class.ng-valid]":"ngClassValid","[class.ng-invalid]":"ngClassInvalid"}}),s(0,c.Self()),a("design:paramtypes",[l.NgControl])],e)}();return t.NgControlStatus=p,n.define=i,r.exports}),System.register("angular2/src/common/forms/directives/validators",["angular2/core","angular2/src/facade/lang","angular2/src/common/forms/validators","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=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},c=e("angular2/core"),l=e("angular2/src/facade/lang"),u=e("angular2/src/common/forms/validators"),p=e("angular2/src/facade/lang"),d=l.CONST_EXPR(new c.Provider(u.NG_VALIDATORS,{useValue:u.Validators.required,multi:!0})),f=function(){function e(){}return e=o([c.Directive({selector:"[required][ngControl],[required][ngFormControl],[required][ngModel]",providers:[d]}),a("design:paramtypes",[])],e)}();t.RequiredValidator=f;var h=l.CONST_EXPR(new c.Provider(u.NG_VALIDATORS,{ useExisting:c.forwardRef(function(){return g}),multi:!0})),g=function(){function e(e){this._validator=u.Validators.minLength(p.NumberWrapper.parseInt(e,10))}return e.prototype.validate=function(e){return this._validator(e)},e=o([c.Directive({selector:"[minlength][ngControl],[minlength][ngFormControl],[minlength][ngModel]",providers:[h]}),s(0,c.Attribute("minlength")),a("design:paramtypes",[String])],e)}();t.MinLengthValidator=g;var m=l.CONST_EXPR(new c.Provider(u.NG_VALIDATORS,{useExisting:c.forwardRef(function(){return v}),multi:!0})),v=function(){function e(e){this._validator=u.Validators.maxLength(p.NumberWrapper.parseInt(e,10))}return e.prototype.validate=function(e){return this._validator(e)},e=o([c.Directive({selector:"[maxlength][ngControl],[maxlength][ngFormControl],[maxlength][ngModel]",providers:[m]}),s(0,c.Attribute("maxlength")),a("design:paramtypes",[String])],e)}();return t.MaxLengthValidator=v,n.define=i,r.exports}),System.register("angular2/src/common/forms/form_builder",["angular2/core","angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/common/forms/model"],!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/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());this.manager.getZone().runOutsideAngular(function(){c.DOM.on(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.__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/platform/dom/events/event_manager"),s=e("angular2/src/facade/collection"),c={pan:!0,panstart:!0,panmove:!0,panend:!0,pancancel:!0,panleft:!0,panright:!0,panup:!0,pandown:!0,pinch:!0,pinchstart:!0,pinchmove:!0,pinchend:!0,pinchcancel:!0,pinchin:!0,pinchout:!0,press:!0,pressup:!0,rotate:!0,rotatestart:!0,rotatemove:!0,rotateend:!0,rotatecancel:!0,swipe:!0,swipeleft:!0,swiperight:!0,swipeup:!0,swipedown:!0,tap:!0},l=function(e){function t(){e.call(this)}return o(t,e),t.prototype.supports=function(e){return e=e.toLowerCase(),s.StringMapWrapper.contains(c,e)},t}(a.EventManagerPlugin);return t.HammerGesturesPluginCommon=l,n.define=i,r.exports}),System.register("angular2/src/compiler/xhr",[],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=function(){function e(){}return e.prototype.get=function(e){return null},e}();return t.XHR=o,n.define=i,r.exports}),System.register("angular2/src/platform/browser/testability",["angular2/src/facade/lang","angular2/src/platform/dom/dom_adapter","angular2/core"],!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/platform/dom/dom_adapter"),s=e("angular2/core"),c=function(){function e(e){this._testability=e}return e.prototype.isStable=function(){return this._testability.isStable()},e.prototype.whenStable=function(e){this._testability.whenStable(e)},e.prototype.findBindings=function(e,t,r){return this.findProviders(e,t,r)},e.prototype.findProviders=function(e,t,r){return this._testability.findBindings(e,t,r)},e}(),l=function(){function e(){}return e.init=function(){s.setTestabilityGetter(new e)},e.prototype.addToWindow=function(e){o.global.getAngularTestability=function(t,r){void 0===r&&(r=!0);var n=e.findTestabilityInTree(t,r);if(null==n)throw new Error("Could not find testability for element.");return new c(n)},o.global.getAllAngularTestabilities=function(){var t=e.getAllTestabilities();return t.map(function(e){return new c(e)})}},e.prototype.findTestabilityInTree=function(e,t,r){if(null==t)return null;var n=e.getTestability(t);return o.isPresent(n)?n:r?a.DOM.isShadowRoot(t)?this.findTestabilityInTree(e,a.DOM.getHost(t),!0):this.findTestabilityInTree(e,a.DOM.parentElement(t),!0):null},e}();return t.BrowserGetTestability=l,n.define=i,r.exports}),System.register("angular2/src/core/profile/wtf_init",[],!0,function(e,t,r){function n(){}var i=System.global,o=i.define;return i.define=void 0,t.wtfInit=n,i.define=o,r.exports}),System.register("angular2/src/platform/browser/title",["angular2/src/platform/dom/dom_adapter"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/platform/dom/dom_adapter"),a=function(){function e(){}return e.prototype.getTitle=function(){return o.DOM.getTitle()},e.prototype.setTitle=function(e){o.DOM.setTitle(e)},e}();return t.Title=a,n.define=i,r.exports}),System.register("angular2/src/facade/browser",[],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=window;return t.window=o,t.document=window.document,t.location=window.location,t.gc=window.gc?function(){return window.gc()}:function(){return null},t.performance=window.performance?window.performance:null,t.Event=window.Event,t.MouseEvent=window.MouseEvent,t.KeyboardEvent=window.KeyboardEvent,t.EventTarget=window.EventTarget,t.History=window.History,t.Location=window.Location,t.EventListener=window.EventListener,n.define=i,r.exports}),System.register("angular2/src/compiler/url_resolver",["angular2/src/core/di","angular2/src/facade/lang","angular2/src/core/application_tokens","angular2/src/core/di"],!0,function(e,t,r){function n(){return new _}function i(e){var t=a(e);return t&&t[b.Scheme]||""}function o(e,t,r,n,i,o,a){var s=[];return m.isPresent(e)&&s.push(e+":"),m.isPresent(r)&&(s.push("//"),m.isPresent(t)&&s.push(t+"@"),s.push(r),m.isPresent(n)&&s.push(":"+n)),m.isPresent(i)&&s.push(i),m.isPresent(o)&&s.push("?"+o),m.isPresent(a)&&s.push("#"+a),s.join("")}function a(e){return m.RegExpWrapper.firstMatch(C,e)}function s(e){if("/"==e)return"/";for(var t="/"==e[0]?"/":"",r="/"===e[e.length-1]?"/":"",n=e.split("/"),i=[],o=0,a=0;a0?i.pop():o++;break;default:i.push(s)}}if(""==t){for(;o-->0;)i.unshift("..");0===i.length&&i.push(".")}return t+i.join("/")+r}function c(e){var t=e[b.Path];return t=m.isBlank(t)?"":s(t),e[b.Path]=t,o(e[b.Scheme],e[b.UserInfo],e[b.Domain],e[b.Port],t,e[b.QueryData],e[b.Fragment])}function l(e,t){var r=a(encodeURI(t)),n=a(e);if(m.isPresent(r[b.Scheme]))return c(r);r[b.Scheme]=n[b.Scheme];for(var i=b.Scheme;i<=b.Port;i++)m.isBlank(r[i])&&(r[i]=n[i]);if("/"==r[b.Path][0])return c(r);var o=n[b.Path];m.isBlank(o)&&(o="/");var s=o.lastIndexOf("/");return o=o.substring(0,s+1)+r[b.Path],r[b.Path]=o,c(r)}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=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},g=e("angular2/src/core/di"),m=e("angular2/src/facade/lang"),v=e("angular2/src/core/application_tokens"),y=e("angular2/src/core/di");t.createWithoutPackagePrefix=n,t.DEFAULT_PACKAGE_URL_PROVIDER=new y.Provider(v.PACKAGE_ROOT_URL,{useValue:"/"});var _=function(){function e(e){void 0===e&&(e=null),m.isPresent(e)&&(this._packagePrefix=m.StringWrapper.stripRight(e,"/")+"/")}return e.prototype.resolve=function(e,t){var r=t;return m.isPresent(e)&&e.length>0&&(r=l(e,r)),m.isPresent(this._packagePrefix)&&"package"==i(r)&&(r=r.replace("package:",this._packagePrefix)),r},e=d([g.Injectable(),h(0,g.Inject(v.PACKAGE_ROOT_URL)),f("design:paramtypes",[String])],e)}();t.UrlResolver=_,t.getUrlScheme=i;var b,C=m.RegExpWrapper.create("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([\\w\\d\\-\\u0100-\\uffff.%]*)(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");return 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"}(b||(b={})),u.define=p,r.exports}),System.register("angular2/src/compiler/selector",["angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/facade/exceptions"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/facade/collection"),a=e("angular2/src/facade/lang"),s=e("angular2/src/facade/exceptions"),c="",l=a.RegExpWrapper.create("(\\:not\\()|([-\\w]+)|(?:\\.([-\\w]+))|(?:\\[([-\\w*]+)(?:=([^\\]]*))?\\])|(\\))|(\\s*,\\s*)"),u=function(){function e(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}return e.parse=function(t){for(var r,n=[],i=function(e,t){t.notSelectors.length>0&&a.isBlank(t.element)&&o.ListWrapper.isEmpty(t.classNames)&&o.ListWrapper.isEmpty(t.attrs)&&(t.element="*"),e.push(t)},c=new e,u=a.RegExpWrapper.matcher(l,t),p=c,d=!1;a.isPresent(r=a.RegExpMatcherWrapper.next(u));){if(a.isPresent(r[1])){if(d)throw new s.BaseException("Nesting :not is not allowed in a selector");d=!0,p=new e,c.notSelectors.push(p)}if(a.isPresent(r[2])&&p.setElement(r[2]),a.isPresent(r[3])&&p.addClassName(r[3]),a.isPresent(r[4])&&p.addAttribute(r[4],r[5]),a.isPresent(r[6])&&(d=!1,p=c),a.isPresent(r[7])){if(d)throw new s.BaseException("Multiple selectors in :not are not supported");i(n,c),c=p=new e}}return i(n,c),n},e.prototype.isElementSelector=function(){return a.isPresent(this.element)&&o.ListWrapper.isEmpty(this.classNames)&&o.ListWrapper.isEmpty(this.attrs)&&0===this.notSelectors.length},e.prototype.setElement=function(e){void 0===e&&(e=null),this.element=e},e.prototype.getMatchingElementTemplate=function(){for(var e=a.isPresent(this.element)?this.element:"div",t=this.classNames.length>0?' class="'+this.classNames.join(" ")+'"':"",r="",n=0;n"},e.prototype.addAttribute=function(e,t){void 0===t&&(t=c),this.attrs.push(e),t=a.isPresent(t)?t.toLowerCase():c,this.attrs.push(t)},e.prototype.addClassName=function(e){this.classNames.push(e.toLowerCase())},e.prototype.toString=function(){var e="";if(a.isPresent(this.element)&&(e+=this.element),a.isPresent(this.classNames))for(var t=0;t0&&(e+="="+n),e+="]"}return this.notSelectors.forEach(function(t){return e+=":not("+t+")"}),e},e}();t.CssSelector=u;var p=function(){function e(){this._elementMap=new o.Map,this._elementPartialMap=new o.Map,this._classMap=new o.Map,this._classPartialMap=new o.Map,this._attrValueMap=new o.Map,this._attrValuePartialMap=new o.Map,this._listContexts=[]}return e.createNotMatcher=function(t){var r=new e;return r.addSelectables(t,null),r},e.prototype.addSelectables=function(e,t){var r=null;e.length>1&&(r=new d(e),this._listContexts.push(r));for(var n=0;n0&&(a.isBlank(this.listContext)||!this.listContext.alreadyMatched)){var n=p.createNotMatcher(this.notSelectors);r=!n.match(e,null)}return r&&a.isPresent(t)&&(a.isBlank(this.listContext)||!this.listContext.alreadyMatched)&&(a.isPresent(this.listContext)&&(this.listContext.alreadyMatched=!0),t(this.selector,this.cbContext)),r},e}();return t.SelectorContext=f,n.define=i,r.exports}),System.register("angular2/src/compiler/util",["angular2/src/facade/lang"],!0,function(e,t,r){function n(e){return g.StringWrapper.replaceAllMapped(e,m,function(e){return"-"+e[1].toLowerCase()})}function i(e){return g.StringWrapper.replaceAllMapped(e,v,function(e){return e[1].toUpperCase()})}function o(e){return g.isBlank(e)?null:"'"+s(e,y)+"'"}function a(e){return g.isBlank(e)?null:'"'+s(e,_)+'"'}function s(e,t){return g.StringWrapper.replaceAllMapped(e,t,function(e){return"$"==e[0]?g.IS_DART?"\\$":"$":"\n"==e[0]?"\\n":"\r"==e[0]?"\\r":"\\"+e[0]})}function c(e){return g.IS_DART?"const "+e+" = ":"var "+e+" = exports['"+e+"'] = "}function l(e){return g.IS_DART?"const "+e:"new "+e}function u(e,t,r){return void 0===r&&(r=""),g.IS_DART?r+"("+e.join(",")+") => "+t:"function "+r+"("+e.join(",")+") { return "+t+"; }"}function p(e){return g.IS_DART?"'${"+e+"}'":e}function d(e,t){var r=g.StringWrapper.split(e.trim(),/\s*:\s*/g);return r.length>1?r:t}var f=System.global,h=f.define;f.define=void 0;var g=e("angular2/src/facade/lang"),m=/([A-Z])/g,v=/-([a-z])/g,y=/'|\\|\n|\r|\$/g,_=/"|\\|\n|\r|\$/g;return t.MODULE_SUFFIX=g.IS_DART?".dart":".js",t.camelCaseToDashCase=n,t.dashCaseToCamelCase=i,t.escapeSingleQuoteString=o,t.escapeDoubleQuoteString=a,t.codeGenExportVariable=c,t.codeGenConstConstructorCall=l,t.codeGenValueFn=u,t.codeGenToString=p,t.splitAtColon=d,f.define=h,r.exports}),System.register("angular2/src/compiler/source_module",["angular2/src/facade/lang"],!0,function(e,t,r){function n(e){return"#MODULE["+e+"]"}var i=System.global,o=i.define;i.define=void 0;var a=e("angular2/src/facade/lang"),s=/#MODULE\[([^\]]*)\]/g;t.moduleRef=n;var c=function(){function e(e,t){this.moduleUrl=e,this.sourceWithModuleRefs=t}return e.prototype.getSourceWithImports=function(){var e=this,t={},r=[],n=a.StringWrapper.replaceAllMapped(this.sourceWithModuleRefs,s,function(n){var i=n[1],o=t[i];return a.isBlank(o)&&(i==e.moduleUrl?o="":(o="import"+r.length,r.push([i,o])),t[i]=o),o.length>0?o+".":""});return new p(n,r)},e}();t.SourceModule=c;var l=function(){function e(e,t){this.declarations=e,this.expression=t}return e}();t.SourceExpression=l;var u=function(){function e(e,t){this.declarations=e,this.expressions=t}return e}();t.SourceExpressions=u;var p=function(){function e(e,t){this.source=e,this.imports=t}return e}();return t.SourceWithImports=p,i.define=o,r.exports}),System.register("angular2/src/compiler/template_ast",["angular2/src/facade/lang"],!0,function(e,t,r){function n(e,t,r){void 0===r&&(r=null);var n=[];return t.forEach(function(t){var i=t.visit(e,r);a.isPresent(i)&&n.push(i)}),n}var i=System.global,o=i.define;i.define=void 0;var a=e("angular2/src/facade/lang"),s=function(){function e(e,t,r){this.value=e,this.ngContentIndex=t,this.sourceSpan=r}return e.prototype.visit=function(e,t){return e.visitText(this,t)},e}();t.TextAst=s;var c=function(){function e(e,t,r){this.value=e,this.ngContentIndex=t,this.sourceSpan=r}return e.prototype.visit=function(e,t){return e.visitBoundText(this,t)},e}();t.BoundTextAst=c;var l=function(){function e(e,t,r){this.name=e,this.value=t,this.sourceSpan=r}return e.prototype.visit=function(e,t){return e.visitAttr(this,t)},e}();t.AttrAst=l;var u=function(){function e(e,t,r,n,i){this.name=e,this.type=t,this.value=r,this.unit=n,this.sourceSpan=i}return e.prototype.visit=function(e,t){return e.visitElementProperty(this,t)},e}();t.BoundElementPropertyAst=u;var p=function(){function e(e,t,r,n){this.name=e,this.target=t,this.handler=r,this.sourceSpan=n}return e.prototype.visit=function(e,t){return e.visitEvent(this,t)},Object.defineProperty(e.prototype,"fullName",{get:function(){return a.isPresent(this.target)?this.target+":"+this.name:this.name},enumerable:!0,configurable:!0}),e}();t.BoundEventAst=p;var d=function(){function e(e,t,r){this.name=e,this.value=t,this.sourceSpan=r}return e.prototype.visit=function(e,t){return e.visitVariable(this,t)},e}();t.VariableAst=d;var f=function(){function e(e,t,r,n,i,o,a,s,c){this.name=e,this.attrs=t,this.inputs=r,this.outputs=n,this.exportAsVars=i,this.directives=o,this.children=a,this.ngContentIndex=s,this.sourceSpan=c}return e.prototype.visit=function(e,t){return e.visitElement(this,t)},e.prototype.isBound=function(){return this.inputs.length>0||this.outputs.length>0||this.exportAsVars.length>0||this.directives.length>0},e.prototype.getComponent=function(){return this.directives.length>0&&this.directives[0].directive.isComponent?this.directives[0].directive:null},e}();t.ElementAst=f;var h=function(){function e(e,t,r,n,i,o,a){this.attrs=e,this.outputs=t,this.vars=r,this.directives=n,this.children=i,this.ngContentIndex=o,this.sourceSpan=a}return e.prototype.visit=function(e,t){return e.visitEmbeddedTemplate(this,t)},e}();t.EmbeddedTemplateAst=h;var g=function(){function e(e,t,r,n){this.directiveName=e,this.templateName=t,this.value=r,this.sourceSpan=n}return e.prototype.visit=function(e,t){return e.visitDirectiveProperty(this,t)},e}();t.BoundDirectivePropertyAst=g;var m=function(){function e(e,t,r,n,i,o){this.directive=e,this.inputs=t,this.hostProperties=r,this.hostEvents=n,this.exportAsVars=i,this.sourceSpan=o}return e.prototype.visit=function(e,t){return e.visitDirective(this,t)},e}();t.DirectiveAst=m;var v=function(){function e(e,t,r){this.index=e,this.ngContentIndex=t,this.sourceSpan=r}return e.prototype.visit=function(e,t){return e.visitNgContent(this,t)},e}();return t.NgContentAst=v,function(e){e[e.Property=0]="Property",e[e.Attribute=1]="Attribute",e[e.Class=2]="Class",e[e.Style=3]="Style"}(t.PropertyBindingType||(t.PropertyBindingType={})),t.PropertyBindingType,t.templateVisitAll=n,i.define=o,r.exports}),System.register("angular2/src/transform/template_compiler/change_detector_codegen",[],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=function(){function e(e){}return e.prototype.generate=function(e,t,r){throw"Not implemented in JS"},e.prototype.toString=function(){throw"Not implemented in JS"},e}();return t.Codegen=o,n.define=i,r.exports}),System.register("angular2/src/compiler/shadow_css",["angular2/src/facade/collection","angular2/src/facade/lang"],!0,function(e,t,r){function n(e){return l.StringWrapper.replaceAllMapped(e,S,function(e){return""})}function i(e,t){var r=o(e),n=0;return l.StringWrapper.replaceAllMapped(r.escapedString,R,function(e){var i=e[2],o="",a=e[4],s="";l.isPresent(e[4])&&e[4].startsWith("{"+T)&&(o=r.blocks[n++],a=e[4].substring(T.length+1),s="{");var c=t(new A(i,o));return""+e[1]+c.selector+e[3]+s+c.content+a})}function o(e){for(var t=l.StringWrapper.split(e,x),r=[],n=[],i=0,o=[],a=0;a0?o.push(s):(o.length>0&&(n.push(o.join("")),r.push(T),o=[]),r.push(s)),s==O&&i++}return o.length>0&&(n.push(o.join("")),r.push(T)),new I(r.join(""),n)}var a=System.global,s=a.define;a.define=void 0;var c=e("angular2/src/facade/collection"),l=e("angular2/src/facade/lang"),u=function(){function e(){this.strictStyling=!0}return e.prototype.shimCssText=function(e,t,r){return void 0===r&&(r=""),e=n(e),e=this._insertDirectives(e),this._scopeCssText(e,t,r)},e.prototype._insertDirectives=function(e){return e=this._insertPolyfillDirectivesInCssText(e),this._insertPolyfillRulesInCssText(e)},e.prototype._insertPolyfillDirectivesInCssText=function(e){return l.StringWrapper.replaceAllMapped(e,p,function(e){return e[1]+"{"})},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","+","~"],i=e,o="["+t+"]",a=0;a0&&!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="}",T="%BLOCK%",A=function(){function e(e,t){this.selector=e,this.content=t}return e}();t.CssRule=A,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=function(){function e(e,t){this.style=e,this.styleUrls=t}return e}();t.StyleWithImports=c,t.isStyleUrlResolvable=n,t.extractStyleUrls=i;var l=/@import\s+(?:url\()?\s*(?:(?:['"]([^'"]*))|([^;\)\s]*))[^;]*;?/g,u=/^([a-zA-Z\-\+\.]+):/g;return o.define=a,r.exports}),System.register("angular2/src/compiler/command_compiler",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/core/linker/template_commands","angular2/src/compiler/template_ast","angular2/src/compiler/source_module","angular2/src/compiler/util","angular2/src/core/di"],!0,function(e,t,r){function n(e,t,r){return _.templateVisitAll(e,t,r),r}function i(e){for(var t=new Set,r=[],n=0;no?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},g=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},m=e("angular2/src/facade/lang"),v=e("angular2/src/facade/collection"),y=e("angular2/src/core/linker/template_commands"),_=e("angular2/src/compiler/template_ast"),b=e("angular2/src/compiler/source_module"),C=e("angular2/src/compiler/util"),w=e("angular2/src/core/di");t.TEMPLATE_COMMANDS_MODULE_REF=b.moduleRef("package:angular2/src/core/linker/template_commands"+C.MODULE_SUFFIX);var P="$implicit",E="class",S="style",R=function(){function e(){}return e.prototype.compileComponentRuntime=function(e,t,r,n){var i=new D(new x(e,n,r),0);return _.templateVisitAll(i,t),i.result},e.prototype.compileComponentCodeGen=function(e,t,r,n){var i=new D(new O(e,n,r),0);return _.templateVisitAll(i,t),new b.SourceExpression([],l(i.result))},e=h([w.Injectable(),g("design:paramtypes",[])],e)}();t.CommandCompiler=R;var x=function(){function e(e,t,r){this.component=e,this.componentTemplateFactory=t,this.changeDetectorFactories=r}return e.prototype._mapDirectives=function(e){return e.map(function(e){return e.type.runtime})},e.prototype.createText=function(e,t,r){return new y.TextCmd(e,t,r)},e.prototype.createNgContent=function(e,t){return new y.NgContentCmd(e,t)},e.prototype.createBeginElement=function(e,t,r,n,i,o,a){return new y.BeginElementCmd(e,t,r,n,this._mapDirectives(i),o,a)},e.prototype.createEndElement=function(){return new y.EndElementCmd},e.prototype.createBeginComponent=function(e,t,r,n,i,o,a){var s=this.componentTemplateFactory(i[0]);return new y.BeginComponentCmd(e,t,r,n,this._mapDirectives(i),o,a,s)},e.prototype.createEndComponent=function(){return new y.EndComponentCmd},e.prototype.createEmbeddedTemplate=function(e,t,r,n,i,o,a){return new y.EmbeddedTemplateCmd(t,r,this._mapDirectives(n),i,o,this.changeDetectorFactories[e],a)},e}(),O=function(){function e(e,t,r){this.component=e,this.componentTemplateFactory=t,this.changeDetectorFactoryExpressions=r}return e.prototype.createText=function(e,r,n){return new A(C.codeGenConstConstructorCall(t.TEMPLATE_COMMANDS_MODULE_REF+"TextCmd")+"("+C.escapeSingleQuoteString(e)+", "+r+", "+n+")")},e.prototype.createNgContent=function(e,r){return new A(C.codeGenConstConstructorCall(t.TEMPLATE_COMMANDS_MODULE_REF+"NgContentCmd")+"("+e+", "+r+")")},e.prototype.createBeginElement=function(e,r,n,i,o,a,s){var c=l(r);return new A(C.codeGenConstConstructorCall(t.TEMPLATE_COMMANDS_MODULE_REF+"BeginElementCmd")+"("+C.escapeSingleQuoteString(e)+", "+c+", "+(l(n)+", "+l(i)+", "+u(o)+", "+a+", "+s+")"))},e.prototype.createEndElement=function(){return new A(C.codeGenConstConstructorCall(t.TEMPLATE_COMMANDS_MODULE_REF+"EndElementCmd")+"()")},e.prototype.createBeginComponent=function(e,r,n,i,o,a,s){var c=l(r);return new A(C.codeGenConstConstructorCall(t.TEMPLATE_COMMANDS_MODULE_REF+"BeginComponentCmd")+"("+C.escapeSingleQuoteString(e)+", "+c+", "+(l(n)+", "+l(i)+", "+u(o)+", "+p(a)+", "+s+", "+this.componentTemplateFactory(o[0])+")"))},e.prototype.createEndComponent=function(){return new A(C.codeGenConstConstructorCall(t.TEMPLATE_COMMANDS_MODULE_REF+"EndComponentCmd")+"()")},e.prototype.createEmbeddedTemplate=function(e,r,n,i,o,a,s){return new A(C.codeGenConstConstructorCall(t.TEMPLATE_COMMANDS_MODULE_REF+"EmbeddedTemplateCmd")+"("+l(r)+", "+l(n)+", "+(u(i)+", "+o+", "+a+", "+this.changeDetectorFactoryExpressions[e]+", "+l(s)+")"))},e}(),D=function(){function e(e,t){this.commandFactory=e,this.embeddedTemplateIndex=t,this.result=[],this.transitiveNgContentCount=0}return e.prototype._readAttrNameAndValues=function(e,t){var r=o(n(this,t,[]));return e.forEach(function(e){v.StringMapWrapper.forEach(e.hostAttributes,function(e,t){var n=r[t];r[t]=m.isPresent(n)?s(t,n,e):e})}),a(r)},e.prototype.visitNgContent=function(e,t){return this.transitiveNgContentCount++,this.result.push(this.commandFactory.createNgContent(e.index,e.ngContentIndex)),null},e.prototype.visitEmbeddedTemplate=function(t,r){var n=this;this.embeddedTemplateIndex++;var i=new e(this.commandFactory,this.embeddedTemplateIndex);_.templateVisitAll(i,t.children);var o=i.transitiveNgContentCount>0,a=[];t.vars.forEach(function(e){a.push(e.name),a.push(e.value.length>0?e.value:P)});var s=[];return v.ListWrapper.forEachWithIndex(t.directives,function(e,t){e.visit(n,new T(t,[],[],s))}),this.result.push(this.commandFactory.createEmbeddedTemplate(this.embeddedTemplateIndex,this._readAttrNameAndValues(s,t.attrs),a,s,o,t.ngContentIndex,i.result)),this.transitiveNgContentCount+=i.transitiveNgContentCount,this.embeddedTemplateIndex=i.embeddedTemplateIndex,null},e.prototype.visitElement=function(e,t){var r=this,o=e.getComponent(),a=n(this,e.outputs,[]),s=[];m.isBlank(o)&&e.exportAsVars.forEach(function(e){s.push(e.name),s.push(null)});var c=[];v.ListWrapper.forEachWithIndex(e.directives,function(e,t){e.visit(r,new T(t,a,s,c))}),a=i(a);var l=this._readAttrNameAndValues(c,e.attrs);return m.isPresent(o)?(this.result.push(this.commandFactory.createBeginComponent(e.name,l,a,s,c,o.template.encapsulation,e.ngContentIndex)),_.templateVisitAll(this,e.children),this.result.push(this.commandFactory.createEndComponent())):(this.result.push(this.commandFactory.createBeginElement(e.name,l,a,s,c,e.isBound(),e.ngContentIndex)),_.templateVisitAll(this,e.children),this.result.push(this.commandFactory.createEndElement())),null},e.prototype.visitVariable=function(e,t){return null},e.prototype.visitAttr=function(e,t){return t.push(e.name),t.push(e.value),null},e.prototype.visitBoundText=function(e,t){return this.result.push(this.commandFactory.createText(null,!0,e.ngContentIndex)),null},e.prototype.visitText=function(e,t){return this.result.push(this.commandFactory.createText(e.value,!1,e.ngContentIndex)),null},e.prototype.visitDirective=function(e,t){return t.targetDirectives.push(e.directive),_.templateVisitAll(this,e.hostEvents,t.eventTargetAndNames),e.exportAsVars.forEach(function(e){t.targetVariableNameAndValues.push(e.name),t.targetVariableNameAndValues.push(t.index)}),null},e.prototype.visitEvent=function(e,t){return t.push(e.target),t.push(e.name),null},e.prototype.visitDirectiveProperty=function(e,t){return null},e.prototype.visitElementProperty=function(e,t){return null},e}(),T=function(){function e(e,t,r,n){this.index=e,this.eventTargetAndNames=t,this.targetVariableNameAndValues=r,this.targetDirectives=n}return e}(),A=function(){function e(e){this.value=e}return e}();return d.define=f,r.exports}),System.register("angular2/src/compiler/html_ast",["angular2/src/facade/lang"],!0,function(e,t,r){function n(e,t,r){void 0===r&&(r=null);var n=[];return t.forEach(function(t){var i=t.visit(e,r);a.isPresent(i)&&n.push(i)}),n}var i=System.global,o=i.define;i.define=void 0;var a=e("angular2/src/facade/lang"),s=function(){function e(e,t){this.value=e,this.sourceSpan=t}return e.prototype.visit=function(e,t){return e.visitText(this,t)},e}();t.HtmlTextAst=s;var c=function(){function e(e,t,r){this.name=e,this.value=t,this.sourceSpan=r}return e.prototype.visit=function(e,t){return e.visitAttr(this,t)},e}();t.HtmlAttrAst=c;var l=function(){function e(e,t,r,n){this.name=e,this.attrs=t,this.children=r,this.sourceSpan=n}return e.prototype.visit=function(e,t){return e.visitElement(this,t)},e}();return t.HtmlElementAst=l,t.htmlVisitAll=n,i.define=o,r.exports}),System.register("angular2/src/compiler/parse_util",[],!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.file=e,this.offset=t,this.line=r,this.col=n}return e.prototype.toString=function(){return this.file.url+"@"+this.line+":"+this.col},e}();t.ParseLocation=o;var a=function(){function e(e,t){this.content=e,this.url=t}return e}();t.ParseSourceFile=a;var s=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 r=t,n=0,i=0;100>n&&t>0&&(t--,n++,"\n"!=e[t]||3!=++i););for(n=0,i=0;100>n&&r]"+e.substring(this.location.offset,r+1);return this.msg+' ("'+o+'"): '+this.location},e}();t.ParseError=s;var c=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}();return t.ParseSourceSpan=c,n.define=i,r.exports}),System.register("angular2/src/compiler/html_tags",["angular2/src/facade/lang"],!0,function(e,t,r){function n(e){var t=p[e.toLowerCase()];return c.isPresent(t)?t:d}function i(e){if("@"!=e[0])return[null,e];var t=c.RegExpWrapper.firstMatch(f,e);return[t[1],t[2]]}function o(e){return i(e)[0]}var a=System.global,s=a.define;a.define=void 0;var c=e("angular2/src/facade/lang");t.NAMED_ENTITIES=c.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 l=t.HtmlTagContentType,u=function(){function e(e){var t=this,r=void 0===e?{}:e,n=r.closedByChildren,i=r.requiredParents,o=r.implicitNamespacePrefix,a=r.contentType,s=r.closedByParent,u=r.isVoid,p=r.ignoreFirstLf;this.closedByChildren={},this.closedByParent=!1,c.isPresent(n)&&n.length>0&&n.forEach(function(e){return t.closedByChildren[e]=!0}),this.isVoid=c.normalizeBool(u),this.closedByParent=c.normalizeBool(s)||this.isVoid,c.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=c.isPresent(a)?a:l.PARSABLE_DATA,this.ignoreFirstLf=c.normalizeBool(p)}return e.prototype.requireExtraParent=function(e){if(c.isBlank(this.requiredParents))return!1;if(c.isBlank(e))return!0;var t=e.toLowerCase();return 1!=this.requiredParents[t]&&"template"!=t},e.prototype.isClosedByChild=function(e){return this.isVoid||c.normalizeBool(this.closedByChildren[e.toLowerCase()])},e}();t.HtmlTagDefinition=u;var p={area:new u({isVoid:!0}),embed:new u({isVoid:!0}),link:new u({isVoid:!0}),img:new u({isVoid:!0}),input:new u({isVoid:!0}),param:new u({isVoid:!0}),hr:new u({isVoid:!0}),br:new u({isVoid:!0}),source:new u({isVoid:!0}),track:new u({isVoid:!0}),wbr:new u({isVoid:!0}),p:new u({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new u({closedByChildren:["tbody","tfoot"]}),tbody:new u({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new u({closedByChildren:["tbody"],closedByParent:!0}),tr:new u({closedByChildren:["tr"],requiredParents:["tbody","tfoot","thead"],closedByParent:!0}),td:new u({closedByChildren:["td","th"],closedByParent:!0}),th:new u({closedByChildren:["td","th"],closedByParent:!0}),col:new u({requiredParents:["colgroup"],isVoid:!0}),svg:new u({implicitNamespacePrefix:"svg"}),math:new u({implicitNamespacePrefix:"math"}),li:new u({closedByChildren:["li"],closedByParent:!0}),dt:new u({closedByChildren:["dt","dd"]}),dd:new u({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new u({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new u({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new u({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new u({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new u({closedByChildren:["optgroup"],closedByParent:!0}),option:new u({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new u({ignoreFirstLf:!0}),listing:new u({ignoreFirstLf:!0}),style:new u({contentType:l.RAW_TEXT}),script:new u({contentType:l.RAW_TEXT}),title:new u({contentType:l.ESCAPABLE_RAW_TEXT}),textarea:new u({contentType:l.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})},d=new u;t.getHtmlTagDefinition=n;var f=/^@([^:]+):(.+)/g;return t.splitNsName=i,t.getNsPrefix=o,a.define=s,r.exports}),System.register("angular2/src/compiler/schema/element_schema_registry",[],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=function(){function e(){}return e.prototype.hasProperty=function(e,t){return!0},e.prototype.getMappedPropName=function(e){return e},e}();return t.ElementSchemaRegistry=o,n.define=i,r.exports}),System.register("angular2/src/compiler/template_preparser",["angular2/src/facade/lang","angular2/src/compiler/html_tags"],!0,function(e,t,r){function n(e){var t=null,r=null,n=null,o=!1;e.attrs.forEach(function(e){var i=e.name.toLowerCase();i==l?t=e.value:i==f?r=e.value:i==d?n=e.value:e.name==v&&(o=!0)}),t=i(t);var a=e.name.toLowerCase(),s=y.OTHER;return c.splitNsName(a)[1]==u?s=y.NG_CONTENT:a==g?s=y.STYLE:a==m?s=y.SCRIPT:a==p&&n==h&&(s=y.STYLESHEET),new _(s,t,r,o)}function i(e){return s.isBlank(e)||0===e.length?"*":e}var o=System.global,a=o.define;o.define=void 0;var s=e("angular2/src/facade/lang"),c=e("angular2/src/compiler/html_tags"),l="select",u="ng-content",p="link",d="rel",f="href",h="stylesheet",g="style",m="script",v="ngNonBindable";t.preparseElement=n,function(e){e[e.NG_CONTENT=0]="NG_CONTENT",e[e.STYLE=1]="STYLE",e[e.STYLESHEET=2]="STYLESHEET",e[e.SCRIPT=3]="SCRIPT",e[e.OTHER=4]="OTHER"}(t.PreparsedElementType||(t.PreparsedElementType={}));var y=t.PreparsedElementType,_=function(){function e(e,t,r,n){this.type=e,this.selectAttr=t,this.hrefAttr=r,this.nonBindable=n}return e}();return t.PreparsedElement=_,o.define=a,r.exports}),System.register("angular2/src/compiler/template_normalizer",["angular2/src/compiler/directive_metadata","angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/facade/async","angular2/src/compiler/xhr","angular2/src/compiler/url_resolver","angular2/src/compiler/style_url_resolver","angular2/src/core/di","angular2/src/core/metadata/view","angular2/src/compiler/html_ast","angular2/src/compiler/html_parser","angular2/src/compiler/template_preparser"],!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/compiler/directive_metadata"),c=e("angular2/src/facade/lang"),l=e("angular2/src/facade/exceptions"),u=e("angular2/src/facade/async"),p=e("angular2/src/compiler/xhr"),d=e("angular2/src/compiler/url_resolver"),f=e("angular2/src/compiler/style_url_resolver"),h=e("angular2/src/core/di"),g=e("angular2/src/core/metadata/view"),m=e("angular2/src/compiler/html_ast"),v=e("angular2/src/compiler/html_parser"),y=e("angular2/src/compiler/template_preparser"),_=function(){function e(e,t,r){this._xhr=e,this._urlResolver=t,this._htmlParser=r}return e.prototype.normalizeTemplate=function(e,t){var r=this;if(c.isPresent(t.template))return u.PromiseWrapper.resolve(this.normalizeLoadedTemplate(e,t,t.template,e.moduleUrl));if(c.isPresent(t.templateUrl)){var n=this._urlResolver.resolve(e.moduleUrl,t.templateUrl);return this._xhr.get(n).then(function(i){return r.normalizeLoadedTemplate(e,t,i,n)})}throw new l.BaseException("No template specified for component "+e.name)},e.prototype.normalizeLoadedTemplate=function(e,t,r,n){var i=this,o=this._htmlParser.parse(r,e.name);if(o.errors.length>0){var a=o.errors.join("\n");throw new l.BaseException("Template parse errors:\n"+a)}var c=new b;m.htmlVisitAll(c,o.rootNodes);var u=t.styles.concat(c.styles),p=c.styleUrls.filter(f.isStyleUrlResolvable).map(function(e){return i._urlResolver.resolve(n,e)}).concat(t.styleUrls.filter(f.isStyleUrlResolvable).map(function(t){return i._urlResolver.resolve(e.moduleUrl,t)})),d=u.map(function(e){var t=f.extractStyleUrls(i._urlResolver,n,e);return t.styleUrls.forEach(function(e){return p.push(e)}),t.style}),h=t.encapsulation;return h===g.ViewEncapsulation.Emulated&&0===d.length&&0===p.length&&(h=g.ViewEncapsulation.None),new s.CompileTemplateMetadata({encapsulation:h,template:r,templateUrl:n,styles:d,styleUrls:p,ngContentSelectors:c.ngContentSelectors})},e=o([h.Injectable(),a("design:paramtypes",[p.XHR,d.UrlResolver,v.HtmlParser])],e)}();t.TemplateNormalizer=_;var b=function(){function e(){this.ngContentSelectors=[],this.styles=[],this.styleUrls=[],this.ngNonBindableStackCount=0}return e.prototype.visitElement=function(e,t){var r=y.preparseElement(e);switch(r.type){case y.PreparsedElementType.NG_CONTENT:0===this.ngNonBindableStackCount&&this.ngContentSelectors.push(r.selectAttr);break;case y.PreparsedElementType.STYLE:var n="";e.children.forEach(function(e){e instanceof m.HtmlTextAst&&(n+=e.value)}),this.styles.push(n);break;case y.PreparsedElementType.STYLESHEET:this.styleUrls.push(r.hrefAttr)}return r.nonBindable&&this.ngNonBindableStackCount++,m.htmlVisitAll(this,e.children),r.nonBindable&&this.ngNonBindableStackCount--,null},e.prototype.visitAttr=function(e,t){return null},e.prototype.visitText=function(e,t){return null},e}();return n.define=i,r.exports}),System.register("angular2/src/compiler/runtime_metadata",["angular2/src/core/di","angular2/src/facade/lang","angular2/src/facade/exceptions","angular2/src/compiler/directive_metadata","angular2/src/core/metadata/directives","angular2/src/core/linker/directive_resolver","angular2/src/core/linker/view_resolver","angular2/src/core/linker/directive_lifecycle_reflector","angular2/src/core/linker/interfaces","angular2/src/core/reflection/reflection","angular2/src/core/di","angular2/src/core/platform_directives_and_pipes","angular2/src/compiler/util","angular2/src/compiler/url_resolver"],!0,function(e,t,r){function n(e,t){var r=[];return f.isPresent(t)&&i(t,r),f.isPresent(e.directives)&&i(e.directives,r),r}function i(e,t){for(var r=0;r0?r:"package:"+r+E.MODULE_SUFFIX}return C.reflector.importUri(e)}var s=System.global,c=s.define;s.define=void 0;var l=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},u=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},p=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},d=e("angular2/src/core/di"),f=e("angular2/src/facade/lang"),h=e("angular2/src/facade/exceptions"),g=e("angular2/src/compiler/directive_metadata"),m=e("angular2/src/core/metadata/directives"),v=e("angular2/src/core/linker/directive_resolver"),y=e("angular2/src/core/linker/view_resolver"),_=e("angular2/src/core/linker/directive_lifecycle_reflector"),b=e("angular2/src/core/linker/interfaces"),C=e("angular2/src/core/reflection/reflection"),w=e("angular2/src/core/di"),P=e("angular2/src/core/platform_directives_and_pipes"),E=e("angular2/src/compiler/util"),S=e("angular2/src/compiler/url_resolver"),R=function(){function e(e,t,r){this._directiveResolver=e,this._viewResolver=t,this._platformDirectives=r,this._cache=new Map}return e.prototype.getMetadata=function(e){var t=this._cache.get(e);if(f.isBlank(t)){var r=this._directiveResolver.resolve(e),n=null,i=null,o=null;if(r instanceof m.ComponentMetadata){var s=r;n=a(e,s);var c=this._viewResolver.resolve(e);i=new g.CompileTemplateMetadata({encapsulation:c.encapsulation,template:c.template,templateUrl:c.templateUrl,styles:c.styles,styleUrls:c.styleUrls}),o=s.changeDetection}t=g.CompileDirectiveMetadata.create({selector:r.selector,exportAs:r.exportAs,isComponent:f.isPresent(i),dynamicLoadable:!0,type:new g.CompileTypeMetadata({name:f.stringify(e),moduleUrl:n,runtime:e}),template:i,changeDetection:o,inputs:r.inputs,outputs:r.outputs,host:r.host,lifecycleHooks:b.LIFECYCLE_HOOKS_VALUES.filter(function(t){return _.hasLifecycleHook(t,e)})}),this._cache.set(e,t)}return t},e.prototype.getViewDirectivesMetadata=function(e){for(var t=this,r=this._viewResolver.resolve(e),i=n(r,this._platformDirectives),a=0;ao?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/collection"),p=e("angular2/src/platform/dom/dom_adapter"),d=e("angular2/src/compiler/html_tags"),f=e("angular2/src/compiler/schema/element_schema_registry"),h=l.CONST_EXPR({xlink:"http://www.w3.org/1999/xlink",svg:"http://www.w3.org/2000/svg"}),g=function(e){function t(){e.apply(this,arguments),this._protoElements=new Map}return o(t,e),t.prototype._getProtoElement=function(e){var t=this._protoElements.get(e);if(l.isBlank(t)){var r=d.splitNsName(e);t=l.isPresent(r[0])?p.DOM.createElementNS(h[r[0]],r[1]):p.DOM.createElement(r[1]),this._protoElements.set(e,t)}return t},t.prototype.hasProperty=function(e,t){if(-1!==e.indexOf("-"))return!0;var r=this._getProtoElement(e);return p.DOM.hasProperty(r,t)},t.prototype.getMappedPropName=function(e){var t=u.StringMapWrapper.get(p.DOM.attrToPropMap,e);return l.isPresent(t)?t:e},t=a([c.Injectable(),s("design:paramtypes",[])],t)}(f.ElementSchemaRegistry);return t.DomElementSchemaRegistry=g,n.define=i,r.exports}),System.register("angular2/src/core/angular_entrypoint",["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/facade/lang"),c=function(){function e(e){this.name=e}return e=o([s.CONST(),a("design:paramtypes",[String])],e)}();return t.AngularEntrypoint=c,n.define=i,r.exports}),System.register("angular2/src/common/pipes/async_pipe",["angular2/src/facade/lang","angular2/src/facade/async","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/async"),l=e("angular2/core"),u=e("angular2/src/common/pipes/invalid_pipe_argument_exception"),p=function(){function e(){}return e.prototype.createSubscription=function(e,t){return c.ObservableWrapper.subscribe(e,t,function(e){throw e})},e.prototype.dispose=function(e){c.ObservableWrapper.dispose(e)},e.prototype.onDestroy=function(e){c.ObservableWrapper.dispose(e)},e}(),d=function(){function e(){}return e.prototype.createSubscription=function(e,t){return e.then(t)},e.prototype.dispose=function(e){},e.prototype.onDestroy=function(e){},e}(),f=new d,h=new p,g=function(){function e(e){this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=e}return e.prototype.ngOnDestroy=function(){s.isPresent(this._subscription)&&this._dispose()},e.prototype.transform=function(e,t){return s.isBlank(this._obj)?(s.isPresent(e)&&this._subscribe(e),this._latestValue):e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue===this._latestReturnedValue?this._latestReturnedValue:(this._latestReturnedValue=this._latestValue,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){var r=e.path.join(" -> ");throw new g.BaseException(t+" '"+r+"'")}function s(e){return h.isPresent(e)?m.Validators.compose(e.map(C.normalizeValidator)):null}function c(e){return h.isPresent(e)?m.Validators.composeAsync(e.map(C.normalizeValidator)):null}function l(e,t){if(!f.StringMapWrapper.contains(e,"model"))return!1;var r=e.model;return r.isFirstChange()?!0:!h.looseIdentical(t,r.currentValue)}function u(e,t){if(h.isBlank(t))return null;var r,n,i;return t.forEach(function(t){t instanceof v.DefaultValueAccessor?r=t:t instanceof _.CheckboxControlValueAccessor||t instanceof y.NumberValueAccessor||t instanceof b.SelectControlValueAccessor?(h.isPresent(n)&&a(e,"More than one built-in value accessor matches"),n=t):(h.isPresent(i)&&a(e,"More than one custom value accessor matches"),i=t)}),h.isPresent(i)?i:h.isPresent(n)?n:h.isPresent(r)?r:(a(e,"No valid value accessor for"),null)}var p=System.global,d=p.define;p.define=void 0;var f=e("angular2/src/facade/collection"),h=e("angular2/src/facade/lang"),g=e("angular2/src/facade/exceptions"),m=e("angular2/src/common/forms/validators"),v=e("angular2/src/common/forms/directives/default_value_accessor"),y=e("angular2/src/common/forms/directives/number_value_accessor"),_=e("angular2/src/common/forms/directives/checkbox_value_accessor"),b=e("angular2/src/common/forms/directives/select_control_value_accessor"),C=e("angular2/src/common/forms/directives/normalize_validator");return t.controlPath=n,t.setUpControl=i,t.setUpControlGroup=o,t.composeValidators=s,t.composeAsyncValidators=c,t.isPropertyUpdated=l,t.selectValueAccessor=u,p.define=d,r.exports}),System.register("angular2/src/common/forms/directives",["angular2/src/facade/lang","angular2/src/common/forms/directives/ng_control_name","angular2/src/common/forms/directives/ng_form_control","angular2/src/common/forms/directives/ng_model","angular2/src/common/forms/directives/ng_control_group","angular2/src/common/forms/directives/ng_form_model","angular2/src/common/forms/directives/ng_form","angular2/src/common/forms/directives/default_value_accessor","angular2/src/common/forms/directives/checkbox_value_accessor","angular2/src/common/forms/directives/number_value_accessor","angular2/src/common/forms/directives/ng_control_status","angular2/src/common/forms/directives/select_control_value_accessor","angular2/src/common/forms/directives/validators","angular2/src/common/forms/directives/ng_control_name","angular2/src/common/forms/directives/ng_form_control","angular2/src/common/forms/directives/ng_model","angular2/src/common/forms/directives/ng_control_group","angular2/src/common/forms/directives/ng_form_model","angular2/src/common/forms/directives/ng_form","angular2/src/common/forms/directives/default_value_accessor","angular2/src/common/forms/directives/checkbox_value_accessor","angular2/src/common/forms/directives/number_value_accessor","angular2/src/common/forms/directives/ng_control_status","angular2/src/common/forms/directives/select_control_value_accessor","angular2/src/common/forms/directives/validators","angular2/src/common/forms/directives/ng_control"],!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/directives/ng_control_name"),s=e("angular2/src/common/forms/directives/ng_form_control"),c=e("angular2/src/common/forms/directives/ng_model"),l=e("angular2/src/common/forms/directives/ng_control_group"),u=e("angular2/src/common/forms/directives/ng_form_model"),p=e("angular2/src/common/forms/directives/ng_form"),d=e("angular2/src/common/forms/directives/default_value_accessor"),f=e("angular2/src/common/forms/directives/checkbox_value_accessor"),h=e("angular2/src/common/forms/directives/number_value_accessor"),g=e("angular2/src/common/forms/directives/ng_control_status"),m=e("angular2/src/common/forms/directives/select_control_value_accessor"),v=e("angular2/src/common/forms/directives/validators"),y=e("angular2/src/common/forms/directives/ng_control_name");t.NgControlName=y.NgControlName;var _=e("angular2/src/common/forms/directives/ng_form_control");t.NgFormControl=_.NgFormControl;var b=e("angular2/src/common/forms/directives/ng_model");t.NgModel=b.NgModel;var C=e("angular2/src/common/forms/directives/ng_control_group");t.NgControlGroup=C.NgControlGroup;var w=e("angular2/src/common/forms/directives/ng_form_model");t.NgFormModel=w.NgFormModel;var P=e("angular2/src/common/forms/directives/ng_form");t.NgForm=P.NgForm;var E=e("angular2/src/common/forms/directives/default_value_accessor");t.DefaultValueAccessor=E.DefaultValueAccessor;var S=e("angular2/src/common/forms/directives/checkbox_value_accessor");t.CheckboxControlValueAccessor=S.CheckboxControlValueAccessor;var R=e("angular2/src/common/forms/directives/number_value_accessor");t.NumberValueAccessor=R.NumberValueAccessor;var x=e("angular2/src/common/forms/directives/ng_control_status");t.NgControlStatus=x.NgControlStatus;var O=e("angular2/src/common/forms/directives/select_control_value_accessor");t.SelectControlValueAccessor=O.SelectControlValueAccessor,t.NgSelectOption=O.NgSelectOption;var D=e("angular2/src/common/forms/directives/validators");t.RequiredValidator=D.RequiredValidator,t.MinLengthValidator=D.MinLengthValidator,t.MaxLengthValidator=D.MaxLengthValidator;var T=e("angular2/src/common/forms/directives/ng_control");return t.NgControl=T.NgControl,t.FORM_DIRECTIVES=o.CONST_EXPR([a.NgControlName,l.NgControlGroup,s.NgFormControl,c.NgModel,u.NgFormModel,p.NgForm,m.NgSelectOption,d.DefaultValueAccessor,h.NumberValueAccessor,f.CheckboxControlValueAccessor,m.SelectControlValueAccessor,g.NgControlStatus,v.RequiredValidator,v.MinLengthValidator,v.MaxLengthValidator]),n.define=i,r.exports}),System.register("angular2/src/platform/dom/events/hammer_gestures",["angular2/src/platform/dom/events/hammer_common","angular2/src/facade/lang","angular2/src/facade/exceptions","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/events/hammer_common"),l=e("angular2/src/facade/lang"),u=e("angular2/src/facade/exceptions"),p=e("angular2/src/core/di"),d=function(e){function t(){e.apply(this,arguments)}return o(t,e),t.prototype.supports=function(t){if(!e.prototype.supports.call(this,t))return!1;if(!l.isPresent(window.Hammer))throw new u.BaseException("Hammer.js is not loaded, can not bind "+t+" event");return!0},t.prototype.addEventListener=function(e,t,r){var n=this.manager.getZone();t=t.toLowerCase(),n.runOutsideAngular(function(){var i=new Hammer(e);i.get("pinch").set({enable:!0}),i.get("rotate").set({enable:!0}),i.on(t,function(e){n.run(function(){r(e)})})})},t=a([p.Injectable(),s("design:paramtypes",[])],t)}(c.HammerGesturesPluginCommon);return t.HammerGesturesPlugin=d,n.define=i,r.exports}),System.register("angular2/src/platform/browser/xhr_impl",["angular2/src/facade/promise","angular2/src/facade/lang","angular2/src/compiler/xhr"],!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/promise"),s=e("angular2/src/facade/lang"),c=e("angular2/src/compiler/xhr"),l=function(e){function t(){e.apply(this,arguments)}return o(t,e),t.prototype.get=function(e){var t=a.PromiseWrapper.completer(),r=new XMLHttpRequest;return r.open("GET",e,!0),r.responseType="text",r.onload=function(){var n=s.isPresent(r.response)?r.response:r.responseText,i=1223===r.status?204:r.status;0===i&&(i=n?200:0),i>=200&&300>=i?t.resolve(n):t.reject("Failed to load "+e,null)},r.onerror=function(){t.reject("Failed to load "+e,null)},r.send(),t.promise},t}(c.XHR);return t.XHRImpl=l,n.define=i,r.exports}),System.register("angular2/src/platform/browser/tools/common_tools",["angular2/src/core/application_ref","angular2/src/facade/lang","angular2/src/facade/browser","angular2/src/platform/dom/dom_adapter"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/core/application_ref"),a=e("angular2/src/facade/lang"),s=e("angular2/src/facade/browser"),c=e("angular2/src/platform/dom/dom_adapter"),l=function(){function e(e){this.profiler=new u(e)}return e}();t.AngularTools=l;var u=function(){function e(e){this.appRef=e.injector.get(o.ApplicationRef)}return e.prototype.timeChangeDetection=function(e){var t=a.isPresent(e)&&e.record,r="Change Detection",n=a.isPresent(s.window.console.profile);t&&n&&s.window.console.profile(r);for(var i=c.DOM.performanceNow(),o=0;5>o||c.DOM.performanceNow()-i<500;)this.appRef.tick(),o++;var l=c.DOM.performanceNow();t&&n&&s.window.console.profileEnd(r);var u=(l-i)/o;s.window.console.log("ran "+o+" change detection cycles"),s.window.console.log(a.NumberWrapper.toFixed(u,2)+" ms per check")},e}();return t.AngularProfiler=u,n.define=i,r.exports}),System.register("angular2/src/compiler/directive_metadata",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/core/change_detection/change_detection","angular2/src/core/metadata/view","angular2/src/compiler/selector","angular2/src/compiler/util","angular2/src/core/linker/interfaces"],!0,function(e,t,r){function n(e,t){var r=u.CssSelector.parse(t)[0].getMatchingElementTemplate();return m.create({type:new h({runtime:Object,name:"Host"+e.name,moduleUrl:e.moduleUrl,isHost:!0}),template:new g({template:r,templateUrl:"",styles:[],styleUrls:[],ngContentSelectors:[]}),changeDetection:c.ChangeDetectionStrategy.Default,inputs:[],outputs:[],host:{},lifecycleHooks:[],isComponent:!0,dynamicLoadable:!1,selector:"*"})}var i=System.global,o=i.define;i.define=void 0;var a=e("angular2/src/facade/lang"),s=e("angular2/src/facade/collection"),c=e("angular2/src/core/change_detection/change_detection"),l=e("angular2/src/core/metadata/view"),u=e("angular2/src/compiler/selector"),p=e("angular2/src/compiler/util"),d=e("angular2/src/core/linker/interfaces"),f=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))$/g,h=function(){function e(e){var t=void 0===e?{}:e,r=t.runtime,n=t.name,i=t.moduleUrl,o=t.isHost;this.runtime=r,this.name=n,this.moduleUrl=i,this.isHost=a.normalizeBool(o)}return e.fromJson=function(t){return new e({name:t.name,moduleUrl:t.moduleUrl,isHost:t.isHost})},e.prototype.toJson=function(){return{name:this.name,moduleUrl:this.moduleUrl,isHost:this.isHost}},e}();t.CompileTypeMetadata=h;var g=function(){function e(e){var t=void 0===e?{}:e,r=t.encapsulation,n=t.template,i=t.templateUrl,o=t.styles,s=t.styleUrls,c=t.ngContentSelectors;this.encapsulation=a.isPresent(r)?r:l.ViewEncapsulation.Emulated,this.template=n,this.templateUrl=i,this.styles=a.isPresent(o)?o:[],this.styleUrls=a.isPresent(s)?s:[],this.ngContentSelectors=a.isPresent(c)?c:[]}return e.fromJson=function(t){return new e({encapsulation:a.isPresent(t.encapsulation)?l.VIEW_ENCAPSULATION_VALUES[t.encapsulation]:t.encapsulation,template:t.template,templateUrl:t.templateUrl,styles:t.styles,styleUrls:t.styleUrls,ngContentSelectors:t.ngContentSelectors})},e.prototype.toJson=function(){return{encapsulation:a.isPresent(this.encapsulation)?a.serializeEnum(this.encapsulation):this.encapsulation,template:this.template,templateUrl:this.templateUrl,styles:this.styles,styleUrls:this.styleUrls,ngContentSelectors:this.ngContentSelectors}},e}();t.CompileTemplateMetadata=g;var m=function(){function e(e){var t=void 0===e?{}:e,r=t.type,n=t.isComponent,i=t.dynamicLoadable,o=t.selector,a=t.exportAs,s=t.changeDetection,c=t.inputs,l=t.outputs,u=t.hostListeners,p=t.hostProperties,d=t.hostAttributes,f=t.lifecycleHooks,h=t.template;this.type=r,this.isComponent=n,this.dynamicLoadable=i,this.selector=o,this.exportAs=a,this.changeDetection=s,this.inputs=c,this.outputs=l,this.hostListeners=u,this.hostProperties=p,this.hostAttributes=d,this.lifecycleHooks=f,this.template=h}return e.create=function(t){var r=void 0===t?{}:t,n=r.type,i=r.isComponent,o=r.dynamicLoadable,c=r.selector,l=r.exportAs,u=r.changeDetection,d=r.inputs,h=r.outputs,g=r.host,m=r.lifecycleHooks,v=r.template,y={},_={},b={};a.isPresent(g)&&s.StringMapWrapper.forEach(g,function(e,t){var r=a.RegExpWrapper.firstMatch(f,t);a.isBlank(r)?b[t]=e:a.isPresent(r[1])?_[r[1]]=e:a.isPresent(r[2])&&(y[r[2]]=e)});var C={};a.isPresent(d)&&d.forEach(function(e){var t=p.splitAtColon(e,[e,e]);C[t[0]]=t[1]});var w={};return a.isPresent(h)&&h.forEach(function(e){var t=p.splitAtColon(e,[e,e]);w[t[0]]=t[1]}),new e({type:n,isComponent:a.normalizeBool(i),dynamicLoadable:a.normalizeBool(o),selector:c,exportAs:l,changeDetection:u,inputs:C,outputs:w,hostListeners:y,hostProperties:_,hostAttributes:b,lifecycleHooks:a.isPresent(m)?m:[],template:v})},e.fromJson=function(t){return new e({isComponent:t.isComponent,dynamicLoadable:t.dynamicLoadable,selector:t.selector,exportAs:t.exportAs,type:a.isPresent(t.type)?h.fromJson(t.type):t.type,changeDetection:a.isPresent(t.changeDetection)?c.CHANGE_DETECTION_STRATEGY_VALUES[t.changeDetection]:t.changeDetection,inputs:t.inputs,outputs:t.outputs,hostListeners:t.hostListeners,hostProperties:t.hostProperties,hostAttributes:t.hostAttributes,lifecycleHooks:t.lifecycleHooks.map(function(e){return d.LIFECYCLE_HOOKS_VALUES[e]}),template:a.isPresent(t.template)?g.fromJson(t.template):t.template})},e.prototype.toJson=function(){return{isComponent:this.isComponent,dynamicLoadable:this.dynamicLoadable,selector:this.selector,exportAs:this.exportAs,type:a.isPresent(this.type)?this.type.toJson():this.type,changeDetection:a.isPresent(this.changeDetection)?a.serializeEnum(this.changeDetection):this.changeDetection,inputs:this.inputs,outputs:this.outputs,hostListeners:this.hostListeners,hostProperties:this.hostProperties,hostAttributes:this.hostAttributes,lifecycleHooks:this.lifecycleHooks.map(function(e){return a.serializeEnum(e)}),template:a.isPresent(this.template)?this.template.toJson():this.template}},e}();return t.CompileDirectiveMetadata=m,t.createHostComponentMeta=n,i.define=o,r.exports}),System.register("angular2/src/compiler/change_definition_factory",["angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/core/reflection/reflection","angular2/src/core/change_detection/change_detection","angular2/src/compiler/template_ast","angular2/src/core/linker/interfaces"],!0,function(e,t,r){function n(e,t,r,n){var o=[],a=new h(null,o,t);return d.templateVisitAll(a,n),i(o,e,r)}function i(e,t,r){var n=o(e);return e.map(function(e){var i=t.name+"_"+e.viewIndex;return new p.ChangeDetectorDefinition(i,e.strategy,n[e.viewIndex],e.bindingRecords,e.eventRecords,e.directiveRecords,r)})}function o(e){var t=c.ListWrapper.createFixedSize(e.length);return e.forEach(function(e){var r=l.isPresent(e.parent)?t[e.parent.viewIndex]:[];t[e.viewIndex]=r.concat(e.variableNames)}),t}var a=System.global,s=a.define;a.define=void 0;var c=e("angular2/src/facade/collection"),l=e("angular2/src/facade/lang"),u=e("angular2/src/core/reflection/reflection"),p=e("angular2/src/core/change_detection/change_detection"),d=e("angular2/src/compiler/template_ast"),f=e("angular2/src/core/linker/interfaces");t.createChangeDetectorDefinitions=n;var h=function(){function e(e,t,r){this.parent=e,this.allVisitors=t,this.strategy=r,this.boundTextCount=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,r){this.boundElementCount++,d.templateVisitAll(this,t.outputs);for(var n=0;no?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/compiler/source_module"),c=e("angular2/src/core/metadata/view"),l=e("angular2/src/compiler/xhr"),u=e("angular2/src/facade/lang"),p=e("angular2/src/facade/async"),d=e("angular2/src/compiler/shadow_css"),f=e("angular2/src/compiler/url_resolver"),h=e("angular2/src/compiler/style_url_resolver"),g=e("angular2/src/compiler/util"),m=e("angular2/src/core/di"),v=e("angular2/src/core/render/view_factory"),y=function(){function e(e,t){this._xhr=e,this._urlResolver=t,this._styleCache=new Map,this._shadowCss=new d.ShadowCss}return e.prototype.compileComponentRuntime=function(e){var t=e.styles,r=e.styleUrls;return this._loadStyles(t,r,e.encapsulation===c.ViewEncapsulation.Emulated)},e.prototype.compileComponentCodeGen=function(e){var t=e.encapsulation===c.ViewEncapsulation.Emulated;return this._styleCodeGen(e.styles,e.styleUrls,t)},e.prototype.compileStylesheetCodeGen=function(e,t){var r=h.extractStyleUrls(this._urlResolver,e,t);return[this._styleModule(e,!1,this._styleCodeGen([r.style],r.styleUrls,!1)),this._styleModule(e,!0,this._styleCodeGen([r.style],r.styleUrls,!0))]},e.prototype.clearCache=function(){this._styleCache.clear()},e.prototype._loadStyles=function(e,t,r){var n=this,i=t.map(function(e){var t=""+e+(r?".shim":""),i=n._styleCache.get(t);return u.isBlank(i)&&(i=n._xhr.get(e).then(function(t){var i=h.extractStyleUrls(n._urlResolver,e,t);return n._loadStyles([i.style],i.styleUrls,r)}),n._styleCache.set(t,i)),i});return p.PromiseWrapper.all(i).then(function(t){var i=e.map(function(e){return n._shimIfNeeded(e,r)});return t.forEach(function(e){return i.push(e)}),i})},e.prototype._styleCodeGen=function(e,t,r){for(var n=this,i=u.IS_DART?"const":"",o=e.map(function(e){return g.escapeSingleQuoteString(n._shimIfNeeded(e,r))}),a=0;a;" or "&#x;" syntax'}function a(e){return!s(e)||e===x}function s(e){return e>=O&&A>=e||e===ee}function c(e){return s(e)||e===G||e===B||e===j||e===k||e===q}function l(e){return(X>e||e>J)&&(K>e||e>z)&&(L>e||e>W)}function u(e){return e==F||e==x||!h(e)}function p(e){return e==F||e==x||!f(e)}function d(e){return e===H||e===x}function f(e){return e>=X&&J>=e}function h(e){return e>=X&&Z>=e||e>=L&&W>=e}function g(e){for(var t,r=[],n=0;n=this.length)throw this._createError(i(x),this._getLocation());this.peek===D?(this.line++,this.column=0):this.peek!==D&&this.peek!==T&&this.column++,this.index++,this.peek=this.index>=this.length?x:_.StringWrapper.charCodeAt(this.inputLowercase,this.index)},e.prototype._attemptChar=function(e){return this.peek===e?(this._advance(),!0):!1},e.prototype._requireChar=function(e){var t=this._getLocation();if(!this._attemptChar(e))throw this._createError(i(this.peek),t)},e.prototype._attemptChars=function(e){for(var t=0;tn.offset&&o.push(this.input.substring(n.offset,this.index));this.peek!==t;)o.push(this._readChar(e));return this._endToken([this._processCarriageReturns(o.join(""))],n)},e.prototype._consumeComment=function(e){var t=this;this._beginToken(P.COMMENT_START,e),this._requireChar(M),this._endToken([]);var r=this._consumeRawText(!1,M,function(){return t._attemptChars("->")});this._beginToken(P.COMMENT_END,r.sourceSpan.end),this._endToken([])},e.prototype._consumeCdata=function(e){var t=this;this._beginToken(P.CDATA_START,e),this._requireChars("cdata["),this._endToken([]);var r=this._consumeRawText(!1,Q,function(){return t._attemptChars("]>")});this._beginToken(P.CDATA_END,r.sourceSpan.end),this._endToken([])},e.prototype._consumeDocType=function(e){ this._beginToken(P.DOC_TYPE,e),this._attemptUntilChar(G),this._advance(),this._endToken([this.input.substring(e.offset+2,this.index-1)])},e.prototype._consumePrefixAndName=function(){for(var e=this.index,t=null;this.peek!==U&&!l(this.peek);)this._advance();var r;this.peek===U?(this._advance(),t=this.input.substring(e,this.index-1),r=this.index):r=e,this._requireUntilFn(c,this.index===r?1:0);var n=this.input.substring(r,this.index);return[t,n]},e.prototype._consumeTagOpen=function(e){var t,r=this._savePosition();try{if(!f(this.peek))throw this._createError(i(this.peek),this._getLocation());var n=this.index;for(this._consumeTagOpenStart(e),t=this.inputLowercase.substring(n,this.index),this._attemptUntilFn(a);this.peek!==B&&this.peek!==G;)this._consumeAttributeName(),this._attemptUntilFn(a),this._attemptChar(q)&&(this._attemptUntilFn(a),this._consumeAttributeValue()),this._attemptUntilFn(a);this._consumeTagOpenEnd()}catch(o){if(o instanceof re)return this._restorePosition(r),this._beginToken(P.TEXT,e),void this._endToken(["<"]);throw o}var s=w.getHtmlTagDefinition(t).contentType;s===w.HtmlTagContentType.RAW_TEXT?this._consumeRawTextWithTagClose(t,!1):s===w.HtmlTagContentType.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(t,!0)},e.prototype._consumeRawTextWithTagClose=function(e,t){var r=this,n=this._consumeRawText(t,H,function(){return r._attemptChar(B)?(r._attemptUntilFn(a),r._attemptChars(e)?(r._attemptUntilFn(a),r._attemptChar(G)?!0:!1):!1):!1});this._beginToken(P.TAG_CLOSE,n.sourceSpan.end),this._endToken([null,e])},e.prototype._consumeTagOpenStart=function(e){this._beginToken(P.TAG_OPEN_START,e);var t=this._consumePrefixAndName();this._endToken(t)},e.prototype._consumeAttributeName=function(){this._beginToken(P.ATTR_NAME);var e=this._consumePrefixAndName();this._endToken(e)},e.prototype._consumeAttributeValue=function(){this._beginToken(P.ATTR_VALUE);var e;if(this.peek===j||this.peek===k){var t=this.peek;this._advance();for(var r=[];this.peek!==t;)r.push(this._readChar(!0));e=r.join(""),this._advance()}else{var n=this.index;this._requireUntilFn(c,1),e=this.input.substring(n,this.index)}this._endToken([this._processCarriageReturns(e)])},e.prototype._consumeTagOpenEnd=function(){var e=this._attemptChar(B)?P.TAG_OPEN_END_VOID:P.TAG_OPEN_END;this._beginToken(e),this._requireChar(G),this._endToken([])},e.prototype._consumeTagClose=function(e){this._beginToken(P.TAG_CLOSE,e),this._attemptUntilFn(a);var t;t=this._consumePrefixAndName(),this._attemptUntilFn(a),this._requireChar(G),this._endToken(t)},e.prototype._consumeText=function(){var e=this._getLocation();this._beginToken(P.TEXT,e);for(var t=[this._readChar(!0)];!d(this.peek);)t.push(this._readChar(!0));this._endToken([this._processCarriageReturns(t.join(""))])},e.prototype._savePosition=function(){return[this.peek,this.index,this.column,this.line,this.tokens.length]},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];to?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=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},l=e("angular2/src/facade/lang"),u=e("angular2/src/facade/async"),p=e("angular2/core"),d=e("angular2/src/common/forms/directives/control_container"),f=e("angular2/src/common/forms/directives/ng_control"),h=e("angular2/src/common/forms/directives/control_value_accessor"),g=e("angular2/src/common/forms/directives/shared"),m=e("angular2/src/common/forms/validators"),v=l.CONST_EXPR(new p.Provider(f.NgControl,{useExisting:p.forwardRef(function(){return y})})),y=function(e){function t(t,r,n,i){e.call(this),this._parent=t,this._validators=r,this._asyncValidators=n,this.update=new u.EventEmitter,this._added=!1,this.valueAccessor=g.selectValueAccessor(this,i)}return o(t,e),t.prototype.ngOnChanges=function(e){this._added||(this.formDirective.addControl(this),this._added=!0),g.isPropertyUpdated(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))},t.prototype.ngOnDestroy=function(){this.formDirective.removeControl(this)},t.prototype.viewToModelUpdate=function(e){this.viewModel=e,u.ObservableWrapper.callEmit(this.update,e)},Object.defineProperty(t.prototype,"path",{get:function(){return g.controlPath(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"formDirective",{get:function(){return this._parent.formDirective},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validator",{get:function(){return g.composeValidators(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"asyncValidator",{get:function(){return g.composeAsyncValidators(this._asyncValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this.formDirective.getControl(this)},enumerable:!0,configurable:!0}),t=a([p.Directive({selector:"[ngControl]",bindings:[v],inputs:["name: ngControl","model: ngModel"],outputs:["update: ngModelChange"],exportAs:"ngForm"}),c(0,p.Host()),c(0,p.SkipSelf()),c(1,p.Optional()),c(1,p.Self()),c(1,p.Inject(m.NG_VALIDATORS)),c(2,p.Optional()),c(2,p.Self()),c(2,p.Inject(m.NG_ASYNC_VALIDATORS)),c(3,p.Optional()),c(3,p.Self()),c(3,p.Inject(h.NG_VALUE_ACCESSOR)),s("design:paramtypes",[d.ControlContainer,Array,Array,Array])],t)}(f.NgControl);return t.NgControlName=y,n.define=i,r.exports}),System.register("angular2/src/platform/browser/generic_browser_adapter",["angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/platform/dom/dom_adapter","angular2/src/platform/browser/xhr_impl"],!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/collection"),s=e("angular2/src/facade/lang"),c=e("angular2/src/platform/dom/dom_adapter"),l=e("angular2/src/platform/browser/xhr_impl"),u=function(e){function t(){var t=this;e.call(this),this._animationPrefix=null,this._transitionEnd=null;try{var r=this.createElement("div",this.defaultDoc());if(s.isPresent(this.getStyle(r,"animationName")))this._animationPrefix="";else for(var n=["Webkit","Moz","O","ms"],i=0;io?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/compiler/source_module"),c=e("angular2/src/core/change_detection/change_detection_jit_generator"),l=e("angular2/src/compiler/change_definition_factory"),u=e("angular2/src/facade/lang"),p=e("angular2/src/core/change_detection/change_detection"),d=e("angular2/src/transform/template_compiler/change_detector_codegen"),f=e("angular2/src/compiler/util"),h=e("angular2/src/core/di"),g="AbstractChangeDetector",m="ChangeDetectionUtil",v="ChangeDetectorState",y=s.moduleRef("package:angular2/src/core/change_detection/abstract_change_detector"+f.MODULE_SUFFIX),_=s.moduleRef("package:angular2/src/core/change_detection/change_detection_util"+f.MODULE_SUFFIX),b=s.moduleRef("package:angular2/src/core/change_detection/pregen_proto_change_detector"+f.MODULE_SUFFIX),C=s.moduleRef("package:angular2/src/core/change_detection/constants"+f.MODULE_SUFFIX),w=function(){function e(e){this._genConfig=e}return e.prototype.compileComponentRuntime=function(e,t,r){var n=this,i=l.createChangeDetectorDefinitions(e,t,this._genConfig,r);return i.map(function(e){return n._createChangeDetectorFactory(e)})},e.prototype._createChangeDetectorFactory=function(e){if(u.IS_DART||!this._genConfig.useJit){var t=new p.DynamicProtoChangeDetector(e);return function(e){return t.instantiate(e)}}return new c.ChangeDetectorJITGenerator(e,m,g,v).generate()},e.prototype.compileComponentCodeGen=function(e,t,r){var n=l.createChangeDetectorDefinitions(e,t,this._genConfig,r),i=[],o=0,a=n.map(function(t){var r,n;if(u.IS_DART){r=new d.Codegen(b);var a="_"+t.id,l=0===o&&e.isHost?"dynamic":""+s.moduleRef(e.moduleUrl)+e.name;r.generate(l,a,t),i.push(a+".newChangeDetector"),n=r.toString()}else r=new c.ChangeDetectorJITGenerator(t,""+_+m,""+y+g,""+C+v),i.push("function(dispatcher) { return new "+r.typeName+"(dispatcher); }"),n=r.generateSource();return o++,n});return new s.SourceExpressions(a,i)},e=o([h.Injectable(),a("design:paramtypes",[p.ChangeDetectorGenConfig])],e)}();return t.ChangeDetectionCompiler=w,n.define=i,r.exports}),System.register("angular2/src/compiler/html_parser",["angular2/src/facade/lang","angular2/src/facade/collection","angular2/src/compiler/html_ast","angular2/src/core/di","angular2/src/compiler/html_lexer","angular2/src/compiler/parse_util","angular2/src/compiler/html_tags"],!0,function(e,t,r){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.index0&&"\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.prototype._popElement=function(e){for(var t=this.elementStack.length-1;t>=0;t--){var r=this.elementStack[t];if(r.name==e)return p.ListWrapper.splice(this.elementStack,t,this.elementStack.length-t),!0;if(!m.getHtmlTagDefinition(r.name).closedByParent)return!1}return!1},e.prototype._consumeAttr=function(e){var t=n(e.parts[0],e.parts[1]),r=e.sourceSpan.end,i="";if(this.peek.type===h.HtmlTokenType.ATTR_VALUE){var o=this._advance();i=o.parts[0],r=o.sourceSpan.end}return new d.HtmlAttrAst(t,i,new g.ParseSourceSpan(e.sourceSpan.start,r))},e.prototype._getParentElement=function(){return this.elementStack.length>0?p.ListWrapper.last(this.elementStack):null},e.prototype._addToParent=function(e){var t=this._getParentElement();u.isPresent(t)?t.children.push(e):this.rootNodes.push(e)},e}();return o.define=a,r.exports}),System.register("angular2/src/common/forms",["angular2/src/common/forms/model","angular2/src/common/forms/directives/abstract_control_directive","angular2/src/common/forms/directives/control_container","angular2/src/common/forms/directives/ng_control_name","angular2/src/common/forms/directives/ng_form_control","angular2/src/common/forms/directives/ng_model","angular2/src/common/forms/directives/ng_control","angular2/src/common/forms/directives/ng_control_group","angular2/src/common/forms/directives/ng_form_model","angular2/src/common/forms/directives/ng_form","angular2/src/common/forms/directives/control_value_accessor","angular2/src/common/forms/directives/default_value_accessor","angular2/src/common/forms/directives/ng_control_status","angular2/src/common/forms/directives/checkbox_value_accessor","angular2/src/common/forms/directives/select_control_value_accessor","angular2/src/common/forms/directives","angular2/src/common/forms/validators","angular2/src/common/forms/directives/validators","angular2/src/common/forms/form_builder"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/common/forms/model");t.AbstractControl=o.AbstractControl,t.Control=o.Control,t.ControlGroup=o.ControlGroup,t.ControlArray=o.ControlArray;var a=e("angular2/src/common/forms/directives/abstract_control_directive");t.AbstractControlDirective=a.AbstractControlDirective;var s=e("angular2/src/common/forms/directives/control_container");t.ControlContainer=s.ControlContainer;var c=e("angular2/src/common/forms/directives/ng_control_name");t.NgControlName=c.NgControlName;var l=e("angular2/src/common/forms/directives/ng_form_control");t.NgFormControl=l.NgFormControl;var u=e("angular2/src/common/forms/directives/ng_model");t.NgModel=u.NgModel;var p=e("angular2/src/common/forms/directives/ng_control");t.NgControl=p.NgControl;var d=e("angular2/src/common/forms/directives/ng_control_group");t.NgControlGroup=d.NgControlGroup;var f=e("angular2/src/common/forms/directives/ng_form_model");t.NgFormModel=f.NgFormModel;var h=e("angular2/src/common/forms/directives/ng_form");t.NgForm=h.NgForm;var g=e("angular2/src/common/forms/directives/control_value_accessor");t.NG_VALUE_ACCESSOR=g.NG_VALUE_ACCESSOR;var m=e("angular2/src/common/forms/directives/default_value_accessor");t.DefaultValueAccessor=m.DefaultValueAccessor;var v=e("angular2/src/common/forms/directives/ng_control_status");t.NgControlStatus=v.NgControlStatus;var y=e("angular2/src/common/forms/directives/checkbox_value_accessor");t.CheckboxControlValueAccessor=y.CheckboxControlValueAccessor;var _=e("angular2/src/common/forms/directives/select_control_value_accessor");t.NgSelectOption=_.NgSelectOption,t.SelectControlValueAccessor=_.SelectControlValueAccessor;var b=e("angular2/src/common/forms/directives");t.FORM_DIRECTIVES=b.FORM_DIRECTIVES;var C=e("angular2/src/common/forms/validators");t.NG_VALIDATORS=C.NG_VALIDATORS,t.NG_ASYNC_VALIDATORS=C.NG_ASYNC_VALIDATORS,t.Validators=C.Validators;var w=e("angular2/src/common/forms/directives/validators");t.RequiredValidator=w.RequiredValidator,t.MinLengthValidator=w.MinLengthValidator,t.MaxLengthValidator=w.MaxLengthValidator;var P=e("angular2/src/common/forms/form_builder");return t.FormBuilder=P.FormBuilder,t.FORM_PROVIDERS=P.FORM_PROVIDERS,t.FORM_BINDINGS=P.FORM_BINDINGS,n.define=i,r.exports}),System.register("angular2/src/platform/browser/browser_adapter",["angular2/src/facade/collection","angular2/src/facade/lang","angular2/src/platform/dom/dom_adapter","angular2/src/platform/browser/generic_browser_adapter"],!0,function(e,t,r){function n(){return l.isBlank(v)&&(v=document.querySelector("base"),l.isBlank(v))?null:v.getAttribute("href")}function i(e){return l.isBlank(y)&&(y=document.createElement("a")),y.setAttribute("href",e),"/"===y.pathname.charAt(0)?y.pathname:"/"+y.pathname}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=e("angular2/src/facade/collection"),l=e("angular2/src/facade/lang"),u=e("angular2/src/platform/dom/dom_adapter"),p=e("angular2/src/platform/browser/generic_browser_adapter"),d={"class":"className",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"},f=3,h={"\b":"Backspace"," ":"Tab","":"Delete","":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},g={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","":"NumLock"},m=function(e){function t(){e.apply(this,arguments)}return s(t,e),t.prototype.parse=function(e){throw new Error("parse not implemented")},t.makeCurrent=function(){u.setRootDomAdapter(new t)},t.prototype.hasProperty=function(e,t){return t in e},t.prototype.setProperty=function(e,t,r){e[t]=r},t.prototype.getProperty=function(e,t){return e[t]},t.prototype.invoke=function(e,t,r){e[t].apply(e,r)},t.prototype.logError=function(e){window.console.error?window.console.error(e):window.console.log(e)},t.prototype.log=function(e){window.console.log(e)},t.prototype.logGroup=function(e){window.console.group?(window.console.group(e),this.logError(e)):window.console.log(e)},t.prototype.logGroupEnd=function(){window.console.groupEnd&&window.console.groupEnd()},Object.defineProperty(t.prototype,"attrToPropMap",{get:function(){return d},enumerable:!0,configurable:!0}),t.prototype.query=function(e){return document.querySelector(e)},t.prototype.querySelector=function(e,t){return e.querySelector(t)},t.prototype.querySelectorAll=function(e,t){return e.querySelectorAll(t)},t.prototype.on=function(e,t,r){e.addEventListener(t,r,!1)},t.prototype.onAndCancel=function(e,t,r){return e.addEventListener(t,r,!1),function(){e.removeEventListener(t,r,!1)}},t.prototype.dispatchEvent=function(e,t){e.dispatchEvent(t)},t.prototype.createMouseEvent=function(e){var t=document.createEvent("MouseEvent");return t.initEvent(e,!0,!0),t},t.prototype.createEvent=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t},t.prototype.preventDefault=function(e){e.preventDefault(),e.returnValue=!1},t.prototype.isPrevented=function(e){return e.defaultPrevented||l.isPresent(e.returnValue)&&!e.returnValue},t.prototype.getInnerHTML=function(e){return e.innerHTML},t.prototype.getOuterHTML=function(e){return e.outerHTML},t.prototype.nodeName=function(e){return e.nodeName},t.prototype.nodeValue=function(e){return e.nodeValue},t.prototype.type=function(e){return e.type},t.prototype.content=function(e){return this.hasProperty(e,"content")?e.content:e},t.prototype.firstChild=function(e){return e.firstChild},t.prototype.nextSibling=function(e){return e.nextSibling},t.prototype.parentElement=function(e){return e.parentNode},t.prototype.childNodes=function(e){return e.childNodes},t.prototype.childNodesAsList=function(e){for(var t=e.childNodes,r=c.ListWrapper.createFixedSize(t.length),n=0;n0},t.prototype.tagName=function(e){return e.tagName},t.prototype.attributeMap=function(e){for(var t=new Map,r=e.attributes,n=0;no?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=this&&this.__param||function(e,t){return function(r,n){t(r,n,e)}},p=e("angular2/src/facade/collection"),d=e("angular2/src/facade/lang"),f=e("angular2/core"),h=e("angular2/src/facade/lang"),g=e("angular2/src/facade/exceptions"),m=e("angular2/src/core/change_detection/change_detection"),v=e("angular2/src/compiler/html_parser"),y=e("angular2/src/compiler/html_tags"),_=e("angular2/src/compiler/parse_util"),b=e("angular2/src/compiler/template_ast"),C=e("angular2/src/compiler/selector"),w=e("angular2/src/compiler/schema/element_schema_registry"),P=e("angular2/src/compiler/template_preparser"),E=e("angular2/src/compiler/style_url_resolver"),S=e("angular2/src/compiler/html_ast"),R=e("angular2/src/compiler/util"),x=/^(?:(?:(?:(bind-)|(var-|#)|(on-)|(bindon-))(.+))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/g,O="template",D="template",T="*",A="class",I=".",k="attr",N="class",V="style",j=C.CssSelector.parse("*")[0];t.TEMPLATE_TRANSFORMS=h.CONST_EXPR(new f.OpaqueToken("TemplateTransforms"));var M=function(e){function t(t,r){e.call(this,r,t)}return s(t,e),t}(_.ParseError);t.TemplateParseError=M;var B=function(){function e(e,t,r,n){this._exprParser=e,this._schemaRegistry=t,this._htmlParser=r,this.transforms=n}return e.prototype.parse=function(e,t,r){var n=new L(t,this._exprParser,this._schemaRegistry),i=this._htmlParser.parse(e,r),o=S.htmlVisitAll(n,i.rootNodes,H),a=i.errors.concat(n.errors);if(a.length>0){var s=a.join("\n");throw new g.BaseException("Template parse errors:\n"+s)}return d.isPresent(this.transforms)&&this.transforms.forEach(function(e){o=b.templateVisitAll(e,o)}),o},e=c([f.Injectable(),u(3,f.Optional()),u(3,f.Inject(t.TEMPLATE_TRANSFORMS)),l("design:paramtypes",[m.Parser,w.ElementSchemaRegistry,v.HtmlParser,Array])],e)}();t.TemplateParser=B;var L=function(){function e(e,t,r){var n=this;this._exprParser=t,this._schemaRegistry=r,this.errors=[],this.directivesIndex=new Map,this.ngContentCount=0,this.selectorMatcher=new C.SelectorMatcher,p.ListWrapper.forEachWithIndex(e,function(e,t){var r=C.CssSelector.parse(e.selector);n.selectorMatcher.addSelectables(r,e),n.directivesIndex.set(e,t)})}return e.prototype._reportError=function(e,t){this.errors.push(new M(e,t.start))},e.prototype._parseInterpolation=function(e,t){var r=t.start.toString();try{return this._exprParser.parseInterpolation(e,r)}catch(n){return this._reportError(""+n,t),this._exprParser.wrapLiteralPrimitive("ERROR",r)}},e.prototype._parseAction=function(e,t){var r=t.start.toString();try{return this._exprParser.parseAction(e,r)}catch(n){return this._reportError(""+n,t),this._exprParser.wrapLiteralPrimitive("ERROR",r)}},e.prototype._parseBinding=function(e,t){var r=t.start.toString();try{return this._exprParser.parseBinding(e,r)}catch(n){return this._reportError(""+n,t),this._exprParser.wrapLiteralPrimitive("ERROR",r)}},e.prototype._parseTemplateBindings=function(e,t){var r=t.start.toString();try{return this._exprParser.parseTemplateBindings(e,r)}catch(n){return this._reportError(""+n,t),[]}},e.prototype.visitText=function(e,t){var r=t.findNgContentIndex(j),n=this._parseInterpolation(e.value,e.sourceSpan);return d.isPresent(n)?new b.BoundTextAst(n,r,e.sourceSpan):new b.TextAst(e.value,r,e.sourceSpan)},e.prototype.visitAttr=function(e,t){return new b.AttrAst(e.name,e.value,e.sourceSpan)},e.prototype.visitElement=function(e,t){var r=this,n=e.name,o=P.preparseElement(e);if(o.type===P.PreparsedElementType.SCRIPT||o.type===P.PreparsedElementType.STYLE)return null;if(o.type===P.PreparsedElementType.STYLESHEET&&E.isStyleUrlResolvable(o.hrefAttr))return null;var a=[],s=[],c=[],l=[],u=[],p=[],f=[],h=!1,g=[];e.attrs.forEach(function(e){a.push([e.name,e.value]);var t=r._parseAttr(e,a,s,l,c),n=r._parseInlineTemplateBinding(e,f,u,p);t||n||g.push(r.visitAttr(e,null)),n&&(h=!0)});var m,v=y.splitNsName(n.toLowerCase())[1],_=v==O,C=i(n,a),w=this._createDirectiveAsts(e.name,this._parseDirectives(this.selectorMatcher,C),s,_?[]:c,e.sourceSpan),R=this._createElementPropertyAsts(e.name,s,w),x=S.htmlVisitAll(o.nonBindable?q:this,e.children,U.create(w)),D=h?null:t.findNgContentIndex(C);if(o.type===P.PreparsedElementType.NG_CONTENT)d.isPresent(e.children)&&e.children.length>0&&this._reportError(" element cannot have content. must be immediately followed by ",e.sourceSpan),m=new b.NgContentAst(this.ngContentCount++,D,e.sourceSpan);else if(_)this._assertAllEventsPublishedByDirectives(w,l),this._assertNoComponentsNorElementBindingsOnTemplate(w,R,e.sourceSpan),m=new b.EmbeddedTemplateAst(g,l,c,w,x,D,e.sourceSpan);else{this._assertOnlyOneComponent(w,e.sourceSpan);var T=c.filter(function(e){return 0===e.value.length});m=new b.ElementAst(n,g,R,l,T,w,x,D,e.sourceSpan)}if(h){var A=i(O,f),I=this._createDirectiveAsts(e.name,this._parseDirectives(this.selectorMatcher,A),u,[],e.sourceSpan),k=this._createElementPropertyAsts(e.name,u,I);this._assertNoComponentsNorElementBindingsOnTemplate(I,k,e.sourceSpan),m=new b.EmbeddedTemplateAst([],[],p,I,[m],t.findNgContentIndex(A),e.sourceSpan)}return m},e.prototype._parseInlineTemplateBinding=function(e,t,r,n){var i=null;if(e.name==D)i=e.value;else if(e.name.startsWith(T)){var o=e.name.substring(T.length);i=0==e.value.length?o:o+" "+e.value}if(d.isPresent(i)){for(var a=this._parseTemplateBindings(i,e.sourceSpan),s=0;s-1&&this._reportError('"-" is not allowed in variable names',r),n.push(new b.VariableAst(e,t,r))},e.prototype._parseProperty=function(e,t,r,n,i){this._parsePropertyAst(e,this._parseBinding(t,r),r,n,i)},e.prototype._parsePropertyInterpolation=function(e,t,r,n,i){var o=this._parseInterpolation(t,r);return d.isPresent(o)?(this._parsePropertyAst(e,o,r,n,i),!0):!1},e.prototype._parsePropertyAst=function(e,t,r,n,i){n.push([e,t.source]),i.push(new W(e,t,!1,r))},e.prototype._parseAssignmentEvent=function(e,t,r,n,i){this._parseEvent(e+"Change",t+"=$event",r,n,i)},e.prototype._parseEvent=function(e,t,r,n,i){var o=R.splitAtColon(e,[null,e]),a=o[0],s=o[1];i.push(new b.BoundEventAst(s,a,this._parseAction(t,r),r))},e.prototype._parseLiteralAttr=function(e,t,r,n){n.push(new W(e,this._exprParser.wrapLiteralPrimitive(t,""),!0,r))},e.prototype._parseDirectives=function(e,t){var r=this,n=[];return e.match(t,function(e,t){n.push(t)}),p.ListWrapper.sort(n,function(e,t){var n=e.isComponent,i=t.isComponent;return n&&!i?-1:!n&&i?1:r.directivesIndex.get(e)-r.directivesIndex.get(t)}),n},e.prototype._createDirectiveAsts=function(e,t,r,n,i){var o=this,a=new Set,s=t.map(function(t){var s=[],c=[],l=[];o._createDirectiveHostPropertyAsts(e,t.hostProperties,i,s),o._createDirectiveHostEventAsts(t.hostListeners,i,c),o._createDirectivePropertyAsts(t.inputs,r,l);var u=[];return n.forEach(function(e){(0===e.value.length&&t.isComponent||t.exportAs==e.value)&&(u.push(e),a.add(e.name))}),new b.DirectiveAst(t,l,s,c,u,i)});return n.forEach(function(e){e.value.length>0&&!p.SetWrapper.has(a,e.name)&&o._reportError('There is no directive with "exportAs" set to "'+e.value+'"',e.sourceSpan)}),s},e.prototype._createDirectiveHostPropertyAsts=function(e,t,r,n){var i=this;d.isPresent(t)&&p.StringMapWrapper.forEach(t,function(t,o){var a=i._parseBinding(t,r);n.push(i._createElementPropertyAst(e,o,a,r))})},e.prototype._createDirectiveHostEventAsts=function(e,t,r){var n=this;d.isPresent(e)&&p.StringMapWrapper.forEach(e,function(e,i){n._parseEvent(i,e,t,[],r)})},e.prototype._createDirectivePropertyAsts=function(e,t,r){if(d.isPresent(e)){var n=new Map;t.forEach(function(e){var t=n.get(e.name);(d.isBlank(t)||t.isLiteral)&&n.set(e.name,e)}),p.StringMapWrapper.forEach(e,function(e,t){var i=n.get(e);d.isPresent(i)&&r.push(new b.BoundDirectivePropertyAst(t,i.name,i.expression,i.sourceSpan))})}},e.prototype._createElementPropertyAsts=function(e,t,r){var n=this,i=[],o=new Map;return r.forEach(function(e){e.inputs.forEach(function(e){o.set(e.templateName,e)})}),t.forEach(function(t){!t.isLiteral&&d.isBlank(o.get(t.name))&&i.push(n._createElementPropertyAst(e,t.name,t.expression,t.sourceSpan))}),i},e.prototype._createElementPropertyAst=function(e,t,r,n){var i,o,a=null,s=t.split(I);return 1===s.length?(o=this._schemaRegistry.getMappedPropName(s[0]),i=b.PropertyBindingType.Property,this._schemaRegistry.hasProperty(e,o)||this._reportError("Can't bind to '"+o+"' since it isn't a known native property",n)):s[0]==k?(o=s[1],i=b.PropertyBindingType.Attribute):s[0]==N?(o=s[1],i=b.PropertyBindingType.Class):s[0]==V?(a=s.length>2?s[2]:null,o=s[1],i=b.PropertyBindingType.Style):(this._reportError("Invalid property name '"+t+"'",n),i=null),new b.BoundElementPropertyAst(o,i,r,a,n)},e.prototype._findComponentDirectiveNames=function(e){var t=[];return e.forEach(function(e){var r=e.directive.type.name;e.directive.isComponent&&t.push(r)}),t},e.prototype._assertOnlyOneComponent=function(e,t){var r=this._findComponentDirectiveNames(e);r.length>1&&this._reportError("More than one component: "+r.join(","),t)},e.prototype._assertNoComponentsNorElementBindingsOnTemplate=function(e,t,r){var n=this,i=this._findComponentDirectiveNames(e);i.length>0&&this._reportError("Components on an embedded template: "+i.join(","),r),t.forEach(function(e){n._reportError("Property binding "+e.name+" not used by any directive on an embedded template",r)})},e.prototype._assertAllEventsPublishedByDirectives=function(e,t){var r=this,n=new Set;e.forEach(function(e){p.StringMapWrapper.forEach(e.directive.outputs,function(e,t){n.add(e)})}),t.forEach(function(e){(d.isPresent(e.target)||!p.SetWrapper.has(n,e.name))&&r._reportError("Event binding "+e.fullName+" not emitted by any directive on an embedded template",e.sourceSpan)})},e}(),F=function(){function e(){}return e.prototype.visitElement=function(e,t){var r=P.preparseElement(e);if(r.type===P.PreparsedElementType.SCRIPT||r.type===P.PreparsedElementType.STYLE||r.type===P.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=S.htmlVisitAll(this,e.children,H);return new b.ElementAst(e.name,S.htmlVisitAll(this,e.attrs),[],[],[],[],s,a,e.sourceSpan)},e.prototype.visitAttr=function(e,t){return new b.AttrAst(e.name,e.value,e.sourceSpan)},e.prototype.visitText=function(e,t){var r=t.findNgContentIndex(j);return new b.TextAst(e.value,r,e.sourceSpan)},e}(),W=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 U=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 H;for(var r=new C.SelectorMatcher,n=t[0].directive.template.ngContentSelectors,i=null,o=0;o0?t[0]:null},e}(),H=new U(new C.SelectorMatcher,null),q=new F;return 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/core/linker/template_commands","angular2/src/compiler/directive_metadata","angular2/src/core/di","angular2/src/compiler/source_module","angular2/src/compiler/change_detector_compiler","angular2/src/compiler/style_compiler","angular2/src/compiler/command_compiler","angular2/src/compiler/template_parser","angular2/src/compiler/template_normalizer","angular2/src/compiler/runtime_metadata","angular2/src/compiler/command_compiler","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){return e.name+"Template"}function o(e){return i(e)+"Getter"}function a(e){var t=e.substring(0,e.length-D.MODULE_SUFFIX.length);return t+".template"+D.MODULE_SUFFIX}function s(e,t){for(var r=0;r0;r||t.push(e)}),t}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/core/linker/template_commands"),_=e("angular2/src/compiler/directive_metadata"),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/command_compiler"),S=e("angular2/src/compiler/template_parser"),R=e("angular2/src/compiler/template_normalizer"),x=e("angular2/src/compiler/runtime_metadata"),O=e("angular2/src/compiler/command_compiler"),D=e("angular2/src/compiler/util"),T=function(){function e(e,t,r,n,i,o){this._runtimeMetadataResolver=e,this._templateNormalizer=t,this._templateParser=r,this._styleCompiler=n,this._commandCompiler=i,this._cdCompiler=o,this._hostCacheKeys=new Map,this._compiledTemplateCache=new Map,this._compiledTemplateDone=new Map,this._nextTemplateId=0}return e.prototype.normalizeDirectiveMetadata=function(e){return e.isComponent?this._templateNormalizer.normalizeTemplate(e.type,e.template).then(function(t){return new _.CompileDirectiveMetadata({type:e.type,isComponent:e.isComponent,dynamicLoadable:e.dynamicLoadable,selector:e.selector,exportAs:e.exportAs,changeDetection:e.changeDetection,inputs:e.inputs,outputs:e.outputs,hostListeners:e.hostListeners,hostProperties:e.hostProperties,hostAttributes:e.hostAttributes,lifecycleHooks:e.lifecycleHooks,template:t})}):v.PromiseWrapper.resolve(e)},e.prototype.compileHostComponentRuntime=function(e){var t=this._hostCacheKeys.get(e);if(h.isBlank(t)){t=new Object,this._hostCacheKeys.set(e,t);var r=this._runtimeMetadataResolver.getMetadata(e);n(r);var i=_.createHostComponentMeta(r.type,r.selector);this._compileComponentRuntime(t,i,[r],new Set)}return this._compiledTemplateDone.get(t).then(function(e){return new y.CompiledHostTemplate(e)})},e.prototype.clearCache=function(){this._hostCacheKeys.clear(),this._styleCompiler.clearCache(),this._compiledTemplateCache.clear(),this._compiledTemplateDone.clear()},e.prototype._compileComponentRuntime=function(e,t,r,n){var i=this,o=l(r),a=this._compiledTemplateCache.get(e),s=this._compiledTemplateDone.get(e);if(h.isBlank(a)){var c,u=[],p=[],d=h.stringify(t.type.runtime)+"Template"+this._nextTemplateId++;a=new y.CompiledComponentTemplate(d,function(e){return c(e)},p,u),this._compiledTemplateCache.set(e,a),n.add(e),s=v.PromiseWrapper.all([this._styleCompiler.compileComponentRuntime(t.template)].concat(o.map(function(e){return i.normalizeDirectiveMetadata(e)}))).then(function(e){var r=[],o=e.slice(1),a=i._templateParser.parse(t.template.template,o,t.type.name),s=i._cdCompiler.compileComponentRuntime(t.type,t.changeDetection,a);c=s[0];var l=e[0];l.forEach(function(e){return u.push(e)});var d=i._compileCommandsRuntime(t,a,s,n,r);return d.forEach(function(e){return p.push(e)}),v.PromiseWrapper.all(r)}).then(function(t){return m.SetWrapper["delete"](n,e),a}),this._compiledTemplateDone.set(e,s)}return a},e.prototype._compileCommandsRuntime=function(e,t,r,n,i){var o=this,a=this._commandCompiler.compileComponentRuntime(e,t,r,function(e){var t=e.type.runtime,r=o._runtimeMetadataResolver.getViewDirectivesMetadata(e.type.runtime),a=m.SetWrapper.has(n,t),s=o._compileComponentRuntime(t,e,r,n);return a||i.push(o._compiledTemplateDone.get(t)),function(){return s}});return a.forEach(function(e){e instanceof y.BeginComponentCmd&&e.templateGetter()}),a},e.prototype.compileTemplatesCodeGen=function(e){var t=this;if(0===e.length)throw new g.BaseException("No components given");var r=[],s=[],c=[];e.forEach(function(e){var i=e.component;if(n(i),c.push(i),t._processTemplateCodeGen(i,e.directives,r,s),i.dynamicLoadable){var o=_.createHostComponentMeta(i.type,i.selector);c.push(o),t._processTemplateCodeGen(o,[i],r,s)}}),m.ListWrapper.forEachWithIndex(c,function(e,t){var n,a=e.type.moduleUrl+"|"+e.type.name,c=h.IS_DART?"const":"new",l=c+" "+O.TEMPLATE_COMMANDS_MODULE_REF+"CompiledComponentTemplate('"+a+"',"+s[t].join(",")+")";n=e.type.isHost?c+" "+O.TEMPLATE_COMMANDS_MODULE_REF+"CompiledHostTemplate("+l+")":l;var u=i(e.type);r.push(""+D.codeGenExportVariable(u)+n+";"),r.push(D.codeGenValueFn([],u,o(e.type))+";")});var l=e[0].component.type.moduleUrl;return new C.SourceModule(""+a(l),r.join("\n"))},e.prototype.compileStylesheetCodeGen=function(e,t){return this._styleCompiler.compileStylesheetCodeGen(e,t)},e.prototype._processTemplateCodeGen=function(e,t,r,n){var i=l(t),o=this._styleCompiler.compileComponentCodeGen(e.template),a=this._templateParser.parse(e.template.template,i,e.type.name),u=this._cdCompiler.compileComponentCodeGen(e.type,e.changeDetection,a),p=this._commandCompiler.compileComponentCodeGen(e,a,u.expressions,c);s(o.declarations,r),s(u.declarations,r),s(p.declarations,r),n.push([u.expressions[0],p.expression,o.expression])},e=d([b.Injectable(),f("design:paramtypes",[x.RuntimeMetadataResolver,R.TemplateNormalizer,S.TemplateParser,P.StyleCompiler,E.CommandCompiler,w.ChangeDetectionCompiler])],e)}();t.TemplateCompiler=T;var A=function(){function e(e,t){this.component=e,this.directives=t}return e}();return t.NormalizedComponentWithViewDirectives=A,u.define=p,r.exports}),System.register("angular2/src/compiler/runtime_compiler",["angular2/src/core/linker/compiler","angular2/src/core/linker/proto_view_factory","angular2/src/compiler/template_compiler","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/core/linker/compiler"),l=e("angular2/src/core/linker/proto_view_factory"),u=e("angular2/src/compiler/template_compiler"),p=e("angular2/src/core/di"),d=function(e){function t(){e.apply(this,arguments)}return o(t,e),t}(c.Compiler);t.RuntimeCompiler=d;var f=function(e){function t(t,r){e.call(this,t),this._templateCompiler=r}return o(t,e),t.prototype.compileInHost=function(e){var t=this;return this._templateCompiler.compileHostComponentRuntime(e).then(function(e){return c.internalCreateProtoView(t,e)})},t.prototype.clearCache=function(){e.prototype.clearCache.call(this),this._templateCompiler.clearCache()},t=a([p.Injectable(),s("design:paramtypes",[l.ProtoViewFactory,u.TemplateCompiler])],t)}(c.Compiler_);return t.RuntimeCompiler_=f,n.define=i,r.exports}),System.register("angular2/src/compiler/compiler",["angular2/src/compiler/runtime_compiler","angular2/src/compiler/template_compiler","angular2/src/compiler/directive_metadata","angular2/src/compiler/source_module","angular2/src/core/platform_directives_and_pipes","angular2/src/compiler/template_ast","angular2/src/compiler/template_parser","angular2/src/facade/lang","angular2/src/core/di","angular2/src/compiler/template_parser","angular2/src/compiler/html_parser","angular2/src/compiler/template_normalizer","angular2/src/compiler/runtime_metadata","angular2/src/compiler/change_detector_compiler","angular2/src/compiler/style_compiler","angular2/src/compiler/command_compiler","angular2/src/compiler/template_compiler","angular2/src/core/change_detection/change_detection","angular2/src/core/linker/compiler","angular2/src/compiler/runtime_compiler","angular2/src/compiler/schema/element_schema_registry","angular2/src/compiler/schema/dom_element_schema_registry","angular2/src/compiler/url_resolver","angular2/src/core/change_detection/change_detection"],!0,function(e,t,r){function n(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}function i(){return new P.ChangeDetectorGenConfig(f.assertionsEnabled(),!1,!0)}var o=System.global,a=o.define;o.define=void 0;var s=e("angular2/src/compiler/runtime_compiler"),c=e("angular2/src/compiler/template_compiler");t.TemplateCompiler=c.TemplateCompiler;var l=e("angular2/src/compiler/directive_metadata");t.CompileDirectiveMetadata=l.CompileDirectiveMetadata,t.CompileTypeMetadata=l.CompileTypeMetadata,t.CompileTemplateMetadata=l.CompileTemplateMetadata;var u=e("angular2/src/compiler/source_module");t.SourceModule=u.SourceModule,t.SourceWithImports=u.SourceWithImports;var p=e("angular2/src/core/platform_directives_and_pipes");t.PLATFORM_DIRECTIVES=p.PLATFORM_DIRECTIVES,t.PLATFORM_PIPES=p.PLATFORM_PIPES,n(e("angular2/src/compiler/template_ast"));var d=e("angular2/src/compiler/template_parser");t.TEMPLATE_TRANSFORMS=d.TEMPLATE_TRANSFORMS;var f=e("angular2/src/facade/lang"),h=e("angular2/src/core/di"),g=e("angular2/src/compiler/template_parser"),m=e("angular2/src/compiler/html_parser"),v=e("angular2/src/compiler/template_normalizer"),y=e("angular2/src/compiler/runtime_metadata"),_=e("angular2/src/compiler/change_detector_compiler"),b=e("angular2/src/compiler/style_compiler"),C=e("angular2/src/compiler/command_compiler"),w=e("angular2/src/compiler/template_compiler"),P=e("angular2/src/core/change_detection/change_detection"),E=e("angular2/src/core/linker/compiler"),S=e("angular2/src/compiler/runtime_compiler"),R=e("angular2/src/compiler/schema/element_schema_registry"),x=e("angular2/src/compiler/schema/dom_element_schema_registry"),O=e("angular2/src/compiler/url_resolver"),D=e("angular2/src/core/change_detection/change_detection");return t.COMPILER_PROVIDERS=f.CONST_EXPR([D.Lexer,D.Parser,m.HtmlParser,g.TemplateParser,v.TemplateNormalizer,y.RuntimeMetadataResolver,O.DEFAULT_PACKAGE_URL_PROVIDER,b.StyleCompiler,C.CommandCompiler,_.ChangeDetectionCompiler,new h.Provider(P.ChangeDetectorGenConfig,{useFactory:i,deps:[]}),w.TemplateCompiler,new h.Provider(S.RuntimeCompiler,{useClass:s.RuntimeCompiler_}),new h.Provider(E.Compiler,{useExisting:S.RuntimeCompiler}),x.DomElementSchemaRegistry,new h.Provider(R.ElementSchemaRegistry,{useExisting:x.DomElementSchemaRegistry}),O.UrlResolver]),o.define=a,r.exports}),System.register("angular2/compiler",["angular2/src/compiler/url_resolver","angular2/src/compiler/xhr","angular2/src/compiler/compiler"],!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/compiler/url_resolver")),n(e("angular2/src/compiler/xhr")),n(e("angular2/src/compiler/compiler")),i.define=o,r.exports}),System.register("angular2/src/platform/browser_common",["angular2/src/facade/lang","angular2/src/core/di","angular2/core","angular2/common","angular2/src/core/testability/testability","angular2/src/platform/dom/dom_adapter","angular2/src/platform/dom/events/dom_events","angular2/src/platform/dom/events/key_events","angular2/src/platform/dom/events/hammer_gestures","angular2/src/platform/dom/dom_tokens","angular2/src/platform/dom/dom_renderer","angular2/src/platform/dom/shared_styles_host","angular2/src/platform/dom/shared_styles_host","angular2/src/animate/browser_details","angular2/src/animate/animation_builder","angular2/src/platform/browser/browser_adapter","angular2/src/platform/browser/testability","angular2/src/core/profile/wtf_init","angular2/src/platform/dom/events/event_manager","angular2/src/platform/dom/dom_tokens","angular2/src/platform/browser/title","angular2/platform/common_dom","angular2/src/platform/browser/browser_adapter","angular2/src/platform/browser/tools/tools"],!0,function(e,t,r){function n(){return new u.ExceptionHandler(f.DOM,!c.IS_DART)}function i(){return f.DOM.defaultDoc()}function o(){P.BrowserDomAdapter.makeCurrent(),S.wtfInit(),E.BrowserGetTestability.init()}var a=System.global,s=a.define;a.define=void 0;var c=e("angular2/src/facade/lang"),l=e("angular2/src/core/di"),u=e("angular2/core"),p=e("angular2/common"),d=e("angular2/src/core/testability/testability"),f=e("angular2/src/platform/dom/dom_adapter"),h=e("angular2/src/platform/dom/events/dom_events"),g=e("angular2/src/platform/dom/events/key_events"),m=e("angular2/src/platform/dom/events/hammer_gestures"),v=e("angular2/src/platform/dom/dom_tokens"),y=e("angular2/src/platform/dom/dom_renderer"),_=e("angular2/src/platform/dom/shared_styles_host"),b=e("angular2/src/platform/dom/shared_styles_host"),C=e("angular2/src/animate/browser_details"),w=e("angular2/src/animate/animation_builder"),P=e("angular2/src/platform/browser/browser_adapter"),E=e("angular2/src/platform/browser/testability"),S=e("angular2/src/core/profile/wtf_init"),R=e("angular2/src/platform/dom/events/event_manager"),x=e("angular2/src/platform/dom/dom_tokens");t.DOCUMENT=x.DOCUMENT;var O=e("angular2/src/platform/browser/title");t.Title=O.Title;var D=e("angular2/platform/common_dom");t.DebugElementViewListener=D.DebugElementViewListener,t.ELEMENT_PROBE_PROVIDERS=D.ELEMENT_PROBE_PROVIDERS,t.ELEMENT_PROBE_BINDINGS=D.ELEMENT_PROBE_BINDINGS,t.inspectNativeElement=D.inspectNativeElement,t.By=D.By;var T=e("angular2/src/platform/browser/browser_adapter");t.BrowserDomAdapter=T.BrowserDomAdapter;var A=e("angular2/src/platform/browser/tools/tools");return t.enableDebugTools=A.enableDebugTools,t.disableDebugTools=A.disableDebugTools,t.BROWSER_PROVIDERS=c.CONST_EXPR([u.PLATFORM_COMMON_PROVIDERS,new l.Provider(u.PLATFORM_INITIALIZER,{useValue:o,multi:!0})]),t.BROWSER_APP_COMMON_PROVIDERS=c.CONST_EXPR([u.APPLICATION_COMMON_PROVIDERS,p.FORM_PROVIDERS,new l.Provider(u.PLATFORM_PIPES,{useValue:p.COMMON_PIPES,multi:!0}),new l.Provider(u.PLATFORM_DIRECTIVES,{useValue:p.COMMON_DIRECTIVES,multi:!0}),new l.Provider(u.ExceptionHandler,{useFactory:n,deps:[]}),new l.Provider(v.DOCUMENT,{useFactory:i,deps:[]}),new l.Provider(R.EVENT_MANAGER_PLUGINS,{useClass:h.DomEventsPlugin,multi:!0}),new l.Provider(R.EVENT_MANAGER_PLUGINS,{useClass:g.KeyEventsPlugin,multi:!0}),new l.Provider(R.EVENT_MANAGER_PLUGINS,{useClass:m.HammerGesturesPlugin,multi:!0}),new l.Provider(y.DomRenderer,{useClass:y.DomRenderer_}),new l.Provider(u.Renderer,{useExisting:y.DomRenderer}),new l.Provider(b.SharedStylesHost,{useExisting:_.DomSharedStylesHost }),_.DomSharedStylesHost,d.Testability,C.BrowserDetails,w.AnimationBuilder,R.EventManager]),t.initDomAdapter=o,a.define=s,r.exports}),System.register("angular2/platform/browser",["angular2/src/core/angular_entrypoint","angular2/src/platform/browser_common","angular2/src/facade/lang","angular2/src/platform/browser_common","angular2/compiler","angular2/core","angular2/src/core/reflection/reflection_capabilities","angular2/src/platform/browser/xhr_impl","angular2/compiler","angular2/src/core/di"],!0,function(e,t,r){function n(e,r){p.reflector.reflectionCapabilities=new d.ReflectionCapabilities;var n=c.isPresent(r)?[t.BROWSER_APP_PROVIDERS,r]:t.BROWSER_APP_PROVIDERS;return p.platform(l.BROWSER_PROVIDERS).application(n).bootstrap(e)}var i=System.global,o=i.define;i.define=void 0;var a=e("angular2/src/core/angular_entrypoint");t.AngularEntrypoint=a.AngularEntrypoint;var s=e("angular2/src/platform/browser_common");t.BROWSER_PROVIDERS=s.BROWSER_PROVIDERS,t.ELEMENT_PROBE_BINDINGS=s.ELEMENT_PROBE_BINDINGS,t.ELEMENT_PROBE_PROVIDERS=s.ELEMENT_PROBE_PROVIDERS,t.inspectNativeElement=s.inspectNativeElement,t.BrowserDomAdapter=s.BrowserDomAdapter,t.By=s.By,t.Title=s.Title,t.DOCUMENT=s.DOCUMENT,t.enableDebugTools=s.enableDebugTools,t.disableDebugTools=s.disableDebugTools;var c=e("angular2/src/facade/lang"),l=e("angular2/src/platform/browser_common"),u=e("angular2/compiler"),p=e("angular2/core"),d=e("angular2/src/core/reflection/reflection_capabilities"),f=e("angular2/src/platform/browser/xhr_impl"),h=e("angular2/compiler"),g=e("angular2/src/core/di");return t.BROWSER_APP_PROVIDERS=c.CONST_EXPR([l.BROWSER_APP_COMMON_PROVIDERS,u.COMPILER_PROVIDERS,new g.Provider(h.XHR,{useClass:f.XHRImpl})]),t.bootstrap=n,i.define=o,r.exports}),System.register("angular2/instrumentation",["angular2/src/core/profile/profile"],!0,function(e,t,r){var n=System.global,i=n.define;n.define=void 0;var o=e("angular2/src/core/profile/profile");return t.wtfCreateScope=o.wtfCreateScope,t.wtfLeave=o.wtfLeave,t.wtfStartTimeRange=o.wtfStartTimeRange,t.wtfEndTimeRange=o.wtfEndTimeRange,n.define=i,r.exports});